@siyahi/ui 0.1.9-next.3 → 0.1.9-next.30

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 (254) hide show
  1. package/DESIGN.md +170 -0
  2. package/README.md +94 -177
  3. package/THIRD_PARTY_NOTICES.md +11 -11
  4. package/agents/examples/accordion.tsx +39 -0
  5. package/agents/examples/alert.tsx +24 -0
  6. package/agents/examples/app-sidebar.tsx +40 -0
  7. package/agents/examples/avatar.tsx +24 -0
  8. package/agents/examples/badge.tsx +26 -0
  9. package/agents/examples/bar-list-labels.tsx +22 -0
  10. package/agents/examples/bar-list-sides.tsx +40 -0
  11. package/agents/examples/bar-list.tsx +24 -0
  12. package/agents/examples/breadcrumb.tsx +28 -0
  13. package/agents/examples/button-states.tsx +23 -0
  14. package/agents/examples/button.tsx +21 -0
  15. package/agents/examples/calendar.tsx +11 -0
  16. package/agents/examples/callout.tsx +33 -0
  17. package/agents/examples/card.tsx +36 -0
  18. package/agents/examples/change-bar.tsx +104 -0
  19. package/agents/examples/change-grid-money.tsx +36 -0
  20. package/agents/examples/change-grid.tsx +42 -0
  21. package/agents/examples/chart-area-log.tsx +45 -0
  22. package/agents/examples/chart-area.tsx +39 -0
  23. package/agents/examples/chart-bar-flows.tsx +32 -0
  24. package/agents/examples/chart-bar-hourly.tsx +28 -0
  25. package/agents/examples/chart-bar-losses.tsx +29 -0
  26. package/agents/examples/chart-bar-teams.tsx +72 -0
  27. package/agents/examples/chart-bar-years.tsx +40 -0
  28. package/agents/examples/chart-bar.tsx +56 -0
  29. package/agents/examples/chart-category-ticks.tsx +50 -0
  30. package/agents/examples/chart-line-events.tsx +47 -0
  31. package/agents/examples/chart-line-forecast.tsx +36 -0
  32. package/agents/examples/chart-line-log.tsx +39 -0
  33. package/agents/examples/chart-line-quiet.tsx +114 -0
  34. package/agents/examples/chart-line-timeline.tsx +41 -0
  35. package/agents/examples/chart-line.tsx +57 -0
  36. package/agents/examples/chart-panels.tsx +94 -0
  37. package/agents/examples/code-block.tsx +40 -0
  38. package/agents/examples/collapsible.tsx +18 -0
  39. package/agents/examples/command.tsx +29 -0
  40. package/agents/examples/context-menu.tsx +17 -0
  41. package/agents/examples/copy-button.tsx +8 -0
  42. package/agents/examples/data-bar.tsx +108 -0
  43. package/agents/examples/data-table-compact.tsx +96 -0
  44. package/agents/examples/data-table-filters.tsx +103 -0
  45. package/agents/examples/data-table.tsx +99 -0
  46. package/agents/examples/delta.tsx +18 -0
  47. package/agents/examples/dialog.tsx +28 -0
  48. package/agents/examples/distribution-bar-budget.tsx +30 -0
  49. package/agents/examples/distribution-bar-tug.tsx +74 -0
  50. package/agents/examples/drawdown-chart.tsx +35 -0
  51. package/agents/examples/dropdown-menu.tsx +31 -0
  52. package/agents/examples/field.tsx +108 -0
  53. package/agents/examples/formatters.tsx +42 -0
  54. package/agents/examples/heatmap-calendar-signed.tsx +67 -0
  55. package/agents/examples/heatmap-calendar.tsx +62 -0
  56. package/agents/examples/heatmap-status.tsx +61 -0
  57. package/agents/examples/heatmap-weekday.tsx +72 -0
  58. package/agents/examples/histogram-chart.tsx +28 -0
  59. package/agents/examples/input-states.tsx +23 -0
  60. package/agents/examples/input.tsx +17 -0
  61. package/agents/examples/local-time.tsx +14 -0
  62. package/agents/examples/metric-strip.tsx +46 -0
  63. package/agents/examples/overview-dashboard.tsx +180 -0
  64. package/agents/examples/page-hero.tsx +38 -0
  65. package/agents/examples/page-section.tsx +52 -0
  66. package/agents/examples/popover.tsx +23 -0
  67. package/agents/examples/price-chart.tsx +32 -0
  68. package/agents/examples/progress-tone.tsx +29 -0
  69. package/agents/examples/progress.tsx +10 -0
  70. package/agents/examples/range-position-table.tsx +101 -0
  71. package/agents/examples/range-position.tsx +55 -0
  72. package/agents/examples/scatter-chart-quadrants.tsx +63 -0
  73. package/agents/examples/scatter-chart-scales.tsx +46 -0
  74. package/agents/examples/scatter-chart.tsx +78 -0
  75. package/agents/examples/scroll-area.tsx +22 -0
  76. package/agents/examples/section-cards-select.tsx +28 -0
  77. package/agents/examples/section-cards-trend.tsx +32 -0
  78. package/agents/examples/section-cards.tsx +48 -0
  79. package/agents/examples/select.tsx +27 -0
  80. package/agents/examples/separator.tsx +13 -0
  81. package/agents/examples/sheet.tsx +15 -0
  82. package/agents/examples/skeleton.tsx +11 -0
  83. package/agents/examples/slider.tsx +5 -0
  84. package/agents/examples/slope-chart-market.tsx +33 -0
  85. package/agents/examples/slope-chart.tsx +26 -0
  86. package/agents/examples/stale-blocks.tsx +56 -0
  87. package/agents/examples/surfaces.tsx +116 -0
  88. package/agents/examples/table.tsx +60 -0
  89. package/agents/examples/tabs.tsx +16 -0
  90. package/agents/examples/target-rows.tsx +74 -0
  91. package/agents/examples/toggle-group.tsx +12 -0
  92. package/agents/examples/toggle.tsx +11 -0
  93. package/agents/examples/tooltip.tsx +13 -0
  94. package/agents/examples/treemap.tsx +93 -0
  95. package/agents/examples/waterfall-chart-stores.tsx +27 -0
  96. package/agents/examples/waterfall-chart.tsx +37 -0
  97. package/agents/manifest.json +1391 -0
  98. package/agents/report-rules.json +7 -0
  99. package/dist/components/registry/charts/area-chart-card.d.ts +7 -3
  100. package/dist/components/registry/charts/area-chart-card.js +56 -10
  101. package/dist/components/registry/charts/bar-chart-card.d.ts +1 -1
  102. package/dist/components/registry/charts/bar-chart-card.js +20 -22
  103. package/dist/components/registry/charts/line-chart-card.d.ts +3 -3
  104. package/dist/components/registry/charts/line-chart-card.js +44 -9
  105. package/dist/components/registry/dashboard-01/section-cards.d.ts +6 -0
  106. package/dist/components/registry/dashboard-01/section-cards.js +51 -35
  107. package/dist/components/registry/dashboardcn/bar-list.js +17 -10
  108. package/dist/components/registry/dashboardcn/distribution-bar.js +6 -4
  109. package/dist/components/registry/dashboardcn/kpi-row-card.d.ts +29 -0
  110. package/dist/components/registry/dashboardcn/kpi-row-card.js +81 -0
  111. package/dist/components/registry/dashboardcn/sparkline.d.ts +22 -0
  112. package/dist/components/registry/dashboardcn/sparkline.js +117 -0
  113. package/dist/components/registry/heatmap/calendar-heatmap.d.ts +11 -3
  114. package/dist/components/registry/heatmap/calendar-heatmap.js +164 -45
  115. package/dist/components/registry/heatmap/status-heatmap.d.ts +5 -3
  116. package/dist/components/registry/heatmap/status-heatmap.js +115 -54
  117. package/dist/components/registry/heatmap/weekday-heatmap.d.ts +9 -3
  118. package/dist/components/registry/heatmap/weekday-heatmap.js +83 -53
  119. package/dist/components/registry/niko-table/core/data-table-context.d.ts +18 -1
  120. package/dist/components/registry/niko-table/core/data-table-context.js +7 -1
  121. package/dist/components/registry/niko-table/core/data-table-grouped-row.js +3 -1
  122. package/dist/components/registry/niko-table/core/data-table-root.js +39 -4
  123. package/dist/components/registry/niko-table/core/data-table-structure.js +17 -12
  124. package/dist/components/registry/niko-table/core/data-table.d.ts +2 -2
  125. package/dist/components/registry/niko-table/core/data-table.js +5 -1
  126. package/dist/components/registry/niko-table/filters/table-faceted-filter.js +5 -5
  127. package/dist/components/registry/niko-table/filters/table-search-filter.js +1 -1
  128. package/dist/components/registry/niko-table/lib/flex-columns.d.ts +1 -1
  129. package/dist/components/registry/niko-table/lib/flex-columns.js +3 -3
  130. package/dist/components/registry/niko-table/lib/styles.d.ts +1 -1
  131. package/dist/components/registry/niko-table/lib/styles.js +3 -3
  132. package/dist/components/registry/niko-table/types/index.d.ts +9 -0
  133. package/dist/components/registry/niko-table/ui/table.js +2 -2
  134. package/dist/components/registry/sidebar-07/app-sidebar.d.ts +1 -1
  135. package/dist/components/registry/sidebar-07/app-sidebar.js +3 -1
  136. package/dist/components/registry/sidebar-07/nav-main.d.ts +2 -1
  137. package/dist/components/registry/sidebar-07/nav-main.js +16 -3
  138. package/dist/components/siyahi/callout.d.ts +17 -0
  139. package/dist/components/siyahi/callout.js +34 -0
  140. package/dist/components/siyahi/change-bar.d.ts +21 -0
  141. package/dist/components/siyahi/change-bar.js +35 -0
  142. package/dist/components/siyahi/change-grid.d.ts +31 -0
  143. package/dist/components/siyahi/change-grid.js +74 -0
  144. package/dist/components/siyahi/data-bar.d.ts +19 -0
  145. package/dist/components/siyahi/data-bar.js +29 -0
  146. package/dist/components/siyahi/data-table-compact-columns-toggle.d.ts +4 -0
  147. package/dist/components/siyahi/data-table-compact-columns-toggle.js +19 -0
  148. package/dist/components/siyahi/data-table-footnote.d.ts +12 -0
  149. package/dist/components/siyahi/data-table-footnote.js +35 -0
  150. package/dist/components/siyahi/default-sidebar-open.d.ts +8 -0
  151. package/dist/components/siyahi/default-sidebar-open.js +13 -0
  152. package/dist/components/siyahi/delta.d.ts +5 -1
  153. package/dist/components/siyahi/delta.js +14 -9
  154. package/dist/components/siyahi/drawdown-chart.d.ts +34 -0
  155. package/dist/components/siyahi/drawdown-chart.js +102 -0
  156. package/dist/components/siyahi/histogram-chart.d.ts +57 -0
  157. package/dist/components/siyahi/histogram-chart.js +134 -0
  158. package/dist/components/siyahi/page-hero.d.ts +23 -0
  159. package/dist/components/siyahi/page-hero.js +43 -0
  160. package/dist/components/siyahi/page-section.d.ts +4 -1
  161. package/dist/components/siyahi/page-section.js +6 -3
  162. package/dist/components/siyahi/page-toc.d.ts +20 -0
  163. package/dist/components/siyahi/page-toc.js +76 -0
  164. package/dist/components/siyahi/panel-grid.d.ts +24 -0
  165. package/dist/components/siyahi/panel-grid.js +37 -0
  166. package/dist/components/siyahi/quote.d.ts +12 -0
  167. package/dist/components/siyahi/quote.js +23 -0
  168. package/dist/components/siyahi/range-position.d.ts +24 -0
  169. package/dist/components/siyahi/range-position.js +105 -0
  170. package/dist/components/siyahi/scale-toggle.d.ts +32 -0
  171. package/dist/components/siyahi/scale-toggle.js +61 -0
  172. package/dist/components/siyahi/scatter-chart.d.ts +69 -0
  173. package/dist/components/siyahi/scatter-chart.js +395 -0
  174. package/dist/components/siyahi/siyahi-provider.d.ts +15 -2
  175. package/dist/components/siyahi/siyahi-provider.js +17 -4
  176. package/dist/components/siyahi/slope-chart.d.ts +35 -0
  177. package/dist/components/siyahi/slope-chart.js +159 -0
  178. package/dist/components/siyahi/stale-note.d.ts +9 -0
  179. package/dist/components/siyahi/stale-note.js +12 -0
  180. package/dist/components/siyahi/status-alert.d.ts +15 -0
  181. package/dist/components/siyahi/status-alert.js +29 -0
  182. package/dist/components/siyahi/status-badge.d.ts +15 -0
  183. package/dist/components/siyahi/status-badge.js +24 -0
  184. package/dist/components/siyahi/target-rows.d.ts +34 -0
  185. package/dist/components/siyahi/target-rows.js +97 -0
  186. package/dist/components/siyahi/tone-progress.d.ts +1 -1
  187. package/dist/components/siyahi/tone-progress.js +1 -1
  188. package/dist/components/siyahi/treemap.d.ts +8 -5
  189. package/dist/components/siyahi/treemap.js +80 -34
  190. package/dist/components/siyahi/waterfall-chart.d.ts +51 -0
  191. package/dist/components/siyahi/waterfall-chart.js +147 -0
  192. package/dist/components/ui/accordion.js +5 -5
  193. package/dist/components/ui/alert.js +2 -2
  194. package/dist/components/ui/badge.js +1 -1
  195. package/dist/components/ui/breadcrumb.js +2 -2
  196. package/dist/components/ui/button.js +10 -10
  197. package/dist/components/ui/calendar.js +1 -1
  198. package/dist/components/ui/card.js +4 -4
  199. package/dist/components/ui/chart.js +1 -1
  200. package/dist/components/ui/code-block.js +13 -12
  201. package/dist/components/ui/command.js +7 -6
  202. package/dist/components/ui/context-menu.js +7 -7
  203. package/dist/components/ui/dialog.js +5 -5
  204. package/dist/components/ui/dropdown-menu.js +8 -8
  205. package/dist/components/ui/field.d.ts +26 -0
  206. package/dist/components/ui/field.js +109 -0
  207. package/dist/components/ui/input-group.js +11 -11
  208. package/dist/components/ui/input.js +1 -1
  209. package/dist/components/ui/label.d.ts +5 -0
  210. package/dist/components/ui/label.js +13 -0
  211. package/dist/components/ui/popover.js +3 -3
  212. package/dist/components/ui/progress.js +1 -1
  213. package/dist/components/ui/select.js +6 -6
  214. package/dist/components/ui/sheet.js +5 -5
  215. package/dist/components/ui/sidebar.js +17 -18
  216. package/dist/components/ui/skeleton.js +1 -1
  217. package/dist/components/ui/slider.js +2 -2
  218. package/dist/components/ui/table.js +2 -2
  219. package/dist/components/ui/tabs.js +2 -2
  220. package/dist/components/ui/textarea.js +1 -1
  221. package/dist/components/ui/toggle-group.js +2 -2
  222. package/dist/components/ui/toggle.js +4 -4
  223. package/dist/components/ui/tooltip.js +2 -2
  224. package/dist/index.d.ts +35 -8
  225. package/dist/index.js +30 -4
  226. package/dist/lib/chart-frame.d.ts +51 -7
  227. package/dist/lib/chart-frame.js +390 -133
  228. package/dist/lib/chart-marks.d.ts +83 -0
  229. package/dist/lib/chart-marks.js +216 -0
  230. package/dist/lib/chart-series.d.ts +42 -10
  231. package/dist/lib/compact-columns.d.ts +19 -0
  232. package/dist/lib/compact-columns.js +55 -0
  233. package/dist/lib/fit-text.d.ts +6 -0
  234. package/dist/lib/fit-text.js +11 -0
  235. package/dist/lib/format.d.ts +8 -3
  236. package/dist/lib/format.js +55 -17
  237. package/dist/lib/heat.d.ts +7 -0
  238. package/dist/lib/heat.js +14 -0
  239. package/dist/lib/heatmap-navigation.d.ts +8 -0
  240. package/dist/lib/heatmap-navigation.js +49 -0
  241. package/dist/lib/scatter.d.ts +88 -0
  242. package/dist/lib/scatter.js +179 -0
  243. package/dist/lib/ticks.d.ts +27 -0
  244. package/dist/lib/ticks.js +67 -0
  245. package/dist/lib/tone.d.ts +36 -0
  246. package/dist/lib/tone.js +35 -0
  247. package/dist/lib/treemap.d.ts +0 -5
  248. package/dist/lib/treemap.js +1 -11
  249. package/dist/lib/use-element-width.d.ts +5 -0
  250. package/dist/lib/use-element-width.js +15 -0
  251. package/package.json +5 -1
  252. package/registry.lock.json +16 -0
  253. package/report.css +63 -47
  254. package/styles/siyahi.css +708 -55
