@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.
Files changed (58) hide show
  1. package/LICENSE.md +175 -0
  2. package/README.md +160 -0
  3. package/dist/components/Accordion/Accordion.d.ts +9 -0
  4. package/dist/components/Accordion/styles.d.ts +50 -0
  5. package/dist/components/Button/Button.d.ts +12 -0
  6. package/dist/components/Button/styles.d.ts +31 -0
  7. package/dist/components/Card/Card.d.ts +10 -0
  8. package/dist/components/Card/styles.d.ts +22 -0
  9. package/dist/components/Checkbox/Checkbox.d.ts +15 -0
  10. package/dist/components/Checkbox/styles.d.ts +45 -0
  11. package/dist/components/Dropdown/Dropdown.d.ts +9 -0
  12. package/dist/components/Dropdown/styles.d.ts +32 -0
  13. package/dist/components/Gradient/Gradient.d.ts +9 -0
  14. package/dist/components/Icon/Icon.d.ts +16 -0
  15. package/dist/components/Icon/IconGradient.d.ts +4 -0
  16. package/dist/components/Icon/createIconComponent.d.ts +16 -0
  17. package/dist/components/Icon/index.d.ts +949 -0
  18. package/dist/components/Illustrations/Illustration.d.ts +3 -0
  19. package/dist/components/Illustrations/createIllustrationComponent.d.ts +11 -0
  20. package/dist/components/Illustrations/index.d.ts +134 -0
  21. package/dist/components/InputError/InputError.d.ts +5 -0
  22. package/dist/components/Label/Label.d.ts +12 -0
  23. package/dist/components/Label/styles.d.ts +9 -0
  24. package/dist/components/Link/Link.d.ts +17 -0
  25. package/dist/components/Link/styles.d.ts +12 -0
  26. package/dist/components/Loading/Loading.d.ts +10 -0
  27. package/dist/components/Loading/LoadingLogo.d.ts +8 -0
  28. package/dist/components/Loading/LoadingLogo.styles.d.ts +4 -0
  29. package/dist/components/Loading/styles.d.ts +4 -0
  30. package/dist/components/Popover/Popover.d.ts +12 -0
  31. package/dist/components/Popover/styles.d.ts +51 -0
  32. package/dist/components/ProgressBar/ProgressBar.d.ts +8 -0
  33. package/dist/components/ProgressBar/styles.d.ts +24 -0
  34. package/dist/components/RadioGroup/RadioGroup.d.ts +15 -0
  35. package/dist/components/RadioGroup/styles.d.ts +32 -0
  36. package/dist/components/Separator/Separator.d.ts +8 -0
  37. package/dist/components/Separator/styles.d.ts +22 -0
  38. package/dist/components/Tags/Tags.d.ts +11 -0
  39. package/dist/components/Tags/styles.d.ts +8 -0
  40. package/dist/components/Text/BaseText.d.ts +9 -0
  41. package/dist/components/Text/Text.d.ts +7 -0
  42. package/dist/components/TextInput/TextInput.d.ts +9 -0
  43. package/dist/components/TextInput/styles.d.ts +54 -0
  44. package/dist/components/ToolTip/ToolTip.d.ts +12 -0
  45. package/dist/index.d.ts +25 -0
  46. package/dist/index.esm.js +2985 -0
  47. package/dist/index.esm.js.map +1 -0
  48. package/dist/index.js +3148 -0
  49. package/dist/index.js.map +1 -0
  50. package/dist/package.json +39 -0
  51. package/dist/theme/index.d.ts +16 -0
  52. package/dist/types/index.d.ts +6 -0
  53. package/dist/types/styles.d.ts +3 -0
  54. package/dist/utils/createReactNativeSvg.d.ts +4 -0
  55. package/dist/utils/gradientParser.d.ts +13 -0
  56. package/dist/utils/parser.d.ts +12 -0
  57. package/dist/utils/replaceUrlsWithAnchors.d.ts +6 -0
  58. package/package.json +73 -0
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "@a-little-world/little-world-design-system-native",
3
+ "version": "0.5.1",
4
+ "type": "commonjs",
5
+ "main": "index.js",
6
+ "module": "index.esm.js",
7
+ "types": "index.d.ts",
8
+ "files": [
9
+ "index.js",
10
+ "index.esm.js",
11
+ "index.d.ts",
12
+ "components",
13
+ "theme",
14
+ "types",
15
+ "utils"
16
+ ],
17
+ "license": "MIT",
18
+ "peerDependencies": {
19
+ "@babel/runtime": "^7.27.6",
20
+ "@react-navigation/native": "^7.0.14",
21
+ "expo-linear-gradient": "~15.0.7",
22
+ "react": "^19.1.0",
23
+ "react-dom": "^19.1.0",
24
+ "react-native": "^0.81.5",
25
+ "react-native-svg": "15.12.1",
26
+ "styled-components": "^6.1.19"
27
+ },
28
+ "dependencies": {
29
+ "@rn-primitives/accordion": "^1.2.0",
30
+ "@rn-primitives/checkbox": "^1.1.0",
31
+ "@rn-primitives/dropdown-menu": "^1.2.0",
32
+ "@rn-primitives/popover": "^1.1.0",
33
+ "@rn-primitives/progress": "^1.2.0",
34
+ "@rn-primitives/radio-group": "^1.2.0",
35
+ "@rn-primitives/separator": "^1.2.0",
36
+ "@rn-primitives/types": "^1.1.0",
37
+ "install": "^0.13.0"
38
+ }
39
+ }
@@ -0,0 +1,16 @@
1
+ import React, { ReactNode } from 'react';
2
+ import { ThemeVariants, ThemeContextType } from '@a-little-world/little-world-design-system-core';
3
+ import { DefaultTheme } from 'styled-components/native';
4
+ export declare const lightTheme: DefaultTheme;
5
+ export declare const darkTheme: DefaultTheme;
6
+ export declare const defaultTheme: DefaultTheme;
7
+ export declare const themes: {
8
+ readonly light: DefaultTheme;
9
+ readonly dark: DefaultTheme;
10
+ };
11
+ export interface ThemeProviderProps {
12
+ children: ReactNode;
13
+ defaultMode?: ThemeVariants;
14
+ }
15
+ export declare const themeContext: React.Context<ThemeContextType>;
16
+ export declare const CustomThemeProvider: ({ children, defaultMode, }: ThemeProviderProps) => React.JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { ThemeNative } from '@a-little-world/little-world-design-system-core';
2
+ export type { ThemeNative };
3
+ declare module 'styled-components/native' {
4
+ interface DefaultTheme extends ThemeNative {
5
+ }
6
+ }
@@ -0,0 +1,3 @@
1
+ import { ViewStyle } from 'react-native';
2
+ export type FlexAlignType = NonNullable<ViewStyle['alignItems']>;
3
+ export type JustifyContentType = NonNullable<ViewStyle['justifyContent']>;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { SvgTransformOptions, ParsedSvg } from '@a-little-world/little-world-design-system-core';
3
+ export declare const createReactNativeSvg: (svgData: ParsedSvg, options: SvgTransformOptions) => React.JSX.Element;
4
+ export default createReactNativeSvg;
@@ -0,0 +1,13 @@
1
+ type GradientInfo = {
2
+ colors: readonly [string, string, ...string[]];
3
+ start: {
4
+ x: number;
5
+ y: number;
6
+ };
7
+ end: {
8
+ x: number;
9
+ y: number;
10
+ };
11
+ };
12
+ export declare const parseGradientString: (gradientString: string) => GradientInfo;
13
+ export {};
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ interface ParserOptions {
3
+ customElements?: {
4
+ Component: React.ElementType;
5
+ props?: Record<string, any>;
6
+ tag: string;
7
+ }[];
8
+ onlyLinks?: boolean;
9
+ nonInteractive?: boolean;
10
+ }
11
+ declare const textParser: (text: string, options?: ParserOptions) => React.JSX.Element;
12
+ export default textParser;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Replaces all URLs in a text with HTML anchor tags
3
+ * @param text - The input text containing URLs
4
+ * @returns The text with URLs replaced with anchor tags
5
+ */
6
+ export default function replaceUrlsWithAnchors(text: string): string;
package/package.json ADDED
@@ -0,0 +1,73 @@
1
+ {
2
+ "name": "@a-little-world/little-world-design-system-native",
3
+ "version": "0.5.1",
4
+ "type": "commonjs",
5
+ "main": "dist/index.js",
6
+ "module": "dist/index.esm.js",
7
+ "types": "dist/index.d.ts",
8
+ "files": [
9
+ "dist"
10
+ ],
11
+ "license": "MIT",
12
+ "peerDependencies": {
13
+ "@babel/runtime": "^7.27.6",
14
+ "@react-navigation/native": "^7.0.14",
15
+ "expo-linear-gradient": "~15.0.7",
16
+ "react": "^19.1.0",
17
+ "react-dom": "^19.1.0",
18
+ "react-native": "^0.81.5",
19
+ "react-native-svg": "15.12.1",
20
+ "styled-components": "^6.1.19"
21
+ },
22
+ "dependencies": {
23
+ "@rn-primitives/accordion": "^1.2.0",
24
+ "@rn-primitives/checkbox": "^1.1.0",
25
+ "@rn-primitives/dropdown-menu": "^1.2.0",
26
+ "@rn-primitives/popover": "^1.1.0",
27
+ "@rn-primitives/progress": "^1.2.0",
28
+ "@rn-primitives/radio-group": "^1.2.0",
29
+ "@rn-primitives/separator": "^1.2.0",
30
+ "@rn-primitives/types": "^1.1.0",
31
+ "install": "^0.13.0",
32
+ "@a-little-world/little-world-design-system-core": "1.7.0"
33
+ },
34
+ "devDependencies": {
35
+ "@babel/core": "^7.24.0",
36
+ "@babel/plugin-transform-runtime": "^7.24.0",
37
+ "@babel/preset-env": "^7.24.0",
38
+ "@babel/preset-react": "^7.24.0",
39
+ "@babel/preset-typescript": "^7.24.0",
40
+ "@rollup/plugin-babel": "^6.0.4",
41
+ "@rollup/plugin-commonjs": "^25.0.7",
42
+ "@rollup/plugin-node-resolve": "^15.2.3",
43
+ "@rollup/plugin-typescript": "^12.1.2",
44
+ "@types/react": "^19.1.10",
45
+ "@types/react-native": "~0.72.8",
46
+ "rimraf": "^5.0.5",
47
+ "rollup": "^4.9.6",
48
+ "rollup-plugin-peer-deps-external": "^2.2.4",
49
+ "tslib": "^2.6.2",
50
+ "typescript": "~5.3.3"
51
+ },
52
+ "repository": {
53
+ "type": "git",
54
+ "url": "https://github.com/a-little-world/little-world-design-system"
55
+ },
56
+ "publishConfig": {
57
+ "access": "public",
58
+ "registry": "https://registry.npmjs.org"
59
+ },
60
+ "author": "",
61
+ "bugs": {
62
+ "url": "https://github.com/a-little-world/little-world-design-system/issues"
63
+ },
64
+ "homepage": "https://github.com/a-little-world/little-world-design-system#readme",
65
+ "scripts": {
66
+ "build": "rimraf dist && rollup -c --bundleConfigAsCjs && node prepare-package.js",
67
+ "build:types": "tsc --emitDeclarationOnly",
68
+ "lint": "eslint src --ext .ts,.tsx",
69
+ "lint:fix": "eslint src --ext .ts,.tsx --fix",
70
+ "format": "prettier --write src",
71
+ "format:check": "prettier --check src"
72
+ }
73
+ }