@12min/ds 0.1.0 → 1.0.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 CHANGED
@@ -1,12 +1,3 @@
1
- ```text
2
- ██╗ ██████╗ ███╗ ███╗ ██╗ ███╗ ██╗ ██████╗ ███████╗
3
- ███║ ╚════██╗ ████╗ ████║ ██║ ████╗ ██║ ██╔══██╗ ██╔════╝
4
- ╚██║ █████╔╝ ██╔████╔██║ ██║ ██╔██╗ ██║ █████╗ ██║ ██║ ███████╗
5
- ██║ ██╔═══╝ ██║╚██╔╝██║ ██║ ██║╚██╗██║ ╚════╝ ██║ ██║ ╚════██║
6
- ██║ ███████╗ ██║ ╚═╝ ██║ ██║ ██║ ╚████║ ██████╔╝ ███████║
7
- ╚═╝ ╚══════╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═══╝ ╚═════╝ ╚══════╝
8
- ```
9
-
10
1
  # `@12min/ds`
11
2
 
12
3
  Single source of truth for 12min's visual language — tokens, styles, and components shared across web and mobile.
@@ -15,12 +6,15 @@ Single source of truth for 12min's visual language — tokens, styles, and compo
15
6
 
16
7
  ## What's included
17
8
 
18
- | | Now | Phase 2 |
19
- |---|---|---|
20
- | Color tokens | ✅ | |
21
- | CSS theme (`theme.css`) | ✅ | |
22
- | Semantic themes (light / dark) | ✅ | |
23
- | Core components (Button, Input, Card, Modal) | | ✅ |
9
+ | | Status |
10
+ |---|---|
11
+ | Color palette (`marianBlue`, `midnight`, `gray`, `mustard`, `ketchup`, `mint`) | ✅ |
12
+ | Typography tokens (14-entry scale) | ✅ |
13
+ | CSS theme (`theme.css`) colors + `@utility text-*` blocks | ✅ |
14
+ | Semantic themes (light / dark) | ✅ |
15
+ | Components — Button, Chip, Alert, ProgressBar, Input, Checkbox, RadioItem, RadioGroup, ActionItem, Stepper, RatingScale | ✅ |
16
+ | `DSThemeProvider` + `useTheme` (native programmatic dark mode) | ✅ |
17
+ | Storybook 8 | ✅ |
24
18
 
25
19
  ---
26
20
 
@@ -37,26 +31,14 @@ pnpm add @12min/ds
37
31
  pnpm add tailwindcss@^4.0.0
38
32
 
39
33
  # mobile
40
- bun add nativewind@5.0.0-preview.3
41
- bun add --dev tailwindcss@^4.0.0
34
+ pnpm add nativewind@5.0.0-preview.3
35
+ pnpm add --dev tailwindcss@^4.0.0
42
36
  ```
43
37
 
44
38
  ---
45
39
 
46
40
  ## Usage
47
41
 
48
- ### Tokens
49
-
50
- Raw token values as TypeScript — use anywhere, including `StyleSheet.create`.
51
-
52
- ```ts
53
- import { colors } from '@12min/ds/tokens'
54
-
55
- const styles = StyleSheet.create({
56
- button: { backgroundColor: colors.brand.primary },
57
- })
58
- ```
59
-
60
42
  ### Web — Tailwind v4
61
43
 
62
44
  Import the generated theme in your global CSS entry point:
@@ -67,15 +49,28 @@ Import the generated theme in your global CSS entry point:
67
49
  @import "@12min/ds/tailwind/theme.css";
68
50
  ```
69
51
 
70
- All tokens are now available as Tailwind utilities:
52
+ All palette tokens are available as Tailwind utilities, and typography utilities are pre-built:
53
+
54
+ ```tsx
55
+ <div className="bg-marian-blue-600 text-white">
56
+ <p className="text-body-default">Body text</p>
57
+ <h1 className="text-h1">Heading</h1>
58
+ ```
59
+
60
+ Import components from `@12min/ds`:
71
61
 
72
62
  ```tsx
73
- <div className="bg-brand-primary text-neutral-0">
74
- <div className="bg-success text-neutral-0">
75
- <div className="bg-error-light">
63
+ import { Button, Input, RadioItem, RadioGroup } from '@12min/ds'
64
+
65
+ <Button variant="primary" size="md">Continue</Button>
66
+
67
+ <RadioGroup label="Pick your profile">
68
+ <RadioItem label="Leader" selected={selected === 'leader'} onClick={() => setSelected('leader')} />
69
+ <RadioItem label="Student" selected={selected === 'student'} onClick={() => setSelected('student')} />
70
+ </RadioGroup>
76
71
  ```
