@sincpro/mobile-ui 3.0.0 → 3.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 (308) hide show
  1. package/dist/Actions/Actions.Button.d.ts +6 -6
  2. package/dist/Actions/Actions.Button.js +650 -180
  3. package/dist/Actions/Actions.Dock.d.ts +1 -1
  4. package/dist/Actions/Actions.Dock.js +297 -18
  5. package/dist/Actions/Actions.FAB.js +100 -12
  6. package/dist/Actions/Actions.FilterButton.d.ts +17 -0
  7. package/dist/Actions/Actions.FilterButton.js +263 -33
  8. package/dist/Actions/Actions.IconButton.d.ts +1 -0
  9. package/dist/Actions/Actions.IconButton.js +196 -33
  10. package/dist/Actions/index.js +13 -13
  11. package/dist/Dialog/Confirmation.context.js +82 -16
  12. package/dist/Dialog/Dialog.ActionSheet.js +200 -41
  13. package/dist/Dialog/Dialog.Confirmation.js +168 -31
  14. package/dist/Dialog/Dialog.EditValue.js +449 -61
  15. package/dist/Dialog/Dialog.Sheet.d.ts +7 -3
  16. package/dist/Dialog/Dialog.Sheet.js +231 -15
  17. package/dist/Dialog/OverlayHost.d.ts +23 -0
  18. package/dist/Dialog/OverlayHost.js +196 -0
  19. package/dist/Dialog/SheetSurface.d.ts +24 -0
  20. package/dist/Dialog/SheetSurface.js +441 -0
  21. package/dist/Dialog/dialog-actions.d.ts +17 -0
  22. package/dist/Dialog/dialog-actions.js +59 -0
  23. package/dist/Dialog/index.d.ts +4 -1
  24. package/dist/Dialog/index.js +8 -7
  25. package/dist/Dialog/overlay.store.d.ts +24 -0
  26. package/dist/Dialog/overlay.store.js +59 -0
  27. package/dist/Dialog/requestConfirmation.js +20 -10
  28. package/dist/Display/Display.Accordion.js +185 -13
  29. package/dist/Display/Display.AmountSummary.js +206 -15
  30. package/dist/Display/Display.Avatar.js +93 -31
  31. package/dist/Display/Display.AvatarGroup.js +132 -17
  32. package/dist/Display/Display.Badge.d.ts +18 -2
  33. package/dist/Display/Display.Badge.js +117 -49
  34. package/dist/Display/Display.Card.js +163 -26
  35. package/dist/Display/Display.Carousel.js +459 -105
  36. package/dist/Display/Display.Chip.d.ts +4 -1
  37. package/dist/Display/Display.Chip.js +165 -31
  38. package/dist/Display/Display.CircleButton.d.ts +1 -0
  39. package/dist/Display/Display.CircleButton.js +86 -27
  40. package/dist/Display/Display.CopyableText.js +289 -66
  41. package/dist/Display/Display.CountRecords.js +60 -3
  42. package/dist/Display/Display.DataTable.js +123 -13
  43. package/dist/Display/Display.Date.js +243 -33
  44. package/dist/Display/Display.Divider.d.ts +10 -10
  45. package/dist/Display/Display.Divider.js +67 -20
  46. package/dist/Display/Display.ExpoImage.js +97 -8
  47. package/dist/Display/Display.GradientSurface.d.ts +9 -4
  48. package/dist/Display/Display.GradientSurface.js +196 -46
  49. package/dist/Display/Display.Icon.js +129 -15
  50. package/dist/Display/Display.IconBadge.js +95 -25
  51. package/dist/Display/Display.Image.d.ts +7 -1
  52. package/dist/Display/Display.Image.js +344 -39
  53. package/dist/Display/Display.KeyValue.js +90 -5
  54. package/dist/Display/Display.ListGroup.js +181 -9
  55. package/dist/Display/Display.ListItem.js +324 -28
  56. package/dist/Display/Display.Logo.js +84 -29
  57. package/dist/Display/Display.MediaCard.js +125 -4
  58. package/dist/Display/Display.MediaEmbed.d.ts +0 -5
  59. package/dist/Display/Display.MediaEmbed.js +170 -26
  60. package/dist/Display/Display.MenuButton.d.ts +2 -2
  61. package/dist/Display/Display.MenuButton.js +380 -94
  62. package/dist/Display/Display.MenuCard.js +122 -18
  63. package/dist/Display/Display.MenuGrid.js +43 -3
  64. package/dist/Display/Display.Monetary.js +90 -5
  65. package/dist/Display/Display.Pattern.js +306 -47
  66. package/dist/Display/Display.PriceTag.js +117 -14
  67. package/dist/Display/Display.ProductCard.js +154 -4
  68. package/dist/Display/Display.Rating.js +92 -11
  69. package/dist/Display/Display.SearchHistory.js +132 -6
  70. package/dist/Display/Display.SectionHeader.d.ts +5 -1
  71. package/dist/Display/Display.SectionHeader.js +125 -12
  72. package/dist/Display/Display.Stat.js +62 -3
  73. package/dist/Display/Display.StatCard.js +131 -7
  74. package/dist/Display/Display.StatusBadge.d.ts +29 -0
  75. package/dist/Display/Display.StatusBadge.js +68 -0
  76. package/dist/Display/Display.StatusDot.js +93 -18
  77. package/dist/Display/Display.Story.js +285 -35
  78. package/dist/Display/Display.StoryTray.js +354 -34
  79. package/dist/Display/Display.StoryViewer.js +571 -72
  80. package/dist/Display/Display.SwipeableRow.js +141 -20
  81. package/dist/Display/Display.Tag.d.ts +4 -1
  82. package/dist/Display/Display.Tag.js +66 -4
  83. package/dist/Display/Display.Timeline.js +102 -13
  84. package/dist/Display/Display.Tooltip.js +122 -26
  85. package/dist/Display/chevron.d.ts +6 -0
  86. package/dist/Display/chevron.js +32 -0
  87. package/dist/Display/count-badge.d.ts +21 -0
  88. package/dist/Display/count-badge.js +124 -0
  89. package/dist/Display/group-title.d.ts +10 -0
  90. package/dist/Display/group-title.js +53 -0
  91. package/dist/Display/icon-font.d.ts +3 -0
  92. package/dist/Display/icon-font.ios.d.ts +3 -0
  93. package/dist/Display/icon-font.ios.js +4 -0
  94. package/dist/Display/icon-font.js +7 -0
  95. package/dist/Display/icon-glyphs.d.ts +2 -0
  96. package/dist/Display/icon-glyphs.js +87 -0
  97. package/dist/Display/icon-map.d.ts +5 -1
  98. package/dist/Display/icon-map.js +340 -84
  99. package/dist/Display/icon-registry.d.ts +21 -0
  100. package/dist/Display/icon-registry.js +21 -0
  101. package/dist/Display/index.d.ts +6 -1
  102. package/dist/Display/index.js +53 -48
  103. package/dist/Display/pill.d.ts +16 -0
  104. package/dist/Display/pill.js +47 -0
  105. package/dist/Feedback/ErrorBoundary.js +35 -23
  106. package/dist/Feedback/Feedback.Banner.js +202 -24
  107. package/dist/Feedback/Feedback.DomainSplashScreen.js +246 -70
  108. package/dist/Feedback/Feedback.Empty.js +54 -3
  109. package/dist/Feedback/Feedback.EmptyState.js +114 -5
  110. package/dist/Feedback/Feedback.Error.d.ts +1 -1
  111. package/dist/Feedback/Feedback.Error.js +130 -5
  112. package/dist/Feedback/Feedback.Loading.d.ts +1 -1
  113. package/dist/Feedback/Feedback.Loading.js +70 -3
  114. package/dist/Feedback/Feedback.PermissionCard.js +161 -5
  115. package/dist/Feedback/Feedback.Progress.js +199 -41
  116. package/dist/Feedback/Feedback.ProgressCircle.js +184 -12
  117. package/dist/Feedback/Feedback.Skeleton.js +149 -36
  118. package/dist/Feedback/Feedback.Spinner.js +407 -79
  119. package/dist/Feedback/Feedback.Splash.js +240 -33
  120. package/dist/Feedback/Feedback.State.d.ts +17 -0
  121. package/dist/Feedback/Feedback.State.js +104 -0
  122. package/dist/Feedback/Toast.context.js +883 -167
  123. package/dist/Feedback/index.d.ts +3 -0
  124. package/dist/Feedback/index.js +15 -13
  125. package/dist/Form/Form.Checkbox.js +212 -22
  126. package/dist/Form/Form.ControlledCheckbox.d.ts +1 -1
  127. package/dist/Form/Form.ControlledCheckbox.js +46 -4
  128. package/dist/Form/Form.ControlledDropdown.d.ts +1 -1
  129. package/dist/Form/Form.ControlledDropdown.js +62 -4
  130. package/dist/Form/Form.ControlledInput.d.ts +4 -3
  131. package/dist/Form/Form.ControlledInput.js +72 -4
  132. package/dist/Form/Form.ControlledMonetaryInput.d.ts +6 -3
  133. package/dist/Form/Form.ControlledMonetaryInput.js +50 -4
  134. package/dist/Form/Form.ControlledRadioButton.d.ts +2 -2
  135. package/dist/Form/Form.ControlledRadioButton.js +45 -4
  136. package/dist/Form/Form.DatePicker.js +505 -107
  137. package/dist/Form/Form.Dropdown.js +303 -52
  138. package/dist/Form/Form.ErrorSummary.js +236 -44
  139. package/dist/Form/Form.Field.d.ts +24 -0
  140. package/dist/Form/Form.Field.js +55 -0
  141. package/dist/Form/Form.FractionalQuantityInput.js +508 -96
  142. package/dist/Form/Form.Input.d.ts +17 -3
  143. package/dist/Form/Form.Input.js +478 -29
  144. package/dist/Form/Form.KeyboardForm.d.ts +22 -8
  145. package/dist/Form/Form.KeyboardForm.js +83 -8
  146. package/dist/Form/Form.KeyboardToolbarHost.d.ts +14 -0
  147. package/dist/Form/Form.KeyboardToolbarHost.js +182 -0
  148. package/dist/Form/Form.MonetaryInput.js +164 -17
  149. package/dist/Form/Form.PickerField.d.ts +31 -0
  150. package/dist/Form/Form.PickerField.js +562 -0
  151. package/dist/Form/Form.PinInput.js +150 -15
  152. package/dist/Form/Form.QuantitySelector.js +229 -25
  153. package/dist/Form/Form.RadioButton.js +132 -24
  154. package/dist/Form/Form.Select.js +487 -56
  155. package/dist/Form/Form.Slider.js +133 -10
  156. package/dist/Form/Form.Switch.js +99 -4
  157. package/dist/Form/index.d.ts +11 -6
  158. package/dist/Form/index.js +26 -27
  159. package/dist/Form/input-text.d.ts +7 -0
  160. package/dist/Form/input-text.js +18 -0
  161. package/dist/Navigation/Navigation.AppBar.d.ts +3 -4
  162. package/dist/Navigation/Navigation.AppBar.js +535 -99
  163. package/dist/Navigation/Navigation.BottomNav.js +363 -98
  164. package/dist/Navigation/Navigation.CollapsingHeader.d.ts +28 -13
  165. package/dist/Navigation/Navigation.CollapsingHeader.js +369 -36
  166. package/dist/Navigation/Navigation.FloatingBar.js +71 -11
  167. package/dist/Navigation/Navigation.Menu.js +309 -95
  168. package/dist/Navigation/Navigation.MenuSection.js +80 -11
  169. package/dist/Navigation/Navigation.RowItem.d.ts +4 -2
  170. package/dist/Navigation/Navigation.RowItem.js +93 -8
  171. package/dist/Navigation/Navigation.Search.js +241 -27
  172. package/dist/Navigation/Navigation.SearchBar.d.ts +7 -1
  173. package/dist/Navigation/Navigation.SearchBar.js +218 -29
  174. package/dist/Navigation/Navigation.SearchSuggestions.js +77 -3
  175. package/dist/Navigation/Navigation.SegmentedControl.js +152 -14
  176. package/dist/Navigation/Navigation.Steps.js +105 -11
  177. package/dist/Navigation/Navigation.Tabs.js +449 -41
  178. package/dist/Navigation/index.d.ts +9 -4
  179. package/dist/Navigation/index.js +13 -13
  180. package/dist/Typography/Typography.Heading.js +33 -3
  181. package/dist/Typography/Typography.SelectableText.js +95 -7
  182. package/dist/Typography/Typography.Text.d.ts +4 -2
  183. package/dist/Typography/Typography.Text.js +217 -7
  184. package/dist/Typography/index.js +3 -3
  185. package/dist/branding.js +29 -13
  186. package/dist/icons/AddItemIcon.js +76 -2
  187. package/dist/icons/ArrangeCircle.js +82 -2
  188. package/dist/icons/ArrowDownIcon.js +63 -3
  189. package/dist/icons/ArrowUpIcon.js +63 -3
  190. package/dist/icons/BoxIcon.js +64 -2
  191. package/dist/icons/BoxTimeIcon.js +63 -2
  192. package/dist/icons/CalendarIcon.js +145 -2
  193. package/dist/icons/CardIcon.js +80 -2
  194. package/dist/icons/CashierIcon.js +39 -2
  195. package/dist/icons/CreditIcon.js +76 -3
  196. package/dist/icons/DuoIcon.js +75 -2
  197. package/dist/icons/HomeIcon.js +39 -2
  198. package/dist/icons/HomeIconOutlined.js +53 -2
  199. package/dist/icons/LogoIcon.js +87 -2
  200. package/dist/icons/MoneyReceiveIcon.js +86 -2
  201. package/dist/icons/PinIcon.js +39 -2
  202. package/dist/icons/ProfileIcon.js +47 -2
  203. package/dist/icons/SettingsIcon.js +114 -2
  204. package/dist/icons/SinpeIcon.js +60 -2
  205. package/dist/icons/ToggleOffIcon.js +53 -2
  206. package/dist/icons/WalletMoneyIcon.js +81 -2
  207. package/dist/index.d.ts +1 -0
  208. package/dist/index.js +8 -2
  209. package/dist/layouts/AuthContainer.d.ts +4 -5
  210. package/dist/layouts/AuthContainer.js +231 -7
  211. package/dist/layouts/BottomInset.js +4 -1
  212. package/dist/layouts/Container.d.ts +2 -2
  213. package/dist/layouts/Container.js +45 -3
  214. package/dist/layouts/GradientContainer.js +37 -5
  215. package/dist/layouts/PlainLayout.js +19 -3
  216. package/dist/layouts/ScrollContainer.d.ts +14 -9
  217. package/dist/layouts/ScrollContainer.js +125 -4
  218. package/dist/layouts/edges.d.ts +2 -0
  219. package/dist/layouts/edges.js +1 -0
  220. package/dist/primitives/AspectRatio.js +75 -3
  221. package/dist/primitives/Box.js +45 -3
  222. package/dist/primitives/Pressable.js +95 -5
  223. package/dist/primitives/Row.js +84 -13
  224. package/dist/primitives/Spacer.js +42 -5
  225. package/dist/primitives/Stack.js +66 -7
  226. package/dist/primitives/index.js +1 -1
  227. package/dist/theme/active.js +20 -18
  228. package/dist/theme/build.js +118 -87
  229. package/dist/theme/color.js +87 -87
  230. package/dist/theme/components/ThemedActivityIndicator.d.ts +2 -15
  231. package/dist/theme/components/ThemedActivityIndicator.js +35 -3
  232. package/dist/theme/components/index.js +1 -0
  233. package/dist/theme/contrast.js +32 -33
  234. package/dist/theme/css-vars.js +71 -75
  235. package/dist/theme/dark.js +116 -97
  236. package/dist/theme/default.js +116 -97
  237. package/dist/theme/define.js +16 -12
  238. package/dist/theme/index.d.ts +1 -0
  239. package/dist/theme/index.js +7 -6
  240. package/dist/theme/on-dark-surface.d.ts +12 -0
  241. package/dist/theme/on-dark-surface.js +13 -0
  242. package/dist/theme/theme.js +1 -0
  243. package/dist/theme/tw.js +3 -1
  244. package/dist/theme/types.js +0 -18
  245. package/dist/theme/typography.d.ts +1 -1
  246. package/dist/theme/typography.js +337 -303
  247. package/dist/theme/useTheme.js +12 -3
  248. package/dist/theme/useThemeVars.d.ts +9 -0
  249. package/dist/theme/useThemeVars.js +23 -0
  250. package/dist/theme/validate.js +175 -166
  251. package/dist/tokens/index.js +1 -1
  252. package/dist/tokens/motion.js +30 -13
  253. package/dist/utils/async.d.ts +14 -0
  254. package/dist/utils/async.js +22 -0
  255. package/dist/utils/criteria.js +66 -85
  256. package/dist/utils/date.d.ts +8 -2
  257. package/dist/utils/date.js +63 -50
  258. package/dist/utils/image.js +8 -8
  259. package/dist/utils/intl.d.ts +1 -0
  260. package/dist/utils/intl.js +13 -0
  261. package/dist/utils/keys.js +3 -5
  262. package/dist/utils/monetary.d.ts +1 -0
  263. package/dist/utils/monetary.js +28 -24
  264. package/dist/utils/progress.js +2 -3
  265. package/dist/utils/quantity.js +25 -26
  266. package/dist/utils/reorder.js +11 -20
  267. package/dist/utils/search.d.ts +4 -0
  268. package/dist/utils/search.js +12 -0
  269. package/dist/utils/serializer.js +38 -38
  270. package/dist/utils/useReducedMotion.js +32 -30
  271. package/dist/views/AppSplashView.js +117 -3
  272. package/dist/views/AuthFormView.d.ts +4 -5
  273. package/dist/views/AuthFormView.js +119 -11
  274. package/dist/views/FormViewV2.context.js +75 -23
  275. package/dist/views/FormViewV2.d.ts +4 -5
  276. package/dist/views/FormViewV2.js +658 -92
  277. package/dist/views/ListViewV2.context.js +91 -47
  278. package/dist/views/ListViewV2.d.ts +84 -43
  279. package/dist/views/ListViewV2.js +1350 -200
  280. package/dist/views/Wizard/Wizard.context.js +248 -84
  281. package/dist/views/Wizard/Wizard.js +260 -67
  282. package/dist/views/types/IListView.js +34 -31
  283. package/dist/widgets/CollectionOptions.js +557 -138
  284. package/dist/widgets/FilterBar.js +159 -7
  285. package/dist/widgets/FilterBuilder.js +375 -102
  286. package/dist/widgets/JSONViewer.js +275 -129
  287. package/dist/widgets/PromoBanner.js +336 -42
  288. package/dist/widgets/PromoModal.d.ts +2 -2
  289. package/dist/widgets/PromoModal.js +389 -62
  290. package/dist/widgets/QueryChoice.js +150 -8
  291. package/dist/widgets/QuickActions.js +120 -31
  292. package/dist/widgets/ReorderableList.js +399 -128
  293. package/dist/widgets/TimeZoneSelectorModal.js +458 -51
  294. package/dist/widgets/index.js +3 -3
  295. package/package.json +7 -2
  296. package/tailwind.preset.js +7 -5
  297. package/dist/Form/Form.InputField.d.ts +0 -10
  298. package/dist/Form/Form.InputField.js +0 -38
  299. package/dist/Form/Form.KeyboardToolbar.d.ts +0 -22
  300. package/dist/Form/Form.KeyboardToolbar.js +0 -66
  301. package/dist/Form/Form.PasswordInput.d.ts +0 -9
  302. package/dist/Form/Form.PasswordInput.js +0 -17
  303. package/dist/Form/Form.TextInput.d.ts +0 -8
  304. package/dist/Form/Form.TextInput.js +0 -8
  305. package/dist/primitives/BaseButton.d.ts +0 -150
  306. package/dist/primitives/BaseButton.js +0 -229
  307. package/dist/utils/useSheetTranslation.d.ts +0 -5
  308. package/dist/utils/useSheetTranslation.js +0 -23
