@korsolutions/ui 0.0.87 → 0.0.89

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 (237) hide show
  1. package/dist/module/components/alert/components/alert-icon.js +0 -1
  2. package/dist/module/components/alert/components/alert-icon.js.map +1 -1
  3. package/dist/module/components/alert/variants/default.js +2 -1
  4. package/dist/module/components/alert/variants/default.js.map +1 -1
  5. package/dist/module/components/alert/variants/destructive.js +2 -1
  6. package/dist/module/components/alert/variants/destructive.js.map +1 -1
  7. package/dist/module/components/alert-dialog/variants/default.js +4 -1
  8. package/dist/module/components/alert-dialog/variants/default.js.map +1 -1
  9. package/dist/module/components/avatar/variants/default.js +1 -0
  10. package/dist/module/components/avatar/variants/default.js.map +1 -1
  11. package/dist/module/components/badge/variants/default.js +1 -0
  12. package/dist/module/components/badge/variants/default.js.map +1 -1
  13. package/dist/module/components/badge/variants/secondary.js +1 -0
  14. package/dist/module/components/badge/variants/secondary.js.map +1 -1
  15. package/dist/module/components/button/button.js +8 -3
  16. package/dist/module/components/button/button.js.map +1 -1
  17. package/dist/module/components/button/variants/default.js +1 -0
  18. package/dist/module/components/button/variants/default.js.map +1 -1
  19. package/dist/module/components/button/variants/ghost.js +1 -0
  20. package/dist/module/components/button/variants/ghost.js.map +1 -1
  21. package/dist/module/components/button/variants/secondary.js +1 -0
  22. package/dist/module/components/button/variants/secondary.js.map +1 -1
  23. package/dist/module/components/calendar/calendar/variants/default.js +3 -0
  24. package/dist/module/components/calendar/calendar/variants/default.js.map +1 -1
  25. package/dist/module/components/calendar/timeline/variants/default.js +1 -0
  26. package/dist/module/components/calendar/timeline/variants/default.js.map +1 -1
  27. package/dist/module/components/calendar/week-calendar/variants/default.js +3 -0
  28. package/dist/module/components/calendar/week-calendar/variants/default.js.map +1 -1
  29. package/dist/module/components/card/variants/default.js +1 -0
  30. package/dist/module/components/card/variants/default.js.map +1 -1
  31. package/dist/module/components/checkbox/variants/default.js +2 -0
  32. package/dist/module/components/checkbox/variants/default.js.map +1 -1
  33. package/dist/module/components/checkbox/variants/outlined.js +2 -0
  34. package/dist/module/components/checkbox/variants/outlined.js.map +1 -1
  35. package/dist/module/components/combobox/components/combobox-root.js +10 -11
  36. package/dist/module/components/combobox/components/combobox-root.js.map +1 -1
  37. package/dist/module/components/combobox/variants/default.js +3 -0
  38. package/dist/module/components/combobox/variants/default.js.map +1 -1
  39. package/dist/module/components/empty/variants/default.js +2 -0
  40. package/dist/module/components/empty/variants/default.js.map +1 -1
  41. package/dist/module/components/field/variants/default.js +3 -0
  42. package/dist/module/components/field/variants/default.js.map +1 -1
  43. package/dist/module/components/icon/icon.js +1 -2
  44. package/dist/module/components/icon/icon.js.map +1 -1
  45. package/dist/module/components/input/variants/default.js +2 -0
  46. package/dist/module/components/input/variants/default.js.map +1 -1
  47. package/dist/module/components/input/variants/secondary.js +2 -0
  48. package/dist/module/components/input/variants/secondary.js.map +1 -1
  49. package/dist/module/components/link/variants/default.js +1 -0
  50. package/dist/module/components/link/variants/default.js.map +1 -1
  51. package/dist/module/components/menu/variants/default.js +3 -0
  52. package/dist/module/components/menu/variants/default.js.map +1 -1
  53. package/dist/module/components/phone-input/variants/default.js +12 -1
  54. package/dist/module/components/phone-input/variants/default.js.map +1 -1
  55. package/dist/module/components/portal/portal.web.js +15 -0
  56. package/dist/module/components/portal/portal.web.js.map +1 -1
  57. package/dist/module/components/radio-group/variants/default.js +2 -0
  58. package/dist/module/components/radio-group/variants/default.js.map +1 -1
  59. package/dist/module/components/radio-group/variants/outlined.js +2 -0
  60. package/dist/module/components/radio-group/variants/outlined.js.map +1 -1
  61. package/dist/module/components/select/variants/default.js +3 -0
  62. package/dist/module/components/select/variants/default.js.map +1 -1
  63. package/dist/module/components/sidebar/variants/default.js +1 -0
  64. package/dist/module/components/sidebar/variants/default.js.map +1 -1
  65. package/dist/module/components/tabs/variants/default.js +1 -0
  66. package/dist/module/components/tabs/variants/default.js.map +1 -1
  67. package/dist/module/components/tabs/variants/line.js +1 -0
  68. package/dist/module/components/tabs/variants/line.js.map +1 -1
  69. package/dist/module/components/textarea/variants/default.js +1 -0
  70. package/dist/module/components/textarea/variants/default.js.map +1 -1
  71. package/dist/module/components/toast/components/toast-icon.js +0 -1
  72. package/dist/module/components/toast/components/toast-icon.js.map +1 -1
  73. package/dist/module/components/toast/variants/danger.js +7 -6
  74. package/dist/module/components/toast/variants/danger.js.map +1 -1
  75. package/dist/module/components/toast/variants/default.js +2 -0
  76. package/dist/module/components/toast/variants/default.js.map +1 -1
  77. package/dist/module/components/toast/variants/success.js +7 -6
  78. package/dist/module/components/toast/variants/success.js.map +1 -1
  79. package/dist/module/components/typography/typography.js +7 -2
  80. package/dist/module/components/typography/typography.js.map +1 -1
  81. package/dist/module/components/typography/variants/body.js +28 -0
  82. package/dist/module/components/typography/variants/body.js.map +1 -0
  83. package/dist/module/components/typography/variants/heading.js +29 -0
  84. package/dist/module/components/typography/variants/heading.js.map +1 -0
  85. package/dist/module/components/typography/variants/index.js +4 -12
  86. package/dist/module/components/typography/variants/index.js.map +1 -1
  87. package/dist/module/hooks/use-keyboard-height.js +36 -0
  88. package/dist/module/hooks/use-keyboard-height.js.map +1 -0
  89. package/dist/module/hooks/use-relative-position.js +12 -3
  90. package/dist/module/hooks/use-relative-position.js.map +1 -1
  91. package/dist/module/themes/default/colors.js +28 -28
  92. package/dist/module/themes/default/colors.js.map +1 -1
  93. package/dist/module/themes/default/index.js +2 -2
  94. package/dist/module/themes/default/index.js.map +1 -1
  95. package/dist/module/utils/hsla-utils.js +0 -10
  96. package/dist/module/utils/hsla-utils.js.map +1 -1
  97. package/dist/module/utils/size-scale.js +5 -3
  98. package/dist/module/utils/size-scale.js.map +1 -1
  99. package/dist/typescript/src/components/alert/variants/default.d.ts.map +1 -1
  100. package/dist/typescript/src/components/alert/variants/destructive.d.ts.map +1 -1
  101. package/dist/typescript/src/components/alert-dialog/variants/default.d.ts.map +1 -1
  102. package/dist/typescript/src/components/avatar/variants/default.d.ts.map +1 -1
  103. package/dist/typescript/src/components/badge/variants/default.d.ts.map +1 -1
  104. package/dist/typescript/src/components/badge/variants/secondary.d.ts.map +1 -1
  105. package/dist/typescript/src/components/button/button.d.ts.map +1 -1
  106. package/dist/typescript/src/components/button/types.d.ts +3 -2
  107. package/dist/typescript/src/components/button/types.d.ts.map +1 -1
  108. package/dist/typescript/src/components/button/variants/default.d.ts.map +1 -1
  109. package/dist/typescript/src/components/button/variants/ghost.d.ts.map +1 -1
  110. package/dist/typescript/src/components/button/variants/secondary.d.ts.map +1 -1
  111. package/dist/typescript/src/components/calendar/calendar/variants/default.d.ts.map +1 -1
  112. package/dist/typescript/src/components/calendar/timeline/variants/default.d.ts.map +1 -1
  113. package/dist/typescript/src/components/calendar/week-calendar/variants/default.d.ts.map +1 -1
  114. package/dist/typescript/src/components/card/variants/default.d.ts.map +1 -1
  115. package/dist/typescript/src/components/checkbox/variants/default.d.ts.map +1 -1
  116. package/dist/typescript/src/components/checkbox/variants/outlined.d.ts.map +1 -1
  117. package/dist/typescript/src/components/combobox/components/combobox-root.d.ts.map +1 -1
  118. package/dist/typescript/src/components/combobox/variants/default.d.ts.map +1 -1
  119. package/dist/typescript/src/components/empty/variants/default.d.ts.map +1 -1
  120. package/dist/typescript/src/components/field/variants/default.d.ts.map +1 -1
  121. package/dist/typescript/src/components/icon/icon.d.ts.map +1 -1
  122. package/dist/typescript/src/components/input/variants/default.d.ts.map +1 -1
  123. package/dist/typescript/src/components/input/variants/secondary.d.ts.map +1 -1
  124. package/dist/typescript/src/components/link/variants/default.d.ts.map +1 -1
  125. package/dist/typescript/src/components/menu/variants/default.d.ts.map +1 -1
  126. package/dist/typescript/src/components/phone-input/variants/default.d.ts.map +1 -1
  127. package/dist/typescript/src/components/portal/portal.web.d.ts.map +1 -1
  128. package/dist/typescript/src/components/radio-group/variants/default.d.ts.map +1 -1
  129. package/dist/typescript/src/components/radio-group/variants/outlined.d.ts.map +1 -1
  130. package/dist/typescript/src/components/select/variants/default.d.ts.map +1 -1
  131. package/dist/typescript/src/components/sidebar/variants/default.d.ts.map +1 -1
  132. package/dist/typescript/src/components/tabs/variants/default.d.ts.map +1 -1
  133. package/dist/typescript/src/components/tabs/variants/line.d.ts.map +1 -1
  134. package/dist/typescript/src/components/textarea/variants/default.d.ts.map +1 -1
  135. package/dist/typescript/src/components/toast/variants/danger.d.ts.map +1 -1
  136. package/dist/typescript/src/components/toast/variants/default.d.ts.map +1 -1
  137. package/dist/typescript/src/components/toast/variants/success.d.ts.map +1 -1
  138. package/dist/typescript/src/components/typography/typography.d.ts +2 -0
  139. package/dist/typescript/src/components/typography/typography.d.ts.map +1 -1
  140. package/dist/typescript/src/components/typography/variants/body.d.ts +4 -0
  141. package/dist/typescript/src/components/typography/variants/body.d.ts.map +1 -0
  142. package/dist/typescript/src/components/typography/variants/heading.d.ts +4 -0
  143. package/dist/typescript/src/components/typography/variants/heading.d.ts.map +1 -0
  144. package/dist/typescript/src/components/typography/variants/index.d.ts +4 -12
  145. package/dist/typescript/src/components/typography/variants/index.d.ts.map +1 -1
  146. package/dist/typescript/src/hooks/use-keyboard-height.d.ts +9 -0
  147. package/dist/typescript/src/hooks/use-keyboard-height.d.ts.map +1 -0
  148. package/dist/typescript/src/hooks/use-relative-position.d.ts.map +1 -1
  149. package/dist/typescript/src/types/props.types.d.ts +0 -1
  150. package/dist/typescript/src/types/props.types.d.ts.map +1 -1
  151. package/dist/typescript/src/utils/hsla-utils.d.ts +0 -1
  152. package/dist/typescript/src/utils/hsla-utils.d.ts.map +1 -1
  153. package/dist/typescript/src/utils/size-scale.d.ts +3 -1
  154. package/dist/typescript/src/utils/size-scale.d.ts.map +1 -1
  155. package/package.json +4 -5
  156. package/src/components/alert/components/alert-icon.tsx +1 -1
  157. package/src/components/alert/variants/default.tsx +2 -1
  158. package/src/components/alert/variants/destructive.tsx +2 -1
  159. package/src/components/alert-dialog/variants/default.tsx +4 -1
  160. package/src/components/avatar/variants/default.tsx +1 -0
  161. package/src/components/badge/variants/default.tsx +1 -0
  162. package/src/components/badge/variants/secondary.tsx +1 -0
  163. package/src/components/button/button.tsx +9 -3
  164. package/src/components/button/types.ts +3 -2
  165. package/src/components/button/variants/default.tsx +1 -0
  166. package/src/components/button/variants/ghost.tsx +1 -0
  167. package/src/components/button/variants/secondary.tsx +1 -0
  168. package/src/components/calendar/calendar/variants/default.tsx +3 -0
  169. package/src/components/calendar/timeline/variants/default.tsx +1 -0
  170. package/src/components/calendar/week-calendar/variants/default.tsx +3 -0
  171. package/src/components/card/variants/default.tsx +1 -0
  172. package/src/components/checkbox/variants/default.tsx +2 -0
  173. package/src/components/checkbox/variants/outlined.tsx +2 -0
  174. package/src/components/combobox/components/combobox-root.tsx +10 -11
  175. package/src/components/combobox/variants/default.tsx +3 -0
  176. package/src/components/empty/variants/default.tsx +2 -0
  177. package/src/components/field/variants/default.tsx +3 -0
  178. package/src/components/icon/icon.tsx +0 -1
  179. package/src/components/input/variants/default.tsx +2 -0
  180. package/src/components/input/variants/secondary.tsx +2 -0
  181. package/src/components/link/variants/default.tsx +1 -0
  182. package/src/components/menu/variants/default.tsx +3 -0
  183. package/src/components/phone-input/variants/default.tsx +11 -0
  184. package/src/components/portal/portal.web.tsx +15 -0
  185. package/src/components/radio-group/variants/default.tsx +2 -0
  186. package/src/components/radio-group/variants/outlined.tsx +2 -0
  187. package/src/components/select/variants/default.tsx +3 -0
  188. package/src/components/sidebar/variants/default.tsx +1 -0
  189. package/src/components/tabs/variants/default.tsx +1 -0
  190. package/src/components/tabs/variants/line.tsx +1 -0
  191. package/src/components/textarea/variants/default.tsx +1 -0
  192. package/src/components/toast/components/toast-icon.tsx +1 -1
  193. package/src/components/toast/variants/danger.tsx +6 -5
  194. package/src/components/toast/variants/default.tsx +2 -0
  195. package/src/components/toast/variants/success.tsx +6 -5
  196. package/src/components/typography/typography.tsx +5 -2
  197. package/src/components/typography/variants/body.tsx +26 -0
  198. package/src/components/typography/variants/heading.tsx +27 -0
  199. package/src/components/typography/variants/index.ts +4 -12
  200. package/src/hooks/use-keyboard-height.ts +42 -0
  201. package/src/hooks/use-relative-position.ts +17 -3
  202. package/src/themes/default/colors.ts +28 -28
  203. package/src/themes/default/index.ts +2 -2
  204. package/src/types/props.types.ts +0 -1
  205. package/src/utils/hsla-utils.ts +0 -11
  206. package/src/utils/size-scale.ts +8 -4
  207. package/README.md +0 -4
  208. package/dist/module/components/typography/variants/body-lg.js +0 -18
  209. package/dist/module/components/typography/variants/body-lg.js.map +0 -1
  210. package/dist/module/components/typography/variants/body-md.js +0 -18
  211. package/dist/module/components/typography/variants/body-md.js.map +0 -1
  212. package/dist/module/components/typography/variants/body-sm.js +0 -18
  213. package/dist/module/components/typography/variants/body-sm.js.map +0 -1
  214. package/dist/module/components/typography/variants/heading-lg.js +0 -19
  215. package/dist/module/components/typography/variants/heading-lg.js.map +0 -1
  216. package/dist/module/components/typography/variants/heading-md.js +0 -19
  217. package/dist/module/components/typography/variants/heading-md.js.map +0 -1
  218. package/dist/module/components/typography/variants/heading-sm.js +0 -19
  219. package/dist/module/components/typography/variants/heading-sm.js.map +0 -1
  220. package/dist/typescript/src/components/typography/variants/body-lg.d.ts +0 -3
  221. package/dist/typescript/src/components/typography/variants/body-lg.d.ts.map +0 -1
  222. package/dist/typescript/src/components/typography/variants/body-md.d.ts +0 -3
  223. package/dist/typescript/src/components/typography/variants/body-md.d.ts.map +0 -1
  224. package/dist/typescript/src/components/typography/variants/body-sm.d.ts +0 -3
  225. package/dist/typescript/src/components/typography/variants/body-sm.d.ts.map +0 -1
  226. package/dist/typescript/src/components/typography/variants/heading-lg.d.ts +0 -3
  227. package/dist/typescript/src/components/typography/variants/heading-lg.d.ts.map +0 -1
  228. package/dist/typescript/src/components/typography/variants/heading-md.d.ts +0 -3
  229. package/dist/typescript/src/components/typography/variants/heading-md.d.ts.map +0 -1
  230. package/dist/typescript/src/components/typography/variants/heading-sm.d.ts +0 -3
  231. package/dist/typescript/src/components/typography/variants/heading-sm.d.ts.map +0 -1
  232. package/src/components/typography/variants/body-lg.tsx +0 -14
  233. package/src/components/typography/variants/body-md.tsx +0 -14
  234. package/src/components/typography/variants/body-sm.tsx +0 -14
  235. package/src/components/typography/variants/heading-lg.tsx +0 -15
  236. package/src/components/typography/variants/heading-md.tsx +0 -15
  237. package/src/components/typography/variants/heading-sm.tsx +0 -15
