@ikonai/sdk-react-ui 1.2.0 → 1.3.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 (73) hide show
  1. package/app/use-ikon-app.d.ts +6 -0
  2. package/auth/auth-service.d.ts +46 -2
  3. package/auth/index.d.ts +1 -1
  4. package/fonts/files/crimson-pro-latin-ext-italic.woff2 +0 -0
  5. package/fonts/files/crimson-pro-latin-ext-normal.woff2 +0 -0
  6. package/fonts/files/crimson-pro-latin-italic.woff2 +0 -0
  7. package/fonts/files/crimson-pro-latin-normal.woff2 +0 -0
  8. package/fonts/files/crimson-pro-vietnamese-italic.woff2 +0 -0
  9. package/fonts/files/crimson-pro-vietnamese-normal.woff2 +0 -0
  10. package/fonts/files/inter-cyrillic-ext-italic.woff2 +0 -0
  11. package/fonts/files/inter-cyrillic-ext-normal.woff2 +0 -0
  12. package/fonts/files/inter-cyrillic-italic.woff2 +0 -0
  13. package/fonts/files/inter-cyrillic-normal.woff2 +0 -0
  14. package/fonts/files/inter-greek-ext-italic.woff2 +0 -0
  15. package/fonts/files/inter-greek-ext-normal.woff2 +0 -0
  16. package/fonts/files/inter-greek-italic.woff2 +0 -0
  17. package/fonts/files/inter-greek-normal.woff2 +0 -0
  18. package/fonts/files/inter-latin-ext-italic.woff2 +0 -0
  19. package/fonts/files/inter-latin-ext-normal.woff2 +0 -0
  20. package/fonts/files/inter-latin-italic.woff2 +0 -0
  21. package/fonts/files/inter-latin-normal.woff2 +0 -0
  22. package/fonts/files/inter-vietnamese-italic.woff2 +0 -0
  23. package/fonts/files/inter-vietnamese-normal.woff2 +0 -0
  24. package/fonts/files/jetbrains-mono-cyrillic-ext-italic.woff2 +0 -0
  25. package/fonts/files/jetbrains-mono-cyrillic-ext-normal.woff2 +0 -0
  26. package/fonts/files/jetbrains-mono-cyrillic-italic.woff2 +0 -0
  27. package/fonts/files/jetbrains-mono-cyrillic-normal.woff2 +0 -0
  28. package/fonts/files/jetbrains-mono-greek-italic.woff2 +0 -0
  29. package/fonts/files/jetbrains-mono-greek-normal.woff2 +0 -0
  30. package/fonts/files/jetbrains-mono-latin-ext-italic.woff2 +0 -0
  31. package/fonts/files/jetbrains-mono-latin-ext-normal.woff2 +0 -0
  32. package/fonts/files/jetbrains-mono-latin-italic.woff2 +0 -0
  33. package/fonts/files/jetbrains-mono-latin-normal.woff2 +0 -0
  34. package/fonts/files/jetbrains-mono-vietnamese-italic.woff2 +0 -0
  35. package/fonts/files/jetbrains-mono-vietnamese-normal.woff2 +0 -0
  36. package/fonts/files/poppins-devanagari-400-italic.woff2 +0 -0
  37. package/fonts/files/poppins-devanagari-400-normal.woff2 +0 -0
  38. package/fonts/files/poppins-devanagari-500-italic.woff2 +0 -0
  39. package/fonts/files/poppins-devanagari-500-normal.woff2 +0 -0
  40. package/fonts/files/poppins-devanagari-600-italic.woff2 +0 -0
  41. package/fonts/files/poppins-devanagari-600-normal.woff2 +0 -0
  42. package/fonts/files/poppins-devanagari-700-italic.woff2 +0 -0
  43. package/fonts/files/poppins-devanagari-700-normal.woff2 +0 -0
  44. package/fonts/files/poppins-latin-400-italic.woff2 +0 -0
  45. package/fonts/files/poppins-latin-400-normal.woff2 +0 -0
  46. package/fonts/files/poppins-latin-500-italic.woff2 +0 -0
  47. package/fonts/files/poppins-latin-500-normal.woff2 +0 -0
  48. package/fonts/files/poppins-latin-600-italic.woff2 +0 -0
  49. package/fonts/files/poppins-latin-600-normal.woff2 +0 -0
  50. package/fonts/files/poppins-latin-700-italic.woff2 +0 -0
  51. package/fonts/files/poppins-latin-700-normal.woff2 +0 -0
  52. package/fonts/files/poppins-latin-ext-400-italic.woff2 +0 -0
  53. package/fonts/files/poppins-latin-ext-400-normal.woff2 +0 -0
  54. package/fonts/files/poppins-latin-ext-500-italic.woff2 +0 -0
  55. package/fonts/files/poppins-latin-ext-500-normal.woff2 +0 -0
  56. package/fonts/files/poppins-latin-ext-600-italic.woff2 +0 -0
  57. package/fonts/files/poppins-latin-ext-600-normal.woff2 +0 -0
  58. package/fonts/files/poppins-latin-ext-700-italic.woff2 +0 -0
  59. package/fonts/files/poppins-latin-ext-700-normal.woff2 +0 -0
  60. package/fonts/ikon-fonts.css +1379 -0
  61. package/fonts/licenses/crimson-pro-OFL.txt +93 -0
  62. package/fonts/licenses/inter-OFL.txt +93 -0
  63. package/fonts/licenses/jetbrains-mono-OFL.txt +93 -0
  64. package/fonts/licenses/poppins-OFL.txt +93 -0
  65. package/hooks/index.d.ts +0 -1
  66. package/index.d.ts +1 -1
  67. package/index.js +840 -797
  68. package/package.json +8 -3
  69. package/theme/ikon-app.css +246 -0
  70. package/theme/ikon-auth.css +311 -0
  71. package/theme/ikon-surface.css +111 -0
  72. package/theme/ikon-tokens.css +132 -0
  73. package/hooks/use-lazy-font.d.ts +0 -18
