alouette 7.0.0-beta.2 → 7.0.0-beta.21

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 (180) hide show
  1. package/README.md +7 -1
  2. package/dist/createAlouetteTamagui-browser.es.js +105 -95
  3. package/dist/createAlouetteTamagui-browser.es.js.map +1 -1
  4. package/dist/createAlouetteTamagui-node18.mjs +105 -95
  5. package/dist/createAlouetteTamagui-node18.mjs.map +1 -1
  6. package/dist/createAlouetteTamagui-react-native.cjs.js +107 -94
  7. package/dist/createAlouetteTamagui-react-native.cjs.js.map +1 -1
  8. package/dist/definitions/components/actions/Button.d.ts +20 -0
  9. package/dist/definitions/components/actions/Button.d.ts.map +1 -0
  10. package/dist/definitions/components/actions/Button.stories.d.ts +10 -0
  11. package/dist/definitions/components/actions/Button.stories.d.ts.map +1 -0
  12. package/dist/definitions/components/actions/IconButton.d.ts +18 -0
  13. package/dist/definitions/components/actions/IconButton.d.ts.map +1 -0
  14. package/dist/definitions/components/actions/IconButton.stories.d.ts +10 -0
  15. package/dist/definitions/components/actions/IconButton.stories.d.ts.map +1 -0
  16. package/dist/definitions/components/containers/Box.d.ts +13 -0
  17. package/dist/definitions/components/containers/Box.d.ts.map +1 -0
  18. package/dist/definitions/components/containers/Box.stories.d.ts +18 -0
  19. package/dist/definitions/components/containers/Box.stories.d.ts.map +1 -0
  20. package/dist/definitions/components/containers/PressableBox.d.ts +12 -0
  21. package/dist/definitions/components/containers/PressableBox.d.ts.map +1 -0
  22. package/dist/definitions/components/containers/PressableBox.stories.d.ts +18 -0
  23. package/dist/definitions/components/containers/PressableBox.stories.d.ts.map +1 -0
  24. package/dist/definitions/components/containers/variants.d.ts +61 -0
  25. package/dist/definitions/components/containers/variants.d.ts.map +1 -0
  26. package/dist/definitions/components/feedback/FeedbackIcon.d.ts +8 -0
  27. package/dist/definitions/components/feedback/FeedbackIcon.d.ts.map +1 -0
  28. package/dist/definitions/components/feedback/Message.d.ts +25 -0
  29. package/dist/definitions/components/feedback/Message.d.ts.map +1 -0
  30. package/dist/definitions/components/feedback/Message.stories.d.ts +10 -0
  31. package/dist/definitions/components/feedback/Message.stories.d.ts.map +1 -0
  32. package/dist/definitions/components/forms/InputText.d.ts +23 -0
  33. package/dist/definitions/components/forms/InputText.d.ts.map +1 -0
  34. package/dist/definitions/components/forms/InputText.stories.d.ts +16 -0
  35. package/dist/definitions/components/forms/InputText.stories.d.ts.map +1 -0
  36. package/dist/definitions/components/layout/Separator.d.ts +6 -0
  37. package/dist/definitions/components/layout/Separator.d.ts.map +1 -0
  38. package/dist/definitions/components/layout/Separator.stories.d.ts +10 -0
  39. package/dist/definitions/components/layout/Separator.stories.d.ts.map +1 -0
  40. package/dist/definitions/components/layout/list.d.ts +7 -0
  41. package/dist/definitions/components/layout/list.d.ts.map +1 -0
  42. package/dist/definitions/components/layout/list.stories.d.ts +7 -0
  43. package/dist/definitions/components/layout/list.stories.d.ts.map +1 -0
  44. package/dist/definitions/components/primitives/Icon.d.ts +14 -0
  45. package/dist/definitions/components/primitives/Icon.d.ts.map +1 -0
  46. package/dist/definitions/components/primitives/Icon.stories.d.ts +9 -0
  47. package/dist/definitions/components/primitives/Icon.stories.d.ts.map +1 -0
  48. package/dist/definitions/components/primitives/ScrollView.d.ts +14 -0
  49. package/dist/definitions/components/primitives/ScrollView.d.ts.map +1 -0
  50. package/dist/definitions/components/primitives/View.d.ts +5 -0
  51. package/dist/definitions/components/primitives/View.d.ts.map +1 -0
  52. package/dist/definitions/components/primitives/View.stories.d.ts +10 -0
  53. package/dist/definitions/components/primitives/View.stories.d.ts.map +1 -0
  54. package/dist/definitions/components/primitives/createVariants.d.ts +54 -0
  55. package/dist/definitions/components/primitives/createVariants.d.ts.map +1 -0
  56. package/dist/definitions/components/primitives/stacks.d.ts +17 -0
  57. package/dist/definitions/components/primitives/stacks.d.ts.map +1 -0
  58. package/dist/definitions/components/primitives/stacks.stories.d.ts +10 -0
  59. package/dist/definitions/components/primitives/stacks.stories.d.ts.map +1 -0
  60. package/dist/definitions/components/story-components/Story.d.ts +21 -0
  61. package/dist/definitions/components/story-components/Story.d.ts.map +1 -0
  62. package/dist/definitions/components/story-components/StoryContainer.d.ts +7 -0
  63. package/dist/definitions/components/story-components/StoryContainer.d.ts.map +1 -0
  64. package/dist/definitions/components/story-components/StoryDecorator.d.ts +3 -0
  65. package/dist/definitions/components/story-components/StoryDecorator.d.ts.map +1 -0
  66. package/dist/definitions/components/story-components/StoryGrid.d.ts +19 -0
  67. package/dist/definitions/components/story-components/StoryGrid.d.ts.map +1 -0
  68. package/dist/definitions/components/story-components/StoryTitle.d.ts +10 -0
  69. package/dist/definitions/components/story-components/StoryTitle.d.ts.map +1 -0
  70. package/dist/definitions/components/story-components/WithTamaguiConfig.d.ts +7 -0
  71. package/dist/definitions/components/story-components/WithTamaguiConfig.d.ts.map +1 -0
  72. package/dist/definitions/components/typography/Typography.d.ts +38 -0
  73. package/dist/definitions/components/typography/Typography.d.ts.map +1 -0
  74. package/dist/definitions/components/typography/Typography.stories.d.ts +15 -0
  75. package/dist/definitions/components/typography/Typography.stories.d.ts.map +1 -0
  76. package/dist/definitions/components/windowSize/SwitchBreakpoints.d.ts +20 -0
  77. package/dist/definitions/components/windowSize/SwitchBreakpoints.d.ts.map +1 -0
  78. package/dist/definitions/components/windowSize/SwitchBreakpoints.stories.d.ts +10 -0
  79. package/dist/definitions/components/windowSize/SwitchBreakpoints.stories.d.ts.map +1 -0
  80. package/dist/definitions/components/windowSize/useCurrentBreakpointName.d.ts +5 -0
  81. package/dist/definitions/components/windowSize/useCurrentBreakpointName.d.ts.map +1 -0
  82. package/dist/definitions/config/Breakpoints.d.ts +32 -0
  83. package/dist/definitions/config/Breakpoints.d.ts.map +1 -0
  84. package/dist/definitions/config/animations.d.ts +15 -0
  85. package/dist/definitions/config/animations.d.ts.map +1 -0
  86. package/dist/definitions/config/animations.web.d.ts +5 -0
  87. package/dist/definitions/config/animations.web.d.ts.map +1 -0
  88. package/dist/definitions/config/colorScales.d.ts +13 -0
  89. package/dist/definitions/config/colorScales.d.ts.map +1 -0
  90. package/dist/definitions/config/createAlouetteFonts.d.ts +90 -0
  91. package/dist/definitions/config/createAlouetteFonts.d.ts.map +1 -0
  92. package/dist/definitions/config/createAlouetteTokens.d.ts +557 -0
  93. package/dist/definitions/config/createAlouetteTokens.d.ts.map +1 -0
  94. package/dist/definitions/config/media.d.ts +15 -0
  95. package/dist/definitions/config/media.d.ts.map +1 -0
  96. package/dist/definitions/config/themes.d.ts +247 -0
  97. package/dist/definitions/config/themes.d.ts.map +1 -0
  98. package/dist/definitions/config/themes.stories.d.ts +8 -0
  99. package/dist/definitions/config/themes.stories.d.ts.map +1 -0
  100. package/dist/definitions/config/tokens.stories.d.ts +8 -0
  101. package/dist/definitions/config/tokens.stories.d.ts.map +1 -0
  102. package/dist/definitions/config/utils/groupTokens.d.ts +7 -0
  103. package/dist/definitions/config/utils/groupTokens.d.ts.map +1 -0
  104. package/dist/definitions/core/AlouetteDecorator.d.ts +3 -0
  105. package/dist/definitions/core/AlouetteDecorator.d.ts.map +1 -0
  106. package/dist/definitions/core/AlouetteProvider.d.ts +8 -0
  107. package/dist/definitions/core/AlouetteProvider.d.ts.map +1 -0
  108. package/dist/definitions/createAlouetteTamagui.d.ts +136 -0
  109. package/dist/definitions/createAlouetteTamagui.d.ts.map +1 -0
  110. package/dist/definitions/index.d.ts +42 -0
  111. package/dist/definitions/index.d.ts.map +1 -0
  112. package/dist/index-browser.es.js +389 -60
  113. package/dist/index-browser.es.js.map +1 -1
  114. package/dist/index-node18.mjs +389 -60
  115. package/dist/index-node18.mjs.map +1 -1
  116. package/dist/index-react-native.cjs.js +403 -56
  117. package/dist/index-react-native.cjs.js.map +1 -1
  118. package/package.json +31 -24
  119. package/src/components/actions/Button.stories.tsx +4 -5
  120. package/src/components/actions/Button.tsx +3 -4
  121. package/src/components/actions/IconButton.stories.tsx +2 -3
  122. package/src/components/actions/IconButton.tsx +4 -4
  123. package/src/components/containers/{Frame.stories.tsx → Box.stories.tsx} +21 -21
  124. package/src/components/containers/{Frame.tsx → Box.tsx} +3 -3
  125. package/src/components/containers/{Pressable.stories.tsx → PressableBox.stories.tsx} +8 -8
  126. package/src/components/containers/PressableBox.tsx +9 -0
  127. package/src/components/containers/variants.ts +15 -12
  128. package/src/components/feedback/FeedbackIcon.tsx +2 -2
  129. package/src/components/feedback/Message.stories.tsx +2 -2
  130. package/src/components/feedback/Message.tsx +4 -4
  131. package/src/components/forms/InputText.stories.tsx +2 -2
  132. package/src/components/forms/InputText.tsx +5 -0
  133. package/src/components/layout/Separator.stories.tsx +39 -0
  134. package/src/components/layout/Separator.tsx +31 -0
  135. package/src/components/layout/list.stories.tsx +24 -0
  136. package/src/components/layout/list.tsx +30 -0
  137. package/src/components/primitives/Icon.stories.tsx +1 -1
  138. package/src/components/primitives/Icon.tsx +6 -12
  139. package/src/components/primitives/ScrollView.ts +2 -1
  140. package/src/components/primitives/createVariants.ts +7 -5
  141. package/src/components/primitives/stacks.stories.tsx +14 -14
  142. package/src/components/primitives/stacks.ts +2 -6
  143. package/src/components/story-components/Story.tsx +1 -1
  144. package/src/components/story-components/StoryGrid.tsx +0 -1
  145. package/src/components/story-components/StoryTitle.tsx +3 -0
  146. package/src/components/typography/Typography.tsx +2 -0
  147. package/src/components/windowSize/SwitchBreakpoints.stories.tsx +1 -1
  148. package/src/config/animations.ts +4 -0
  149. package/src/config/animations.web.ts +1 -0
  150. package/src/config/colorScales.ts +4 -4
  151. package/src/config/createAlouetteFonts.ts +6 -6
  152. package/src/config/createAlouetteTokens.ts +23 -18
  153. package/src/config/themes.stories.tsx +5 -9
  154. package/src/config/themes.ts +139 -68
  155. package/src/config/tokens.stories.tsx +7 -7
  156. package/src/core/AlouetteDecorator.tsx +1 -0
  157. package/src/createAlouetteTamagui.ts +32 -19
  158. package/src/index.ts +50 -3
  159. package/.editorconfig +0 -13
  160. package/.eslintrc.json +0 -5
  161. package/.yo-rc.json +0 -11
  162. package/dist/phosphor-icons-browser.es.js +0 -2497
  163. package/dist/phosphor-icons-browser.es.js.map +0 -1
  164. package/dist/phosphor-icons-node18.mjs +0 -2497
  165. package/dist/phosphor-icons-node18.mjs.map +0 -1
  166. package/dist/phosphor-icons-react-native.cjs.js +0 -4998
  167. package/dist/phosphor-icons-react-native.cjs.js.map +0 -1
  168. package/phosphor-icons.js +0 -1
  169. package/rollup.config.mjs +0 -8
  170. package/scripts/generate-phosphor-icons-legacy-withcopy.mjs +0 -64
  171. package/scripts/generate-phosphor-icons.mjs +0 -51
  172. package/src/.eslintrc.json +0 -32
  173. package/src/components/containers/Pressable.tsx +0 -9
  174. package/src/components/windowSize/__snapshots__/SwitchBreakpoints.stories.tsx.snap +0 -1032
  175. package/src/components/windowSize/__snapshots_web__/SwitchBreakpoints.stories.tsx.snap +0 -402
  176. package/src/phosphor-icons.cjs +0 -1254
  177. package/src/phosphor-icons.d.ts +0 -2501
  178. package/src/phosphor-icons.ts +0 -2499
  179. package/src/typings/bundler.d.ts +0 -10
  180. package/tsconfig.json +0 -20
