@srimandir/common 1.1.2 → 1.1.5

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.
package/dist/common.js ADDED
@@ -0,0 +1,83 @@
1
+ import { jsx as e, jsxs as w } from "react/jsx-runtime";
2
+ import { useEffect as z } from "react";
3
+ const N = "_overlay_7kyzr_3", g = "_sheet_7kyzr_14", p = "_handle_7kyzr_51", x = "_closeBtn_7kyzr_60", B = "_header_7kyzr_79", L = "_body_7kyzr_84", j = "_footer_7kyzr_91", t = {
4
+ overlay: N,
5
+ sheet: g,
6
+ handle: p,
7
+ closeBtn: x,
8
+ header: B,
9
+ body: L,
10
+ footer: j
11
+ }, l = (...r) => r.filter(Boolean).join(" "), C = () => /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ e(
12
+ "path",
13
+ {
14
+ d: "M12 4L4 12M4 4l8 8",
15
+ stroke: "currentColor",
16
+ strokeWidth: "1.8",
17
+ strokeLinecap: "round"
18
+ }
19
+ ) }), D = ({
20
+ isOpen: r,
21
+ onClose: n,
22
+ children: c,
23
+ header: s,
24
+ footer: i,
25
+ showCloseButton: h = !0,
26
+ showDragHandle: y = !1,
27
+ closeOnBackdropClick: u = !0,
28
+ closeOnEscape: a = !0,
29
+ lockBodyScroll: d = !0,
30
+ ariaLabel: f,
31
+ className: _ = "",
32
+ overlayClassName: m = "",
33
+ "data-testid": v
34
+ }) => (z(() => {
35
+ if (!r) return;
36
+ const o = (b) => {
37
+ b.key === "Escape" && n();
38
+ };
39
+ a && document.addEventListener("keydown", o);
40
+ const k = document.body.style.overflow;
41
+ return d && (document.body.style.overflow = "hidden"), () => {
42
+ a && document.removeEventListener("keydown", o), d && (document.body.style.overflow = k);
43
+ };
44
+ }, [r, n, a, d]), r ? /* @__PURE__ */ e(
45
+ "div",
46
+ {
47
+ className: l(t.overlay, m),
48
+ role: "presentation",
49
+ onClick: (o) => {
50
+ u && o.target === o.currentTarget && n();
51
+ },
52
+ children: /* @__PURE__ */ w(
53
+ "div",
54
+ {
55
+ className: l(t.sheet, _),
56
+ role: "dialog",
57
+ "aria-modal": "true",
58
+ "aria-label": f,
59
+ "data-testid": v,
60
+ children: [
61
+ y && /* @__PURE__ */ e("div", { className: t.handle, "aria-hidden": "true" }),
62
+ h && /* @__PURE__ */ e(
63
+ "button",
64
+ {
65
+ type: "button",
66
+ className: t.closeBtn,
67
+ onClick: n,
68
+ "aria-label": "Close",
69
+ children: /* @__PURE__ */ e(C, {})
70
+ }
71
+ ),
72
+ s && /* @__PURE__ */ e("div", { className: t.header, children: s }),
73
+ /* @__PURE__ */ e("div", { className: t.body, children: c }),
74
+ i && /* @__PURE__ */ e("div", { className: t.footer, children: i })
75
+ ]
76
+ }
77
+ )
78
+ }
79
+ ) : null);
80
+ export {
81
+ D as BottomSheet
82
+ };
83
+ //# sourceMappingURL=common.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.js","sources":["../src/components/BottomSheet/BottomSheet.tsx"],"sourcesContent":["/**\n * BottomSheet — the generic sheet chrome: dim overlay, rounded sheet that slides\n * up from the bottom, and the dismiss behaviours users expect (backdrop tap,\n * Escape, background scroll lock).\n *\n * Layout-only and product-agnostic on purpose. It owns no copy, no icons and no\n * spacing inside its slots: `header` and `footer` stay put while `children`\n * scrolls, and the sheet is `position: relative` so a header can absolutely\n * position something that straddles the top edge (e.g. an avatar badge).\n */\nimport React, { useEffect } from 'react';\nimport styles from './BottomSheet.module.scss';\n\nexport interface BottomSheetProps {\n isOpen: boolean;\n /** Called by the close button, backdrop tap and Escape. */\n onClose: () => void;\n\n /** Scrolling content. */\n children: React.ReactNode;\n /** Pinned above the scroll area. */\n header?: React.ReactNode;\n /** Pinned below the scroll area, e.g. a primary CTA. */\n footer?: React.ReactNode;\n\n /** Round close button in the top-right corner. */\n showCloseButton?: boolean;\n /** Decorative drag handle at the top. Off by default. */\n showDragHandle?: boolean;\n\n closeOnBackdropClick?: boolean;\n closeOnEscape?: boolean;\n /**\n * Freeze the page behind the sheet. On by default — without it mobile\n * browsers scroll the page under the sheet.\n */\n lockBodyScroll?: boolean;\n\n /** Accessible name for the dialog. */\n ariaLabel?: string;\n /** Applied to the sheet, e.g. to override `max-width`. */\n className?: string;\n /** Applied to the overlay, e.g. to change the dim or z-index. */\n overlayClassName?: string;\n\n 'data-testid'?: string;\n}\n\nconst cx = (...classNames: (string | false | undefined)[]) =>\n classNames.filter(Boolean).join(' ');\n\nconst CloseIcon: React.FC = () => (\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\">\n <path\n d=\"M12 4L4 12M4 4l8 8\"\n stroke=\"currentColor\"\n strokeWidth=\"1.8\"\n strokeLinecap=\"round\"\n />\n </svg>\n);\n\nexport const BottomSheet: React.FC<BottomSheetProps> = ({\n isOpen,\n onClose,\n children,\n header,\n footer,\n showCloseButton = true,\n showDragHandle = false,\n closeOnBackdropClick = true,\n closeOnEscape = true,\n lockBodyScroll = true,\n ariaLabel,\n className = '',\n overlayClassName = '',\n 'data-testid': dataTestId,\n}) => {\n useEffect(() => {\n if (!isOpen) return;\n\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Escape') onClose();\n };\n if (closeOnEscape) document.addEventListener('keydown', handleKeyDown);\n\n // Restore whatever was there rather than clearing, so nested sheets and\n // hosts that already lock scrolling are not trampled on unmount.\n const previousOverflow = document.body.style.overflow;\n if (lockBodyScroll) document.body.style.overflow = 'hidden';\n\n return () => {\n if (closeOnEscape) document.removeEventListener('keydown', handleKeyDown);\n if (lockBodyScroll) document.body.style.overflow = previousOverflow;\n };\n }, [isOpen, onClose, closeOnEscape, lockBodyScroll]);\n\n if (!isOpen) return null;\n\n return (\n <div\n className={cx(styles.overlay, overlayClassName)}\n role=\"presentation\"\n onClick={(event) => {\n // Only a tap on the dim area itself closes — not one that bubbled up\n // from inside the sheet.\n if (closeOnBackdropClick && event.target === event.currentTarget) {\n onClose();\n }\n }}\n >\n <div\n className={cx(styles.sheet, className)}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-label={ariaLabel}\n data-testid={dataTestId}\n >\n {showDragHandle && <div className={styles.handle} aria-hidden=\"true\" />}\n\n {showCloseButton && (\n <button\n type=\"button\"\n className={styles.closeBtn}\n onClick={onClose}\n aria-label=\"Close\"\n >\n <CloseIcon />\n </button>\n )}\n\n {header && <div className={styles.header}>{header}</div>}\n\n <div className={styles.body}>{children}</div>\n\n {footer && <div className={styles.footer}>{footer}</div>}\n </div>\n </div>\n );\n};\n"],"names":["cx","classNames","CloseIcon","jsx","BottomSheet","isOpen","onClose","children","header","footer","showCloseButton","showDragHandle","closeOnBackdropClick","closeOnEscape","lockBodyScroll","ariaLabel","className","overlayClassName","dataTestId","useEffect","handleKeyDown","event","previousOverflow","styles","jsxs"],"mappings":";;;;;;;;;;GAgDMA,IAAK,IAAIC,MACbA,EAAW,OAAO,OAAO,EAAE,KAAK,GAAG,GAE/BC,IAAsB,MAC1B,gBAAAC,EAAC,OAAA,EAAI,OAAM,MAAK,QAAO,MAAK,SAAQ,aAAY,MAAK,QAAO,eAAY,QACtE,UAAA,gBAAAA;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,GAAE;AAAA,IACF,QAAO;AAAA,IACP,aAAY;AAAA,IACZ,eAAc;AAAA,EAAA;AAChB,GACF,GAGWC,IAA0C,CAAC;AAAA,EACtD,QAAAC;AAAA,EACA,SAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,QAAAC;AAAA,EACA,iBAAAC,IAAkB;AAAA,EAClB,gBAAAC,IAAiB;AAAA,EACjB,sBAAAC,IAAuB;AAAA,EACvB,eAAAC,IAAgB;AAAA,EAChB,gBAAAC,IAAiB;AAAA,EACjB,WAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,kBAAAC,IAAmB;AAAA,EACnB,eAAeC;AACjB,OACEC,EAAU,MAAM;AACd,MAAI,CAACd,EAAQ;AAEb,QAAMe,IAAgB,CAACC,MAAyB;AAC9C,IAAIA,EAAM,QAAQ,YAAUf,EAAA;AAAA,EAC9B;AACA,EAAIO,KAAe,SAAS,iBAAiB,WAAWO,CAAa;AAIrE,QAAME,IAAmB,SAAS,KAAK,MAAM;AAC7C,SAAIR,MAAgB,SAAS,KAAK,MAAM,WAAW,WAE5C,MAAM;AACX,IAAID,KAAe,SAAS,oBAAoB,WAAWO,CAAa,GACpEN,MAAgB,SAAS,KAAK,MAAM,WAAWQ;AAAA,EACrD;AACF,GAAG,CAACjB,GAAQC,GAASO,GAAeC,CAAc,CAAC,GAE9CT,IAGH,gBAAAF;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWH,EAAGuB,EAAO,SAASN,CAAgB;AAAA,IAC9C,MAAK;AAAA,IACL,SAAS,CAACI,MAAU;AAGlB,MAAIT,KAAwBS,EAAM,WAAWA,EAAM,iBACjDf,EAAA;AAAA,IAEJ;AAAA,IAEA,UAAA,gBAAAkB;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAWxB,EAAGuB,EAAO,OAAOP,CAAS;AAAA,QACrC,MAAK;AAAA,QACL,cAAW;AAAA,QACX,cAAYD;AAAA,QACZ,eAAaG;AAAA,QAEZ,UAAA;AAAA,UAAAP,uBAAmB,OAAA,EAAI,WAAWY,EAAO,QAAQ,eAAY,QAAO;AAAA,UAEpEb,KACC,gBAAAP;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,MAAK;AAAA,cACL,WAAWoB,EAAO;AAAA,cAClB,SAASjB;AAAA,cACT,cAAW;AAAA,cAEX,4BAACJ,GAAA,CAAA,CAAU;AAAA,YAAA;AAAA,UAAA;AAAA,UAIdM,KAAU,gBAAAL,EAAC,OAAA,EAAI,WAAWoB,EAAO,QAAS,UAAAf,GAAO;AAAA,UAElD,gBAAAL,EAAC,OAAA,EAAI,WAAWoB,EAAO,MAAO,UAAAhB,GAAS;AAAA,UAEtCE,KAAU,gBAAAN,EAAC,OAAA,EAAI,WAAWoB,EAAO,QAAS,UAAAd,EAAA,CAAO;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACpD;AAAA,IAvCgB;"}
@@ -0,0 +1,2 @@
1
+ (function(t,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.SrimandirCommon={},t.ReactJSXRuntime,t.React))})(this,(function(t,e,h){"use strict";const r={overlay:"_overlay_7kyzr_3",sheet:"_sheet_7kyzr_14",handle:"_handle_7kyzr_51",closeBtn:"_closeBtn_7kyzr_60",header:"_header_7kyzr_79",body:"_body_7kyzr_84",footer:"_footer_7kyzr_91"},i=(...o)=>o.filter(Boolean).join(" "),f=()=>e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M12 4L4 12M4 4l8 8",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"})}),y=({isOpen:o,onClose:d,children:u,header:l,footer:c,showCloseButton:v=!0,showDragHandle:_=!1,closeOnBackdropClick:m=!0,closeOnEscape:a=!0,lockBodyScroll:s=!0,ariaLabel:b,className:k="",overlayClassName:p="","data-testid":w})=>(h.useEffect(()=>{if(!o)return;const n=z=>{z.key==="Escape"&&d()};a&&document.addEventListener("keydown",n);const x=document.body.style.overflow;return s&&(document.body.style.overflow="hidden"),()=>{a&&document.removeEventListener("keydown",n),s&&(document.body.style.overflow=x)}},[o,d,a,s]),o?e.jsx("div",{className:i(r.overlay,p),role:"presentation",onClick:n=>{m&&n.target===n.currentTarget&&d()},children:e.jsxs("div",{className:i(r.sheet,k),role:"dialog","aria-modal":"true","aria-label":b,"data-testid":w,children:[_&&e.jsx("div",{className:r.handle,"aria-hidden":"true"}),v&&e.jsx("button",{type:"button",className:r.closeBtn,onClick:d,"aria-label":"Close",children:e.jsx(f,{})}),l&&e.jsx("div",{className:r.header,children:l}),e.jsx("div",{className:r.body,children:u}),c&&e.jsx("div",{className:r.footer,children:c})]})}):null);t.BottomSheet=y,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}));
2
+ //# sourceMappingURL=common.umd.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.umd.cjs","sources":["../src/components/BottomSheet/BottomSheet.tsx"],"sourcesContent":["/**\n * BottomSheet — the generic sheet chrome: dim overlay, rounded sheet that slides\n * up from the bottom, and the dismiss behaviours users expect (backdrop tap,\n * Escape, background scroll lock).\n *\n * Layout-only and product-agnostic on purpose. It owns no copy, no icons and no\n * spacing inside its slots: `header` and `footer` stay put while `children`\n * scrolls, and the sheet is `position: relative` so a header can absolutely\n * position something that straddles the top edge (e.g. an avatar badge).\n */\nimport React, { useEffect } from 'react';\nimport styles from './BottomSheet.module.scss';\n\nexport interface BottomSheetProps {\n isOpen: boolean;\n /** Called by the close button, backdrop tap and Escape. */\n onClose: () => void;\n\n /** Scrolling content. */\n children: React.ReactNode;\n /** Pinned above the scroll area. */\n header?: React.ReactNode;\n /** Pinned below the scroll area, e.g. a primary CTA. */\n footer?: React.ReactNode;\n\n /** Round close button in the top-right corner. */\n showCloseButton?: boolean;\n /** Decorative drag handle at the top. Off by default. */\n showDragHandle?: boolean;\n\n closeOnBackdropClick?: boolean;\n closeOnEscape?: boolean;\n /**\n * Freeze the page behind the sheet. On by default — without it mobile\n * browsers scroll the page under the sheet.\n */\n lockBodyScroll?: boolean;\n\n /** Accessible name for the dialog. */\n ariaLabel?: string;\n /** Applied to the sheet, e.g. to override `max-width`. */\n className?: string;\n /** Applied to the overlay, e.g. to change the dim or z-index. */\n overlayClassName?: string;\n\n 'data-testid'?: string;\n}\n\nconst cx = (...classNames: (string | false | undefined)[]) =>\n classNames.filter(Boolean).join(' ');\n\nconst CloseIcon: React.FC = () => (\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\">\n <path\n d=\"M12 4L4 12M4 4l8 8\"\n stroke=\"currentColor\"\n strokeWidth=\"1.8\"\n strokeLinecap=\"round\"\n />\n </svg>\n);\n\nexport const BottomSheet: React.FC<BottomSheetProps> = ({\n isOpen,\n onClose,\n children,\n header,\n footer,\n showCloseButton = true,\n showDragHandle = false,\n closeOnBackdropClick = true,\n closeOnEscape = true,\n lockBodyScroll = true,\n ariaLabel,\n className = '',\n overlayClassName = '',\n 'data-testid': dataTestId,\n}) => {\n useEffect(() => {\n if (!isOpen) return;\n\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Escape') onClose();\n };\n if (closeOnEscape) document.addEventListener('keydown', handleKeyDown);\n\n // Restore whatever was there rather than clearing, so nested sheets and\n // hosts that already lock scrolling are not trampled on unmount.\n const previousOverflow = document.body.style.overflow;\n if (lockBodyScroll) document.body.style.overflow = 'hidden';\n\n return () => {\n if (closeOnEscape) document.removeEventListener('keydown', handleKeyDown);\n if (lockBodyScroll) document.body.style.overflow = previousOverflow;\n };\n }, [isOpen, onClose, closeOnEscape, lockBodyScroll]);\n\n if (!isOpen) return null;\n\n return (\n <div\n className={cx(styles.overlay, overlayClassName)}\n role=\"presentation\"\n onClick={(event) => {\n // Only a tap on the dim area itself closes — not one that bubbled up\n // from inside the sheet.\n if (closeOnBackdropClick && event.target === event.currentTarget) {\n onClose();\n }\n }}\n >\n <div\n className={cx(styles.sheet, className)}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-label={ariaLabel}\n data-testid={dataTestId}\n >\n {showDragHandle && <div className={styles.handle} aria-hidden=\"true\" />}\n\n {showCloseButton && (\n <button\n type=\"button\"\n className={styles.closeBtn}\n onClick={onClose}\n aria-label=\"Close\"\n >\n <CloseIcon />\n </button>\n )}\n\n {header && <div className={styles.header}>{header}</div>}\n\n <div className={styles.body}>{children}</div>\n\n {footer && <div className={styles.footer}>{footer}</div>}\n </div>\n </div>\n );\n};\n"],"names":["cx","classNames","CloseIcon","jsx","BottomSheet","isOpen","onClose","children","header","footer","showCloseButton","showDragHandle","closeOnBackdropClick","closeOnEscape","lockBodyScroll","ariaLabel","className","overlayClassName","dataTestId","useEffect","handleKeyDown","event","previousOverflow","styles","jsxs"],"mappings":"+gBAgDMA,EAAK,IAAIC,IACbA,EAAW,OAAO,OAAO,EAAE,KAAK,GAAG,EAE/BC,EAAsB,IAC1BC,EAAAA,IAAC,MAAA,CAAI,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,KAAK,OAAO,cAAY,OACtE,SAAAA,EAAAA,IAAC,OAAA,CACC,EAAE,qBACF,OAAO,eACP,YAAY,MACZ,cAAc,OAAA,CAChB,EACF,EAGWC,EAA0C,CAAC,CACtD,OAAAC,EACA,QAAAC,EACA,SAAAC,EACA,OAAAC,EACA,OAAAC,EACA,gBAAAC,EAAkB,GAClB,eAAAC,EAAiB,GACjB,qBAAAC,EAAuB,GACvB,cAAAC,EAAgB,GAChB,eAAAC,EAAiB,GACjB,UAAAC,EACA,UAAAC,EAAY,GACZ,iBAAAC,EAAmB,GACnB,cAAeC,CACjB,KACEC,EAAAA,UAAU,IAAM,CACd,GAAI,CAACd,EAAQ,OAEb,MAAMe,EAAiBC,GAAyB,CAC1CA,EAAM,MAAQ,UAAUf,EAAA,CAC9B,EACIO,GAAe,SAAS,iBAAiB,UAAWO,CAAa,EAIrE,MAAME,EAAmB,SAAS,KAAK,MAAM,SAC7C,OAAIR,IAAgB,SAAS,KAAK,MAAM,SAAW,UAE5C,IAAM,CACPD,GAAe,SAAS,oBAAoB,UAAWO,CAAa,EACpEN,IAAgB,SAAS,KAAK,MAAM,SAAWQ,EACrD,CACF,EAAG,CAACjB,EAAQC,EAASO,EAAeC,CAAc,CAAC,EAE9CT,EAGHF,EAAAA,IAAC,MAAA,CACC,UAAWH,EAAGuB,EAAO,QAASN,CAAgB,EAC9C,KAAK,eACL,QAAUI,GAAU,CAGdT,GAAwBS,EAAM,SAAWA,EAAM,eACjDf,EAAA,CAEJ,EAEA,SAAAkB,EAAAA,KAAC,MAAA,CACC,UAAWxB,EAAGuB,EAAO,MAAOP,CAAS,EACrC,KAAK,SACL,aAAW,OACX,aAAYD,EACZ,cAAaG,EAEZ,SAAA,CAAAP,SAAmB,MAAA,CAAI,UAAWY,EAAO,OAAQ,cAAY,OAAO,EAEpEb,GACCP,EAAAA,IAAC,SAAA,CACC,KAAK,SACL,UAAWoB,EAAO,SAClB,QAASjB,EACT,aAAW,QAEX,eAACJ,EAAA,CAAA,CAAU,CAAA,CAAA,EAIdM,GAAUL,EAAAA,IAAC,MAAA,CAAI,UAAWoB,EAAO,OAAS,SAAAf,EAAO,EAElDL,EAAAA,IAAC,MAAA,CAAI,UAAWoB,EAAO,KAAO,SAAAhB,EAAS,EAEtCE,GAAUN,EAAAA,IAAC,MAAA,CAAI,UAAWoB,EAAO,OAAS,SAAAd,CAAA,CAAO,CAAA,CAAA,CAAA,CACpD,CAAA,EAvCgB"}
@@ -0,0 +1,31 @@
1
+ import { default as React } from 'react';
2
+ export interface BottomSheetProps {
3
+ isOpen: boolean;
4
+ /** Called by the close button, backdrop tap and Escape. */
5
+ onClose: () => void;
6
+ /** Scrolling content. */
7
+ children: React.ReactNode;
8
+ /** Pinned above the scroll area. */
9
+ header?: React.ReactNode;
10
+ /** Pinned below the scroll area, e.g. a primary CTA. */
11
+ footer?: React.ReactNode;
12
+ /** Round close button in the top-right corner. */
13
+ showCloseButton?: boolean;
14
+ /** Decorative drag handle at the top. Off by default. */
15
+ showDragHandle?: boolean;
16
+ closeOnBackdropClick?: boolean;
17
+ closeOnEscape?: boolean;
18
+ /**
19
+ * Freeze the page behind the sheet. On by default — without it mobile
20
+ * browsers scroll the page under the sheet.
21
+ */
22
+ lockBodyScroll?: boolean;
23
+ /** Accessible name for the dialog. */
24
+ ariaLabel?: string;
25
+ /** Applied to the sheet, e.g. to override `max-width`. */
26
+ className?: string;
27
+ /** Applied to the overlay, e.g. to change the dim or z-index. */
28
+ overlayClassName?: string;
29
+ 'data-testid'?: string;
30
+ }
31
+ export declare const BottomSheet: React.FC<BottomSheetProps>;
@@ -0,0 +1 @@
1
+ export { BottomSheet, type BottomSheetProps } from './BottomSheet';
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @srimandir/common
3
+ *
4
+ * Generic, product-agnostic UI primitives shared across the Srimandir packages
5
+ * — the base of the dependency graph, so nothing here may import another
6
+ * @srimandir package. Buttons, modals and the rest land here as they are
7
+ * extracted from the product packages.
8
+ */
9
+ export { BottomSheet } from './components/BottomSheet';
10
+ export type { BottomSheetProps } from './components/BottomSheet';
package/dist/style.css ADDED
@@ -0,0 +1 @@
1
+ @charset "UTF-8";._overlay_7kyzr_3{position:fixed;inset:0;z-index:1100;display:flex;align-items:flex-end;justify-content:center;background:#0006;animation:_bottomSheetFadeIn_7kyzr_1 .2s ease-out}._sheet_7kyzr_14{position:relative;display:flex;flex-direction:column;width:100%;max-width:480px;max-height:92dvh;background:#fff;border-radius:16px 16px 0 0;animation:_bottomSheetSlideUp_7kyzr_1 .28s cubic-bezier(.32,.72,0,1);-webkit-overflow-scrolling:touch;box-sizing:border-box}@keyframes _bottomSheetFadeIn_7kyzr_1{0%{opacity:0}to{opacity:1}}@keyframes _bottomSheetSlideUp_7kyzr_1{0%{transform:translateY(100%)}to{transform:translateY(0)}}@media(prefers-reduced-motion:reduce){._overlay_7kyzr_3,._sheet_7kyzr_14{animation:none}}._handle_7kyzr_51{flex-shrink:0;width:40px;height:4px;margin:8px auto 0;border-radius:999px;background:#d1d5db}._closeBtn_7kyzr_60{position:absolute;top:12px;right:12px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;border:0;border-radius:50%;background:#f3f4f6;color:#374151;cursor:pointer;z-index:2}._header_7kyzr_79{flex-shrink:0}._body_7kyzr_84{flex:1;min-height:0;overflow-y:auto}._footer_7kyzr_91{flex-shrink:0;padding-bottom:env(safe-area-inset-bottom);background:#fff}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@srimandir/common",
3
- "version": "1.1.2",
3
+ "version": "1.1.5",
4
4
  "description": "Generic, product-agnostic UI primitives (bottom sheet, buttons, modals) shared across the Srimandir packages",
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -50,5 +50,5 @@
50
50
  "react"
51
51
  ],
52
52
  "license": "MIT",
53
- "gitHead": "bcb2525af5bf9a66b0c238b69f1e3058fe6c2734"
53
+ "gitHead": "b3fa1788da0793a291e562cb289150b22e9713ef"
54
54
  }