@framingui/react-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.
Files changed (131) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +16 -0
  3. package/dist/components/ActionRow.d.ts +11 -0
  4. package/dist/components/ActionRow.d.ts.map +1 -0
  5. package/dist/components/ActionRow.js +18 -0
  6. package/dist/components/ActionRow.js.map +1 -0
  7. package/dist/components/Avatar.d.ts +9 -0
  8. package/dist/components/Avatar.d.ts.map +1 -0
  9. package/dist/components/Avatar.js +34 -0
  10. package/dist/components/Avatar.js.map +1 -0
  11. package/dist/components/Badge.d.ts +10 -0
  12. package/dist/components/Badge.d.ts.map +1 -0
  13. package/dist/components/Badge.js +38 -0
  14. package/dist/components/Badge.js.map +1 -0
  15. package/dist/components/Button.d.ts +12 -0
  16. package/dist/components/Button.d.ts.map +1 -0
  17. package/dist/components/Button.js +52 -0
  18. package/dist/components/Button.js.map +1 -0
  19. package/dist/components/Card.d.ts +9 -0
  20. package/dist/components/Card.d.ts.map +1 -0
  21. package/dist/components/Card.js +23 -0
  22. package/dist/components/Card.js.map +1 -0
  23. package/dist/components/Checkbox.d.ts +11 -0
  24. package/dist/components/Checkbox.d.ts.map +1 -0
  25. package/dist/components/Checkbox.js +40 -0
  26. package/dist/components/Checkbox.js.map +1 -0
  27. package/dist/components/EmptyState.d.ts +11 -0
  28. package/dist/components/EmptyState.d.ts.map +1 -0
  29. package/dist/components/EmptyState.js +33 -0
  30. package/dist/components/EmptyState.js.map +1 -0
  31. package/dist/components/FormSection.d.ts +12 -0
  32. package/dist/components/FormSection.d.ts.map +1 -0
  33. package/dist/components/FormSection.js +19 -0
  34. package/dist/components/FormSection.js.map +1 -0
  35. package/dist/components/Heading.d.ts +12 -0
  36. package/dist/components/Heading.d.ts.map +1 -0
  37. package/dist/components/Heading.js +6 -0
  38. package/dist/components/Heading.js.map +1 -0
  39. package/dist/components/IconButton.d.ts +13 -0
  40. package/dist/components/IconButton.d.ts.map +1 -0
  41. package/dist/components/IconButton.js +60 -0
  42. package/dist/components/IconButton.js.map +1 -0
  43. package/dist/components/InlineMessage.d.ts +7 -0
  44. package/dist/components/InlineMessage.d.ts.map +1 -0
  45. package/dist/components/InlineMessage.js +29 -0
  46. package/dist/components/InlineMessage.js.map +1 -0
  47. package/dist/components/ListItem.d.ts +12 -0
  48. package/dist/components/ListItem.d.ts.map +1 -0
  49. package/dist/components/ListItem.js +35 -0
  50. package/dist/components/ListItem.js.map +1 -0
  51. package/dist/components/ListSection.d.ts +12 -0
  52. package/dist/components/ListSection.d.ts.map +1 -0
  53. package/dist/components/ListSection.js +15 -0
  54. package/dist/components/ListSection.js.map +1 -0
  55. package/dist/components/Modal.d.ts +11 -0
  56. package/dist/components/Modal.d.ts.map +1 -0
  57. package/dist/components/Modal.js +39 -0
  58. package/dist/components/Modal.js.map +1 -0
  59. package/dist/components/PickerField.d.ts +15 -0
  60. package/dist/components/PickerField.d.ts.map +1 -0
  61. package/dist/components/PickerField.js +45 -0
  62. package/dist/components/PickerField.js.map +1 -0
  63. package/dist/components/RadioGroup.d.ts +17 -0
  64. package/dist/components/RadioGroup.d.ts.map +1 -0
  65. package/dist/components/RadioGroup.js +51 -0
  66. package/dist/components/RadioGroup.js.map +1 -0
  67. package/dist/components/Screen.d.ts +17 -0
  68. package/dist/components/Screen.d.ts.map +1 -0
  69. package/dist/components/Screen.js +38 -0
  70. package/dist/components/Screen.js.map +1 -0
  71. package/dist/components/ScreenHeader.d.ts +9 -0
  72. package/dist/components/ScreenHeader.d.ts.map +1 -0
  73. package/dist/components/ScreenHeader.js +37 -0
  74. package/dist/components/ScreenHeader.js.map +1 -0
  75. package/dist/components/Section.d.ts +12 -0
  76. package/dist/components/Section.d.ts.map +1 -0
  77. package/dist/components/Section.js +27 -0
  78. package/dist/components/Section.js.map +1 -0
  79. package/dist/components/SegmentedControl.d.ts +13 -0
  80. package/dist/components/SegmentedControl.d.ts.map +1 -0
  81. package/dist/components/SegmentedControl.js +37 -0
  82. package/dist/components/SegmentedControl.js.map +1 -0
  83. package/dist/components/Stack.d.ts +13 -0
  84. package/dist/components/Stack.d.ts.map +1 -0
  85. package/dist/components/Stack.js +22 -0
  86. package/dist/components/Stack.js.map +1 -0
  87. package/dist/components/Switch.d.ts +11 -0
  88. package/dist/components/Switch.d.ts.map +1 -0
  89. package/dist/components/Switch.js +29 -0
  90. package/dist/components/Switch.js.map +1 -0
  91. package/dist/components/Text.d.ts +12 -0
  92. package/dist/components/Text.d.ts.map +1 -0
  93. package/dist/components/Text.js +25 -0
  94. package/dist/components/Text.js.map +1 -0
  95. package/dist/components/TextArea.d.ts +11 -0
  96. package/dist/components/TextArea.d.ts.map +1 -0
  97. package/dist/components/TextArea.js +57 -0
  98. package/dist/components/TextArea.js.map +1 -0
  99. package/dist/components/TextField.d.ts +11 -0
  100. package/dist/components/TextField.d.ts.map +1 -0
  101. package/dist/components/TextField.js +58 -0
  102. package/dist/components/TextField.js.map +1 -0
  103. package/dist/components/index.d.ts +26 -0
  104. package/dist/components/index.d.ts.map +1 -0
  105. package/dist/components/index.js +26 -0
  106. package/dist/components/index.js.map +1 -0
  107. package/dist/contracts.d.ts +63 -0
  108. package/dist/contracts.d.ts.map +1 -0
  109. package/dist/contracts.js +61 -0
  110. package/dist/contracts.js.map +1 -0
  111. package/dist/helpers.d.ts +9 -0
  112. package/dist/helpers.d.ts.map +1 -0
  113. package/dist/helpers.js +28 -0
  114. package/dist/helpers.js.map +1 -0
  115. package/dist/index.d.ts +8 -0
  116. package/dist/index.d.ts.map +1 -0
  117. package/dist/index.js +8 -0
  118. package/dist/index.js.map +1 -0
  119. package/dist/layout.d.ts +36 -0
  120. package/dist/layout.d.ts.map +1 -0
  121. package/dist/layout.js +94 -0
  122. package/dist/layout.js.map +1 -0
  123. package/dist/theme.d.ts +39 -0
  124. package/dist/theme.d.ts.map +1 -0
  125. package/dist/theme.js +53 -0
  126. package/dist/theme.js.map +1 -0
  127. package/dist/tokens.d.ts +345 -0
  128. package/dist/tokens.d.ts.map +1 -0
  129. package/dist/tokens.js +126 -0
  130. package/dist/tokens.js.map +1 -0
  131. package/package.json +67 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../src/layout.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAgB,KAAK,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEjE,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;AACxE,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC;AAC5D,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAC1D,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,SAAS,GAAG,aAAa,CAAC;AACpE,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,CAAC;AAEjE,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,mBAAmB;IAClC,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,uBAAuB;IACtC,WAAW,EAAE,MAAM,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,CAAC;IACxD,UAAU,EAAE,MAAM,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;IAC5C,YAAY,EAAE,MAAM,CAAC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC,CAAC;IACvD,UAAU,EAAE,MAAM,CAAC,eAAe,EAAE,eAAe,CAAC,CAAC;IACrD,QAAQ,EAAE,MAAM,CAAC,mBAAmB,EAAE,mBAAmB,CAAC,CAAC;CAC5D;AAED,wBAAgB,mBAAmB,CACjC,KAAK,GAAE,gBAA+B,GACrC,uBAAuB,CA6DzB;AAED,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,gBAAgB,EACvB,KAAK,GAAE,gBAA+B,GACrC,IAAI,CAAC,SAAS,EAAE,mBAAmB,GAAG,YAAY,GAAG,eAAe,CAAC,CAOvE;AAED,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,eAAe,EACtB,KAAK,GAAE,gBAA+B,GACrC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,CAExB;AAED,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,iBAAiB,EACxB,KAAK,GAAE,gBAA+B,GACrC,IAAI,CAAC,SAAS,EAAE,UAAU,GAAG,OAAO,GAAG,WAAW,CAAC,CAOrD;AAED,wBAAgB,aAAa,CAC3B,KAAK,EAAE,eAAe,EACtB,KAAK,GAAE,gBAA+B,GACrC,eAAe,CAEjB;AAED,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,mBAAmB,EAC1B,KAAK,GAAE,gBAA+B,GACrC,IAAI,CAAC,SAAS,EAAE,YAAY,GAAG,eAAe,GAAG,mBAAmB,CAAC,CAOvE"}
