@devalok/shilp-sutra 0.18.0 → 0.18.2

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 (214) hide show
  1. package/dist/_chunks/motion-provider.js +24 -0
  2. package/dist/_chunks/primitives.js +101 -101
  3. package/dist/_chunks/tree-view.js +12 -12
  4. package/dist/_chunks/use-calendar.js +1 -1
  5. package/dist/_chunks/vendor-utils.js +2 -2
  6. package/dist/composed/activity-feed.js +21 -21
  7. package/dist/composed/avatar-group.js +25 -25
  8. package/dist/composed/command-palette.js +3 -3
  9. package/dist/composed/confirm-dialog.js +1 -1
  10. package/dist/composed/content-card.js +1 -1
  11. package/dist/composed/empty-state.js +2 -2
  12. package/dist/composed/error-boundary.js +2 -2
  13. package/dist/composed/global-loading.js +10 -10
  14. package/dist/composed/lib/string-utils.d.ts +0 -1
  15. package/dist/composed/lib/string-utils.js +0 -1
  16. package/dist/composed/loading-skeleton.js +1 -1
  17. package/dist/composed/member-picker.js +6 -6
  18. package/dist/composed/page-header.js +1 -1
  19. package/dist/composed/page-skeletons.js +1 -1
  20. package/dist/composed/priority-indicator.js +6 -6
  21. package/dist/composed/rich-text-editor.js +1 -1
  22. package/dist/composed/schedule-view.js +15 -15
  23. package/dist/composed/simple-tooltip.js +8 -8
  24. package/dist/composed/status-badge.js +12 -12
  25. package/dist/motion/index.d.ts +1 -1
  26. package/dist/motion/index.d.ts.map +1 -1
  27. package/dist/motion/index.js +8 -6
  28. package/dist/motion/primitives-index.js +184 -8
  29. package/dist/shell/app-command-palette.js +1 -1
  30. package/dist/shell/bottom-navbar.js +3 -3
  31. package/dist/shell/notification-center.js +35 -35
  32. package/dist/shell/notification-preferences.js +29 -28
  33. package/dist/shell/sidebar.js +56 -56
  34. package/dist/shell/top-bar.js +25 -25
  35. package/dist/ui/accordion.js +11 -11
  36. package/dist/ui/alert-dialog.js +41 -41
  37. package/dist/ui/alert.js +10 -10
  38. package/dist/ui/aspect-ratio.js +5 -5
  39. package/dist/ui/autocomplete.js +15 -15
  40. package/dist/ui/avatar.js +4 -4
  41. package/dist/ui/badge.js +11 -11
  42. package/dist/ui/banner.js +3 -3
  43. package/dist/ui/breadcrumb.js +8 -8
  44. package/dist/ui/button-group.js +4 -4
  45. package/dist/ui/button.js +25 -25
  46. package/dist/ui/card.js +5 -5
  47. package/dist/ui/charts/index.js +4 -4
  48. package/dist/ui/checkbox.js +4 -4
  49. package/dist/ui/chip.js +14 -14
  50. package/dist/ui/code.js +1 -1
  51. package/dist/ui/collapsible.js +7 -7
  52. package/dist/ui/color-input.js +1 -1
  53. package/dist/ui/combobox.js +5 -5
  54. package/dist/ui/container.js +4 -4
  55. package/dist/ui/context-menu.js +4 -4
  56. package/dist/ui/data-table-toolbar.js +18 -18
  57. package/dist/ui/data-table.js +55 -55
  58. package/dist/ui/dialog.js +3 -3
  59. package/dist/ui/dropdown-menu.js +3 -3
  60. package/dist/ui/file-upload.js +10 -10
  61. package/dist/ui/form.js +1 -1
  62. package/dist/ui/hover-card.js +12 -12
  63. package/dist/ui/icon-button.js +9 -9
  64. package/dist/ui/index.js +322 -516
  65. package/dist/ui/input-otp.js +4 -4
  66. package/dist/ui/input.js +9 -9
  67. package/dist/ui/label.js +9 -9
  68. package/dist/ui/lib/date-utils.d.ts +0 -1
  69. package/dist/{_chunks → ui/lib}/date-utils.js +1 -2
  70. package/dist/{_chunks/motion2.js → ui/lib/motion.js} +13 -14
  71. package/dist/ui/lib/use-ripple.d.ts.map +1 -1
  72. package/dist/ui/lib/utils.js +1 -1
  73. package/dist/ui/link.js +1 -1
  74. package/dist/ui/menubar.js +66 -66
  75. package/dist/ui/navigation-menu.js +4 -4
  76. package/dist/ui/number-input.js +9 -9
  77. package/dist/ui/pagination.js +1 -1
  78. package/dist/ui/popover.js +18 -18
  79. package/dist/ui/progress.js +4 -4
  80. package/dist/ui/radio.js +11 -11
  81. package/dist/ui/search-input.js +2 -2
  82. package/dist/ui/segmented-control.d.ts +2 -0
  83. package/dist/ui/segmented-control.d.ts.map +1 -1
  84. package/dist/ui/segmented-control.js +59 -55
  85. package/dist/ui/select.js +19 -19
  86. package/dist/ui/separator.js +5 -5
  87. package/dist/ui/sheet.js +10 -10
  88. package/dist/ui/sidebar.js +574 -38
  89. package/dist/ui/skeleton.js +1 -1
  90. package/dist/ui/slider.js +9 -9
  91. package/dist/ui/spinner.js +2 -2
  92. package/dist/ui/stack.js +1 -1
  93. package/dist/ui/stat-card.js +35 -35
  94. package/dist/ui/stepper.d.ts +1 -3
  95. package/dist/ui/stepper.d.ts.map +1 -1
  96. package/dist/ui/stepper.js +74 -74
  97. package/dist/ui/switch.js +7 -7
  98. package/dist/ui/table.js +28 -28
  99. package/dist/ui/tabs.js +10 -10
  100. package/dist/ui/text.js +1 -1
  101. package/dist/ui/textarea.js +10 -10
  102. package/dist/ui/toast.js +12 -12
  103. package/dist/ui/toaster.js +11 -11
  104. package/dist/ui/toggle-group.js +2 -2
  105. package/dist/ui/toggle.js +8 -8
  106. package/dist/ui/tooltip.js +21 -21
  107. package/dist/ui/visually-hidden.js +3 -3
  108. package/docs/components/_header.md +83 -0
  109. package/docs/components/composed/activity-feed.md +43 -0
  110. package/docs/components/composed/avatar-group.md +32 -0
  111. package/docs/components/composed/command-palette.md +40 -0
  112. package/docs/components/composed/confirm-dialog.md +46 -0
  113. package/docs/components/composed/content-card.md +36 -0
  114. package/docs/components/composed/date-picker.md +130 -0
  115. package/docs/components/composed/empty-state.md +53 -0
  116. package/docs/components/composed/error-boundary.md +29 -0
  117. package/docs/components/composed/global-loading.md +27 -0
  118. package/docs/components/composed/loading-skeleton.md +51 -0
  119. package/docs/components/composed/member-picker.md +35 -0
  120. package/docs/components/composed/page-header.md +41 -0
  121. package/docs/components/composed/page-skeletons.md +32 -0
  122. package/docs/components/composed/priority-indicator.md +32 -0
  123. package/docs/components/composed/rich-text-editor.md +71 -0
  124. package/docs/components/composed/schedule-view.md +39 -0
  125. package/docs/components/composed/simple-tooltip.md +33 -0
  126. package/docs/components/composed/status-badge.md +41 -0
  127. package/docs/components/shell/app-command-palette.md +44 -0
  128. package/docs/components/shell/bottom-navbar.md +48 -0
  129. package/docs/components/shell/command-registry.md +48 -0
  130. package/docs/components/shell/link-context.md +41 -0
  131. package/docs/components/shell/notification-center.md +63 -0
  132. package/docs/components/shell/notification-preferences.md +42 -0
  133. package/docs/components/shell/sidebar.md +88 -0
  134. package/docs/components/shell/top-bar.md +63 -0
  135. package/docs/components/ui/accordion.md +48 -0
  136. package/docs/components/ui/alert-dialog.md +58 -0
  137. package/docs/components/ui/alert.md +43 -0
  138. package/docs/components/ui/aspect-ratio.md +25 -0
  139. package/docs/components/ui/autocomplete.md +48 -0
  140. package/docs/components/ui/avatar.md +34 -0
  141. package/docs/components/ui/badge.md +48 -0
  142. package/docs/components/ui/banner.md +35 -0
  143. package/docs/components/ui/breadcrumb.md +37 -0
  144. package/docs/components/ui/button-group.md +32 -0
  145. package/docs/components/ui/button.md +55 -0
  146. package/docs/components/ui/card.md +48 -0
  147. package/docs/components/ui/charts.md +43 -0
  148. package/docs/components/ui/checkbox.md +31 -0
  149. package/docs/components/ui/chip.md +43 -0
  150. package/docs/components/ui/code.md +28 -0
  151. package/docs/components/ui/collapsible.md +40 -0
  152. package/docs/components/ui/color-input.md +37 -0
  153. package/docs/components/ui/combobox.md +54 -0
  154. package/docs/components/ui/container.md +26 -0
  155. package/docs/components/ui/context-menu.md +43 -0
  156. package/docs/components/ui/data-table-toolbar.md +44 -0
  157. package/docs/components/ui/data-table.md +91 -0
  158. package/docs/components/ui/dialog.md +51 -0
  159. package/docs/components/ui/dropdown-menu.md +45 -0
  160. package/docs/components/ui/file-upload.md +41 -0
  161. package/docs/components/ui/form.md +51 -0
  162. package/docs/components/ui/hover-card.md +32 -0
  163. package/docs/components/ui/icon-button.md +33 -0
  164. package/docs/components/ui/input-otp.md +44 -0
  165. package/docs/components/ui/input.md +48 -0
  166. package/docs/components/ui/label.md +25 -0
  167. package/docs/components/ui/link.md +29 -0
  168. package/docs/components/ui/menubar.md +44 -0
  169. package/docs/components/ui/navigation-menu.md +46 -0
  170. package/docs/components/ui/number-input.md +44 -0
  171. package/docs/components/ui/pagination.md +48 -0
  172. package/docs/components/ui/popover.md +30 -0
  173. package/docs/components/ui/progress.md +29 -0
  174. package/docs/components/ui/radio.md +34 -0
  175. package/docs/components/ui/search-input.md +43 -0
  176. package/docs/components/ui/segmented-control.md +50 -0
  177. package/docs/components/ui/select.md +49 -0
  178. package/docs/components/ui/separator.md +29 -0
  179. package/docs/components/ui/sheet.md +47 -0
  180. package/docs/components/ui/sidebar.md +72 -0
  181. package/docs/components/ui/skeleton.md +77 -0
  182. package/docs/components/ui/slider.md +29 -0
  183. package/docs/components/ui/spinner.md +50 -0
  184. package/docs/components/ui/stack.md +39 -0
  185. package/docs/components/ui/stat-card.md +61 -0
  186. package/docs/components/ui/stepper.md +49 -0
  187. package/docs/components/ui/switch.md +34 -0
  188. package/docs/components/ui/table.md +47 -0
  189. package/docs/components/ui/tabs.md +56 -0
  190. package/docs/components/ui/text.md +37 -0
  191. package/docs/components/ui/textarea.md +39 -0
  192. package/docs/components/ui/toast.md +65 -0
  193. package/docs/components/ui/toaster.md +47 -0
  194. package/docs/components/ui/toggle-group.md +43 -0
  195. package/docs/components/ui/toggle.md +37 -0
  196. package/docs/components/ui/tooltip.md +33 -0
  197. package/docs/components/ui/tree-view.md +65 -0
  198. package/docs/components/ui/visually-hidden.md +21 -0
  199. package/llms-full.txt +3384 -1591
  200. package/llms.txt +4 -4
  201. package/package.json +28 -3
  202. package/dist/_chunks/avatar.js +0 -52
  203. package/dist/_chunks/button-group.js +0 -27
  204. package/dist/_chunks/button.js +0 -113
  205. package/dist/_chunks/card.js +0 -50
  206. package/dist/_chunks/checkbox.js +0 -16
  207. package/dist/_chunks/form.js +0 -27
  208. package/dist/_chunks/sidebar.js +0 -606
  209. package/dist/_chunks/spinner.js +0 -64
  210. package/dist/_chunks/tooltip.js +0 -30
  211. package/dist/_chunks/utils.js +0 -17
  212. package/dist/motion/motion-provider.js +0 -24
  213. package/dist/motion/primitives.js +0 -187
  214. /package/dist/_chunks/{motion.js → framer.js} +0 -0
