rahman-shared
v0.2.0
Published
Shared UI utils, hooks, and helpers for the rahman/resources kitab. Pure utilities only (cn, formatDate, sanitizeHtml, useDebounce, etc.) — UI components are distributed via the rahman-resources CLI scaffolder.
Downloads
303
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.