@@ -1,23 +1,138 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
1
+ import { c as _c } from "react/compiler-runtime";
2
2
  import Avatar from "./Display.Avatar.js";
3
- import { theme } from "../theme/index.js";
3
+ import { useTheme } from "../theme/index.js";
4
4
  import { Typography } from "../Typography/index.js";
5
5
  import { View } from "react-native";
6
- function AvatarGroup({ items, max = 4, size = 36, className, testID }) {
6
+ import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
7
+ function AvatarGroup(t0) {
8
+ const $ = _c(32);
9
+ const {
10
+ items,
11
+ max: t1,
12
+ size: t2,
13
+ className,
14
+ testID
15
+ } = t0;
16
+ const max = t1 === undefined ? 4 : t1;
17
+ const size = t2 === undefined ? 36 : t2;
18
+ const theme = useTheme();
19
+ let T0;
20
+ let overflow;
21
+ let overlap;
22
+ let t3;
23
+ let t4;
24
+ let t5;
25
+ let t6;
26
+ if ($[0] !== className || $[1] !== items || $[2] !== max || $[3] !== size || $[4] !== testID || $[5] !== theme) {
7
27
  const visible = items.slice(0, max);
8
- const overflow = items.length - visible.length;
9
- const overlap = Math.round(size / 3);
10
- return (_jsxs(View, { className: className, style: { flexDirection: "row" }, testID: testID, children: [visible.map((item, index) => (_jsx(View, { style: {
11
- marginLeft: index === 0 ? 0 : -overlap,
12
- borderRadius: size,
13
- borderWidth: 2,
14
- borderColor: theme.bg.card,
15
- }, children: _jsx(Avatar, { initials: item.initials, size: size }) }, `${item.initials}-${index}`))), overflow > 0 ? (_jsx(View, { className: "items-center justify-center rounded-full bg-bg-muted", style: {
16
- width: size,
17
- height: size,
18
- marginLeft: -overlap,
19
- borderWidth: 2,
20
- borderColor: theme.bg.card,
21
- }, children: _jsxs(Typography.Text, { className: "text-text-secondary font-semibold text-xs", children: ["+", overflow] }) })) : null] }));
28
+ overflow = items.length - visible.length;
29
+ let t7;
30
+ if ($[13] !== size) {
31
+ t7 = Math.round(size / 3);
32
+ $[13] = size;
33
+ $[14] = t7;
34
+ } else {
35
+ t7 = $[14];
36
+ }
37
+ overlap = t7;
38
+ T0 = View;
39
+ t3 = className;
40
+ if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
41
+ t4 = {
42
+ flexDirection: "row"
43
+ };
44
+ $[15] = t4;
45
+ } else {
46
+ t4 = $[15];
47
+ }
48
+ t5 = testID;
49
+ let t8;
50
+ if ($[16] !== overlap || $[17] !== size || $[18] !== theme) {
51
+ t8 = (item, index) => _jsx(View, {
52
+ style: {
53
+ marginLeft: index === 0 ? 0 : -overlap,
54
+ borderRadius: size,
55
+ borderWidth: 2,
56
+ borderColor: theme.bg.card
57
+ },
58
+ children: _jsx(Avatar, {
59
+ initials: item.initials,
60
+ size: size
61
+ })
62
+ }, `${item.initials}-${index}`);
63
+ $[16] = overlap;
64
+ $[17] = size;
65
+ $[18] = theme;
66
+ $[19] = t8;
67
+ } else {
68
+ t8 = $[19];
69
+ }
70
+ t6 = visible.map(t8);
71
+ $[0] = className;
72
+ $[1] = items;
73
+ $[2] = max;
74
+ $[3] = size;
75
+ $[4] = testID;
76
+ $[5] = theme;
77
+ $[6] = T0;
78
+ $[7] = overflow;
79
+ $[8] = overlap;
80
+ $[9] = t3;
81
+ $[10] = t4;
82
+ $[11] = t5;
83
+ $[12] = t6;
84
+ } else {
85
+ T0 = $[6];
86
+ overflow = $[7];
87
+ overlap = $[8];
88
+ t3 = $[9];
89
+ t4 = $[10];
90
+ t5 = $[11];
91
+ t6 = $[12];
92
+ }
93
+ let t7;
94
+ if ($[20] !== overflow || $[21] !== overlap || $[22] !== size || $[23] !== theme) {
95
+ t7 = overflow > 0 ? _jsx(View, {
96
+ className: "items-center justify-center rounded-full bg-bg-muted",
97
+ style: {
98
+ width: size,
99
+ height: size,
100
+ marginLeft: -overlap,
101
+ borderWidth: 2,
102
+ borderColor: theme.bg.card
103
+ },
104
+ children: _jsxs(Typography.Text, {
105
+ className: "text-text-secondary",
106
+ semibold: true,
107
+ children: ["+", overflow]
108
+ })
109
+ }) : null;
110
+ $[20] = overflow;
111
+ $[21] = overlap;
112
+ $[22] = size;
113
+ $[23] = theme;
114
+ $[24] = t7;
115
+ } else {
116
+ t7 = $[24];
117
+ }
118
+ let t8;
119
+ if ($[25] !== T0 || $[26] !== t3 || $[27] !== t4 || $[28] !== t5 || $[29] !== t6 || $[30] !== t7) {
120
+ t8 = _jsxs(T0, {
121
+ className: t3,
122
+ style: t4,
123
+ testID: t5,
124
+ children: [t6, t7]
125
+ });
126
+ $[25] = T0;
127
+ $[26] = t3;
128
+ $[27] = t4;
129
+ $[28] = t5;
130
+ $[29] = t6;
131
+ $[30] = t7;
132
+ $[31] = t8;
133
+ } else {
134
+ t8 = $[31];
135
+ }
136
+ return t8;
22
137
  }
