@btndprojects/loam-ui-native 0.1.0 → 0.2.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 (263) hide show
  1. package/README.md +56 -0
  2. package/dist/accordion/index.js +5 -3
  3. package/dist/adaptive/index.js +6 -2
  4. package/dist/alert/index.js +5 -2
  5. package/dist/analyzer/index.js +9 -6
  6. package/dist/announcement/index.js +8 -5
  7. package/dist/audio-player/index.js +5 -3
  8. package/dist/avatar/index.js +5 -2
  9. package/dist/avatar-group/index.js +7 -3
  10. package/dist/badge/index.js +7 -4
  11. package/dist/banner/index.js +5 -2
  12. package/dist/board/index.js +11 -6
  13. package/dist/button/index.js +6 -3
  14. package/dist/camera-permission/index.js +15 -12
  15. package/dist/capture-result/index.js +19 -16
  16. package/dist/card/index.js +6 -3
  17. package/dist/card-form/index.js +12 -8
  18. package/dist/carousel/index.js +4 -2
  19. package/dist/chart/index.js +8 -5
  20. package/dist/charts/index.js +8 -6
  21. package/dist/chat/index.js +16 -0
  22. package/dist/checkbox/index.js +6 -4
  23. package/dist/checklist/index.js +11 -8
  24. package/dist/checkout/index.js +16 -11
  25. package/dist/chip/index.js +7 -4
  26. package/dist/{chunk-XNUVB5OL.js → chunk-2OLKPG4E.js} +92 -28
  27. package/dist/{chunk-RUZHTGKB.js → chunk-2PKYGLQ6.js} +71 -40
  28. package/dist/{chunk-UC2WGUP3.js → chunk-2SWKL3AJ.js} +91 -252
  29. package/dist/{chunk-AI4DWZCD.js → chunk-2SY63FCH.js} +63 -16
  30. package/dist/{chunk-F5XNPWS7.js → chunk-2TXERVVA.js} +92 -35
  31. package/dist/chunk-36EC2T6P.js +581 -0
  32. package/dist/chunk-3DUWIYV5.js +437 -0
  33. package/dist/{chunk-RGQWWKLA.js → chunk-3QMEOFW5.js} +275 -71
  34. package/dist/chunk-3WEZCGHX.js +265 -0
  35. package/dist/chunk-46MMSDGL.js +194 -0
  36. package/dist/{chunk-7O2FMUPT.js → chunk-4IZXHVFJ.js} +297 -92
  37. package/dist/{chunk-LAECSR4H.js → chunk-5LAAAXFP.js} +14 -8
  38. package/dist/{chunk-2A5NIQAK.js → chunk-5RENVKBQ.js} +134 -46
  39. package/dist/{chunk-2ZZ7TDJ4.js → chunk-5UTRIXQ6.js} +37 -31
  40. package/dist/{chunk-LOE5YNN3.js → chunk-5VFZRGVD.js} +37 -10
  41. package/dist/{chunk-52X2VYTD.js → chunk-67IZZ2MJ.js} +115 -60
  42. package/dist/{chunk-UYG5L34B.js → chunk-6YAQBXB3.js} +10 -4
  43. package/dist/{chunk-BTTFCMKG.js → chunk-74FLKD24.js} +94 -23
  44. package/dist/{chunk-ITTYJZWX.js → chunk-7BUIKDD6.js} +73 -18
  45. package/dist/{chunk-FOKG57CR.js → chunk-7OVVSVEZ.js} +273 -109
  46. package/dist/chunk-AEB7KCHQ.js +287 -0
  47. package/dist/chunk-APCWFOZW.js +28 -0
  48. package/dist/chunk-AWKQIE5I.js +139 -0
  49. package/dist/{chunk-VCDBXW5H.js → chunk-B7N4ASYE.js} +86 -42
  50. package/dist/{chunk-IVNRBPGC.js → chunk-C4GTDLRC.js} +104 -20
  51. package/dist/{chunk-4ZAHCY44.js → chunk-C6APNDVA.js} +12 -5
  52. package/dist/{chunk-4SZYY6AN.js → chunk-CMTVNF3D.js} +18 -13
  53. package/dist/{chunk-WVKKJA6U.js → chunk-CPTOADB2.js} +151 -96
  54. package/dist/chunk-D5N5QWI7.js +1325 -0
  55. package/dist/{chunk-IIQTAY3J.js → chunk-DN7MNQIP.js} +113 -29
  56. package/dist/{chunk-47FWHGUN.js → chunk-DVGBZ3TX.js} +84 -23
  57. package/dist/chunk-DW3L54DQ.js +305 -0
  58. package/dist/{chunk-3ARE4TES.js → chunk-E2E3I5W2.js} +69 -18
  59. package/dist/{chunk-DHWADYZX.js → chunk-EDCBJV7J.js} +41 -28
  60. package/dist/{chunk-WSW6ZFAQ.js → chunk-ENP3BMZU.js} +4 -4
  61. package/dist/{chunk-OOPPQH27.js → chunk-EVOIGUBI.js} +43 -19
  62. package/dist/{chunk-VEAYTRPX.js → chunk-EY4DD67D.js} +165 -97
  63. package/dist/{chunk-223Q2T2Q.js → chunk-F3H33DQX.js} +132 -61
  64. package/dist/{chunk-CYRBHQQZ.js → chunk-F5B3UINI.js} +68 -35
  65. package/dist/{chunk-6X6PQ443.js → chunk-FAJI7BSC.js} +20 -9
  66. package/dist/{chunk-MOUJOP55.js → chunk-FUMHAAF3.js} +96 -29
  67. package/dist/{chunk-6HT2LP62.js → chunk-FV6HMP7W.js} +192 -73
  68. package/dist/{chunk-S7F6XLTK.js → chunk-FYWNRX4F.js} +76 -47
  69. package/dist/{chunk-YG3ZJHGU.js → chunk-FZGAAOKS.js} +30 -8
  70. package/dist/{chunk-YDGVJETP.js → chunk-G3AFC24V.js} +1 -1
  71. package/dist/{chunk-EJBDRVIH.js → chunk-G6UESEVN.js} +15 -8
  72. package/dist/chunk-GDKVKNR2.js +339 -0
  73. package/dist/chunk-GEIGMWNF.js +10 -0
  74. package/dist/{chunk-JUAMLEHX.js → chunk-H7DWSL4O.js} +24 -12
  75. package/dist/chunk-HJFFOOJ4.js +1 -0
  76. package/dist/{chunk-RW6ZL2FQ.js → chunk-HJLPZA4X.js} +106 -21
  77. package/dist/chunk-HYEOQWT7.js +647 -0
  78. package/dist/chunk-I2KLQ2HA.js +19 -0
  79. package/dist/{chunk-CJ5EOYZE.js → chunk-I4FHVKEC.js} +11 -5
  80. package/dist/{chunk-JNH2TYIN.js → chunk-IDM7JJMO.js} +19 -5
  81. package/dist/{chunk-O4AEHWII.js → chunk-IPUNJMAQ.js} +141 -49
  82. package/dist/{chunk-J7Q7VCVC.js → chunk-IT6FUXXG.js} +13 -6
  83. package/dist/{chunk-QJJ6MADV.js → chunk-IVKMZ7BB.js} +80 -28
  84. package/dist/{chunk-Z7H7VSFZ.js → chunk-IXKWIFWZ.js} +17 -6
  85. package/dist/chunk-J64KGCGX.js +55 -0
  86. package/dist/chunk-JBMLWFSJ.js +270 -0
  87. package/dist/{chunk-4BXMXBJO.js → chunk-JJLPBRVZ.js} +22 -11
  88. package/dist/chunk-JLC6PM5S.js +406 -0
  89. package/dist/chunk-JUYWSSKW.js +335 -0
  90. package/dist/{chunk-7CFF4HXS.js → chunk-JV5YOTOB.js} +49 -11
  91. package/dist/{chunk-LZLHELAG.js → chunk-KFJGFLMW.js} +29 -8
  92. package/dist/{chunk-O7AE6DAF.js → chunk-KQZ3GLHR.js} +18 -8
  93. package/dist/{chunk-N32RGOA5.js → chunk-LKFC4CS7.js} +80 -24
  94. package/dist/{chunk-YC6WORFL.js → chunk-LMPHCVJJ.js} +82 -50
  95. package/dist/{chunk-3WPW4KUN.js → chunk-LQP4KEXZ.js} +45 -13
  96. package/dist/{chunk-TKQYWZ5V.js → chunk-LUMVGO2K.js} +47 -31
  97. package/dist/{chunk-AWJOCGFZ.js → chunk-M656FYNH.js} +25 -13
  98. package/dist/{chunk-35OFI3JG.js → chunk-MKSNFG7H.js} +73 -20
  99. package/dist/{chunk-4GBOGOTV.js → chunk-NBEF4EPJ.js} +16 -6
  100. package/dist/chunk-NNCOFLNE.js +24 -0
  101. package/dist/{chunk-4YQOR7JM.js → chunk-NTQ2F3AU.js} +73 -20
  102. package/dist/{chunk-QCDXZBC5.js → chunk-O5V4TG3V.js} +126 -44
  103. package/dist/{chunk-U7TFM2JA.js → chunk-OJQUBQWA.js} +3 -3
  104. package/dist/{chunk-VQHPQEUH.js → chunk-OWAMM2DK.js} +13 -6
  105. package/dist/chunk-PID3NJB7.js +405 -0
  106. package/dist/{chunk-66SG2H23.js → chunk-PMMTGBBS.js} +27 -17
  107. package/dist/{chunk-RIBDXGUG.js → chunk-PNF3NKB5.js} +49 -16
  108. package/dist/{chunk-JXJB2X6M.js → chunk-Q6NKEPRE.js} +81 -32
  109. package/dist/chunk-QDZGFXQD.js +176 -0
  110. package/dist/{chunk-SYNOJOQO.js → chunk-QEYFDRHR.js} +60 -26
  111. package/dist/{chunk-VBOXAEPI.js → chunk-QHAITQIF.js} +97 -22
  112. package/dist/{chunk-VXDZFJGP.js → chunk-QHTVYA65.js} +230 -76
  113. package/dist/{chunk-TUTI5HOZ.js → chunk-QIKT7LIB.js} +14 -8
  114. package/dist/{chunk-3ENTMPQY.js → chunk-QP3KMOVF.js} +82 -42
  115. package/dist/{chunk-GNNJ4GCC.js → chunk-QPWDDJJ4.js} +62 -148
  116. package/dist/{chunk-QWCMU5B2.js → chunk-QRUMA22E.js} +205 -80
  117. package/dist/{chunk-ZVFE5QGU.js → chunk-QYPE5JX3.js} +50 -10
  118. package/dist/{chunk-PUPM2YGF.js → chunk-ROCUG24E.js} +76 -36
  119. package/dist/{chunk-NQYBUO3K.js → chunk-RU3ZPNL6.js} +333 -142
  120. package/dist/{chunk-TOXAGRDQ.js → chunk-RXSCIO6W.js} +14 -5
  121. package/dist/{chunk-FIF2M24N.js → chunk-SATMR6SG.js} +631 -203
  122. package/dist/{chunk-4YIP3CWS.js → chunk-SHHY5OMK.js} +7 -5
  123. package/dist/chunk-SKWO3SZF.js +2284 -0
  124. package/dist/{chunk-YF4NSSMT.js → chunk-SWS5JQIF.js} +41 -13
  125. package/dist/{chunk-CUMUNPXY.js → chunk-T5LTPKX6.js} +15 -7
  126. package/dist/{chunk-H6NIOQHK.js → chunk-TDMG26JI.js} +26 -6
  127. package/dist/{chunk-UWFLYMAR.js → chunk-TLCIR6RG.js} +267 -126
  128. package/dist/{chunk-SBMNWWBV.js → chunk-TN2ZNJUI.js} +47 -9
  129. package/dist/{chunk-5YNTNN5A.js → chunk-TQVAIKFD.js} +106 -41
  130. package/dist/chunk-TRGFFU6A.js +1456 -0
  131. package/dist/{chunk-2GK6PHGE.js → chunk-TY4MTKQJ.js} +100 -22
  132. package/dist/{chunk-AZRX6SAC.js → chunk-U23FYWME.js} +15 -7
  133. package/dist/{chunk-PZXZJBMP.js → chunk-U5NLHYV6.js} +26 -12
  134. package/dist/chunk-UQEN55EY.js +1 -0
  135. package/dist/chunk-UQGBTPXH.js +218 -0
  136. package/dist/chunk-UXGIW7OK.js +116 -0
  137. package/dist/{chunk-PJXUJYS6.js → chunk-UYGDJWMN.js} +55 -30
  138. package/dist/{chunk-QDYDBCFP.js → chunk-V2OEB75Z.js} +50 -51
  139. package/dist/{chunk-LSS54GLJ.js → chunk-VAOAKWUK.js} +34 -13
  140. package/dist/{chunk-DM5QUKKO.js → chunk-VDPK5CY4.js} +18 -6
  141. package/dist/chunk-W23G6JLF.js +37 -0
  142. package/dist/{chunk-CDRZHT42.js → chunk-W63AJTM7.js} +276 -12
  143. package/dist/{chunk-XXXEFXY5.js → chunk-W74TXYFB.js} +13 -5
  144. package/dist/{chunk-LRJNDEIA.js → chunk-WRDSPUE7.js} +144 -29
  145. package/dist/{chunk-C2NTXVWM.js → chunk-XBZGDDMR.js} +11 -4
  146. package/dist/{chunk-BV3B2HYZ.js → chunk-XIDTBCBA.js} +189 -131
  147. package/dist/{chunk-DSJBXLUG.js → chunk-XN4KG3P4.js} +348 -153
  148. package/dist/chunk-XQXMLMH3.js +211 -0
  149. package/dist/{chunk-HPPW424V.js → chunk-XTORZWRF.js} +19 -8
  150. package/dist/{chunk-P23EQNRQ.js → chunk-YAAHPATV.js} +181 -30
  151. package/dist/{chunk-KMI5ML5I.js → chunk-YXOAPXMU.js} +57 -18
  152. package/dist/{chunk-RJQOOHT2.js → chunk-ZECZOOSB.js} +59 -28
  153. package/dist/{chunk-QKXCPTFS.js → chunk-ZLTO5VQI.js} +121 -31
  154. package/dist/{chunk-BEDBFJND.js → chunk-ZVATDZOM.js} +16 -18
  155. package/dist/coachmark/index.js +6 -3
  156. package/dist/code-block/index.js +5 -3
  157. package/dist/color-field/index.js +6 -4
  158. package/dist/commerce/index.js +19 -16
  159. package/dist/connectivity/index.js +5 -2
  160. package/dist/context-menu/index.js +5 -3
  161. package/dist/copy-button/index.js +4 -2
  162. package/dist/data-grid/index.js +21 -16
  163. package/dist/date-range-picker/index.js +11 -8
  164. package/dist/description-list/index.js +3 -1
  165. package/dist/dialog/index.js +4 -2
  166. package/dist/empty-state/index.js +4 -2
  167. package/dist/error-summary/index.js +4 -2
  168. package/dist/fab/index.js +5 -2
  169. package/dist/file-manager/index.js +28 -0
  170. package/dist/file-upload/index.js +10 -7
  171. package/dist/filter-bar/index.js +9 -6
  172. package/dist/flow-run/index.js +15 -12
  173. package/dist/form/index.js +5 -3
  174. package/dist/gallery/index.js +5 -2
  175. package/dist/hold-to-confirm/index.js +4 -2
  176. package/dist/index.d.ts +9557 -2985
  177. package/dist/index.js +355 -122
  178. package/dist/infinite-list/index.js +4 -2
  179. package/dist/inline-edit/index.js +6 -4
  180. package/dist/input/index.js +5 -3
  181. package/dist/interactions/index.js +2 -1
  182. package/dist/invoice/index.js +13 -9
  183. package/dist/kbd/index.js +5 -1
  184. package/dist/keyboard/index.js +4 -2
  185. package/dist/list-row/index.js +6 -4
  186. package/dist/log-viewer/index.js +4 -2
  187. package/dist/map-view/index.js +5 -3
  188. package/dist/markdown/index.js +9 -6
  189. package/dist/metric/index.js +7 -4
  190. package/dist/money/index.js +9 -3
  191. package/dist/nav-drawer/index.js +4 -2
  192. package/dist/nav-header/index.js +9 -0
  193. package/dist/navigation/index.js +5 -2
  194. package/dist/notification-center/index.js +12 -10
  195. package/dist/number-roll/index.js +5 -2
  196. package/dist/one-handed/index.js +5 -3
  197. package/dist/os-surfaces/index.js +6 -3
  198. package/dist/otp/index.js +7 -4
  199. package/dist/page-header/index.js +1 -0
  200. package/dist/pagination/index.js +6 -0
  201. package/dist/payment-method/index.js +14 -10
  202. package/dist/payment-status/index.js +17 -14
  203. package/dist/permission/index.js +5 -2
  204. package/dist/picker/index.js +11 -6
  205. package/dist/progress/index.js +6 -3
  206. package/dist/pull-to-refresh/index.js +4 -2
  207. package/dist/radio-group/index.js +6 -4
  208. package/dist/rating/index.js +5 -2
  209. package/dist/receivables/index.js +21 -16
  210. package/dist/refund/index.js +18 -14
  211. package/dist/save-status/index.js +5 -3
  212. package/dist/scroll-area/index.js +3 -1
  213. package/dist/search-field/index.js +8 -0
  214. package/dist/segmented-control/index.js +4 -3
  215. package/dist/sheet/index.js +5 -3
  216. package/dist/skeleton/index.js +3 -1
  217. package/dist/slider/index.js +4 -2
  218. package/dist/sortable/index.js +7 -0
  219. package/dist/spinner/index.js +3 -1
  220. package/dist/split-button/index.js +9 -6
  221. package/dist/spotlight/index.js +3 -1
  222. package/dist/stage-timeline/index.js +5 -3
  223. package/dist/status-dot/index.js +4 -2
  224. package/dist/stepper/index.js +7 -4
  225. package/dist/streaming-text/index.js +3 -2
  226. package/dist/survey/index.js +18 -15
  227. package/dist/switch/index.js +5 -3
  228. package/dist/system-state/index.js +7 -4
  229. package/dist/tab-bar/index.js +5 -2
  230. package/dist/tabs/index.js +4 -2
  231. package/dist/tags-input/index.js +10 -0
  232. package/dist/textarea/index.js +6 -4
  233. package/dist/thinking/index.js +3 -1
  234. package/dist/time-field/index.js +12 -0
  235. package/dist/time-range-control/index.js +22 -0
  236. package/dist/timeline/index.js +4 -2
  237. package/dist/toast/index.js +4 -2
  238. package/dist/toolbar/index.js +4 -2
  239. package/dist/tour/index.js +12 -9
  240. package/dist/truncation-notice/index.js +5 -2
  241. package/dist/update-notice/index.js +12 -9
  242. package/dist/video-player/index.js +5 -2
  243. package/dist/viewfinder/index.js +6 -4
  244. package/dist/widget/index.js +7 -4
  245. package/dist/wizard/index.js +7 -4
  246. package/package.json +13 -12
  247. package/dist/chunk-6N33LFQA.js +0 -35
  248. package/dist/chunk-GDKZTW34.js +0 -395
  249. package/dist/chunk-GL7B2DOW.js +0 -134
  250. package/dist/chunk-NKB7BZYK.js +0 -167
  251. package/dist/chunk-OETCUXQP.js +0 -134
  252. package/dist/chunk-OPXFZ4Y5.js +0 -204
  253. package/dist/chunk-Q72LJOVE.js +0 -169
  254. package/dist/chunk-RNGLIHFA.js +0 -191
  255. package/dist/chunk-RQ3HASCC.js +0 -6
  256. package/dist/chunk-RSOJT5YW.js +0 -124
  257. package/dist/chunk-TKVFVF5D.js +0 -95
  258. package/dist/chunk-XOSCY2CW.js +0 -242
  259. package/dist/header/index.js +0 -5
  260. package/dist/search-bar/index.js +0 -5
  261. /package/dist/{chunk-3ECPOSKO.js → chunk-3UG6JUCV.js} +0 -0
  262. /package/dist/{chunk-JRLTGLN4.js → chunk-5WWRTEPS.js} +0 -0
  263. /package/dist/{chunk-RTIKSY6A.js → chunk-5Z5ZYMOJ.js} +0 -0
