fiboui 1.0.1 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (169) hide show
  1. package/README.md +138 -92
  2. package/dist/FineGrain-kBxv0WeR.js +29 -0
  3. package/dist/Link-DDzSPY1Q.js +88 -0
  4. package/dist/PluginManager-D5-ApsSN.js +111 -0
  5. package/dist/Router-i6Nc6qVs.js +386 -0
  6. package/dist/builder-DjLYXkXu.js +1842 -0
  7. package/dist/bundle-mjs-wppB-TKB.js +2760 -0
  8. package/dist/cli/bin.js +20 -0
  9. package/dist/cli/commands/generate/component.js +67 -0
  10. package/dist/cli/commands/generate/index.js +10 -0
  11. package/dist/cli/commands/generate/module.js +58 -0
  12. package/dist/cli/commands/generate/plugin.js +67 -0
  13. package/dist/cli/commands/init.js +58 -0
  14. package/dist/content.js +17 -0
  15. package/dist/core.js +33 -0
  16. package/dist/{effects-D16XdB_d.mjs → effects-CnevV566.js} +1 -0
  17. package/dist/index-B1av7e36.js +1102 -0
  18. package/dist/index-BQGRpkzR.js +1024 -0
  19. package/dist/index-CTRZRn9S.js +90 -0
  20. package/dist/index-DKFr-sai.js +33 -0
  21. package/dist/index-Dm4j2mMM.js +1031 -0
  22. package/dist/index-RbfIZuAo.js +119 -0
  23. package/dist/index-yeYkDTAx.js +778 -0
  24. package/dist/index.d.ts +43753 -6
  25. package/dist/index.js +2054 -0
  26. package/dist/interactive.js +12 -0
  27. package/dist/layout.js +18 -0
  28. package/dist/mount-sAVX_FBU.js +95 -0
  29. package/dist/navigation.js +13 -0
  30. package/dist/provider-B0eB-Wy7.js +286 -0
  31. package/dist/structure.js +15 -0
  32. package/dist/style.css +1 -1
  33. package/dist/style.js +1 -0
  34. package/dist/theme.js +9 -0
  35. package/package.json +88 -13
  36. package/dist/content/Alert/index.d.ts +0 -878
  37. package/dist/content/Avatar/index.d.ts +0 -886
  38. package/dist/content/Badge/index.d.ts +0 -887
  39. package/dist/content/Image/index.d.ts +0 -893
  40. package/dist/content/Label/index.d.ts +0 -879
  41. package/dist/content/Progress/index.d.ts +0 -898
  42. package/dist/content/Skeleton/index.d.ts +0 -879
  43. package/dist/content/Spinner/index.d.ts +0 -880
  44. package/dist/content/Text/index.d.ts +0 -878
  45. package/dist/content/index.d.ts +0 -9
  46. package/dist/core/StateWrapper.d.ts +0 -31
  47. package/dist/core/builder.d.ts +0 -53
  48. package/dist/core/component.d.ts +0 -7
  49. package/dist/core/effects.d.ts +0 -4
  50. package/dist/core/hooks.d.ts +0 -5
  51. package/dist/core/icons.d.ts +0 -11
  52. package/dist/core/index.d.ts +0 -6
  53. package/dist/core/state.d.ts +0 -86
  54. package/dist/core/types.d.ts +0 -51
  55. package/dist/demo.d.ts +0 -7
  56. package/dist/index.esm.js +0 -4777
  57. package/dist/index.umd.js +0 -251
  58. package/dist/interactive/Button/index.d.ts +0 -897
  59. package/dist/interactive/Checkbox/index.d.ts +0 -884
  60. package/dist/interactive/Combobox/index.d.ts +0 -898
  61. package/dist/interactive/RadioGroup/index.d.ts +0 -888
  62. package/dist/interactive/Select/index.d.ts +0 -895
  63. package/dist/interactive/Switch/index.d.ts +0 -881
  64. package/dist/interactive/TextField/index.d.ts +0 -893
  65. package/dist/interactive/Textarea/index.d.ts +0 -890
  66. package/dist/interactive/index.d.ts +0 -8
  67. package/dist/layout/Center/index.d.ts +0 -869
  68. package/dist/layout/Column/index.d.ts +0 -881
  69. package/dist/layout/Container/index.d.ts +0 -870
  70. package/dist/layout/DashboardLayout/index.d.ts +0 -870
  71. package/dist/layout/Header/index.d.ts +0 -870
  72. package/dist/layout/Line/index.d.ts +0 -872
  73. package/dist/layout/Row/index.d.ts +0 -879
  74. package/dist/layout/Scaffold/index.d.ts +0 -878
  75. package/dist/layout/ScrollView/index.d.ts +0 -879
  76. package/dist/layout/Sidebar/index.d.ts +0 -870
  77. package/dist/layout/Spacer/index.d.ts +0 -875
  78. package/dist/layout/StakentComponents.d.ts +0 -4
  79. package/dist/layout/index.d.ts +0 -11
  80. package/dist/structure/Banner/index.d.ts +0 -879
  81. package/dist/structure/Box/index.d.ts +0 -869
  82. package/dist/structure/Card/index.d.ts +0 -881
  83. package/dist/structure/Collapse/index.d.ts +0 -884
  84. package/dist/structure/Grid/index.d.ts +0 -1757
  85. package/dist/structure/List/index.d.ts +0 -888
  86. package/dist/structure/Table/index.d.ts +0 -895
  87. package/dist/structure/Tags/index.d.ts +0 -876
  88. package/dist/structure/cards/AssetCard/index.d.ts +0 -884
  89. package/dist/structure/cards/CollectionCard/index.d.ts +0 -880
  90. package/dist/structure/cards/ContentCard/index.d.ts +0 -884
  91. package/dist/structure/cards/ProfileCard/index.d.ts +0 -892
  92. package/dist/structure/cards/index.d.ts +0 -5
  93. package/dist/structure/cards/variants/index.d.ts +0 -3490
  94. package/dist/structure/index.d.ts +0 -9
  95. package/dist/theme/cupertino.d.ts +0 -3
  96. package/dist/theme/index.d.ts +0 -5
  97. package/dist/theme/material.d.ts +0 -3
  98. package/dist/theme/provider.d.ts +0 -16
  99. package/dist/theme/types.d.ts +0 -57
  100. package/dist/theme/web.d.ts +0 -3
  101. package/src/content/Alert/index.ts +0 -110
  102. package/src/content/Avatar/index.ts +0 -116
  103. package/src/content/Badge/index.ts +0 -162
  104. package/src/content/Image/index.ts +0 -137
  105. package/src/content/Label/index.ts +0 -66
  106. package/src/content/Progress/index.ts +0 -378
  107. package/src/content/Skeleton/index.ts +0 -71
  108. package/src/content/Spinner/index.ts +0 -139
  109. package/src/content/Text/index.ts +0 -74
  110. package/src/content/index.ts +0 -9
  111. package/src/core/StateWrapper.tsx +0 -131
  112. package/src/core/builder.ts +0 -297
  113. package/src/core/component.ts +0 -49
  114. package/src/core/effects.ts +0 -27
  115. package/src/core/hooks.ts +0 -48
  116. package/src/core/icons.tsx +0 -57
  117. package/src/core/index.ts +0 -6
  118. package/src/core/state.ts +0 -297
  119. package/src/core/types.ts +0 -62
  120. package/src/demo.tsx +0 -1050
  121. package/src/index.ts +0 -8
  122. package/src/interactive/Button/index.ts +0 -219
  123. package/src/interactive/Checkbox/index.ts +0 -145
  124. package/src/interactive/Combobox/index.ts +0 -278
  125. package/src/interactive/RadioGroup/index.ts +0 -124
  126. package/src/interactive/Select/index.ts +0 -227
  127. package/src/interactive/Switch/index.ts +0 -123
  128. package/src/interactive/TextField/index.ts +0 -223
  129. package/src/interactive/Textarea/index.ts +0 -129
  130. package/src/interactive/index.ts +0 -8
  131. package/src/layout/Center/index.ts +0 -34
  132. package/src/layout/Column/index.ts +0 -101
  133. package/src/layout/Container/index.ts +0 -28
  134. package/src/layout/DashboardLayout/index.ts +0 -106
  135. package/src/layout/Header/index.ts +0 -50
  136. package/src/layout/Line/index.ts +0 -41
  137. package/src/layout/Row/index.ts +0 -93
  138. package/src/layout/Scaffold/index.ts +0 -133
  139. package/src/layout/ScrollView/index.ts +0 -67
  140. package/src/layout/Sidebar/index.ts +0 -56
  141. package/src/layout/Spacer/index.ts +0 -46
  142. package/src/layout/StakentComponents.tsx +0 -57
  143. package/src/layout/index.ts +0 -11
  144. package/src/structure/Banner/index.ts +0 -92
  145. package/src/structure/Box/index.ts +0 -46
  146. package/src/structure/Card/index.ts +0 -113
  147. package/src/structure/Collapse/index.ts +0 -122
  148. package/src/structure/Grid/index.ts +0 -197
  149. package/src/structure/List/index.ts +0 -185
  150. package/src/structure/Table/index.ts +0 -165
  151. package/src/structure/Tags/index.ts +0 -69
  152. package/src/structure/cards/AssetCard/index.ts +0 -158
  153. package/src/structure/cards/CollectionCard/index.ts +0 -95
  154. package/src/structure/cards/ContentCard/index.ts +0 -127
  155. package/src/structure/cards/ProfileCard/index.ts +0 -152
  156. package/src/structure/cards/index.ts +0 -5
  157. package/src/structure/cards/variants/index.ts +0 -301
  158. package/src/structure/index.ts +0 -10
  159. package/src/styles/base.css +0 -186
  160. package/src/styles/core.css +0 -52
  161. package/src/styles/themes/cupertino.css +0 -197
  162. package/src/styles/themes/material.css +0 -322
  163. package/src/styles/themes/web.css +0 -196
  164. package/src/theme/cupertino.ts +0 -85
  165. package/src/theme/index.ts +0 -5
  166. package/src/theme/material.ts +0 -86
  167. package/src/theme/provider.tsx +0 -76
  168. package/src/theme/types.ts +0 -62
  169. package/src/theme/web.ts +0 -82
