@lmb-it/kitsconcerto-native 0.1.243 → 0.1.244

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 (282) hide show
  1. package/animations/index.cjs +25 -15
  2. package/animations/index.cjs.map +1 -1
  3. package/animations/index.js +25 -15
  4. package/animations/index.js.map +1 -1
  5. package/apps/mobile/src/Core/AutoComplete/index.cjs +105 -64
  6. package/apps/mobile/src/Core/AutoComplete/index.cjs.map +1 -1
  7. package/apps/mobile/src/Core/AutoComplete/index.js +106 -65
  8. package/apps/mobile/src/Core/AutoComplete/index.js.map +1 -1
  9. package/apps/mobile/src/Core/Dropdown/index.cjs +2 -0
  10. package/apps/mobile/src/Core/Dropdown/index.cjs.map +1 -1
  11. package/apps/mobile/src/Core/Dropdown/index.js +2 -0
  12. package/apps/mobile/src/Core/Dropdown/index.js.map +1 -1
  13. package/apps/mobile/src/Core/Trees/components/CoreToolbar.cjs +2 -0
  14. package/apps/mobile/src/Core/Trees/components/CoreToolbar.cjs.map +1 -1
  15. package/apps/mobile/src/Core/Trees/components/CoreToolbar.js +2 -0
  16. package/apps/mobile/src/Core/Trees/components/CoreToolbar.js.map +1 -1
  17. package/apps/mobile/src/Factory/ResponsiveElement.cjs +2 -0
  18. package/apps/mobile/src/Factory/ResponsiveElement.cjs.map +1 -1
  19. package/apps/mobile/src/Factory/ResponsiveElement.js +2 -0
  20. package/apps/mobile/src/Factory/ResponsiveElement.js.map +1 -1
  21. package/apps/mobile/src/Factory/helpers/cssVarMap.cjs +16 -0
  22. package/apps/mobile/src/Factory/helpers/cssVarMap.cjs.map +1 -1
  23. package/apps/mobile/src/Factory/helpers/cssVarMap.js +16 -0
  24. package/apps/mobile/src/Factory/helpers/cssVarMap.js.map +1 -1
  25. package/apps/mobile/src/Factory/helpers/style.cjs +17 -1
  26. package/apps/mobile/src/Factory/helpers/style.cjs.map +1 -1
  27. package/apps/mobile/src/Factory/helpers/style.js +17 -1
  28. package/apps/mobile/src/Factory/helpers/style.js.map +1 -1
  29. package/apps/mobile/src/Factory/useSeparator.cjs +1 -0
  30. package/apps/mobile/src/Factory/useSeparator.cjs.map +1 -1
  31. package/apps/mobile/src/Factory/useSeparator.js +1 -0
  32. package/apps/mobile/src/Factory/useSeparator.js.map +1 -1
  33. package/components/Accordion/accordion.cjs +2 -0
  34. package/components/Accordion/accordion.cjs.map +1 -1
  35. package/components/Accordion/accordion.js +2 -0
  36. package/components/Accordion/accordion.js.map +1 -1
  37. package/components/Badge/index.cjs +2 -0
  38. package/components/Badge/index.cjs.map +1 -1
  39. package/components/Badge/index.js +2 -0
  40. package/components/Badge/index.js.map +1 -1
  41. package/components/BottomTabBar/index.cjs +2 -0
  42. package/components/BottomTabBar/index.cjs.map +1 -1
  43. package/components/BottomTabBar/index.js +2 -0
  44. package/components/BottomTabBar/index.js.map +1 -1
  45. package/components/Button/Button.cjs +2 -0
  46. package/components/Button/Button.cjs.map +1 -1
  47. package/components/Button/Button.js +2 -0
  48. package/components/Button/Button.js.map +1 -1
  49. package/components/MessageComposer/index.cjs +2 -0
  50. package/components/MessageComposer/index.cjs.map +1 -1
  51. package/components/MessageComposer/index.js +2 -0
  52. package/components/MessageComposer/index.js.map +1 -1
  53. package/components/SegmentedControl/index.cjs +2 -0
  54. package/components/SegmentedControl/index.cjs.map +1 -1
  55. package/components/SegmentedControl/index.js +2 -0
  56. package/components/SegmentedControl/index.js.map +1 -1
  57. package/components/SkeletonText/index.cjs +2 -0
  58. package/components/SkeletonText/index.cjs.map +1 -1
  59. package/components/SkeletonText/index.js +2 -0
  60. package/components/SkeletonText/index.js.map +1 -1
  61. package/components/Tabs/index.cjs +2 -0
  62. package/components/Tabs/index.cjs.map +1 -1
  63. package/components/Tabs/index.js +2 -0
  64. package/components/Tabs/index.js.map +1 -1
  65. package/components/overlay/ConfirmDialog/index.cjs +146 -89
  66. package/components/overlay/ConfirmDialog/index.cjs.map +1 -1
  67. package/components/overlay/ConfirmDialog/index.js +147 -90
  68. package/components/overlay/ConfirmDialog/index.js.map +1 -1
  69. package/components/overlay/Dialog/index.cjs +90 -64
  70. package/components/overlay/Dialog/index.cjs.map +1 -1
  71. package/components/overlay/Dialog/index.js +91 -65
  72. package/components/overlay/Dialog/index.js.map +1 -1
  73. package/components/overlay/Toast/index.cjs +19 -18
  74. package/components/overlay/Toast/index.cjs.map +1 -1
  75. package/components/overlay/Toast/index.js +22 -21
  76. package/components/overlay/Toast/index.js.map +1 -1
  77. package/contexts/Locale/index.cjs +2 -0
  78. package/contexts/Locale/index.cjs.map +1 -1
  79. package/contexts/Locale/index.js +2 -0
  80. package/contexts/Locale/index.js.map +1 -1
  81. package/contexts/Main/index.cjs +2 -0
  82. package/contexts/Main/index.cjs.map +1 -1
  83. package/contexts/Main/index.js +2 -0
  84. package/contexts/Main/index.js.map +1 -1
  85. package/contexts/Theme/KitsThemeProvider.cjs +2 -0
  86. package/contexts/Theme/KitsThemeProvider.cjs.map +1 -1
  87. package/contexts/Theme/KitsThemeProvider.js +2 -0
  88. package/contexts/Theme/KitsThemeProvider.js.map +1 -1
  89. package/contexts/Theme/index.cjs +1 -0
  90. package/contexts/Theme/index.cjs.map +1 -1
  91. package/contexts/Theme/index.js +1 -0
  92. package/contexts/Theme/index.js.map +1 -1
  93. package/contexts/Theme/resolvers.cjs +4 -0
  94. package/contexts/Theme/resolvers.cjs.map +1 -1
  95. package/contexts/Theme/resolvers.js +4 -0
  96. package/contexts/Theme/resolvers.js.map +1 -1
  97. package/data/DataView/Pagination/index.cjs +2 -0
  98. package/data/DataView/Pagination/index.cjs.map +1 -1
  99. package/data/DataView/Pagination/index.js +2 -0
  100. package/data/DataView/Pagination/index.js.map +1 -1
  101. package/data/TreeView/index.cjs +2 -0
  102. package/data/TreeView/index.cjs.map +1 -1
  103. package/data/TreeView/index.js +2 -0
  104. package/data/TreeView/index.js.map +1 -1
  105. package/form/controls/Checkbox/checkbox.cjs +2 -0
  106. package/form/controls/Checkbox/checkbox.cjs.map +1 -1
  107. package/form/controls/Checkbox/checkbox.js +2 -0
  108. package/form/controls/Checkbox/checkbox.js.map +1 -1
  109. package/form/controls/RadioButton/radiobutton.cjs +2 -0
  110. package/form/controls/RadioButton/radiobutton.cjs.map +1 -1
  111. package/form/controls/RadioButton/radiobutton.js +2 -0
  112. package/form/controls/RadioButton/radiobutton.js.map +1 -1
  113. package/form/controls/SelectButton/index.cjs +2 -0
  114. package/form/controls/SelectButton/index.cjs.map +1 -1
  115. package/form/controls/SelectButton/index.js +2 -0
  116. package/form/controls/SelectButton/index.js.map +1 -1
  117. package/form/controls/TriStateCheckbox/index.cjs +2 -0
  118. package/form/controls/TriStateCheckbox/index.cjs.map +1 -1
  119. package/form/controls/TriStateCheckbox/index.js +2 -0
  120. package/form/controls/TriStateCheckbox/index.js.map +1 -1
  121. package/form/file-pickers/MainUploader/index.cjs +1 -0
  122. package/form/file-pickers/MainUploader/index.cjs.map +1 -1
  123. package/form/file-pickers/MainUploader/index.js +1 -0
  124. package/form/file-pickers/MainUploader/index.js.map +1 -1
  125. package/form/helpers/ErrorMessage/errormessage.cjs +2 -0
  126. package/form/helpers/ErrorMessage/errormessage.cjs.map +1 -1
  127. package/form/helpers/ErrorMessage/errormessage.js +2 -0
  128. package/form/helpers/ErrorMessage/errormessage.js.map +1 -1
  129. package/form/helpers/FormContainer/index.cjs +2 -0
  130. package/form/helpers/FormContainer/index.cjs.map +1 -1
  131. package/form/helpers/FormContainer/index.js +2 -0
  132. package/form/helpers/FormContainer/index.js.map +1 -1
  133. package/form/helpers/Label/label.cjs +2 -0
  134. package/form/helpers/Label/label.cjs.map +1 -1
  135. package/form/helpers/Label/label.js +2 -0
  136. package/form/helpers/Label/label.js.map +1 -1
  137. package/form/inputs/InputMask/index.cjs +2 -0
  138. package/form/inputs/InputMask/index.cjs.map +1 -1
  139. package/form/inputs/InputMask/index.js +2 -0
  140. package/form/inputs/InputMask/index.js.map +1 -1
  141. package/form/inputs/InputNumber/index.cjs +2 -0
  142. package/form/inputs/InputNumber/index.cjs.map +1 -1
  143. package/form/inputs/InputNumber/index.js +2 -0
  144. package/form/inputs/InputNumber/index.js.map +1 -1
  145. package/form/inputs/InputPassword/index.cjs +2 -0
  146. package/form/inputs/InputPassword/index.cjs.map +1 -1
  147. package/form/inputs/InputPassword/index.js +2 -0
  148. package/form/inputs/InputPassword/index.js.map +1 -1
  149. package/form/inputs/InputSwitch/index.cjs +2 -0
  150. package/form/inputs/InputSwitch/index.cjs.map +1 -1
  151. package/form/inputs/InputSwitch/index.js +2 -0
  152. package/form/inputs/InputSwitch/index.js.map +1 -1
  153. package/form/inputs/InputText/index.cjs +2 -0
  154. package/form/inputs/InputText/index.cjs.map +1 -1
  155. package/form/inputs/InputText/index.js +2 -0
  156. package/form/inputs/InputText/index.js.map +1 -1
  157. package/form/inputs/InputTextarea/index.cjs +2 -0
  158. package/form/inputs/InputTextarea/index.cjs.map +1 -1
  159. package/form/inputs/InputTextarea/index.js +2 -0
  160. package/form/inputs/InputTextarea/index.js.map +1 -1
  161. package/form/inputs/PhoneInput/index.cjs +2 -0
  162. package/form/inputs/PhoneInput/index.cjs.map +1 -1
  163. package/form/inputs/PhoneInput/index.js +2 -0
  164. package/form/inputs/PhoneInput/index.js.map +1 -1
  165. package/form/inputs/RadiusPicker/components/NumericRadiusInput.cjs +1 -0
  166. package/form/inputs/RadiusPicker/components/NumericRadiusInput.cjs.map +1 -1
  167. package/form/inputs/RadiusPicker/components/NumericRadiusInput.js +1 -0
  168. package/form/inputs/RadiusPicker/components/NumericRadiusInput.js.map +1 -1
  169. package/form/selects/AutoComplete/index.cjs +2 -0
  170. package/form/selects/AutoComplete/index.cjs.map +1 -1
  171. package/form/selects/AutoComplete/index.js +2 -0
  172. package/form/selects/AutoComplete/index.js.map +1 -1
  173. package/form/selects/Dropdown/index.cjs +2 -0
  174. package/form/selects/Dropdown/index.cjs.map +1 -1
  175. package/form/selects/Dropdown/index.js +2 -0
  176. package/form/selects/Dropdown/index.js.map +1 -1
  177. package/form/selects/ListBox/index.cjs +2 -0
  178. package/form/selects/ListBox/index.cjs.map +1 -1
  179. package/form/selects/ListBox/index.js +2 -0
  180. package/form/selects/ListBox/index.js.map +1 -1
  181. package/form/selects/MultiSelect/index.cjs +2 -0
  182. package/form/selects/MultiSelect/index.cjs.map +1 -1
  183. package/form/selects/MultiSelect/index.js +2 -0
  184. package/form/selects/MultiSelect/index.js.map +1 -1
  185. package/form/selects/TreeSelect/index.cjs +2 -0
  186. package/form/selects/TreeSelect/index.cjs.map +1 -1
  187. package/form/selects/TreeSelect/index.js +2 -0
  188. package/form/selects/TreeSelect/index.js.map +1 -1
  189. package/form-renderer/components/layout/FieldWrapper.cjs +2 -0
  190. package/form-renderer/components/layout/FieldWrapper.cjs.map +1 -1
  191. package/form-renderer/components/layout/FieldWrapper.js +2 -0
  192. package/form-renderer/components/layout/FieldWrapper.js.map +1 -1
  193. package/hooks/shadowPresets.cjs +1 -0
  194. package/hooks/shadowPresets.cjs.map +1 -1
  195. package/hooks/shadowPresets.js +1 -0
  196. package/hooks/shadowPresets.js.map +1 -1
  197. package/hooks/useFocusStyles.cjs +2 -0
  198. package/hooks/useFocusStyles.cjs.map +1 -1
  199. package/hooks/useFocusStyles.js +2 -0
  200. package/hooks/useFocusStyles.js.map +1 -1
  201. package/index.cjs +5 -0
  202. package/index.cjs.map +1 -1
  203. package/index.d.ts +32 -1
  204. package/index.js +1 -0
  205. package/index.js.map +1 -1
  206. package/layout/Center/index.cjs +2 -0
  207. package/layout/Center/index.cjs.map +1 -1
  208. package/layout/Center/index.js +2 -0
  209. package/layout/Center/index.js.map +1 -1
  210. package/layout/Container/container.cjs +2 -0
  211. package/layout/Container/container.cjs.map +1 -1
  212. package/layout/Container/container.js +2 -0
  213. package/layout/Container/container.js.map +1 -1
  214. package/layout/Flex/index.cjs +2 -0
  215. package/layout/Flex/index.cjs.map +1 -1
  216. package/layout/Flex/index.js +2 -0
  217. package/layout/Flex/index.js.map +1 -1
  218. package/layout/HStack/index.cjs +2 -0
  219. package/layout/HStack/index.cjs.map +1 -1
  220. package/layout/HStack/index.js +2 -0
  221. package/layout/HStack/index.js.map +1 -1
  222. package/layout/List/index.cjs +2 -0
  223. package/layout/List/index.cjs.map +1 -1
  224. package/layout/List/index.js +2 -0
  225. package/layout/List/index.js.map +1 -1
  226. package/layout/ListItem/index.cjs +2 -0
  227. package/layout/ListItem/index.cjs.map +1 -1
  228. package/layout/ListItem/index.js +2 -0
  229. package/layout/ListItem/index.js.map +1 -1
  230. package/layout/ScrollView/index.cjs +2 -0
  231. package/layout/ScrollView/index.cjs.map +1 -1
  232. package/layout/ScrollView/index.js +2 -0
  233. package/layout/ScrollView/index.js.map +1 -1
  234. package/layout/VStack/index.cjs +2 -0
  235. package/layout/VStack/index.cjs.map +1 -1
  236. package/layout/VStack/index.js +2 -0
  237. package/layout/VStack/index.js.map +1 -1
  238. package/package.json +1 -1
  239. package/packages/types/src/Theme/alphaColors.cjs +24 -0
  240. package/packages/types/src/Theme/alphaColors.cjs.map +1 -0
  241. package/packages/types/src/Theme/alphaColors.js +19 -0
  242. package/packages/types/src/Theme/alphaColors.js.map +1 -0
  243. package/packages/types/src/Theme/resolvers.cjs +6 -0
  244. package/packages/types/src/Theme/resolvers.cjs.map +1 -1
  245. package/packages/types/src/Theme/resolvers.js +6 -0
  246. package/packages/types/src/Theme/resolvers.js.map +1 -1
  247. package/primitives/Box/index.cjs +2 -0
  248. package/primitives/Box/index.cjs.map +1 -1
  249. package/primitives/Box/index.js +2 -0
  250. package/primitives/Box/index.js.map +1 -1
  251. package/primitives/Card/index.cjs +2 -0
  252. package/primitives/Card/index.cjs.map +1 -1
  253. package/primitives/Card/index.js +2 -0
  254. package/primitives/Card/index.js.map +1 -1
  255. package/primitives/Divider/index.cjs +2 -0
  256. package/primitives/Divider/index.cjs.map +1 -1
  257. package/primitives/Divider/index.js +2 -0
  258. package/primitives/Divider/index.js.map +1 -1
  259. package/primitives/Heading/index.cjs +2 -0
  260. package/primitives/Heading/index.cjs.map +1 -1
  261. package/primitives/Heading/index.js +2 -0
  262. package/primitives/Heading/index.js.map +1 -1
  263. package/primitives/Icon/index.cjs +1 -0
  264. package/primitives/Icon/index.cjs.map +1 -1
  265. package/primitives/Icon/index.js +1 -0
  266. package/primitives/Icon/index.js.map +1 -1
  267. package/primitives/Image/index.cjs +2 -0
  268. package/primitives/Image/index.cjs.map +1 -1
  269. package/primitives/Image/index.js +2 -0
  270. package/primitives/Image/index.js.map +1 -1
  271. package/primitives/Skeleton/index.cjs +2 -0
  272. package/primitives/Skeleton/index.cjs.map +1 -1
  273. package/primitives/Skeleton/index.js +2 -0
  274. package/primitives/Skeleton/index.js.map +1 -1
  275. package/primitives/Svg/index.cjs +2 -0
  276. package/primitives/Svg/index.cjs.map +1 -1
  277. package/primitives/Svg/index.js +2 -0
  278. package/primitives/Svg/index.js.map +1 -1
  279. package/primitives/Text/index.cjs +2 -0
  280. package/primitives/Text/index.cjs.map +1 -1
  281. package/primitives/Text/index.js +2 -0
  282. package/primitives/Text/index.js.map +1 -1