@@ -1,45 +1,45 @@
1
1
  import type { Colors } from "../types";
2
2
 
3
3
  export const lightColors: Colors = {
4
- background: "hsl(224, 0%, 100%)",
5
- foreground: "hsl(224, 0%, 4%)",
4
+ background: "hsl(0, 0%, 98%)",
5
+ foreground: "hsl(0, 0%, 4%)",
6
6
 
7
- primary: "hsl(224, 0%, 9%)",
8
- primaryForeground: "hsl(224, 0%, 98%)",
7
+ primary: "hsl(0, 0%, 10%)",
8
+ primaryForeground: "hsl(0, 0%, 98%)",
9
9
 
10
- secondary: "hsl(224, 0%, 96%)",
11
- secondaryForeground: "hsl(224, 0%, 9%)",
10
+ secondary: "hsl(0, 0%, 93%)",
11
+ secondaryForeground: "hsl(0, 0%, 9%)",
12
12
 
13
- muted: "hsl(224, 0%, 96%)",
14
- mutedForeground: "hsl(224, 0%, 45%)",
13
+ muted: "hsl(0, 0%, 96%)",
14
+ mutedForeground: "hsl(0, 0%, 45%)",
15
15
 
16
- border: "hsl(224, 0%, 90%)",
17
- surface: "hsl(224, 0%, 100%)",
16
+ border: "hsl(0, 0%, 90%)",
17
+ surface: "hsl(0, 0%, 100%)",
18
18
 
19
- danger: "hsl(360, 100%, 45%)",
20
- success: "hsl(140, 100%, 40%)",
21
- warning: "hsl(31, 92%, 45%)",
22
- info: "hsl(210, 92%, 45%)",
19
+ danger: "hsl(0, 72%, 51%)",
20
+ success: "hsl(142, 71%, 45%)",
21
+ warning: "hsl(38, 92%, 50%)",
22
+ info: "hsl(217, 91%, 60%)",
23
23
  };
