@srimandir/common 2.30.5 → 2.30.6

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.
@@ -1,8 +1,10 @@
1
1
  import { default as React } from 'react';
2
+ /** Which affordance triggered `onClose` — optional so existing `() => void` callers keep compiling unchanged. */
3
+ export type BottomSheetCloseReason = 'close_button' | 'backdrop' | 'escape';
2
4
  export interface BottomSheetProps {
3
5
  isOpen: boolean;
4
- /** Called by the close button, backdrop tap and Escape. */
5
- onClose: () => void;
6
+ /** Called by the close button, backdrop tap and Escape — with which one, if the caller wants to tell them apart (e.g. for dismiss analytics). */
7
+ onClose: (reason?: BottomSheetCloseReason) => void;
6
8
  /** Scrolling content. */
7
9
  children: React.ReactNode;
8
10
  /** Pinned above the scroll area. */
@@ -1 +1 @@
1
- export { BottomSheet, type BottomSheetProps } from './BottomSheet';
1
+ export { BottomSheet, type BottomSheetProps, type BottomSheetCloseReason, } from './BottomSheet';
package/dist/index.d.ts CHANGED
@@ -7,7 +7,7 @@
7
7
  * extracted from the product packages.
8
8
  */
9
9
  export { BottomSheet } from './components/BottomSheet';
10
- export type { BottomSheetProps } from './components/BottomSheet';
10
+ export type { BottomSheetProps, BottomSheetCloseReason, } from './components/BottomSheet';
11
11
  export { cn } from './utils/cn';
12
12
  export { validatePhoneByCountryCode, getMaxLengthForCountry } from './utils/phoneValidation';
13
13
  export { DEFAULT_COUNTRIES, getFlagEmoji } from './utils/countries';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@srimandir/common",
3
- "version": "2.30.5",
3
+ "version": "2.30.6",
4
4
  "description": "Generic, product-agnostic UI primitives (bottom sheet, buttons, modals) shared across the Srimandir packages",
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -54,5 +54,5 @@
54
54
  "react"
55
55
  ],
56
56
  "license": "MIT",
57
- "gitHead": "7f0e5dd20a3c594bfd6a52e1428303ab10f3c2ce"
57
+ "gitHead": "f94cfb1b39ee5fd00f7caf3bad515f5c7b595853"
58
58
  }