rahman-shared
v0.3.1
Published
Shared UI utils, hooks, helpers, and a portable Notion-style formula engine for the Rahman Resources registry. Pure utilities (cn, formatDate, sanitizeHtml, useDebounce) + ./formulaEngine subpath (host-adapted, ~50 fns, lambdas, member access). UI compone
Readme
rahman-shared
Shared UI primitives, hooks, and utils for the rahman/resources kitab.
Install
pnpm add rahman-shared
# or: npm install rahman-sharedPublished to the public npm registry. No auth token required.
Surfaces
| Path | Export |
|---|---|
| rahman-shared/ui/ResponsiveDialog | Compound dialog/drawer/sheet/alert with mobile-aware variant |
| rahman-shared/ui/SmartLink | next/link wrapper with internal/external/protocol classification |
| rahman-shared/ui/SharedDatePicker | Date+time picker (calendar popover + time select) |
| rahman-shared/ui/DateField | RHF-aware wrapper around SharedDatePicker |
| rahman-shared/ui/FileUpload | Backend-agnostic upload zone (consumer supplies onUpload callback) |
| rahman-shared/hooks/useResponsive | Tailwind breakpoint subscriber + useMediaQuery |
| rahman-shared/hooks/useDebounce | Debounce value by delay ms |
| rahman-shared/hooks/useClickOutside | Pointer-outside-ref handler |
| rahman-shared/lib/formatDate | formatDate(d, pattern?) + formatRelative(d) |
| rahman-shared/lib/sanitizeHtml | Conservative HTML sanitizer for user content |
Publish (maintainer)
cd packages/shared
npm run publish:dry # validate
npm publish --otp=<6-digit> # publishStatus
0.1.0 — initial scaffold (Phase 2 of SSOT migration). Primitive re-exports populated as primitive PRs merge to main.