@@ -3,11 +3,11 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var jsxRuntime = require('react/jsx-runtime');
6
+ var React = require('react');
6
7
  var reactNative = require('react-native');
7
8
  var Animated = require('react-native-reanimated');
8
9
  var reactNativeSafeAreaContext = require('react-native-safe-area-context');
9
10
  var useSeverityColors = require('../../../hooks/useSeverityColors.cjs');
10
- require('react');
11
11
  require('../../../contexts/DialogContext.cjs');
12
12
  var useResolvedStyle = require('../../../hooks/useResolvedStyle.cjs');
13
13
  var index = require('../../../animations/index.cjs');
@@ -15,6 +15,18 @@ var KitsThemeProvider_native = require('../../../contexts/Theme/KitsThemeProvide
15
15
  var index_native = require('../../../primitives/Icon/index.cjs');
16
16
  var index_native$1 = require('../../../primitives/Text/index.cjs');
17
17
 
18
+ function useOverlayPresence(visible) {
19
+ const [mounted, setMounted] = React.useState(visible);
20
+ const visibleRef = React.useRef(visible);
21
+ React.useEffect(() => {
22
+ visibleRef.current = visible;
23
+ if (visible) setMounted(true);
24
+ }, [visible]);
25
+ const handleExitFinished = React.useCallback(() => {
26
+ if (!visibleRef.current) setMounted(false);
27
+ }, []);
28
+ return { mounted, handleExitFinished };
29
+ }
18
30
  function KitsDialogControlled({ state, onHide }) {
19
31
  const {
20
32
  children,
@@ -52,6 +64,7 @@ function KitsDialogControlled({ state, onHide }) {
52
64
  const borderColor = colors?.border ?? resolveToken("border");
53
65
  const subtextColor = resolveToken("gray.500");
54
66
  const grabberColor = resolveToken("gray.300");
67
+ const scrimColor = resolveToken("black-alpha-40");
55
68
  const brandLogo = type === "brand" ? theme.config.logo : null;
56
69
  const resolvedStyle = useResolvedStyle.default(style || {});
57
70
  const resolvedContentStyle = useResolvedStyle.default(contentStyle || {});
@@ -81,76 +94,87 @@ function KitsDialogControlled({ state, onHide }) {
81
94
  }
82
95
  onHide();
83
96
  };
84
- if (!state.visible) return null;
97
+ const { mounted, handleExitFinished } = useOverlayPresence(!!state.visible);
98
+ if (!mounted) return null;
85
99
  const content = typeof children === "function" ? children(hide) : children;
86
100
  const contentMode = contentProp != null ? typeof contentProp === "function" ? contentProp({ hide }) : contentProp : null;
87
- return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Modal, { visible: true, transparent: true, animationType: "none", onRequestClose: hide, children: /* @__PURE__ */ jsxRuntime.jsxs(Animated.View, { entering: Animated.FadeIn.duration(index.overlayAnimations.scrim.enterDuration), style: [isSheet ? styles.sheetOverlay : styles.overlay, resolvedMaskStyle], children: [
88
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { style: reactNative.StyleSheet.absoluteFill, onPress: dismissableMask ? hide : void 0 }),
89
- /* @__PURE__ */ jsxRuntime.jsx(
90
- Animated.View,
91
- {
92
- entering: isSheet ? Animated.SlideInDown.springify().damping(index.overlayAnimations.sheet.enter.damping).stiffness(index.overlayAnimations.sheet.enter.stiffness) : Animated.ZoomIn.springify().damping(index.overlayAnimations.dialog.enter.damping).stiffness(index.overlayAnimations.dialog.enter.stiffness),
93
- style: [
94
- styles.panel,
95
- isSheet && styles.sheetPanel,
96
- { backgroundColor: surfaceColor, borderColor },
97
- // Explicit `breakpoints` win even when responsive=false (web parity)
98
- !isSheet && !hasExplicitWidth && (breakpoints != null || responsive) ? { width: responsiveWidth } : null,
99
- resolvedStyle,
100
- resolvedContentStyle
101
- ],
102
- children: contentMode != null ? contentMode : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
103
- isSheet && /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles.grabber, { backgroundColor: grabberColor }] }),
104
- colors && !isSheet && /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: { height: 4, backgroundColor: colors.solid, borderTopLeftRadius: 16, borderTopRightRadius: 16 } }),
105
- !hideHeader && headerRender != null && headerRender({ close: () => {
106
- void hide();
107
- } }),
108
- !hideHeader && headerRender == null && rest.header != null && /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles.header, { borderBottomColor: borderColor }, resolvedHeaderStyle], children: [
109
- (icon || brandLogo) && colors && /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: {
110
- width: 36,
111
- height: 36,
112
- borderRadius: 18,
113
- backgroundColor: colors.iconBg,
114
- alignItems: "center",
115
- justifyContent: "center",
116
- marginRight: 12
117
- }, children: brandLogo ? brandLogo : typeof icon === "string" ? /* @__PURE__ */ jsxRuntime.jsx(index_native.Icon, { name: icon, size: "lg", color: colors.iconFg }) : icon }),
118
- /* @__PURE__ */ jsxRuntime.jsx(index_native$1.default, { style: { fontSize: 18, fontWeight: "700", color: textColor, flex: 1 }, children: rest.header }),
119
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { onPress: hide, hitSlop: 8, children: closeIcon ?? /* @__PURE__ */ jsxRuntime.jsx(index_native$1.default, { style: { fontSize: 18, color: subtextColor }, children: "\u2715" }) })
120
- ] }),
121
- /* @__PURE__ */ jsxRuntime.jsx(
122
- reactNative.ScrollView,
123
- {
124
- style: [styles.body, resolvedBodyStyle],
125
- contentContainerStyle: styles.bodyContent,
126
- showsVerticalScrollIndicator: false,
127
- children: content
128
- }
129
- ),
130
- (footerRender != null || rest.footer != null) && /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [
131
- styles.footer,
132
- { borderTopColor: borderColor },
133
- isSheet && { paddingBottom: 12 + insets.bottom },
134
- resolvedFooterStyle
135
- ], children: footerRender ? footerRender({ close: () => {
136
- void hide();
137
- } }) : rest.footer })
138
- ] })
139
- }
140
- )
141
- ] }) });
101
+ return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Modal, { visible: true, transparent: true, animationType: "none", onRequestClose: hide, children: state.visible && /* @__PURE__ */ jsxRuntime.jsxs(
102
+ Animated.View,
103
+ {
104
+ entering: Animated.FadeIn.duration(index.overlayAnimations.scrim.enterDuration),
105
+ exiting: Animated.FadeOut.duration(index.overlayAnimations.scrim.exitDuration),
106
+ style: [isSheet ? styles.sheetOverlay : styles.overlay, { backgroundColor: scrimColor }, resolvedMaskStyle],
107
+ children: [
108
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { style: reactNative.StyleSheet.absoluteFill, onPress: dismissableMask ? hide : void 0 }),
109
+ /* @__PURE__ */ jsxRuntime.jsx(
110
+ Animated.View,
111
+ {
112
+ entering: isSheet ? Animated.SlideInDown.springify().damping(index.overlayAnimations.sheet.enter.damping).stiffness(index.overlayAnimations.sheet.enter.stiffness).mass(index.overlayAnimations.sheet.enter.mass) : Animated.ZoomIn.springify().damping(index.overlayAnimations.dialog.enter.damping).stiffness(index.overlayAnimations.dialog.enter.stiffness).mass(index.overlayAnimations.dialog.enter.mass),
113
+ exiting: (isSheet ? Animated.SlideOutDown.duration(index.overlayAnimations.sheet.exitDuration).easing(Animated.Easing.in(Animated.Easing.ease)) : Animated.ZoomOut.duration(index.overlayAnimations.dialog.exitDuration).easing(Animated.Easing.in(Animated.Easing.ease))).withCallback((finished) => {
114
+ "worklet";
115
+ if (finished) Animated.runOnJS(handleExitFinished)();
116
+ }),
117
+ style: [
118
+ styles.panel,
119
+ isSheet && styles.sheetPanel,
120
+ { backgroundColor: surfaceColor, borderColor },
121
+ // Explicit `breakpoints` win even when responsive=false (web parity)
122
+ !isSheet && !hasExplicitWidth && (breakpoints != null || responsive) ? { width: responsiveWidth } : null,
123
+ resolvedStyle,
124
+ resolvedContentStyle
125
+ ],
126
+ children: contentMode != null ? contentMode : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
127
+ isSheet && /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles.grabber, { backgroundColor: grabberColor }] }),
128
+ colors && !isSheet && /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: { height: 4, backgroundColor: colors.solid, borderTopLeftRadius: 20, borderTopRightRadius: 20 } }),
129
+ !hideHeader && headerRender != null && headerRender({ close: () => {
130
+ void hide();
131
+ } }),
132
+ !hideHeader && headerRender == null && rest.header != null && /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles.header, { borderBottomColor: borderColor }, resolvedHeaderStyle], children: [
133
+ (icon || brandLogo) && colors && /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: {
134
+ width: 36,
135
+ height: 36,
136
+ borderRadius: 18,
137
+ backgroundColor: colors.iconBg,
138
+ alignItems: "center",
139
+ justifyContent: "center",
140
+ marginRight: 12
141
+ }, children: brandLogo ? brandLogo : typeof icon === "string" ? /* @__PURE__ */ jsxRuntime.jsx(index_native.Icon, { name: icon, size: "lg", color: colors.iconFg }) : icon }),
142
+ /* @__PURE__ */ jsxRuntime.jsx(index_native$1.default, { style: { fontSize: 18, fontWeight: "700", color: textColor, flex: 1 }, children: rest.header }),
143
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { onPress: hide, hitSlop: 8, children: closeIcon ?? /* @__PURE__ */ jsxRuntime.jsx(index_native$1.default, { style: { fontSize: 18, color: subtextColor }, children: "\u2715" }) })
144
+ ] }),
145
+ /* @__PURE__ */ jsxRuntime.jsx(
146
+ reactNative.ScrollView,
147
+ {
148
+ style: [styles.body, resolvedBodyStyle],
149
+ contentContainerStyle: styles.bodyContent,
150
+ showsVerticalScrollIndicator: false,
151
+ children: content
152
+ }
153
+ ),
154
+ (footerRender != null || rest.footer != null) && /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [
155
+ styles.footer,
156
+ { borderTopColor: borderColor },
157
+ isSheet && { paddingBottom: 12 + insets.bottom },
158
+ resolvedFooterStyle
159
+ ], children: footerRender ? footerRender({ close: () => {
160
+ void hide();
161
+ } }) : rest.footer })
162
+ ] })
163
+ }
164
+ )
165
+ ]
166
+ }
167
+ ) });
142
168
  }