24
24
 
25
25
  export const darkColors: Colors = {
26
- background: "hsl(224, 0%, 4%)",
27
- foreground: "hsl(224, 0%, 98%)",
26
+ background: "hsl(0, 0%, 2%)",
27
+ foreground: "hsl(0, 0%, 96%)",
28
28
 
29
- primary: "hsl(224, 0%, 90%)",
30
- primaryForeground: "hsl(224, 0%, 9%)",
29
+ primary: "hsl(0, 0%, 90%)",
30
+ primaryForeground: "hsl(0, 0%, 10%)",
31
31
 
32
- secondary: "hsl(224, 0%, 15%)",
33
- secondaryForeground: "hsl(224, 0%, 98%)",
32
+ secondary: "hsl(0, 0%, 15%)",
33
+ secondaryForeground: "hsl(0, 0%, 98%)",
34
34
 
35
- muted: "hsl(224, 0%, 15%)",
36
- mutedForeground: "hsl(224, 0%, 63%)",
35
+ muted: "hsl(0, 0%, 15%)",
36
+ mutedForeground: "hsl(0, 0%, 63%)",
37
37
 
38
- border: "hsl(224, 0%, 16%)",
39
- surface: "hsl(224, 0%, 9%)",
38
+ border: "hsl(0, 0%, 16%)",
39
+ surface: "hsl(0, 0%, 8%)",
40
40
 
41
- danger: "hsl(360, 100%, 45%)",
42
- success: "hsl(140, 100%, 40%)",
43
- warning: "hsl(31, 92%, 45%)",
44
- info: "hsl(210, 92%, 45%)",
41
+ danger: "hsl(0, 63%, 60%)",
42
+ success: "hsl(142, 60%, 55%)",
43
+ warning: "hsl(38, 80%, 60%)",
44
+ info: "hsl(217, 80%, 65%)",
45
45
  };
