@ziyarago/ui 0.15.3 → 0.17.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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ziyarago/ui",
3
- "version": "0.15.3",
3
+ "version": "0.17.0",
4
4
  "homepage": "https://ziyara.vip",
5
5
  "imports": {
6
6
  "vue": "import { UiButton } from '@ziyarago/ui/vue'",
@@ -140,6 +140,10 @@
140
140
  "SegBar",
141
141
  "MiniChart",
142
142
  "ChartCard",
143
+ "LineChart",
144
+ "AreaChart",
145
+ "BarChart",
146
+ "DonutChart",
143
147
  "Ring",
144
148
  "OccupancyChart",
145
149
  "SalesFunnel",
@@ -7834,7 +7838,8 @@
7834
7838
  },
7835
7839
  "notes": [
7836
7840
  "Selecting from the list is the only way to set a value: free text is never emitted.",
7837
- "The list closes on outside click and on Escape."
7841
+ "The list closes on outside click and on Escape.",
7842
+ "Keyboard (WAI-ARIA combobox): the input has role=combobox with aria-expanded, aria-controls and aria-activedescendant; focus stays in the input, Arrow Down and Up open the list and move the active option (wraps, skips disabled), Enter chooses it, Escape closes."
7838
7843
  ]
7839
7844
  },
7840
7845
  {
@@ -8480,6 +8485,10 @@
8480
8485
  "type": "(date: Date) => boolean",
8481
8486
  "description": "Return true to disable a specific day."
8482
8487
  },
8488
+ "today": {
8489
+ "type": "Date | string | number",
8490
+ "description": "The day marked as today. By default it is read from the browser clock after mount (nothing is marked in server-rendered HTML), so server and client never disagree near midnight or across time zones. Pass it to mark a day in the HTML too."
8491
+ },
8483
8492
  "events": {
8484
8493
  "type": "Record<string, string>",
8485
8494
  "default": "{}",
@@ -8502,7 +8511,8 @@
8502
8511
  "change": "Called with a Date object (local time) for the clicked day."
8503
8512
  },
8504
8513
  "notes": [
8505
- "The event payload is a Date, not a string: convert to ISO yourself if the model is a string."
8514
+ "The event payload is a Date, not a string: convert to ISO yourself if the model is a string.",
8515
+ "Keyboard: one tab stop on the day grid; arrows move by day or week, Home and End to the week start and end, PageUp and PageDown change month (Shift: year), Enter or Space picks. Without a selected date the visible month is the current month, which server and client can disagree on right at a month boundary; pass modelValue or today to make it deterministic."
8506
8516
  ]
8507
8517
  },
8508
8518
  {
@@ -8596,6 +8606,11 @@
8596
8606
  "forwarded": true,
8597
8607
  "description": "Return true to disable a specific day, forwarded to the calendar."
8598
8608
  },
8609
+ "today": {
8610
+ "type": "Date | string | number",
8611
+ "forwarded": true,
8612
+ "description": "The day marked as today in the calendar; by default read from the browser clock after mount. Forwarded to the calendar."
8613
+ },
8599
8614
  "required": {
8600
8615
  "type": "boolean",
8601
8616
  "default": false,
@@ -8644,7 +8659,7 @@
8644
8659
  },
8645
8660
  "notes": [
8646
8661
  "The event payload is a Date, not a string: convert to ISO yourself if the model is a string.",
8647
- "The popup closes on outside click and on Escape."
8662
+ "The popup closes on outside click and on Escape (focus returns to the trigger). Arrow Down or Up on the trigger opens it and focus moves into the calendar, which uses the Calendar keys."
8648
8663
  ]
8649
8664
  },
8650
8665
  {
@@ -9893,6 +9908,428 @@
9893
9908
  "menu": "Called with the clicked menu item label (the string from menu); the menu closes afterwards."
9894
9909
  }
9895
9910
  },