143
169
  const styles = reactNative.StyleSheet.create({
144
170
  overlay: {
145
171
  flex: 1,
146
- backgroundColor: "rgba(0,0,0,0.45)",
147
172
  justifyContent: "center",
148
173
  alignItems: "center",
149
174
  padding: 24
150
175
  },
151
176
  sheetOverlay: {
152
177
  flex: 1,
153
- backgroundColor: "rgba(0,0,0,0.45)",
154
178
  justifyContent: "flex-end"
155
179
  },
156
180
  sheetPanel: {
@@ -172,17 +196,19 @@ const styles = reactNative.StyleSheet.create({
172
196
  marginBottom: 6
173
197
  },
174
198
  panel: {
175
- borderRadius: 16,
199
+ // 20 == radii.xl (no numeric radii resolver on native — see report).
200
+ borderRadius: 20,
176
201
  borderWidth: 1,
177
202
  minWidth: 250,
178
203
  maxWidth: "90%",
179
204
  maxHeight: "80%",
180
205
  overflow: "hidden",
181
- elevation: 12,
206
+ // Subtle elevation: low opacity, wide blur, minimal offset.
207
+ elevation: 6,
182
208
  shadowColor: "#000",
183
- shadowOffset: { width: 0, height: 6 },
184
- shadowOpacity: 0.2,
185
- shadowRadius: 12
209
+ shadowOffset: { width: 0, height: 2 },
210
+ shadowOpacity: 0.15,
211
+ shadowRadius: 20
186
212
  },
187
213
  header: {
188
214
  flexDirection: "row",
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../../../src/components/overlay/Dialog/index.native.tsx"],"sourcesContent":["import React from \"react\";\nimport {Modal, Pressable, ScrollView, StyleSheet, View, useWindowDimensions} from \"react-native\";\nimport Animated, {FadeIn, SlideInDown, ZoomIn} from \"react-native-reanimated\";\nimport {useSafeAreaInsets} from \"react-native-safe-area-context\";\nimport {Icon, Text} from \"../../../_compat\";\nimport type {IKitsDialogControlled} from \"@lmb-it/kitsconcerto-types\";\nimport {useKitsTheme} from \"../../../contexts/Theme\";\nimport {useSeverityColors} from \"../../../hooks/useSeverityColors\";\nimport {useResolvedStyle} from \"../../../hooks\";\nimport {overlayAnimations as anim} from \"../../../animations\";\n\nexport default function KitsDialogControlled({state, onHide}: IKitsDialogControlled) {\n const {\n children,\n content: contentProp,\n onClose,\n asyncClose,\n type,\n icon,\n style,\n contentStyle,\n headerStyle,\n maskStyle,\n position = 'center',\n responsive = true,\n hideHeader,\n headerRender,\n footerRender,\n footerStyle,\n canClose,\n bodyStyle,\n closeIcon,\n // Native default true preserves historical tap-to-dismiss; web's\n // PrimeReact default is false — pass explicitly in shared code.\n dismissableMask = true,\n breakpoints,\n ...rest\n } = state;\n const {resolveToken, theme} = useKitsTheme();\n const severityColors = useSeverityColors(type || 'secondary');\n const colors = type ? severityColors : null;\n const insets = useSafeAreaInsets();\n const isSheet = position === 'bottom';\n\n const surfaceColor = resolveToken('surface-card');\n const textColor = resolveToken('text');\n const borderColor = colors?.border ?? resolveToken('border');\n const subtextColor = resolveToken('gray.500');\n const grabberColor = resolveToken('gray.300');\n const brandLogo = type === 'brand' ? theme.config.logo : null;\n\n const resolvedStyle = useResolvedStyle(style || {});\n const resolvedContentStyle = useResolvedStyle(contentStyle || {});\n const resolvedHeaderStyle = useResolvedStyle(headerStyle || {});\n const resolvedMaskStyle = useResolvedStyle(maskStyle || {});\n const resolvedFooterStyle = useResolvedStyle(footerStyle || {});\n const resolvedBodyStyle = useResolvedStyle(bodyStyle || {});\n\n const {width: screenWidth} = useWindowDimensions();\n // Consumer `breakpoints` ({'960px': '75vw'}) mirrors the web prop: the\n // smallest max-width threshold >= the screen width wins; vw/% both map\n // to a percentage of the window width. Falls back to the responsive\n // default (50% tablets/desktop, 95% phones <=641px).\n const breakpointWidth = (() => {\n if (!breakpoints) return null;\n const matches = Object.entries(breakpoints)\n .map(([k, v]) => [parseFloat(k), v] as const)\n .filter(([px]) => !Number.isNaN(px) && screenWidth <= px)\n .sort(([a], [b]) => a - b);\n const value = matches[0]?.[1];\n if (value == null) return null;\n const num = parseFloat(value);\n return Number.isNaN(num) ? null : `${num}%`;\n })();\n const responsiveWidth = breakpointWidth ?? (screenWidth > 641 ? '50%' : '95%');\n const hasExplicitWidth = (resolvedStyle as any).width != null;\n\n const hide = async () => {\n // canClose gate — intercepts every close path (backdrop Pressable,\n // built-in X Pressable, RN Modal onRequestClose). When blocked,\n // onClose is suppressed and the dialog stays open.\n if (canClose === false || (typeof canClose === 'function' && !canClose())) {\n return;\n }\n if (asyncClose && typeof onClose === \"function\") {\n await onClose();\n } else {\n onClose?.();\n }\n onHide();\n };\n\n if (!state.visible) return null;\n\n const content = typeof children === \"function\" ? children(hide) : children;\n // Content-mode override (mirrors web): consumer node replaces the whole\n // header / body / footer template inside the panel.\n const contentMode = contentProp != null\n ? (typeof contentProp === \"function\" ? contentProp({hide}) : contentProp)\n : null;\n\n return (\n <Modal visible transparent animationType=\"none\" onRequestClose={hide}>\n <Animated.View entering={FadeIn.duration(anim.scrim.enterDuration)} style={[isSheet ? styles.sheetOverlay : styles.overlay, resolvedMaskStyle as any]}>\n <Pressable style={StyleSheet.absoluteFill} onPress={dismissableMask ? hide : undefined}/>\n <Animated.View\n entering={isSheet\n ? SlideInDown.springify().damping(anim.sheet.enter.damping).stiffness(anim.sheet.enter.stiffness)\n : ZoomIn.springify().damping(anim.dialog.enter.damping).stiffness(anim.dialog.enter.stiffness)}\n style={[\n styles.panel,\n isSheet && styles.sheetPanel,\n {backgroundColor: surfaceColor, borderColor},\n // Explicit `breakpoints` win even when responsive=false (web parity)\n !isSheet && !hasExplicitWidth && (breakpoints != null || responsive) ? {width: responsiveWidth} : null,\n resolvedStyle as any,\n resolvedContentStyle as any,\n ]}\n >\n {contentMode != null ? contentMode : <>\n {/* Grabber (bottom-sheet) */}\n {isSheet && <View style={[styles.grabber, {backgroundColor: grabberColor}]}/>}\n\n {/* Severity accent strip */}\n {colors && !isSheet && (\n <View style={{height: 4, backgroundColor: colors.solid, borderTopLeftRadius: 16, borderTopRightRadius: 16}}/>\n )}\n\n {/* Custom header (headerRender) — fully replaces the built-in header\n View when provided. Wins over the default header even if `header`\n is also set. */}\n {!hideHeader && headerRender != null && headerRender({close: () => { void hide(); }})}\n\n {/* Header (default) — rendered when no headerRender and `header` is set. */}\n {!hideHeader && headerRender == null && rest.header != null && (\n <View style={[styles.header, {borderBottomColor: borderColor}, resolvedHeaderStyle as any]}>\n {/* Inline severity icon */}\n {(icon || brandLogo) && colors && (\n <View style={{\n width: 36,\n height: 36,\n borderRadius: 18,\n backgroundColor: colors.iconBg,\n alignItems: 'center',\n justifyContent: 'center',\n marginRight: 12,\n }}>\n {brandLogo ? brandLogo : typeof icon === 'string' ? (\n <Icon name={icon as never} size={'lg'} color={colors.iconFg}/>\n ) : icon}\n </View>\n )}\n <Text style={{fontSize: 18, fontWeight: \"700\", color: textColor, flex: 1}}>\n {rest.header as React.ReactNode}\n </Text>\n <Pressable onPress={hide} hitSlop={8}>\n {closeIcon ?? <Text style={{fontSize: 18, color: subtextColor}}>✕</Text>}\n </Pressable>\n </View>\n )}\n\n {/* Body — bodyStyle is applied AFTER the built-in maxHeight: 400,\n so consumers can lift the cap (`maxHeight: 600`) or unlock flex\n sizing (`minHeight: 0`) without losing the default behavior when\n bodyStyle is unset. */}\n <ScrollView\n style={[styles.body, resolvedBodyStyle as any]}\n contentContainerStyle={styles.bodyContent}\n showsVerticalScrollIndicator={false}\n >\n {content}\n </ScrollView>\n\n {/* Footer — footerRender takes precedence over `footer`. footerStyle\n is merged AFTER the built-in flex defaults so consumers can override\n alignment (e.g. justifyContent: 'space-between' for left-delete /\n right-actions layouts) without losing the borderTop / padding. */}\n {(footerRender != null || rest.footer != null) && (\n <View style={[\n styles.footer,\n {borderTopColor: borderColor},\n isSheet && {paddingBottom: 12 + insets.bottom},\n resolvedFooterStyle as any,\n ]}>\n {footerRender\n ? footerRender({close: () => { void hide(); }})\n : (rest.footer as React.ReactNode)}\n </View>\n )}\n </>}\n </Animated.View>\n </Animated.View>\n </Modal>\n );\n}\n\nconst styles = StyleSheet.create({\n overlay: {\n flex: 1,\n backgroundColor: \"rgba(0,0,0,0.45)\",\n justifyContent: \"center\",\n alignItems: \"center\",\n padding: 24,\n },\n sheetOverlay: {\n flex: 1,\n backgroundColor: \"rgba(0,0,0,0.45)\",\n justifyContent: \"flex-end\",\n },\n sheetPanel: {\n width: \"100%\",\n maxWidth: \"100%\",\n maxHeight: \"90%\",\n borderWidth: 0,\n borderTopLeftRadius: 24,\n borderTopRightRadius: 24,\n borderBottomLeftRadius: 0,\n borderBottomRightRadius: 0,\n paddingTop: 10,\n },\n grabber: {\n width: 40,\n height: 5,\n borderRadius: 999,\n alignSelf: \"center\",\n marginBottom: 6,\n },\n panel: {\n borderRadius: 16,\n borderWidth: 1,\n minWidth: 250,\n maxWidth: \"90%\",\n maxHeight: \"80%\",\n overflow: \"hidden\",\n elevation: 12,\n shadowColor: \"#000\",\n shadowOffset: {width: 0, height: 6},\n shadowOpacity: 0.2,\n shadowRadius: 12,\n },\n header: {\n flexDirection: \"row\",\n alignItems: \"center\",\n paddingHorizontal: 20,\n paddingVertical: 16,\n borderBottomWidth: 1,\n },\n body: {\n maxHeight: 400,\n },\n bodyContent: {\n padding: 20,\n },\n footer: {\n flexDirection: \"row\",\n justifyContent: \"flex-end\",\n paddingHorizontal: 20,\n paddingVertical: 12,\n borderTopWidth: 1,\n gap: 8,\n },\n});\n"],"names":["useKitsTheme","useSeverityColors","useSafeAreaInsets","useResolvedStyle","useWindowDimensions","jsx","Modal","jsxs","FadeIn","anim","Pressable","StyleSheet","SlideInDown","ZoomIn","Fragment","View","Icon","Text","ScrollView"],"mappings":";;;;;;;;;;;;;;;;;AAWA,SAAwB,oBAAA,CAAqB,EAAC,KAAA,EAAO,MAAA,EAAM,EAA0B;AACjF,EAAA,MAAM;AAAA,IACF,QAAA;AAAA,IACA,OAAA,EAAS,WAAA;AAAA,IACT,OAAA;AAAA,IACA,UAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,KAAA;AAAA,IACA,YAAA;AAAA,IACA,WAAA;AAAA,IACA,SAAA;AAAA,IACA,QAAA,GAAW,QAAA;AAAA,IACX,UAAA,GAAa,IAAA;AAAA,IACb,UAAA;AAAA,IACA,YAAA;AAAA,IACA,YAAA;AAAA,IACA,WAAA;AAAA,IACA,QAAA;AAAA,IACA,SAAA;AAAA,IACA,SAAA;AAAA;AAAA;AAAA,IAGA,eAAA,GAAkB,IAAA;AAAA,IAClB,WAAA;AAAA,IACA,GAAG;AAAA,GACP,GAAI,KAAA;AACJ,EAAA,MAAM,EAAC,YAAA,EAAc,KAAA,EAAK,GAAIA,qCAAA,EAAa;AAC3C,EAAA,MAAM,cAAA,GAAiBC,mCAAA,CAAkB,IAAA,IAAQ,WAAW,CAAA;AAC5D,EAAA,MAAM,MAAA,GAAS,OAAO,cAAA,GAAiB,IAAA;AACvC,EAAA,MAAM,SAASC,4CAAA,EAAkB;AACjC,EAAA,MAAM,UAAU,QAAA,KAAa,QAAA;AAE7B,EAAA,MAAM,YAAA,GAAe,aAAa,cAAc,CAAA;AAChD,EAAA,MAAM,SAAA,GAAY,aAAa,MAAM,CAAA;AACrC,EAAA,MAAM,WAAA,GAAc,MAAA,EAAQ,MAAA,IAAU,YAAA,CAAa,QAAQ,CAAA;AAC3D,EAAA,MAAM,YAAA,GAAe,aAAa,UAAU,CAAA;AAC5C,EAAA,MAAM,YAAA,GAAe,aAAa,UA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ACJ,aAAA,EAAe,KAAA;AAAA,IACf,cAAA,EAAgB,UAAA;AAAA,IAChB,iBAAA,EAAmB,EAAA;AAAA,IACnB,eAAA,EAAiB,EAAA;AAAA,IACjB,cAAA,EAAgB,CAAA;AAAA,IAChB,GAAA,EAAK;AAAA;AAEb,CAAC,CAAA;;;;"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../../../src/components/overlay/Dialog/index.native.tsx"],"sourcesContent":["import React from \"react\";\nimport {Modal, Pressable, ScrollView, StyleSheet, View, useWindowDimensions} from \"react-native\";\nimport Animated, {Easing, FadeIn, FadeOut, runOnJS, SlideInDown, SlideOutDown, ZoomIn, ZoomOut} from \"react-native-reanimated\";\nimport {useSafeAreaInsets} from \"react-native-safe-area-context\";\nimport {Icon, Text} from \"../../../_compat\";\nimport type {IKitsDialogControlled} from \"@lmb-it/kitsconcerto-types\";\nimport {useKitsTheme} from \"../../../contexts/Theme\";\nimport {useSeverityColors} from \"../../../hooks/useSeverityColors\";\nimport {useResolvedStyle} from \"../../../hooks\";\nimport {overlayAnimations as anim} from \"../../../animations\";\n\n/**\n * Keeps the RN Modal mounted through the exit animation. `visible` drives the\n * inner scrim + panel entering/exiting; the Modal itself stays mounted until\n * the panel's exit animation reports finished, then unmounts.\n *\n * Re-entrancy: a new `visible=true` during an exit re-renders the inner (which\n * re-enters), and the still-pending exit callback is ignored because\n * `visibleRef` is already back to `true` — so the Modal is never torn down\n * mid-reopen.\n */\nfunction useOverlayPresence(visible: boolean) {\n const [mounted, setMounted] = React.useState(visible);\n const visibleRef = React.useRef(visible);\n React.useEffect(() => {\n visibleRef.current = visible;\n if (visible) setMounted(true);\n }, [visible]);\n // Runs on the JS thread (dispatched via runOnJS from the exit worklet).\n const handleExitFinished = React.useCallback(() => {\n if (!visibleRef.current) setMounted(false);\n }, []);\n return {mounted, handleExitFinished};\n}\n\nexport default function KitsDialogControlled({state, onHide}: IKitsDialogControlled) {\n const {\n children,\n content: contentProp,\n onClose,\n asyncClose,\n type,\n icon,\n style,\n contentStyle,\n headerStyle,\n maskStyle,\n position = 'center',\n responsive = true,\n hideHeader,\n headerRender,\n footerRender,\n footerStyle,\n canClose,\n bodyStyle,\n closeIcon,\n // Native default true preserves historical tap-to-dismiss; web's\n // PrimeReact default is false — pass explicitly in shared code.\n dismissableMask = true,\n breakpoints,\n ...rest\n } = state;\n const {resolveToken, theme} = useKitsTheme();\n const severityColors = useSeverityColors(type || 'secondary');\n const colors = type ? severityColors : null;\n const insets = useSafeAreaInsets();\n const isSheet = position === 'bottom';\n\n const surfaceColor = resolveToken('surface-card');\n const textColor = resolveToken('text');\n const borderColor = colors?.border ?? resolveToken('border');\n const subtextColor = resolveToken('gray.500');\n const grabberColor = resolveToken('gray.300');\n // Scrim via the literal alpha overlay token → rgba(0,0,0,0.4) in both modes.\n const scrimColor = resolveToken('black-alpha-40');\n const brandLogo = type === 'brand' ? theme.config.logo : null;\n\n const resolvedStyle = useResolvedStyle(style || {});\n const resolvedContentStyle = useResolvedStyle(contentStyle || {});\n const resolvedHeaderStyle = useResolvedStyle(headerStyle || {});\n const resolvedMaskStyle = useResolvedStyle(maskStyle || {});\n const resolvedFooterStyle = useResolvedStyle(footerStyle || {});\n const resolvedBodyStyle = useResolvedStyle(bodyStyle || {});\n\n const {width: screenWidth} = useWindowDimensions();\n // Consumer `breakpoints` ({'960px': '75vw'}) mirrors the web prop: the\n // smallest max-width threshold >= the screen width wins; vw/% both map\n // to a percentage of the window width. Falls back to the responsive\n // default (50% tablets/desktop, 95% phones <=641px).\n const breakpointWidth = (() => {\n if (!breakpoints) return null;\n const matches = Object.entries(breakpoints)\n .map(([k, v]) => [parseFloat(k), v] as const)\n .filter(([px]) => !Number.isNaN(px) && screenWidth <= px)\n .sort(([a], [b]) => a - b);\n const value = matches[0]?.[1];\n if (value == null) return null;\n const num = parseFloat(value);\n return Number.isNaN(num) ? null : `${num}%`;\n })();\n const responsiveWidth = breakpointWidth ?? (screenWidth > 641 ? '50%' : '95%');\n const hasExplicitWidth = (resolvedStyle as any).width != null;\n\n const hide = async () => {\n // canClose gate — intercepts every close path (backdrop Pressable,\n // built-in X Pressable, RN Modal onRequestClose). When blocked,\n // onClose is suppressed and the dialog stays open.\n if (canClose === false || (typeof canClose === 'function' && !canClose())) {\n return;\n }\n if (asyncClose && typeof onClose === \"function\") {\n await onClose();\n } else {\n onClose?.();\n }\n onHide();\n };\n\n const {mounted, handleExitFinished} = useOverlayPresence(!!state.visible);\n if (!mounted) return null;\n\n const content = typeof children === \"function\" ? children(hide) : children;\n // Content-mode override (mirrors web): consumer node replaces the whole\n // header / body / footer template inside the panel.\n const contentMode = contentProp != null\n ? (typeof contentProp === \"function\" ? contentProp({hide}) : contentProp)\n : null;\n\n return (\n <Modal visible transparent animationType=\"none\" onRequestClose={hide}>\n {state.visible && (\n <Animated.View\n entering={FadeIn.duration(anim.scrim.enterDuration)}\n exiting={FadeOut.duration(anim.scrim.exitDuration)}\n style={[isSheet ? styles.sheetOverlay : styles.overlay, {backgroundColor: scrimColor}, resolvedMaskStyle as any]}\n >\n <Pressable style={StyleSheet.absoluteFill} onPress={dismissableMask ? hide : undefined}/>\n <Animated.View\n entering={isSheet\n ? SlideInDown.springify().damping(anim.sheet.enter.damping).stiffness(anim.sheet.enter.stiffness).mass(anim.sheet.enter.mass ?? 1)\n : ZoomIn.springify().damping(anim.dialog.enter.damping).stiffness(anim.dialog.enter.stiffness).mass(anim.dialog.enter.mass ?? 1)}\n exiting={(isSheet\n ? SlideOutDown.duration(anim.sheet.exitDuration).easing(Easing.in(Easing.ease))\n : ZoomOut.duration(anim.dialog.exitDuration).easing(Easing.in(Easing.ease))\n ).withCallback((finished) => {\n 'worklet';\n if (finished) runOnJS(handleExitFinished)();\n })}\n style={[\n styles.panel,\n isSheet && styles.sheetPanel,\n {backgroundColor: surfaceColor, borderColor},\n // Explicit `breakpoints` win even when responsive=false (web parity)\n !isSheet && !hasExplicitWidth && (breakpoints != null || responsive) ? {width: responsiveWidth} : null,\n resolvedStyle as any,\n resolvedContentStyle as any,\n ]}\n >\n {contentMode != null ? contentMode : <>\n {/* Grabber (bottom-sheet) */}\n {isSheet && <View style={[styles.grabber, {backgroundColor: grabberColor}]}/>}\n\n {/* Severity accent strip */}\n {colors && !isSheet && (\n <View style={{height: 4, backgroundColor: colors.solid, borderTopLeftRadius: 20, borderTopRightRadius: 20}}/>\n )}\n\n {/* Custom header (headerRender) — fully replaces the built-in header\n View when provided. Wins over the default header even if `header`\n is also set. */}\n {!hideHeader && headerRender != null && headerRender({close: () => { void hide(); }})}\n\n {/* Header (default) — rendered when no headerRender and `header` is set. */}\n {!hideHeader && headerRender == null && rest.header != null && (\n <View style={[styles.header, {borderBottomColor: borderColor}, resolvedHeaderStyle as any]}>\n {/* Inline severity icon */}\n {(icon || brandLogo) && colors && (\n <View style={{\n width: 36,\n height: 36,\n borderRadius: 18,\n backgroundColor: colors.iconBg,\n alignItems: 'center',\n justifyContent: 'center',\n marginRight: 12,\n }}>\n {brandLogo ? brandLogo : typeof icon === 'string' ? (\n <Icon name={icon as never} size={'lg'} color={colors.iconFg}/>\n ) : icon}\n </View>\n )}\n <Text style={{fontSize: 18, fontWeight: \"700\", color: textColor, flex: 1}}>\n {rest.header as React.ReactNode}\n </Text>\n <Pressable onPress={hide} hitSlop={8}>\n {closeIcon ?? <Text style={{fontSize: 18, color: subtextColor}}>✕</Text>}\n </Pressable>\n </View>\n )}\n\n {/* Body — bodyStyle is applied AFTER the built-in maxHeight: 400,\n so consumers can lift the cap (`maxHeight: 600`) or unlock flex\n sizing (`minHeight: 0`) without losing the default behavior when\n bodyStyle is unset. */}\n <ScrollView\n style={[styles.body, resolvedBodyStyle as any]}\n contentContainerStyle={styles.bodyContent}\n showsVerticalScrollIndicator={false}\n >\n {content}\n </ScrollView>\n\n {/* Footer — footerRender takes precedence over `footer`. footerStyle\n is merged AFTER the built-in flex defaults so consumers can override\n alignment (e.g. justifyContent: 'space-between' for left-delete /\n right-actions layouts) without losing the borderTop / padding. */}\n {(footerRender != null || rest.footer != null) && (\n <View style={[\n styles.footer,\n {borderTopColor: borderColor},\n isSheet && {paddingBottom: 12 + insets.bottom},\n resolvedFooterStyle as any,\n ]}>\n {footerRender\n ? footerRender({close: () => { void hide(); }})\n : (rest.footer as React.ReactNode)}\n </View>\n )}\n </>}\n </Animated.View>\n </Animated.View>\n )}\n </Modal>\n );\n}\n\nconst styles = StyleSheet.create({\n overlay: {\n flex: 1,\n justifyContent: \"center\",\n alignItems: \"center\",\n padding: 24,\n },\n sheetOverlay: {\n flex: 1,\n justifyContent: \"flex-end\",\n },\n sheetPanel: {\n width: \"100%\",\n maxWidth: \"100%\",\n maxHeight: \"90%\",\n borderWidth: 0,\n borderTopLeftRadius: 24,\n borderTopRightRadius: 24,\n borderBottomLeftRadius: 0,\n borderBottomRightRadius: 0,\n paddingTop: 10,\n },\n grabber: {\n width: 40,\n height: 5,\n borderRadius: 999,\n alignSelf: \"center\",\n marginBottom: 6,\n },\n panel: {\n // 20 == radii.xl (no numeric radii resolver on native — see report).\n borderRadius: 20,\n borderWidth: 1,\n minWidth: 250,\n maxWidth: \"90%\",\n maxHeight: \"80%\",\n overflow: \"hidden\",\n // Subtle elevation: low opacity, wide blur, minimal offset.\n elevation: 6,\n shadowColor: \"#000\",\n shadowOffset: {width: 0, height: 2},\n shadowOpacity: 0.15,\n shadowRadius: 20,\n },\n header: {\n flexDirection: \"row\",\n alignItems: \"center\",\n paddingHorizontal: 20,\n paddingVertical: 16,\n borderBottomWidth: 1,\n },\n body: {\n maxHeight: 400,\n },\n bodyContent: {\n padding: 20,\n },\n footer: {\n flexDirection: \"row\",\n justifyContent: \"flex-end\",\n paddingHorizontal: 20,\n paddingVertical: 12,\n borderTopWidth: 1,\n gap: 8,\n },\n});\n"],"names":["useKitsTheme","useSeverityColors","useSafeAreaInsets","useResolvedStyle","useWindowDimensions","jsx","Modal","jsxs","FadeIn","anim","FadeOut","Pressable","StyleSheet","SlideInDown","ZoomIn","SlideOutDown","Easing","Zo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AA,EACA,WAAA,EAAa;AAAA,IACT,OAAA,EAAS;AAAA,GACb;AAAA,EACA,MAAA,EAAQ;AAAA,IACJ,aAAA,EAAe,KAAA;AAAA,IACf,cAAA,EAAgB,UAAA;AAAA,IAChB,iBAAA,EAAmB,EAAA;AAAA,IACnB,eAAA,EAAiB,EAAA;AAAA,IACjB,cAAA,EAAgB,CAAA;AAAA,IAChB,GAAA,EAAK;AAAA;AAEb,CAAC,CAAA;;;;"}
@@ -1,9 +1,9 @@
1
1
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
+ import React from 'react';
2
3
  import { useWindowDimensions, Modal, Pressable, StyleSheet, View, ScrollView } from 'react-native';
3
- import Animated, { SlideInDown, ZoomIn, FadeIn } from 'react-native-reanimated';
4
+ import Animated, { SlideOutDown, Easing, ZoomOut, runOnJS, SlideInDown, ZoomIn, FadeOut, FadeIn } from 'react-native-reanimated';
4
5
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
5
6
  import { useSeverityColors } from '../../../hooks/useSeverityColors.js';
6
- import 'react';
7
7
  import '../../../contexts/DialogContext.js';
8
8
  import useResolvedStyle from '../../../hooks/useResolvedStyle.js';
9
9
  import { overlayAnimations } from '../../../animations/index.js';
@@ -11,6 +11,18 @@ import { useKitsTheme } from '../../../contexts/Theme/KitsThemeProvider.js';
11
11
  import { Icon } from '../../../primitives/Icon/index.js';
12
12
  import Text from '../../../primitives/Text/index.js';
13
13
 
14
+ function useOverlayPresence(visible) {
15
+ const [mounted, setMounted] = React.useState(visible);
16
+ const visibleRef = React.useRef(visible);
17
+ React.useEffect(() => {
18
+ visibleRef.current = visible;
19
+ if (visible) setMounted(true);
20
+ }, [visible]);
21
+ const handleExitFinished = React.useCallback(() => {
22
+ if (!visibleRef.current) setMounted(false);
23
+ }, []);
24
+ return { mounted, handleExitFinished };
25
+ }
14
26
  function KitsDialogControlled({ state, onHide }) {
15
27
  const {
16
28
  children,
@@ -48,6 +60,7 @@ function KitsDialogControlled({ state, onHide }) {
48
60
  const borderColor = colors?.border ?? resolveToken("border");
49
61
  const subtextColor = resolveToken("gray.500");
50
62
  const grabberColor = resolveToken("gray.300");
63
+ const scrimColor = resolveToken("black-alpha-40");
51
64
  const brandLogo = type === "brand" ? theme.config.logo : null;
52
65
  const resolvedStyle = useResolvedStyle(style || {});
53
66
  const resolvedContentStyle = useResolvedStyle(contentStyle || {});
@@ -77,76 +90,87 @@ function KitsDialogControlled({ state, onHide }) {
77
90
  }
78
91
  onHide();
79
92
  };
80
- if (!state.visible) return null;
93
+ const { mounted, handleExitFinished } = useOverlayPresence(!!state.visible);
94
+ if (!mounted) return null;
81
95
  const content = typeof children === "function" ? children(hide) : children;
82
96
  const contentMode = contentProp != null ? typeof contentProp === "function" ? contentProp({ hide }) : contentProp : null;
83
- return /* @__PURE__ */ jsx(Modal, { visible: true, transparent: true, animationType: "none", onRequestClose: hide, children: /* @__PURE__ */ jsxs(Animated.View, { entering: FadeIn.duration(overlayAnimations.scrim.enterDuration), style: [isSheet ? styles.sheetOverlay : styles.overlay, resolvedMaskStyle], children: [
84
- /* @__PURE__ */ jsx(Pressable, { style: StyleSheet.absoluteFill, onPress: dismissableMask ? hide : void 0 }),
85
- /* @__PURE__ */ jsx(
86
- Animated.View,
87
- {
88
- entering: isSheet ? SlideInDown.springify().damping(overlayAnimations.sheet.enter.damping).stiffness(overlayAnimations.sheet.enter.stiffness) : ZoomIn.springify().damping(overlayAnimations.dialog.enter.damping).stiffness(overlayAnimations.dialog.enter.stiffness),
89
- style: [
90
- styles.panel,
91
- isSheet && styles.sheetPanel,
92
- { backgroundColor: surfaceColor, borderColor },
93
- // Explicit `breakpoints` win even when responsive=false (web parity)
94
- !isSheet && !hasExplicitWidth && (breakpoints != null || responsive) ? { width: responsiveWidth } : null,
95
- resolvedStyle,
96
- resolvedContentStyle
97
- ],
98
- children: contentMode != null ? contentMode : /* @__PURE__ */ jsxs(Fragment, { children: [
99
- isSheet && /* @__PURE__ */ jsx(View, { style: [styles.grabber, { backgroundColor: grabberColor }] }),
100
- colors && !isSheet && /* @__PURE__ */ jsx(View, { style: { height: 4, backgroundColor: colors.solid, borderTopLeftRadius: 16, borderTopRightRadius: 16 } }),
101
- !hideHeader && headerRender != null && headerRender({ close: () => {
102
- void hide();
103
- } }),
104
- !hideHeader && headerRender == null && rest.header != null && /* @__PURE__ */ jsxs(View, { style: [styles.header, { borderBottomColor: borderColor }, resolvedHeaderStyle], children: [
105
- (icon || brandLogo) && colors && /* @__PURE__ */ jsx(View, { style: {
106
- width: 36,
107
- height: 36,
108
- borderRadius: 18,
109
- backgroundColor: colors.iconBg,
110
- alignItems: "center",
111
- justifyContent: "center",
112
- marginRight: 12
113
- }, children: brandLogo ? brandLogo : typeof icon === "string" ? /* @__PURE__ */ jsx(Icon, { name: icon, size: "lg", color: colors.iconFg }) : icon }),
114
- /* @__PURE__ */ jsx(Text, { style: { fontSize: 18, fontWeight: "700", color: textColor, flex: 1 }, children: rest.header }),
115
- /* @__PURE__ */ jsx(Pressable, { onPress: hide, hitSlop: 8, children: closeIcon ?? /* @__PURE__ */ jsx(Text, { style: { fontSize: 18, color: subtextColor }, children: "\u2715" }) })
116
- ] }),
117
- /* @__PURE__ */ jsx(
118
- ScrollView,
119
- {
120
- style: [styles.body, resolvedBodyStyle],
121
- contentContainerStyle: styles.bodyContent,
122
- showsVerticalScrollIndicator: false,
123
- children: content
124
- }
125
- ),
126
- (footerRender != null || rest.footer != null) && /* @__PURE__ */ jsx(View, { style: [
127
- styles.footer,
128
- { borderTopColor: borderColor },
129
- isSheet && { paddingBottom: 12 + insets.bottom },
130
- resolvedFooterStyle
131
- ], children: footerRender ? footerRender({ close: () => {
132
- void hide();
133
- } }) : rest.footer })
134
- ] })
135
- }
136
- )
137
- ] }) });
97
+ return /* @__PURE__ */ jsx(Modal, { visible: true, transparent: true, animationType: "none", onRequestClose: hide, children: state.visible && /* @__PURE__ */ jsxs(
98
+ Animated.View,
99
+ {
100
+ entering: FadeIn.duration(overlayAnimations.scrim.enterDuration),
101
+ exiting: FadeOut.duration(overlayAnimations.scrim.exitDuration),
102
+ style: [isSheet ? styles.sheetOverlay : styles.overlay, { backgroundColor: scrimColor }, resolvedMaskStyle],
103
+ children: [
104
+ /* @__PURE__ */ jsx(Pressable, { style: StyleSheet.absoluteFill, onPress: dismissableMask ? hide : void 0 }),
105
+ /* @__PURE__ */ jsx(
106
+ Animated.View,
107
+ {
108
+ entering: isSheet ? SlideInDown.springify().damping(overlayAnimations.sheet.enter.damping).stiffness(overlayAnimations.sheet.enter.stiffness).mass(overlayAnimations.sheet.enter.mass) : ZoomIn.springify().damping(overlayAnimations.dialog.enter.damping).stiffness(overlayAnimations.dialog.enter.stiffness).mass(overlayAnimations.dialog.enter.mass),
109
+ exiting: (isSheet ? SlideOutDown.duration(overlayAnimations.sheet.exitDuration).easing(Easing.in(Easing.ease)) : ZoomOut.duration(overlayAnimations.dialog.exitDuration).easing(Easing.in(Easing.ease))).withCallback((finished) => {
110
+ "worklet";
111
+ if (finished) runOnJS(handleExitFinished)();
112
+ }),
113
+ style: [
114
+ styles.panel,
115
+ isSheet && styles.sheetPanel,
116
+ { backgroundColor: surfaceColor, borderColor },
117
+ // Explicit `breakpoints` win even when responsive=false (web parity)
118
+ !isSheet && !hasExplicitWidth && (breakpoints != null || responsive) ? { width: responsiveWidth } : null,
119
+ resolvedStyle,
120
+ resolvedContentStyle
121
+ ],
122
+ children: contentMode != null ? contentMode : /* @__PURE__ */ jsxs(Fragment, { children: [
123
+ isSheet && /* @__PURE__ */ jsx(View, { style: [styles.grabber, { backgroundColor: grabberColor }] }),
124
+ colors && !isSheet && /* @__PURE__ */ jsx(View, { style: { height: 4, backgroundColor: colors.solid, borderTopLeftRadius: 20, borderTopRightRadius: 20 } }),
125
+ !hideHeader && headerRender != null && headerRender({ close: () => {
126
+ void hide();
127
+ } }),
128
+ !hideHeader && headerRender == null && rest.header != null && /* @__PURE__ */ jsxs(View, { style: [styles.header, { borderBottomColor: borderColor }, resolvedHeaderStyle], children: [
129
+ (icon || brandLogo) && colors && /* @__PURE__ */ jsx(View, { style: {
130
+ width: 36,
131
+ height: 36,
132
+ borderRadius: 18,
133
+ backgroundColor: colors.iconBg,
134
+ alignItems: "center",
135
+ justifyContent: "center",
136
+ marginRight: 12
137
+ }, children: brandLogo ? brandLogo : typeof icon === "string" ? /* @__PURE__ */ jsx(Icon, { name: icon, size: "lg", color: colors.iconFg }) : icon }),
138
+ /* @__PURE__ */ jsx(Text, { style: { fontSize: 18, fontWeight: "700", color: textColor, flex: 1 }, children: rest.header }),
139
+ /* @__PURE__ */ jsx(Pressable, { onPress: hide, hitSlop: 8, children: closeIcon ?? /* @__PURE__ */ jsx(Text, { style: { fontSize: 18, color: subtextColor }, children: "\u2715" }) })
140
+ ] }),
141
+ /* @__PURE__ */ jsx(
142
+ ScrollView,
143
+ {
144
+ style: [styles.body, resolvedBodyStyle],
145
+ contentContainerStyle: styles.bodyContent,
146
+ showsVerticalScrollIndicator: false,
147
+ children: content
148
+ }
149
+ ),
150
+ (footerRender != null || rest.footer != null) && /* @__PURE__ */ jsx(View, { style: [
151
+ styles.footer,
152
+ { borderTopColor: borderColor },
153
+ isSheet && { paddingBottom: 12 + insets.bottom },
154
+ resolvedFooterStyle
155
+ ], children: footerRender ? footerRender({ close: () => {
156
+ void hide();
157
+ } }) : rest.footer })
158
+ ] })
159
+ }
160
+ )
161
+ ]
162
+ }
163
+ ) });
138
164
  }
139
165
  const styles = StyleSheet.create({
140
166
  overlay: {
141
167
  flex: 1,
142
- backgroundColor: "rgba(0,0,0,0.45)",
143
168
  justifyContent: "center",
144
169
  alignItems: "center",
145
170
  padding: 24
146
171
  },
147
172
  sheetOverlay: {
148
173
  flex: 1,
149
- backgroundColor: "rgba(0,0,0,0.45)",
150
174
  justifyContent: "flex-end"
151
175
  },
152
176
  sheetPanel: {
@@ -168,17 +192,19 @@ const styles = StyleSheet.create({
168
192
  marginBottom: 6
169
193
  },
170
194
  panel: {
171
- borderRadius: 16,
195
+ // 20 == radii.xl (no numeric radii resolver on native — see report).
196
+ borderRadius: 20,
172
197
  borderWidth: 1,
173
198
  minWidth: 250,
174
199
  maxWidth: "90%",
175
200
  maxHeight: "80%",
176
201
  overflow: "hidden",
177
- elevation: 12,
202
+ // Subtle elevation: low opacity, wide blur, minimal offset.
203
+ elevation: 6,
178
204
  shadowColor: "#000",
179
- shadowOffset: { width: 0, height: 6 },
180
- shadowOpacity: 0.2,
181
- shadowRadius: 12
205
+ shadowOffset: { width: 0, height: 2 },
206
+ shadowOpacity: 0.15,
207
+ shadowRadius: 20
182
208
  },
183
209
  header: {
184
210
  flexDirection: "row",