@alfadocs/ui-kit 0.93.0 → 0.95.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,7 +1,7 @@
1
1
  import { jsx as u, jsxs as k } from "react/jsx-runtime";
2
2
  import { useState as w, useEffect as R, useMemo as z } from "react";
3
3
  import { useGridFilter as q } from "ag-grid-react";
4
- import { D as H } from "./date-range-picker-Cc4DLAL2.js";
4
+ import { D as H } from "./date-range-picker-pEG3Ln3i.js";
5
5
  import { useTranslation as O } from "react-i18next";
6
6
  import { C as Z } from "./checkbox-BuZ1u__2.js";
7
7
  import { B as D } from "./button-CPGiR_bH.js";
@@ -725,4 +725,4 @@ export {
725
725
  Oe as f,
726
726
  Pe as g
727
727
  };
728
- //# sourceMappingURL=link-cell-renderer-DQjZeoAr.js.map
728
+ //# sourceMappingURL=link-cell-renderer-flfZh2qY.js.map
@@ -4,7 +4,7 @@ import { useTranslation as $ } from "react-i18next";
4
4
  import { a as p, T as b, A as be, d as ne, D as P, e as ge } from "./actions-cell-renderer-DaL80uqL.js";
5
5
  import { S as Ce } from "./select-BW5ecXlX.js";
6
6
  import { u as ve } from "./registry-DvAUVLHh.js";
7
- import { I as Ne, L as we, b as L, a as _, c as U, N as H, d as F, S as R, T as ie, D as K, C as Te, g as Fe, f as Re, U as Ie, e as ye } from "./link-cell-renderer-DQjZeoAr.js";
7
+ import { I as Ne, L as we, b as L, a as _, c as U, N as H, d as F, S as R, T as ie, D as K, C as Te, g as Fe, f as Re, U as Ie, e as ye } from "./link-cell-renderer-flfZh2qY.js";
8
8
  import { B as ae } from "./badge-DCOqV9mI.js";
9
9
  import { c as Pe } from "./index-D2ZczOXr.js";
10
10
  import { T as We } from "./timestamp-BV2lC-wV.js";
@@ -1097,4 +1097,4 @@ export {
1097
1097
  q as g,
1098
1098
  tt as u
1099
1099
  };
1100
- //# sourceMappingURL=patient-table-DU_zFZoq.js.map
1100
+ //# sourceMappingURL=patient-table-CvZTIM2R.js.map
@@ -9,7 +9,7 @@ import { F as V } from "./form-field-M5UpX65Z.js";
9
9
  import { T as oe } from "./text-area-Bt3p7Pt0.js";
10
10
  import { F as de } from "./file-upload-CwxdqkMK.js";
11
11
  import { D as te } from "./date-picker-BP_W6VtE.js";
12
- import { D as le } from "./date-range-picker-Cc4DLAL2.js";
12
+ import { D as le } from "./date-range-picker-pEG3Ln3i.js";
13
13
  import { E } from "./empty-state-CrLsi0XI.js";
14
14
  import { P as ne } from "./panel-header-D313n_9-.js";
15
15
  import { c as $ } from "./createLucideIcon-DhHxpK9K.js";
@@ -533,4 +533,4 @@ export {
533
533
  qe as R,
534
534
  Ae as r
535
535
  };
536
- //# sourceMappingURL=radiograph-panel.agent-rnrQZtK3.js.map
536
+ //# sourceMappingURL=radiograph-panel.agent-AsXJBr1p.js.map
@@ -4,7 +4,7 @@ import { c as Z } from "./index-D2ZczOXr.js";
4
4
  import { useTranslation as $ } from "react-i18next";
5
5
  import q from "react-apexcharts";
6
6
  import R from "apexcharts";
7
- import { g as U, u as J } from "./apexcharts-theme-BJigns_V.js";
7
+ import { g as U, u as J } from "./apexcharts-theme-B_AxGC_h.js";
8
8
  import { u as Q } from "./registry-DvAUVLHh.js";