@@ -1,85 +0,0 @@
1
- import { FiboTheme } from './types';
2
-
3
- export const cupertinoTheme: FiboTheme = {
4
- name: 'cupertino',
5
- colors: {
6
- primary: '#007AFF',
7
- secondary: '#AF52DE',
8
- background: '#FFFFFF',
9
- surface: '#F2F2F7',
10
- error: '#FF3B30',
11
- success: '#34C759',
12
- warning: '#FF9500',
13
- info: '#5AC8FA',
14
- onPrimary: '#FFFFFF',
15
- onSecondary: '#FFFFFF',
16
- onBackground: '#000000',
17
- onSurface: '#000000',
18
- onError: '#FFFFFF',
19
- },
20
- typography: {
21
- h1: {
22
- fontSize: '34px',
23
- fontWeight: 700,
24
- letterSpacing: '0.37px',
25
- },
26
- h2: {
27
- fontSize: '28px',
28
- fontWeight: 700,
29
- letterSpacing: '0.36px',
30
- },
31
- h3: {
32
- fontSize: '22px',
33
- fontWeight: 600,
34
- letterSpacing: '0.35px',
35
- },
36
- h4: {
37
- fontSize: '20px',
38
- fontWeight: 600,
39
- },
40
- h5: {
41
- fontSize: '17px',
42
- fontWeight: 600,
43
- letterSpacing: '-0.41px',
44
- },
45
- h6: {
46
- fontSize: '15px',
47
- fontWeight: 600,
48
- letterSpacing: '-0.24px',
49
- },
50
- body: {
51
- fontSize: '17px',
52
- fontWeight: 400,
53
- letterSpacing: '-0.41px',
54
- },
55
- caption: {
56
- fontSize: '13px',
57
- fontWeight: 400,
58
- letterSpacing: '-0.08px',
59
- },
60
- label: {
61
- fontSize: '15px',
62
- fontWeight: 500,
63
- letterSpacing: '-0.24px',
64
- },
65
- },
66
- spacing: {
67
- xs: '4px',
68
- sm: '8px',
69
- md: '12px',
70
- lg: '20px',
71
- xl: '32px',
72
- },
73
- borderRadius: {
74
- sm: '8px',
75
- md: '12px',
76
- lg: '20px',
77
- full: '9999px',
78
- },
79
- shadows: {
80
- sm: '0 1px 3px rgba(0,0,0,0.08)',
81
- md: '0 2px 8px rgba(0,0,0,0.1)',
82
- lg: '0 4px 16px rgba(0,0,0,0.12)',
83
- },
84
- fontFamily: '-apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif',
85
- };
@@ -1,5 +0,0 @@
1
- export * from './types';
2
- export * from './material';
3
- export * from './cupertino';
4
- export * from './web';
5
- export * from './provider';
@@ -1,86 +0,0 @@
1
- import { FiboTheme } from './types';
2
-
3
- export const materialTheme: FiboTheme = {
4
- name: 'material',
5
- colors: {
6
- primary: '#6200EE',
7
- primaryVariant: '#3700B3',
8
- secondary: '#03DAC6',
9
- secondaryVariant: '#018786',
10
- background: '#FFFFFF',
11
- surface: '#FFFFFF',
12
- error: '#B00020',
13
- success: '#4CAF50',
14
- warning: '#FF9800',
15
- info: '#2196F3',
16
- onPrimary: '#FFFFFF',
17
- onSecondary: '#000000',
18
- onBackground: '#000000',
19
- onSurface: '#000000',
20
- onError: '#FFFFFF',
21
- },
22
- typography: {
23
- h1: {
24
- fontSize: '96px',
25
- fontWeight: 300,
26
- letterSpacing: '-1.5px',
27
- },
28
- h2: {
29
- fontSize: '60px',
30
- fontWeight: 300,
31
- letterSpacing: '-0.5px',
32
- },
33
- h3: {
34
- fontSize: '48px',
35
- fontWeight: 400,
36
- },
37
- h4: {
38
- fontSize: '34px',
39
- fontWeight: 400,
40
- letterSpacing: '0.25px',
41
- },
42
- h5: {
43
- fontSize: '24px',
44
- fontWeight: 400,
45
- },
46
- h6: {
47
- fontSize: '20px',
48
- fontWeight: 500,
49
- letterSpacing: '0.15px',
50
- },
51
- body: {
52
- fontSize: '16px',
53
- fontWeight: 400,
54
- letterSpacing: '0.5px',
55
- },
56
- caption: {
57
- fontSize: '12px',
58
- fontWeight: 400,
59
- letterSpacing: '0.4px',
60
- },
61
- label: {
62
- fontSize: '14px',
63
- fontWeight: 500,
64
- letterSpacing: '1.25px',
65
- },
66
- },
67
- spacing: {
68
- xs: '4px',
69
- sm: '8px',
70
- md: '16px',
71
- lg: '24px',
72
- xl: '32px',
73
- },
74
- borderRadius: {
75
- sm: '4px',
76
- md: '8px',
77
- lg: '16px',
78
- full: '9999px',
79
- },
80
- shadows: {
81
- sm: '0 2px 4px rgba(0,0,0,0.1)',
82
- md: '0 4px 8px rgba(0,0,0,0.12)',
83
- lg: '0 8px 16px rgba(0,0,0,0.14)',
84
- },
85
- fontFamily: 'Roboto, sans-serif',
86
- };
@@ -1,76 +0,0 @@
1
- import { createContext, useContext, useState, useEffect, ReactNode } from 'react';
2
- import { FiboTheme } from './types';
3
- import { FiboThemeName } from '../core/types';
4
- import { materialTheme } from './material';
5
- import { cupertinoTheme } from './cupertino';
6
- import { webTheme } from './web';
7
-
8
- interface FiboThemeContextValue {
9
- theme: FiboTheme;
10
- themeName: FiboThemeName;
11
- setTheme: (name: FiboThemeName) => void;
12
- }
13
-
14
- const FiboThemeContext = createContext<FiboThemeContextValue | undefined>(undefined);
15
-
16
- const themes: Record<FiboThemeName, FiboTheme> = {
17
- material: materialTheme,
18
- cupertino: cupertinoTheme,
19
- web: webTheme,
20
- };
21
-
22
- interface FiboThemeProviderProps {
23
- theme?: FiboThemeName;
24
- children: ReactNode;
25
- }
26
-
27
- export function FiboThemeProvider({
28
- theme: initialTheme = 'material',
29
- children
30
- }: FiboThemeProviderProps) {
31
- const [themeName, setThemeName] = useState<FiboThemeName>(initialTheme);
32
- const [theme, setThemeObject] = useState<FiboTheme>(themes[initialTheme]);
33
-
34
- useEffect(() => {
35
- const newTheme = themes[themeName];
36
- setThemeObject(newTheme);
37
-
38
- if (typeof document !== 'undefined') {
39
- const root = document.documentElement;
40
-
41
-
42
- root.classList.remove('fibo-theme-material', 'fibo-theme-cupertino', 'fibo-theme-web');
43
-
44
-
45
- root.classList.add(`fibo-theme-${themeName}`);
46
-
47
-
48
- root.style.setProperty('--fibo-primary', newTheme.colors.primary);
49
- root.style.setProperty('--fibo-secondary', newTheme.colors.secondary);
50
- root.style.setProperty('--fibo-background', newTheme.colors.background);
51
- root.style.setProperty('--fibo-surface', newTheme.colors.surface);
52
- root.style.setProperty('--fibo-error', newTheme.colors.error);
53
- root.style.setProperty('--fibo-font-family', newTheme.fontFamily);
54
- }
55
- }, [themeName]);
56
-
57
- const value: FiboThemeContextValue = {
58
- theme,
59
- themeName,
60
- setTheme: setThemeName,
61
- };
62
-
63
- return (
64
- <FiboThemeContext.Provider value={value}>
65
- {children}
66
- </FiboThemeContext.Provider>
67
- );
68
- }
69
-
70
- export function useFiboTheme(): FiboThemeContextValue {
71
- const context = useContext(FiboThemeContext);
72
- if (!context) {
73
- throw new Error('useFiboTheme must be used within a FiboThemeProvider');
74
- }
75
- return context;
76
- }
@@ -1,62 +0,0 @@
1
- import { FiboThemeName, TextStyle } from '../core/types';
2
-
3
- export interface ThemeColors {
4
- primary: string;
5
- primaryVariant?: string;
6
- secondary: string;
7
- secondaryVariant?: string;
8
- background: string;
9
- surface: string;
10
- error: string;
11
- success?: string;
12
- warning?: string;
13
- info?: string;
14
- onPrimary: string;
15
- onSecondary: string;
16
- onBackground: string;
17
- onSurface: string;
18
- onError: string;
19
- }
20
-
21
- export interface ThemeTypography {
22
- h1: TextStyle;
23
- h2: TextStyle;
24
- h3: TextStyle;
25
- h4: TextStyle;
26
- h5: TextStyle;
27
- h6: TextStyle;
28
- body: TextStyle;
29
- caption: TextStyle;
30
- label: TextStyle;
31
- }
32
-
33
- export interface ThemeSpacing {
34
- xs: string;
35
- sm: string;
36
- md: string;
37
- lg: string;
38
- xl: string;
39
- }
40
-
41
- export interface ThemeBorderRadius {
42
- sm: string;
43
- md: string;
44
- lg: string;
45
- full: string;
46
- }
47
-
48
- export interface ThemeShadows {
49
- sm: string;
50
- md: string;
51
- lg: string;
52
- }
53
-
54
- export interface FiboTheme {
55
- name: FiboThemeName;
56
- colors: ThemeColors;
57
- typography: ThemeTypography;
58
- spacing: ThemeSpacing;
59
- borderRadius: ThemeBorderRadius;
60
- shadows: ThemeShadows;
61
- fontFamily: string;
62
- }
package/src/theme/web.ts DELETED
@@ -1,82 +0,0 @@
1
- import { FiboTheme } from './types';
2
-
3
- export const webTheme: FiboTheme = {
4
- name: 'web',
5
- colors: {
6
- primary: '#3B82F6',
7
- secondary: '#8B5CF6',
8
- background: '#FFFFFF',
9
- surface: '#F9FAFB',
10
- error: '#EF4444',
11
- success: '#10B981',
12
- warning: '#F59E0B',
13
- info: '#06B6D4',
14
- onPrimary: '#FFFFFF',
15
- onSecondary: '#FFFFFF',
16
- onBackground: '#111827',
17
- onSurface: '#374151',
18
- onError: '#FFFFFF',
19
- },
20
- typography: {
21
- h1: {
22
- fontSize: '60px',
23
- fontWeight: 800,
24
- letterSpacing: '-0.02em',
25
- },
26
- h2: {
27
- fontSize: '48px',
28
- fontWeight: 700,
29
- letterSpacing: '-0.01em',
30
- },
31
- h3: {
32
- fontSize: '36px',
33
- fontWeight: 700,
34
- },
35
- h4: {
36
- fontSize: '30px',
37
- fontWeight: 600,
38
- },
39
- h5: {
40
- fontSize: '24px',
41
- fontWeight: 600,
42
- },
43
- h6: {
44
- fontSize: '20px',
45
- fontWeight: 600,
46
- },
47
- body: {
48
- fontSize: '16px',
49
- fontWeight: 400,
50
- lineHeight: '1.5',
51
- },
52
- caption: {
53
- fontSize: '14px',
54
- fontWeight: 400,
55
- lineHeight: '1.4',
56
- },
57
- label: {
58
- fontSize: '14px',
59
- fontWeight: 500,
60
- letterSpacing: '0.01em',
61
- },
62
- },
63
- spacing: {
64
- xs: '4px',
65
- sm: '8px',
66
- md: '16px',
67
- lg: '24px',
68
- xl: '32px',
69
- },
70
- borderRadius: {
71
- sm: '6px',
72
- md: '8px',
73
- lg: '12px',
74
- full: '9999px',
75
- },
76
- shadows: {
77
- sm: '0 1px 2px rgba(0,0,0,0.05)',
78
- md: '0 4px 6px rgba(0,0,0,0.07)',
79
- lg: '0 10px 15px rgba(0,0,0,0.1)',
80
- },
81
- fontFamily: 'Inter, system-ui, sans-serif',
82
- };