@medway-ui/native 1.9.2 → 1.10.1

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 (297) hide show
  1. package/README.md +2 -2
  2. package/lib/commonjs/components/Alert.js +36 -25
  3. package/lib/commonjs/components/Alert.js.map +1 -1
  4. package/lib/commonjs/components/AlertDialog.js +22 -23
  5. package/lib/commonjs/components/AlertDialog.js.map +1 -1
  6. package/lib/commonjs/components/Avatar.js +4 -4
  7. package/lib/commonjs/components/Badge.js +22 -15
  8. package/lib/commonjs/components/Badge.js.map +1 -1
  9. package/lib/commonjs/components/Button.js +56 -42
  10. package/lib/commonjs/components/Button.js.map +1 -1
  11. package/lib/commonjs/components/CardNews.js +18 -13
  12. package/lib/commonjs/components/CardNews.js.map +1 -1
  13. package/lib/commonjs/components/Carousel.js +12 -8
  14. package/lib/commonjs/components/Carousel.js.map +1 -1
  15. package/lib/commonjs/components/Checkbox.js +5 -5
  16. package/lib/commonjs/components/Checkbox.js.map +1 -1
  17. package/lib/commonjs/components/Chip.js +52 -23
  18. package/lib/commonjs/components/Chip.js.map +1 -1
  19. package/lib/commonjs/components/Choice.js +26 -12
  20. package/lib/commonjs/components/Choice.js.map +1 -1
  21. package/lib/commonjs/components/Dialog.js +16 -8
  22. package/lib/commonjs/components/Dialog.js.map +1 -1
  23. package/lib/commonjs/components/DropdownMenu.js +35 -14
  24. package/lib/commonjs/components/DropdownMenu.js.map +1 -1
  25. package/lib/commonjs/components/EmptyState.js +5 -5
  26. package/lib/commonjs/components/EmptyState.js.map +1 -1
  27. package/lib/commonjs/components/FallbackImage.js +42 -35
  28. package/lib/commonjs/components/FallbackImage.js.map +1 -1
  29. package/lib/commonjs/components/Feed.js +6 -5
  30. package/lib/commonjs/components/Feed.js.map +1 -1
  31. package/lib/commonjs/components/FeedNotice.js +3 -3
  32. package/lib/commonjs/components/Feedback.js +2 -4
  33. package/lib/commonjs/components/Feedback.js.map +1 -1
  34. package/lib/commonjs/components/Filter.js +6 -9
  35. package/lib/commonjs/components/Filter.js.map +1 -1
  36. package/lib/commonjs/components/IndexLevel.js +4 -4
  37. package/lib/commonjs/components/Input.js +25 -20
  38. package/lib/commonjs/components/Input.js.map +1 -1
  39. package/lib/commonjs/components/InvitePopover.js +19 -8
  40. package/lib/commonjs/components/InvitePopover.js.map +1 -1
  41. package/lib/commonjs/components/Label.js +2 -2
  42. package/lib/commonjs/components/LeaderboardCard.js +3 -2
  43. package/lib/commonjs/components/LeaderboardCard.js.map +1 -1
  44. package/lib/commonjs/components/Loading.js +18 -15
  45. package/lib/commonjs/components/Loading.js.map +1 -1
  46. package/lib/commonjs/components/LoadingOverlay.js +36 -43
  47. package/lib/commonjs/components/LoadingOverlay.js.map +1 -1
  48. package/lib/commonjs/components/MemberRow.js +7 -6
  49. package/lib/commonjs/components/MemberRow.js.map +1 -1
  50. package/lib/commonjs/components/PageHeader.js +3 -2
  51. package/lib/commonjs/components/PageHeader.js.map +1 -1
  52. package/lib/commonjs/components/Popover.js +1 -1
  53. package/lib/commonjs/components/PostForm.js +38 -24
  54. package/lib/commonjs/components/PostForm.js.map +1 -1
  55. package/lib/commonjs/components/PrizeCollection.js +5 -5
  56. package/lib/commonjs/components/PrizeCollection.js.map +1 -1
  57. package/lib/commonjs/components/RadioGroup.js +65 -15
  58. package/lib/commonjs/components/RadioGroup.js.map +1 -1
  59. package/lib/commonjs/components/SectionHeader.js +3 -2
  60. package/lib/commonjs/components/SectionHeader.js.map +1 -1
  61. package/lib/commonjs/components/SegmentControl.js +4 -4
  62. package/lib/commonjs/components/Select.js +7 -6
  63. package/lib/commonjs/components/Select.js.map +1 -1
  64. package/lib/commonjs/components/Separator.js +2 -2
  65. package/lib/commonjs/components/Separator.js.map +1 -1
  66. package/lib/commonjs/components/Sheet.js +17 -11
  67. package/lib/commonjs/components/Sheet.js.map +1 -1
  68. package/lib/commonjs/components/Skeleton.js +2 -2
  69. package/lib/commonjs/components/Skeleton.js.map +1 -1
  70. package/lib/commonjs/components/Switch.js +3 -3
  71. package/lib/commonjs/components/Tabs.js +3 -2
  72. package/lib/commonjs/components/Tabs.js.map +1 -1
  73. package/lib/commonjs/components/Tag.js +52 -32
  74. package/lib/commonjs/components/Tag.js.map +1 -1
  75. package/lib/commonjs/components/Text.js +1 -1
  76. package/lib/commonjs/components/ThemedIcon.js +1 -1
  77. package/lib/commonjs/components/Toast.js +12 -12
  78. package/lib/commonjs/components/Toast.js.map +1 -1
  79. package/lib/commonjs/components/Tooltip.js +2 -2
  80. package/lib/commonjs/editor/NoteEditor.js +190 -67
  81. package/lib/commonjs/editor/NoteEditor.js.map +1 -1
  82. package/lib/commonjs/editor/editorHtml.generated.js +1 -1
  83. package/lib/commonjs/editor/editorHtml.generated.js.map +1 -1
  84. package/lib/commonjs/editor/index.js.map +1 -1
  85. package/lib/commonjs/editor/protocol.js +1 -2
  86. package/lib/commonjs/editor/protocol.js.map +1 -1
  87. package/lib/commonjs/hooks/useThemeColor.js +41 -19
  88. package/lib/commonjs/hooks/useThemeColor.js.map +1 -1
  89. package/lib/commonjs/index.js +46 -46
  90. package/lib/commonjs/lib/backdrop.js +18 -0
  91. package/lib/commonjs/lib/backdrop.js.map +1 -0
  92. package/lib/commonjs/lib/overlay-host.js +5 -3
  93. package/lib/commonjs/lib/overlay-host.js.map +1 -1
  94. package/lib/commonjs/lib/raised-surface.js +1 -1
  95. package/lib/module/components/Alert.js +36 -25
  96. package/lib/module/components/Alert.js.map +1 -1
  97. package/lib/module/components/AlertDialog.js +21 -22
  98. package/lib/module/components/AlertDialog.js.map +1 -1
  99. package/lib/module/components/Avatar.js +4 -4
  100. package/lib/module/components/Badge.js +22 -15
  101. package/lib/module/components/Badge.js.map +1 -1
  102. package/lib/module/components/Button.js +56 -42
  103. package/lib/module/components/Button.js.map +1 -1
  104. package/lib/module/components/CardNews.js +18 -13
  105. package/lib/module/components/CardNews.js.map +1 -1
  106. package/lib/module/components/Carousel.js +12 -8
  107. package/lib/module/components/Carousel.js.map +1 -1
  108. package/lib/module/components/Checkbox.js +5 -5
  109. package/lib/module/components/Checkbox.js.map +1 -1
  110. package/lib/module/components/Chip.js +52 -23
  111. package/lib/module/components/Chip.js.map +1 -1
  112. package/lib/module/components/Choice.js +26 -12
  113. package/lib/module/components/Choice.js.map +1 -1
  114. package/lib/module/components/Dialog.js +16 -8
  115. package/lib/module/components/Dialog.js.map +1 -1
  116. package/lib/module/components/DropdownMenu.js +36 -15
  117. package/lib/module/components/DropdownMenu.js.map +1 -1
  118. package/lib/module/components/EmptyState.js +5 -5
  119. package/lib/module/components/EmptyState.js.map +1 -1
  120. package/lib/module/components/FallbackImage.js +42 -35
  121. package/lib/module/components/FallbackImage.js.map +1 -1
  122. package/lib/module/components/Feed.js +6 -5
  123. package/lib/module/components/Feed.js.map +1 -1
  124. package/lib/module/components/FeedNotice.js +3 -3
  125. package/lib/module/components/Feedback.js +2 -4
  126. package/lib/module/components/Feedback.js.map +1 -1
  127. package/lib/module/components/Filter.js +6 -9
  128. package/lib/module/components/Filter.js.map +1 -1
  129. package/lib/module/components/IndexLevel.js +4 -4
  130. package/lib/module/components/Input.js +24 -18
  131. package/lib/module/components/Input.js.map +1 -1
  132. package/lib/module/components/InvitePopover.js +20 -9
  133. package/lib/module/components/InvitePopover.js.map +1 -1
  134. package/lib/module/components/Label.js +2 -2
  135. package/lib/module/components/LeaderboardCard.js +3 -2
  136. package/lib/module/components/LeaderboardCard.js.map +1 -1
  137. package/lib/module/components/Loading.js +18 -15
  138. package/lib/module/components/Loading.js.map +1 -1
  139. package/lib/module/components/LoadingOverlay.js +37 -44
  140. package/lib/module/components/LoadingOverlay.js.map +1 -1
  141. package/lib/module/components/MemberRow.js +7 -6
  142. package/lib/module/components/MemberRow.js.map +1 -1
  143. package/lib/module/components/PageHeader.js +3 -2
  144. package/lib/module/components/PageHeader.js.map +1 -1
  145. package/lib/module/components/Popover.js +1 -1
  146. package/lib/module/components/PostForm.js +38 -24
  147. package/lib/module/components/PostForm.js.map +1 -1
  148. package/lib/module/components/PrizeCollection.js +5 -5
  149. package/lib/module/components/PrizeCollection.js.map +1 -1
  150. package/lib/module/components/RadioGroup.js +65 -15
  151. package/lib/module/components/RadioGroup.js.map +1 -1
  152. package/lib/module/components/SectionHeader.js +3 -2
  153. package/lib/module/components/SectionHeader.js.map +1 -1
  154. package/lib/module/components/SegmentControl.js +4 -4
  155. package/lib/module/components/Select.js +6 -5
  156. package/lib/module/components/Select.js.map +1 -1
  157. package/lib/module/components/Separator.js +2 -2
  158. package/lib/module/components/Separator.js.map +1 -1
  159. package/lib/module/components/Sheet.js +17 -11
  160. package/lib/module/components/Sheet.js.map +1 -1
  161. package/lib/module/components/Skeleton.js +2 -2
  162. package/lib/module/components/Skeleton.js.map +1 -1
  163. package/lib/module/components/Switch.js +3 -3
  164. package/lib/module/components/Tabs.js +3 -2
  165. package/lib/module/components/Tabs.js.map +1 -1
  166. package/lib/module/components/Tag.js +52 -32
  167. package/lib/module/components/Tag.js.map +1 -1
  168. package/lib/module/components/Text.js +1 -1
  169. package/lib/module/components/ThemedIcon.js +1 -1
  170. package/lib/module/components/Toast.js +12 -12
  171. package/lib/module/components/Toast.js.map +1 -1
  172. package/lib/module/components/Tooltip.js +2 -2
  173. package/lib/module/editor/NoteEditor.js +193 -69
  174. package/lib/module/editor/NoteEditor.js.map +1 -1
  175. package/lib/module/editor/editorHtml.generated.js +1 -1
  176. package/lib/module/editor/editorHtml.generated.js.map +1 -1
  177. package/lib/module/editor/index.js.map +1 -1
  178. package/lib/module/editor/protocol.js +1 -2
  179. package/lib/module/editor/protocol.js.map +1 -1
  180. package/lib/module/hooks/useThemeColor.js +41 -19
  181. package/lib/module/hooks/useThemeColor.js.map +1 -1
  182. package/lib/module/index.js +46 -46
  183. package/lib/module/lib/backdrop.js +15 -0
  184. package/lib/module/lib/backdrop.js.map +1 -0
  185. package/lib/module/lib/overlay-host.js +6 -4
  186. package/lib/module/lib/overlay-host.js.map +1 -1
  187. package/lib/module/lib/raised-surface.js +1 -1
  188. package/lib/typescript/components/Alert.d.ts +1 -1
  189. package/lib/typescript/components/Alert.d.ts.map +1 -1
  190. package/lib/typescript/components/AlertDialog.d.ts +1 -1
  191. package/lib/typescript/components/AlertDialog.d.ts.map +1 -1
  192. package/lib/typescript/components/Badge.d.ts.map +1 -1
  193. package/lib/typescript/components/Button.d.ts +1 -0
  194. package/lib/typescript/components/Button.d.ts.map +1 -1
  195. package/lib/typescript/components/CardNews.d.ts +7 -2
  196. package/lib/typescript/components/CardNews.d.ts.map +1 -1
  197. package/lib/typescript/components/Checkbox.d.ts +3 -1
  198. package/lib/typescript/components/Checkbox.d.ts.map +1 -1
  199. package/lib/typescript/components/Chip.d.ts.map +1 -1
  200. package/lib/typescript/components/Choice.d.ts +4 -1
  201. package/lib/typescript/components/Choice.d.ts.map +1 -1
  202. package/lib/typescript/components/Dialog.d.ts +2 -1
  203. package/lib/typescript/components/Dialog.d.ts.map +1 -1
  204. package/lib/typescript/components/DropdownMenu.d.ts +3 -2
  205. package/lib/typescript/components/DropdownMenu.d.ts.map +1 -1
  206. package/lib/typescript/components/FallbackImage.d.ts.map +1 -1
  207. package/lib/typescript/components/Feed.d.ts.map +1 -1
  208. package/lib/typescript/components/Feedback.d.ts.map +1 -1
  209. package/lib/typescript/components/Filter.d.ts.map +1 -1
  210. package/lib/typescript/components/IndexLevel.d.ts +1 -1
  211. package/lib/typescript/components/Input.d.ts +5 -5
  212. package/lib/typescript/components/Input.d.ts.map +1 -1
  213. package/lib/typescript/components/InvitePopover.d.ts +1 -1
  214. package/lib/typescript/components/InvitePopover.d.ts.map +1 -1
  215. package/lib/typescript/components/LeaderboardCard.d.ts.map +1 -1
  216. package/lib/typescript/components/Loading.d.ts +1 -1
  217. package/lib/typescript/components/Loading.d.ts.map +1 -1
  218. package/lib/typescript/components/LoadingOverlay.d.ts +9 -9
  219. package/lib/typescript/components/LoadingOverlay.d.ts.map +1 -1
  220. package/lib/typescript/components/PageHeader.d.ts.map +1 -1
  221. package/lib/typescript/components/PostForm.d.ts.map +1 -1
  222. package/lib/typescript/components/RadioGroup.d.ts +4 -2
  223. package/lib/typescript/components/RadioGroup.d.ts.map +1 -1
  224. package/lib/typescript/components/SectionHeader.d.ts.map +1 -1
  225. package/lib/typescript/components/SegmentControl.d.ts +1 -1
  226. package/lib/typescript/components/Select.d.ts +2 -1
  227. package/lib/typescript/components/Select.d.ts.map +1 -1
  228. package/lib/typescript/components/Separator.d.ts.map +1 -1
  229. package/lib/typescript/components/Sheet.d.ts +2 -1
  230. package/lib/typescript/components/Sheet.d.ts.map +1 -1
  231. package/lib/typescript/components/Tabs.d.ts +4 -3
  232. package/lib/typescript/components/Tabs.d.ts.map +1 -1
  233. package/lib/typescript/components/Tag.d.ts +3 -1
  234. package/lib/typescript/components/Tag.d.ts.map +1 -1
  235. package/lib/typescript/components/ThemedIcon.d.ts +1 -1
  236. package/lib/typescript/components/Toast.d.ts +1 -1
  237. package/lib/typescript/components/Toast.d.ts.map +1 -1
  238. package/lib/typescript/editor/NoteEditor.d.ts +28 -8
  239. package/lib/typescript/editor/NoteEditor.d.ts.map +1 -1
  240. package/lib/typescript/editor/editorHtml.generated.d.ts.map +1 -1
  241. package/lib/typescript/editor/index.d.ts +1 -1
  242. package/lib/typescript/editor/index.d.ts.map +1 -1
  243. package/lib/typescript/editor/protocol.d.ts +4 -14
  244. package/lib/typescript/editor/protocol.d.ts.map +1 -1
  245. package/lib/typescript/hooks/use-toast.d.ts +1 -1
  246. package/lib/typescript/hooks/useThemeColor.d.ts.map +1 -1
  247. package/lib/typescript/index.d.ts +91 -91
  248. package/lib/typescript/index.d.ts.map +1 -1
  249. package/lib/typescript/lib/backdrop.d.ts +4 -0
  250. package/lib/typescript/lib/backdrop.d.ts.map +1 -0
  251. package/lib/typescript/lib/overlay-host.d.ts +1 -0
  252. package/lib/typescript/lib/overlay-host.d.ts.map +1 -1
  253. package/package.json +9 -14
  254. package/setup/tailwind.js +16 -8
  255. package/setup/tokens.native.css +181 -80
  256. package/src/components/Alert.tsx +37 -20
  257. package/src/components/AlertDialog.tsx +18 -19
  258. package/src/components/Badge.tsx +16 -15
  259. package/src/components/Button.tsx +64 -31
  260. package/src/components/CardNews.tsx +17 -6
  261. package/src/components/Carousel.tsx +5 -5
  262. package/src/components/Checkbox.tsx +17 -7
  263. package/src/components/Chip.tsx +49 -21
  264. package/src/components/Choice.tsx +34 -14
  265. package/src/components/Dialog.tsx +15 -5
  266. package/src/components/DropdownMenu.tsx +62 -14
  267. package/src/components/EmptyState.tsx +3 -3
  268. package/src/components/FallbackImage.tsx +32 -23
  269. package/src/components/Feed.tsx +2 -1
  270. package/src/components/Feedback.tsx +0 -1
  271. package/src/components/Filter.tsx +2 -3
  272. package/src/components/Input.tsx +83 -64
  273. package/src/components/InvitePopover.tsx +11 -3
  274. package/src/components/LeaderboardCard.tsx +4 -1
  275. package/src/components/Loading.tsx +17 -14
  276. package/src/components/LoadingOverlay.tsx +33 -50
  277. package/src/components/MemberRow.tsx +3 -3
  278. package/src/components/PageHeader.tsx +4 -1
  279. package/src/components/PostForm.tsx +28 -16
  280. package/src/components/PrizeCollection.tsx +3 -3
  281. package/src/components/RadioGroup.tsx +69 -12
  282. package/src/components/SectionHeader.tsx +4 -1
  283. package/src/components/Select.tsx +4 -3
  284. package/src/components/Separator.tsx +2 -2
  285. package/src/components/Sheet.tsx +15 -8
  286. package/src/components/Skeleton.tsx +1 -1
  287. package/src/components/Tabs.tsx +5 -4
  288. package/src/components/Tag.tsx +56 -35
  289. package/src/components/Toast.tsx +10 -6
  290. package/src/editor/NoteEditor.tsx +246 -72
  291. package/src/editor/editorHtml.generated.ts +1 -1
  292. package/src/editor/index.ts +8 -4
  293. package/src/editor/protocol.ts +4 -12
  294. package/src/hooks/useThemeColor.ts +41 -19
  295. package/src/index.ts +1 -1
  296. package/src/lib/backdrop.ts +16 -0
  297. package/src/lib/overlay-host.tsx +5 -5