9911
+ {
9912
+ "name": "LineChart",
9913
+ "tag": "UiLineChart",
9914
+ "group": "data",
9915
+ "tier": "pro",
9916
+ "implemented": false,
9917
+ "package": "@ziyarago/ui-pro",
9918
+ "description": "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.",
9919
+ "props": {
9920
+ "series": {
9921
+ "type": "{ key: string; label: string; values: { x: string | number | Date; y: number | null }[]; tone?: 'brand' | 'success' | 'warning' | 'danger' | 'info' | 'neutral'; dashed?: boolean }[]",
9922
+ "required": true,
9923
+ "description": "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."
9924
+ },
9925
+ "unit": {
9926
+ "type": "'count' | 'currency' | 'percent'",
9927
+ "values": [
9928
+ "count",
9929
+ "currency",
9930
+ "percent"
9931
+ ],
9932
+ "default": "count",
9933
+ "description": "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%)."
9934
+ },
9935
+ "currency": {
9936
+ "type": "string",
9937
+ "description": "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."
9938
+ },
9939
+ "yFormat": {
9940
+ "type": "(n: number) => string",
9941
+ "description": "Custom formatter for every number (axis, tooltip). Overrides unit and currency."
9942
+ },
9943
+ "locale": {
9944
+ "type": "string",
9945
+ "description": "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."
9946
+ },
9947
+ "dir": {
9948
+ "type": "'ltr' | 'rtl'",
9949
+ "values": [
9950
+ "ltr",
9951
+ "rtl"
9952
+ ],
9953
+ "description": "Text direction. Defaults to the direction of the page (RTL mirrors the axis, the plot and the tooltip)."
9954
+ },
9955
+ "label": {
9956
+ "type": "string",
9957
+ "description": "Accessible name, for example \"Revenue\". The generated summary (series, period, minimum, maximum, last value) follows it in the aria-label."
9958
+ },
9959
+ "height": {
9960
+ "type": "number",
9961
+ "description": "Chart height in px (without the legend). Overrides size. Horizontal bars grow with the number of categories when it is not set."
9962
+ },
9963
+ "size": {
9964
+ "type": "'xs' | 'sm' | 'md' | 'lg' | 'xl'",
9965
+ "values": [
9966
+ "xs",
9967
+ "sm",
9968
+ "md",
9969
+ "lg",
9970
+ "xl"
9971
+ ],
9972
+ "default": "md",
9973
+ "description": "Preset height: xs 140, sm 180, md 240, lg 320, xl 400 px."
9974
+ },
9975
+ "loading": {
9976
+ "type": "boolean",
9977
+ "default": false,
9978
+ "description": "Shows a skeleton in the shape of the chart."
9979
+ },
9980
+ "emptyText": {
9981
+ "type": "string",
9982
+ "description": "Text of the empty state. Default is the translated \"No data for this period\"."
9983
+ },
9984
+ "emptyIcon": {
9985
+ "type": "string",
9986
+ "description": "Icon name shown above the empty text. None by default."
9987
+ },
9988
+ "legend": {
9989
+ "type": "boolean",
9990
+ "default": "true when there is more than one series",
9991
+ "description": "Text legend of toggle buttons (aria-pressed). A button hides and shows its series; the scale is recomputed."
9992
+ },
9993
+ "yMin": {
9994
+ "type": "number",
9995
+ "description": "Fixed lower end of the value axis (otherwise nice ticks from the data, from 0 unless the data stays far above it)."
9996
+ },
9997
+ "yMax": {
9998
+ "type": "number",
9999
+ "description": "Fixed upper end of the value axis."
10000
+ },
10001
+ "showPoints": {
10002
+ "type": "boolean",
10003
+ "description": "Dots on every point. Default: on up to 40 points; isolated points (between gaps) always get a dot."
10004
+ }
10005
+ },
10006
+ "events": {
10007
+ "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.",
10008
+ "legendToggle": "A legend button was pressed. Called with { key, label, hidden } where hidden is the new state."
10009
+ },
10010
+ "notes": [
10011
+ "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.",
10012
+ "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.",
10013
+ "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.",
10014
+ "The chart fills the width of its container (ResizeObserver, client only) and renders at 640 px on the server."
10015
+ ]
10016
+ },
10017
+ {
10018
+ "name": "AreaChart",
10019
+ "tag": "UiAreaChart",
10020
+ "group": "data",
10021
+ "tier": "pro",
10022
+ "implemented": false,
10023
+ "package": "@ziyarago/ui-pro",
10024
+ "description": "Line chart with a gradient fill under each line, made from the series color; same data, axes, tooltip and keyboard behavior as LineChart.",
10025
+ "props": {
10026
+ "series": {
10027
+ "type": "{ key: string; label: string; values: { x: string | number | Date; y: number | null }[]; tone?: 'brand' | 'success' | 'warning' | 'danger' | 'info' | 'neutral'; dashed?: boolean }[]",
10028
+ "required": true,
10029
+ "description": "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."
10030
+ },
10031
+ "unit": {
10032
+ "type": "'count' | 'currency' | 'percent'",
10033
+ "values": [
10034
+ "count",
10035
+ "currency",
10036
+ "percent"
10037
+ ],
10038
+ "default": "count",
10039
+ "description": "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%)."
10040
+ },
10041
+ "currency": {
10042
+ "type": "string",
10043
+ "description": "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."
10044
+ },
10045
+ "yFormat": {
10046
+ "type": "(n: number) => string",
10047
+ "description": "Custom formatter for every number (axis, tooltip). Overrides unit and currency."
10048
+ },
10049
+ "locale": {
10050
+ "type": "string",
10051
+ "description": "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."
10052
+ },
10053
+ "dir": {
10054
+ "type": "'ltr' | 'rtl'",
10055
+ "values": [
10056
+ "ltr",
10057
+ "rtl"
10058
+ ],
10059
+ "description": "Text direction. Defaults to the direction of the page (RTL mirrors the axis, the plot and the tooltip)."
10060
+ },
10061
+ "label": {
10062
+ "type": "string",
10063
+ "description": "Accessible name, for example \"Revenue\". The generated summary (series, period, minimum, maximum, last value) follows it in the aria-label."
10064
+ },
10065
+ "height": {
10066
+ "type": "number",
10067
+ "description": "Chart height in px (without the legend). Overrides size. Horizontal bars grow with the number of categories when it is not set."
10068
+ },
10069
+ "size": {
10070
+ "type": "'xs' | 'sm' | 'md' | 'lg' | 'xl'",
10071
+ "values": [
10072
+ "xs",
10073
+ "sm",
10074
+ "md",
10075
+ "lg",
10076
+ "xl"
10077
+ ],
10078
+ "default": "md",
10079
+ "description": "Preset height: xs 140, sm 180, md 240, lg 320, xl 400 px."
10080
+ },
10081
+ "loading": {
10082
+ "type": "boolean",
10083
+ "default": false,
10084
+ "description": "Shows a skeleton in the shape of the chart."
10085
+ },
10086
+ "emptyText": {
10087
+ "type": "string",
10088
+ "description": "Text of the empty state. Default is the translated \"No data for this period\"."
10089
+ },
10090
+ "emptyIcon": {
10091
+ "type": "string",
10092
+ "description": "Icon name shown above the empty text. None by default."
10093
+ },
10094
+ "legend": {
10095
+ "type": "boolean",
10096
+ "default": "true when there is more than one series",
10097
+ "description": "Text legend of toggle buttons (aria-pressed). A button hides and shows its series; the scale is recomputed."
10098
+ },
10099
+ "yMin": {
10100
+ "type": "number",
10101
+ "description": "Fixed lower end of the value axis."
10102
+ },
10103
+ "yMax": {
10104
+ "type": "number",
10105
+ "description": "Fixed upper end of the value axis."
10106
+ },
10107
+ "showPoints": {
10108
+ "type": "boolean",
10109
+ "description": "Dots on every point. Default: on up to 40 points; isolated points always get a dot."
10110
+ }
10111
+ },
10112
+ "events": {
10113
+ "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.",
10114
+ "legendToggle": "A legend button was pressed. Called with { key, label, hidden } where hidden is the new state."
10115
+ },
10116
+ "notes": [
10117
+ "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.",
10118
+ "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.",
10119
+ "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.",
10120
+ "The chart fills the width of its container (ResizeObserver, client only) and renders at 640 px on the server."
10121
+ ]
10122
+ },
10123
+ {
10124
+ "name": "BarChart",
10125
+ "tag": "UiBarChart",
10126
+ "group": "data",
10127
+ "tier": "pro",
10128
+ "implemented": false,
10129
+ "package": "@ziyarago/ui-pro",
10130
+ "description": "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.",
10131
+ "props": {
10132
+ "series": {
10133
+ "type": "{ key: string; label: string; values: { x: string | number | Date; y: number | null }[]; tone?: 'brand' | 'success' | 'warning' | 'danger' | 'info' | 'neutral'; dashed?: boolean }[]",
10134
+ "required": true,
10135
+ "description": "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."
10136
+ },
10137
+ "orientation": {
10138
+ "type": "'vertical' | 'horizontal'",
10139
+ "values": [
10140
+ "vertical",
10141
+ "horizontal"
10142
+ ],
10143
+ "default": "vertical",
10144
+ "description": "Horizontal puts the categories on the left (right in RTL) and grows with the number of categories."
10145
+ },
10146
+ "stacked": {
10147
+ "type": "boolean",
10148
+ "default": false,
10149
+ "description": "Stacks the series of a category (positives and negatives stack apart) instead of placing them side by side; the tooltip adds a total."
10150
+ },
10151
+ "unit": {
10152
+ "type": "'count' | 'currency' | 'percent'",
10153
+ "values": [
10154
+ "count",
10155
+ "currency",
10156
+ "percent"
10157
+ ],
10158
+ "default": "count",
10159
+ "description": "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%)."
10160
+ },
10161
+ "currency": {
10162
+ "type": "string",
10163
+ "description": "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."
10164
+ },
10165
+ "yFormat": {
10166
+ "type": "(n: number) => string",
10167
+ "description": "Custom formatter for every number (axis, tooltip). Overrides unit and currency."
10168
+ },
10169
+ "locale": {
10170
+ "type": "string",
10171
+ "description": "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."
10172
+ },
10173
+ "dir": {
10174
+ "type": "'ltr' | 'rtl'",
10175
+ "values": [
10176
+ "ltr",
10177
+ "rtl"
10178
+ ],
10179
+ "description": "Text direction. Defaults to the direction of the page (RTL mirrors the axis, the plot and the tooltip)."
10180
+ },
10181
+ "label": {
10182
+ "type": "string",
10183
+ "description": "Accessible name, for example \"Revenue\". The generated summary (series, period, minimum, maximum, last value) follows it in the aria-label."
10184
+ },
10185
+ "height": {
10186
+ "type": "number",
10187
+ "description": "Chart height in px (without the legend). Overrides size. Horizontal bars grow with the number of categories when it is not set."
10188
+ },
10189
+ "size": {
10190
+ "type": "'xs' | 'sm' | 'md' | 'lg' | 'xl'",
10191
+ "values": [
10192
+ "xs",
10193
+ "sm",
10194
+ "md",
10195
+ "lg",
10196
+ "xl"
10197
+ ],
10198
+ "default": "md",
10199
+ "description": "Preset height: xs 140, sm 180, md 240, lg 320, xl 400 px."
10200
+ },
10201
+ "loading": {
10202
+ "type": "boolean",
10203
+ "default": false,
10204
+ "description": "Shows a skeleton in the shape of the chart."
10205
+ },
10206
+ "emptyText": {
10207
+ "type": "string",
10208
+ "description": "Text of the empty state. Default is the translated \"No data for this period\"."
10209
+ },
10210
+ "emptyIcon": {
10211
+ "type": "string",
10212
+ "description": "Icon name shown above the empty text. None by default."
10213
+ },
10214
+ "legend": {
10215
+ "type": "boolean",
10216
+ "default": "true when there is more than one series",
10217
+ "description": "Text legend of toggle buttons (aria-pressed). A button hides and shows its series; the scale is recomputed."
10218
+ },
10219
+ "yMin": {
10220
+ "type": "number",
10221
+ "description": "Fixed lower end of the value axis."
10222
+ },
10223
+ "yMax": {
10224
+ "type": "number",
10225
+ "description": "Fixed upper end of the value axis."
10226
+ }
10227
+ },
10228
+ "events": {
10229
+ "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.",
10230
+ "legendToggle": "A legend button was pressed. Called with { key, label, hidden } where hidden is the new state."
10231
+ },
10232
+ "notes": [
10233
+ "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.",
10234
+ "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.",
10235
+ "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.",
10236
+ "The chart fills the width of its container (ResizeObserver, client only) and renders at 640 px on the server."
10237
+ ]
10238
+ },
10239
+ {
10240
+ "name": "DonutChart",
10241
+ "tag": "UiDonutChart",
10242
+ "group": "data",
10243
+ "tier": "pro",
10244
+ "implemented": false,
10245
+ "package": "@ziyarago/ui-pro",
10246
+ "description": "Donut chart of shares (sales channels, payment methods, plans) with a text legend, the total in the centre and a legend toggle.",
10247
+ "props": {
10248
+ "data": {
10249
+ "type": "{ key: string; label: string; value: number; tone?: 'brand' | 'success' | 'warning' | 'danger' | 'info' | 'neutral' }[]",
10250
+ "required": true,
10251
+ "description": "Slices. Only positive values draw; others keep their legend row at 0. All zero or empty shows the empty state."
10252
+ },
10253
+ "unit": {
10254
+ "type": "'count' | 'currency' | 'percent'",
10255
+ "values": [
10256
+ "count",
10257
+ "currency",
10258
+ "percent"
10259
+ ],
10260
+ "default": "count",
10261
+ "description": "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%)."
10262
+ },
10263
+ "currency": {
10264
+ "type": "string",
10265
+ "description": "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."
10266
+ },
10267
+ "yFormat": {
10268
+ "type": "(n: number) => string",
10269
+ "description": "Custom formatter for every number (axis, tooltip, total). Overrides unit and currency."
10270
+ },
10271
+ "locale": {
10272
+ "type": "string",
10273
+ "description": "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."
10274
+ },
10275
+ "dir": {
10276
+ "type": "'ltr' | 'rtl'",
10277
+ "values": [
10278
+ "ltr",
10279
+ "rtl"
10280
+ ],
10281
+ "description": "Text direction. Defaults to the direction of the page (RTL mirrors the axis, the plot and the tooltip)."
10282
+ },
10283
+ "label": {
10284
+ "type": "string",
10285
+ "description": "Accessible name, for example \"Revenue\". The generated summary (series, period, minimum, maximum, last value) follows it in the aria-label."
10286
+ },
10287
+ "height": {
10288
+ "type": "number",
10289
+ "description": "Diameter in px. Overrides size."
10290
+ },
10291
+ "size": {
10292
+ "type": "'xs' | 'sm' | 'md' | 'lg' | 'xl'",
10293
+ "values": [
10294
+ "xs",
10295
+ "sm",
10296
+ "md",
10297
+ "lg",
10298
+ "xl"
10299
+ ],
10300
+ "default": "md",
10301
+ "description": "Preset diameter: xs 120, sm 160, md 200, lg 240, xl 300 px."
10302
+ },
10303
+ "loading": {
10304
+ "type": "boolean",
10305
+ "default": false,
10306
+ "description": "Shows a skeleton in the shape of the chart."
10307
+ },
10308
+ "emptyText": {
10309
+ "type": "string",
10310
+ "description": "Text of the empty state. Default is the translated \"No data for this period\"."
10311
+ },
10312
+ "emptyIcon": {
10313
+ "type": "string",
10314
+ "description": "Icon name shown above the empty text. None by default."
10315
+ },
10316
+ "legend": {
10317
+ "type": "boolean",
10318
+ "default": true,
10319
+ "description": "Text legend of toggle buttons (aria-pressed). A button hides and shows its slice; the scale is recomputed."
10320
+ }
10321
+ },
10322
+ "events": {
10323
+ "pointClick": "Click or Enter on a slice. Called with { key, label, value, share, index }; share is 0 to 1.",
10324
+ "legendToggle": "A legend button was pressed. Called with { key, label, hidden } where hidden is the new state."
10325
+ },
10326
+ "notes": [
10327
+ "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.",
10328
+ "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.",
10329
+ "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.",
10330
+ "The chart fills the width of its container (ResizeObserver, client only) and renders at 640 px on the server."
10331
+ ]
10332
+ },
9896
10333
  {
9897
10334
  "name": "Ring",
9898
10335
  "tag": "UiRing",
@@ -11378,7 +11815,8 @@
11378
11815
  "default": "The element the tooltip is attached to."
11379
11816
  },