@@ -0,0 +1,132 @@
1
+ /* Ikon design tokens.
2
+
3
+ Light is the default, dark follows the browser's `prefers-color-scheme`, and `data-theme` on the
4
+ root element overrides the preference in either direction.
5
+
6
+ Override any of these from your own CSS — every rule here sits in a `@layer ikon` cascade layer,
7
+ and unlayered rules always win. */
8
+ @layer ikon {
9
+ :root {
10
+ color-scheme: light dark;
11
+
12
+ /* Inter and Poppins ship with the SDK. The fallbacks matter: these tokens are also used by
13
+ standalone documents that load no webfont at all. */
14
+ --ikon-font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
15
+ --ikon-font-display: 'Poppins', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
16
+ --ikon-font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
17
+
18
+ --ikon-radius-base: 0.25rem;
19
+ --ikon-radius-sm: calc(var(--ikon-radius-base) * 0.667);
20
+ --ikon-radius-md: var(--ikon-radius-base);
21
+ --ikon-radius-lg: calc(var(--ikon-radius-base) * 1.5);
22
+ --ikon-radius-xl: calc(var(--ikon-radius-base) * 2);
23
+ --ikon-radius-2xl: calc(var(--ikon-radius-base) * 3);
24
+ --ikon-radius-full: 9999px;
25
+
26
+ --ikon-brand-300: #ff5ba0;
27
+ --ikon-brand-400: #ff3d8f;
28
+ --ikon-brand-500: #f5277f;
29
+ --ikon-brand-600: #db176e;
30
+ --ikon-brand-700: #b3105a;
31
+
32
+ --ikon-bg-background: #fcfcfc;
33
+ --ikon-bg-card: #ffffff;
34
+ --ikon-bg-subtle: #f4f4f5;
35
+ --ikon-bg-hover: #f4f4f5;
36
+ --ikon-bg-solid: #161618;
37
+ --ikon-bg-solid-hover: #38383c;
38
+ --ikon-text-on-solid: #ffffff;
39
+
40
+ --ikon-text-primary: #161618;
41
+ --ikon-text-secondary: #4c4c51;
42
+ --ikon-text-tertiary: #6e6e74;
43
+ --ikon-text-quaternary: #9a9aa0;
44
+
45
+ --ikon-border-primary: #d4d4d7;
46
+ --ikon-border-secondary: #e8e8ea;
47
+
48
+ --ikon-status-neutral: #9a9aa0;
49
+ --ikon-status-error: #d92c20;
50
+ --ikon-status-warning: #db6803;
51
+ --ikon-status-success: #0a7d76;
52
+
53
+ /* Tinted fills for the in-app message banners. Kept faint so a banner reads as information
54
+ rather than as an alarm. */
55
+ --ikon-error-surface: #fef2f1;
56
+ --ikon-error-border: #fecdc9;
57
+ --ikon-error-text: #b32218;
58
+
59
+ /* The dot field drawn by .ikon-surface. One hairline value, faded by a radial mask. */
60
+ --ikon-grid-dot: rgba(22, 22, 24, 0.09);
61
+
62
+ --ikon-overlay-scrim: rgba(252, 252, 252, 0.72);
63
+ --ikon-focus-ring: var(--ikon-brand-500);
64
+ }
65
+
66
+ @media (prefers-color-scheme: dark) {
67
+ :root:not([data-theme='light']) {
68
+ --ikon-bg-background: #0b0b0d;
69
+ --ikon-bg-card: #161618;
70
+ --ikon-bg-subtle: #1c1c1f;
71
+ --ikon-bg-hover: #242427;
72
+ --ikon-bg-solid: #f4f4f5;
73
+ --ikon-bg-solid-hover: #ffffff;
74
+ --ikon-text-on-solid: #0b0b0d;
75
+
76
+ --ikon-text-primary: #f7f7f7;
77
+ --ikon-text-secondary: #d3d5d9;
78
+ --ikon-text-tertiary: #aeb2b8;
79
+ --ikon-text-quaternary: #82868d;
80
+
81
+ --ikon-border-primary: #38383c;
82
+ --ikon-border-secondary: #2f2f33;
83
+
84
+ --ikon-status-neutral: #6e6e74;
85
+ --ikon-status-error: #f97066;
86
+ --ikon-status-warning: #fcb022;
87
+ --ikon-status-success: #38d3bd;
88
+
89
+ --ikon-error-surface: #2a1614;
90
+ --ikon-error-border: #5b241e;
91
+ --ikon-error-text: #fca19b;
92
+
93
+ --ikon-grid-dot: rgba(255, 255, 255, 0.16);
94
+
95
+ --ikon-overlay-scrim: rgba(11, 11, 13, 0.72);
96
+ --ikon-focus-ring: var(--ikon-brand-400);
97
+ }
98
+ }
99
+
100
+ /* An explicit data-theme wins over the OS preference in both directions. */
101
+ :root[data-theme='dark'] {
102
+ --ikon-bg-background: #0b0b0d;
103
+ --ikon-bg-card: #161618;
104
+ --ikon-bg-subtle: #1c1c1f;
105
+ --ikon-bg-hover: #242427;
106
+ --ikon-bg-solid: #f4f4f5;
107
+ --ikon-bg-solid-hover: #ffffff;
108
+ --ikon-text-on-solid: #0b0b0d;
109
+
110
+ --ikon-text-primary: #f7f7f7;
111
+ --ikon-text-secondary: #d3d5d9;
112
+ --ikon-text-tertiary: #aeb2b8;
113
+ --ikon-text-quaternary: #82868d;
114
+
115
+ --ikon-border-primary: #38383c;
116
+ --ikon-border-secondary: #2f2f33;
117
+
118
+ --ikon-status-neutral: #6e6e74;
119
+ --ikon-status-error: #f97066;
120
+ --ikon-status-warning: #fcb022;
121
+ --ikon-status-success: #38d3bd;
122
+
123
+ --ikon-error-surface: #2a1614;
124
+ --ikon-error-border: #5b241e;
125
+ --ikon-error-text: #fca19b;
126
+
127
+ --ikon-grid-dot: rgba(255, 255, 255, 0.16);
128
+
129
+ --ikon-overlay-scrim: rgba(11, 11, 13, 0.72);
130
+ --ikon-focus-ring: var(--ikon-brand-400);
131
+ }
132
+ }
@@ -1,18 +0,0 @@
1
- /**
2
- * Hook for lazy loading fonts. The font is only loaded when the returned function is called.
3
- * Useful for loading fonts only when certain UI elements (like error overlays) are displayed.
4
- *
5
- * @param fontUrl - The URL of the font stylesheet (e.g., Google Fonts URL)
6
- * @returns A function that loads the font when called. Safe to call multiple times - font only loads once.
7
- *
8
- * @example
9
- * ```tsx
10
- * const loadFont = useLazyFont('https://fonts.googleapis.com/css2?family=Space+Grotesk&display=swap');
11
- *
12
- * function ErrorOverlay() {
13
- * loadFont(); // Font loads only when this component renders
14
- * return <div>Error occurred</div>;
15
- * }
16
- * ```
17
- */
18
- export declare function useLazyFont(fontUrl: string): () => void;