@@ -6,8 +6,8 @@ export const defaultThemeAssets: ThemeAssets = {
6
6
  light: lightColors,
7
7
  dark: darkColors,
8
8
  },
9
- radius: 10,
10
- spacing: 6,
9
+ radius: 8,
10
+ spacing: 7,
11
11
  fontFamily: "System",
12
12
  letterSpacing: 0,
13
13
  fontSize: 16,
@@ -13,6 +13,5 @@ export type SvgProps = {
13
13
  size?: number;
14
14
  color?: ColorValue;
15
15
  strokeWidth?: number;
16
- absoluteStrokeWidth?: boolean;
17
16
  style?: StyleProp<ViewStyle & TextStyle>;
18
17
  };
@@ -1,14 +1,3 @@
1
- export const hslaSetAlpha = (hsla: string, alpha: number): string => {
2
- const parts = hsla.replace(/^hsla?\(|\s+|\)$/g, "").split(",");
3
- if (parts[0] === undefined) throw new Error("Invalid HSLA color format");
4
- if (parts[1] === undefined) throw new Error("Invalid HSLA color format");
5
- if (parts[2] === undefined) throw new Error("Invalid HSLA color format");
6
- const h = parseInt(parts[0], 10);
7
- const s = parseInt(parts[1], 10);
8
- const l = parseInt(parts[2], 10);
9
- return `hsla(${h}, ${s}%, ${l}%, ${alpha})`;
10
- };
11
-
12
1
  export const hslaSetLightness = (hsla: string, lightness: number): string => {
13
2
  const parts = hsla.replace(/^hsla?\(|\s+|\)$/g, "").split(",");
14
3
  if (parts[0] === undefined) throw new Error("Invalid HSLA color format");
@@ -9,7 +9,9 @@ interface SizeScaleValues {
9
9
  gap: number;
10
10
  /** fontSize * 0.875 | 1 | 1.125 */
11
11
  fontSize: number;
12
- /** fontSize * 0.875 | 1 | 1.125 (alias for icon sizing) */
12
+ /** fontSize * 1.25 (line height for text) */
13
+ lineHeight: number;
14
+ /** Equal to lineHeight (icons match text line height) */
13
15
  iconSize: number;
14
16
  /** 1.75 | 2 | 2.25 */
15
17
  strokeWidth: number;
@@ -22,8 +24,8 @@ const scales: Record<
22
24
  { pv: number; ph: number; gap: number; fontScale: number; sw: number; h: number }
23
25
  > = {
24
26
  sm: { pv: 1, ph: 1.5, gap: 0.75, fontScale: 0.875, sw: 1.75, h: 4.5 },
25
- md: { pv: 1.5, ph: 2, gap: 1, fontScale: 1, sw: 2, h: 6 },
26
- lg: { pv: 2, ph: 3, gap: 1.25, fontScale: 1.125, sw: 2.25, h: 7.5 },
27
+ md: { pv: 1.5, ph: 2, gap: 1, fontScale: 1, sw: 1.75, h: 6 },
28
+ lg: { pv: 2, ph: 3, gap: 1.25, fontScale: 1.125, sw: 1.75, h: 7.5 },
27
29
  };
28
30
 
29
31
  export function getSizeScale(
@@ -33,12 +35,14 @@ export function getSizeScale(
33
35
  ): SizeScaleValues {
34
36
  const s = scales[size] ?? scales.md;
35
37
  const scaledFontSize = fontSize * s.fontScale;
38
+ const lineHeight = Math.round(scaledFontSize * 1.25);
36
39
  return {
37
40
  paddingVertical: spacing * s.pv,
38
41
  paddingHorizontal: spacing * s.ph,
39
42
  gap: spacing * s.gap,
40
43
  fontSize: scaledFontSize,
41
- iconSize: scaledFontSize,
44
+ lineHeight,
45
+ iconSize: lineHeight,
42
46
  strokeWidth: s.sw,
43
47
  height: spacing * s.h,
44
48
  };
package/README.md DELETED
@@ -1,4 +0,0 @@
1
- # TODO
2
-
3
- - [ ] Line height
4
- - [ ] Letter spacing
@@ -1,18 +0,0 @@
1
- "use strict";
2
-
3
- import { useThemedStyles } from "../../../utils/use-themed-styles.js";
4
- export function useTextVariantBodyLg() {
5
- return useThemedStyles(({
6
- colors,
7
- fontFamily,
8
- letterSpacing,
9
- fontSize
10
- }) => ({
11
- color: colors.foreground,
12
- fontSize: fontSize * 1.25,
13
- fontFamily,
14
- letterSpacing,
15
- lineHeight: fontSize * 1.5
16
- }));
17
- }
18
- //# sourceMappingURL=body-lg.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["useThemedStyles","useTextVariantBodyLg","colors","fontFamily","letterSpacing","fontSize","color","foreground","lineHeight"],"sourceRoot":"../../../../../src","sources":["components/typography/variants/body-lg.tsx"],"mappings":";;AACA,SAASA,eAAe,QAAQ,qCAAkC;AAElE,OAAO,SAASC,oBAAoBA,CAAA,EAAc;EAChD,OAAOD,eAAe,CACpB,CAAC;IAAEE,MAAM;IAAEC,UAAU;IAAEC,aAAa;IAAEC;EAAS,CAAC,MAAiB;IAC/DC,KAAK,EAAEJ,MAAM,CAACK,UAAU;IACxBF,QAAQ,EAAEA,QAAQ,GAAG,IAAI;IACzBF,UAAU;IACVC,aAAa;IACbI,UAAU,EAAEH,QAAQ,GAAG;EACzB,CAAC,CACH,CAAC;AACH","ignoreList":[]}
@@ -1,18 +0,0 @@
1
- "use strict";
2
-
3
- import { useThemedStyles } from "../../../utils/use-themed-styles.js";
4
- export function useTextVariantBodyMd() {
5
- return useThemedStyles(({
6
- colors,
7
- fontFamily,
8
- letterSpacing,
9
- fontSize
10
- }) => ({
11
- color: colors.foreground,
12
- fontSize,
13
- fontFamily,
14
- letterSpacing,
15
- lineHeight: fontSize * 1.5
16
- }));
17
- }
18
- //# sourceMappingURL=body-md.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["useThemedStyles","useTextVariantBodyMd","colors","fontFamily","letterSpacing","fontSize","color","foreground","lineHeight"],"sourceRoot":"../../../../../src","sources":["components/typography/variants/body-md.tsx"],"mappings":";;AACA,SAASA,eAAe,QAAQ,qCAAkC;AAElE,OAAO,SAASC,oBAAoBA,CAAA,EAAc;EAChD,OAAOD,eAAe,CACpB,CAAC;IAAEE,MAAM;IAAEC,UAAU;IAAEC,aAAa;IAAEC;EAAS,CAAC,MAAiB;IAC/DC,KAAK,EAAEJ,MAAM,CAACK,UAAU;IACxBF,QAAQ;IACRF,UAAU;IACVC,aAAa;IACbI,UAAU,EAAEH,QAAQ,GAAG;EACzB,CAAC,CACH,CAAC;AACH","ignoreList":[]}
@@ -1,18 +0,0 @@
1
- "use strict";
2
-
3
- import { useThemedStyles } from "../../../utils/use-themed-styles.js";
4
- export function useTextVariantBodySm() {
5
- return useThemedStyles(({
6
- colors,
7
- fontFamily,
8
- letterSpacing,
9
- fontSize
10
- }) => ({
11
- color: colors.foreground,
12
- fontSize: fontSize * 0.875,
13
- fontFamily,
14
- letterSpacing,
15
- lineHeight: fontSize * 1.5
16
- }));
17
- }
18
- //# sourceMappingURL=body-sm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["useThemedStyles","useTextVariantBodySm","colors","fontFamily","letterSpacing","fontSize","color","foreground","lineHeight"],"sourceRoot":"../../../../../src","sources":["components/typography/variants/body-sm.tsx"],"mappings":";;AACA,SAASA,eAAe,QAAQ,qCAAkC;AAElE,OAAO,SAASC,oBAAoBA,CAAA,EAAc;EAChD,OAAOD,eAAe,CACpB,CAAC;IAAEE,MAAM;IAAEC,UAAU;IAAEC,aAAa;IAAEC;EAAS,CAAC,MAAiB;IAC/DC,KAAK,EAAEJ,MAAM,CAACK,UAAU;IACxBF,QAAQ,EAAEA,QAAQ,GAAG,KAAK;IAC1BF,UAAU;IACVC,aAAa;IACbI,UAAU,EAAEH,QAAQ,GAAG;EACzB,CAAC,CACH,CAAC;AACH","ignoreList":[]}
@@ -1,19 +0,0 @@
1
- "use strict";
2
-
3
- import { useThemedStyles } from "../../../utils/use-themed-styles.js";
4
- export function useTextVariantHeadingLg() {
5
- return useThemedStyles(({
6
- colors,
7
- fontFamily,
8
- letterSpacing,
9
- fontSize
10
- }) => ({
11
- color: colors.foreground,
12
- fontSize: fontSize * 1.5,
13
- fontFamily,
14
- letterSpacing,
15
- fontWeight: "600",
16
- lineHeight: fontSize * 1.75
17
- }));
18
- }
19
- //# sourceMappingURL=heading-lg.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["useThemedStyles","useTextVariantHeadingLg","colors","fontFamily","letterSpacing","fontSize","color","foreground","fontWeight","lineHeight"],"sourceRoot":"../../../../../src","sources":["components/typography/variants/heading-lg.tsx"],"mappings":";;AACA,SAASA,eAAe,QAAQ,qCAAkC;AAElE,OAAO,SAASC,uBAAuBA,CAAA,EAAc;EACnD,OAAOD,eAAe,CACpB,CAAC;IAAEE,MAAM;IAAEC,UAAU;IAAEC,aAAa;IAAEC;EAAS,CAAC,MAAiB;IAC/DC,KAAK,EAAEJ,MAAM,CAACK,UAAU;IACxBF,QAAQ,EAAEA,QAAQ,GAAG,GAAG;IACxBF,UAAU;IACVC,aAAa;IACbI,UAAU,EAAE,KAAK;IACjBC,UAAU,EAAEJ,QAAQ,GAAG;EACzB,CAAC,CACH,CAAC;AACH","ignoreList":[]}
@@ -1,19 +0,0 @@
1
- "use strict";
2
-
3
- import { useThemedStyles } from "../../../utils/use-themed-styles.js";
4
- export function useTextVariantHeadingMd() {
5
- return useThemedStyles(({
6
- colors,
7
- fontFamily,
8
- letterSpacing,
9
- fontSize
10
- }) => ({
11
- color: colors.foreground,
12
- fontSize: fontSize * 1.25,
13
- fontFamily,
14
- letterSpacing,
15
- fontWeight: "600",
16
- lineHeight: fontSize * 1.5
17
- }));
18
- }
19
- //# sourceMappingURL=heading-md.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["useThemedStyles","useTextVariantHeadingMd","colors","fontFamily","letterSpacing","fontSize","color","foreground","fontWeight","lineHeight"],"sourceRoot":"../../../../../src","sources":["components/typography/variants/heading-md.tsx"],"mappings":";;AACA,SAASA,eAAe,QAAQ,qCAAkC;AAElE,OAAO,SAASC,uBAAuBA,CAAA,EAAc;EACnD,OAAOD,eAAe,CACpB,CAAC;IAAEE,MAAM;IAAEC,UAAU;IAAEC,aAAa;IAAEC;EAAS,CAAC,MAAiB;IAC/DC,KAAK,EAAEJ,MAAM,CAACK,UAAU;IACxBF,QAAQ,EAAEA,QAAQ,GAAG,IAAI;IACzBF,UAAU;IACVC,aAAa;IACbI,UAAU,EAAE,KAAK;IACjBC,UAAU,EAAEJ,QAAQ,GAAG;EACzB,CAAC,CACH,CAAC;AACH","ignoreList":[]}
@@ -1,19 +0,0 @@
1
- "use strict";
2
-
3
- import { useThemedStyles } from "../../../utils/use-themed-styles.js";
4
- export function useTextVariantHeadingSm() {
5
- return useThemedStyles(({
6
- colors,
7
- fontFamily,
8
- letterSpacing,
9
- fontSize
10
- }) => ({
11
- color: colors.foreground,
12
- fontSize,
13
- fontFamily,
14
- letterSpacing,
15
- fontWeight: "600",
16
- lineHeight: fontSize * 1.2
17
- }));
18
- }
19
- //# sourceMappingURL=heading-sm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["useThemedStyles","useTextVariantHeadingSm","colors","fontFamily","letterSpacing","fontSize","color","foreground","fontWeight","lineHeight"],"sourceRoot":"../../../../../src","sources":["components/typography/variants/heading-sm.tsx"],"mappings":";;AACA,SAASA,eAAe,QAAQ,qCAAkC;AAElE,OAAO,SAASC,uBAAuBA,CAAA,EAAc;EACnD,OAAOD,eAAe,CACpB,CAAC;IAAEE,MAAM;IAAEC,UAAU;IAAEC,aAAa;IAAEC;EAAS,CAAC,MAAiB;IAC/DC,KAAK,EAAEJ,MAAM,CAACK,UAAU;IACxBF,QAAQ;IACRF,UAAU;IACVC,aAAa;IACbI,UAAU,EAAE,KAAK;IACjBC,UAAU,EAAEJ,QAAQ,GAAG;EACzB,CAAC,CACH,CAAC;AACH","ignoreList":[]}
@@ -1,3 +0,0 @@
1
- import { type TextStyle } from "react-native";
2
- export declare function useTextVariantBodyLg(): TextStyle;
3
- //# sourceMappingURL=body-lg.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"body-lg.d.ts","sourceRoot":"","sources":["../../../../../../src/components/typography/variants/body-lg.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAG9C,wBAAgB,oBAAoB,IAAI,SAAS,CAUhD"}
@@ -1,3 +0,0 @@
1
- import { type TextStyle } from "react-native";
2
- export declare function useTextVariantBodyMd(): TextStyle;
3
- //# sourceMappingURL=body-md.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"body-md.d.ts","sourceRoot":"","sources":["../../../../../../src/components/typography/variants/body-md.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAG9C,wBAAgB,oBAAoB,IAAI,SAAS,CAUhD"}
@@ -1,3 +0,0 @@
1
- import { type TextStyle } from "react-native";
2
- export declare function useTextVariantBodySm(): TextStyle;
3
- //# sourceMappingURL=body-sm.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"body-sm.d.ts","sourceRoot":"","sources":["../../../../../../src/components/typography/variants/body-sm.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAG9C,wBAAgB,oBAAoB,IAAI,SAAS,CAUhD"}
@@ -1,3 +0,0 @@
1
- import { type TextStyle } from "react-native";
2
- export declare function useTextVariantHeadingLg(): TextStyle;
3
- //# sourceMappingURL=heading-lg.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"heading-lg.d.ts","sourceRoot":"","sources":["../../../../../../src/components/typography/variants/heading-lg.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAG9C,wBAAgB,uBAAuB,IAAI,SAAS,CAWnD"}
@@ -1,3 +0,0 @@
1
- import { type TextStyle } from "react-native";
2
- export declare function useTextVariantHeadingMd(): TextStyle;
3
- //# sourceMappingURL=heading-md.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"heading-md.d.ts","sourceRoot":"","sources":["../../../../../../src/components/typography/variants/heading-md.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAG9C,wBAAgB,uBAAuB,IAAI,SAAS,CAWnD"}
@@ -1,3 +0,0 @@
1
- import { type TextStyle } from "react-native";
2
- export declare function useTextVariantHeadingSm(): TextStyle;
3
- //# sourceMappingURL=heading-sm.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"heading-sm.d.ts","sourceRoot":"","sources":["../../../../../../src/components/typography/variants/heading-sm.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAG9C,wBAAgB,uBAAuB,IAAI,SAAS,CAWnD"}
@@ -1,14 +0,0 @@
1
- import { type TextStyle } from "react-native";
2
- import { useThemedStyles } from "../../../utils/use-themed-styles";
3
-
4
- export function useTextVariantBodyLg(): TextStyle {
5
- return useThemedStyles(
6
- ({ colors, fontFamily, letterSpacing, fontSize }): TextStyle => ({
7
- color: colors.foreground,
8
- fontSize: fontSize * 1.25,
9
- fontFamily,
10
- letterSpacing,
11
- lineHeight: fontSize * 1.5,
12
- }),
13
- );
14
- }
@@ -1,14 +0,0 @@
1
- import { type TextStyle } from "react-native";
2
- import { useThemedStyles } from "../../../utils/use-themed-styles";
3
-
4
- export function useTextVariantBodyMd(): TextStyle {
5
- return useThemedStyles(
6
- ({ colors, fontFamily, letterSpacing, fontSize }): TextStyle => ({
7
- color: colors.foreground,
8
- fontSize,
9
- fontFamily,
10
- letterSpacing,
11
- lineHeight: fontSize * 1.5,
12
- }),
13
- );
14
- }
@@ -1,14 +0,0 @@
1
- import { type TextStyle } from "react-native";
2
- import { useThemedStyles } from "../../../utils/use-themed-styles";
3
-
4
- export function useTextVariantBodySm(): TextStyle {
5
- return useThemedStyles(
6
- ({ colors, fontFamily, letterSpacing, fontSize }): TextStyle => ({
7
- color: colors.foreground,
8
- fontSize: fontSize * 0.875,
9
- fontFamily,
10
- letterSpacing,
11
- lineHeight: fontSize * 1.5,
12
- }),
13
- );
14
- }
@@ -1,15 +0,0 @@
1
- import { type TextStyle } from "react-native";
2
- import { useThemedStyles } from "../../../utils/use-themed-styles";
3
-
4
- export function useTextVariantHeadingLg(): TextStyle {
5
- return useThemedStyles(
6
- ({ colors, fontFamily, letterSpacing, fontSize }): TextStyle => ({
7
- color: colors.foreground,
8
- fontSize: fontSize * 1.5,
9
- fontFamily,
10
- letterSpacing,
11
- fontWeight: "600",
12
- lineHeight: fontSize * 1.75,
13
- }),
14
- );
15
- }
@@ -1,15 +0,0 @@
1
- import { type TextStyle } from "react-native";
2
- import { useThemedStyles } from "../../../utils/use-themed-styles";
3
-
4
- export function useTextVariantHeadingMd(): TextStyle {
5
- return useThemedStyles(
6
- ({ colors, fontFamily, letterSpacing, fontSize }): TextStyle => ({
7
- color: colors.foreground,
8
- fontSize: fontSize * 1.25,
9
- fontFamily,
10
- letterSpacing,
11
- fontWeight: "600",
12
- lineHeight: fontSize * 1.5,
13
- }),
14
- );
15
- }
@@ -1,15 +0,0 @@
1
- import { type TextStyle } from "react-native";
2
- import { useThemedStyles } from "../../../utils/use-themed-styles";
3
-
4
- export function useTextVariantHeadingSm(): TextStyle {
5
- return useThemedStyles(
6
- ({ colors, fontFamily, letterSpacing, fontSize }): TextStyle => ({
7
- color: colors.foreground,
8
- fontSize,
9
- fontFamily,
10
- letterSpacing,
11
- fontWeight: "600",
12
- lineHeight: fontSize * 1.2,
13
- }),
14
- );
15
- }