@@ -14,51 +14,59 @@ const tagVariants = cva(
14
14
  "flex-row items-center justify-center rounded-md px-2 py-1 gap-1.5 max-h-6 overflow-hidden shrink-0",
15
15
  {
16
16
  variants: {
17
+ size: {
18
+ sm: "",
19
+ md: "px-2.5 py-1.5 gap-2 max-h-8",
20
+ },
17
21
  variant: {
18
22
  regular: "bg-primary-background-fill",
19
23
  "regular-soft": "bg-primary-background-soft",
20
- "regular-basic": "bg-transparent",
24
+ "regular-basic": "bg-transparent p-0",
21
25
  emphasis: "bg-secondary-background-fill",
22
26
  "emphasis-soft": "bg-secondary-background-soft",
23
- "emphasis-basic": "bg-transparent",
27
+ "emphasis-basic": "bg-transparent p-0",
24
28
  gray: "bg-gray-background-fill",
25
29
  "gray-soft": "bg-gray-background-soft",
26
- "gray-basic": "bg-transparent",
27
- success: "bg-green-background-fill",
28
- "success-soft": "bg-green-background-soft",
29
- "success-basic": "bg-transparent",
30
- error: "bg-red-background-fill",
31
- "error-soft": "bg-red-background-soft",
32
- "error-basic": "bg-transparent",
33
- warning: "bg-yellow-background-fill",
34
- "warning-soft": "bg-yellow-background-soft",
35
- "warning-basic": "bg-transparent",
30
+ "gray-basic": "bg-transparent p-0",
31
+ success: "bg-feedback-success-background-fill",
32
+ "success-soft": "bg-feedback-success-background-soft",
33
+ "success-basic": "bg-transparent p-0",
34
+ error: "bg-feedback-error-background-fill",
35
+ "error-soft": "bg-feedback-error-background-soft",
36
+ "error-basic": "bg-transparent p-0",
37
+ warning: "bg-feedback-warning-background-fill",
38
+ "warning-soft": "bg-feedback-warning-background-soft",
39
+ "warning-basic": "bg-transparent p-0",
36
40
  cm: "bg-cm-background-fill",
37
41
  "cm-soft": "bg-cm-background-soft",
38
- "cm-basic": "bg-transparent",
42
+ "cm-basic": "bg-transparent p-0",
39
43
  go: "bg-go-background-fill",
40
44
  "go-soft": "bg-go-background-soft",
41
- "go-basic": "bg-transparent",
45
+ "go-basic": "bg-transparent p-0",
42
46
  cir: "bg-cir-background-fill",
43
47
  "cir-soft": "bg-cir-background-soft",
44
- "cir-basic": "bg-transparent",
48
+ "cir-basic": "bg-transparent p-0",
45
49
  ped: "bg-ped-background-fill",
46
50
  "ped-soft": "bg-ped-background-soft",
47
- "ped-basic": "bg-transparent",
51
+ "ped-basic": "bg-transparent p-0",
48
52
  prev: "bg-prev-background-fill",
49
53
  "prev-soft": "bg-prev-background-soft",
50
- "prev-basic": "bg-transparent",
54
+ "prev-basic": "bg-transparent p-0",
51
55
  ia: "bg-secondary-background-fill",
52
56
  "ia-soft": "bg-secondary-background-soft",
53
- "ia-basic": "bg-transparent",
57
+ "ia-basic": "bg-transparent p-0",
54
58
  },
55
59
  },
56
- defaultVariants: { variant: "regular" },
60
+ defaultVariants: { size: "sm", variant: "regular" },
57
61
  }
58
62
  );