11380
11817
  "notes": [
11381
- "Pure CSS bubble; it cannot contain markup. For rich content use HoverCard."
11818
+ "Pure CSS bubble; it cannot contain markup. For rich content use HoverCard.",
11819
+ "Escape hides the bubble while it is shown (hover or focus) without moving focus; it stays visible while the pointer is over the trigger or the bubble, and returns on the next hover or focus."
11382
11820
  ]
11383
11821
  },
11384
11822
  {
@@ -11688,7 +12126,7 @@
11688
12126
  "tier": "pro",
11689
12127
  "implemented": false,
11690
12128
  "package": "@ziyarago/ui-pro",
11691
- "description": "Full-screen idle screen with a large clock, date and the brand mark; show it after inactivity.",
12129
+ "description": "Full-screen idle screen with a large clock, date and an optional logo; show it after inactivity.",
11692
12130
  "props": {
11693
12131
  "open": {
11694
12132
  "type": "boolean",
@@ -11704,6 +12142,10 @@
11704
12142
  "type": "string",
11705
12143
  "description": "Small hint under the date, e.g. \"Tap to continue\"."
11706
12144
  },
12145
+ "logo": {
12146
+ "type": "string",
12147
+ "description": "URL of an image shown above the clock. Use an absolute URL or a root-relative path such as \"/brand/logo.svg\". Nothing is shown when it is not set, so the screensaver never requests a missing file."
12148
+ },
11707
12149
  "idleMs": {
11708
12150
  "type": "number",
11709
12151
  "default": 0,
package/dist/style.css CHANGED
@@ -570,6 +570,84 @@
570
570
  .zg-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}
571
571
  .zg-select__opt:focus-visible{outline:3px solid var(--zg-brand-soft);outline-offset:-3px;background:var(--zg-s2)}
572
572
  .zg-seg button:focus-visible,.zg-tabs button:focus-visible,.zg-code-b pre:focus-visible{outline:3px solid var(--zg-brand-soft);outline-offset:2px}
573
+ .zg-select__opt[data-active],.zg-select__opt[data-active]:hover{background:var(--zg-s2);outline:3px solid var(--zg-brand-soft);outline-offset:-3px}
574
+ .zg-tip:hover::after,.zg-tip:focus-visible::after{pointer-events:auto}
575
+ .zg-tip:hover::before{content:"";position:absolute;left:0;right:0;bottom:100%;height:10px}
576
+ .zg-tip--bottom:hover::before{bottom:auto;top:100%}
577
+ .zg-tip--left:hover::before,.zg-tip--right:hover::before{top:0;bottom:0;height:auto;width:10px}
578
+ .zg-tip--left:hover::before{left:auto;right:100%}.zg-tip--right:hover::before{right:auto;left:100%}
579
+ .zg-tip[data-tip-off]::after{opacity:0!important;pointer-events:none!important}.zg-tip[data-tip-off]::before{display:none}
580
+
581
+
582
+ /* ./charts.css */
583
+ /* LineChart, AreaChart, BarChart, DonutChart (@ziyarago/ui-pro). Colors only from tokens: the series palette (--zg-chart-1..6), the tones and the grid / axis / label colors are defined here
584
+ per theme and palette (gold, tamam). Tokens are declared on .zg-chart so palette references resolve where the chart is. */
585
+ .zg-chart{
586
+ --zg-chart-brand:var(--zg-brand);--zg-chart-info:var(--zg-sky);--zg-chart-success:oklch(0.76 0.15 150);--zg-chart-warning:oklch(0.8 0.14 80);--zg-chart-danger:oklch(0.7 0.18 25);--zg-chart-neutral:oklch(0.72 0.012 70);
587
+ --zg-chart-1:var(--zg-chart-brand);--zg-chart-2:var(--zg-chart-info);--zg-chart-3:var(--zg-chart-success);--zg-chart-4:oklch(0.72 0.13 300);--zg-chart-5:oklch(0.76 0.14 45);--zg-chart-6:oklch(0.72 0.15 350);
588
+ --zg-chart-grid:oklch(1 0 0 / .07);--zg-chart-axis:oklch(1 0 0 / .24);--zg-chart-label:var(--zg-text-3);--zg-chart-surface:var(--zg-pop);--zg-chart-band:oklch(1 0 0 / .06);
589
+ }
590
+ [data-palette="tamam"] .zg-chart{--zg-chart-success:oklch(0.76 0.13 175);--zg-chart-1:var(--zg-chart-brand);--zg-chart-2:var(--zg-chart-info);--zg-chart-3:oklch(0.72 0.13 300);--zg-chart-4:oklch(0.78 0.14 75);--zg-chart-5:oklch(0.72 0.15 350);--zg-chart-6:oklch(0.7 0.14 255)}
591
+ [data-theme="light"] .zg-chart{
592
+ --zg-chart-brand:oklch(0.55 0.09 66);--zg-chart-info:oklch(0.5 0.11 230);--zg-chart-success:oklch(0.48 0.13 150);--zg-chart-warning:oklch(0.52 0.12 70);--zg-chart-danger:oklch(0.5 0.18 25);--zg-chart-neutral:oklch(0.5 0.012 70);
593
+ --zg-chart-4:oklch(0.5 0.15 300);--zg-chart-5:oklch(0.55 0.14 45);--zg-chart-6:oklch(0.5 0.17 350);
594
+ --zg-chart-grid:oklch(0.3 0.02 60 / .26);--zg-chart-axis:oklch(0.3 0.02 60 / .75);--zg-chart-band:oklch(0.3 0.02 60 / .06);
595
+ }
596
+ [data-theme="light"][data-palette="tamam"] .zg-chart,[data-theme="light"] [data-palette="tamam"] .zg-chart,[data-palette="tamam"] [data-theme="light"] .zg-chart{--zg-chart-brand:oklch(0.5 0.17 142);--zg-chart-info:oklch(0.5 0.1 200);--zg-chart-success:oklch(0.48 0.12 175);--zg-chart-3:oklch(0.5 0.15 300);--zg-chart-4:oklch(0.55 0.13 70);--zg-chart-5:oklch(0.5 0.17 350);--zg-chart-6:oklch(0.5 0.15 255)}
597
+
598
+ .zg-chart{position:relative;display:block;width:100%;min-width:0;color:var(--zg-text-2);font:12px/1.3 var(--zg-font)}
599
+ .zg-chart__box{position:relative;max-width:100%}
600
+ .zg-chart__plot{position:relative;display:block;max-width:100%;touch-action:pan-y;outline:0;border-radius:10px;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none;cursor:crosshair}
601
+ .zg-chart__plot:focus-visible{box-shadow:0 0 0 3px var(--zg-brand-soft),0 0 0 1px var(--zg-brand)}
602
+ .zg-chart__svg{display:block;width:100%;height:auto;max-width:100%;overflow:visible}
603
+ .zg-chart__grid{stroke:var(--zg-chart-grid);stroke-width:1;shape-rendering:crispEdges}
604
+ .zg-chart__zero{stroke:var(--zg-chart-axis)}
605
+ .zg-chart__tick{fill:var(--zg-chart-label);font-size:11px;font-family:inherit;font-variant-numeric:tabular-nums}
606
+ .zg-chart__line{stroke:var(--c);stroke-width:2.25;stroke-linecap:round;stroke-linejoin:round}
607
+ .zg-chart__gs{stop-color:var(--c)}
608
+ .zg-chart__pt{fill:var(--c);stroke:var(--zg-chart-surface);stroke-width:1.5}
609
+ .zg-chart__pt--on{stroke-width:2}
610
+ .zg-chart__guide{stroke:var(--zg-chart-axis);stroke-width:1;stroke-dasharray:3 3;shape-rendering:crispEdges}
611
+ .zg-chart__band{fill:var(--zg-chart-band)}
612
+ .zg-chart__bar{fill:var(--c)}
613
+ .zg-chart__bar--on{fill:color-mix(in oklch,var(--c) 82%,var(--zg-text-1))}
614
+ .zg-chart__slice{fill:var(--c);stroke:none}
615
+ .zg-chart__slice--on{fill:color-mix(in oklch,var(--c) 82%,var(--zg-text-1))}
616
+ .zg-chart__track{stroke:var(--zg-s2)}
617
+ .zg-chart__total{fill:var(--zg-text-1);font-weight:600;font-family:inherit;font-variant-numeric:tabular-nums}
618
+ .zg-chart__totall{fill:var(--zg-chart-label);font-size:11px;font-family:inherit}
619
+ .zg-chart__tip{position:absolute;z-index:3;box-sizing:border-box;pointer-events:none;background:var(--zg-pop);color:var(--zg-text-1);border-radius:12px;box-shadow:var(--zg-shadow-1),inset 0 0 0 1px var(--zg-stroke);padding:8px 12px;font-size:12px}
620
+ .zg-chart__tipt{color:var(--zg-text-2);margin-bottom:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
621
+ .zg-chart__tipr{display:flex;align-items:center;gap:8px;line-height:20px}
622
+ .zg-chart__tipr--on .zg-chart__tipl{color:var(--zg-text-1)}
623
+ .zg-chart__tipl{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--zg-text-2)}
624
+ .zg-chart__tipv{font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap}
625
+ .zg-chart__sw{flex:none;width:10px;height:10px;border-radius:3px;background:var(--c)}
626
+ .zg-chart__sw--dash{width:16px;height:0;border-radius:0;background:none;border-top:2.5px dashed var(--c)}
627
+ .zg-chart__legend{display:flex;flex-wrap:wrap;gap:4px 8px;margin:10px 0 0;padding:0;list-style:none}
628
+ .zg-chart__lg{display:inline-flex;align-items:center;gap:8px;min-height:28px;padding:2px 8px;border:0;border-radius:8px;background:none;color:var(--zg-text-2);font:inherit;font-size:13px;cursor:pointer;text-align:start}
629
+ .zg-chart__lg:hover{background:var(--zg-s2)}
630
+ .zg-chart__lg:focus-visible{outline:0;box-shadow:0 0 0 3px var(--zg-brand-soft),0 0 0 1px var(--zg-brand)}
631
+ .zg-chart__lg[aria-pressed="false"]{color:var(--zg-text-3)}
632
+ .zg-chart__lg[aria-pressed="false"] .zg-chart__lgt{text-decoration:line-through}
633
+ .zg-chart__lg[aria-pressed="false"] .zg-chart__sw{background:none;box-shadow:inset 0 0 0 2px var(--c)}
634
+ .zg-chart__lg[aria-pressed="false"] .zg-chart__sw--dash{box-shadow:none}
635
+ .zg-chart__lgv{margin-inline-start:auto;padding-inline-start:12px;font-variant-numeric:tabular-nums;color:var(--zg-text-2);white-space:nowrap}
636
+ .zg-chart--donut{display:flex;flex-wrap:wrap;align-items:center;gap:12px 28px}
637
+ .zg-chart--donut .zg-chart__box{flex:none;max-width:100%}
638
+ .zg-chart--donut .zg-chart__legend{flex:1 1 200px;min-width:0;flex-direction:column;flex-wrap:nowrap;gap:2px;margin:0}
639
+ .zg-chart--donut .zg-chart__lg{width:100%}
640
+ .zg-chart__empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;box-sizing:border-box;padding:16px;text-align:center;color:var(--zg-text-3);border-radius:16px;box-shadow:inset 0 0 0 1px var(--zg-stroke)}
641
+ .zg-chart__emptyt{margin:0;font-size:13px}
642
+ .zg-chart--donut.zg-chart--empty,.zg-chart--donut.zg-chart--loading{display:block}
643
+ .zg-chart__sk{display:block;max-width:100%}
644
+ .zg-chart--donut .zg-chart__sk{margin-inline:auto}
645
+ .zg-chart__skg{stroke:var(--zg-s2);stroke-width:1;vector-effect:non-scaling-stroke}
646
+ .zg-chart__skp{stroke:var(--zg-s3);stroke-linecap:round;animation:zg-chart-pulse 1.4s ease-in-out infinite}
647
+ .zg-chart__skbars{display:flex;align-items:flex-end;gap:8px}
648
+ .zg-chart__skbars .zg-skel{flex:1;border-radius:6px 6px 2px 2px}
649
+ @keyframes zg-chart-pulse{50%{opacity:.45}}
650
+ @media (prefers-reduced-motion:reduce){.zg-chart__skp{animation:none}}
573
651
 
574
652
 
575
653
  /* ./sizes/typography.css */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ziyarago/ui",
3
- "version": "0.15.3",
3
+ "version": "0.17.0",
4
4
  "description": "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).",
5
5
  "keywords": [
6
6
  "ui",
package/src/core/bools.js CHANGED
@@ -1,4 +1,4 @@
1
1
  // Names of props that are boolean in EVERY component that documents them. The Vue adapter turns the bare-attribute form (<UiButton block>, which Vue delivers as '') into true for these.
2
2
  // Names that are boolean somewhere and text elsewhere (modelValue, image, brand) are not listed: '' is a legitimate value there.
3
3
  // scripts/check-meta.mjs keeps this list in sync with src/meta.
4
- export const BOOL_PROPS = new Set(['addable', 'allowEmpty', 'autoResize', 'autofocus', 'banner', 'block', 'bold', 'checked', 'clearable', 'closable', 'closeOnBackdrop', 'closeOnEsc', 'collapsed', 'collapsible', 'disabled', 'divider', 'dot', 'external', 'featured', 'frame', 'ghost', 'glass', 'hideArrows', 'hideIcon', 'highlightLast', 'iconOnly', 'indeterminate', 'interactive', 'labelLeft', 'last', 'loading', 'multi', 'multiple', 'open', 'pill', 'plain', 'readonly', 'required', 'resize', 'ring', 'sanitize', 'selectGroups', 'showCount', 'showForgot', 'showRemember', 'showValue', 'spellcheck', 'ticks', 'truncate', 'vertical', 'vip', 'wrap']);
4
+ export const BOOL_PROPS = new Set(['addable', 'allowEmpty', 'autoResize', 'autofocus', 'banner', 'block', 'bold', 'checked', 'clearable', 'closable', 'closeOnBackdrop', 'closeOnEsc', 'collapsed', 'collapsible', 'disabled', 'divider', 'dot', 'external', 'featured', 'frame', 'ghost', 'glass', 'hideArrows', 'hideIcon', 'highlightLast', 'iconOnly', 'indeterminate', 'interactive', 'labelLeft', 'last', 'legend', 'loading', 'multi', 'multiple', 'open', 'pill', 'plain', 'readonly', 'required', 'resize', 'ring', 'sanitize', 'selectGroups', 'showCount', 'showForgot', 'showPoints', 'showRemember', 'showValue', 'spellcheck', 'stacked', 'ticks', 'truncate', 'vertical', 'vip', 'wrap']);