@ziyarago/ui 0.16.0 → 0.18.0

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/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ ## [0.18.0](https://github.com/ziyarago/ui/compare/v0.17.0...v0.18.0) (2026-10-21)
2
+
3
+ ### Features
4
+
5
+ * TopNav sub-menus with icons and overflow into a More menu, no edge fade ([ed1addd](https://github.com/ziyarago/ui/commit/ed1addd0d9a9844b4e6e23bbe86b18a5a01a74be))
6
+
7
+ ## [0.17.0](https://github.com/ziyarago/ui/compare/v0.16.0...v0.17.0) (2026-10-21)
8
+
9
+ ### Features
10
+
11
+ * chart components metadata, charts docs page and styles (Pro: LineChart, AreaChart, BarChart, DonutChart) ([be37587](https://github.com/ziyarago/ui/commit/be37587030f01821117364d1ec3f8d7565964f53))
12
+
1
13
  ## [0.16.0](https://github.com/ziyarago/ui/compare/v0.15.3...v0.16.0) (2026-10-21)
2
14
 
3
15
  ### Features
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  <p align="center"><a href="https://ziyara.vip"><img src="https://raw.githubusercontent.com/ziyarago/ui/main/docs/images/hero-dark.png" alt="ziyarago/ui: glass design system for Vue, Nuxt and React" width="100%"></a></p>
6
6
 
7
- Glass design system for Vue 3, Nuxt and React: 102 free components and 6 page templates (the Pro package adds 106 components and 33 templates), OKLCH tokens, dark and light, RTL and Arabic, 16 interface languages. One framework-neutral core with thin adapters. Built for Umrah and Hajj products, usable anywhere.
7
+ Glass design system for Vue 3, Nuxt and React: 102 free components and 6 page templates (the Pro package adds 110 components and 33 templates), OKLCH tokens, dark and light, RTL and Arabic, 16 interface languages. One framework-neutral core with thin adapters. Built for Umrah and Hajj products, usable anywhere.
8
8
 
9
9
  <table>
10
10
  <tr>
@@ -12,7 +12,7 @@ Glass design system for Vue 3, Nuxt and React: 102 free components and 6 page te
12
12
  <td width="50%"><img src="https://raw.githubusercontent.com/ziyarago/ui/main/docs/images/hero-rtl.png" alt="Arabic RTL"><br><sub>Arabic, RTL mirrored</sub></td>
13
13
  </tr>
14
14
  <tr>
15
- <td><img src="https://raw.githubusercontent.com/ziyarago/ui/main/docs/images/components.png" alt="Component catalog"><br><sub>208 components documented with props and live examples (102 free, 106 Pro)</sub></td>
15
+ <td><img src="https://raw.githubusercontent.com/ziyarago/ui/main/docs/images/components.png" alt="Component catalog"><br><sub>212 components documented with props and live examples (102 free, 110 Pro)</sub></td>
16
16
  <td><img src="https://raw.githubusercontent.com/ziyarago/ui/main/docs/images/templates.png" alt="Page templates"><br><sub>page templates: 6 free, 33 Pro</sub></td>
17
17
  </tr>
18
18
  <tr>
@@ -2,7 +2,7 @@
2
2
 
3
3
  > ZiyaraGo UI — glass design system for Umrah and Hajj products. OKLCH tokens, two palettes, dark and light, RTL, Thmanyah. One framework-neutral core with Vue 3, Nuxt and React adapters, 102 free components and 6 page templates (more in @ziyarago/ui-pro).
4
4
 
5
- Version 0.16.0. Docs: https://ziyara.vip . Manifest (machine readable): https://ziyara.vip/manifest.json
5
+ Version 0.18.0. Docs: https://ziyara.vip . Manifest (machine readable): https://ziyara.vip/manifest.json
6
6
 
7
7
  ## Setup
8
8
  - import { UiButton } from '@ziyarago/ui/vue'
@@ -1186,6 +1186,116 @@ Slots:
1186
1186
  Events:
1187
1187
  - menu: Called with the clicked menu item label (the string from menu); the menu closes afterwards.
1188
1188
 
1189
+ ## UiLineChart (data, Pro)
1190
+ Line chart for time series with several series, a localized time axis with automatic label step, "nice" value ticks, gaps for null values, tooltip and keyboard navigation.
1191
+ Props:
1192
+ - `series` (required): { key: string; label: string; values: { x: string | number | Date; y: number | null }[]; tone?: 'brand' | 'success' | 'warning' | 'danger' | 'info' | 'neutral'; dashed?: boolean }[]. Series to draw. x is a Date, an ISO date string (day, week, month are detected from the spacing), a number or a category string; the series share one x list, a missing x or a null y is a gap. tone is brand, success, warning, danger, info or neutral; without it the series palette (--zg-chart-1 to 6) is used. dashed draws the line dashed, for example the previous week.
1193
+ - `unit`: 'count' | 'currency' | 'percent' = "count". Number format of the value axis, tooltip and legend. count: grouped digits, compact on the axis (1.2k, 1.2M, localized by Intl); currency: needs currency; percent: values are percent points (12 means 12%).
1194
+ - `currency`: string. ISO 4217 code for unit="currency", for example UZS, SAR or USD. The axis stays compact without the symbol; tooltip and legend show the full amount.
1195
+ - `yFormat`: (n: number) => string. Custom formatter for every number (axis, tooltip). Overrides unit and currency.
1196
+ - `locale`: string. BCP 47 tag for numbers and dates, for example "ar" or "uz-UZ". Defaults to the kit locale (en ru uz ar tr and the rest). An RTL language also mirrors the chart.
1197
+ - `dir`: 'ltr' | 'rtl'. Text direction. Defaults to the direction of the page (RTL mirrors the axis, the plot and the tooltip).
1198
+ - `label`: string. Accessible name, for example "Revenue". The generated summary (series, period, minimum, maximum, last value) follows it in the aria-label.
1199
+ - `height`: number. Chart height in px (without the legend). Overrides size. Horizontal bars grow with the number of categories when it is not set.
1200
+ - `size`: 'xs' | 'sm' | 'md' | 'lg' | 'xl' = "md". Preset height: xs 140, sm 180, md 240, lg 320, xl 400 px.
1201
+ - `loading`: boolean = false. Shows a skeleton in the shape of the chart.
1202
+ - `emptyText`: string. Text of the empty state. Default is the translated "No data for this period".
1203
+ - `emptyIcon`: string. Icon name shown above the empty text. None by default.
1204
+ - `legend`: boolean = "true when there is more than one series". Text legend of toggle buttons (aria-pressed). A button hides and shows its series; the scale is recomputed.
1205
+ - `yMin`: number. Fixed lower end of the value axis (otherwise nice ticks from the data, from 0 unless the data stays far above it).
1206
+ - `yMax`: number. Fixed upper end of the value axis.
1207
+ - `showPoints`: boolean. Dots on every point. Default: on up to 40 points; isolated points (between gaps) always get a dot.
1208
+ Events:
1209
+ - pointClick: Click or Enter on a point. Called with { seriesKey, series, index, x, label, y }: the series under the pointer (or the keyboard series), the index in the shared x list, the original x value, its formatted label and y.
1210
+ - legendToggle: A legend button was pressed. Called with { key, label, hidden } where hidden is the new state.
1211
+ Notes:
1212
+ - Pure inline SVG, no dependencies. Colors come from the --zg-chart-* tokens (light, dark, gold and tamam), so there is nothing to configure per theme.
1213
+ - Empty data (no points, only null values, or only zeros for bars and donut) shows the empty state instead of an axis of zeros. A null y is a gap in the line, never a zero. All values equal: the axis starts at 0 and leaves headroom.
1214
+ - Accessibility: the plot is one focusable role="img" with a generated aria-label, a visually hidden data table, and a live region that reads the point while you move. Keys: Left and Right (mirrored in RTL) move between points, Up and Down between series, Home and End jump, Escape hides the tooltip, Enter fires pointClick.
1215
+ - The chart fills the width of its container (ResizeObserver, client only) and renders at 640 px on the server.
1216
+
1217
+ ## UiAreaChart (data, Pro)
1218
+ Line chart with a gradient fill under each line, made from the series color; same data, axes, tooltip and keyboard behavior as LineChart.
1219
+ Props:
1220
+ - `series` (required): { key: string; label: string; values: { x: string | number | Date; y: number | null }[]; tone?: 'brand' | 'success' | 'warning' | 'danger' | 'info' | 'neutral'; dashed?: boolean }[]. Series to draw, see LineChart. The fill goes down to the zero line (or the bottom of the plot when the axis does not include 0); each run between gaps is filled separately.
1221
+ - `unit`: 'count' | 'currency' | 'percent' = "count". Number format of the value axis, tooltip and legend. count: grouped digits, compact on the axis (1.2k, 1.2M, localized by Intl); currency: needs currency; percent: values are percent points (12 means 12%).
1222
+ - `currency`: string. ISO 4217 code for unit="currency", for example UZS, SAR or USD. The axis stays compact without the symbol; tooltip and legend show the full amount.
1223
+ - `yFormat`: (n: number) => string. Custom formatter for every number (axis, tooltip). Overrides unit and currency.
1224
+ - `locale`: string. BCP 47 tag for numbers and dates, for example "ar" or "uz-UZ". Defaults to the kit locale (en ru uz ar tr and the rest). An RTL language also mirrors the chart.
1225
+ - `dir`: 'ltr' | 'rtl'. Text direction. Defaults to the direction of the page (RTL mirrors the axis, the plot and the tooltip).
1226
+ - `label`: string. Accessible name, for example "Revenue". The generated summary (series, period, minimum, maximum, last value) follows it in the aria-label.
1227
+ - `height`: number. Chart height in px (without the legend). Overrides size. Horizontal bars grow with the number of categories when it is not set.
1228
+ - `size`: 'xs' | 'sm' | 'md' | 'lg' | 'xl' = "md". Preset height: xs 140, sm 180, md 240, lg 320, xl 400 px.
1229
+ - `loading`: boolean = false. Shows a skeleton in the shape of the chart.
1230
+ - `emptyText`: string. Text of the empty state. Default is the translated "No data for this period".
1231
+ - `emptyIcon`: string. Icon name shown above the empty text. None by default.
1232
+ - `legend`: boolean = "true when there is more than one series". Text legend of toggle buttons (aria-pressed). A button hides and shows its series; the scale is recomputed.
1233
+ - `yMin`: number. Fixed lower end of the value axis.
1234
+ - `yMax`: number. Fixed upper end of the value axis.
1235
+ - `showPoints`: boolean. Dots on every point. Default: on up to 40 points; isolated points always get a dot.
1236
+ Events:
1237
+ - pointClick: Click or Enter on a point. Called with { seriesKey, series, index, x, label, y }: the series under the pointer (or the keyboard series), the index in the shared x list, the original x value, its formatted label and y.
1238
+ - legendToggle: A legend button was pressed. Called with { key, label, hidden } where hidden is the new state.
1239
+ Notes:
1240
+ - Pure inline SVG, no dependencies. Colors come from the --zg-chart-* tokens (light, dark, gold and tamam), so there is nothing to configure per theme.
1241
+ - Empty data (no points, only null values, or only zeros for bars and donut) shows the empty state instead of an axis of zeros. A null y is a gap in the line, never a zero. All values equal: the axis starts at 0 and leaves headroom.
1242
+ - Accessibility: the plot is one focusable role="img" with a generated aria-label, a visually hidden data table, and a live region that reads the point while you move. Keys: Left and Right (mirrored in RTL) move between points, Up and Down between series, Home and End jump, Escape hides the tooltip, Enter fires pointClick.
1243
+ - The chart fills the width of its container (ResizeObserver, client only) and renders at 640 px on the server.
1244
+
1245
+ ## UiBarChart (data, Pro)
1246
+ Vertical or horizontal bar chart, grouped or stacked, for categories such as days, 24 hours or revenue per branch; same axes, formats and accessibility as LineChart.
1247
+ Props:
1248
+ - `series` (required): { key: string; label: string; values: { x: string | number | Date; y: number | null }[]; tone?: 'brand' | 'success' | 'warning' | 'danger' | 'info' | 'neutral'; dashed?: boolean }[]. One entry per bar series. x is the category (string, number or Date); categories keep their order of first appearance, dates are sorted. Negative values draw below the zero line.
1249
+ - `orientation`: 'vertical' | 'horizontal' = "vertical". Horizontal puts the categories on the left (right in RTL) and grows with the number of categories.
1250
+ - `stacked`: boolean = false. Stacks the series of a category (positives and negatives stack apart) instead of placing them side by side; the tooltip adds a total.
1251
+ - `unit`: 'count' | 'currency' | 'percent' = "count". Number format of the value axis, tooltip and legend. count: grouped digits, compact on the axis (1.2k, 1.2M, localized by Intl); currency: needs currency; percent: values are percent points (12 means 12%).
1252
+ - `currency`: string. ISO 4217 code for unit="currency", for example UZS, SAR or USD. The axis stays compact without the symbol; tooltip and legend show the full amount.
1253
+ - `yFormat`: (n: number) => string. Custom formatter for every number (axis, tooltip). Overrides unit and currency.
1254
+ - `locale`: string. BCP 47 tag for numbers and dates, for example "ar" or "uz-UZ". Defaults to the kit locale (en ru uz ar tr and the rest). An RTL language also mirrors the chart.
1255
+ - `dir`: 'ltr' | 'rtl'. Text direction. Defaults to the direction of the page (RTL mirrors the axis, the plot and the tooltip).
1256
+ - `label`: string. Accessible name, for example "Revenue". The generated summary (series, period, minimum, maximum, last value) follows it in the aria-label.
1257
+ - `height`: number. Chart height in px (without the legend). Overrides size. Horizontal bars grow with the number of categories when it is not set.
1258
+ - `size`: 'xs' | 'sm' | 'md' | 'lg' | 'xl' = "md". Preset height: xs 140, sm 180, md 240, lg 320, xl 400 px.
1259
+ - `loading`: boolean = false. Shows a skeleton in the shape of the chart.
1260
+ - `emptyText`: string. Text of the empty state. Default is the translated "No data for this period".
1261
+ - `emptyIcon`: string. Icon name shown above the empty text. None by default.
1262
+ - `legend`: boolean = "true when there is more than one series". Text legend of toggle buttons (aria-pressed). A button hides and shows its series; the scale is recomputed.
1263
+ - `yMin`: number. Fixed lower end of the value axis.
1264
+ - `yMax`: number. Fixed upper end of the value axis.
1265
+ Events:
1266
+ - pointClick: Click or Enter on a point. Called with { seriesKey, series, index, x, label, y }: the series under the pointer (or the keyboard series), the index in the shared x list, the original x value, its formatted label and y.
1267
+ - legendToggle: A legend button was pressed. Called with { key, label, hidden } where hidden is the new state.
1268
+ Notes:
1269
+ - Pure inline SVG, no dependencies. Colors come from the --zg-chart-* tokens (light, dark, gold and tamam), so there is nothing to configure per theme.
1270
+ - Empty data (no points, only null values, or only zeros for bars and donut) shows the empty state instead of an axis of zeros. A null y is a gap in the line, never a zero. All values equal: the axis starts at 0 and leaves headroom.
1271
+ - Accessibility: the plot is one focusable role="img" with a generated aria-label, a visually hidden data table, and a live region that reads the point while you move. Keys: Left and Right (mirrored in RTL) move between points, Up and Down between series, Home and End jump, Escape hides the tooltip, Enter fires pointClick.
1272
+ - The chart fills the width of its container (ResizeObserver, client only) and renders at 640 px on the server.
1273
+
1274
+ ## UiDonutChart (data, Pro)
1275
+ Donut chart of shares (sales channels, payment methods, plans) with a text legend, the total in the centre and a legend toggle.
1276
+ Props:
1277
+ - `data` (required): { key: string; label: string; value: number; tone?: 'brand' | 'success' | 'warning' | 'danger' | 'info' | 'neutral' }[]. Slices. Only positive values draw; others keep their legend row at 0. All zero or empty shows the empty state.
1278
+ - `unit`: 'count' | 'currency' | 'percent' = "count". Number format of the value axis, tooltip and centre total. count: grouped digits, compact on the axis (1.2k, 1.2M, localized by Intl); currency: needs currency; percent: values are percent points (12 means 12%).
1279
+ - `currency`: string. ISO 4217 code for unit="currency", for example UZS, SAR or USD. The axis stays compact without the symbol; tooltip and legend show the full amount.
1280
+ - `yFormat`: (n: number) => string. Custom formatter for every number (axis, tooltip, total). Overrides unit and currency.
1281
+ - `locale`: string. BCP 47 tag for numbers and dates, for example "ar" or "uz-UZ". Defaults to the kit locale (en ru uz ar tr and the rest). An RTL language also mirrors the chart.
1282
+ - `dir`: 'ltr' | 'rtl'. Text direction. Defaults to the direction of the page (RTL mirrors the axis, the plot and the tooltip).
1283
+ - `label`: string. Accessible name, for example "Revenue". The generated summary (series, period, minimum, maximum, last value) follows it in the aria-label.
1284
+ - `height`: number. Diameter in px. Overrides size.
1285
+ - `size`: 'xs' | 'sm' | 'md' | 'lg' | 'xl' = "md". Preset diameter: xs 120, sm 160, md 200, lg 240, xl 300 px.
1286
+ - `loading`: boolean = false. Shows a skeleton in the shape of the chart.
1287
+ - `emptyText`: string. Text of the empty state. Default is the translated "No data for this period".
1288
+ - `emptyIcon`: string. Icon name shown above the empty text. None by default.
1289
+ - `legend`: boolean = true. Text legend of toggle buttons (aria-pressed). A button hides and shows its slice; the scale is recomputed.
1290
+ Events:
1291
+ - pointClick: Click or Enter on a slice. Called with { key, label, value, share, index }; share is 0 to 1.
1292
+ - legendToggle: A legend button was pressed. Called with { key, label, hidden } where hidden is the new state.
1293
+ Notes:
1294
+ - Pure inline SVG, no dependencies. Colors come from the --zg-chart-* tokens (light, dark, gold and tamam), so there is nothing to configure per theme.
1295
+ - Empty data (no points, only null values, or only zeros for bars and donut) shows the empty state instead of an axis of zeros. A null y is a gap in the line, never a zero. All values equal: the axis starts at 0 and leaves headroom.
1296
+ - Accessibility: the plot is one focusable role="img" with a generated aria-label, a visually hidden data table, and a live region that reads the point while you move. Keys: Left and Right (mirrored in RTL) move between points, Up and Down between series, Home and End jump, Escape hides the tooltip, Enter fires pointClick.
1297
+ - The chart fills the width of its container (ResizeObserver, client only) and renders at 640 px on the server.
1298
+
1189
1299
  ## UiRing (data)
1190
1300
  Circular progress gauge with a percentage in the center and a tick scale around it.
1191
1301
  Props:
@@ -1718,16 +1828,19 @@ Notes:
1718
1828
  Horizontal app header with a brand area, navigation items and an actions area.
1719
1829
  Props:
1720
1830
  - `brand`: string | VNode. Logo or product name on the left.
1721
- - `items`: { value: string; label: string; icon?: string; count?: string | number }[] = "[]". Navigation entries. count renders a small counter after the label.
1831
+ - `items`: { value: string; label: string; icon?: string; count?: string | number; children?: ({ value: string; label: string; icon?: string; count?: string | number; disabled?: boolean } | { heading: string } | { separator: true })[] }[] = "[]". Navigation entries. count renders a small counter after the label. An entry with children becomes a drop-down: click or ArrowDown opens a menu of its children (each with an optional icon and count, headings and separators allowed); selecting one calls change with the child value. The entry is marked current when one of its children is.
1722
1832
  - `value`: string. Value of the active item (aria-current="page").
1833
+ - `overflow`: 'menu' | 'none' = "menu". 'menu': entries that do not fit move into a trailing "More" drop-down (measured after render and on resize; server rendering shows all entries). 'none': no collapsing, the row scrolls sideways and sub-menus are clipped, so avoid children with it.
1834
+ - `moreLabel`: string = "More". Accessible name of the overflow drop-down button.
1723
1835
  - `size`: 'xs' | 'sm' | 'md' | 'lg' | 'xl' = "md". Scale of header padding, item height and text.
1724
1836
  Slots:
1725
1837
  - actions: Right side of the header (buttons, avatar). React also accepts an actions prop.
1726
1838
  Events:
1727
- - change: Called with the value of the clicked item.
1839
+ - change: Called with the value of the clicked item or sub-menu item.
1728
1840
  Notes:
1729
1841
  - Controlled: update value yourself in the change handler.
1730
1842
  - Items use count; SubNav uses badge for the same purpose.
1843
+ - Entries with children and the More menu share the Dropdown keyboard behaviour: ArrowDown opens, arrows and Home/End move, Escape closes and returns focus to the button.
1731
1844
 
1732
1845
  ## UiSideNav (navigation)
1733
1846
  Vertical sidebar with a brand, grouped navigation items, a footer and an optional collapse toggle.
package/dist/llms.txt CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  > ZiyaraGo UI — glass design system for Umrah and Hajj products. OKLCH tokens, two palettes, dark and light, RTL, Thmanyah. One framework-neutral core with Vue 3, Nuxt and React adapters, 102 free components and 6 page templates (more in @ziyarago/ui-pro).
4
4
 
5
- Version 0.16.0. Docs: https://ziyara.vip . Manifest (machine readable): https://ziyara.vip/manifest.json
5
+ Version 0.18.0. Docs: https://ziyara.vip . Manifest (machine readable): https://ziyara.vip/manifest.json
6
6
 
7
7
  ## Setup
8
8
  - import { UiButton } from '@ziyarago/ui/vue'
@@ -122,6 +122,10 @@ Tables, stats, charts and lists.
122
122
  - UiSegBar (Pro): Single stacked bar split into proportional segments with a legend, for distributions.
123
123
  - UiMiniChart: Tiny sparkline in bar or line form for trends inside cards and tables.
124
124
  - UiChartCard (Pro): Card shell for a chart with title, subtitle and an optional overflow menu; put the chart in the default slot.
125
+ - UiLineChart (Pro): Line chart for time series with several series, a localized time axis with automatic label step, "nice" value ticks, gaps for null values, tooltip and keyboard navigation.
126
+ - UiAreaChart (Pro): Line chart with a gradient fill under each line, made from the series color; same data, axes, tooltip and keyboard behavior as LineChart.
127
+ - UiBarChart (Pro): Vertical or horizontal bar chart, grouped or stacked, for categories such as days, 24 hours or revenue per branch; same axes, formats and accessibility as LineChart.
128
+ - UiDonutChart (Pro): Donut chart of shares (sales channels, payment methods, plans) with a text legend, the total in the centre and a legend toggle.
125
129
  - UiRing: Circular progress gauge with a percentage in the center and a tick scale around it.
126
130
  - UiOccupancyChart (Pro): Bar chart of percentages by label, such as hotel occupancy per day or month.
127
131
  - UiSalesFunnel (Pro): Horizontal funnel of steps with bars scaled to the largest value, for conversion flows.