@qumra/fanar-native 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 +83 -0
- package/lib/art.d.ts +8 -0
- package/lib/art.js +29 -0
- package/lib/assets/art/avatar.png +0 -0
- package/lib/assets/art/empty.png +0 -0
- package/lib/assets/art/image-placeholder.png +0 -0
- package/lib/assets/art/plan-update.png +0 -0
- package/lib/assets/brand/app-store.png +0 -0
- package/lib/assets/brand/etisalat.png +0 -0
- package/lib/assets/brand/facebook.png +0 -0
- package/lib/assets/brand/google-play.png +0 -0
- package/lib/assets/brand/instagram.png +0 -0
- package/lib/assets/brand/orange.png +0 -0
- package/lib/assets/brand/snapchat.png +0 -0
- package/lib/assets/brand/tiktok.png +0 -0
- package/lib/assets/brand/vodafone.png +0 -0
- package/lib/assets/brand/we.png +0 -0
- package/lib/assets/brand/whatsapp.png +0 -0
- package/lib/assets/brand/x.png +0 -0
- package/lib/assets/brand/youtube.png +0 -0
- package/lib/components/Button.d.ts +28 -0
- package/lib/components/Button.js +75 -0
- package/lib/components/Disclosure.d.ts +41 -0
- package/lib/components/Disclosure.js +98 -0
- package/lib/components/Display.d.ts +88 -0
- package/lib/components/Display.js +157 -0
- package/lib/components/Drawer.d.ts +27 -0
- package/lib/components/Drawer.js +58 -0
- package/lib/components/Feedback.d.ts +43 -0
- package/lib/components/Feedback.js +136 -0
- package/lib/components/Form.d.ts +92 -0
- package/lib/components/Form.js +196 -0
- package/lib/components/Money.d.ts +29 -0
- package/lib/components/Money.js +65 -0
- package/lib/components/Nav.d.ts +29 -0
- package/lib/components/Nav.js +65 -0
- package/lib/components/NumberStepper.d.ts +16 -0
- package/lib/components/NumberStepper.js +79 -0
- package/lib/components/Overlay.d.ts +54 -0
- package/lib/components/Overlay.js +147 -0
- package/lib/components/Rating.d.ts +18 -0
- package/lib/components/Rating.js +32 -0
- package/lib/components/Shell.d.ts +54 -0
- package/lib/components/Shell.js +99 -0
- package/lib/components/Surfaces.d.ts +64 -0
- package/lib/components/Surfaces.js +122 -0
- package/lib/components/Text.d.ts +14 -0
- package/lib/components/Text.js +31 -0
- package/lib/components/currency.d.ts +251 -0
- package/lib/components/currency.js +48 -0
- package/lib/glyphs.d.ts +2 -0
- package/lib/glyphs.js +7 -0
- package/lib/i18n/content.d.ts +1 -0
- package/lib/i18n/content.js +28 -0
- package/lib/i18n/en.d.ts +1 -0
- package/lib/i18n/en.js +124 -0
- package/lib/i18n/index.d.ts +64 -0
- package/lib/i18n/index.js +91 -0
- package/lib/i18n/screens.d.ts +1 -0
- package/lib/i18n/screens.js +2025 -0
- package/lib/icons.d.ts +18 -0
- package/lib/icons.js +400 -0
- package/lib/index.d.ts +25 -0
- package/lib/index.js +25 -0
- package/lib/lib/a11y.d.ts +4 -0
- package/lib/lib/a11y.js +8 -0
- package/lib/lib/digits.d.ts +3 -0
- package/lib/lib/digits.js +22 -0
- package/lib/lib/motion.d.ts +14 -0
- package/lib/lib/motion.js +47 -0
- package/lib/lib/tone.d.ts +9 -0
- package/lib/lib/tone.js +16 -0
- package/lib/qumra/NavIcon.d.ts +14 -0
- package/lib/qumra/NavIcon.js +17 -0
- package/lib/qumra/QumraIcon.d.ts +17 -0
- package/lib/qumra/QumraIcon.js +91 -0
- package/lib/qumra/data.generated.d.ts +3 -0
- package/lib/qumra/data.generated.js +146 -0
- package/lib/qumra/types.d.ts +5 -0
- package/lib/qumra/types.js +1 -0
- package/lib/theme/context.d.ts +31 -0
- package/lib/theme/context.js +46 -0
- package/lib/theme/fonts.d.ts +9 -0
- package/lib/theme/fonts.js +36 -0
- package/lib/theme/index.d.ts +4 -0
- package/lib/theme/index.js +4 -0
- package/lib/theme/shadows.d.ts +2 -0
- package/lib/theme/shadows.js +30 -0
- package/lib/theme/theme.d.ts +52 -0
- package/lib/theme/theme.js +78 -0
- package/lib/tokens/generated.d.ts +180 -0
- package/lib/tokens/generated.js +173 -0
- package/lib/tokens/index.d.ts +1 -0
- package/lib/tokens/index.js +1 -0
- package/package.json +59 -0
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
export const TEXT_SCALE = ['micro', 'caption', 'ui', 'body', 'lead', 'base', 'h4', 'h3', 'h2', 'h1', 'display', 'hero', 'title', 'mega'];
|
|
2
|
+
export const RADIUS_SCALE = ['mark', 'xs', 'sm', 'field', 'card', 'lg', 'section', 'full'];
|
|
3
|
+
export const SHADOW_SCALE = ['raise', 'tip', 'panel', 'pop', 'modal', 'toast', 'sheet'];
|
|
4
|
+
export const CONTAINER_SCALE = ['page', 'shell', 'note', 'lead'];
|
|
5
|
+
export const ANIMATE_SCALE = ['qfade', 'qslide', 'tip', 'tip-up', 'drawer', 'drawer-rtl', 'savebar', 'skeleton'];
|
|
6
|
+
export const COLOR_SCALE = ['surface', 'bg', 'line', 'hover', 'ink', 'ink2', 'muted', 'muted2', 'border', 'soft', 'soft2', 'brand-100', 'brand-900', 'brand-ink', 'brand', 'brand-hover', 'brand-deep', 'skeleton', 'tint', 'tint2', 'mint', 'amber-900', 'amber', 'amber-bg', 'amber-ink', 'amber-line', 'amber-hover', 'green', 'green-bg', 'green-bg2', 'green-line', 'green-solid', 'violet', 'violet-bg', 'violet-line', 'violet-solid', 'red-100', 'red', 'red-bg', 'red-line', 'danger', 'danger-hover', 'night', 'hero-body', 'hero-meta', 'hero-dim', 'hero-text', 'code-bg', 'code-plain', 'code-key', 'code-tag', 'code-attr', 'code-str', 'code-num', 'code-note', 'code-dim', 'code-line', 'code-chip'];
|
|
7
|
+
export const TOKENS = {
|
|
8
|
+
'--font-sans': '"Alexandria", system-ui, sans-serif',
|
|
9
|
+
'--color-surface': '#ffffff',
|
|
10
|
+
'--color-bg': '#f7f9f9',
|
|
11
|
+
'--color-line': '#edf1f1',
|
|
12
|
+
'--color-hover': '#f2f6f6',
|
|
13
|
+
'--color-ink': '#020809',
|
|
14
|
+
'--color-ink2': '#3d4545',
|
|
15
|
+
'--color-muted': '#5f6a6a',
|
|
16
|
+
'--color-muted2': '#687373',
|
|
17
|
+
'--color-border': '#7f8c8c',
|
|
18
|
+
'--color-soft': '#eaf2f3',
|
|
19
|
+
'--color-soft2': '#dceded',
|
|
20
|
+
'--color-brand-100': '#a5c9cc',
|
|
21
|
+
'--color-brand-900': '#0a2528',
|
|
22
|
+
'--color-brand-ink': '#0f4a4e',
|
|
23
|
+
'--color-brand': '#207982',
|
|
24
|
+
'--color-brand-hover': '#1a646c',
|
|
25
|
+
'--color-brand-deep': '#0b3b3e',
|
|
26
|
+
'--color-skeleton': '#d6dcdc',
|
|
27
|
+
'--color-tint': '#f4faf8',
|
|
28
|
+
'--color-tint2': '#eff6f3',
|
|
29
|
+
'--color-mint': '#7dd3c0',
|
|
30
|
+
'--color-amber-900': '#3d2a05',
|
|
31
|
+
'--color-amber': '#f8ac33',
|
|
32
|
+
'--color-amber-bg': '#fef6e9',
|
|
33
|
+
'--color-amber-ink': '#85570f',
|
|
34
|
+
'--color-amber-line': '#fbd79a',
|
|
35
|
+
'--color-amber-hover': '#de9219',
|
|
36
|
+
'--color-green': '#1e7a45',
|
|
37
|
+
'--color-green-bg': '#f1faf4',
|
|
38
|
+
'--color-green-bg2': '#e9f6ee',
|
|
39
|
+
'--color-green-line': '#bfe6ce',
|
|
40
|
+
'--color-green-solid': '#1e7a45',
|
|
41
|
+
'--color-violet': '#4b3e8e',
|
|
42
|
+
'--color-violet-bg': '#edeaf6',
|
|
43
|
+
'--color-violet-line': '#ded8ef',
|
|
44
|
+
'--color-violet-solid': '#6d5eb8',
|
|
45
|
+
'--color-red-100': '#f3a79e',
|
|
46
|
+
'--color-red': '#8e2b20',
|
|
47
|
+
'--color-red-bg': '#fdecea',
|
|
48
|
+
'--color-red-line': '#f3c9c4',
|
|
49
|
+
'--color-danger': '#c94134',
|
|
50
|
+
'--color-danger-hover': '#a3362b',
|
|
51
|
+
'--color-night': '#0b0f12',
|
|
52
|
+
'--color-hero-body': '#bfd9d8',
|
|
53
|
+
'--color-hero-meta': '#8fb3b2',
|
|
54
|
+
'--color-hero-dim': '#5e7a79',
|
|
55
|
+
'--color-hero-text': '#d7e3e2',
|
|
56
|
+
'--color-code-bg': '#1f1f1f',
|
|
57
|
+
'--color-code-plain': '#d4d4d4',
|
|
58
|
+
'--color-code-key': '#569cd6',
|
|
59
|
+
'--color-code-tag': '#4ec9b0',
|
|
60
|
+
'--color-code-attr': '#9cdcfe',
|
|
61
|
+
'--color-code-str': '#ce9178',
|
|
62
|
+
'--color-code-num': '#b5cea8',
|
|
63
|
+
'--color-code-note': '#6a9955',
|
|
64
|
+
'--color-code-dim': '#858585',
|
|
65
|
+
'--color-code-line': '#303031',
|
|
66
|
+
'--color-code-chip': '#f4f7f7',
|
|
67
|
+
'--text-micro': '11px',
|
|
68
|
+
'--text-caption': '12px',
|
|
69
|
+
'--text-ui': '13px',
|
|
70
|
+
'--text-body': '14px',
|
|
71
|
+
'--text-lead': '15px',
|
|
72
|
+
'--text-base': '16px',
|
|
73
|
+
'--text-base--line-height': 'initial',
|
|
74
|
+
'--text-h4': '17px',
|
|
75
|
+
'--text-h3': '20px',
|
|
76
|
+
'--text-h2': '24px',
|
|
77
|
+
'--text-h1': '30px',
|
|
78
|
+
'--text-display': '36px',
|
|
79
|
+
'--text-hero': '44px',
|
|
80
|
+
'--text-title': '40px',
|
|
81
|
+
'--text-mega': '54px',
|
|
82
|
+
'--container-page': '1600px',
|
|
83
|
+
'--container-shell': '1600px',
|
|
84
|
+
'--container-note': '340px',
|
|
85
|
+
'--container-lead': '520px',
|
|
86
|
+
'--radius-mark': '3px',
|
|
87
|
+
'--radius-xs': '5px',
|
|
88
|
+
'--radius-sm': '7px',
|
|
89
|
+
'--radius-field': '9px',
|
|
90
|
+
'--radius-card': '12px',
|
|
91
|
+
'--radius-lg': '14px',
|
|
92
|
+
'--radius-section': '18px',
|
|
93
|
+
'--radius-full': '999px',
|
|
94
|
+
'--shadow-raise': '0 1px 3px var(--shadow-color)',
|
|
95
|
+
'--shadow-tip': '0 6px 18px var(--shadow-color)',
|
|
96
|
+
'--shadow-panel': '0 10px 30px var(--shadow-color)',
|
|
97
|
+
'--shadow-pop': '0 18px 44px var(--shadow-color)',
|
|
98
|
+
'--shadow-modal': '0 24px 60px rgb(2 8 9 / 0.28)',
|
|
99
|
+
'--shadow-toast': '0 16px 40px rgb(2 8 9 / 0.26)',
|
|
100
|
+
'--shadow-sheet': '0 -14px 40px rgb(2 8 9 / 0.28), inset 0 1px 0 rgb(255 255 255 / 0.06)',
|
|
101
|
+
'--shadow-color': 'rgb(2 8 9 / 0.14)',
|
|
102
|
+
'--animate-qfade': 'qfade 0.16s ease-out',
|
|
103
|
+
'--animate-qslide': 'qslidein 0.22s ease-out',
|
|
104
|
+
'--animate-tip': 'tip-in 0.26s cubic-bezier(0.2, 0.8, 0.2, 1)',
|
|
105
|
+
'--animate-tip-up': 'tip-up 0.3s cubic-bezier(0.2, 0.9, 0.2, 1)',
|
|
106
|
+
'--animate-drawer': 'drawer-ltr 0.32s cubic-bezier(0.2, 0.9, 0.2, 1)',
|
|
107
|
+
'--animate-drawer-rtl': 'drawer-rtl 0.32s cubic-bezier(0.2, 0.9, 0.2, 1)',
|
|
108
|
+
'--animate-savebar': 'savebar-in 0.2s cubic-bezier(0.2, 0.8, 0.2, 1)',
|
|
109
|
+
'--animate-skeleton': 'skeleton-pulse 1.6s ease-in-out infinite',
|
|
110
|
+
'--num-align': 'right',
|
|
111
|
+
'--num-align-far': 'left',
|
|
112
|
+
'--num-pad-right': '0.875rem',
|
|
113
|
+
'--num-pad-left': '3.5rem',
|
|
114
|
+
'--num-icon-pad-right': '2.5rem',
|
|
115
|
+
'--num-icon-pad-left': '0.875rem',
|
|
116
|
+
};
|
|
117
|
+
export const DARK_TOKENS = {
|
|
118
|
+
'--color-surface': '#101718',
|
|
119
|
+
'--color-bg': '#0a0f10',
|
|
120
|
+
'--color-line': '#1e2829',
|
|
121
|
+
'--color-hover': '#1a2425',
|
|
122
|
+
'--color-ink': '#f2f6f6',
|
|
123
|
+
'--color-ink2': '#c7d1d1',
|
|
124
|
+
'--color-muted': '#93a0a0',
|
|
125
|
+
'--color-muted2': '#7a8787',
|
|
126
|
+
'--color-border': '#5e6b6c',
|
|
127
|
+
'--color-soft': '#12363a',
|
|
128
|
+
'--color-soft2': '#17454a',
|
|
129
|
+
'--color-brand-ink': '#7dd3c0',
|
|
130
|
+
'--color-skeleton': '#2c3232',
|
|
131
|
+
'--color-amber': '#f8ac33',
|
|
132
|
+
'--color-amber-bg': '#2b2009',
|
|
133
|
+
'--color-amber-ink': '#f5c77a',
|
|
134
|
+
'--color-amber-line': '#5c4415',
|
|
135
|
+
'--color-green': '#6ecf9a',
|
|
136
|
+
'--color-green-bg': '#0d2119',
|
|
137
|
+
'--color-green-bg2': '#102a22',
|
|
138
|
+
'--color-green-line': '#245140',
|
|
139
|
+
'--color-violet': '#b9aeea',
|
|
140
|
+
'--color-violet-bg': '#1e1a33',
|
|
141
|
+
'--color-violet-line': '#38305c',
|
|
142
|
+
'--color-red': '#f3a79e',
|
|
143
|
+
'--color-red-bg': '#2c1613',
|
|
144
|
+
'--color-red-line': '#5c2a24',
|
|
145
|
+
'--color-code-chip': '#17201f',
|
|
146
|
+
'--shadow-color': 'rgb(0 0 0 / 0.55)',
|
|
147
|
+
};
|
|
148
|
+
export const TEXT_PX = {
|
|
149
|
+
'micro': 11,
|
|
150
|
+
'caption': 12,
|
|
151
|
+
'ui': 13,
|
|
152
|
+
'body': 14,
|
|
153
|
+
'lead': 15,
|
|
154
|
+
'base': 16,
|
|
155
|
+
'h4': 17,
|
|
156
|
+
'h3': 20,
|
|
157
|
+
'h2': 24,
|
|
158
|
+
'h1': 30,
|
|
159
|
+
'display': 36,
|
|
160
|
+
'hero': 44,
|
|
161
|
+
'title': 40,
|
|
162
|
+
'mega': 54,
|
|
163
|
+
};
|
|
164
|
+
export const RADIUS_PX = {
|
|
165
|
+
'mark': 3,
|
|
166
|
+
'xs': 5,
|
|
167
|
+
'sm': 7,
|
|
168
|
+
'field': 9,
|
|
169
|
+
'card': 12,
|
|
170
|
+
'lg': 14,
|
|
171
|
+
'section': 18,
|
|
172
|
+
'full': 999,
|
|
173
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TEXT_SCALE, RADIUS_SCALE, SHADOW_SCALE, CONTAINER_SCALE, ANIMATE_SCALE, COLOR_SCALE, TOKENS, DARK_TOKENS, TEXT_PX, RADIUS_PX, type TextSize, type Radius, type Shadow, type Container, type Animation, type ColorToken, type TokenName, } from './generated';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TEXT_SCALE, RADIUS_SCALE, SHADOW_SCALE, CONTAINER_SCALE, ANIMATE_SCALE, COLOR_SCALE, TOKENS, DARK_TOKENS, TEXT_PX, RADIUS_PX, } from './generated';
|
package/package.json
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@qumra/fanar-native",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Qumra's React Native component library — the native sibling of @qumra/fanar. Token-driven, RTL-first, zero runtime dependencies.",
|
|
5
|
+
"license": "UNLICENSED",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"qumra",
|
|
8
|
+
"design-system",
|
|
9
|
+
"react-native",
|
|
10
|
+
"rtl",
|
|
11
|
+
"arabic"
|
|
12
|
+
],
|
|
13
|
+
"main": "lib/index.js",
|
|
14
|
+
"types": "lib/index.d.ts",
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"types": "./lib/index.d.ts",
|
|
18
|
+
"default": "./lib/index.js"
|
|
19
|
+
},
|
|
20
|
+
"./tokens": {
|
|
21
|
+
"types": "./lib/tokens/index.d.ts",
|
|
22
|
+
"default": "./lib/tokens/index.js"
|
|
23
|
+
},
|
|
24
|
+
"./package.json": "./package.json"
|
|
25
|
+
},
|
|
26
|
+
"files": [
|
|
27
|
+
"lib"
|
|
28
|
+
],
|
|
29
|
+
"sideEffects": false,
|
|
30
|
+
"publishConfig": {
|
|
31
|
+
"access": "public"
|
|
32
|
+
},
|
|
33
|
+
"scripts": {
|
|
34
|
+
"generate": "node scripts/generate-tokens.mjs",
|
|
35
|
+
"sync-tokens": "node scripts/sync-tokens.mjs && node scripts/generate-tokens.mjs",
|
|
36
|
+
"typecheck": "tsc -p tsconfig.check.json --noEmit",
|
|
37
|
+
"check-resolution": "node scripts/check-resolution.mjs",
|
|
38
|
+
"build": "node scripts/build.mjs",
|
|
39
|
+
"verify": "node scripts/check-resolution.mjs && node scripts/sync-tokens.mjs --check && node scripts/generate-tokens.mjs --check && npm run typecheck",
|
|
40
|
+
"prepublishOnly": "npm run verify && npm run build && npm run check-publish",
|
|
41
|
+
"check-publish": "node scripts/check-publish.mjs"
|
|
42
|
+
},
|
|
43
|
+
"peerDependencies": {
|
|
44
|
+
"lucide-react-native": ">=0.400.0",
|
|
45
|
+
"react": ">=19.0.0",
|
|
46
|
+
"react-native": ">=0.79.0",
|
|
47
|
+
"react-native-safe-area-context": ">=4.0.0",
|
|
48
|
+
"react-native-svg": ">=15.0.0"
|
|
49
|
+
},
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"@types/react": "^19.1.4",
|
|
52
|
+
"lucide-react-native": "^1.47.0",
|
|
53
|
+
"react": "^19.1.4",
|
|
54
|
+
"react-native": "^0.81.6",
|
|
55
|
+
"react-native-safe-area-context": "^5.10.0",
|
|
56
|
+
"react-native-svg": "^15.15.5",
|
|
57
|
+
"typescript": "^5.7.3"
|
|
58
|
+
}
|
|
59
|
+
}
|