package/DESIGN.md ADDED
@@ -0,0 +1,170 @@
1
+ # Siyahi design guidelines
2
+
3
+ These rules bind every page built on `@siyahi/ui`: The Book, Dash and any other
4
+ app. Agents must follow them when designing or changing UI; a reviewer treats a
5
+ breach as a defect. The catalogue (https://siyahi.jatinbansal.com) shows each
6
+ component; this file says how to use them.
7
+
8
+ ## Colour
9
+
10
+ Colour is placed, not spread. A page is neutral greys plus colour that carries
11
+ a meaning:
12
+
13
+ - **Ink indigo** is the accent: links, the selected sidebar item, the first
14
+ chart series, a chart's "today" rule and an `accent` `Callout`. Buttons, badges, toggles and focus
15
+ stay monochrome.
16
+ - **Green and red** mean a gain and a loss. A signed figure is `Delta`: the figure in the text colour with its
17
+ `+` or `−`, and only a small trend icon in green or red. In plain text (labels, tooltips) write the sign; never
18
+ colour a run of figures green and red.
19
+ **Amber** means caution. None of them decorates.
20
+ - **Emphasis tints the whole surface.** A notice is `StatusAlert` in its tone (an
21
+ error reads like a warning, only red); a state is `StatusBadge`; a point set
22
+ apart is `Callout` (`neutral`, `accent`, `warning`, `positive`,
23
+ `negative`); a quotation is `Quote`. Each takes a faint wash of its colour
24
+ inside a 1px border of the same colour all round. Large marks follow the same
25
+ rule: every bar is a tint inside a 1px full-colour edge, not a solid slab.
26
+ A bar is read by its edge, which reaches 3:1 against the card; the tint is a
27
+ fill carried by that edge.
28
+ - **Never a stripe down one side.** Do not mark a notice, card, row or quote
29
+ with a left (or any single-side) coloured border; tint the box or add an
30
+ icon. 1px neutral dividers between columns are separators, not accents, and
31
+ are fine.
32
+ - **Edges that matter reach 3:1; the rest are hairlines.** A field's edge (input,
33
+ textarea, select, input group, the command search) is `--input`, at 3:1 on the
34
+ canvas and the card; dividers, card rings, gridlines and the outlines of
35
+ buttons, toggles and code blocks are the `--border` hairline (the text colour
36
+ at 18% in light, white at 20% in dark), firm enough to carry the page's
37
+ structure. Focus is drawn inside the control, so no neighbour or clipping box
38
+ covers it: a 2px ring in the text colour (`--ring`) on its edge with a 2px
39
+ ring of the page colour inside, which reads on a black, white or hovered
40
+ fill alike. A field shows it as its own edge, 2px in the text colour; a chart
41
+ mark as a dashed stroke, apart from a picked mark's solid one. A destructive
42
+ control and an invalid field focus in the destructive red. Menu items show
43
+ focus as their highlight. A selected
44
+ toggle or pill tab fills with the foreground. A chart bar that a selection
45
+ dims keeps its full-colour outline and fades only inside.
46
+ - **Destructive is not loss.** `--destructive` (delete, an invalid field) is a
47
+ deeper red than `--negative` (a loss figure), so its label reads on its own
48
+ tint; never use one for the other.
49
+ - Categories (a team, a region, a product line) stay neutral: outline badges,
50
+ never a hue each. Ordered buckets (largest 5, next 5, rest) use steps of one
51
+ colour, not separate hues.
52
+ - **Colour marks exceptions.** The one stat tile or table row that needs a look
53
+ is marked by the page: `tone: "negative"` or `"warning"` on a `SectionCards`
54
+ item, `data-tone="negative"` or `"warning"` on a `TableRow`. It takes a faint
55
+ wash of the colour over the card (7% in light, 12% in dark), and a tile an
56
+ outline of it. The page decides, never the sign: a falling cost is good news.
57
+ Mark one or two; a page where every row is washed marks nothing.
58
+
59
+ ## Surfaces
60
+
61
+ `SiyahiProvider`'s `surface` sets how a data block sits on the page. The page
62
+ and card colours are fixed: never tint the canvas.
63
+
64
+ - **`ruled`** (the default, with or without a provider): ruled on white. The
65
+ blocks of a `PanelGrid`, the tiles of a `SectionCards` row and the figures
66
+ of a `MetricStrip` are filled with the card colour and parted by hairlines,
67
+ with a rule above and below the group and none on its left and right edges.
68
+ A card standing alone (a `MetricStrip`, a table's card) takes the same rules
69
+ above and below itself. A short last row ends in a blank cell, ruled off
70
+ like the rest. A stat tile keeps its footer's top rule and faint band. Set
71
+ nothing to get it.
72
+ - **`card`**: tight square cards, for a page of separate blocks, such as an
73
+ index of links. Each block is filled with the card colour inside a hairline
74
+ ring, with no shadow, 8px from the next in a `PanelGrid` or a row of
75
+ `SectionCards`. Ask for it with `surface="card"`.
76
+ - **`open`**: no fill, no lines and no padding, so a block sits level with the
77
+ page's text, for pages read top to bottom.
78
+
79
+ Every `PanelGrid` numbers its blocks 01, 02 before their card title, in the
80
+ mono face and the link colour, so the text can point to one.
81
+
82
+ ## Shape
83
+
84
+ - **Square corners everywhere**: panels, cards, buttons, fields, badges,
85
+ toggles, menus, and bars and tracks (data bars, progress) alike (`--radius`
86
+ is 0). Only a dot, an avatar, a slider, a spinner or a scrollbar is round;
87
+ the stock chart tooltip's colour chips keep shadcn's 2px. Never add a
88
+ `rounded-*` class to a box.
89
+ - **Joined toggles.** The items of a `ToggleGroup` sit flush and share their
90
+ borders, one control; the pressed item fills with the foreground.
91
+ - **A code block's copy button sits in a header row** (`CodeBlockHeader`),
92
+ beside its title or alone, never floating over the code, where it would
93
+ cover the end of a line. An untitled snippet takes the extra row.
94
+ - Badges stay boxed (an outline), the primary button and the pressed toggle
95
+ black (white in dark), titles in the sans face, at normal spacing.
96
+
97
+ ## Page header
98
+
99
+ An app page opens on its masthead, `PageHero`: a small mark and eyebrow in the
100
+ mono face and link colour, the title, one muted line saying what the page is,
101
+ the actions at the right, and a hairline under it. One per page; no hero card.
102
+
103
+ ## Labels and totals
104
+
105
+ - **Labels are small monospaced capitals**: a stat tile's label and footer
106
+ lines, a `MetricStrip` label, a table's column heads, a sidebar group's
107
+ label, and a form field's label (muted, above the field). The components and
108
+ the theme set them; never set a label in this style by hand elsewhere, and
109
+ never set a figure or a title in it.
110
+ - **A total row reads as a ledger's**: in `TableFooter`, one rule above it and
111
+ a double rule under it in the text colour, no band.
112
+
113
+ ## Charts
114
+
115
+ - **Names at the line ends.** A line chart and overlapping areas name each
116
+ series at its line's end, in the text colour beside a square of its colour,
117
+ in a gutter after the last point; ends that crowd are spread 14px apart with
118
+ a short leader. A legend goes below instead on a card under 400px wide (a
119
+ phone), where the names would take more than 30% of it or not fit the
120
+ plot's height, and where a line ends short of the plot's right edge (a
121
+ missing last reading, a single point, an x axis running past the data). Bars and stacks
122
+ keep a legend.
123
+ - **Five colours, then grey.** Past five series, the page names the few it is
124
+ about in chart colours and gives the rest `var(--muted-foreground)`: they
125
+ draw first, in grey. Every line is still named: a grey one's name at its end
126
+ is muted with no square, and its place says which line it is. Never a count
127
+ standing in for names. In the legend a grey name is a button that raises its
128
+ line in the text colour, since a shared grey square cannot tell lines apart;
129
+ a stack's grey bands read in the legend's order, bottom to top.
130
+ - **No fill under overlapping areas**: from three series on, fills bury each
131
+ other. A stack fills each band with a flat tint, never a gradient.
132
+ - **Forecast and today.** `forecastFrom` dashes every line from that point,
133
+ hatches the stretch faintly behind lines on card-coloured halos, labels it
134
+ FORECAST and hollows the end dots (a stack keeps solid edges and no hatching:
135
+ its fills cover the stretch);
136
+ `today` is a 1px rule in the link colour, labelled TODAY.
137
+ - Gridlines are solid hairlines. Lines draw in left to right over 1.3s on
138
+ first draw, a stack's fills revealed with them; then the names fade in, and
139
+ each end dot as its line finishes; bars fade in rather than grow. Reduced
140
+ motion shows them at once.
141
+ - **Stale data is marked by the page**: `stale` on a chart card or a
142
+ `SectionCards` tile, with since when ("3 Nov"). The block greys and its
143
+ chart or sparkline draws at about 65% strength, a tile's figure and badge
144
+ turn muted, and a small "Stale · 3 Nov" note says so. A stale block is meant
145
+ to be harder to read, so its marks are exempt from the 3:1 mark bar; the
146
+ note and the figure keep their text contrast. Never infer it from dates.
147
+
148
+ ## Tables
149
+
150
+ Tables are dense, as a ledger is: compact rows, a 1px rule in the text colour
151
+ under the column heads, the first column (what the row is) in medium weight,
152
+ and figures in the mono face. A figure is a cell marked `data-numeric`, which
153
+ also right-aligns it (the data table marks its number columns; a plain
154
+ `TableCell` or `TableHead` takes the attribute), and any `Delta` in a cell.
155
+ Alignment alone is not a figure. Row hairlines stay; never stripes, never
156
+ column rules.
157
+
158
+ ## Forms
159
+
160
+ - Every field is a `Field` with a `FieldLabel` above the control, a
161
+ `FieldDescription` hint or a `FieldError` under it. Never write a bare
162
+ `<label>` with its own styles.
163
+ - An invalid field (`aria-invalid` on the control, `data-invalid` on its
164
+ `Field`) keeps its red edge and takes a faint red wash.
165
+
166
+ ## Sidebar
167
+
168
+ The sidebar is parted from the page by a hairline on its page-side edge, its
169
+ group labels are small monospaced capitals and its rows are compact. Its fill,
170
+ icons and the current page's mark stay as shadcn draws them.
package/README.md CHANGED
@@ -2,20 +2,31 @@
2
2
 
3
3
  # Siyahi
4
4
 
5
- Siyahi (Hindi for ink) is a small design system for data-heavy React apps:
6
- stock [shadcn/ui](https://ui.shadcn.com) on [Base UI](https://base-ui.com) and
7
- Tailwind CSS v4, shipped as one npm package, `@siyahi/ui`. It adds a theme with
8
- four meaning colours and a five-hue chart palette that pass WCAG contrast in
9
- light and dark, a few finance components, locale-aware formatters, a lint that
10
- keeps pages on the theme, and a catalogue site that is the documentation.
5
+ A design system for data-heavy React apps: [shadcn/ui](https://ui.shadcn.com)
6
+ on [Base UI](https://base-ui.com) and Tailwind CSS v4, with a shared theme,
7
+ charts, tables and locale-aware formatters. Components ship in `@siyahi/ui`;
8
+ checks and build helpers ship in `@siyahi/tools`.
11
9
 
12
- **Catalogue:** https://siyahi.jatinbansal.com
10
+ **[Browse the catalogue](https://siyahi.jatinbansal.com)** for components and live examples.
11
+
12
+ ## For agents
13
+
14
+ Install the public [Siyahi skill](https://github.com/jatinbansal1998/siyahi/blob/main/skills/siyahi/SKILL.md):
15
+
16
+ ```sh
17
+ npx skills add jatinbansal1998/siyahi --skill siyahi --agent claude-code --agent codex
18
+ ```
19
+
20
+ Read the installed package's `agents/manifest.json` to select components and
21
+ recipes, then only the matching `agents/examples/*.tsx`. Exact prop types are in
22
+ `dist/index.d.ts`. The skill guides reuse and verification; page structure and
23
+ interactions remain yours. No other skill or local Siyahi checkout is required.
13
24
 
14
25
  ## Install
15
26
 
16
- Siyahi is pre-1.0; releases go out under the `next` tag. It needs React 19 and
17
- Tailwind CSS v4, compiled by the Tailwind Vite plugin: the package's stylesheet
18
- is Tailwind source, so a plain CSS import leaves every component unstyled.
27
+ Releases use the `next` tag until 1.0. Siyahi needs React 19 and Tailwind CSS v4.
28
+ Compile its stylesheet with the Tailwind Vite plugin; a plain CSS import leaves
29
+ components unstyled.
19
30
 
20
31
  ```sh
21
32
  npm install @siyahi/ui@next tailwindcss @tailwindcss/vite
@@ -23,7 +34,7 @@ npm install --save-dev @siyahi/tools@next
23
34
  ```
24
35
 
25
36
  ```ts
26
- // vite.config.ts
37
+ // vite.config.ts: add to your existing plugins
27
38
  import tailwindcss from "@tailwindcss/vite";
28
39
  import { preloadFonts } from "@siyahi/tools/vite";
29
40
  export default defineConfig({ plugins: [react(), tailwindcss(), preloadFonts()] });
@@ -45,198 +56,104 @@ createRoot(root).render(
45
56
  );
46
57
  ```
47
58
 
48
- `preloadFonts()` adds `<link rel="preload">` tags for Geist and Geist Mono to
49
- the built `index.html`, so the fonts download with the scripts instead of after
50
- the first paint. Until they arrive the theme draws Arial (or its Linux twins,
51
- Liberation Sans and Arimo) scaled to Geist's metrics, so nothing moves when
52
- Geist swaps in. An app that renders its own HTML adds the tags itself, with
53
- the hashed URLs of `geist-latin-wght-normal.woff2`,
54
- `geist-latin-ext-wght-normal.woff2` and `geist-mono-latin-wght-normal.woff2`.
55
-
56
- Everything comes from `@siyahi/ui`: the shadcn components, the registry
57
- add-ons (chart cards, data table, heatmaps, stat tiles, sidebar) and Siyahi's
58
- own components. Add `lucide-react` only if your
59
- own code imports icons. A Next.js app compiles the same stylesheet through
60
- `@tailwindcss/postcss` instead of the Vite plugin.
61
-
62
- ### Also on GitHub releases
63
-
64
- Every merge to `main` also attaches both tarballs to a GitHub release
65
- (`v<version>`, plus a rolling `next`). They are a fallback if npm is unreachable:
66
- `npm install --allow-remote=root https://github.com/jatinbansal1998/siyahi/releases/download/v<version>/siyahi-ui-<version>.tgz`.
67
-
68
- ## What is in it
69
-
70
- - **shadcn/ui components** in the `base-luma` style, installed with the shadcn
71
- CLI and never edited.
72
- - **Registry add-ons**, copied once with their origin and licence recorded:
73
- bar, area and line chart cards from shadcn's chart blocks, a data table on
74
- TanStack Table, calendar, weekday and status heatmaps, a ranked
75
- bar list, the `SectionCards` stat tile and the `sidebar-07` app shell.
76
- - **Siyahi components**: `Delta` (a signed figure with ▲ ▼), `PriceChart`
77
- (TradingView Lightweight Charts in theme colours), `Treemap` (holdings heat
78
- map; hover or tap a tile for its figures) with `TreemapLegend` (its colour
79
- scale), `LocalTime` (a time in the configured zone with the viewer's own clock
80
- in a tooltip), `ToneProgress` (Progress in a meaning colour), the page parts
81
- `PageSection`, `PageSubheading`, `DataList` and `InlineCode`, the data table
82
- parts `DataTableSortHeader` (sorts on one click) and `DataTableRowCount`
83
- ("12 of 48"), and `SiyahiProvider`.
84
- - **Cards and badges as installed**: every `Card`, stat tiles included, keeps
85
- luma's `rounded-4xl`, `shadow-md` and faint ring. A category (a sector, a
86
- broker, a unit's kind) is an outline `Badge`: categories stay neutral, and
87
- colour is left to the four meaning colours and the charts. On a narrow card
88
- (header under 24rem, so any phone) a header action such as a toggle drops
89
- under the title and description, left-aligned; a stat tile's badge stays
90
- top right.
91
- - **Formatters**: `count`, `money`, `moneyCompact`, `pct` and `time`, or `useFormat()`
92
- for the same bound to the provider's locale.
93
- `useFormat().time(value, { withDate: true })` (or
94
- `time(value, locale, { withDate: true })`) and `<LocalTime withDate>` write
95
- the date first: `20 Oct 2026, 14:30 IST`.
96
- - **`report.css`** for static HTML reports that do not use React: the theme as
97
- plain CSS variables plus base body styles, with no network requests.
98
-
99
- ## Which component
100
-
101
- | Need | Component |
102
- | ----------------------------------------------------------------------- | ------------------------------------------------------------------- |
103
- | Values over time or another ordered axis (months, hours, price buckets) | `BarChartCard`, `AreaChartCard` or `LineChartCard` |
104
- | Counts or amounts per period, one series or several | `BarChartCard`; `stacked` when the series add up to a total |
105
- | A running level, such as a portfolio's value against money put in | `AreaChartCard` |
106
- | Series compared point by point, such as a return against an index | `LineChartCard` |
107
- | Samples in time with limits and events marked | `LineChartCard` with `xDomain`, `xTicks` and `referenceLines` |
108
- | Long category names, such as sectors | `BarChartCard` with `horizontal` |
109
- | A gain above zero and a loss below it | a series with `color` and `negativeColor` |
110
- | Ranked counts or amounts by category (a name, a bar and a figure) | `BarList`; give two lists one `max` to share a scale |
111
- | Where a budget sits, a split of a whole, or losses against gains | `DistributionBar` |
112
- | Headline figures with their change | `SectionCards`, with a `Delta` in each badge |
113
- | One instrument's price history | `PriceChart` |
114
- | Holdings sized by weight and coloured by change | `Treemap` |
115
- | Activity by day, by weekday and hour, or a status over time | `CalendarHeatmap`, `WeekdayHeatmap`, `StatusHeatmap` |
116
- | Rows to sort and filter | `DataTable`, inside a `Card` |
117
- | A column that sorts on one click; a search and an "n of m" count | `DataTableSortHeader`; `DataTableSearchFilter`, `DataTableRowCount` |
118
- | Stat tiles that pick a scope for the page | `SectionCards` with `selected` and `onSelect` |
119
- | A share or a part of a whole, coloured as a gain or a loss | `ToneProgress` |
120
- | The colour scale under a `Treemap` | `TreemapLegend`, with the map's `range` |
121
- | One part of a long page: rule, eyebrow, heading, lead, action | `PageSection`, with `PageSubheading` inside |
122
- | Label and value pairs, such as a record's fields | `DataList` and `DataListItem` |
123
- | A command or file to copy, wrapped or scrolling | `CodeBlock` with `CodeBlockCopyButton` |
124
- | A labelled copy action, such as "Copy all" for a section | `CopyButton` |
125
- | A command, file or identifier inside prose | `InlineCode` |
126
- | A signed figure (a gain, a loss, a change) | `Delta` |
127
- | A time, with the viewer's own clock on hover | `LocalTime` |
128
-
129
- The three chart cards take the rows, the field the x axis reads and the series,
130
- and own everything else: the card and its header action (a range or mode
131
- toggle), the axes, the dashed horizontal grid, Geist Mono ticks, a tooltip that
132
- names the hovered point and gives each series' formatted value, and the legend
133
- below. Props cover the rest: a footer, a placeholder while data loads,
134
- reference lines, a numeric x axis, a fixed value axis, axis titles, a second
135
- line under each tick, a picked category, sideways bars and straight segments.
136
- A page never puts Recharts axes, grids or tooltips together itself.
59
+ `preloadFonts()` loads Geist and Geist Mono with the scripts. Add `lucide-react`
60
+ only when your own code imports icons. Next.js compiles the stylesheet through
61
+ `@tailwindcss/postcss` instead of the Vite plugin. Static HTML reports inline the
62
+ package's `report.css` and follow `agents/report-rules.json`.
137
63
 
138
- ```tsx
139
- <BarChartCard
140
- title="Orders by hour"
141
- data={[
142
- { hour: 9, orders: 42 },
143
- { hour: 10, orders: 31 },
144
- ]}
145
- xKey="hour"
146
- xFormatter={(hour) => `${String(hour).padStart(2, "0")}:00`}
147
- series={[{ key: "orders", label: "Orders", color: "var(--chart-1)" }]}
148
- height={256}
149
- />
150
- ```
64
+ If npm is unreachable, both package tarballs are attached to
65
+ [GitHub releases](https://github.com/jatinbansal1998/siyahi/releases).
151
66
 
152
67
  ## Locale
153
68
 
154
- Numbers, money and times default to Indian English, rupees and IST:
155
- `₹1,53,110`, `₹2.4L`, `₹40Cr`, `14:30 IST`. In an Indian-region locale,
156
- `moneyCompact` prints amounts under one lakh in full (`₹99,999`), never as `K`.
157
- Pass another locale to the provider and every formatter and component under it
158
- follows:
69
+ `useFormat()` provides `count`, `money`, `moneyCompact`, `pct` and `time`,
70
+ bound to the provider's locale. Defaults are Indian English, rupees and India
71
+ Standard Time: `₹1,53,110`, `₹2.4L`, `14:30 IST`. Use `Delta` for signed changes.
72
+ Override the locale for a whole app or a nested section:
159
73
 
160
74
  ```tsx
161
75
  <SiyahiProvider locale={{ numberLocale: "en-US", currency: "USD", timeZone: "America/New_York" }}>
162
76
  ```
163
77
 
164
- The formatters print a minus sign and nothing else. A signed figure (a gain, a
165
- loss, a change) goes through `<Delta>`, which adds ▲ or ▼ and the meaning
166
- colour. Time zone names come from the runtime's ICU data; a slim Node or
167
- browser build may print `GMT+5:30` where a full one prints `IST`.
78
+ ## Responsive behavior
79
+
80
+ Data tables suspend horizontal freezing below 40rem of their own available
81
+ space, including narrow panels on a laptop. Pinning preferences, search, sort,
82
+ selection and expansion stay intact. All columns remain reachable by scrolling;
83
+ the scrolling region also accepts keyboard focus. For page-specific compact
84
+ records, choose essential columns and keep every other field in accessible
85
+ details or an explicit full-table view.
86
+
87
+ The shipped `data-table-filters` recipe moves secondary filters into a `Sheet`
88
+ using `useDataTable().isCompact`. Configure filtering explicitly when its
89
+ controls render conditionally. Keep search and the active-filter count visible.
90
+ Use container queries for layout and pointer capability for touch targets;
91
+ a touch laptop needs the same reachable controls as a phone.
92
+
93
+ Ranked lists wrap long labels in narrow panels. Horizontal charts reserve space
94
+ for bars and wrap their category labels; exact axis ticks keep their normal
95
+ text size and scroll when necessary. Heatmap examples expose values on selection
96
+ and support one keyboard entry with arrow navigation. `WeekdayHeatmap` accepts
97
+ `hours` and `weekdays` to show a relevant domain without changing data labels.
98
+
99
+ ## Surfaces
100
+
101
+ `SiyahiProvider` sets how data blocks sit on the page:
102
+
103
+ - `surface="ruled"` (default, even outside a provider): ruled on white.
104
+ `PanelGrid`, `SectionCards` and `MetricStrip` fill their blocks with the card
105
+ colour and part them with hairlines, with a rule above and below each group
106
+ and none on the sides; a card standing alone takes the rules above and below
107
+ itself.
108
+ - `surface="card"`: tight square cards, each filled inside a hairline, 8px
109
+ apart, no shadow, for a page of separate blocks.
110
+ - `surface="open"`: no fill, boxes or rules; card padding is removed.
111
+
112
+ `DESIGN.md` has the rest of the look: square corners, mono capital labels,
113
+ ledger totals, the masthead and exception tones.
114
+
115
+ Nest a provider to change one section. A dialog, sheet or popover renders
116
+ outside the page's provider element: `PanelGrid` and `SectionCards` carry
117
+ their surface into it, but a lone `Card` there is ruled unless the popup's
118
+ content sits in its own provider with an explicit surface, such as
119
+ `<SiyahiProvider surface="card">`; a provider without one draws no element. Stack `PageSection` blocks with
120
+ `flex flex-col gap-6`; use `PanelGrid` for blocks side by side. Categories use
121
+ neutral outline badges, leaving colour for meaning and chart series.
168
122
 
169
123
  ## Dark mode
170
124
 
171
- The colour scheme follows the device (`prefers-color-scheme`). There is no
172
- toggle and no class to set. The theme's dark values sit under the same `dark`
173
- variant as the `dark:` utilities, so an app that wants its own toggle swaps one
174
- line after the import and sets the `dark` class on `<html>`:
125
+ The theme follows the device through `prefers-color-scheme`. For an app-owned
126
+ toggle, override the variant after the stylesheet import and set the `dark`
127
+ class on `<html>`:
175
128
 
176
129
  ```css
177
130
  @import "@siyahi/ui/styles.css";
178
131
  @custom-variant dark (&:where(.dark, .dark *));
179
132
  ```
180
133
 
181
- Both the tokens and the utilities then follow the class. Set `color-scheme` on
182
- `<html>` yourself as well, so scrollbars and form controls match.
183
-
184
- ## Lint
185
-
186
- `@siyahi/tools` ships an [oxlint](https://oxc.rs) plugin. Its rules run only in
187
- files that import `@siyahi/ui`, so older pages are left alone. They reject
188
- colour literals (hex, `rgb()`, `oklch()`), Tailwind palette colours, Tailwind
189
- arbitrary values such as `text-[13px]`, `dark:` and `light:` variants,
190
- numeric font sizes, and chart configs with a per-scheme `theme` map (shadcn's
191
- chart applies its dark half under a `.dark` class Siyahi never sets; name a
192
- chart token with `color: "var(--chart-1)"` instead). Two of the rules are
193
- [`@shadcn/lint`](https://github.com/shadcn-ui/lint)'s, scoped the same way.
194
-
195
- ```sh
196
- npm install --save-dev @siyahi/tools@next oxlint
197
- ```
198
-
199
- ```json
200
- {
201
- "jsPlugins": ["@siyahi/tools/lint"],
202
- "settings": { "shadcn": { "ui": "@siyahi/ui", "themeImports": ["^@siyahi/ui/"] } },
203
- "rules": {
204
- "siyahi/no-color-literal": "error",
205
- "siyahi/no-scheme-variant": "error",
206
- "siyahi/no-numeric-font-size": "error",
207
- "siyahi/no-chart-theme-map": "error",
208
- "siyahi/no-raw-colors": "error",
209
- "siyahi/no-arbitrary-values": "error"
210
- }
211
- }
212
- ```
213
-
214
- `@siyahi/tools` also has `siyahi-shots` (screenshots of a page at 1920 and 390
215
- pixels wide in both schemes, with layout checks), `siyahi-cls` (how far a page
216
- moves after its first paint on a slow network) and `siyahi-contrast` (the
217
- theme contrast check). See [packages/tools](packages/tools/README.md).
134
+ Set `color-scheme` on `<html>` as well so native controls match.
218
135
 
219
- ## This repository
136
+ ## Tools
220
137
 
221
- | Path | What |
222
- | ----------------- | ---------------------------------------------------------------------------------- |
223
- | `packages/ui` | `@siyahi/ui`. The theme is `styles/siyahi.css`, the only file with colour values. |
224
- | `packages/tools` | `@siyahi/tools`: lint plugin, font preload, contrast, screenshot and shift checks. |
225
- | `apps/catalogue` | The catalogue site, a Vite app deployed as a Cloudflare Worker. |
226
- | `assets/icon.svg` | The mark. |
138
+ `@siyahi/tools` provides theme lint rules, font preload, layout screenshots
139
+ (`siyahi-shots`), loading-shift checks (`siyahi-cls`) and contrast checks
140
+ (`siyahi-contrast`). See the
141
+ [tools guide](https://github.com/jatinbansal1998/siyahi/blob/main/packages/tools/README.md)
142
+ for configuration and commands.
227
143
 
228
- Development uses pnpm and [Vite+](https://viteplus.dev):
144
+ ## Development
229
145
 
230
146
  ```sh
231
147
  pnpm install
232
- pnpm --filter @siyahi/tools exec playwright install chromium # once; the screenshot tests use it
233
- pnpm check # format, lint, unused code, generated files, build, typecheck, tests
234
- pnpm dev # the catalogue on localhost
148
+ pnpm --filter @siyahi/tools exec playwright install chromium
149
+ pnpm check
150
+ pnpm dev
235
151
  ```
236
152
 
237
- See [CONTRIBUTING.md](CONTRIBUTING.md) before adding anything.
153
+ Read [CONTRIBUTING.md](https://github.com/jatinbansal1998/siyahi/blob/main/CONTRIBUTING.md)
154
+ before adding components. Source lives in `packages/ui`, `packages/tools` and
155
+ `apps/catalogue`; the catalogue is the visual documentation.
238
156
 
239
157
  ## Licence
240
158
 
241
- MIT, see [LICENSE](LICENSE). Code copied from other projects keeps its own
242
- notice; see [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).
159
+ MIT. See [LICENSE](LICENSE) and [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).
@@ -8,17 +8,17 @@ file as copied; `packages/ui/registry.lock.json` lists them all and
8
8
 
9
9
  ## Copied into `@siyahi/ui`
10
10
 
11
- | What | Where in the package | Origin | Licence |
12
- | ------------------------------------------------------------------------------------- | -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
13
- | shadcn/ui core components (installed with `shadcn add`, never edited) | `src/components/ui/*`, `src/hooks/use-mobile.ts` | https://github.com/shadcn-ui/ui | MIT, Copyright (c) 2023 shadcn |
14
- | shadcn `tailwind.css` (variants and utilities the components use) | `styles/shadcn.css` | https://github.com/shadcn-ui/ui/tree/main/packages/shadcn | MIT, Copyright (c) 2023 shadcn |
15
- | shadcn block `sidebar-07` | `src/components/registry/sidebar-07/*` | https://ui.shadcn.com/r/styles/base-vega/sidebar-07.json | MIT, Copyright (c) 2023 shadcn |
16
- | shadcn block `dashboard-01`, `SectionCards` only | `src/components/registry/dashboard-01/section-cards.tsx` | https://ui.shadcn.com/r/styles/base-vega/dashboard-01.json | MIT, Copyright (c) 2023 shadcn |
17
- | Heatmaps: calendar, weekday by hour, status timeline | `src/components/registry/heatmap/*` | https://shadcn-heatmap.pages.dev/r/calendar-heatmap.json, https://shadcn-heatmap.pages.dev/r/weekday-heatmap.json, https://shadcn-heatmap.pages.dev/r/status-heatmap.json (source: https://github.com/rutopio/shadcn-heatmap) | MIT, Copyright (c) 2026 ChingRu |
18
- | niko-table data table on TanStack Table | `src/components/registry/niko-table/*` | https://niko-table.com/r/data-table.json, https://niko-table.com/r/data-table-core.json, https://niko-table.com/r/data-table-ui.json, https://niko-table.com/r/data-table-faceted-filter.json, https://niko-table.com/r/data-table-column-sort.json, https://niko-table.com/r/data-table-search-filter.json (source: https://github.com/Semkoo/niko-table-registry) | MIT, Copyright (c) 2025 Semir N.; original work Copyright (c) 2025 WebDevSimplified |
19
- | shadcn chart blocks `chart-bar-multiple`, `chart-area-stacked`, `chart-line-multiple` | `src/components/registry/charts/*` | https://ui.shadcn.com/r/styles/new-york-v4/chart-bar-multiple.json, https://ui.shadcn.com/r/styles/new-york-v4/chart-area-stacked.json, https://ui.shadcn.com/r/styles/new-york-v4/chart-line-multiple.json | MIT, Copyright (c) 2023 shadcn |
20
- | dashboardcn ranked list (`BarList`) and stacked bar (`DistributionBar`) | `src/components/registry/dashboardcn/*` | https://dashboardcn.com/r/bar-list.json, https://dashboardcn.com/r/distribution-bar.json (source: https://github.com/NoahGdev/dashboardcn) | MIT, Copyright (c) 2026 dashboardcn contributors |
21
- | MiniDev copy button (`CopyButton`) | `src/components/registry/minidev/copy-button.tsx` | https://ui.minidev.pro/r/copy-button.json (source: https://github.com/amankaushik481/minidev-ui) | MIT, Copyright (c) 2026 MiniDev |
11
+ | What | Where in the package | Origin | Licence |
12
+ | --------------------------------------------------------------------------------------------------- | -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
13
+ | shadcn/ui core components (installed with `shadcn add`, never edited) | `src/components/ui/*`, `src/hooks/use-mobile.ts` | https://github.com/shadcn-ui/ui | MIT, Copyright (c) 2023 shadcn |
14
+ | shadcn `tailwind.css` (variants and utilities the components use) | `styles/shadcn.css` | https://github.com/shadcn-ui/ui/tree/main/packages/shadcn | MIT, Copyright (c) 2023 shadcn |
15
+ | shadcn block `sidebar-07` | `src/components/registry/sidebar-07/*` | https://ui.shadcn.com/r/styles/base-vega/sidebar-07.json | MIT, Copyright (c) 2023 shadcn |
16
+ | shadcn block `dashboard-01`, `SectionCards` only | `src/components/registry/dashboard-01/section-cards.tsx` | https://ui.shadcn.com/r/styles/base-vega/dashboard-01.json | MIT, Copyright (c) 2023 shadcn |
17
+ | Heatmaps: calendar, weekday by hour, status timeline | `src/components/registry/heatmap/*` | https://shadcn-heatmap.pages.dev/r/calendar-heatmap.json, https://shadcn-heatmap.pages.dev/r/weekday-heatmap.json, https://shadcn-heatmap.pages.dev/r/status-heatmap.json (source: https://github.com/rutopio/shadcn-heatmap) | MIT, Copyright (c) 2026 ChingRu |
18
+ | niko-table data table on TanStack Table | `src/components/registry/niko-table/*` | https://niko-table.com/r/data-table.json, https://niko-table.com/r/data-table-core.json, https://niko-table.com/r/data-table-ui.json, https://niko-table.com/r/data-table-faceted-filter.json, https://niko-table.com/r/data-table-column-sort.json, https://niko-table.com/r/data-table-search-filter.json (source: https://github.com/Semkoo/niko-table-registry) | MIT, Copyright (c) 2025 Semir N.; original work Copyright (c) 2025 WebDevSimplified |
19
+ | shadcn chart blocks `chart-bar-multiple`, `chart-area-stacked`, `chart-line-multiple` | `src/components/registry/charts/*` | https://ui.shadcn.com/r/styles/new-york-v4/chart-bar-multiple.json, https://ui.shadcn.com/r/styles/new-york-v4/chart-area-stacked.json, https://ui.shadcn.com/r/styles/new-york-v4/chart-line-multiple.json | MIT, Copyright (c) 2023 shadcn |
20
+ | dashboardcn ranked list (`BarList`), stacked bar (`DistributionBar`), `Sparkline` and `MetricStrip` | `src/components/registry/dashboardcn/*` | https://dashboardcn.com/r/bar-list.json, https://dashboardcn.com/r/distribution-bar.json, https://dashboardcn.com/r/sparkline.json, https://dashboardcn.com/r/kpi-row-card.json (source: https://github.com/NoahGdev/dashboardcn) | MIT, Copyright (c) 2026 dashboardcn contributors |
21
+ | MiniDev copy button (`CopyButton`) | `src/components/registry/minidev/copy-button.tsx` | https://ui.minidev.pro/r/copy-button.json (source: https://github.com/amankaushik481/minidev-ui) | MIT, Copyright (c) 2026 MiniDev |
22
22
 
23
23
  ## Runtime dependencies with attribution terms
24
24
 
@@ -0,0 +1,39 @@
1
+ import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "@siyahi/ui";
2
+
3
+ const questions = [
4
+ ["refresh", "When are the figures refreshed?", "Every night at midnight IST, and every minute for today's orders."],
5
+ [
6
+ "refunds",
7
+ "How are refunds counted?",
8
+ "A refund comes off the month the order was placed in, not the month it was paid.",
9
+ ],
10
+ ["stores", "Can I add a second store?", "Yes. Each store is its own workspace, and the totals add them up."],
11
+ ] as const;
12
+
13
+ function Questions() {
14
+ return questions.map(([value, question, answer]) => (
15
+ <AccordionItem key={value} value={value}>
16
+ <AccordionTrigger>{question}</AccordionTrigger>
17
+ <AccordionContent>{answer}</AccordionContent>
18
+ </AccordionItem>
19
+ ));
20
+ }
21
+
22
+ export default function AccordionExample() {
23
+ return (
24
+ <div className="grid gap-6 md:grid-cols-2">
25
+ <div className="flex flex-col gap-2">
26
+ <p className="text-sm text-muted-foreground">One open at a time</p>
27
+ <Accordion aria-label="One open at a time" defaultValue={["refresh"]}>
28
+ <Questions />
29
+ </Accordion>
30
+ </div>
31
+ <div className="flex flex-col gap-2">
32
+ <p className="text-sm text-muted-foreground">Several open</p>
33
+ <Accordion aria-label="Several open" multiple defaultValue={["refresh", "refunds"]}>
34
+ <Questions />
35
+ </Accordion>
36
+ </div>
37
+ </div>
38
+ );
39
+ }
@@ -0,0 +1,24 @@
1
+ import { AlertDescription, AlertTitle, StatusAlert } from "@siyahi/ui";
2
+
3
+ export default function AlertExample() {
4
+ return (
5
+ <div className="flex flex-col gap-3">
6
+ <StatusAlert>
7
+ <AlertTitle>Figures are delayed</AlertTitle>
8
+ <AlertDescription>Sales figures refresh every fifteen minutes during opening hours.</AlertDescription>
9
+ </StatusAlert>
10
+ <StatusAlert tone="warning">
11
+ <AlertTitle>Two payments are unmatched</AlertTitle>
12
+ <AlertDescription>The bank statement lists payments no order accounts for yet.</AlertDescription>
13
+ </StatusAlert>
14
+ <StatusAlert tone="negative">
15
+ <AlertTitle>Import failed</AlertTitle>
16
+ <AlertDescription>The CSV could not be read. Export it again and retry.</AlertDescription>
17
+ </StatusAlert>
18
+ <StatusAlert tone="positive">
19
+ <AlertTitle>Refunds are settled</AlertTitle>
20
+ <AlertDescription>All 14 refunds from last week have reached the customers' accounts.</AlertDescription>
21
+ </StatusAlert>
22
+ </div>
23
+ );
24
+ }