59
63
 
60
64
  const tagTextVariants = cva("text-xs font-semibold", {
61
65
  variants: {
66
+ size: {
67
+ sm: "",
68
+ md: "text-sm leading-sm",
69
+ },
62
70
  variant: {
63
71
  regular: "text-primary-foreground-onfill",
64
72
  "regular-soft": "text-primary-foreground",
@@ -69,15 +77,15 @@ const tagTextVariants = cva("text-xs font-semibold", {
69
77
  gray: "text-gray-foreground-onfill",
70
78
  "gray-soft": "text-gray-foreground",
71
79
  "gray-basic": "text-gray-foreground",
72
- success: "text-green-foreground-onfill",
73
- "success-soft": "text-green-foreground",
74
- "success-basic": "text-green-foreground",
75
- error: "text-red-foreground-onfill",
76
- "error-soft": "text-red-foreground",
77
- "error-basic": "text-red-foreground",
78
- warning: "text-yellow-foreground-onfill",
79
- "warning-soft": "text-yellow-foreground",
80
- "warning-basic": "text-yellow-foreground",
80
+ success: "text-feedback-success-foreground-onfill",
81
+ "success-soft": "text-feedback-success-foreground",
82
+ "success-basic": "text-feedback-success-foreground",
83
+ error: "text-feedback-error-foreground-onfill",
84
+ "error-soft": "text-feedback-error-foreground",
85
+ "error-basic": "text-feedback-error-foreground",
86
+ warning: "text-feedback-warning-foreground-onfill",
87
+ "warning-soft": "text-feedback-warning-foreground",
88
+ "warning-basic": "text-feedback-warning-foreground",
81
89
  cm: "text-cm-foreground-onfill",
82
90
  "cm-soft": "text-cm-foreground",
83
91
  "cm-basic": "text-cm-foreground",
@@ -98,18 +106,31 @@ const tagTextVariants = cva("text-xs font-semibold", {
98
106
  "ia-basic": "text-secondary-foreground",
99
107
  },
100
108
  },
101
- defaultVariants: { variant: "regular" },
109
+ defaultVariants: { size: "sm", variant: "regular" },
102
110
  });
103
111
 
104
- function TagIcon({ icon }: { icon?: ReactNode }) {
105
- return <View className="w-3.5 h-3.5 items-center justify-center">{icon}</View>;
112
+ type TagSize = NonNullable<VariantProps<typeof tagVariants>["size"]>;
113
+
114
+ const TAG_ICON_SIZE_CLASS_NAME: Record<TagSize, string> = {
115
+ sm: "w-3.5 h-3.5",
116
+ md: "w-5 h-5",
117
+ };
118
+
119
+ function TagIcon({ icon, size }: { icon?: ReactNode; size: TagSize }) {
120
+ return (
121
+ <View className={cn(TAG_ICON_SIZE_CLASS_NAME[size], "items-center justify-center")}>
122
+ {icon}
123
+ </View>
124
+ );
106
125
  }
107
126
 
108
- function Tag({ className, variant, icon, children, ...props }: TagProps) {
127
+ function Tag({ className, variant, size, icon, children, ...props }: TagProps) {
109
128
  return (
110
- <View className={cn(tagVariants({ variant }), className)} {...props}>
111
- {icon && <TagIcon icon={icon} />}
112
- <Text className={cn(tagTextVariants({ variant }))}>{children}</Text>
129
+ <View className={cn(tagVariants({ size, variant }), className)} {...props}>
130
+ {icon && <TagIcon icon={icon} size={size ?? "sm"} />}
131
+ <Text numberOfLines={1} className={cn(tagTextVariants({ size, variant }))}>
132
+ {children}
133
+ </Text>
113
134
  </View>
114
135
  );
115
136
  }
@@ -109,7 +109,6 @@ const GRADIENT_STYLES: Record<ToastGradientVariant, GradientStyle> = {
109
109
  underlayClassName: "bg-white",
110
110
  },
111
111
  "gold-gradient": {
112
- // Literal hex from Figma replaced by podium tokens on web (#72)
113
112
  colorTokens: ["gold", "gold-lighten-6"],
114
113
  locations: [0.29, 1],
115
114
  angleDeg: 124,
@@ -318,9 +317,10 @@ function ToastClose({
318
317
  );
319
318
  }
320
319
 
320
+ const LinearGradient = loadLinearGradient();
321
+
321
322
  function ToastGradientFill({ variant }: { variant: ToastGradientVariant }) {
322
323
  const style = GRADIENT_STYLES[variant];
323
- const LinearGradient = loadLinearGradient();
324
324
  const borderRadius = useRadiusLg();
325
325
  const color0 = useThemeColor(style.colorTokens[0]);
326
326
  const color1 = useThemeColor(style.colorTokens[1]);
@@ -392,8 +392,8 @@ function ToastItem({
392
392
  const [visible, setVisible] = useState(open);
393
393
  const onOpenChangeRef = useRef(onOpenChange);
394
394
  onOpenChangeRef.current = onOpenChange;
395
- const translateY = useSharedValue(open ? 0 : -80);
396
- const opacity = useSharedValue(open ? 1 : 0);
395
+ const translateY = useSharedValue(-80);
396
+ const opacity = useSharedValue(0);
397
397
  const gradient = isGradientVariant(variant);
398
398
 
399
399
  const animatedStyle = useAnimatedStyle(() => ({
@@ -433,7 +433,11 @@ function ToastItem({
433
433
  return (
434
434
  <Animated.View style={animatedStyle}>
435
435
  <ToastContext.Provider value={{ variant, onOpenChange }}>
436
- <View className={containerClassName} {...props}>
436
+ <View
437
+ accessibilityLiveRegion="polite"
438
+ className={containerClassName}
439
+ {...props}
440
+ >
437
441
  {gradient ? <ToastGradientFill variant={variant} /> : null}
438
442
  {showIcon && resolvedIcon}
439
443
  <View className="min-w-0 flex-1 flex-row items-center justify-between gap-4">
@@ -474,7 +478,7 @@ function ToastAction({
474
478
  className,
475
479
  variant: variantProp,
476
480
  size = "sm",
477
- altText = "Toast action",
481
+ altText,
478
482
  children,
479
483
  loading,
480
484
  iconLeft,