77
72
 
78
- ### Mobile — NativeWind v5
73
+ ### Mobile — React Native + NativeWind v5
79
74
 
80
75
  Point Metro at the published theme file:
81
76
 
@@ -88,36 +83,73 @@ module.exports = withNativeWind(config, {
88
83
  })
89
84
  ```
90
85
 
91
- Same class names, compiled to `StyleSheet` at build time:
86
+ Wrap your app in `DSThemeProvider` for programmatic dark mode:
92
87
 
93
88
  ```tsx
94
- <View className="bg-brand-primary dark:bg-neutral-900">
95
- <Text className="text-neutral-0">Hello</Text>
96
- </View>
89
+ import { DSThemeProvider, Button, Input } from '@12min/ds'
90
+
91
+ export default function App() {
92
+ const colorScheme = useColorScheme()
93
+ return (
94
+ <DSThemeProvider colorScheme={colorScheme ?? 'light'}>
95
+ <Button variant="primary" onPress={handlePress}>Continue</Button>
96
+ <Input placeholder="Email" state="default" />
97
+ </DSThemeProvider>
98
+ )
99
+ }
100
+ ```
101
+
102
+ Access theme tokens directly via `useTheme()`:
103
+
104
+ ```tsx
105
+ import { useTheme } from '@12min/ds'
106
+
107
+ const { theme } = useTheme()
108
+ // theme.primary, theme.background, theme.error, ...
97
109
  ```
98
110
 
99
- ### Semantic themes (optional)
111
+ ### Tokens (framework-agnostic)
100
112
 
101
- For programmatic access to token values — useful for chart libraries, animations, or any non-Tailwind consumer:
113
+ Raw token values as TypeScript — useful for chart libraries, animations, or any non-Tailwind consumer:
102
114
 
103
115
  ```ts
116
+ import { colors, typography } from '@12min/ds/tokens'
104
117
  import { lightTheme, darkTheme } from '@12min/ds'
105
- import { useColorScheme } from 'react-native'
106
118
 
107
- const scheme = useColorScheme()
108
- const theme = scheme === 'dark' ? darkTheme : lightTheme
109
-
110
- // theme.primary === '#FF6B35'
111
- // theme.background, theme.surface, theme.error, ...
119
+ // colors.marianBlue[600] === '#475CBB'
120
+ // typography.bodyDefault.fontSize === 14
121
+ // lightTheme.primary === '#475CBB'
112
122
  ```
113
123
 
114
124
  ---
115
125
 
126
+ ## Components
127
+
128
+ All components are available on both web and native from the same `@12min/ds` import.
129
+
130
+ | Component | Props |
131
+ |---|---|
132
+ | `Button` | `variant` (primary/secondary/ghost), `size` (sm/md/lg), `disabled` |
133
+ | `Chip` | `children`, `checked`, `onPress`/`onClick` |
134
+ | `Alert` | `variant` (info/success), `title`, `description` |
135
+ | `ProgressBar` | `value` (0–100) |
136
+ | `Input` | `state` (default/filled/error/disabled), `leadingIcon`, `placeholder` |
137
+ | `Checkbox` | `checked`, `onChange`, `disabled` |
138
+ | `RadioItem` | `label`, `description`, `selected`, `icon`, `onPress`/`onClick` |
139
+ | `RadioGroup` | `label` (for a11y), `className`/`style` — wraps `RadioItem` list |
140
+ | `ActionItem` | `label`, `description`, `selected`, `icon`, `onPress`/`onClick` |
141
+ | `Stepper` | `steps`, `currentStep` |
142
+ | `RatingScale` | `value`, `onChange`, `options` (default: 5 emoji options) |
143
+
144
+ > Native components accept a `style` prop for layout overrides. Web components accept `className`.
145
+
146
+ ---
147
+
116
148
  ## Development
117
149
 
118
150
  ### Requirements
119
151
 
120
- - Node 20+
152
+ - Node 22+
121
153
  - pnpm 10+
122
154
 
123
155
  ```sh
@@ -132,13 +164,15 @@ pnpm install
132
164
  | `pnpm dev` | Watch mode (tsup) |
133
165
  | `pnpm generate:theme` | Regenerate `src/tailwind/theme.css` from tokens |
134
166
  | `pnpm typecheck` | TypeScript — library code |