23
138
  export default AvatarGroup;
@@ -1,4 +1,5 @@
1
1
  import { type VariantProps } from "../theme/tw.js";
2
+ import type { typographyVariants } from "../theme/typography.js";
2
3
  declare const badge: import("tailwind-variants").TVReturnType<{
3
4
  variant: {
4
5
  info: {
@@ -25,6 +26,10 @@ declare const badge: import("tailwind-variants").TVReturnType<{
25
26
  root: string;
26
27
  text: string;
27
28
  };
29
+ accent: {
30
+ root: string;
31
+ text: string;
32
+ };
28
33
  };
29
34
  }, {
30
35
  root: string;
@@ -55,6 +60,10 @@ declare const badge: import("tailwind-variants").TVReturnType<{
55
60
  root: string;
56
61
  text: string;
57
62
  };
63
+ accent: {
64
+ root: string;
65
+ text: string;
66
+ };
58
67
  };
59
68
  }, {
60
69
  root: string;
@@ -85,6 +94,10 @@ declare const badge: import("tailwind-variants").TVReturnType<{
85
94
  root: string;
86
95
  text: string;
87
96
  };
97
+ accent: {
98
+ root: string;
99
+ text: string;
100
+ };
88
101
  };
89
102
  }, {
90
103
  root: string;
@@ -97,12 +110,15 @@ export declare enum BadgeVariants {
97
110
  SUCCESS = "success",
98
111
  INFO_DARK = "infoDark",
99
112
  DANGER = "danger",
100
- SUCCESS_DARK = "successDark"
113
+ SUCCESS_DARK = "successDark",
114
+ ACCENT = "accent"
101
115
  }
102
116
  export type BadgeProps = {
103
117
  label: string;
104
118
  variant: BadgeVariants | BadgeVariant | string;
105
119
  className?: string;
120
+ /** Typography variant of the label. Defaults to the shared pill metrics (12/16). */
121
+ textVariant?: keyof typeof typographyVariants;
106
122
  };
107
- declare function Badge({ label, variant, className }: BadgeProps): import("react").JSX.Element;
123
+ declare function Badge({ label, variant, className, textVariant }: BadgeProps): import("react").JSX.Element;
108
124
  export default Badge;
@@ -1,54 +1,122 @@
1
- import { jsx as _jsx } from "nativewind/jsx-runtime";
1
+ import { c as _c } from "react/compiler-runtime";
2
+ import { PillLabel } from "./pill.js";
2
3
  import { tv } from "../theme/tw.js";
3
- import { Text, View } from "react-native";
4
+ import { View } from "react-native";
5
+ import { jsx as _jsx } from "nativewind/jsx-runtime";
4
6
  const badge = tv({
5
- slots: {
6
- root: "px-2.5 py-1.5 rounded-lg self-start",
7
- text: "text-xs font-semibold",
8
- },
9
- variants: {
10
- variant: {
11
- info: {
12
- root: "bg-container-info",
13
- text: "text-info",
14
- },
15
- infoDark: {
16
- root: "bg-info",
17
- text: "text-text-on-primary",
18
- },
19
- warning: {
20
- root: "bg-container-warning",
21
- text: "text-warning",
22
- },
23
- success: {
24
- root: "bg-container-success",
25
- text: "text-success",
26
- },
27
- successDark: {
28
- root: "bg-success",
29
- text: "text-text-on-primary",
30
- },
31
- danger: {
32
- root: "bg-container-danger",
33
- text: "text-danger",
34
- },
35
- },
36
- },
37
- defaultVariants: {
38
- variant: "info",
39
- },
7
+ slots: {
8
+ root: "px-2.5 py-1.5 rounded-lg self-start",
9
+ text: ""
10
+ },
11
+ variants: {
12
+ variant: {
13
+ info: {
14
+ root: "bg-container-info",
15
+ text: "text-info"
16
+ },
17
+ infoDark: {
18
+ root: "bg-info",
19
+ text: "text-text-on-primary"
20
+ },
21
+ warning: {
22
+ root: "bg-container-warning",
23
+ text: "text-warning"
24
+ },
25
+ success: {
26
+ root: "bg-container-success",
27
+ text: "text-success"
28
+ },
29
+ successDark: {
30
+ root: "bg-success",
31
+ text: "text-text-on-primary"
32
+ },
33
+ danger: {
34
+ root: "bg-container-danger",
35
+ text: "text-danger"
36
+ },
37
+ accent: {
38
+ root: "bg-accent",
39
+ text: "text-text-on-accent"
40
+ }
41
+ }
42
+ },
43
+ defaultVariants: {
44
+ variant: "info"
45
+ }
40
46
  });
41
- export var BadgeVariants;
42
- (function (BadgeVariants) {
43
- BadgeVariants["INFO"] = "info";
44
- BadgeVariants["WARNING"] = "warning";
45
- BadgeVariants["SUCCESS"] = "success";
46
- BadgeVariants["INFO_DARK"] = "infoDark";
47
- BadgeVariants["DANGER"] = "danger";
48
- BadgeVariants["SUCCESS_DARK"] = "successDark";
49
- })(BadgeVariants || (BadgeVariants = {}));
50
- function Badge({ label, variant, className }) {
51
- const styles = badge({ variant: variant });
52
- return (_jsx(View, { className: styles.root({ className }), children: _jsx(Text, { className: styles.text(), numberOfLines: 1, children: label }) }));
47
+ export let BadgeVariants = /*#__PURE__*/function (BadgeVariants) {
48
+ BadgeVariants["INFO"] = "info";
49
+ BadgeVariants["WARNING"] = "warning";
50
+ BadgeVariants["SUCCESS"] = "success";
51
+ BadgeVariants["INFO_DARK"] = "infoDark";
52
+ BadgeVariants["DANGER"] = "danger";
53
+ BadgeVariants["SUCCESS_DARK"] = "successDark";
54
+ BadgeVariants["ACCENT"] = "accent";
55
+ return BadgeVariants;
56
+ }({});
57
+ function Badge(t0) {
58
+ const $ = _c(15);
59
+ const {
60
+ label,
61
+ variant,
62
+ className,
63
+ textVariant
64
+ } = t0;
65
+ let T0;
66
+ let T1;
67
+ let t1;
68
+ let t2;
69
+ if ($[0] !== className || $[1] !== variant) {
70
+ const styles = badge({
71
+ variant: variant
72
+ });
73
+ T1 = View;
74
+ t2 = styles.root({
75
+ className
76
+ });
77
+ T0 = PillLabel;
78
+ t1 = styles.text();
79
+ $[0] = className;
80
+ $[1] = variant;
81
+ $[2] = T0;
82
+ $[3] = T1;
83
+ $[4] = t1;
84
+ $[5] = t2;
85
+ } else {
86
+ T0 = $[2];
87
+ T1 = $[3];
88
+ t1 = $[4];
89
+ t2 = $[5];
90
+ }
91
+ let t3;
92
+ if ($[6] !== T0 || $[7] !== label || $[8] !== t1 || $[9] !== textVariant) {
93
+ t3 = _jsx(T0, {
94
+ className: t1,
95
+ semibold: true,
96
+ variant: textVariant,
97
+ children: label
98
+ });
99
+ $[6] = T0;
100
+ $[7] = label;
101
+ $[8] = t1;
102
+ $[9] = textVariant;
103
+ $[10] = t3;
104
+ } else {
105
+ t3 = $[10];
106
+ }
107
+ let t4;
108
+ if ($[11] !== T1 || $[12] !== t2 || $[13] !== t3) {
109
+ t4 = _jsx(T1, {
110
+ className: t2,
111
+ children: t3
112
+ });
113
+ $[11] = T1;
114
+ $[12] = t2;
115
+ $[13] = t3;
116
+ $[14] = t4;
117
+ } else {
118
+ t4 = $[14];
119
+ }
120
+ return t4;
53
121
  }
54
122
  export default Badge;
@@ -1,39 +1,176 @@
1
- import { jsx as _jsx } from "nativewind/jsx-runtime";
1
+ import { c as _c } from "react/compiler-runtime";
2
2
  import Pressable from "../primitives/Pressable.js";
3
3
  import { useTheme } from "../theme/index.js";
4
4
  import { cn, tv } from "../theme/tw.js";
5
5
  import { Typography } from "../Typography/index.js";
6
6
  import { View } from "react-native";
7
+ import { jsx as _jsx } from "nativewind/jsx-runtime";
7
8
  const card = tv({
8
- base: "bg-bg-card rounded-lg border border-border-light",
9
- variants: {
10
- padding: {
11
- none: "p-0",
12
- sm: "p-3",
13
- md: "p-4",
14
- lg: "p-6",
15
- },
16
- },
17
- defaultVariants: {
18
- padding: "md",
19
- },
9
+ base: "bg-bg-card rounded-lg border border-border-light",
10
+ variants: {
11
+ padding: {
12
+ none: "p-0",
13
+ sm: "p-3",
14
+ md: "p-4",
15
+ lg: "p-6"
16
+ }
17
+ },
18
+ defaultVariants: {
19
+ padding: "md"
20
+ }
20
21
  });
21
- function Card({ padding = "md", elevation = "sm", onPress, className, children, testID, }) {
22
- const theme = useTheme();
23
- const shadow = elevation === "none"
24
- ? { borderCurve: "continuous" }
25
- : { ...theme.shadow[elevation], borderCurve: "continuous" };
26
- if (onPress) {
27
- return (_jsx(Pressable, { className: card({ padding, className }), onPress: onPress, style: shadow, testID: testID, children: children }));
22
+ function Card(t0) {
23
+ const $ = _c(20);
24
+ const {
25
+ padding: t1,
26
+ elevation: t2,
27
+ onPress,
28
+ className,
29
+ children,
30
+ testID
31
+ } = t0;
32
+ const padding = t1 === undefined ? "md" : t1;
33
+ const elevation = t2 === undefined ? "sm" : t2;
34
+ const theme = useTheme();
35
+ let t3;
36
+ if ($[0] !== elevation || $[1] !== theme) {
37
+ t3 = elevation === "none" ? {
38
+ borderCurve: "continuous"
39
+ } : {
40
+ ...theme.shadow[elevation],
41
+ borderCurve: "continuous"
42
+ };
43
+ $[0] = elevation;
44
+ $[1] = theme;
45
+ $[2] = t3;
46
+ } else {
47
+ t3 = $[2];
48
+ }
49
+ const shadow = t3;
50
+ if (onPress) {
51
+ let t4;
52
+ if ($[3] !== className || $[4] !== padding) {
53
+ t4 = card({
54
+ padding,
55
+ className
56
+ });
57
+ $[3] = className;
58
+ $[4] = padding;
59
+ $[5] = t4;
60
+ } else {
61
+ t4 = $[5];
28
62
  }
29
- return (_jsx(View, { className: card({ padding, className }), style: shadow, testID: testID, children: children }));
63
+ let t5;
64
+ if ($[6] !== children || $[7] !== onPress || $[8] !== shadow || $[9] !== t4 || $[10] !== testID) {
65
+ t5 = _jsx(Pressable, {
66
+ className: t4,
67
+ onPress: onPress,
68
+ style: shadow,
69
+ testID: testID,
70
+ children: children
71
+ });
72
+ $[6] = children;
73
+ $[7] = onPress;
74
+ $[8] = shadow;
75
+ $[9] = t4;
76
+ $[10] = testID;
77
+ $[11] = t5;
78
+ } else {
79
+ t5 = $[11];
80
+ }
81
+ return t5;
82
+ }
83
+ let t4;
84
+ if ($[12] !== className || $[13] !== padding) {
85
+ t4 = card({
86
+ padding,
87
+ className
88
+ });
89
+ $[12] = className;
90
+ $[13] = padding;
91
+ $[14] = t4;
92
+ } else {
93
+ t4 = $[14];
94
+ }
95
+ let t5;
96
+ if ($[15] !== children || $[16] !== shadow || $[17] !== t4 || $[18] !== testID) {
97
+ t5 = _jsx(View, {
98
+ className: t4,
99
+ style: shadow,
100
+ testID: testID,
101
+ children: children
102
+ });
103
+ $[15] = children;
104
+ $[16] = shadow;
105
+ $[17] = t4;
106
+ $[18] = testID;
107
+ $[19] = t5;
108
+ } else {
109
+ t5 = $[19];
110
+ }
111
+ return t5;
30
112
  }
31
- function CardTitle({ children, className }) {
32
- return (_jsx(Typography.Text, { className: cn("text-text-primary mb-1", className), semibold: true, variant: "h4", children: children }));
113
+ function CardTitle(t0) {
114
+ const $ = _c(5);
115
+ const {
116
+ children,
117
+ className
118
+ } = t0;
119
+ let t1;
120
+ if ($[0] !== className) {
121
+ t1 = cn("text-text-primary mb-1", className);
122
+ $[0] = className;
123
+ $[1] = t1;
124
+ } else {
125
+ t1 = $[1];
126
+ }
127
+ let t2;
128
+ if ($[2] !== children || $[3] !== t1) {
129
+ t2 = _jsx(Typography.Text, {
130
+ className: t1,
131
+ semibold: true,
132
+ variant: "h4",
133
+ children: children
134
+ });
135
+ $[2] = children;
136
+ $[3] = t1;
137
+ $[4] = t2;
138
+ } else {
139
+ t2 = $[4];
140
+ }
141
+ return t2;
33
142
  }
34
- function CardFooter({ children, className }) {
35
- return (_jsx(View, { className: cn("flex-row items-center justify-end gap-2 mt-3", className), children: children }));
143
+ function CardFooter(t0) {
144
+ const $ = _c(5);
145
+ const {
146
+ children,
147
+ className
148
+ } = t0;
149
+ let t1;
150
+ if ($[0] !== className) {
151
+ t1 = cn("flex-row items-center justify-end gap-2 mt-3", className);
152
+ $[0] = className;
153
+ $[1] = t1;
154
+ } else {
155
+ t1 = $[1];
156
+ }
157
+ let t2;
158
+ if ($[2] !== children || $[3] !== t1) {
159
+ t2 = _jsx(View, {
160
+ className: t1,
161
+ children: children
162
+ });
163
+ $[2] = children;
164
+ $[3] = t1;
165
+ $[4] = t2;
166
+ } else {
167
+ t2 = $[4];
168
+ }
169
+ return t2;
36
170
  }
37
- const CardWithSlots = Object.assign(Card, { Title: CardTitle, Footer: CardFooter });
171
+ const CardWithSlots = Object.assign(Card, {
172
+ Title: CardTitle,
173
+ Footer: CardFooter
174
+ });
38
175
  export default CardWithSlots;
39
176
  export { CardWithSlots as Card };