package/dist/layout.js ADDED
@@ -0,0 +1,94 @@
1
+ import { defaultTheme } from './theme.js';
2
+ export function resolveLayoutTokens(theme = defaultTheme) {
3
+ return {
4
+ screenInset: {
5
+ none: { horizontal: 0, top: 0, bottom: 0 },
6
+ compact: {
7
+ horizontal: theme.spacing[4],
8
+ top: theme.spacing[4],
9
+ bottom: theme.spacing[5],
10
+ },
11
+ default: {
12
+ horizontal: theme.spacing[6],
13
+ top: theme.spacing[6],
14
+ bottom: theme.spacing[8],
15
+ },
16
+ roomy: {
17
+ horizontal: theme.spacing[8],
18
+ top: theme.spacing[8],
19
+ bottom: theme.spacing[10],
20
+ },
21
+ },
22
+ sectionGap: {
23
+ tight: theme.spacing[3],
24
+ default: theme.spacing[4],
25
+ loose: theme.spacing[6],
26
+ },
27
+ contentWidth: {
28
+ full: null,
29
+ form: 480,
30
+ prose: 680,
31
+ },
32
+ formRhythm: {
33
+ compact: {
34
+ fieldGap: theme.spacing[2],
35
+ helperGap: theme.spacing[1],
36
+ sectionGap: theme.spacing[4],
37
+ },
38
+ default: {
39
+ fieldGap: theme.spacing[3],
40
+ helperGap: theme.spacing[2],
41
+ sectionGap: theme.spacing[5],
42
+ },
43
+ comfortable: {
44
+ fieldGap: theme.spacing[4],
45
+ helperGap: theme.spacing[2],
46
+ sectionGap: theme.spacing[6],
47
+ },
48
+ },
49
+ safeArea: {
50
+ none: { top: 0, bottom: 0, horizontal: 0 },
51
+ compact: {
52
+ top: theme.spacing[3],
53
+ bottom: theme.spacing[4],
54
+ horizontal: theme.spacing[4],
55
+ },
56
+ default: {
57
+ top: theme.spacing[4],
58
+ bottom: theme.spacing[6],
59
+ horizontal: theme.spacing[6],
60
+ },
61
+ },
62
+ };
63
+ }
64
+ export function getScreenInsetStyle(token, theme = defaultTheme) {
65
+ const value = resolveLayoutTokens(theme).screenInset[token];
66
+ return {
67
+ paddingHorizontal: value.horizontal,
68
+ paddingTop: value.top,
69
+ paddingBottom: value.bottom,
70
+ };
71
+ }
72
+ export function getSectionGapStyle(token, theme = defaultTheme) {
73
+ return { gap: resolveLayoutTokens(theme).sectionGap[token] };
74
+ }
75
+ export function getContentWidthStyle(token, theme = defaultTheme) {
76
+ const maxWidth = resolveLayoutTokens(theme).contentWidth[token];
77
+ return {
78
+ alignSelf: maxWidth ? 'center' : 'auto',
79
+ maxWidth: maxWidth ?? undefined,
80
+ width: '100%',
81
+ };
82
+ }
83
+ export function getFormRhythm(token, theme = defaultTheme) {
84
+ return resolveLayoutTokens(theme).formRhythm[token];
85
+ }
86
+ export function getSafeAreaPaddingStyle(token, theme = defaultTheme) {
87
+ const value = resolveLayoutTokens(theme).safeArea[token];
88
+ return {
89
+ paddingBottom: value.bottom,
90
+ paddingHorizontal: value.horizontal,
91
+ paddingTop: value.top,
92
+ };
93
+ }
94
+ //# sourceMappingURL=layout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout.js","sourceRoot":"","sources":["../src/layout.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAyB,MAAM,YAAY,CAAC;AAkCjE,MAAM,UAAU,mBAAmB,CACjC,QAA0B,YAAY;IAEtC,OAAO;QACL,WAAW,EAAE;YACX,IAAI,EAAE,EAAE,UAAU,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;YAC1C,OAAO,EAAE;gBACP,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;gBAC5B,GAAG,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;gBACrB,MAAM,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;aACzB;YACD,OAAO,EAAE;gBACP,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;gBAC5B,GAAG,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;gBACrB,MAAM,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;aACzB;YACD,KAAK,EAAE;gBACL,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;gBAC5B,GAAG,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;gBACrB,MAAM,EAAE,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC;aAC1B;SACF;QACD,UAAU,EAAE;YACV,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;YACvB,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;YACzB,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CA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
1
+ import { type ReactNode } from 'react';
2
+ import { type TextStyle, type ViewStyle } from 'react-native';
3
+ import { baseColors, baseRadius, baseShadows, baseSpacing, baseTypography, type ShadowToken, type SpacingToken, type TypographyToken } from './tokens.js';
4
+ type DeepPartial<T> = {
5
+ [K in keyof T]?: T[K] extends object ? DeepPartial<T[K]> : T[K];
6
+ };
7
+ export interface ReactNativeTheme {
8
+ id: string;
9
+ colors: typeof baseColors;
10
+ spacing: typeof baseSpacing;
11
+ radius: typeof baseRadius;
12
+ typography: typeof baseTypography;
13
+ shadows: typeof baseShadows;
14
+ }
15
+ export interface ReactNativeThemeInput {
16
+ id?: string;
17
+ colors?: DeepPartial<typeof baseColors>;
18
+ spacing?: DeepPartial<typeof baseSpacing>;
19
+ radius?: DeepPartial<typeof baseRadius>;
20
+ typography?: DeepPartial<typeof baseTypography>;
21
+ shadows?: DeepPartial<typeof baseShadows>;
22
+ }
23
+ export declare function createTheme(input?: ReactNativeThemeInput): ReactNativeTheme;
24
+ export declare const defaultTheme: ReactNativeTheme;
25
+ export interface ThemeProviderProps {
26
+ children: ReactNode;
27
+ theme?: ReactNativeTheme;
28
+ }
29
+ export declare function ThemeProvider({ children, theme }: ThemeProviderProps): import("react/jsx-runtime").JSX.Element;
30
+ export declare function useTheme(): ReactNativeTheme;
31
+ type NamedStyles<T> = {
32
+ [K in keyof T]: ViewStyle | TextStyle;
33
+ };
34
+ export declare function createThemedStyles<T extends NamedStyles<T>>(factory: (theme: ReactNativeTheme) => T): (theme?: ReactNativeTheme) => T;
35
+ export declare function getThemeTextStyle(theme: ReactNativeTheme, token: TypographyToken): TextStyle;
36
+ export declare function getThemeShadowStyle(theme: ReactNativeTheme, token: ShadowToken): ViewStyle;
37
+ export declare function getThemeSpacing(theme: ReactNativeTheme, token: SpacingToken): number;
38
+ export {};
39
+ //# sourceMappingURL=theme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../src/theme.tsx"],"names":[],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W,kBAAkB;IACjC,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,CAAC,EAAE,gBAAgB,CAAC;CAC1B;AAED,wBAAgB,aAAa,CAAC,EAAE,QAAQ,EAAE,KAAoB,EAAE,EAAE,kBAAkB,2CAEnF;AAED,wBAAgB,QAAQ,IAAI,gBAAgB,CAE3C;AAED,KAAK,WAAW,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,SAAS,GAAG,SAAS;CAAE,CAAC;AAEhE,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,WAAW,CAAC,CAAC,CAAC,EACzD,OAAO,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,CAAC,IAE/B,QAAO,gBAA+B,KAAG,CAAC,CACnD;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,eAAe,GAAG,SAAS,CAE5F;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,WAAW,GAAG,SAAS,CAE1F;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,YAAY,GAAG,MAAM,CAEpF"}
package/dist/theme.js ADDED
@@ -0,0 +1,53 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { createContext, useContext } from 'react';
3
+ import { StyleSheet } from 'react-native';
4
+ import { baseColors, baseRadius, baseShadows, baseSpacing, baseTypography, } from './tokens.js';
5
+ function mergeRecord(base, input) {
6
+ if (!input) {
7
+ return { ...base };
8
+ }
9
+ const mergedEntries = Object.entries(base).map(([key, value]) => {
10
+ const nextValue = input[key];
11
+ if (value !== null &&
12
+ typeof value === 'object' &&
13
+ !Array.isArray(value) &&
14
+ nextValue !== null &&
15
+ typeof nextValue === 'object' &&
16
+ !Array.isArray(nextValue)) {
17
+ return [key, mergeRecord(value, nextValue)];
18
+ }
19
+ return [key, nextValue ?? value];
20
+ });
21
+ return Object.fromEntries(mergedEntries);
22
+ }
23
+ export function createTheme(input = {}) {
24
+ return {
25
+ id: input.id ?? 'default',
26
+ colors: mergeRecord(baseColors, input.colors),
27
+ spacing: mergeRecord(baseSpacing, input.spacing),
28
+ radius: mergeRecord(baseRadius, input.radius),
29
+ typography: mergeRecord(baseTypography, input.typography),
30
+ shadows: mergeRecord(baseShadows, input.shadows),
31
+ };
32
+ }
33
+ export const defaultTheme = createTheme();
34
+ const ThemeContext = createContext(defaultTheme);
35
+ export function ThemeProvider({ children, theme = defaultTheme }) {
36
+ return _jsx(ThemeContext.Provider, { value: theme, children: children });
37
+ }
38
+ export function useTheme() {
39
+ return useContext(ThemeContext);
40
+ }
41
+ export function createThemedStyles(factory) {
42
+ return (theme = defaultTheme) => StyleSheet.create(factory(theme));
43
+ }
44
+ export function getThemeTextStyle(theme, token) {
45
+ return theme.typography[token];
46
+ }
47
+ export function getThemeShadowStyle(theme, token) {
48
+ return theme.shadows[token];
49
+ }
50
+ export function getThemeSpacing(theme, token) {
51
+ return theme.spacing[token];
52
+ }
53
+ //# sourceMappingURL=theme.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme.js","sourceRoot":"","sources":["../src/theme.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAkB,MAAM,OAAO,CAAC;AAClE,OAAO,EAAE,UAAU,EAAkC,MAAM,cAAc,CAAC;AAC1E,OAAO,EACL,UAAU,EACV,UAAU,EACV,WAAW,EACX,WAAW,EACX,cAAc,GAIf,MAAM,aAAa,CAAC;AAwBrB,SAAS,WAAW,CAAgC,IAAO,EAAE,KAAsB;IACjF,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,EAAE,GAAG,IAAI,EAAE,CAAC;IACrB,CAAC;IAED,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QAC9D,MAA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yB,CAAC;AACjF,CAAC;AAED,MAAM,UAAU,QAAQ;IACtB,OAAO,UAAU,CAAC,YAAY,CAAC,CAAC;AAClC,CAAC;AAID,MAAM,UAAU,kBAAkB,CAChC,OAAuC;IAEvC,OAAO,CAAC,QAA0B,YAAY,EAAK,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;AAC1F,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,KAAuB,EAAE,KAAsB;IAC/E,OAAO,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;AACjC,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,KAAuB,EAAE,KAAkB;IAC7E,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9B,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,KAAuB,EAAE,KAAmB;IAC1E,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9B,CAAC"}
@@ -0,0 +1,345 @@
1
+ export declare const baseColors: {
2
+ readonly background: {
3
+ readonly canvas: "#FFFFFF";
4
+ readonly muted: "#FAFAFA";
5
+ readonly subtle: "#F5F5F7";
6
+ };
7
+ readonly surface: {
8
+ readonly base: "#FFFFFF";
9
+ readonly muted: "#FAFAFA";
10
+ readonly danger: "#FFF0F0";
11
+ };
12
+ readonly text: {
13
+ readonly primary: "#111111";
14
+ readonly secondary: "#666666";
15
+ readonly tertiary: "#8A8A8E";
16
+ readonly inverse: "#FFFFFF";
17
+ readonly accent: "#0A84FF";
18
+ readonly danger: "#D93025";
19
+ };
20
+ readonly border: {
21
+ readonly subtle: "#ECECEF";
22
+ readonly default: "#E0E0E0";
23
+ readonly accent: "#0A84FF";
24
+ readonly danger: "#D93025";
25
+ };
26
+ readonly action: {
27
+ readonly primary: "#0A84FF";
28
+ readonly primaryPressed: "#0069D9";
29
+ readonly primaryDisabled: "#A7CCFF";
30
+ };
31
+ };
32
+ export declare const baseSpacing: {
33
+ readonly 0: 0;
34
+ readonly 1: 4;
35
+ readonly 2: 8;
36
+ readonly 3: 12;
37
+ readonly 4: 16;
38
+ readonly 5: 20;
39
+ readonly 6: 24;
40
+ readonly 8: 32;
41
+ readonly 10: 40;
42
+ readonly 12: 48;
43
+ };
44
+ export declare const baseRadius: {
45
+ readonly sm: 8;
46
+ readonly md: 12;
47
+ readonly lg: 16;
48
+ readonly full: 999;
49
+ };
50
+ export declare const baseTypography: {
51
+ readonly display: {
52
+ readonly fontSize: 32;
53
+ readonly lineHeight: 38;
54
+ readonly fontWeight: "700";
55
+ };
56
+ readonly title: {
57
+ readonly fontSize: 28;
58
+ readonly lineHeight: 34;
59
+ readonly fontWeight: "700";
60
+ };
61
+ readonly sectionTitle: {
62
+ readonly fontSize: 20;
63
+ readonly lineHeight: 26;
64
+ readonly fontWeight: "700";
65
+ };
66
+ readonly body: {
67
+ readonly fontSize: 16;
68
+ readonly lineHeight: 24;
69
+ readonly fontWeight: "400";
70
+ };
71
+ readonly bodyStrong: {
72
+ readonly fontSize: 16;
73
+ readonly lineHeight: 24;
74
+ readonly fontWeight: "600";
75
+ };
76
+ readonly button: {
77
+ readonly fontSize: 16;
78
+ readonly lineHeight: 20;
79
+ readonly fontWeight: "600";
80
+ };
81
+ readonly label: {
82
+ readonly fontSize: 14;
83
+ readonly lineHeight: 20;
84
+ readonly fontWeight: "500";
85
+ };
86
+ readonly caption: {
87
+ readonly fontSize: 14;
88
+ readonly lineHeight: 20;
89
+ readonly fontWeight: "400";
90
+ };
91
+ };
92
+ export declare const baseShadows: {
93
+ readonly card: {
94
+ readonly shadowColor: "#000000";
95
+ readonly shadowOpacity: 0.08;
96
+ readonly shadowRadius: 12;
97
+ readonly shadowOffset: {
98
+ readonly width: 0;
99
+ readonly height: 6;
100
+ };
101
+ readonly elevation: 2;
102
+ };
103
+ readonly focus: {
104
+ readonly shadowColor: "#0A84FF";
105
+ readonly shadowOpacity: 0.18;
106
+ readonly shadowRadius: 10;
107
+ readonly shadowOffset: {
108
+ readonly width: 0;
109
+ readonly height: 4;
110
+ };
111
+ readonly elevation: 2;
112
+ };
113
+ };
114
+ export declare const colors: {
115
+ readonly background: {
116
+ readonly canvas: "#FFFFFF";
117
+ readonly muted: "#FAFAFA";
118
+ readonly subtle: "#F5F5F7";
119
+ };
120
+ readonly surface: {
121
+ readonly base: "#FFFFFF";
122
+ readonly muted: "#FAFAFA";
123
+ readonly danger: "#FFF0F0";
124
+ };
125
+ readonly text: {
126
+ readonly primary: "#111111";
127
+ readonly secondary: "#666666";
128
+ readonly tertiary: "#8A8A8E";
129
+ readonly inverse: "#FFFFFF";
130
+ readonly accent: "#0A84FF";
131
+ readonly danger: "#D93025";
132
+ };
133
+ readonly border: {
134
+ readonly subtle: "#ECECEF";
135
+ readonly default: "#E0E0E0";
136
+ readonly accent: "#0A84FF";
137
+ readonly danger: "#D93025";
138
+ };
139
+ readonly action: {
140
+ readonly primary: "#0A84FF";
141
+ readonly primaryPressed: "#0069D9";
142
+ readonly primaryDisabled: "#A7CCFF";
143
+ };
144
+ };
145
+ export declare const spacing: {
146
+ readonly 0: 0;
147
+ readonly 1: 4;
148
+ readonly 2: 8;
149
+ readonly 3: 12;
150
+ readonly 4: 16;
151
+ readonly 5: 20;
152
+ readonly 6: 24;
153
+ readonly 8: 32;
154
+ readonly 10: 40;
155
+ readonly 12: 48;
156
+ };
157
+ export declare const radius: {
158
+ readonly sm: 8;
159
+ readonly md: 12;
160
+ readonly lg: 16;
161
+ readonly full: 999;
162
+ };
163
+ export declare const typography: {
164
+ readonly display: {
165
+ readonly fontSize: 32;
166
+ readonly lineHeight: 38;
167
+ readonly fontWeight: "700";
168
+ };
169
+ readonly title: {
170
+ readonly fontSize: 28;
171
+ readonly lineHeight: 34;
172
+ readonly fontWeight: "700";
173
+ };
174
+ readonly sectionTitle: {
175
+ readonly fontSize: 20;
176
+ readonly lineHeight: 26;
177
+ readonly fontWeight: "700";
178
+ };
179
+ readonly body: {
180
+ readonly fontSize: 16;
181
+ readonly lineHeight: 24;
182
+ readonly fontWeight: "400";
183
+ };
184
+ readonly bodyStrong: {
185
+ readonly fontSize: 16;
186
+ readonly lineHeight: 24;
187
+ readonly fontWeight: "600";
188
+ };
189
+ readonly button: {
190
+ readonly fontSize: 16;
191
+ readonly lineHeight: 20;
192
+ readonly fontWeight: "600";
193
+ };
194
+ readonly label: {
195
+ readonly fontSize: 14;
196
+ readonly lineHeight: 20;
197
+ readonly fontWeight: "500";
198
+ };
199
+ readonly caption: {
200
+ readonly fontSize: 14;
201
+ readonly lineHeight: 20;
202
+ readonly fontWeight: "400";
203
+ };
204
+ };
205
+ export declare const shadows: {
206
+ readonly card: {
207
+ readonly shadowColor: "#000000";
208
+ readonly shadowOpacity: 0.08;
209
+ readonly shadowRadius: 12;
210
+ readonly shadowOffset: {
211
+ readonly width: 0;
212
+ readonly height: 6;
213
+ };
214
+ readonly elevation: 2;
215
+ };
216
+ readonly focus: {
217
+ readonly shadowColor: "#0A84FF";
218
+ readonly shadowOpacity: 0.18;
219
+ readonly shadowRadius: 10;
220
+ readonly shadowOffset: {
221
+ readonly width: 0;
222
+ readonly height: 4;
223
+ };
224
+ readonly elevation: 2;
225
+ };
226
+ };
227
+ export declare const tokens: {
228
+ readonly colors: {
229
+ readonly background: {
230
+ readonly canvas: "#FFFFFF";
231
+ readonly muted: "#FAFAFA";
232
+ readonly subtle: "#F5F5F7";
233
+ };
234
+ readonly surface: {
235
+ readonly base: "#FFFFFF";
236
+ readonly muted: "#FAFAFA";
237
+ readonly danger: "#FFF0F0";
238
+ };
239
+ readonly text: {
240
+ readonly primary: "#111111";
241
+ readonly secondary: "#666666";
242
+ readonly tertiary: "#8A8A8E";
243
+ readonly inverse: "#FFFFFF";
244
+ readonly accent: "#0A84FF";
245
+ readonly danger: "#D93025";
246
+ };
247
+ readonly border: {
248
+ readonly subtle: "#ECECEF";
249
+ readonly default: "#E0E0E0";
250
+ readonly accent: "#0A84FF";
251
+ readonly danger: "#D93025";
252
+ };
253
+ readonly action: {
254
+ readonly primary: "#0A84FF";
255
+ readonly primaryPressed: "#0069D9";
256
+ readonly primaryDisabled: "#A7CCFF";
257
+ };
258
+ };
259
+ readonly spacing: {
260
+ readonly 0: 0;
261
+ readonly 1: 4;
262
+ readonly 2: 8;
263
+ readonly 3: 12;
264
+ readonly 4: 16;
265
+ readonly 5: 20;
266
+ readonly 6: 24;
267
+ readonly 8: 32;
268
+ readonly 10: 40;
269
+ readonly 12: 48;
270
+ };
271
+ readonly radius: {
272
+ readonly sm: 8;
273
+ readonly md: 12;
274
+ readonly lg: 16;
275
+ readonly full: 999;
276
+ };
277
+ readonly typography: {
278
+ readonly display: {
279
+ readonly fontSize: 32;
280
+ readonly lineHeight: 38;
281
+ readonly fontWeight: "700";
282
+ };
283
+ readonly title: {
284
+ readonly fontSize: 28;
285
+ readonly lineHeight: 34;
286
+ readonly fontWeight: "700";
287
+ };
288
+ readonly sectionTitle: {
289
+ readonly fontSize: 20;
290
+ readonly lineHeight: 26;
291
+ readonly fontWeight: "700";
292
+ };
293
+ readonly body: {
294
+ readonly fontSize: 16;
295
+ readonly lineHeight: 24;
296
+ readonly fontWeight: "400";
297
+ };
298
+ readonly bodyStrong: {
299
+ readonly fontSize: 16;
300
+ readonly lineHeight: 24;
301
+ readonly fontWeight: "600";
302
+ };
303
+ readonly button: {
304
+ readonly fontSize: 16;
305
+ readonly lineHeight: 20;
306
+ readonly fontWeight: "600";
307
+ };
308
+ readonly label: {
309
+ readonly fontSize: 14;
310
+ readonly lineHeight: 20;
311
+ readonly fontWeight: "500";
312
+ };
313
+ readonly caption: {
314
+ readonly fontSize: 14;
315
+ readonly lineHeight: 20;
316
+ readonly fontWeight: "400";
317
+ };
318
+ };
319
+ readonly shadows: {
320
+ readonly card: {
321
+ readonly shadowColor: "#000000";
322
+ readonly shadowOpacity: 0.08;
323
+ readonly shadowRadius: 12;
324
+ readonly shadowOffset: {
325
+ readonly width: 0;
326
+ readonly height: 6;
327
+ };
328
+ readonly elevation: 2;
329
+ };
330
+ readonly focus: {
331
+ readonly shadowColor: "#0A84FF";
332
+ readonly shadowOpacity: 0.18;
333
+ readonly shadowRadius: 10;
334
+ readonly shadowOffset: {
335
+ readonly width: 0;
336
+ readonly height: 4;
337
+ };
338
+ readonly elevation: 2;
339
+ };
340
+ };
341
+ };
342
+ export type TypographyToken = keyof typeof typography;
343
+ export type ShadowToken = keyof typeof shadows;
344
+ export type SpacingToken = keyof typeof spacing;
345
+ //# sourceMappingURL=tokens.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../src/tokens.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8Bb,CAAC;AAEX,eAAO,MAAM,WAAW;;;;;;;;;;;CAWd,CAAC;AAEX,eAAO,MAAM,UAAU;;;;;CAKb,CAAC;AAEX,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyCmE,CAAC;AAE/F,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;CAwBvB,CAAC;AAEF,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAa,CAAC;AACjC,eAAO,MAAM,OAAO;;;;;;;;;;;CAAc,CAAC;AACnC,eAAO,MAAM,MAAM;;;;;CAAa,CAAC;AACjC,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAiB,CAAC;AACzC,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;CAAc,CAAC;AAEnC,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMT,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,UAAU,CAAC;AACtD,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,OAAO,CAAC;AAC/C,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,OAAO,CAAC"}
package/dist/tokens.js ADDED
@@ -0,0 +1,126 @@
1
+ export const baseColors = {
2
+ background: {
3
+ canvas: '#FFFFFF',
4
+ muted: '#FAFAFA',
5
+ subtle: '#F5F5F7',
6
+ },
7
+ surface: {
8
+ base: '#FFFFFF',
9
+ muted: '#FAFAFA',
10
+ danger: '#FFF0F0',
11
+ },
12
+ text: {
13
+ primary: '#111111',
14
+ secondary: '#666666',
15
+ tertiary: '#8A8A8E',
16
+ inverse: '#FFFFFF',
17
+ accent: '#0A84FF',
18
+ danger: '#D93025',
19
+ },
20
+ border: {
21
+ subtle: '#ECECEF',
22
+ default: '#E0E0E0',
23
+ accent: '#0A84FF',
24
+ danger: '#D93025',
25
+ },
26
+ action: {
27
+ primary: '#0A84FF',
28
+ primaryPressed: '#0069D9',
29
+ primaryDisabled: '#A7CCFF',
30
+ },
31
+ };
32
+ export const baseSpacing = {
33
+ 0: 0,
34
+ 1: 4,
35
+ 2: 8,
36
+ 3: 12,
37
+ 4: 16,
38
+ 5: 20,
39
+ 6: 24,
40
+ 8: 32,
41
+ 10: 40,
42
+ 12: 48,
43
+ };
44
+ export const baseRadius = {
45
+ sm: 8,
46
+ md: 12,
47
+ lg: 16,
48
+ full: 999,
49
+ };
50
+ export const baseTypography = {
51
+ display: {
52
+ fontSize: 32,
53
+ lineHeight: 38,
54
+ fontWeight: '700',
55
+ },
56
+ title: {
57
+ fontSize: 28,
58
+ lineHeight: 34,
59
+ fontWeight: '700',
60
+ },
61
+ sectionTitle: {
62
+ fontSize: 20,
63
+ lineHeight: 26,
64
+ fontWeight: '700',
65
+ },
66
+ body: {
67
+ fontSize: 16,
68
+ lineHeight: 24,
69
+ fontWeight: '400',
70
+ },
71
+ bodyStrong: {
72
+ fontSize: 16,
73
+ lineHeight: 24,
74
+ fontWeight: '600',
75
+ },
76
+ button: {
77
+ fontSize: 16,
78
+ lineHeight: 20,
79
+ fontWeight: '600',
80
+ },
81
+ label: {
82
+ fontSize: 14,
83
+ lineHeight: 20,
84
+ fontWeight: '500',
85
+ },
86
+ caption: {
87
+ fontSize: 14,
88
+ lineHeight: 20,
89
+ fontWeight: '400',
90
+ },
91
+ };
92
+ export const baseShadows = {
93
+ card: {
94
+ shadowColor: '#000000',
95
+ shadowOpacity: 0.08,
96
+ shadowRadius: 12,
97
+ shadowOffset: {
98
+ width: 0,
99
+ height: 6,
100
+ },
101
+ elevation: 2,
102
+ },
103
+ focus: {
104
+ shadowColor: '#0A84FF',
105
+ shadowOpacity: 0.18,
106
+ shadowRadius: 10,
107
+ shadowOffset: {
108
+ width: 0,
109
+ height: 4,
110
+ },
111
+ elevation: 2,
112
+ },
113
+ };
114
+ export const colors = baseColors;
115
+ export const spacing = baseSpacing;
116
+ export const radius = baseRadius;
117
+ export const typography = baseTypography;
118
+ export const shadows = baseShadows;
119
+ export const tokens = {
120
+ colors,
121
+ spacing,
122
+ radius,
123
+ typography,
124
+ shadows,
125
+ };
126
+ //# sourceMappingURL=tokens.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tokens.js","sourceRoot":"","sources":["../src/tokens.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,UAAU,EAAE;QACV,MAAM,EAAE,SAAS;QACjB,KAAK,EAAE,SAAS;QAChB,MAAM,EAAE,SAAS;KAClB;IACD,OAAO,EAAE;QACP,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,SAAS;QAChB,MAAM,EAAE,SAAS;KAClB;IACD,IAAI,EAAE;QACJ,OAAO,EAAE,SAAS;QAClB,SAAS,EAAE,SAAS;QACpB,QAAQ,EAAE,SAAS;QACnB,OAAO,EAAE,SAAS;QAClB,MAAM,EAAE,SAAS;QACjB,MAAM,EAAE,SAAS;KAClB;IACD,MAAM,EAAE;QACN,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