9
9
  function X(n) {
10
10
  if (n.length < 2)
@@ -280,4 +280,4 @@ export {
280
280
  Y as s,
281
281
  X as u
282
282
  };
283
- //# sourceMappingURL=sparkline-iOXYgvJe.js.map
283
+ //# sourceMappingURL=sparkline-DcXqRZoq.js.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "packageVersion": "0.93.0",
3
+ "packageVersion": "0.95.0",
4
4
  "components": [
5
5
  {
6
6
  "kind": "component",
@@ -1835,6 +1835,14 @@
1835
1835
  "items": {
1836
1836
  "type": "number"
1837
1837
  }
1838
+ },
1839
+ "role": {
1840
+ "type": "string",
1841
+ "enum": [
1842
+ "primary",
1843
+ "compare"
1844
+ ],
1845
+ "description": "Optional. 'compare' renders this series as a secondary, colour-blind-safe overlay (e.g. the previous period) — dashed grey for line/area, hatched grey for bar. Omit for a normal primary series."
1838
1846
  }
1839
1847
  },
1840
1848
  "required": [
@@ -6,6 +6,33 @@ export type ChartType = 'line' | 'bar' | 'pie' | 'donut' | 'area' | 'radialBar';
6
6
  export interface ChartSeries {
7
7
  name: string;
8
8
  data: number[];
9
+ /**
10
+ * Marks this series as a secondary "compare" overlay — e.g. the previous
11
+ * period in a current-vs-previous financial view. Rendered visually
12
+ * subordinate and colour-blind-safe, distinguished from primary series by
13
+ * BOTH a non-colour cue AND a lighter shade of the SAME hue (never colour
14
+ * alone). The compare series inherits its PAIRED primary's colour (k-th
15
+ * compare pairs with the k-th primary, by order), then:
16
+ * - line / area: a round-DOTTED stroke in the paired-primary colour (the
17
+ * dotted-vs-solid pattern is the non-colour cue); area also gets a tinted
18
+ * fill at `--chart-compare-fill-opacity`.
19
+ * - bar: a tinted fill (paired-primary hue at `--chart-compare-fill-opacity`)
20
+ * under a full-strength DOTTED outline that is OPEN at the baseline — so a
21
+ * compare bar reads as an outlined "ghost" of its solid primary.
22
+ * The legend swatch shows the lighter tint (via `legend.markers.fillColors`),
23
+ * and the series name (e.g. "Revenue (previous period)") remains the primary
24
+ * signal in the legend and the screen-reader table.
25
+ * Only meaningful on axis types (line / area / bar); it is structurally
26
+ * impossible on pie / donut / radialBar (their `series` is `number[]`, which
27
+ * cannot carry this field), so the axis-only invariant is enforced by the
28
+ * type system with no runtime guard. On an axis→slice type switch the compare
29
+ * series are dropped from the slice (a previous-period total is not a slice of
30
+ * the current whole; DEV warn). Omit (or `'primary'`) to render normally — a
31
+ * chart with NO compare series emits byte-identical ApexCharts options to
32
+ * before this field existed.
33
+ * @default 'primary'
34
+ */
35
+ role?: 'primary' | 'compare';
9
36
  }
10
37
  /** Bar orientation. `'horizontal'` renders a ranking sideways. Default `'vertical'`. */
11
38
  export type ChartOrientation = 'vertical' | 'horizontal';
@@ -1,4 +1,4 @@
1
- import { C as t, c as s, a as c } from "../../_chunks/chart-CNaLgvx4.js";
1
+ import { C as t, c as s, a as c } from "../../_chunks/chart-DR68TJD5.js";
2
2
  export {
3
3
  t as Chart,
4
4
  s as chartAgent,
@@ -1,6 +1,6 @@
1
1
  import { A as r, D as l, T as t, a as s, b as n, c as o, d, e as i, f as C } from "../../_chunks/actions-cell-renderer-DaL80uqL.js";
2
2
  import { B as T, C as F, E as g, a as b, R as u, T as c, b as m, r as f, u as x } from "../../_chunks/editable-currency-cell-renderer-Dus_sBvX.js";
3
- import { C as p, D as h, a as y, b as E, I as S, L as A, N as L, c as N, S as B, d as I, e as P, T as U, f as W, g as k, U as v } from "../../_chunks/link-cell-renderer-DQjZeoAr.js";
3
+ import { C as p, D as h, a as y, b as E, I as S, L as A, N as L, c as N, S as B, d as I, e as P, T as U, f as W, g as k, U as v } from "../../_chunks/link-cell-renderer-flfZh2qY.js";
4
4
  export {
5
5
  r as ActionsCellRenderer,
6
6
  T as BalanceCellRenderer,
@@ -98,6 +98,18 @@ export interface DateRangePickerProps extends Pick<VariantProps<typeof triggerVa
98
98
  granularity?: DateRangeGranularity;
99
99
  defaultGranularity?: DateRangeGranularity;
100
100
  onGranularityChange?: (granularity: DateRangeGranularity) => void;
101
+ /**
102
+ * Restrict the granularity segmented control to a subset of
103
+ * `'day' | 'week' | 'month' | 'quarter'` — e.g. `['month', 'quarter']` for
104
+ * data with a coarser grain. Options always render in canonical
105
+ * Day → Quarter order regardless of the array order passed. Defaults to all
106
+ * four (an empty array is treated as all four). Only meaningful when the
107
+ * Cockpit granularity control is enabled (via `granularity` /
108
+ * `defaultGranularity`) — it does not enable the control on its own. A
109
+ * `defaultGranularity` or controlled `granularity` outside the allowed set is
110
+ * clamped to the first allowed option.
111
+ */
112
+ allowedGranularities?: DateRangeGranularity[];
101
113
  /**
102
114
  * Range Cockpit — compare. When `true`, a compare-to-previous-period toggle
103
115
  * appears; enabling it overlays a neutral secondary band on the calendar and
@@ -105,7 +117,16 @@ export interface DateRangePickerProps extends Pick<VariantProps<typeof triggerVa
105
117
  * `onCompareChange`.
106
118
  */
107
119
  compare?: boolean;
108
- /** Start with compare enabled (only meaningful when `compare` is set). */
120
+ /**
121
+ * Controlled checked state of the compare toggle — the APPLIED compare
122
+ * on/off value. Pair with `onCompareChange` and drive it from the consumer
123
+ * so a reopened picker reflects the applied state. When omitted the toggle
124
+ * is uncontrolled and seeded from `defaultCompare`. This is distinct from
125
+ * `compare`, which only decides whether the control renders. Only
126
+ * meaningful when `compare` is set.
127
+ */
128
+ compareEnabled?: boolean;
129
+ /** Start with compare enabled — uncontrolled initial checked state (only meaningful when `compare` is set). */
109
130
  defaultCompare?: boolean;
110
131
  defaultCompareMode?: DateRangeCompareMode;
111
132
  onCompareChange?: (enabled: boolean, compareRange?: DateRangeValue) => void;
@@ -1,4 +1,4 @@
1
- import { D as r, d as t } from "../../_chunks/date-range-picker-Cc4DLAL2.js";
1
+ import { D as r, d as t } from "../../_chunks/date-range-picker-pEG3Ln3i.js";
2
2
  export {
3
3
  r as DateRangePicker,
4
4
  t as dateRangePickerAgent
@@ -1,4 +1,4 @@
1
- import { B as s, C as l, N as t, P as n, a as C, b as i, g as o, u } from "../../_chunks/patient-table-DU_zFZoq.js";
1
+ import { B as s, C as l, N as t, P as n, a as C, b as i, g as o, u } from "../../_chunks/patient-table-CvZTIM2R.js";
2
2
  export {
3
3
  s as BalanceBadgeCell,
4
4
  l as CarePlanStatusCell,
@@ -1,4 +1,4 @@
1
- import { R as o, I as e, r as n } from "../../_chunks/radiograph-panel.agent-rnrQZtK3.js";
1
+ import { R as o, I as e, r as n } from "../../_chunks/radiograph-panel.agent-AsXJBr1p.js";
2
2
  export {
3
3
  o as RadiographPanel,
4
4
  e as RadiographPanelIcon,
@@ -1,4 +1,4 @@
1
- import { S as r, s, u as n } from "../../_chunks/sparkline-iOXYgvJe.js";
1
+ import { S as r, s, u as n } from "../../_chunks/sparkline-DcXqRZoq.js";
2
2
  export {
3
3
  r as Sparkline,
4
4
  s as sparklineAgent,
package/dist/index.js CHANGED
@@ -25,7 +25,7 @@ import { A as Oe, B as ke, C as Be } from "./_chunks/color-picker-D-tUwxxT.js";
25
25
  import { C as He, c as Ge, a as Ve, b as Ue, d as We, e as ze } from "./_chunks/combobox-DiMLItyu.js";
26
26
  import { C as Ye, c as je } from "./_chunks/copy-field-DBc9QquW.js";
27
27
  import { D as qe, d as Qe } from "./_chunks/date-picker-BP_W6VtE.js";
28
- import { D as Je, d as Ze } from "./_chunks/date-range-picker-Cc4DLAL2.js";
28
+ import { D as Je, d as Ze } from "./_chunks/date-range-picker-pEG3Ln3i.js";
29
29
  import { D as es, d as ss } from "./_chunks/date-time-picker-695QvBGj.js";
30
30
  import { P as ts } from "./_chunks/pregnancy-dating-BdFl-rB1.js";
31
31
  import { D as is } from "./_chunks/due-date-calculator-BEcdoy_E.js";
@@ -77,7 +77,7 @@ import { C as so } from "./_chunks/contact-card-0hnFJwrz.js";
77
77
  import { C as to } from "./_chunks/counter-dRlTNC_y.js";
78
78
  import { A as io, D as no, T as lo, a as mo, b as po, c as co, d as fo, e as go, f as Ao } from "./_chunks/actions-cell-renderer-DaL80uqL.js";
79
79
  import { B as xo, C as Co, E as So, a as To, R as Io, T as Po, b as ho, r as No, u as bo } from "./_chunks/editable-currency-cell-renderer-Dus_sBvX.js";
80
- import { C as Ro, D as _o, a as yo, b as vo, I as Do, L as Fo, N as Mo, c as Lo, S as Oo, d as ko, e as Bo, T as wo, f as Ho, g as Go, U as Vo } from "./_chunks/link-cell-renderer-DQjZeoAr.js";
80
+ import { C as Ro, D as _o, a as yo, b as vo, I as Do, L as Fo, N as Mo, c as Lo, S as Oo, d as ko, e as Bo, T as wo, f as Ho, g as Go, U as Vo } from "./_chunks/link-cell-renderer-flfZh2qY.js";
81
81
  import { D as Wo, d as zo, a as Ko, b as Yo } from "./_chunks/data-table-tabs-BEUXiRlu.js";
82
82
  import { C as Xo, c as qo } from "./_chunks/clinical-note-card-C7F_24IC.js";
83
83
  import { D as $o } from "./_chunks/description-list-ClNLdRMy.js";
@@ -93,7 +93,7 @@ import { M as Ci } from "./_chunks/map-view-CsaHfoo6.js";
93
93
  import { R as Ti } from "./_chunks/rating-BYbUowdK.js";
94
94
  import { S as Pi } from "./_chunks/skeleton-CZbwyJAA.js";
95
95
  import { S as Ni } from "./_chunks/smart-date-CsPlilQA.js";
96
- import { S as Ei, s as Ri, u as _i } from "./_chunks/sparkline-iOXYgvJe.js";
96
+ import { S as Ei, s as Ri, u as _i } from "./_chunks/sparkline-DcXqRZoq.js";
97
97
  import { S as H } from "./_chunks/stat-Bs80Z6Yv.js";
98
98
  import { T as vi } from "./_chunks/tag-3wgkwwDB.js";
99
99
  import { T as Fi, t as Mi } from "./_chunks/timeline-r-8IUoBS.js";
@@ -140,7 +140,7 @@ import { n as zd } from "./_chunks/notification-card.agent-DxGBZb8T.js";
140
140
  import { N as Yd, n as jd } from "./_chunks/notification-tray-CzIzz3bX.js";
141
141
  import { N as qd } from "./_chunks/notes-panel-BLjlYBt-.js";
142
142
  import { P as $d, p as Jd } from "./_chunks/popover-Cc0a69sw.js";
143
- import { R as am, I as em, r as sm } from "./_chunks/radiograph-panel.agent-rnrQZtK3.js";
143
+ import { R as am, I as em, r as sm } from "./_chunks/radiograph-panel.agent-AsXJBr1p.js";
144
144
  import { P as tm, R as om, T as im, a as nm, r as lm } from "./_chunks/pregnancy-weight-gain-B-CkVYnU.js";
145
145
  import { P as mm, p as pm } from "./_chunks/privacy-lock-YYBiI_bY.js";
146
146
  import { P as fm, a as gm, p as Am, b as um } from "./_chunks/product-hub-panel-CTld1r5V.js";
@@ -164,7 +164,7 @@ import { S as hp } from "./_chunks/separator-CYU_bGFn.js";
164
164
  import { T as bp } from "./_chunks/theme-root-BOO73p5t.js";
165
165
  import { C as Rp, U as _p, a as yp, b as vp, c as Dp } from "./_chunks/unit-converter-CSLWFDQh.js";
166
166
  import { V as Mp } from "./_chunks/visually-hidden-BHxEUGyT.js";
167
- import { C as Op, c as kp, a as Bp } from "./_chunks/chart-CNaLgvx4.js";
167
+ import { C as Op, c as kp, a as Bp } from "./_chunks/chart-DR68TJD5.js";
168
168
  import { A as Hp, a as Gp } from "./_chunks/ai-prompt-input-DziJCGLe.js";
169
169
  import { A as Up, a as Wp } from "./_chunks/audio-recorder-BjnB7V8n.js";
170
170
  import { A as Kp } from "./_chunks/audio-visualiser-l6zPd0AG.js";
@@ -191,7 +191,7 @@ import { O as wf, o as Hf } from "./_chunks/operator-hero-DVy0RGoD.js";
191
191
  import { P as Vf, p as Uf } from "./_chunks/patient-details-DrhlTrLf.js";
192
192
  import { P as zf, p as Kf } from "./_chunks/patient-search-vtRTSdf6.js";
193
193
  import { P as jf, p as Xf } from "./_chunks/patient-summary-card-vn1H4xWj.js";
194
- import { B as Qf, C as $f, N as Jf, P as Zf, a as ag, b as eg, g as sg, u as rg } from "./_chunks/patient-table-DU_zFZoq.js";
194
+ import { B as Qf, C as $f, N as Jf, P as Zf, a as ag, b as eg, g as sg, u as rg } from "./_chunks/patient-table-CvZTIM2R.js";
195
195
  import { B as og, M as ig, P as ng, a as lg, b as dg, c as mg, d as pg, S as cg, e as fg, f as gg, g as Ag, h as ug, p as xg, i as Cg, j as Sg, k as Tg, s as Ig, t as Pg, l as hg } from "./_chunks/periodontal-chart-CYBhr9vc.js";
196
196
  import { P as bg, a as Eg, p as Rg } from "./_chunks/periodontal-chart-card-WVjJAheq.js";
197
197
  import { D as yg, P as vg, a as Dg, b as Fg, c as Mg, S as Lg, e as Og, i as kg, p as Bg } from "./_chunks/periodontal-diagnosis-cco40xTa.js";
@@ -1,3 +1,24 @@
1
1
  import type ApexCharts from 'apexcharts';
2
- export declare function getApexChartsTheme(): ApexCharts.ApexOptions;
2
+ /** The theme-bridge output. */
3
+ export type ApexChartsTheme = ApexCharts.ApexOptions;
4
+ /**
5
+ * Compare fill opacity from the `--chart-compare-fill-opacity` token. Drives
6
+ * the per-series `fill.opacity` of a compare bar / area overlay (see
7
+ * `ChartSeries.role` in `src/components/chart/chart.tsx`). Theme-invariant —
8
+ * the token value itself does not shift between themes; the resulting COLOUR
9
+ * retints because it is mixed from the theme-shifting primary and background
10
+ * (see `resolveCompareTint`). Falls back to 0.18 outside a browser.
11
+ */
12
+ export declare function getCompareFillOpacity(): number;
13
+ /**
14
+ * Resolve a compare TINT: the paired primary mixed OVER the surface at the
15
+ * compare opacity, so it is an opaque lighter shade of the same hue — used for
16
+ * the legend swatch (and anywhere the tint is needed as a solid colour).
17
+ * `primary` is an already-resolved colour (the k-th primary's colour). Uses the
18
+ * same detached probe the bridge uses for `color-mix`, so it retints per theme
19
+ * with no new observer and no hex literal in component code. Returns `primary`
20
+ * untouched outside a browser.
21
+ */
22
+ export declare function resolveCompareTint(primary: string): string;
23
+ export declare function getApexChartsTheme(): ApexChartsTheme;
3
24
  //# sourceMappingURL=apexcharts-theme.d.ts.map