@@ -0,0 +1,130 @@
1
+ # DatePicker
2
+
3
+ - Import: @devalok/shilp-sutra/composed/date-picker
4
+ - Server-safe: No
5
+ - Category: composed
6
+
7
+ ## Props
8
+
9
+ ### DatePicker
10
+ value: Date | null
11
+ onChange: (date: Date | null) => void
12
+ placeholder: string (default: "Pick a date")
13
+ formatStr: string (default: "MMM d, yyyy")
14
+ minDate: Date
15
+ maxDate: Date
16
+ disabledDates: (date: Date) => boolean
17
+ className: string
18
+
19
+ ### DateRangePicker
20
+ startDate: Date | null
21
+ endDate: Date | null
22
+ onChange: (range: { start: Date | null, end: Date | null }) => void
23
+ placeholder: string (default: "Pick a date range")
24
+ formatStr: string (default: "MMM d, yyyy")
25
+ minDate: Date
26
+ maxDate: Date
27
+ disabledDates: (date: Date) => boolean
28
+ presets: PresetKey[] (shows quick-select sidebar)
29
+ numberOfMonths: number (default: 1)
30
+
31
+ ### DateTimePicker
32
+ value: Date | null
33
+ onChange: (date: Date | null) => void
34
+ minDate: Date
35
+ maxDate: Date
36
+ disabledDates: (date: Date) => boolean
37
+ timeFormat: "12h" | "24h"
38
+ minuteStep: number
39
+ placeholder: string
40
+ className: string
41
+
42
+ ### TimePicker
43
+ value: Date | null (time stored as a Date object)
44
+ onChange: (date: Date) => void
45
+ format: "12h" | "24h" (default: "12h")
46
+ minuteStep: number (default: 1)
47
+ secondStep: number (default: 1)
48
+ showSeconds: boolean (default: false)
49
+ placeholder: string (default: "Pick a time")
50
+ disabled: boolean (default: false)
51
+ className: string
52
+
53
+ ### CalendarGrid
54
+ currentMonth: Date (REQUIRED)
55
+ selected: Date | null
56
+ rangeStart: Date | null
57
+ rangeEnd: Date | null
58
+ hoverDate: Date | null
59
+ onSelect: (date: Date) => void (REQUIRED)
60
+ onHover: (date: Date | null) => void
61
+ onMonthChange: (date: Date) => void (REQUIRED)
62
+ onHeaderClick: () => void
63
+ disabledDates: (date: Date) => boolean
64
+ minDate: Date
65
+ maxDate: Date
66
+ hidePrevNav: boolean
67
+ hideNextNav: boolean
68
+ events: CalendarEvent[] — { date: Date, color?: string, label?: string }
69
+
70
+ ### YearPicker
71
+ currentYear: number (REQUIRED)
72
+ selectedYear: number
73
+ onYearSelect: (year: number) => void (REQUIRED)
74
+ minDate: Date
75
+ maxDate: Date
76
+
77
+ ### MonthPicker
78
+ currentYear: number (REQUIRED)
79
+ selectedMonth: number (0-11)
80
+ onMonthSelect: (month: number) => void (REQUIRED)
81
+ minDate: Date
82
+ maxDate: Date
83
+
84
+ ### Presets
85
+ presets: PresetKey[] (REQUIRED)
86
+ onSelect: (start: Date, end: Date) => void (REQUIRED)
87
+ className: string
88
+
89
+ PresetKey: 'today' | 'yesterday' | 'last7days' | 'last30days' | 'thisMonth' | 'lastMonth' | 'thisYear'
90
+
91
+ ### useCalendar hook
92
+ useCalendar(initialMonth?: Date) => { currentMonth, setCurrentMonth, goToPreviousMonth, goToNextMonth, goToMonth, goToYear }
93
+
94
+ ## Defaults
95
+ DatePicker: placeholder="Pick a date", formatStr="MMM d, yyyy"
96
+ DateRangePicker: placeholder="Pick a date range", formatStr="MMM d, yyyy", numberOfMonths=1
97
+ TimePicker: format="12h", minuteStep=1, secondStep=1, showSeconds=false
98
+
99
+ ## Example
100
+ ```jsx
101
+ <DatePicker value={date} onChange={setDate} placeholder="Select date" />
102
+
103
+ <DateRangePicker
104
+ startDate={start}
105
+ endDate={end}
106
+ onChange={({ start, end }) => { setStart(start); setEnd(end); }}
107
+ />
108
+
109
+ <DateTimePicker value={dateTime} onChange={setDateTime} timeFormat="12h" minuteStep={15} />
110
+
111
+ <TimePicker value={time} onChange={setTime} format="24h" minuteStep={15} />
112
+ ```
113
+
114
+ ## Gotchas
115
+ - TimePicker stores time inside a Date object — only hours/minutes/seconds are meaningful
116
+ - CalendarGrid is a low-level building block — prefer DatePicker/DateRangePicker for most use cases
117
+ - MonthPicker month values are 0-indexed (Jan=0, Dec=11) — same as JavaScript `Date.getMonth()`
118
+ - YearPicker displays a 12-year grid based on the decade of `currentYear`
119
+ - CalendarGrid supports up to 3 event dots per day cell
120
+ - useCalendar is a convenience hook for managing calendar month state
121
+
122
+ ## Changes
123
+ ### v0.18.0
124
+ - **Fixed** Added `aria-label` to DatePicker/DateRangePicker trigger buttons
125
+
126
+ ### v0.4.2
127
+ - **Changed** DateRangePicker default `formatStr` from `'MMM d'` to `'MMM d, yyyy'`
128
+
129
+ ### v0.1.0
130
+ - **Added** Initial release
@@ -0,0 +1,53 @@
1
+ # EmptyState
2
+
3
+ - Import: @devalok/shilp-sutra/composed/empty-state
4
+ - Server-safe: No
5
+ - Category: composed
6
+
7
+ Note: EmptyState was server-safe prior to v0.18.0 but is NO LONGER server-safe due to Framer Motion dependency.
8
+
9
+ ## Props
10
+ title: string (REQUIRED)
11
+ description: string
12
+ icon: ReactNode | ComponentType<{ className?: string }> (default: Devalok chakra icon)
13
+ action: ReactNode (e.g. a Button)
14
+ compact: boolean (smaller layout)
15
+ iconSize: 'sm' | 'md' | 'lg' (default 'md', compact defaults to 'sm') — sm=h-ico-sm, md=h-ico-lg, lg=h-ico-xl
16
+
17
+ ## Defaults
18
+ iconSize="md" (compact defaults to "sm")
19
+
20
+ ## Example
21
+ ```jsx
22
+ <EmptyState
23
+ title="No tasks found"
24
+ description="Create your first task to get started."
25
+ action={<Button>Create Task</Button>}
26
+ iconSize="lg"
27
+ />
28
+ ```
29
+
30
+ ## Gotchas
31
+ - `icon` accepts both JSX elements (`<IconFolder />`) and component references (`IconFolder`). Component references are auto-instantiated with correct sizing classes.
32
+ - `iconSize` controls icon dimensions regardless of icon type. When `compact=true` and no `iconSize`, defaults to `'sm'`.
33
+ - As of v0.18.0, EmptyState is NOT server-safe (Framer Motion dependency). Use per-component import in client components.
34
+
35
+ ## Changes
36
+ ### v0.18.0
37
+ - **Changed** No longer server-safe due to Framer Motion dependency
38
+
39
+ ### v0.16.0
40
+ - **Added** `iconSize?: 'sm' | 'md' | 'lg'` — control icon dimensions
41
+
42
+ ### v0.13.0
43
+ - **Changed** `icon` prop now accepts `React.ComponentType<{ className?: string }>` in addition to `ReactNode` — component references are auto-instantiated
44
+
45
+ ### v0.5.0
46
+ - **Changed** `icon` prop changed from `TablerIcon` (component ref) to `React.ReactNode` — use `icon={<MyIcon />}` instead of `icon={MyIcon}`
47
+ - **Changed** Default icon is now the Devalok swadhisthana chakra (inline SVG)
48
+
49
+ ### v0.2.0
50
+ - **Added** Identified as server-safe component (later reverted in v0.18.0)
51
+
52
+ ### v0.1.0
53
+ - **Added** Initial release
@@ -0,0 +1,29 @@
1
+ # ErrorDisplay
2
+
3
+ - Import: @devalok/shilp-sutra/composed/error-boundary
4
+ - Server-safe: No
5
+ - Category: composed
6
+
7
+ ## Props
8
+ error: unknown (REQUIRED — Error object, status object, or string)
9
+ onReset: () => void (optional retry button)
10
+
11
+ ## Defaults
12
+ None
13
+
14
+ ## Example
15
+ ```jsx
16
+ <ErrorDisplay error={error} onReset={() => refetch()} />
17
+ ```
18
+
19
+ ## Gotchas
20
+ - Auto-detects HTTP status codes (404, 403, 500) and shows appropriate icon/message
21
+ - Shows stack trace in development mode only
22
+ - The import path is `error-boundary` but the component is named `ErrorDisplay`
23
+
24
+ ## Changes
25
+ ### v0.18.0
26
+ - **Added** ErrorBoundary tests (13 new tests)
27
+
28
+ ### v0.1.0
29
+ - **Added** Initial release
@@ -0,0 +1,27 @@
1
+ # GlobalLoading
2
+
3
+ - Import: @devalok/shilp-sutra/composed/global-loading
4
+ - Server-safe: No
5
+ - Category: composed
6
+
7
+ ## Props
8
+ isLoading: boolean (REQUIRED)
9
+
10
+ ## Defaults
11
+ None
12
+
13
+ ## Example
14
+ ```jsx
15
+ <GlobalLoading isLoading={isNavigating} />
16
+ ```
17
+
18
+ ## Gotchas
19
+ - Fixed-position bar at top of viewport (z-toast layer)
20
+ - Renders nothing when `isLoading` is false
21
+
22
+ ## Changes
23
+ ### v0.18.0
24
+ - **Fixed** Track `setTimeout` with ref, add cleanup on unmount
25
+
26
+ ### v0.1.0
27
+ - **Added** Initial release
@@ -0,0 +1,51 @@
1
+ # LoadingSkeleton
2
+
3
+ - Import: @devalok/shilp-sutra/composed/loading-skeleton
4
+ - Server-safe: Yes
5
+ - Category: composed
6
+
7
+ Exports: CardSkeleton, TableSkeleton, BoardSkeleton, ListSkeleton
8
+
9
+ ## Props
10
+
11
+ ### CardSkeleton
12
+ className: string
13
+
14
+ ### TableSkeleton
15
+ rows: number (default: 5)
16
+ columns: number (default: 4)
17
+ className: string
18
+
19
+ ### BoardSkeleton
20
+ columns: number (default: 4)
21
+ cardsPerColumn: number (default: 3)
22
+ className: string
23
+
24
+ ### ListSkeleton
25
+ rows: number (default: 6)
26
+ showAvatar: boolean (default: true)
27
+ className: string
28
+
29
+ ## Defaults
30
+ TableSkeleton: rows=5, columns=4
31
+ BoardSkeleton: columns=4, cardsPerColumn=3
32
+ ListSkeleton: rows=6, showAvatar=true
33
+
34
+ ## Example
35
+ ```jsx
36
+ <CardSkeleton />
37
+ <TableSkeleton rows={8} columns={5} />
38
+ <BoardSkeleton columns={3} cardsPerColumn={4} />
39
+ <ListSkeleton rows={10} showAvatar={false} />
40
+ ```
41
+
42
+ ## Gotchas
43
+ - Server-safe: can be imported directly in Next.js Server Components
44
+ - These are pre-composed skeleton layouts — for individual skeleton shapes, use the `Skeleton` UI component
45
+
46
+ ## Changes
47
+ ### v0.2.0
48
+ - **Added** Identified as server-safe component
49
+
50
+ ### v0.1.0
51
+ - **Added** Initial release
@@ -0,0 +1,35 @@
1
+ # MemberPicker
2
+
3
+ - Import: @devalok/shilp-sutra/composed/member-picker
4
+ - Server-safe: No
5
+ - Category: composed
6
+
7
+ ## Props
8
+ members: MemberPickerMember[] (REQUIRED) — { id, name, avatar? }
9
+ selectedIds: string[] (REQUIRED)
10
+ onSelect: (memberId: string) => void (REQUIRED)
11
+ multiple: boolean (default: false)
12
+ placeholder: string (default: "Search members...")
13
+ children: ReactNode (trigger element)
14
+
15
+ ## Defaults
16
+ multiple=false, placeholder="Search members..."
17
+
18
+ ## Example
19
+ ```jsx
20
+ <MemberPicker members={teamMembers} selectedIds={assignees} onSelect={toggleAssignee} multiple>
21
+ <Button variant="outline">Assign Members</Button>
22
+ </MemberPicker>
23
+ ```
24
+
25
+ ## Gotchas
26
+ - `children` is used as the trigger element (e.g., a Button)
27
+ - `onSelect` is called with a single `memberId` — toggle logic is up to the consumer
28
+ - When `multiple=false`, selecting a new member replaces the previous selection
29
+
30
+ ## Changes
31
+ ### v0.18.0
32
+ - **Fixed** Added `aria-label` to search input
33
+
34
+ ### v0.1.0
35
+ - **Added** Initial release
@@ -0,0 +1,41 @@
1
+ # PageHeader
2
+
3
+ - Import: @devalok/shilp-sutra/composed/page-header
4
+ - Server-safe: Yes
5
+ - Category: composed
6
+
7
+ ## Props
8
+ title: string (falls back to last breadcrumb label if omitted)
9
+ subtitle: string
10
+ actions: ReactNode (action buttons)
11
+ breadcrumbs: Breadcrumb[] — { label: string, href?: string }
12
+ titleClassName: string
13
+
14
+ ## Defaults
15
+ None
16
+
17
+ ## Example
18
+ ```jsx
19
+ <PageHeader
20
+ title="Project Settings"
21
+ subtitle="Configure your project preferences"
22
+ breadcrumbs={[
23
+ { label: 'Home', href: '/' },
24
+ { label: 'Projects', href: '/projects' },
25
+ { label: 'Settings' },
26
+ ]}
27
+ actions={<Button>Save</Button>}
28
+ />
29
+ ```
30
+
31
+ ## Gotchas
32
+ - Server-safe: can be imported directly in Next.js Server Components
33
+ - If `title` is omitted, the last breadcrumb's `label` is used as the page title
34
+ - The last breadcrumb should not have an `href` (it represents the current page)
35
+
36
+ ## Changes
37
+ ### v0.2.0
38
+ - **Added** Identified as server-safe component
39
+
40
+ ### v0.1.0
41
+ - **Added** Initial release
@@ -0,0 +1,32 @@
1
+ # PageSkeletons
2
+
3
+ - Import: @devalok/shilp-sutra/composed/page-skeletons
4
+ - Server-safe: Yes
5
+ - Category: composed
6
+
7
+ Exports: DashboardSkeleton, ProjectListSkeleton, TaskDetailSkeleton
8
+
9
+ ## Props
10
+ className?: string (plus all standard HTML div attributes via React.ComponentPropsWithoutRef<'div'>)
11
+
12
+ ## Defaults
13
+ None
14
+
15
+ ## Example
16
+ ```jsx
17
+ <DashboardSkeleton />
18
+ <ProjectListSkeleton />
19
+ <TaskDetailSkeleton />
20
+ ```
21
+
22
+ ## Gotchas
23
+ - Server-safe: can be imported directly in Next.js Server Components
24
+ - These are full-page skeleton layouts — for smaller skeleton sections, use LoadingSkeleton components
25
+ - Accept `className` and standard div attributes but render fixed layout structures
26
+
27
+ ## Changes
28
+ ### v0.2.0
29
+ - **Added** Identified as server-safe component
30
+
31
+ ### v0.1.0
32
+ - **Added** Initial release
@@ -0,0 +1,32 @@
1
+ # PriorityIndicator
2
+
3
+ - Import: @devalok/shilp-sutra/composed/priority-indicator
4
+ - Server-safe: Yes
5
+ - Category: composed
6
+
7
+ ## Props
8
+ priority: Priority
9
+ display: "compact" | "full" (default: "full")
10
+
11
+ Priority = 'LOW' | 'MEDIUM' | 'HIGH' | 'URGENT' | 'low' | 'medium' | 'high' | 'urgent'
12
+
13
+ ## Defaults
14
+ display="full"
15
+
16
+ ## Example
17
+ ```jsx
18
+ <PriorityIndicator priority="HIGH" />
19
+ <PriorityIndicator priority="low" display="compact" />
20
+ ```
21
+
22
+ ## Gotchas
23
+ - Case-insensitive — "low" and "LOW" both work
24
+ - Server-safe: can be imported directly in Next.js Server Components
25
+ - `compact` display shows only the icon; `full` shows icon + text label
26
+
27
+ ## Changes
28
+ ### v0.2.0
29
+ - **Added** Identified as server-safe component
30
+
31
+ ### v0.1.0
32
+ - **Added** Initial release
@@ -0,0 +1,71 @@
1
+ # RichTextEditor
2
+
3
+ - Import: @devalok/shilp-sutra/composed/rich-text-editor
4
+ - Server-safe: No
5
+ - Category: composed
6
+
7
+ Exports: RichTextEditor, RichTextViewer
8
+
9
+ ## Props
10
+
11
+ ### RichTextEditor
12
+ content: string (HTML string)
13
+ placeholder: string (default: "Start writing...")
14
+ onChange: (html: string) => void
15
+ className: string
16
+ editable: boolean (default: true)
17
+ onImageUpload?: (file: File) => Promise<string> — return URL. If omitted, images paste as base64
18
+ onFileUpload?: (file: File) => Promise<{ url: string; name: string; size: number }> — enables file attachments
19
+ mentions?: MentionItem[] — static list for @mention autocomplete
20
+ onMentionSearch?: (query: string) => Promise<MentionItem[]> — async search, takes precedence over static mentions
21
+ onMentionSelect?: (item: MentionItem) => void — called when a mention is selected
22
+
23
+ MentionItem: { id: string; label: string; avatar?: string }
24
+
25
+ ### RichTextViewer
26
+ content: string (REQUIRED, HTML string)
27
+ className: string
28
+
29
+ ## Defaults
30
+ RichTextEditor: placeholder="Start writing...", editable=true
31
+
32
+ ## Example
33
+ ```jsx
34
+ <RichTextEditor content={html} onChange={setHtml} placeholder="Write your message..." />
35
+
36
+ <RichTextEditor
37
+ content={html}
38
+ onChange={setHtml}
39
+ mentions={[{ id: '1', label: 'Aarav' }]}
40
+ onImageUpload={async (file) => uploadAndReturnUrl(file)}
41
+ onFileUpload={async (file) => ({ url: uploadUrl, name: file.name, size: file.size })}
42
+ />
43
+
44
+ <RichTextViewer content={savedHtml} />
45
+ ```
46
+
47
+ ## Gotchas
48
+ - Tiptap is bundled — no need to install `@tiptap/*` packages separately
49
+ - Emoji picker requires `@emoji-mart/react` + `@emoji-mart/data` peers
50
+ - Images without `onImageUpload` are stored as base64 in HTML — large images bloat content
51
+ - Mention rendering in viewer always works (no mention props needed, just the HTML)
52
+ - Features: bold, italic, underline, strikethrough, highlight, headings, blockquote, lists, task lists, code, links, images, file attachments, mentions, emoji, text alignment, horizontal rule
53
+
54
+ ## Changes
55
+ ### v0.18.0
56
+ - **Fixed** Use ref to track internal changes, prevent update loop
57
+
58
+ ### v0.9.0
59
+ - **Changed** All `@tiptap/*` packages moved from peerDependencies to bundled build-time dependencies — consumers no longer need to install tiptap separately
60
+
61
+ ### v0.8.0
62
+ - **Fixed** Emoji picker now renders above the editor (not clipped by overflow)
63
+ - **Fixed** Link/image URL injection prevented via protocol validation
64
+ - **Fixed** Escape key in emoji picker no longer closes parent dialogs
65
+ - **Fixed** Tiptap peer deps tightened to `>=2.27.2 <3.0.0`
66
+
67
+ ### v0.7.0
68
+ - **Added** Initial release — full-featured tiptap-based rich text editing with toolbar, mentions, emoji, image, alignment
69
+
70
+ ### v0.1.1
71
+ - **Fixed** Added content sync effect so editor updates when `content` prop changes externally
@@ -0,0 +1,39 @@
1
+ # ScheduleView
2
+
3
+ - Import: @devalok/shilp-sutra/composed/schedule-view
4
+ - Server-safe: No
5
+ - Category: composed
6
+
7
+ ## Props
8
+ view: "day" | "week" (REQUIRED)
9
+ date: Date (REQUIRED — current day or any date in target week)
10
+ events: ScheduleEvent[] (REQUIRED) — { id, title, start: Date, end: Date, color? }
11
+ onEventClick: (event: ScheduleEvent) => void
12
+ onSlotClick: (start: Date, end: Date) => void
13
+ startHour: number (default: 8)
14
+ endHour: number (default: 18, exclusive)
15
+ slotDuration: number (minutes, default: 30)
16
+
17
+ Event colors: "primary" | "success" | "warning" | "error" | "info" | "neutral"
18
+
19
+ ## Defaults
20
+ startHour=8, endHour=18, slotDuration=30
21
+
22
+ ## Example
23
+ ```jsx
24
+ <ScheduleView
25
+ view="week"
26
+ date={new Date()}
27
+ events={calendarEvents}
28
+ onEventClick={(e) => openEvent(e.id)}
29
+ />
30
+ ```
31
+
32
+ ## Gotchas
33
+ - `endHour` is exclusive — `endHour=18` means the last visible slot starts at 17:30 (with default 30min slots)
34
+ - `onSlotClick` fires when clicking an empty time slot — useful for creating new events
35
+ - Events that span outside `startHour`/`endHour` may be clipped
36
+
37
+ ## Changes
38
+ ### v0.1.0
39
+ - **Added** Initial release
@@ -0,0 +1,33 @@
1
+ # SimpleTooltip
2
+
3
+ - Import: @devalok/shilp-sutra/composed/simple-tooltip
4
+ - Server-safe: No
5
+ - Category: composed
6
+
7
+ ## Props
8
+ content: ReactNode (REQUIRED — tooltip content)
9
+ side: "top" | "right" | "bottom" | "left" (default: "top")
10
+ align: "start" | "center" | "end" (default: "center")
11
+ delayDuration: number (ms, default: 300)
12
+ children: ReactNode (trigger element)
13
+
14
+ ## Defaults
15
+ side="top", align="center", delayDuration=300
16
+
17
+ ## Example
18
+ ```jsx
19
+ <SimpleTooltip content="Edit this item">
20
+ <IconButton icon={<IconEdit />} aria-label="Edit" />
21
+ </SimpleTooltip>
22
+ ```
23
+
24
+ ## Gotchas
25
+ - Wraps the full Tooltip compound (Provider + Tooltip + Trigger + Content) into one component — no need for TooltipProvider
26
+ - Unlike the low-level Tooltip, SimpleTooltip does not require wrapping in a TooltipProvider
27
+
28
+ ## Changes
29
+ ### v0.18.0
30
+ - **Fixed** Type definition corrected
31
+
32
+ ### v0.1.0
33
+ - **Added** Initial release
@@ -0,0 +1,41 @@
1
+ # StatusBadge
2
+
3
+ - Import: @devalok/shilp-sutra/composed/status-badge
4
+ - Server-safe: No
5
+ - Category: composed
6
+
7
+ Note: StatusBadge was server-safe prior to v0.18.0 but is NO LONGER server-safe due to Framer Motion dependency.
8
+
9
+ ## Props
10
+ status: "active" | "pending" | "approved" | "rejected" | "completed" | "blocked" | "cancelled" | "draft"
11
+ color: "success" | "warning" | "error" | "info" | "neutral" (overrides status styling when set)
12
+ size: "sm" | "md"
13
+ label: string (auto-derived from status/color if omitted)
14
+ hideDot: boolean (default: false)
15
+
16
+ ## Defaults
17
+ size="md", hideDot=false
18
+
19
+ ## Example
20
+ ```jsx
21
+ <StatusBadge status="active" />
22
+ <StatusBadge color="warning" label="In Review" size="sm" />
23
+ ```
24
+
25
+ ## Gotchas
26
+ - When `color` is set, it takes priority over `status` for styling
27
+ - Props use a discriminated union — pass either `status` or `color`, not both
28
+ - As of v0.18.0, StatusBadge is NOT server-safe (Framer Motion dependency)
29
+
30
+ ## Changes
31
+ ### v0.18.0
32
+ - **Changed** No longer server-safe due to Framer Motion dependency
33
+
34
+ ### v0.8.0
35
+ - **Changed** Props now use discriminated union — pass either `status` or `color`, not both
36
+
37
+ ### v0.2.0
38
+ - **Added** Identified as server-safe component (later reverted in v0.18.0)
39
+
40
+ ### v0.1.0
41
+ - **Added** Initial release
@@ -0,0 +1,44 @@
1
+ # AppCommandPalette
2
+
3
+ - Import: @devalok/shilp-sutra/shell/app-command-palette
4
+ - Server-safe: No
5
+ - Category: shell
6
+
7
+ ## Props
8
+ user?: AppCommandPaletteUser | null — { name, role? } (optional)
9
+ isAdmin?: boolean (shows admin command groups regardless of user.role; takes precedence over role-based detection)
10
+ extraGroups?: CommandGroup[]
11
+ onNavigate?: (path: string) => void
12
+ onSearch?: (query: string) => void
13
+ searchResults?: SearchResult[]
14
+ isSearching?: boolean (shows loading state while search is in progress)
15
+ onSearchResultSelect?: (result: SearchResult) => void
16
+
17
+ SearchResult: { id: string, title: string, snippet?: string, entityType: string, projectId?: string | null, metadata?: Record<string, unknown> }
18
+ AppCommandPaletteUser: { name: string, role?: string }
19
+
20
+ ## Defaults
21
+ None
22
+
23
+ ## Example
24
+ ```jsx
25
+ <AppCommandPalette
26
+ user={{ name: 'John', role: 'admin' }}
27
+ isAdmin={true}
28
+ onNavigate={(path) => router.push(path)}
29
+ searchResults={results}
30
+ onSearchResultSelect={(r) => router.push(`/${r.entityType}/${r.id}`)}
31
+ />
32
+ ```
33
+
34
+ ## Gotchas
35
+ - Uses CommandRegistry context for page navigation items (see CommandRegistryProvider)
36
+ - `isAdmin` takes precedence over `user.role` for showing admin command groups
37
+ - Should be placed at the app root level, typically alongside TopBar
38
+
39
+ ## Changes
40
+ ### v0.3.0
41
+ - **Fixed** Added missing `'use client'` directive
42
+
43
+ ### v0.1.0
44
+ - **Added** Initial release