@@ -1,10 +1,15 @@
1
- import { Spinner } from './chunk-O7AE6DAF.js';
2
- import { Skeleton, SkeletonText } from './chunk-RIBDXGUG.js';
1
+ import { Spinner } from './chunk-KQZ3GLHR.js';
2
+ import { Skeleton, SkeletonText } from './chunk-PNF3NKB5.js';
3
+ import { useLabels } from './chunk-APCWFOZW.js';
4
+ import { motionTiming, springConfig } from './chunk-J64KGCGX.js';
3
5
  import * as React from 'react';
4
6
  import { StyleSheet, Animated, View, Pressable, Text, Image } from 'react-native';
5
7
  import { createStyleSheet, useLoamTheme, useStyles } from '@btndprojects/loam-theme-native';
6
8
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
7
9
 
10
+ var DEFAULT_LABELS = {
11
+ loading: "Loading"
12
+ };
8
13
  function Card({
9
14
  children,
10
15
  variant = "default",
@@ -13,13 +18,15 @@ function Card({
13
18
  accessibilityLabel,
14
19
  selected = false,
15
20
  busy = false,
16
- busyLabel = "Loading",
21
+ busyLabel,
17
22
  skeleton = false,
18
23
  emphasized = false,
19
24
  dragging = false,
20
- motion = "full"
25
+ motion = "full",
26
+ labels: labelsProp
21
27
  }) {
22
- const theme = useLoamTheme();
28
+ const labels = useLabels("card", DEFAULT_LABELS, labelsProp);
29
+ const theme = useLoamTheme("card");
23
30
  const { styles } = useStyles(sheet, {
24
31
  variant: variant === "default" ? void 0 : variant,
25
32
  selected,
@@ -27,12 +34,23 @@ function Card({
27
34
  dragging
28
35
  });
29
36
  const scale = React.useRef(new Animated.Value(1)).current;
30
- const spring = (to) => Animated.spring(scale, {
31
- toValue: to,
32
- useNativeDriver: true,
33
- speed: 40,
34
- bounciness: 6
35
- }).start();
37
+ const spring = (to) => {
38
+ if (theme.reduceMotion) return;
39
+ Animated.spring(scale, {
40
+ ...springConfig(theme, "fs"),
41
+ toValue: to,
42
+ useNativeDriver: true
43
+ }).start();
44
+ };
45
+ const tintOn = dragging || selected;
46
+ const tintOpacity = React.useRef(new Animated.Value(tintOn ? 1 : 0)).current;
47
+ React.useEffect(() => {
48
+ Animated.timing(tintOpacity, {
49
+ toValue: tintOn ? 1 : 0,
50
+ ...motionTiming(theme.reduceMotion ? "reduced" : "full"),
51
+ useNativeDriver: true
52
+ }).start();
53
+ }, [tintOn, tintOpacity, theme.reduceMotion]);
36
54
  if (skeleton) {
37
55
  return /* @__PURE__ */ jsx(
38
56
  View,
@@ -52,7 +70,12 @@ function Card({
52
70
  );
53
71
  }
54
72
  const tint = dragging ? theme.state.dragged : selected ? theme.state.selected : null;
55
- const tintOverlay = tint ? /* @__PURE__ */ jsx(View, { style: [StyleSheet.absoluteFill, { backgroundColor: tint, pointerEvents: "none" }] }) : null;
73
+ const tintOverlay = tint ? /* @__PURE__ */ jsx(
74
+ Animated.View,
75
+ {
76
+ style: [StyleSheet.absoluteFill, { backgroundColor: tint, opacity: tintOpacity, pointerEvents: "none" }]
77
+ }
78
+ ) : null;
56
79
  const lift = dragging && motion === "full" && !theme.reduceMotion;
57
80
  const dragTransform = lift ? [{ scale: 1.022 }, { rotate: theme.rtl ? "-1.2deg" : "1.2deg" }] : [];
58
81
  const withBusy = (node) => busy ? /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -65,7 +88,7 @@ function Card({
65
88
  importantForAccessibility: "no-hide-descendants"
66
89
  }
67
90
  ),
68
- /* @__PURE__ */ jsx(View, { style: styles.busySpinner, children: /* @__PURE__ */ jsx(Spinner, { size: "sm", accessibilityLabel: busyLabel }) })
91
+ /* @__PURE__ */ jsx(View, { style: styles.busySpinner, children: /* @__PURE__ */ jsx(Spinner, { size: "sm", accessibilityLabel: busyLabel ?? labels.loading }) })
69
92
  ] }) : node;
70
93
  if (onPress) {
71
94
  return /* @__PURE__ */ jsxs(Animated.View, { style: [styles.base, style, { transform: [{ scale }, ...dragTransform] }], children: [
@@ -77,7 +100,7 @@ function Card({
77
100
  accessibilityLabel,
78
101
  accessibilityState: { selected: selected || void 0, busy: busy || void 0 },
79
102
  onPress,
80
- onPressIn: () => spring(0.98),
103
+ onPressIn: () => spring(0.97),
81
104
  onPressOut: () => spring(1),
82
105
  style: StyleSheet.absoluteFill
83
106
  }
@@ -174,8 +197,19 @@ var sheet = createStyleSheet((theme) => ({
174
197
  variant: {
175
198
  // Reference (buildWidgets): `box-shadow:0 12px 30px rgba(30,25,15,.14)` → md token is
176
199
  // the nearest match; elevated steps up to lg for the stronger treatment.
177
- default: { ...theme.shadow.md },
178
- elevated: { ...theme.shadow.lg },
200
+ // The resting card reads the theme's `card` style (edge + shadow), so one
201
+ // theme setting restyles every card. `outline` keeps its own edge — it
202
+ // is the variant that *is* a border.
203
+ default: {
204
+ borderWidth: theme.card.borderWidth,
205
+ borderColor: theme.card.borderColor,
206
+ ...theme.card.shadow
207
+ },
208
+ elevated: {
209
+ borderWidth: theme.card.borderWidth,
210
+ borderColor: theme.card.borderColor,
211
+ ...theme.shadow.lg
212
+ },
179
213
  outline: {}
180
214
  },
181
215
  // Selection: an accent border. The `state-selected` tint is a translucent
@@ -189,7 +223,8 @@ var sheet = createStyleSheet((theme) => ({
189
223
  // it derives the accent at the hard-edge strength every such edge needs,
190
224
  // and it is a no-op on an accent that already clears.
191
225
  selected: {
192
- true: { borderColor: theme.focus.ringColor },
226
+ // Width too: a theme may draw cards edgeless, and the mark must survive it.
227
+ true: { borderColor: theme.focus.ringColor, borderWidth: theme.borderWidth.thin },
193
228
  false: {}
194
229
  },
195
230
  // Von Restorff emphasis — a 2px accent border + the stronger `lg`
@@ -206,7 +241,11 @@ var sheet = createStyleSheet((theme) => ({
206
241
  // Dragging: a raised shadow + accent border over the card's own surface;
207
242
  // the `state-dragged` tint and the scale/tilt are applied in the component.
208
243
  dragging: {
209
- true: { borderColor: theme.focus.ringColor, ...theme.shadow.lg },
244
+ true: {
245
+ borderColor: theme.focus.ringColor,
246
+ borderWidth: theme.borderWidth.thin,
247
+ ...theme.shadow.lg
248
+ },
210
249
  false: {}
211
250
  }
212
251
  }
@@ -1,11 +1,18 @@
1
- import { Dialog, DialogTitle, DialogFooter } from './chunk-OPXFZ4Y5.js';
2
- import { Button } from './chunk-3ARE4TES.js';
3
- import { Icon } from './chunk-TKVFVF5D.js';
1
+ import { Dialog, DialogTitle, DialogFooter } from './chunk-GDKVKNR2.js';
2
+ import { Button } from './chunk-E2E3I5W2.js';
3
+ import { useLabels } from './chunk-APCWFOZW.js';
4
+ import { Icon } from './chunk-UXGIW7OK.js';
5
+ import { springConfig, motionTiming } from './chunk-J64KGCGX.js';
4
6
  import * as React from 'react';
5
- import { Animated, Easing, Text, Pressable, View } from 'react-native';
7
+ import { Animated, Text, Pressable, View, LayoutAnimation } from 'react-native';
6
8
  import { createStyleSheet, useLoamTheme, useStyles } from '@btndprojects/loam-theme-native';
7
9
  import { jsxs, jsx } from 'react/jsx-runtime';
8
10
 
11
+ var DEFAULT_LABELS = {
12
+ dismiss: "Dismiss",
13
+ primary: "See what changed",
14
+ secondary: "Later"
15
+ };
9
16
  function AnnouncementBar({
10
17
  tone = "info",
11
18
  children,
@@ -13,22 +20,38 @@ function AnnouncementBar({
13
20
  actionLabel,
14
21
  onAction,
15
22
  onDismiss,
16
- dismissLabel = "Dismiss",
23
+ dismissLabel,
17
24
  wrap = false,
18
- motion = "full"
25
+ motion = "full",
26
+ labels: labelsProp
19
27
  }) {
20
- const theme = useLoamTheme();
28
+ const labels = useLabels("announcement", DEFAULT_LABELS, labelsProp);
29
+ const theme = useLoamTheme("announcement");
21
30
  const { styles } = useStyles(sheet, { tone });
22
31
  const slide = React.useRef(new Animated.Value(0)).current;
23
32
  const animate = motion === "full" && !theme.reduceMotion;
24
33
  React.useEffect(() => {
25
- Animated.timing(slide, {
26
- toValue: 1,
27
- duration: animate ? theme.motion.enter.duration : 0,
28
- easing: Easing.bezier(...theme.motion.enter.easing),
29
- useNativeDriver: true
30
- }).start();
31
- }, [slide, animate, theme.motion.enter]);
34
+ if (animate) {
35
+ Animated.spring(slide, { ...springConfig(theme, "ds"), toValue: 1, useNativeDriver: true }).start();
36
+ } else {
37
+ Animated.timing(slide, { ...motionTiming(motion === "none" ? "none" : "reduced"), toValue: 1, useNativeDriver: true }).start();
38
+ }
39
+ }, [slide, animate]);
40
+ const dismiss = () => {
41
+ if (animate) {
42
+ LayoutAnimation.configureNext({
43
+ duration: theme.spring.ds.duration,
44
+ update: { type: LayoutAnimation.Types.spring, springDamping: theme.spring.ds.dampingRatio },
45
+ delete: { type: LayoutAnimation.Types.easeOut, property: LayoutAnimation.Properties.opacity }
46
+ });
47
+ }
48
+ onDismiss?.();
49
+ };
50
+ const actionSlopY = Math.max(
51
+ theme.space[10],
52
+ Math.round((theme.tapMin - theme.type.footnote.lineHeight) / 2)
53
+ );
54
+ const dismissSlop = Math.max(theme.space[10], Math.round((theme.tapMin - theme.ctl.xs) / 2));
32
55
  const ink = tone === "info" ? theme.color.infoOnSoft : tone === "warn" ? theme.color.warnOnSoft : tone === "danger" ? theme.color.dangerOnSoft : tone === "good" ? theme.color.goodOnSoft : theme.color.accentOnSoft;
33
56
  const defaultIcon = tone === "warn" ? "alert-triangle" : tone === "danger" ? "alert-circle" : tone === "good" ? "check-circle" : tone === "accent" ? "star" : "info";
34
57
  return /* @__PURE__ */ jsxs(
@@ -38,11 +61,11 @@ function AnnouncementBar({
38
61
  accessibilityLiveRegion: "polite",
39
62
  style: [
40
63
  styles.bar,
41
- {
64
+ animate ? {
42
65
  transform: [
43
66
  { translateY: slide.interpolate({ inputRange: [0, 1], outputRange: [-theme.space[40], 0] }) }
44
67
  ]
45
- }
68
+ } : { opacity: slide }
46
69
  ],
47
70
  children: [
48
71
  /* @__PURE__ */ jsx(Icon, { name: icon ?? defaultIcon, size: theme.icon.sm, color: ink }),
@@ -53,8 +76,13 @@ function AnnouncementBar({
53
76
  accessibilityRole: "button",
54
77
  accessibilityLabel: actionLabel,
55
78
  onPress: onAction,
56
- hitSlop: theme.space[10],
57
- style: styles.action,
79
+ hitSlop: {
80
+ top: actionSlopY,
81
+ bottom: actionSlopY,
82
+ left: theme.space[10],
83
+ right: theme.space[10]
84
+ },
85
+ style: ({ pressed }) => [styles.action, pressed ? styles.pressed : null],
58
86
  children: [
59
87
  /* @__PURE__ */ jsx(Text, { style: [styles.actionLabel, { color: ink }], children: actionLabel }),
60
88
  /* @__PURE__ */ jsx(Icon, { name: "chevron-right", size: theme.icon.xs, color: ink })
@@ -65,10 +93,10 @@ function AnnouncementBar({
65
93
  Pressable,
66
94
  {
67
95
  accessibilityRole: "button",
68
- accessibilityLabel: dismissLabel,
69
- onPress: onDismiss,
70
- hitSlop: theme.space[10],
71
- style: styles.iconButton,
96
+ accessibilityLabel: dismissLabel ?? labels.dismiss,
97
+ onPress: dismiss,
98
+ hitSlop: dismissSlop,
99
+ style: ({ pressed }) => [styles.iconButton, pressed ? styles.pressed : null],
72
100
  children: /* @__PURE__ */ jsx(Icon, { name: "x", size: theme.icon.xs, color: ink })
73
101
  }
74
102
  ) : null
@@ -79,7 +107,7 @@ function AnnouncementBar({
79
107
  function AnnouncementHighlights({
80
108
  items
81
109
  }) {
82
- const theme = useLoamTheme();
110
+ const theme = useLoamTheme("announcement");
83
111
  const { styles } = useStyles(sheet, { tone: "info" });
84
112
  if (!items.length) return null;
85
113
  return /* @__PURE__ */ jsx(View, { style: styles.highlights, children: items.map((h) => /* @__PURE__ */ jsxs(View, { style: styles.highlightRow, children: [
@@ -95,12 +123,14 @@ function AnnouncementModal({
95
123
  body,
96
124
  media,
97
125
  highlights,
98
- primaryLabel = "See what changed",
126
+ primaryLabel,
99
127
  onPrimary,
100
- secondaryLabel = "Later",
128
+ secondaryLabel,
101
129
  onSecondary,
102
- motion = "full"
130
+ motion = "full",
131
+ labels: labelsProp
103
132
  }) {
133
+ const labels = useLabels("announcement", DEFAULT_LABELS, labelsProp);
104
134
  const { styles } = useStyles(sheet, { tone: "info" });
105
135
  return /* @__PURE__ */ jsxs(Dialog, { open, onClose: () => onOpenChange(false), accessibilityLabel: title, motion, children: [
106
136
  /* @__PURE__ */ jsxs(View, { style: styles.modalBody, children: [
@@ -120,7 +150,7 @@ function AnnouncementModal({
120
150
  onSecondary?.();
121
151
  onOpenChange(false);
122
152
  },
123
- children: secondaryLabel
153
+ children: secondaryLabel ?? labels.secondary
124
154
  }
125
155
  ),
126
156
  /* @__PURE__ */ jsx(
@@ -132,7 +162,7 @@ function AnnouncementModal({
132
162
  onPrimary?.();
133
163
  onOpenChange(false);
134
164
  },
135
- children: primaryLabel
165
+ children: primaryLabel ?? labels.primary
136
166
  }
137
167
  )
138
168
  ] })
@@ -165,6 +195,7 @@ var sheet = createStyleSheet((theme) => ({
165
195
  fontSize: theme.type.footnote.fontSize,
166
196
  lineHeight: theme.type.footnote.lineHeight
167
197
  },
198
+ pressed: { opacity: theme.state.pressedOpacity },
168
199
  action: { flexDirection: "row", alignItems: "center", gap: theme.space[2] },
169
200
  actionLabel: {
170
201
  fontFamily: theme.font.sans,
@@ -1,10 +1,18 @@
1
- import { Icon } from './chunk-TKVFVF5D.js';
1
+ import { useLabels } from './chunk-APCWFOZW.js';
2
+ import { Icon } from './chunk-UXGIW7OK.js';
2
3
  import * as React from 'react';
3
- import { Dimensions, Animated, Easing, View, StyleSheet, Pressable, Text, Modal } from 'react-native';
4
+ import { Dimensions, Animated, Easing, PanResponder, View, Platform, findNodeHandle, AccessibilityInfo, StyleSheet, Pressable, Text, Modal } from 'react-native';
4
5
  import { createStyleSheet, useLoamTheme, useStyles } from '@btndprojects/loam-theme-native';
5
- import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
6
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
6
7
 
8
+ var DEFAULT_LABELS = {
9
+ navigation: "Navigation",
10
+ close: "Close navigation"
11
+ };
7
12
  var PANEL_FRACTION = 0.78;
13
+ var SWIPE_SLOP = 10;
14
+ var SWIPE_DISMISS_FRACTION = 0.3;
15
+ var SWIPE_FLICK_VELOCITY = 0.4;
8
16
  var SPEC = {
9
17
  /** Panel top padding, before the safe-area inset is added. */
10
18
  panelPadTop: 34,
@@ -33,12 +41,15 @@ function NavDrawer({
33
41
  userName,
34
42
  userEmail,
35
43
  avatarInitials,
36
- closeLabel = "Close navigation",
44
+ closeLabel,
37
45
  safeAreaTop = 0,
38
46
  motion = "full",
39
- inline = false
47
+ inline = false,
48
+ onOpen,
49
+ labels: labelsProp
40
50
  }) {
41
- const theme = useLoamTheme();
51
+ const labels = useLabels("navDrawer", DEFAULT_LABELS, labelsProp);
52
+ const theme = useLoamTheme("nav-drawer");
42
53
  const { styles } = useStyles(navDrawer);
43
54
  const panelWidth = React.useMemo(() => Dimensions.get("window").width * PANEL_FRACTION, []);
44
55
  const reducedMotion = theme.reduceMotion || motion === "reduced";
@@ -47,6 +58,17 @@ function NavDrawer({
47
58
  const translateX = React.useRef(new Animated.Value(-panelWidth)).current;
48
59
  const scrimOpacity = React.useRef(new Animated.Value(0)).current;
49
60
  const panelOpacity = React.useRef(new Animated.Value(1)).current;
61
+ const scrimShown = React.useMemo(
62
+ () => Animated.multiply(
63
+ scrimOpacity,
64
+ translateX.interpolate({
65
+ inputRange: [-panelWidth, 0],
66
+ outputRange: [0, 1],
67
+ extrapolate: "clamp"
68
+ })
69
+ ),
70
+ [scrimOpacity, translateX, panelWidth]
71
+ );
50
72
  const slideDuration = theme.motion.enter.duration;
51
73
  const slideEasing = React.useMemo(
52
74
  () => Easing.bezier(...theme.motion.enter.easing),
@@ -54,6 +76,12 @@ function NavDrawer({
54
76
  );
55
77
  const fadeDuration = theme.duration.base;
56
78
  const fadeEasing = React.useMemo(() => Easing.bezier(...theme.easing.base), [theme.easing.base]);
79
+ const exitSlideDuration = theme.motion.exit.duration;
80
+ const exitSlideEasing = React.useMemo(
81
+ () => Easing.bezier(...theme.motion.exit.easing),
82
+ [theme.motion.exit.easing]
83
+ );
84
+ const exitFadeDuration = Math.min(fadeDuration, exitSlideDuration);
57
85
  const animateIn = React.useCallback(() => {
58
86
  if (instantMotion) {
59
87
  translateX.setValue(0);
@@ -121,13 +149,13 @@ function NavDrawer({
121
149
  Animated.parallel([
122
150
  Animated.timing(panelOpacity, {
123
151
  toValue: 0,
124
- duration: fadeDuration,
152
+ duration: exitFadeDuration,
125
153
  easing: fadeEasing,
126
154
  useNativeDriver: true
127
155
  }),
128
156
  Animated.timing(scrimOpacity, {
129
157
  toValue: 0,
130
- duration: fadeDuration,
158
+ duration: exitFadeDuration,
131
159
  easing: fadeEasing,
132
160
  useNativeDriver: true
133
161
  })
@@ -139,13 +167,13 @@ function NavDrawer({
139
167
  Animated.parallel([
140
168
  Animated.timing(translateX, {
141
169
  toValue: -panelWidth,
142
- duration: slideDuration,
143
- easing: slideEasing,
170
+ duration: exitSlideDuration,
171
+ easing: exitSlideEasing,
144
172
  useNativeDriver: true
145
173
  }),
146
174
  Animated.timing(scrimOpacity, {
147
175
  toValue: 0,
148
- duration: fadeDuration,
176
+ duration: exitFadeDuration,
149
177
  easing: fadeEasing,
150
178
  useNativeDriver: true
151
179
  })
@@ -157,9 +185,9 @@ function NavDrawer({
157
185
  scrimOpacity,
158
186
  panelOpacity,
159
187
  panelWidth,
160
- slideDuration,
161
- slideEasing,
162
- fadeDuration,
188
+ exitSlideDuration,
189
+ exitSlideEasing,
190
+ exitFadeDuration,
163
191
  fadeEasing,
164
192
  reducedMotion,
165
193
  instantMotion
@@ -174,26 +202,76 @@ function NavDrawer({
174
202
  React.useEffect(() => {
175
203
  if (visible && open) animateIn();
176
204
  }, [visible]);
205
+ const pan = React.useMemo(
206
+ () => PanResponder.create({
207
+ onMoveShouldSetPanResponder: (_e, g) => g.dx < -SWIPE_SLOP && Math.abs(g.dx) > Math.abs(g.dy) * 1.5,
208
+ onPanResponderMove: (_e, g) => {
209
+ translateX.setValue(Math.min(0, g.dx));
210
+ },
211
+ onPanResponderRelease: (_e, g) => {
212
+ if (g.dx < -panelWidth * SWIPE_DISMISS_FRACTION || g.vx < -SWIPE_FLICK_VELOCITY) {
213
+ onClose();
214
+ return;
215
+ }
216
+ Animated.timing(translateX, {
217
+ toValue: 0,
218
+ duration: exitSlideDuration,
219
+ easing: exitSlideEasing,
220
+ useNativeDriver: true
221
+ }).start();
222
+ },
223
+ onPanResponderTerminate: () => translateX.setValue(0)
224
+ }),
225
+ [translateX, panelWidth, onClose, exitSlideDuration, exitSlideEasing]
226
+ );
227
+ const edgePan = React.useMemo(
228
+ () => PanResponder.create({
229
+ onMoveShouldSetPanResponder: (_e, g) => g.dx > SWIPE_SLOP && Math.abs(g.dx) > Math.abs(g.dy) * 1.5,
230
+ onPanResponderRelease: (_e, g) => {
231
+ if (g.dx > panelWidth * SWIPE_DISMISS_FRACTION || g.vx > SWIPE_FLICK_VELOCITY) onOpen?.();
232
+ }
233
+ }),
234
+ [panelWidth, onOpen]
235
+ );
236
+ const edge = onOpen && !open ? /* @__PURE__ */ jsx(
237
+ View,
238
+ {
239
+ testID: "nav-drawer-edge",
240
+ ...edgePan.panHandlers,
241
+ style: styles.edge,
242
+ importantForAccessibility: "no-hide-descendants",
243
+ accessibilityElementsHidden: true
244
+ }
245
+ ) : null;
246
+ const panelRef = React.useRef(null);
247
+ React.useEffect(() => {
248
+ if (!visible || !open || Platform.OS === "web") return;
249
+ const node = panelRef.current;
250
+ const tag = node ? findNodeHandle(node) : null;
251
+ if (tag !== null) AccessibilityInfo.setAccessibilityFocus(tag);
252
+ }, [visible, open]);
177
253
  const handleItemPress = (item) => {
178
254
  item.onPress?.();
179
255
  onClose();
180
256
  };
181
257
  const body = /* @__PURE__ */ jsxs(View, { style: [styles.root, inline && StyleSheet.absoluteFill], children: [
182
- /* @__PURE__ */ jsx(Animated.View, { style: [StyleSheet.absoluteFill, styles.scrim, { opacity: scrimOpacity }], children: /* @__PURE__ */ jsx(
258
+ /* @__PURE__ */ jsx(Animated.View, { style: [StyleSheet.absoluteFill, styles.scrim, { opacity: scrimShown }], children: /* @__PURE__ */ jsx(
183
259
  Pressable,
184
260
  {
185
261
  style: StyleSheet.absoluteFill,
186
262
  accessibilityRole: "button",
187
- accessibilityLabel: closeLabel,
263
+ accessibilityLabel: closeLabel ?? labels.close,
188
264
  onPress: onClose
189
265
  }
190
266
  ) }),
191
267
  /* @__PURE__ */ jsxs(
192
268
  Animated.View,
193
269
  {
270
+ ref: panelRef,
271
+ ...pan.panHandlers,
194
272
  accessibilityViewIsModal: true,
195
- accessibilityRole: "menu",
196
- accessibilityLabel: userName ?? "Navigation",
273
+ role: "navigation",
274
+ accessibilityLabel: userName ?? labels.navigation,
197
275
  style: [
198
276
  styles.panel,
199
277
  {
@@ -217,9 +295,10 @@ function NavDrawer({
217
295
  return /* @__PURE__ */ jsxs(
218
296
  Pressable,
219
297
  {
220
- accessibilityRole: "menuitem",
298
+ accessibilityRole: "link",
221
299
  accessibilityLabel: item.label,
222
300
  accessibilityState: { selected: active },
301
+ ...active ? { "aria-current": "page" } : null,
223
302
  onPress: () => handleItemPress(item),
224
303
  style: [styles.item, active ? styles.itemActive : null],
225
304
  children: [
@@ -234,24 +313,35 @@ function NavDrawer({
234
313
  }
235
314
  )
236
315
  ] });
237
- if (inline) return visible ? body : /* @__PURE__ */ jsx(Fragment, {});
238
- return /* @__PURE__ */ jsx(
239
- Modal,
240
- {
241
- visible,
242
- transparent: true,
243
- animationType: "none",
244
- onRequestClose: onClose,
245
- statusBarTranslucent: true,
246
- children: body
247
- }
248
- );
316
+ if (inline) return visible ? body : /* @__PURE__ */ jsx(Fragment, { children: edge });
317
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
318
+ edge,
319
+ /* @__PURE__ */ jsx(
320
+ Modal,
321
+ {
322
+ visible,
323
+ transparent: true,
324
+ animationType: "none",
325
+ onRequestClose: onClose,
326
+ statusBarTranslucent: true,
327
+ children: body
328
+ }
329
+ )
330
+ ] });
249
331
  }
250
332
  var navDrawer = createStyleSheet((theme) => ({
251
333
  root: {
252
334
  flex: 1,
253
335
  flexDirection: "row"
254
336
  },
337
+ edge: {
338
+ position: "absolute",
339
+ left: 0,
340
+ top: 0,
341
+ bottom: 0,
342
+ // The closed-drawer edge strip that catches a swipe-to-open.
343
+ width: theme.space[20]
344
+ },
255
345
  scrim: {
256
346
  backgroundColor: theme.color.scrim,
257
347
  zIndex: theme.z.overlay
@@ -1,7 +1,8 @@
1
- import { expandedProps } from './chunk-RQ3HASCC.js';
2
- import { Icon } from './chunk-TKVFVF5D.js';
1
+ import { expandedProps } from './chunk-W23G6JLF.js';
2
+ import { Icon } from './chunk-UXGIW7OK.js';
3
+ import { springConfig } from './chunk-J64KGCGX.js';
3
4
  import * as React from 'react';
4
- import { Platform, UIManager, LayoutAnimation, View, Animated, Easing, Pressable, Text } from 'react-native';
5
+ import { Platform, UIManager, LayoutAnimation, View, Animated, Pressable, Text } from 'react-native';
5
6
  import { createStyleSheet, useStyles, useLoamTheme } from '@btndprojects/loam-theme-native';
6
7
  import { jsxs, jsx } from 'react/jsx-runtime';
7
8
 
@@ -31,13 +32,12 @@ function Accordion({
31
32
  value,
32
33
  defaultValue,
33
34
  onValueChange,
34
- anchored = false,
35
35
  motion = "full",
36
36
  items,
37
37
  children
38
38
  }) {
39
39
  const { styles } = useStyles(sheet);
40
- const theme = useLoamTheme();
40
+ const theme = useLoamTheme("accordion");
41
41
  const effectiveMotion = motion === "none" ? "none" : theme.reduceMotion ? "reduced" : motion;
42
42
  const isControlled = value !== void 0;
43
43
  const [internal, setInternal] = React.useState(() => toArray(defaultValue));
@@ -54,15 +54,15 @@ function Accordion({
54
54
  });
55
55
  return;
56
56
  }
57
+ const ds = theme.spring.ds;
58
+ const fade = theme.spring.fe.duration;
57
59
  LayoutAnimation.configureNext({
58
- duration,
59
- update: { type: type2 },
60
- ...anchored ? {
61
- create: { type: type2, property: LayoutAnimation.Properties.opacity, duration },
62
- delete: { type: type2, property: LayoutAnimation.Properties.opacity, duration }
63
- } : {}
60
+ duration: ds.duration,
61
+ update: { type: LayoutAnimation.Types.spring, springDamping: ds.dampingRatio },
62
+ create: { type: LayoutAnimation.Types.easeOut, property: LayoutAnimation.Properties.opacity, duration: fade },
63
+ delete: { type: LayoutAnimation.Types.easeOut, property: LayoutAnimation.Properties.opacity, duration: fade }
64
64
  });
65
- }, [anchored, effectiveMotion, theme.motion.expand.duration]);
65
+ }, [effectiveMotion, theme.motion.expand.duration, theme.spring.ds, theme.spring.fe.duration]);
66
66
  const commit = React.useCallback(
67
67
  (next) => {
68
68
  if (!isControlled) setInternal(next);
@@ -113,7 +113,7 @@ function AccordionTrigger({ children }) {
113
113
  const { isOpen, toggle, motion } = useAccordionContext();
114
114
  const { value } = useAccordionItemContext();
115
115
  const { styles } = useStyles(sheet);
116
- const theme = useLoamTheme();
116
+ const theme = useLoamTheme("accordion");
117
117
  const expanded = isOpen(value);
118
118
  const rotate = React.useRef(new Animated.Value(expanded ? 1 : 0)).current;
119
119
  React.useEffect(() => {
@@ -121,14 +121,12 @@ function AccordionTrigger({ children }) {
121
121
  rotate.setValue(expanded ? 1 : 0);
122
122
  return;
123
123
  }
124
- const spec = expanded ? theme.motion.expand : theme.motion.collapse;
125
- Animated.timing(rotate, {
124
+ Animated.spring(rotate, {
125
+ ...springConfig(theme, "ds"),
126
126
  toValue: expanded ? 1 : 0,
127
- duration: spec.duration,
128
- easing: Easing.bezier(...spec.easing),
129
127
  useNativeDriver: true
130
128
  }).start();
131
- }, [expanded, motion, rotate, theme.motion.expand, theme.motion.collapse]);
129
+ }, [expanded, motion, rotate, theme]);
132
130
  const rotation = rotate.interpolate({ inputRange: [0, 1], outputRange: ["0deg", "180deg"] });
133
131
  return /* @__PURE__ */ jsxs(
134
132
  Pressable,
@@ -1,4 +1,7 @@
1
1
  import '../chunk-J4KLDGI4.js';
2
- export { Coachmark, CoachmarkArrow, CoachmarkDots, CoachmarkHint, Hotspot } from '../chunk-P23EQNRQ.js';
3
- import '../chunk-JUAMLEHX.js';
4
- import '../chunk-TKVFVF5D.js';
2
+ export { Coachmark, CoachmarkArrow, CoachmarkDots, CoachmarkHint, Hotspot } from '../chunk-YAAHPATV.js';
3
+ import '../chunk-H7DWSL4O.js';
4
+ import '../chunk-APCWFOZW.js';
5
+ import '../chunk-UXGIW7OK.js';
6
+ import '../chunk-J64KGCGX.js';
7
+ import '../chunk-I2KLQ2HA.js';
@@ -1,4 +1,6 @@
1
1
  import '../chunk-ZK2H4O5P.js';
2
- export { CodeBlock } from '../chunk-TOXAGRDQ.js';
3
- import '../chunk-4ZAHCY44.js';
4
- import '../chunk-TKVFVF5D.js';
2
+ export { CodeBlock } from '../chunk-RXSCIO6W.js';
3
+ import '../chunk-C6APNDVA.js';
4
+ import '../chunk-APCWFOZW.js';
5
+ import '../chunk-UXGIW7OK.js';
6
+ import '../chunk-I2KLQ2HA.js';
@@ -1,7 +1,9 @@
1
- export { ColorField } from '../chunk-CDRZHT42.js';
1
+ export { ColorField } from '../chunk-W63AJTM7.js';
2
2
  import '../chunk-KTAC4MGE.js';
3
- import '../chunk-ITTYJZWX.js';
3
+ import '../chunk-7BUIKDD6.js';
4
4
  import '../chunk-3NMD74ZU.js';
5
5
  import '../chunk-NY2U3PBI.js';
6
- import '../chunk-6N33LFQA.js';
7
- import '../chunk-TKVFVF5D.js';
6
+ import '../chunk-APCWFOZW.js';
7
+ import '../chunk-UXGIW7OK.js';
8
+ import '../chunk-J64KGCGX.js';
9
+ import '../chunk-I2KLQ2HA.js';