package/README.md CHANGED
@@ -7,6 +7,10 @@
7
7
  </p>
8
8
 
9
9
  <p align="center">
10
+ <a href="https://npmjs.org/package/alouette"><img src="https://img.shields.io/npm/v/alouette.svg?style=flat-square"></a>
11
+ <a href="https://npmjs.org/package/alouette"><img src="https://img.shields.io/npm/dw/alouette.svg?style=flat-square"></a>
12
+ <a href="https://npmjs.org/package/alouette"><img src="https://img.shields.io/node/v/alouette.svg?style=flat-square"></a>
13
+ <a href="https://npmjs.org/package/alouette"><img src="https://img.shields.io/npm/types/alouette.svg?style=flat-square"></a>
10
14
  </p>
11
15
 
12
16
  ## Install
@@ -25,5 +29,7 @@ import {
25
29
  defaultColorScales,
26
30
  } from "alouette/createAlouetteTamagui";
27
31
 
28
- export default createAlouetteTamagui({ colorScales: defaultColorScales });
32
+ const tokens = createAlouetteTokens(defaultColorScales);
33
+ const config = createAlouetteTamagui(tokens, createAlouetteThemes(tokens));
34
+ export default config;
29
35
  ```
@@ -40,9 +40,9 @@ const createAlouetteFonts = ({
40
40
  black: "900"
41
41
  },
42
42
  face: {
43
- 400: { normal: headingFontFamily + "Regular" },
44
- 700: { normal: headingFontFamily + "Bold" },
45
- 900: { normal: headingFontFamily + "Black" }
43
+ 400: { normal: `${headingFontFamily}Regular` },
44
+ 700: { normal: `${headingFontFamily}Bold` },
45
+ 900: { normal: `${headingFontFamily}Black` }
46
46
  },
47
47
  size: headingFontSizes,
48
48
  lineHeight: {
@@ -61,9 +61,9 @@ const createAlouetteFonts = ({
61
61
  black: "900"
62
62
  },
63
63
  face: {
64
- 400: { normal: bodyFontFamily + "Regular" },
65
- 700: { normal: bodyFontFamily + "Bold" },
66
- 900: { normal: bodyFontFamily + "Black" }
64
+ 400: { normal: `${bodyFontFamily}Regular` },
65
+ 700: { normal: `${bodyFontFamily}Bold` },
66
+ 900: { normal: `${bodyFontFamily}Black` }
67
67
  },
68
68
  size: bodyFontSizes,
69
69
  lineHeight: {
@@ -106,88 +106,6 @@ const media = createMedia({
106
106
  wide: { minWidth: Breakpoints.WIDE }
107
107
  });
108
108
 
109
- const createTheme = (theme) => {
110
- return theme;
111
- };
112
- const createColorTheme = (tokens, colorScaleName, textColor = tokens.color.black, contrastTextColor = tokens.color.white) => {
113
- const getColor = (scaleNumber) => tokens.color[colorScaleName + `.${scaleNumber}`];
114
- return {
115
- mainColor: getColor(6),
116
- mainTextColor: getColor(9),
117
- contrastTextColor,
118
- borderColor: getColor(8),
119
- "interactive.contained.backgroundColor": getColor(5),
120
- "interactive.borderColor": getColor(8),
121
- "interactive.contained.backgroundColor:hover": getColor(4),
122
- "interactive.outlined.backgroundColor:hover": getColor(1),
123
- "interactive.borderColor:hover": getColor(7),
124
- "interactive.contained.backgroundColor:focus": getColor(4),
125
- "interactive.outlined.backgroundColor:focus": getColor(1),
126
- "interactive.borderColor:focus": getColor(7),
127
- "interactive.contained.backgroundColor:press": getColor(2),
128
- "interactive.outlined.backgroundColor:press": getColor(3),
129
- "interactive.borderColor:press": getColor(7),
130
- "interactive.contained.backgroundColor:disabled": tokens.color.disabled,
131
- "interactive.borderColor:disabled": tokens.color.disabled,
132
- "interactive.textColor:disabled": tokens.color.contrastDisabled,
133
- "interactive.forms.textColor": textColor,
134
- "interactive.forms.backgroundColor": void 0,
135
- "interactive.forms.backgroundColor:hover": void 0,
136
- "interactive.forms.backgroundColor:focus": getColor(1),
137
- "interactive.forms.backgroundColor:press": getColor(3),
138
- "interactive.forms.borderColor": getColor(10),
139
- "interactive.forms.borderColor:hover": getColor(7),
140
- "interactive.forms.borderColor:focus": getColor(7),
141
- "interactive.forms.borderColor:press": getColor(7),
142
- "interactive.forms.borderColor:disabled": tokens.color.disabled
143
- };
144
- };
145
- const createAlouetteThemes = (tokens) => ({
146
- light: createTheme({
147
- backgroundColor: tokens.color.white,
148
- textColor: tokens.color.black
149
- }),
150
- light_info: createColorTheme(tokens, "info"),
151
- light_success: createColorTheme(tokens, "success"),
152
- light_warning: createColorTheme(tokens, "warning"),
153
- light_danger: createColorTheme(tokens, "danger"),
154
- light_primary: createColorTheme(tokens, "primary"),
155
- dark: createTheme({
156
- backgroundColor: tokens.color.black,
157
- textColor: tokens.color.white
158
- }),
159
- dark_info: createColorTheme(
160
- tokens,
161
- "info",
162
- tokens.color.black,
163
- tokens.color.white
164
- ),
165
- dark_success: createColorTheme(
166
- tokens,
167
- "success",
168
- tokens.color.black,
169
- tokens.color.white
170
- ),
171
- dark_warning: createColorTheme(
172
- tokens,
173
- "warning",
174
- tokens.color.black,
175
- tokens.color.white
176
- ),
177
- dark_danger: createColorTheme(
178
- tokens,
179
- "danger",
180
- tokens.color.black,
181
- tokens.color.white
182
- ),
183
- dark_primary: createColorTheme(
184
- tokens,
185
- "primary",
186
- tokens.color.black,
187
- tokens.color.white
188
- )
189
- });
190
-
191
109
  const createAlouetteSizes = (spacing, negative) => {
192
110
  const MAX_SIZE = 64;
193
111
  const sizes = {};
@@ -207,7 +125,10 @@ const transformColorScalesToTokens = (colorScales) => {
207
125
  };
208
126
  const createAlouetteTokens = (colorScales, { spacing = 4 } = {}) => {
209
127
  const sizes = createAlouetteSizes(spacing, false);
210
- const negativeSizes = createAlouetteSizes(-spacing, true);
128
+ const negativeSizes = createAlouetteSizes(
129
+ -spacing,
130
+ true
131
+ );
211
132
  return createTokens({
212
133
  color: {
213
134
  black: "#000000",
@@ -234,6 +155,96 @@ const createAlouetteTokens = (colorScales, { spacing = 4 } = {}) => {
234
155
  });
235
156
  };
236
157
 
158
+ const createColorTheme = (tokens, colorScaleName, backgroundColor, textColor, contrastTextColor) => {
159
+ const alouetteTokens = tokens;
160
+ if (!backgroundColor) backgroundColor = alouetteTokens.color.white;
161
+ if (!textColor) textColor = alouetteTokens.color.black;
162
+ if (!contrastTextColor) contrastTextColor = alouetteTokens.color.white;
163
+ const getColor = (scaleNumber) => tokens.color[`${colorScaleName}.${scaleNumber}`];
164
+ return {
165
+ backgroundColor,
166
+ textColor,
167
+ mainColor: getColor(6),
168
+ mainTextColor: getColor(9),
169
+ contrastTextColor,
170
+ borderColor: getColor(8),
171
+ "interactive.contained.backgroundColor": getColor(5),
172
+ "interactive.borderColor": getColor(8),
173
+ "interactive.contained.backgroundColor:hover": getColor(4),
174
+ "interactive.outlined.backgroundColor:hover": getColor(1),
175
+ "interactive.borderColor:hover": getColor(7),
176
+ "interactive.contained.backgroundColor:focus": getColor(4),
177
+ "interactive.outlined.backgroundColor:focus": getColor(1),
178
+ "interactive.borderColor:focus": getColor(7),
179
+ "interactive.contained.backgroundColor:press": getColor(2),
180
+ "interactive.outlined.backgroundColor:press": getColor(3),
181
+ "interactive.borderColor:press": getColor(7),
182
+ "interactive.contained.backgroundColor:disabled": alouetteTokens.color.disabled,
183
+ "interactive.borderColor:disabled": alouetteTokens.color.disabled,
184
+ "interactive.textColor:disabled": alouetteTokens.color.contrastDisabled,
185
+ "interactive.forms.textColor": textColor,
186
+ // "interactive.forms.backgroundColor": undefined,
187
+ // "interactive.forms.backgroundColor:hover": undefined,
188
+ "interactive.forms.backgroundColor:focus": getColor(1),
189
+ "interactive.forms.backgroundColor:press": getColor(3),
190
+ "interactive.forms.borderColor": getColor(10),
191
+ "interactive.forms.borderColor:hover": getColor(7),
192
+ "interactive.forms.borderColor:focus": getColor(7),
193
+ "interactive.forms.borderColor:press": getColor(7),
194
+ "interactive.forms.borderColor:disabled": alouetteTokens.color.disabled
195
+ };
196
+ };
197
+ const createAlouetteThemes = (tokens) => {
198
+ const alouetteTokens = tokens;
199
+ return {
200
+ light: createColorTheme(
201
+ alouetteTokens,
202
+ "grayscale",
203
+ alouetteTokens.color.white,
204
+ alouetteTokens.color.black
205
+ ),
206
+ light_info: createColorTheme(alouetteTokens, "info"),
207
+ light_success: createColorTheme(alouetteTokens, "success"),
208
+ light_warning: createColorTheme(alouetteTokens, "warning"),
209
+ light_danger: createColorTheme(alouetteTokens, "danger"),
210
+ light_primary: createColorTheme(alouetteTokens, "primary")
211
+ // dark: createRootTheme({
212
+ // backgroundColor: alouetteTokens.color.black,
213
+ // textColor: alouetteTokens.color.white,
214
+ // }),
215
+ // dark_info: createColorTheme(
216
+ // alouetteTokens,
217
+ // "info",
218
+ // alouetteTokens.color.black,
219
+ // alouetteTokens.color.white,
220
+ // ),
221
+ // dark_success: createColorTheme(
222
+ // alouetteTokens,
223
+ // "success",
224
+ // alouetteTokens.color.black,
225
+ // alouetteTokens.color.white,
226
+ // ),
227
+ // dark_warning: createColorTheme(
228
+ // alouetteTokens,
229
+ // "warning",
230
+ // alouetteTokens.color.black,
231
+ // alouetteTokens.color.white,
232
+ // ),
233
+ // dark_danger: createColorTheme(
234
+ // alouetteTokens,
235
+ // "danger",
236
+ // alouetteTokens.color.black,
237
+ // alouetteTokens.color.white,
238
+ // ),
239
+ // dark_primary: createColorTheme(
240
+ // alouetteTokens,
241
+ // "primary",
242
+ // alouetteTokens.color.black,
243
+ // alouetteTokens.color.white,
244
+ // ),
245
+ };
246
+ };
247
+
237
248
  const createColorScale = (colorScale) => colorScale;
238
249
  const defaultColorScales = {
239
250
  grayscale: createColorScale({
@@ -310,21 +321,20 @@ const defaultColorScales = {
310
321
  })
311
322
  };
312
323
 
313
- const createAlouetteTamagui = (options) => {
314
- const tokens = createAlouetteTokens(options.colorScales, options.tokens);
324
+ const createAlouetteTamagui = (tokens, themes, options = {}) => {
315
325
  return createTamagui({
316
326
  fonts: createAlouetteFonts(options.fonts),
317
327
  tokens,
318
- themes: createAlouetteThemes(tokens),
328
+ themes,
319
329
  media,
320
330
  animations,
321
331
  settings: {
322
- allowedStyleValues: "strict",
323
- autocompleteSpecificTokens: true
332
+ allowedStyleValues: "somewhat-strict-web",
333
+ autocompleteSpecificTokens: "except-special"
324
334
  },
325
335
  components: ["alouette"]
326
336
  });
327
337
  };
328
338
 
329
- export { createAlouetteTamagui, createColorScale, defaultColorScales };
339
+ export { createAlouetteTamagui, createAlouetteThemes, createAlouetteTokens, createColorScale, createColorTheme, defaultColorScales };
330
340
  //# sourceMappingURL=createAlouetteTamagui-browser.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"createAlouetteTamagui-browser.es.js","sources":["../src/config/animations.ts","../src/config/createAlouetteFonts.ts","../src/config/Breakpoints.ts","../src/config/media.ts","../src/config/themes.ts","../src/config/createAlouetteTokens.ts","../src/config/colorScales.ts","../src/createAlouetteTamagui.ts"],"sourcesContent":["import { createAnimations } from \"@tamagui/animations-react-native\";\n\nexport const animations = createAnimations({\n fast: {\n type: \"timing\",\n duration: 100,\n damping: 20,\n stiffness: 250,\n },\n formElement: {\n type: \"timing\",\n duration: 600,\n damping: 20,\n stiffness: 250,\n },\n});\n","import { createFont } from \"@tamagui/core\";\n\nconst defaultHeadingFontSizes = {\n xl: 48,\n lg: 40,\n md: 32,\n sm: 24,\n xs: 18,\n};\nconst defaultBodyFontSizes = { xl: 24, lg: 18, md: 16, sm: 14, xs: 12 };\n\nconst roundWith1Precision = (value: number): number =>\n Math.round(value * 10) / 10;\n\nexport interface AlouetteFontsOptions {\n headingFontFamily?: string;\n headingFontSizes?: typeof defaultHeadingFontSizes;\n bodyFontFamily?: string;\n bodyFontSizes?: typeof defaultBodyFontSizes;\n}\n\nexport const createAlouetteFonts = ({\n headingFontFamily = \"Inter\",\n headingFontSizes = defaultHeadingFontSizes,\n bodyFontFamily = \"Inter\",\n bodyFontSizes = defaultBodyFontSizes,\n}: AlouetteFontsOptions = {}) => ({\n heading: createFont({\n family: headingFontFamily,\n weight: {\n regular: \"400\",\n bold: \"700\",\n black: \"900\",\n },\n face: {\n 400: { normal: headingFontFamily + \"Regular\" },\n 700: { normal: headingFontFamily + \"Bold\" },\n 900: { normal: headingFontFamily + \"Black\" },\n },\n size: headingFontSizes,\n lineHeight: {\n xl: roundWith1Precision(1.1 * headingFontSizes.xl),\n lg: roundWith1Precision(1.1 * headingFontSizes.lg),\n md: roundWith1Precision(1.2 * headingFontSizes.md),\n sm: roundWith1Precision(1.3 * headingFontSizes.sm),\n xs: roundWith1Precision(1.3 * headingFontSizes.xs),\n },\n }),\n body: createFont({\n family: bodyFontFamily,\n weight: {\n regular: \"400\",\n bold: \"700\",\n black: \"900\",\n },\n face: {\n 400: { normal: bodyFontFamily + \"Regular\" },\n 700: { normal: bodyFontFamily + \"Bold\" },\n 900: { normal: bodyFontFamily + \"Black\" },\n },\n size: bodyFontSizes,\n lineHeight: {\n xl: roundWith1Precision(1.4 * bodyFontSizes.xl),\n lg: roundWith1Precision(1.4 * bodyFontSizes.lg),\n md: roundWith1Precision(1.4 * bodyFontSizes.md),\n sm: roundWith1Precision(1.4 * bodyFontSizes.sm),\n xs: roundWith1Precision(1.4 * bodyFontSizes.xs),\n },\n }),\n});\n","export const Breakpoints = {\n /**\n * min-width: 0\n */\n BASE: 0,\n /**\n * min-width: 480px\n */\n SMALL: 480,\n /**\n * min-width: 768px\n */\n MEDIUM: 768,\n /**\n * min-width: 1024px\n */\n LARGE: 1024,\n /**\n * min-width: 1280px\n */\n WIDE: 1280,\n} as const;\n\nexport type Breakpoint = (typeof Breakpoints)[keyof typeof Breakpoints];\nexport type BreakpointNames = 'base' | 'large' | 'medium' | 'small' | 'wide';\n\nexport enum BreakpointNameEnum {\n BASE = 'base',\n SMALL = 'small',\n MEDIUM = 'medium',\n LARGE = 'large',\n WIDE = 'wide',\n}\n","import { createMedia } from '@tamagui/react-native-media-driver';\nimport { Breakpoints } from './Breakpoints';\n\nexport const media = createMedia({\n small: { minWidth: Breakpoints.SMALL },\n medium: { minWidth: Breakpoints.MEDIUM },\n large: { minWidth: Breakpoints.LARGE },\n wide: { minWidth: Breakpoints.WIDE },\n} as const);\n","import type { Variable } from \"@tamagui/core\";\nimport { createAlouetteTokens } from \"./createAlouetteTokens\";\nimport { AlouetteColorScaleNames } from \"./colorScales\";\n\ninterface MinimalTheme {\n backgroundColor: Variable;\n textColor: Variable;\n}\n\nconst createTheme = <T extends MinimalTheme>(theme: T): T => {\n return theme;\n};\n\nconst createColorTheme = (\n tokens: ReturnType<typeof createAlouetteTokens>,\n colorScaleName: AlouetteColorScaleNames,\n textColor = tokens.color.black,\n contrastTextColor = tokens.color.white,\n) => {\n const getColor = (scaleNumber: number) =>\n tokens.color[\n (colorScaleName + `.${scaleNumber}`) as keyof typeof tokens.color\n ];\n return {\n mainColor: getColor(6),\n mainTextColor: getColor(9),\n contrastTextColor,\n borderColor: getColor(8),\n\n \"interactive.contained.backgroundColor\": getColor(5),\n \"interactive.borderColor\": getColor(8),\n\n \"interactive.contained.backgroundColor:hover\": getColor(4),\n \"interactive.outlined.backgroundColor:hover\": getColor(1),\n \"interactive.borderColor:hover\": getColor(7),\n\n \"interactive.contained.backgroundColor:focus\": getColor(4),\n \"interactive.outlined.backgroundColor:focus\": getColor(1),\n \"interactive.borderColor:focus\": getColor(7),\n\n \"interactive.contained.backgroundColor:press\": getColor(2),\n \"interactive.outlined.backgroundColor:press\": getColor(3),\n \"interactive.borderColor:press\": getColor(7),\n\n \"interactive.contained.backgroundColor:disabled\": tokens.color.disabled,\n \"interactive.borderColor:disabled\": tokens.color.disabled,\n \"interactive.textColor:disabled\": tokens.color.contrastDisabled,\n\n \"interactive.forms.textColor\": textColor,\n \"interactive.forms.backgroundColor\": undefined,\n \"interactive.forms.backgroundColor:hover\": undefined,\n \"interactive.forms.backgroundColor:focus\": getColor(1),\n \"interactive.forms.backgroundColor:press\": getColor(3),\n \"interactive.forms.borderColor\": getColor(10),\n \"interactive.forms.borderColor:hover\": getColor(7),\n \"interactive.forms.borderColor:focus\": getColor(7),\n \"interactive.forms.borderColor:press\": getColor(7),\n \"interactive.forms.borderColor:disabled\": tokens.color.disabled,\n };\n};\n\nexport const createAlouetteThemes = (\n tokens: ReturnType<typeof createAlouetteTokens>,\n) =>\n ({\n light: createTheme({\n backgroundColor: tokens.color.white,\n textColor: tokens.color.black,\n }),\n light_info: createColorTheme(tokens, \"info\"),\n light_success: createColorTheme(tokens, \"success\"),\n light_warning: createColorTheme(tokens, \"warning\"),\n light_danger: createColorTheme(tokens, \"danger\"),\n light_primary: createColorTheme(tokens, \"primary\"),\n\n dark: createTheme({\n backgroundColor: tokens.color.black,\n textColor: tokens.color.white,\n }),\n\n dark_info: createColorTheme(\n tokens,\n \"info\",\n tokens.color.black,\n tokens.color.white,\n ),\n dark_success: createColorTheme(\n tokens,\n \"success\",\n tokens.color.black,\n tokens.color.white,\n ),\n dark_warning: createColorTheme(\n tokens,\n \"warning\",\n tokens.color.black,\n tokens.color.white,\n ),\n dark_danger: createColorTheme(\n tokens,\n \"danger\",\n tokens.color.black,\n tokens.color.white,\n ),\n dark_primary: createColorTheme(\n tokens,\n \"primary\",\n tokens.color.black,\n tokens.color.white,\n ),\n }) as const;\n","import { createTokens } from \"@tamagui/core\";\nimport type { IntRange } from \"type-fest\";\nimport type {\n AlouetteColorScaleNames,\n AlouetteColorScaleNumber,\n AlouetteColorScales,\n} from \"./colorScales\";\n\ntype AlouetteSize = IntRange<0, 64>;\ntype NegativeAlouetteSize = `-${AlouetteSize}`;\ntype AlouetteSizeRecord = Record<AlouetteSize, number>;\ntype NegativeAlouetteSizeRecord = Record<NegativeAlouetteSize, number>;\n\nconst createAlouetteSizes = <N extends boolean>(\n spacing: number,\n negative: N,\n): N extends true ? AlouetteSizeRecord : NegativeAlouetteSizeRecord => {\n const MAX_SIZE = 64;\n const sizes = {} as Partial<\n N extends true ? AlouetteSizeRecord : NegativeAlouetteSizeRecord\n >;\n for (let size = 0; size <= MAX_SIZE; size++) {\n (sizes as any)[negative ? `-${size}` : `${size}`] = size * spacing;\n }\n return sizes as N extends true\n ? AlouetteSizeRecord\n : NegativeAlouetteSizeRecord;\n};\n\ntype ColorScaleTokens = {\n [K in AlouetteColorScaleNames as `${K}.${AlouetteColorScaleNumber}`]: string; //(typeof colorScales)[K][AlouetteColorScaleNumber];\n};\n\nconst transformColorScalesToTokens = (\n colorScales: AlouetteColorScales,\n): ColorScaleTokens => {\n return Object.fromEntries(\n Object.entries(colorScales).flatMap(([colorName, colorScale]) => {\n return Object.entries(colorScale).map(([scaleNumber, colorValue]) => {\n return [`${colorName}.${scaleNumber}`, colorValue];\n });\n }),\n ) as ColorScaleTokens;\n};\n\nexport interface AlouetteTokensOptions {\n spacing?: number;\n}\n\nexport const createAlouetteTokens = (\n colorScales: AlouetteColorScales,\n { spacing = 4 }: AlouetteTokensOptions = {},\n) => {\n const sizes = createAlouetteSizes(spacing, false);\n const negativeSizes = createAlouetteSizes(-spacing, true);\n\n return createTokens({\n color: {\n black: \"#000000\",\n white: \"#ffffff\",\n disabled: colorScales.grayscale[3],\n contrastDisabled: colorScales.grayscale[7],\n ...transformColorScalesToTokens(colorScales),\n },\n radius: {\n ...sizes,\n xs: spacing * 2,\n sm: spacing * 4,\n md: spacing * 8,\n },\n space: {\n ...sizes,\n ...negativeSizes,\n xs: spacing * 2,\n sm: spacing * 4,\n md: spacing * 8,\n },\n size: { ...sizes },\n zIndex: {},\n } as const);\n};\n","import type { IntRange } from \"type-fest\";\n\n// scale inspired by https://www.radix-ui.com/colors/docs/palette-composition/understanding-the-scale\n// 1: interactive outlined background hover/focus color\n// 2: interactive contained background press color\n// 3: interactive outlined background press color\n// 4: interactive contained background hover/focus color\n// 5: interactive contained background color\n// 6: main color\n// 7: border hover/focus color\n// 8: border color\n// 9: text color\n// 10: form border color (default)\n\nexport type AlouetteColorScaleNumber = IntRange<1, 10>;\n\nexport type AlouetteColorScale = { [K in AlouetteColorScaleNumber]: string };\n\nexport const createColorScale = <const T extends AlouetteColorScale>(\n colorScale: T,\n): T => colorScale;\n\nexport type AlouetteColorScaleNames =\n | \"grayscale\"\n | \"success\"\n | \"info\"\n | \"warning\"\n | \"danger\"\n | \"primary\";\n\nexport type ColorScaleTokens = {\n [K in AlouetteColorScaleNames as `${K}.${AlouetteColorScaleNumber}`]: string; //(typeof colorScales)[K][AlouetteColorScaleNumber];\n};\n\nexport type AlouetteColorScales = Record<\n AlouetteColorScaleNames,\n AlouetteColorScale\n>;\n\n// Tool: https://m2.material.io/inline-tools/color/\n\nexport const defaultColorScales: AlouetteColorScales = {\n grayscale: createColorScale({\n 1: \"#faf9f8\",\n 2: \"#f4f3ef\",\n 3: \"#ebe9e5\",\n 4: \"#dedad2\",\n 5: \"#d1cdc5\",\n 6: \"#bab8ae\",\n 7: \"#aeaba3\",\n 8: \"#9c9a92\",\n 9: \"#8e8c83\",\n 10: \"#74726a\",\n }),\n success: createColorScale({\n 1: \"#f0f9f3\",\n 2: \"#d4f0d4\",\n 3: \"#a8e6a8\",\n 4: \"#7edc7e\",\n 5: \"#54d254\",\n 6: \"#2ac82a\",\n 7: \"#00be00\",\n 8: \"#00b400\",\n 9: \"#00aa00\",\n 10: \"#009200\",\n }),\n info: createColorScale({\n 1: \"#f0f9ff\",\n 2: \"#d4f0ff\",\n 3: \"#a8e6ff\",\n 4: \"#7edcff\",\n 5: \"#54d2ff\",\n 6: \"#2ac8ff\",\n 7: \"#00beff\",\n 8: \"#00b4ff\",\n 9: \"#00aaff\",\n 10: \"#0092ff\",\n }),\n warning: createColorScale({\n 1: \"#fff9f0\",\n 2: \"#fff0d4\",\n 3: \"#ffe6a8\",\n 4: \"#ffdc7e\",\n 5: \"#ffd254\",\n 6: \"#ffc82a\",\n 7: \"#ffbe00\",\n 8: \"#ffb400\",\n 9: \"#ffaa00\",\n 10: \"#ff9200\",\n }),\n danger: createColorScale({\n 1: \"#fff0f0\",\n 2: \"#ffd4d4\",\n 3: \"#ffaaaa\",\n 4: \"#ff7e7e\",\n 5: \"#ff5454\",\n 6: \"#ff2a2a\",\n 7: \"#ff0000\",\n 8: \"#f40000\",\n 9: \"#ea0000\",\n 10: \"#d20000\",\n }),\n primary: createColorScale({\n 1: \"#e1f4f6\",\n 2: \"#b4e2e9\",\n 3: \"#86cfdc\",\n 4: \"#60bcd0\",\n 5: \"#46aeca\",\n 6: \"#31a1c4\",\n 7: \"#2994b7\",\n 8: \"#1e82a6\",\n 9: \"#1c7193\",\n 10: \"#125272\",\n }),\n} as const;\n","import { createTamagui } from \"@tamagui/core\";\nimport { animations } from \"./config/animations\";\nimport {\n createAlouetteFonts,\n AlouetteFontsOptions,\n} from \"./config/createAlouetteFonts\";\nimport { media } from \"./config/media\";\nimport { createAlouetteThemes } from \"./config/themes\";\nimport {\n createAlouetteTokens,\n AlouetteTokensOptions,\n} from \"./config/createAlouetteTokens\";\nimport { AlouetteColorScales } from \"./config/colorScales\";\n\ninterface AlouetteTamaguiOptions {\n colorScales: AlouetteColorScales;\n fonts?: AlouetteFontsOptions;\n tokens?: AlouetteTokensOptions;\n}\n\nexport { defaultColorScales, createColorScale } from \"./config/colorScales\";\n\nexport const createAlouetteTamagui = (options: AlouetteTamaguiOptions) => {\n const tokens = createAlouetteTokens(options.colorScales, options.tokens);\n return createTamagui({\n fonts: createAlouetteFonts(options.fonts),\n tokens,\n themes: createAlouetteThemes(tokens),\n media,\n animations,\n settings: {\n allowedStyleValues: \"strict\",\n autocompleteSpecificTokens: true,\n },\n components: [\"alouette\"],\n } as const);\n};\n"],"names":[],"mappings":";;;;AAEO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AAG,EAAA,SAAA;AAAA,IACH,CAAG,EAAA,SAAA;AAAA,IACH,CAAG,EAAA,SAAA;AAAA,IACH,CAAG,EAAA,SAAA;AAAA,IACH,CAAG,EAAA,SAAA;AAAA,IACH,CAAG,EAAA,SAAA;AAAA,IACH,EAAI,EAAA,SAAA;AAAA,GACL,CAAA;AAAA,EACD,SAAS,gBAAiB,CAAA;AAAA,IACxB,CAAG,EAAA,SAAA;AAAA,IACH,CAAG,EAAA,SAAA;AAAA,IACH,CAAG,EAAA,SAAA;AAAA,IACH,CAAG,EAAA,SAAA;AAAA,IACH,CAAG,EAAA,SAAA;AAAA,IACH,CAAG,EAAA,SAAA;AAAA,IACH,CAAG,EAAA,SAAA;AAAA,IACH,CAAG,EAAA,SAAA;AAAA,IACH,CAAG,EAAA,SAAA;AAAA,IACH,EAAI,EAAA,SAAA;AAAA,GACL,CAAA;AACH;;AC5Fa,MAAA,qBAAA,GAAwB,CAAC,OAAoC,KAAA;AACxE,EAAA,MAAM,MAAS,GAAA,oBAAA,CAAqB,OAAQ,CAAA,WAAA,EAAa,QAAQ,MAAM,CAAA,CAAA;AACvE,EAAA,OAAO,aAAc,CAAA;AAAA,IACnB,KAAA,EAAO,mBAAoB,CAAA,OAAA,CAAQ,KAAK,CAAA;AAAA,IACxC,MAAA;AAAA,IACA,MAAA,EAAQ,qBAAqB,MAAM,CAAA;AAAA,IACnC,KAAA;AAAA,IACA,UAAA;AAAA,IACA,QAAU,EAAA;AAAA,MACR,kBAAoB,EAAA,QAAA;AAAA,MACpB,0BAA4B,EAAA,IAAA;AAAA,KAC9B;AAAA,IACA,UAAA,EAAY,CAAC,UAAU,CAAA;AAAA,GACf,CAAA,CAAA;AACZ;;;;"}
1
+ {"version":3,"file":"createAlouetteTamagui-browser.es.js","sources":["../src/config/animations.ts","../src/config/createAlouetteFonts.ts","../src/config/Breakpoints.ts","../src/config/media.ts","../src/config/createAlouetteTokens.ts","../src/config/themes.ts","../src/config/colorScales.ts","../src/createAlouetteTamagui.ts"],"sourcesContent":["import { createAnimations } from \"@tamagui/animations-react-native\";\n\nexport const animations = createAnimations({\n fast: {\n type: \"timing\",\n duration: 100,\n damping: 20,\n stiffness: 250,\n },\n formElement: {\n type: \"timing\",\n duration: 600,\n damping: 20,\n stiffness: 250,\n },\n});\n","import { createFont } from \"@tamagui/core\";\n\nconst defaultHeadingFontSizes = {\n xl: 48,\n lg: 40,\n md: 32,\n sm: 24,\n xs: 18,\n};\nconst defaultBodyFontSizes = { xl: 24, lg: 18, md: 16, sm: 14, xs: 12 };\n\nconst roundWith1Precision = (value: number): number =>\n Math.round(value * 10) / 10;\n\nexport interface AlouetteFontsOptions {\n headingFontFamily?: string;\n headingFontSizes?: typeof defaultHeadingFontSizes;\n bodyFontFamily?: string;\n bodyFontSizes?: typeof defaultBodyFontSizes;\n}\n\nexport const createAlouetteFonts = ({\n headingFontFamily = \"Inter\",\n headingFontSizes = defaultHeadingFontSizes,\n bodyFontFamily = \"Inter\",\n bodyFontSizes = defaultBodyFontSizes,\n}: AlouetteFontsOptions = {}) => ({\n heading: createFont({\n family: headingFontFamily,\n weight: {\n regular: \"400\",\n bold: \"700\",\n black: \"900\",\n },\n face: {\n 400: { normal: `${headingFontFamily}Regular` },\n 700: { normal: `${headingFontFamily}Bold` },\n 900: { normal: `${headingFontFamily}Black` },\n },\n size: headingFontSizes,\n lineHeight: {\n xl: roundWith1Precision(1.1 * headingFontSizes.xl),\n lg: roundWith1Precision(1.1 * headingFontSizes.lg),\n md: roundWith1Precision(1.2 * headingFontSizes.md),\n sm: roundWith1Precision(1.3 * headingFontSizes.sm),\n xs: roundWith1Precision(1.3 * headingFontSizes.xs),\n },\n }),\n body: createFont({\n family: bodyFontFamily,\n weight: {\n regular: \"400\",\n bold: \"700\",\n black: \"900\",\n },\n face: {\n 400: { normal: `${bodyFontFamily}Regular` },\n 700: { normal: `${bodyFontFamily}Bold` },\n 900: { normal: `${bodyFontFamily}Black` },\n },\n size: bodyFontSizes,\n lineHeight: {\n xl: roundWith1Precision(1.4 * bodyFontSizes.xl),\n lg: roundWith1Precision(1.4 * bodyFontSizes.lg),\n md: roundWith1Precision(1.4 * bodyFontSizes.md),\n sm: roundWith1Precision(1.4 * bodyFontSizes.sm),\n xs: roundWith1Precision(1.4 * bodyFontSizes.xs),\n },\n }),\n});\n","export const Breakpoints = {\n /**\n * min-width: 0\n */\n BASE: 0,\n /**\n * min-width: 480px\n */\n SMALL: 480,\n /**\n * min-width: 768px\n */\n MEDIUM: 768,\n /**\n * min-width: 1024px\n */\n LARGE: 1024,\n /**\n * min-width: 1280px\n */\n WIDE: 1280,\n} as const;\n\nexport type Breakpoint = (typeof Breakpoints)[keyof typeof Breakpoints];\nexport type BreakpointNames = \"base\" | \"large\" | \"medium\" | \"small\" | \"wide\";\n\nexport enum BreakpointNameEnum {\n BASE = \"base\",\n SMALL = \"small\",\n MEDIUM = \"medium\",\n LARGE = \"large\",\n WIDE = \"wide\",\n}\n","import { createMedia } from \"@tamagui/react-native-media-driver\";\nimport { Breakpoints } from \"./Breakpoints\";\n\nexport const media = createMedia({\n small: { minWidth: Breakpoints.SMALL },\n medium: { minWidth: Breakpoints.MEDIUM },\n large: { minWidth: Breakpoints.LARGE },\n wide: { minWidth: Breakpoints.WIDE },\n} as const);\n","import { createTokens } from \"@tamagui/core\";\nimport type { IntRange } from \"type-fest\";\nimport type {\n AlouetteColorScaleNumber,\n AlouetteColorScales,\n} from \"./colorScales\";\n\ntype AlouetteSize = IntRange<0, 64>;\ntype NegativeAlouetteSize = `-${AlouetteSize}`;\ntype AlouetteSizeRecord = Record<AlouetteSize, number>;\ntype NegativeAlouetteSizeRecord = Record<NegativeAlouetteSize, number>;\n\nconst createAlouetteSizes = <const N extends boolean>(\n spacing: number,\n negative: N,\n): N extends true ? NegativeAlouetteSizeRecord : AlouetteSizeRecord => {\n const MAX_SIZE = 64;\n const sizes: Partial<\n N extends true ? NegativeAlouetteSizeRecord : AlouetteSizeRecord\n > = {};\n for (let size = 0; size <= MAX_SIZE; size++) {\n (sizes as any)[negative ? `-${size}` : `${size}`] = size * spacing;\n }\n return sizes as N extends true\n ? NegativeAlouetteSizeRecord\n : AlouetteSizeRecord;\n};\n\ntype ColorScaleTokens<ColorScales extends AlouetteColorScales> = {\n [K in string &\n keyof ColorScales as `${K}.${AlouetteColorScaleNumber}`]: string; //(typeof colorScales)[K][AlouetteColorScaleNumber];\n};\n\nconst transformColorScalesToTokens = <ColorScales extends AlouetteColorScales>(\n colorScales: ColorScales,\n): ColorScaleTokens<ColorScales> => {\n return Object.fromEntries(\n Object.entries(colorScales).flatMap(([colorName, colorScale]) => {\n return Object.entries(colorScale).map(([scaleNumber, colorValue]) => {\n return [`${colorName}.${scaleNumber}`, colorValue];\n });\n }),\n ) as ColorScaleTokens<ColorScales>;\n};\n\nexport interface AlouetteTokensOptions {\n spacing?: number;\n}\n\nexport const createAlouetteTokens = <\n const ColorScales extends AlouetteColorScales,\n>(\n colorScales: ColorScales,\n { spacing = 4 }: AlouetteTokensOptions = {},\n) => {\n const sizes: AlouetteSizeRecord = createAlouetteSizes(spacing, false);\n const negativeSizes: NegativeAlouetteSizeRecord = createAlouetteSizes(\n -spacing,\n true,\n );\n\n return createTokens({\n color: {\n black: \"#000000\",\n white: \"#ffffff\",\n disabled: colorScales.grayscale[3],\n contrastDisabled: colorScales.grayscale[7],\n ...transformColorScalesToTokens(colorScales),\n },\n radius: {\n ...sizes,\n xs: spacing * 2,\n sm: spacing * 4,\n md: spacing * 8,\n },\n space: {\n ...sizes,\n ...negativeSizes,\n xs: spacing * 2,\n sm: spacing * 4,\n md: spacing * 8,\n },\n size: { ...sizes },\n zIndex: {},\n } as const);\n};\n","/* eslint-disable camelcase */\nimport type { Variable } from \"@tamagui/core\";\nimport type { AlouetteColorScales } from \"./colorScales\";\nimport type { createAlouetteTokens } from \"./createAlouetteTokens\";\n\n// export interface MinimalRootTheme {\n// backgroundColor: Variable<string>;\n// textColor: Variable<string>;\n// }\n\n// export interface RootTheme {\n// backgroundColor: Variable<string>;\n// textColor: Variable<string>;\n// }\n\nexport interface ColorTheme {\n backgroundColor: Variable<string>;\n textColor: Variable<string>;\n mainColor: Variable<string>;\n mainTextColor: Variable<string>;\n contrastTextColor: Variable<string>;\n borderColor: Variable<string>;\n\n \"interactive.contained.backgroundColor\": Variable<string>;\n \"interactive.borderColor\": Variable<string>;\n\n \"interactive.contained.backgroundColor:hover\": Variable<string>;\n \"interactive.outlined.backgroundColor:hover\": Variable<string>;\n \"interactive.borderColor:hover\": Variable<string>;\n\n \"interactive.contained.backgroundColor:focus\": Variable<string>;\n \"interactive.outlined.backgroundColor:focus\": Variable<string>;\n \"interactive.borderColor:focus\": Variable<string>;\n\n \"interactive.contained.backgroundColor:press\": Variable<string>;\n \"interactive.outlined.backgroundColor:press\": Variable<string>;\n \"interactive.borderColor:press\": Variable<string>;\n\n \"interactive.contained.backgroundColor:disabled\": Variable<string>;\n \"interactive.borderColor:disabled\": Variable<string>;\n \"interactive.textColor:disabled\": Variable<string>;\n\n \"interactive.forms.textColor\": Variable<string>;\n // \"interactive.forms.backgroundColor\": Variable<string>,\n // \"interactive.forms.backgroundColor:hover\": Variable<string>,\n \"interactive.forms.backgroundColor:focus\": Variable<string>;\n \"interactive.forms.backgroundColor:press\": Variable<string>;\n \"interactive.forms.borderColor\": Variable<string>;\n \"interactive.forms.borderColor:hover\": Variable<string>;\n \"interactive.forms.borderColor:focus\": Variable<string>;\n \"interactive.forms.borderColor:press\": Variable<string>;\n \"interactive.forms.borderColor:disabled\": Variable<string>;\n}\n\n// export interface FullTheme extends ColorTheme, RootTheme {}\nexport type FullTheme = ColorTheme;\n\n// export const createRootTheme = <T extends MinimalRootTheme>(\n// theme: T,\n// ): FullTheme => {\n// return theme satisfies RootTheme as unknown as FullTheme;\n// };\n\nexport const createColorTheme = <const ColorScales extends AlouetteColorScales>(\n tokens: ReturnType<typeof createAlouetteTokens<ColorScales>>,\n colorScaleName: string & keyof ColorScales,\n backgroundColor?: Variable<string>,\n textColor?: Variable<string>,\n contrastTextColor?: Variable<string>,\n // eslint-disable-next-line @typescript-eslint/max-params\n) => {\n const alouetteTokens: ReturnType<\n typeof createAlouetteTokens<AlouetteColorScales>\n > = tokens;\n if (!backgroundColor) backgroundColor = alouetteTokens.color.white;\n if (!textColor) textColor = alouetteTokens.color.black;\n if (!contrastTextColor) contrastTextColor = alouetteTokens.color.white;\n\n const getColor = (scaleNumber: number) =>\n tokens.color[\n `${colorScaleName}.${scaleNumber}` as keyof typeof tokens.color\n ];\n\n return {\n backgroundColor,\n textColor,\n mainColor: getColor(6),\n mainTextColor: getColor(9),\n contrastTextColor,\n borderColor: getColor(8),\n\n \"interactive.contained.backgroundColor\": getColor(5),\n \"interactive.borderColor\": getColor(8),\n\n \"interactive.contained.backgroundColor:hover\": getColor(4),\n \"interactive.outlined.backgroundColor:hover\": getColor(1),\n \"interactive.borderColor:hover\": getColor(7),\n\n \"interactive.contained.backgroundColor:focus\": getColor(4),\n \"interactive.outlined.backgroundColor:focus\": getColor(1),\n \"interactive.borderColor:focus\": getColor(7),\n\n \"interactive.contained.backgroundColor:press\": getColor(2),\n \"interactive.outlined.backgroundColor:press\": getColor(3),\n \"interactive.borderColor:press\": getColor(7),\n\n \"interactive.contained.backgroundColor:disabled\":\n alouetteTokens.color.disabled,\n \"interactive.borderColor:disabled\": alouetteTokens.color.disabled,\n \"interactive.textColor:disabled\": alouetteTokens.color.contrastDisabled,\n\n \"interactive.forms.textColor\": textColor,\n // \"interactive.forms.backgroundColor\": undefined,\n // \"interactive.forms.backgroundColor:hover\": undefined,\n \"interactive.forms.backgroundColor:focus\": getColor(1),\n \"interactive.forms.backgroundColor:press\": getColor(3),\n \"interactive.forms.borderColor\": getColor(10),\n \"interactive.forms.borderColor:hover\": getColor(7),\n \"interactive.forms.borderColor:focus\": getColor(7),\n \"interactive.forms.borderColor:press\": getColor(7),\n \"interactive.forms.borderColor:disabled\": alouetteTokens.color.disabled,\n } satisfies FullTheme;\n};\n\nexport const createAlouetteThemes = <\n const ColorScales extends AlouetteColorScales,\n>(\n tokens: ReturnType<typeof createAlouetteTokens<ColorScales>>,\n) => {\n const alouetteTokens: ReturnType<\n typeof createAlouetteTokens<AlouetteColorScales>\n > = tokens;\n return {\n light: createColorTheme(\n alouetteTokens,\n \"grayscale\",\n alouetteTokens.color.white,\n alouetteTokens.color.black,\n ),\n light_info: createColorTheme(alouetteTokens, \"info\"),\n light_success: createColorTheme(alouetteTokens, \"success\"),\n light_warning: createColorTheme(alouetteTokens, \"warning\"),\n light_danger: createColorTheme(alouetteTokens, \"danger\"),\n light_primary: createColorTheme(alouetteTokens, \"primary\"),\n\n // dark: createRootTheme({\n // backgroundColor: alouetteTokens.color.black,\n // textColor: alouetteTokens.color.white,\n // }),\n\n // dark_info: createColorTheme(\n // alouetteTokens,\n // \"info\",\n // alouetteTokens.color.black,\n // alouetteTokens.color.white,\n // ),\n // dark_success: createColorTheme(\n // alouetteTokens,\n // \"success\",\n // alouetteTokens.color.black,\n // alouetteTokens.color.white,\n // ),\n // dark_warning: createColorTheme(\n // alouetteTokens,\n // \"warning\",\n // alouetteTokens.color.black,\n // alouetteTokens.color.white,\n // ),\n // dark_danger: createColorTheme(\n // alouetteTokens,\n // \"danger\",\n // alouetteTokens.color.black,\n // alouetteTokens.color.white,\n // ),\n // dark_primary: createColorTheme(\n // alouetteTokens,\n // \"primary\",\n // alouetteTokens.color.black,\n // alouetteTokens.color.white,\n // ),\n } as const;\n};\n","import type { IntRange } from \"type-fest\";\n\n// scale inspired by https://www.radix-ui.com/colors/docs/palette-composition/understanding-the-scale\n// 1: interactive outlined background hover/focus color\n// 2: interactive contained background press color\n// 3: interactive outlined background press color\n// 4: interactive contained background hover/focus color\n// 5: interactive contained background color\n// 6: main color\n// 7: border hover/focus color\n// 8: border color\n// 9: text color\n// 10: form border color (default)\n\nexport type AlouetteColorScaleNumber = IntRange<1, 10>;\n\nexport type AlouetteColorScale = { [K in AlouetteColorScaleNumber]: string };\n\nexport const createColorScale = <const T extends AlouetteColorScale>(\n colorScale: T,\n): T => colorScale;\n\nexport type AlouetteColorScaleNames =\n | \"danger\"\n | \"grayscale\"\n | \"info\"\n | \"primary\"\n | \"success\"\n | \"warning\";\n\nexport type ColorScaleTokens = {\n [K in AlouetteColorScaleNames as `${K}.${AlouetteColorScaleNumber}`]: string; //(typeof colorScales)[K][AlouetteColorScaleNumber];\n};\n\nexport type AlouetteColorScales = Record<\n AlouetteColorScaleNames,\n AlouetteColorScale\n>;\n\n// Tool: https://m2.material.io/inline-tools/color/\n\nexport const defaultColorScales: AlouetteColorScales = {\n grayscale: createColorScale({\n 1: \"#faf9f8\",\n 2: \"#f4f3ef\",\n 3: \"#ebe9e5\",\n 4: \"#dedad2\",\n 5: \"#d1cdc5\",\n 6: \"#bab8ae\",\n 7: \"#aeaba3\",\n 8: \"#9c9a92\",\n 9: \"#8e8c83\",\n 10: \"#74726a\",\n }),\n success: createColorScale({\n 1: \"#f0f9f3\",\n 2: \"#d4f0d4\",\n 3: \"#a8e6a8\",\n 4: \"#7edc7e\",\n 5: \"#54d254\",\n 6: \"#2ac82a\",\n 7: \"#00be00\",\n 8: \"#00b400\",\n 9: \"#00aa00\",\n 10: \"#009200\",\n }),\n info: createColorScale({\n 1: \"#f0f9ff\",\n 2: \"#d4f0ff\",\n 3: \"#a8e6ff\",\n 4: \"#7edcff\",\n 5: \"#54d2ff\",\n 6: \"#2ac8ff\",\n 7: \"#00beff\",\n 8: \"#00b4ff\",\n 9: \"#00aaff\",\n 10: \"#0092ff\",\n }),\n warning: createColorScale({\n 1: \"#fff9f0\",\n 2: \"#fff0d4\",\n 3: \"#ffe6a8\",\n 4: \"#ffdc7e\",\n 5: \"#ffd254\",\n 6: \"#ffc82a\",\n 7: \"#ffbe00\",\n 8: \"#ffb400\",\n 9: \"#ffaa00\",\n 10: \"#ff9200\",\n }),\n danger: createColorScale({\n 1: \"#fff0f0\",\n 2: \"#ffd4d4\",\n 3: \"#ffaaaa\",\n 4: \"#ff7e7e\",\n 5: \"#ff5454\",\n 6: \"#ff2a2a\",\n 7: \"#ff0000\",\n 8: \"#f40000\",\n 9: \"#ea0000\",\n 10: \"#d20000\",\n }),\n primary: createColorScale({\n 1: \"#e1f4f6\",\n 2: \"#b4e2e9\",\n 3: \"#86cfdc\",\n 4: \"#60bcd0\",\n 5: \"#46aeca\",\n 6: \"#31a1c4\",\n 7: \"#2994b7\",\n 8: \"#1e82a6\",\n 9: \"#1c7193\",\n 10: \"#125272\",\n }),\n} as const;\n","import { createTamagui } from \"@tamagui/core\";\nimport { animations } from \"./config/animations\";\nimport type { AlouetteColorScales } from \"./config/colorScales\";\nimport type { AlouetteFontsOptions } from \"./config/createAlouetteFonts\";\nimport { createAlouetteFonts } from \"./config/createAlouetteFonts\";\nimport type { createAlouetteTokens } from \"./config/createAlouetteTokens\";\nimport { media } from \"./config/media\";\nimport type { createAlouetteThemes } from \"./config/themes\";\n\nexport { createAlouetteTokens } from \"./config/createAlouetteTokens\";\n\nexport interface AlouetteTamaguiOptions {\n fonts?: AlouetteFontsOptions;\n}\n\nexport {\n createColorTheme,\n createAlouetteThemes,\n type FullTheme,\n} from \"./config/themes\";\n\nexport {\n defaultColorScales,\n createColorScale,\n type AlouetteColorScales,\n type AlouetteColorScale,\n} from \"./config/colorScales\";\n\nexport const createAlouetteTamagui = <\n const ColorScales extends AlouetteColorScales,\n const Tokens extends ReturnType<typeof createAlouetteTokens<ColorScales>>,\n const Themes extends ReturnType<typeof createAlouetteThemes<ColorScales>>,\n>(\n tokens: Tokens,\n themes: Themes,\n options: AlouetteTamaguiOptions = {},\n) => {\n return createTamagui({\n fonts: createAlouetteFonts(options.fonts),\n tokens,\n themes,\n media,\n animations,\n settings: {\n allowedStyleValues: \"somewhat-strict-web\",\n autocompleteSpecificTokens: \"except-special\",\n },\n components: [\"alouette\"],\n } as const);\n};\n"],"names":[],"mappings":";;;;AAEO,MAAM,aAAa,gBAAiB,CAAA;AAAA,EACzC,IAAM,EAAA;AAAA,I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CAAG,EAAA,SAAA;AAAA,IACH,CAAG,EAAA,SAAA;AAAA,IACH,EAAI,EAAA,SAAA;AAAA,GACL,CAAA;AACH;;ACtFO,MAAM,wBAAwB,CAKnC,MAAA,EACA,MACA,EAAA,OAAA,GAAkC,EAC/B,KAAA;AACH,EAAA,OAAO,aAAc,CAAA;AAAA,IACnB,KAAA,EAAO,mBAAoB,CAAA,OAAA,CAAQ,KAAK,CAAA;AAAA,IACxC,MAAA;AAAA,IACA,MAAA;AAAA,IACA,KAAA;AAAA,IACA,UAAA;AAAA,IACA,QAAU,EAAA;AAAA,MACR,kBAAoB,EAAA,qBAAA;AAAA,MACpB,0BAA4B,EAAA,gBAAA;AAAA,KAC9B;AAAA,IACA,UAAA,EAAY,CAAC,UAAU,CAAA;AAAA,GACf,CAAA,CAAA;AACZ;;;;"}
@@ -40,9 +40,9 @@ const createAlouetteFonts = ({
40
40
  black: "900"
41
41
  },
42
42
  face: {
43
- 400: { normal: headingFontFamily + "Regular" },
44
- 700: { normal: headingFontFamily + "Bold" },
45
- 900: { normal: headingFontFamily + "Black" }
43
+ 400: { normal: `${headingFontFamily}Regular` },
44
+ 700: { normal: `${headingFontFamily}Bold` },
45
+ 900: { normal: `${headingFontFamily}Black` }
46
46
  },
47
47
  size: headingFontSizes,
48
48
  lineHeight: {
@@ -61,9 +61,9 @@ const createAlouetteFonts = ({
61
61
  black: "900"
62
62
  },
63
63
  face: {
64
- 400: { normal: bodyFontFamily + "Regular" },
65
- 700: { normal: bodyFontFamily + "Bold" },
66
- 900: { normal: bodyFontFamily + "Black" }
64
+ 400: { normal: `${bodyFontFamily}Regular` },
65
+ 700: { normal: `${bodyFontFamily}Bold` },
66
+ 900: { normal: `${bodyFontFamily}Black` }
67
67
  },
68
68
  size: bodyFontSizes,
69
69
  lineHeight: {
@@ -106,88 +106,6 @@ const media = createMedia({
106
106
  wide: { minWidth: Breakpoints.WIDE }
107
107
  });
108
108
 
109
- const createTheme = (theme) => {
110
- return theme;
111
- };
112
- const createColorTheme = (tokens, colorScaleName, textColor = tokens.color.black, contrastTextColor = tokens.color.white) => {
113
- const getColor = (scaleNumber) => tokens.color[colorScaleName + `.${scaleNumber}`];
114
- return {
115
- mainColor: getColor(6),
116
- mainTextColor: getColor(9),
117
- contrastTextColor,
118
- borderColor: getColor(8),
119
- "interactive.contained.backgroundColor": getColor(5),
120
- "interactive.borderColor": getColor(8),
121
- "interactive.contained.backgroundColor:hover": getColor(4),
122
- "interactive.outlined.backgroundColor:hover": getColor(1),
123
- "interactive.borderColor:hover": getColor(7),
124
- "interactive.contained.backgroundColor:focus": getColor(4),
125
- "interactive.outlined.backgroundColor:focus": getColor(1),
126
- "interactive.borderColor:focus": getColor(7),
127
- "interactive.contained.backgroundColor:press": getColor(2),
128
- "interactive.outlined.backgroundColor:press": getColor(3),
129
- "interactive.borderColor:press": getColor(7),
130
- "interactive.contained.backgroundColor:disabled": tokens.color.disabled,
131
- "interactive.borderColor:disabled": tokens.color.disabled,
132
- "interactive.textColor:disabled": tokens.color.contrastDisabled,
133
- "interactive.forms.textColor": textColor,
134
- "interactive.forms.backgroundColor": void 0,
135
- "interactive.forms.backgroundColor:hover": void 0,
136
- "interactive.forms.backgroundColor:focus": getColor(1),
137
- "interactive.forms.backgroundColor:press": getColor(3),
138
- "interactive.forms.borderColor": getColor(10),
139
- "interactive.forms.borderColor:hover": getColor(7),
140
- "interactive.forms.borderColor:focus": getColor(7),
141
- "interactive.forms.borderColor:press": getColor(7),
142
- "interactive.forms.borderColor:disabled": tokens.color.disabled
143
- };
144
- };
145
- const createAlouetteThemes = (tokens) => ({
146
- light: createTheme({
147
- backgroundColor: tokens.color.white,
148
- textColor: tokens.color.black
149
- }),
150
- light_info: createColorTheme(tokens, "info"),
151
- light_success: createColorTheme(tokens, "success"),
152
- light_warning: createColorTheme(tokens, "warning"),
153
- light_danger: createColorTheme(tokens, "danger"),
154
- light_primary: createColorTheme(tokens, "primary"),
155
- dark: createTheme({
156
- backgroundColor: tokens.color.black,
157
- textColor: tokens.color.white
158
- }),
159
- dark_info: createColorTheme(
160
- tokens,
161
- "info",
162
- tokens.color.black,
163
- tokens.color.white
164
- ),
165
- dark_success: createColorTheme(
166
- tokens,
167
- "success",
168
- tokens.color.black,
169
- tokens.color.white
170
- ),
171
- dark_warning: createColorTheme(
172
- tokens,
173
- "warning",
174
- tokens.color.black,
175
- tokens.color.white
176
- ),
177
- dark_danger: createColorTheme(
178
- tokens,
179
- "danger",
180
- tokens.color.black,
181
- tokens.color.white
182
- ),
183
- dark_primary: createColorTheme(
184
- tokens,
185
- "primary",
186
- tokens.color.black,
187
- tokens.color.white
188
- )
189
- });
190
-
191
109
  const createAlouetteSizes = (spacing, negative) => {
192
110
  const MAX_SIZE = 64;
193
111
  const sizes = {};
@@ -207,7 +125,10 @@ const transformColorScalesToTokens = (colorScales) => {
207
125
  };
208
126
  const createAlouetteTokens = (colorScales, { spacing = 4 } = {}) => {
209
127
  const sizes = createAlouetteSizes(spacing, false);
210
- const negativeSizes = createAlouetteSizes(-spacing, true);
128
+ const negativeSizes = createAlouetteSizes(
129
+ -spacing,
130
+ true
131
+ );
211
132
  return createTokens({
212
133
  color: {
213
134
  black: "#000000",
@@ -234,6 +155,96 @@ const createAlouetteTokens = (colorScales, { spacing = 4 } = {}) => {
234
155
  });
235
156
  };
236
157
 
158
+ const createColorTheme = (tokens, colorScaleName, backgroundColor, textColor, contrastTextColor) => {
159
+ const alouetteTokens = tokens;
160
+ if (!backgroundColor) backgroundColor = alouetteTokens.color.white;
161
+ if (!textColor) textColor = alouetteTokens.color.black;
162
+ if (!contrastTextColor) contrastTextColor = alouetteTokens.color.white;
163
+ const getColor = (scaleNumber) => tokens.color[`${colorScaleName}.${scaleNumber}`];
164
+ return {
165
+ backgroundColor,
166
+ textColor,
167
+ mainColor: getColor(6),
168
+ mainTextColor: getColor(9),
169
+ contrastTextColor,
170
+ borderColor: getColor(8),
171
+ "interactive.contained.backgroundColor": getColor(5),
172
+ "interactive.borderColor": getColor(8),
173
+ "interactive.contained.backgroundColor:hover": getColor(4),
174
+ "interactive.outlined.backgroundColor:hover": getColor(1),
175
+ "interactive.borderColor:hover": getColor(7),
176
+ "interactive.contained.backgroundColor:focus": getColor(4),
177
+ "interactive.outlined.backgroundColor:focus": getColor(1),
178
+ "interactive.borderColor:focus": getColor(7),
179
+ "interactive.contained.backgroundColor:press": getColor(2),
180
+ "interactive.outlined.backgroundColor:press": getColor(3),
181
+ "interactive.borderColor:press": getColor(7),
182
+ "interactive.contained.backgroundColor:disabled": alouetteTokens.color.disabled,
183
+ "interactive.borderColor:disabled": alouetteTokens.color.disabled,
184
+ "interactive.textColor:disabled": alouetteTokens.color.contrastDisabled,
185
+ "interactive.forms.textColor": textColor,
186
+ // "interactive.forms.backgroundColor": undefined,
187
+ // "interactive.forms.backgroundColor:hover": undefined,
188
+ "interactive.forms.backgroundColor:focus": getColor(1),
189
+ "interactive.forms.backgroundColor:press": getColor(3),
190
+ "interactive.forms.borderColor": getColor(10),
191
+ "interactive.forms.borderColor:hover": getColor(7),
192
+ "interactive.forms.borderColor:focus": getColor(7),
193
+ "interactive.forms.borderColor:press": getColor(7),
194
+ "interactive.forms.borderColor:disabled": alouetteTokens.color.disabled
195
+ };
196
+ };
197
+ const createAlouetteThemes = (tokens) => {
198
+ const alouetteTokens = tokens;
199
+ return {
200
+ light: createColorTheme(
201
+ alouetteTokens,
202
+ "grayscale",
203
+ alouetteTokens.color.white,
204
+ alouetteTokens.color.black
205
+ ),
206
+ light_info: createColorTheme(alouetteTokens, "info"),
207
+ light_success: createColorTheme(alouetteTokens, "success"),
208
+ light_warning: createColorTheme(alouetteTokens, "warning"),
209
+ light_danger: createColorTheme(alouetteTokens, "danger"),
210
+ light_primary: createColorTheme(alouetteTokens, "primary")
211
+ // dark: createRootTheme({
212
+ // backgroundColor: alouetteTokens.color.black,
213
+ // textColor: alouetteTokens.color.white,
214
+ // }),
215
+ // dark_info: createColorTheme(
216
+ // alouetteTokens,
217
+ // "info",
218
+ // alouetteTokens.color.black,
219
+ // alouetteTokens.color.white,
220
+ // ),
221
+ // dark_success: createColorTheme(
222
+ // alouetteTokens,
223
+ // "success",
224
+ // alouetteTokens.color.black,
225
+ // alouetteTokens.color.white,
226
+ // ),
227
+ // dark_warning: createColorTheme(
228
+ // alouetteTokens,
229
+ // "warning",
230
+ // alouetteTokens.color.black,
231
+ // alouetteTokens.color.white,
232
+ // ),
233
+ // dark_danger: createColorTheme(
234
+ // alouetteTokens,
235
+ // "danger",
236
+ // alouetteTokens.color.black,
237
+ // alouetteTokens.color.white,
238
+ // ),
239
+ // dark_primary: createColorTheme(
240
+ // alouetteTokens,
241
+ // "primary",
242
+ // alouetteTokens.color.black,
243
+ // alouetteTokens.color.white,
244
+ // ),
245
+ };
246
+ };
247
+
237
248
  const createColorScale = (colorScale) => colorScale;
238
249
  const defaultColorScales = {
239
250
  grayscale: createColorScale({
@@ -310,21 +321,20 @@ const defaultColorScales = {
310
321
  })
311
322
  };
312
323
 
313
- const createAlouetteTamagui = (options) => {
314
- const tokens = createAlouetteTokens(options.colorScales, options.tokens);
324
+ const createAlouetteTamagui = (tokens, themes, options = {}) => {
315
325
  return createTamagui({
316
326
  fonts: createAlouetteFonts(options.fonts),
317
327
  tokens,
318
- themes: createAlouetteThemes(tokens),
328
+ themes,
319
329
  media,
320
330
  animations,
321
331
  settings: {
322
- allowedStyleValues: "strict",
323
- autocompleteSpecificTokens: true
332
+ allowedStyleValues: "somewhat-strict-web",
333
+ autocompleteSpecificTokens: "except-special"
324
334
  },
325
335
  components: ["alouette"]
326
336
  });
327
337
  };
328
338
 
329
- export { createAlouetteTamagui, createColorScale, defaultColorScales };
339
+ export { createAlouetteTamagui, createAlouetteThemes, createAlouetteTokens, createColorScale, createColorTheme, defaultColorScales };
330
340
  //# sourceMappingURL=createAlouetteTamagui-node18.mjs.map