167
+ | `pnpm test:unit` | Run unit tests (vitest) |
168
+ | `pnpm storybook` | Start Storybook on port 6006 |
135
169
  | `pnpm lint` | ESLint |
136
170
 
137
171
  ### Adding or changing tokens
138
172
 
139
- 1. Edit `src/tokens/colors.ts`
173
+ 1. Edit `src/tokens/colors.ts` or `src/tokens/typography.ts`
140
174
  2. Run `pnpm generate:theme` to regenerate `theme.css`
141
- 3. Verify the output in `src/tailwind/theme.css`
175
+ 3. If adding a new semantic token, update `src/themes/types.ts` first, then both `lightTheme.ts` and `darkTheme.ts`
142
176
  4. Run `pnpm build` before committing
143
177
 
144
178
  `theme.css` is gitignored — it is always generated from source.
@@ -159,8 +193,7 @@ pnpm version major # 0.1.0 → 1.0.0
159
193
  git push origin main --tags
160
194
  ```
161
195
 
162
- The GitHub Actions release workflow publishes to npm automatically on `v*` tags.
163
- See [`docs/next-steps.md §5`](docs/next-steps.md) for the full workflow file.
196
+ The GitHub Actions CI runs typecheck, build, and unit tests on every push to `main` and on pull requests.
164
197
 
165
198
  ---
166
199
 
@@ -0,0 +1,80 @@
1
+ import {
2
+ colors
3
+ } from "./chunk-NK4IHR7O.mjs";
4
+
5
+ // src/themes/lightTheme.ts
6
+ var lightTheme = {
7
+ background: colors.marianBlue[50],
8
+ surface: colors.marianBlue[100],
9
+ border: colors.marianBlue[200],
10
+ onBackground: colors.midnight[900],
11
+ onSurface: colors.midnight[700],
12
+ muted: colors.gray[500],
13
+ primary: colors.marianBlue[600],
14
+ secondary: colors.midnight[900],
15
+ success: colors.mint[800],
16
+ error: colors.ketchup[600],
17
+ warning: colors.mustard[500],
18
+ info: colors.marianBlue[500],
19
+ surfaceDisabled: colors.gray[50],
20
+ successBg: colors.successBg,
21
+ textSecondary: colors.gray[700],
22
+ textTertiary: colors.gray[500],
23
+ textInverse: colors.white,
24
+ borderStrong: colors.marianBlue[600],
25
+ borderSubtle: colors.marianBlue[200],
26
+ interactivePressed: colors.marianBlue[800]
27
+ };
28
+
29
+ // src/themes/darkTheme.ts
30
+ var darkTheme = {
31
+ background: colors.midnight[900],
32
+ surface: colors.midnight[700],
33
+ border: colors.midnight[500],
34
+ onBackground: colors.marianBlue[50],
35
+ onSurface: colors.gray[50],
36
+ muted: colors.gray[600],
37
+ primary: colors.marianBlue[400],
38
+ secondary: colors.marianBlue[50],
39
+ success: colors.mint[400],
40
+ error: colors.ketchup[400],
41
+ warning: colors.mustard[400],
42
+ info: colors.marianBlue[300],
43
+ surfaceDisabled: colors.midnight[600],
44
+ successBg: colors.midnight[800],
45
+ textSecondary: colors.gray[400],
46
+ textTertiary: colors.gray[500],
47
+ textInverse: colors.midnight[900],
48
+ borderStrong: colors.marianBlue[400],
49
+ borderSubtle: colors.midnight[600],
50
+ interactivePressed: colors.marianBlue[300]
51
+ };
52
+
53
+ // src/components/RatingScale/RatingScale.styles.ts
54
+ var ratingScaleTokens = {
55
+ itemWidth: 60,
56
+ circleSize: 60,
57
+ circlePadding: 8,
58
+ circleRadius: 30,
59
+ emojiFontSize: 38,
60
+ emojiLineHeight: 44,
61
+ labelFontSize: 12,
62
+ numberFontSize: 10,
63
+ itemGap: 8,
64
+ labelNumberGap: 11
65
+ };
66
+ var DEFAULT_OPTIONS = [
67
+ { emoji: "\u{1F61E}", label: "Nada\na ver" },
68
+ { emoji: "\u{1F641}", label: "Pouco\na ver" },
69
+ { emoji: "\u{1F610}", label: "Mais ou\nmenos" },
70
+ { emoji: "\u{1F642}", label: "Tem\na ver" },
71
+ { emoji: "\u{1F60A}", label: "Totalmente\neu" }
72
+ ];
73
+
74
+ export {
75
+ lightTheme,
76
+ darkTheme,
77
+ ratingScaleTokens,
78
+ DEFAULT_OPTIONS
79
+ };
80
+ //# sourceMappingURL=chunk-CC3QVZS2.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/themes/lightTheme.ts","../src/themes/darkTheme.ts","../src/components/RatingScale/RatingScale.styles.ts"],"sourcesContent":["import { colors } from '../tokens/colors'\nimport type { Theme } from './types'\n\nexport const lightTheme: Theme = {\n background: colors.marianBlue[50],\n surface: colors.marianBlue[100],\n border: colors.marianBlue[200],\n onBackground: colors.midnight[900],\n onSurface: colors.midnight[700],\n muted: colors.gray[500],\n primary: colors.marianBlue[600],\n secondary: colors.midnight[900],\n success: colors.mint[800],\n error: colors.ketchup[600],\n warning: colors.mustard[500],\n info: colors.marianBlue[500],\n\n surfaceDisabled: colors.gray[50],\n successBg: colors.successBg,\n textSecondary: colors.gray[700],\n textTertiary: colors.gray[500],\n textInverse: colors.white,\n borderStrong: colors.marianBlue[600],\n borderSubtle: colors.marianBlue[200],\n interactivePressed: colors.marianBlue[800],\n}\n","import { colors } from '../tokens/colors'\nimport type { Theme } from './types'\n\nexport const darkTheme: Theme = {\n background: colors.midnight[900],\n surface: colors.midnight[700],\n border: colors.midnight[500],\n onBackground: colors.marianBlue[50],\n onSurface: colors.gray[50],\n muted: colors.gray[600],\n primary: colors.marianBlue[400],\n secondary: colors.marianBlue[50],\n success: colors.mint[400],\n error: colors.ketchup[400],\n warning: colors.mustard[400],\n info: colors.marianBlue[300],\n\n surfaceDisabled: colors.midnight[600],\n successBg: colors.midnight[800],\n textSecondary: colors.gray[400],\n textTertiary: colors.gray[500],\n textInverse: colors.midnight[900],\n borderStrong: colors.marianBlue[400],\n borderSubtle: colors.midnight[600],\n interactivePressed: colors.marianBlue[300],\n} as const\n","export const ratingScaleTokens = {\n itemWidth: 60,\n circleSize: 60,\n circlePadding: 8,\n circleRadius: 30,\n emojiFontSize: 38,\n emojiLineHeight: 44,\n labelFontSize: 12,\n numberFontSize: 10,\n itemGap: 8,\n labelNumberGap: 11,\n}\n\nexport const DEFAULT_OPTIONS = [\n { emoji: '😞', label: 'Nada\\na ver' },\n { emoji: '🙁', label: 'Pouco\\na ver' },\n { emoji: '😐', label: 'Mais ou\\nmenos' },\n { emoji: '🙂', label: 'Tem\\na ver' },\n { emoji: '😊', label: 'Totalmente\\neu' },\n] as const\n"],"mappings":";;;;;AAGO,IAAM,aAAoB;AAAA,EAC/B,YAAc,OAAO,WAAW,EAAE;AAAA,EAClC,SAAc,OAAO,WAAW,GAAG;AAAA,EACnC,QAAc,OAAO,WAAW,GAAG;AAAA,EACnC,cAAc,OAAO,SAAS,GAAG;AAAA,EACjC,WAAc,OAAO,SAAS,GAAG;AAAA,EACjC,OAAc,OAAO,KAAK,GAAG;AAAA,EAC7B,SAAc,OAAO,WAAW,GAAG;AAAA,EACnC,WAAc,OAAO,SAAS,GAAG;AAAA,EACjC,SAAc,OAAO,KAAK,GAAG;AAAA,EAC7B,OAAc,OAAO,QAAQ,GAAG;AAAA,EAChC,SAAc,OAAO,QAAQ,GAAG;AAAA,EAChC,MAAc,OAAO,WAAW,GAAG;AAAA,EAEnC,iBAAoB,OAAO,KAAK,EAAE;AAAA,EAClC,WAAoB,OAAO;AAAA,EAC3B,eA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AAO,aAAM,OAAO,cAAc;AAAA,EACpC,EAAE,OAAO,aAAM,OAAO,eAAe;AAAA,EACrC,EAAE,OAAO,aAAM,OAAO,iBAAiB;AAAA,EACvC,EAAE,OAAO,aAAM,OAAO,aAAa;AAAA,EACnC,EAAE,OAAO,aAAM,OAAO,iBAAiB;AACzC;","names":[]}
@@ -0,0 +1,101 @@
1
+ // src/tokens/colors.ts
2
+ var colors = {
3
+ marianBlue: {
4
+ 50: "#FAFBFF",
5
+ 100: "#F1F4FE",
6
+ 200: "#E1E7FF",
7
+ 300: "#C3CCF7",
8
+ 400: "#94A5F2",
9
+ 500: "#697DD6",
10
+ 600: "#475CBB",
11
+ 700: "#31428B",
12
+ 800: "#25326A",
13
+ 900: "#131937"
14
+ },
15
+ midnight: {
16
+ 50: "#707070",
17
+ 100: "#5C5C5C",
18
+ 200: "#525252",
19
+ 300: "#474747",
20
+ 400: "#3D3D3D",
21
+ 500: "#333333",
22
+ 600: "#1E1E1E",
23
+ 700: "#161616",
24
+ 800: "#141414",
25
+ 900: "#0A0A0A"
26
+ },
27
+ gray: {
28
+ 50: "#B1B5BE",
29
+ 100: "#A6ABB5",
30
+ 200: "#9BA0AB",
31
+ 300: "#9095A2",
32
+ 400: "#858B99",
33
+ 500: "#7A8190",
34
+ 600: "#6F7685",
35
+ 700: "#5E6471",
36
+ 800: "#5D636F",
37
+ 900: "#545964"
38
+ },
39
+ mustard: {
40
+ 50: "#FFF2D6",
41
+ 100: "#FFECC2",
42
+ 200: "#FFE5AD",
43
+ 300: "#FFDF99",
44
+ 400: "#FFD885",
45
+ 500: "#FFD270",
46
+ 600: "#FFCB5C",
47
+ 700: "#FFC140",
48
+ 800: "#FFBE33",
49
+ 900: "#FFB81F"
50
+ },
51
+ ketchup: {
52
+ 50: "#FFD6D6",
53
+ 100: "#FFC2C2",
54
+ 200: "#FFADAD",
55
+ 300: "#FF9999",
56
+ 400: "#FF8585",
57
+ 500: "#FF7070",
58
+ 600: "#FF5C5C",
59
+ 700: "#FF4040",
60
+ 800: "#FF3333",
61
+ 900: "#FF1F1F"
62
+ },
63
+ mint: {
64
+ 50: "#A7F1B7",
65
+ 100: "#96EEA9",
66
+ 200: "#84EB9A",
67
+ 300: "#73E88C",
68
+ 400: "#61E57E",
69
+ 500: "#50E26F",
70
+ 600: "#3EE061",
71
+ 700: "#24DC4C",
72
+ 800: "#22D348",
73
+ 900: "#1FC142"
74
+ },
75
+ white: "#FFFFFF",
76
+ successBg: "#E5FBE9"
77
+ };
78
+
79
+ // src/tokens/typography.ts
80
+ var typography = {
81
+ display: { fontSize: 32, fontWeight: "700", lineHeight: 1.2, fontFamily: "Poppins" },
82
+ h1: { fontSize: 24, fontWeight: "700", lineHeight: 1.3, fontFamily: "Poppins" },
83
+ h2: { fontSize: 20, fontWeight: "600", lineHeight: 1.3, fontFamily: "Poppins" },
84
+ h3: { fontSize: 18, fontWeight: "600", lineHeight: 1.4, fontFamily: "Poppins" },
85
+ bodyLarge: { fontSize: 16, fontWeight: "400", lineHeight: 1.5, fontFamily: "Inter" },
86
+ bodyDefault: { fontSize: 14, fontWeight: "400", lineHeight: 1.5, fontFamily: "Inter" },
87
+ bodySmall: { fontSize: 12, fontWeight: "400", lineHeight: 1.5, fontFamily: "Inter" },
88
+ labelLarge: { fontSize: 16, fontWeight: "500", lineHeight: 1.5, fontFamily: "Inter" },
89
+ labelDefault: { fontSize: 14, fontWeight: "500", lineHeight: 1.5, fontFamily: "Inter" },
90
+ labelSmall: { fontSize: 12, fontWeight: "500", lineHeight: 1.5, fontFamily: "Inter" },
91
+ caption: { fontSize: 12, fontWeight: "500", lineHeight: 1.5, fontFamily: "Inter" },
92
+ overline: { fontSize: 10, fontWeight: "600", lineHeight: 1, fontFamily: "Inter" },
93
+ buttonLarge: { fontSize: 16, fontWeight: "600", lineHeight: 1.5, fontFamily: "Inter" },
94
+ buttonDefault: { fontSize: 14, fontWeight: "600", lineHeight: 1.5, fontFamily: "Inter" }
95
+ };
96
+
97
+ export {
98
+ colors,
99
+ typography
100
+ };
101
+ //# sourceMappingURL=chunk-NK4IHR7O.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/tokens/colors.ts","../src/tokens/typography.ts"],"sourcesContent":["export const colors = {\n marianBlue: {\n 50: '#FAFBFF',\n 100: '#F1F4FE',\n 200: '#E1E7FF',\n 300: '#C3CCF7',\n 400: '#94A5F2',\n 500: '#697DD6',\n 600: '#475CBB',\n 700: '#31428B',\n 800: '#25326A',\n 900: '#131937',\n },\n\n midnight: {\n 50: '#707070',\n 100: '#5C5C5C',\n 200: '#525252',\n 300: '#474747',\n 400: '#3D3D3D',\n 500: '#333333',\n 600: '#1E1E1E',\n 700: '#161616',\n 800: '#141414',\n 900: '#0A0A0A',\n },\n\n gray: {\n 50: '#B1B5BE',\n 100: '#A6ABB5',\n 200: '#9BA0AB',\n 300: '#9095A2',\n 400: '#858B99',\n 500: '#7A8190',\n 600: '#6F7685',\n 700: '#5E6471',\n 800: '#5D636F',\n 900: '#545964',\n },\n\n mustard: {\n 50: '#FFF2D6',\n 100: '#FFECC2',\n 200: '#FFE5AD',\n 300: '#FFDF99',\n 400: '#FFD885',\n 500: '#FFD270',\n 600: '#FFCB5C',\n 700: '#FFC140',\n 800: '#FFBE33',\n 900: '#FFB81F',\n },\n\n ketchup: {\n 50: '#FFD6D6',\n 100: '#FFC2C2',\n 200: '#FFADAD',\n 300: '#FF9999',\n 400: '#FF8585',\n 500: '#FF7070',\n 600: '#FF5C5C',\n 700: '#FF4040',\n 800: '#FF3333',\n 900: '#FF1F1F',\n },\n\n mint: {\n 50: '#A7F1B7',\n 100: '#96EEA9',\n 200: '#84EB9A',\n 300: '#73E88C',\n 400: '#61E57E',\n 500: '#50E26F',\n 600: '#3EE061',\n 700: '#24DC4C',\n 800: '#22D348',\n 900: '#1FC142',\n },\n\n white: '#FFFFFF',\n successBg: '#E5FBE9',\n} as const\n\nexport type Colors = typeof colors\n","export const typography = {\n display: { fontSize: 32, fontWeight: '700', lineHeight: 1.2, fontFamily: 'Poppins' },\n h1: { fontSize: 24, fontWeight: '700', lineHeight: 1.3, fontFamily: 'Poppins' },\n h2: { fontSize: 20, fontWeight: '600', lineHeight: 1.3, fontFamily: 'Poppins' },\n h3: { fontSize: 18, fontWeight: '600', lineHeight: 1.4, fontFamily: 'Poppins' },\n bodyLarge: { fontSize: 16, fontWeight: '400', lineHeight: 1.5, fontFamily: 'Inter' },\n bodyDefault: { fontSize: 14, fontWeight: '400', lineHeight: 1.5, fontFamily: 'Inter' },\n bodySmall: { fontSize: 12, fontWeight: '400', lineHeight: 1.5, fontFamily: 'Inter' },\n labelLarge: { fontSize: 16, fontWeight: '500', lineHeight: 1.5, fontFamily: 'Inter' },\n labelDefault: { fontSize: 14, fontWeight: '500', lineHeight: 1.5, fontFamily: 'Inter' },\n labelSmall: { fontSize: 12, fontWeight: '500', lineHeight: 1.5, fontFamily: 'Inter' },\n caption: { fontSize: 12, fontWeight: '500', lineHeight: 1.5, fontFamily: 'Inter' },\n overline: { fontSize: 10, fontWeight: '600', lineHeight: 1.0, fontFamily: 'Inter' },\n buttonLarge: { fontSize: 16, fontWeight: '600', lineHeight: 1.5, fontFamily: 'Inter' },\n buttonDefault: { fontSize: 14, fontWeight: '600', lineHeight: 1.5, fontFamily: 'Inter' },\n} as const\n\nexport type Typography = typeof typography\n"],"mappings":";AAAO,IAAM,SAAS;AAAA,EACpB,YAAY;AAAA,IACV,IAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,EACP;AAAA,EAEA,UAAU;AAAA,IACR,IAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IAC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;AAAA,EACvF,aAAe,EAAE,UAAU,IAAI,YAAY,OAAO,YAAY,KAAK,YAAY,QAAQ;AAAA,EACvF,WAAe,EAAE,UAAU,IAAI,YAAY,OAAO,YAAY,KAAK,YAAY,QAAQ;AAAA,EACvF,YAAe,EAAE,UAAU,IAAI,YAAY,OAAO,YAAY,KAAK,YAAY,QAAQ;AAAA,EACvF,cAAe,EAAE,UAAU,IAAI,YAAY,OAAO,YAAY,KAAK,YAAY,QAAQ;AAAA,EACvF,YAAe,EAAE,UAAU,IAAI,YAAY,OAAO,YAAY,KAAK,YAAY,QAAQ;AAAA,EACvF,SAAe,EAAE,UAAU,IAAI,YAAY,OAAO,YAAY,KAAK,YAAY,QAAQ;AAAA,EACvF,UAAe,EAAE,UAAU,IAAI,YAAY,OAAO,YAAY,GAAK,YAAY,QAAQ;AAAA,EACvF,aAAe,EAAE,UAAU,IAAI,YAAY,OAAO,YAAY,KAAK,YAAY,QAAQ;AAAA,EACvF,eAAe,EAAE,UAAU,IAAI,YAAY,OAAO,YAAY,KAAK,YAAY,QAAQ;AACzF;","names":[]}
@@ -0,0 +1,28 @@
1
+ interface Theme {
2
+ background: string;
3
+ surface: string;
4
+ border: string;
5
+ onBackground: string;
6
+ onSurface: string;
7
+ muted: string;
8
+ primary: string;
9
+ secondary: string;
10
+ success: string;
11
+ error: string;
12
+ warning: string;
13
+ info: string;
14
+ surfaceDisabled: string;
15
+ successBg: string;
16
+ textSecondary: string;
17
+ textTertiary: string;
18
+ textInverse: string;
19
+ borderStrong: string;
20
+ borderSubtle: string;
21
+ interactivePressed: string;
22
+ }
23
+
24
+ declare const lightTheme: Theme;
25
+
26
+ declare const darkTheme: Theme;
27
+
28
+ export { type Theme as T, darkTheme as d, lightTheme as l };
@@ -0,0 +1,28 @@
1
+ interface Theme {
2
+ background: string;
3
+ surface: string;
4
+ border: string;
5
+ onBackground: string;
6
+ onSurface: string;
7
+ muted: string;
8
+ primary: string;
9
+ secondary: string;
10
+ success: string;
11
+ error: string;
12
+ warning: string;
13
+ info: string;
14
+ surfaceDisabled: string;
15
+ successBg: string;
16
+ textSecondary: string;
17
+ textTertiary: string;
18
+ textInverse: string;
19
+ borderStrong: string;
20
+ borderSubtle: string;
21
+ interactivePressed: string;
22
+ }
23
+
24
+ declare const lightTheme: Theme;
25
+
26
+ declare const darkTheme: Theme;
27
+
28
+ export { type Theme as T, darkTheme as d, lightTheme as l };
@@ -1,2 +1,118 @@
1
- export { Colors, colors } from './tokens/index.mjs';
2
- export { Theme, darkTheme, lightTheme } from './index.web.mjs';
1
+ export { Colors, Typography, colors, typography } from './tokens/index.mjs';
2
+ import { T as Theme } from './darkTheme-gaad4-zD.mjs';
3
+ export { d as darkTheme, l as lightTheme } from './darkTheme-gaad4-zD.mjs';
4
+ import * as react_jsx_runtime from 'react/jsx-runtime';
5
+ import { PressableProps, StyleProp, ViewStyle } from 'react-native';
6
+
7
+ type DSThemeCtx = {
8
+ theme: Theme;
9
+ colorScheme: 'light' | 'dark';
10
+ };
11
+ declare function DSThemeProvider({ colorScheme, children, }: {
12
+ colorScheme?: 'light' | 'dark';
13
+ children: React.ReactNode;
14
+ }): react_jsx_runtime.JSX.Element;
15
+ declare function useTheme(): DSThemeCtx;
16
+
17
+ type ButtonVariant = 'primary' | 'secondary' | 'ghost';
18
+ type ButtonSize = 'sm' | 'md' | 'lg';
19
+ type ButtonProps = {
20
+ variant?: ButtonVariant;
21
+ size?: ButtonSize;
22
+ disabled?: boolean;
23
+ children: React.ReactNode;
24
+ onPress?: PressableProps['onPress'];
25
+ };
26
+ declare function Button({ variant, size, disabled, children, onPress }: ButtonProps): react_jsx_runtime.JSX.Element;
27
+
28
+ type ChipProps = {
29
+ children: React.ReactNode;
30
+ checked?: boolean;
31
+ onPress?: () => void;
32
+ style?: StyleProp<ViewStyle>;
33
+ };
34
+ declare function Chip({ children, checked, onPress, style }: ChipProps): react_jsx_runtime.JSX.Element;
35
+
36
+ type AlertVariant = 'success' | 'info';
37
+ type AlertProps = {
38
+ variant?: AlertVariant;
39
+ title: string;
40
+ description?: string;
41
+ };
42
+ declare function Alert({ variant, title, description }: AlertProps): react_jsx_runtime.JSX.Element;
43
+
44
+ type ProgressBarProps = {
45
+ value: number;
46
+ };
47
+ declare function ProgressBar({ value }: ProgressBarProps): react_jsx_runtime.JSX.Element;
48
+
49
+ type InputState = 'default' | 'filled' | 'error' | 'disabled';
50
+ type InputProps = {
51
+ value?: string;
52
+ placeholder?: string;
53
+ state?: InputState;
54
+ leadingIcon?: React.ReactNode;
55
+ onChangeText?: (text: string) => void;
56
+ onFocus?: () => void;
57
+ onBlur?: () => void;
58
+ style?: StyleProp<ViewStyle>;
59
+ };
60
+ declare function Input({ value, placeholder, state, leadingIcon, onChangeText, onFocus, onBlur, style }: InputProps): react_jsx_runtime.JSX.Element;
61
+
62
+ type CheckboxProps = {
63
+ checked?: boolean;
64
+ onChange?: (checked: boolean) => void;
65
+ disabled?: boolean;
66
+ };
67
+ declare function Checkbox({ checked, onChange, disabled }: CheckboxProps): react_jsx_runtime.JSX.Element;
68
+
69
+ type RadioItemProps = {
70
+ label: string;
71
+ description?: string;
72
+ selected?: boolean;
73
+ icon?: React.ReactNode;
74
+ onPress?: () => void;
75
+ style?: StyleProp<ViewStyle>;
76
+ };
77
+ declare function RadioItem({ label, description, selected, icon, onPress, style }: RadioItemProps): react_jsx_runtime.JSX.Element;
78
+
79
+ type RadioGroupProps = {
80
+ children: React.ReactNode;
81
+ label?: string;
82
+ style?: StyleProp<ViewStyle>;
83
+ };
84
+ declare function RadioGroup({ children, label, style }: RadioGroupProps): react_jsx_runtime.JSX.Element;
85
+
86
+ type ActionItemProps = {
87
+ label: string;
88
+ description?: string;
89
+ selected?: boolean;
90
+ icon?: React.ReactNode;
91
+ onPress?: () => void;
92
+ style?: StyleProp<ViewStyle>;
93
+ };
94
+ declare function ActionItem({ label, description, selected, icon, onPress, style }: ActionItemProps): react_jsx_runtime.JSX.Element;
95
+
96
+ type Step = {
97
+ label: string;
98
+ };
99
+ type StepperProps = {
100
+ steps: Step[];
101
+ currentStep: number;
102
+ style?: StyleProp<ViewStyle>;
103
+ };
104
+ declare function Stepper({ steps, currentStep, style }: StepperProps): react_jsx_runtime.JSX.Element;
105
+
106
+ type RatingScaleOption = {
107
+ emoji: string;
108
+ label: string;
109
+ };
110
+ type RatingScaleProps = {
111
+ value?: number | null;
112
+ onChange?: (value: number) => void;
113
+ options?: ReadonlyArray<RatingScaleOption>;
114
+ style?: StyleProp<ViewStyle>;
115
+ };
116
+ declare function RatingScale({ value, onChange, options, style }: RatingScaleProps): react_jsx_runtime.JSX.Element;
117
+
118
+ export { ActionItem, Alert, Button, Checkbox, Chip, DSThemeProvider, Input, ProgressBar, RadioGroup, RadioItem, RatingScale, Stepper, Theme, useTheme };