@alfadocs/ui-kit 0.93.0 → 0.94.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-Cfv4Sr63.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-_LDZhY4r.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-_LDZhY4r.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-CFM92QqU.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-Cfv4Sr63.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-DDnDGVpN.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-fAQXLIMW.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-o6JH4O66.js.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "packageVersion": "0.93.0",
3
+ "packageVersion": "0.94.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,26 @@ 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 muted hue (never colour alone):
14
+ * - line / area: DASHED stroke in a resolved neutral grey (the chart echo
15
+ * of the calendar compare band's dashed block-end rule).
16
+ * - bar: HATCHED (slantedLines) grey fill — bars have a zero-width stroke
17
+ * and cannot dash, so the non-colour cue lives in the fill texture.
18
+ * Only meaningful on axis types (line / area / bar); it is structurally
19
+ * impossible on pie / donut / radialBar (their `series` is `number[]`, which
20
+ * cannot carry this field), so the axis-only invariant is enforced by the
21
+ * type system with no runtime guard. On an axis→slice type switch the compare
22
+ * series are dropped from the slice (a previous-period total is not a slice of
23
+ * the current whole; DEV warn). Omit (or `'primary'`) to render normally — a
24
+ * chart with NO compare series emits byte-identical ApexCharts options to
25
+ * before this field existed.
26
+ * @default 'primary'
27
+ */
28
+ role?: 'primary' | 'compare';
9
29
  }
10
30
  /** Bar orientation. `'horizontal'` renders a ranking sideways. Default `'vertical'`. */
11
31
  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-DqxVCm1I.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-_LDZhY4r.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
@@ -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-Cfv4Sr63.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-CFM92QqU.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-DDnDGVpN.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-o6JH4O66.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-Cfv4Sr63.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-_LDZhY4r.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-o6JH4O66.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-DDnDGVpN.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-DqxVCm1I.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-CFM92QqU.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,38 @@
1
1
  import type ApexCharts from 'apexcharts';
2
- export declare function getApexChartsTheme(): ApexCharts.ApexOptions;
2
+ /**
3
+ * Resolved colours for a `ChartSeries` `role: 'compare'` overlay (see
4
+ * `src/components/chart/chart.tsx`). ApexCharts cannot read `var(--…)` or a
5
+ * `color-mix()` string, so both are resolved to a usable colour value here —
6
+ * the same native way the ramp resolves `--primary` — and re-read on the
7
+ * chart's existing theme MutationObserver, so they retint per theme with no
8
+ * new observer and no hex literal in component code.
9
+ */
10
+ export interface ApexCompareColors {
11
+ /**
12
+ * Load-bearing solid neutral grey — the compare line stroke, the compare bar
13
+ * fill base, the area gradient source, and the greyed legend swatch. Sourced
14
+ * from `--muted-foreground` (a plain `var(--color-blue-*)` chain), which
15
+ * `getPropertyValue` already returns as a usable colour. Solid so it clears
16
+ * WCAG 1.4.11 3:1 as a graphical object — which the 55% `--calendar-compare-edge`
17
+ * mix does not.
18
+ */
19
+ mark: string;
20
+ /**
21
+ * Decorative faint grey wash for the compare area gradient tint only.
22
+ * Sourced from `--calendar-compare-fill`, which is a `color-mix()` string
23
+ * that `getPropertyValue` returns UNRESOLVED, so it is resolved via a
24
+ * detached probe (see `resolveColour`).
25
+ */
26
+ wash: string;
27
+ }
28
+ /** The theme-bridge output, plus resolved compare-overlay colours. */
29
+ export interface ApexChartsTheme extends ApexCharts.ApexOptions {
30
+ /**
31
+ * Resolved compare-overlay colours. Read ONLY inside the chart's
32
+ * `hasCompare` branches and never spread into the ApexCharts options object,
33
+ * so a chart with no compare series emits byte-identical options.
34
+ */
35
+ compare?: ApexCompareColors;
36
+ }
37
+ export declare function getApexChartsTheme(): ApexChartsTheme;
3
38
  //# sourceMappingURL=apexcharts-theme.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfadocs/ui-kit",
3
- "version": "0.93.0",
3
+ "version": "0.94.0",
4
4
  "type": "module",
5
5
  "description": "AlfaDocs shared design system — tokens, components, patterns, and translations for platform, booking, and alfascribe.",
6
6
  "license": "BUSL-1.1",
@@ -1,53 +0,0 @@
1
- import { useEffect as a } from "react";
2
- const i = [
3
- "a[href]",
4
- "button",
5
- "input",
6
- "select",
7
- "textarea",
8
- '[tabindex]:not([tabindex="-1"])'
9
- ].join(",");
10
- function c(t) {
11
- a(() => {
12
- const e = t.current;
13
- if (!e) return;
14
- const o = () => {
15
- e.querySelectorAll('[aria-hidden="true"]').forEach((n) => {
16
- n.querySelectorAll(i).forEach((s) => {
17
- s.setAttribute("tabindex", "-1");
18
- });
19
- });
20
- };
21
- o();
22
- const r = new MutationObserver(o);
23
- return r.observe(e, {
24
- childList: !0,
25
- subtree: !0,
26
- attributes: !0,
27
- attributeFilter: ["aria-hidden", "tabindex"]
28
- }), () => r.disconnect();
29
- }, [t]);
30
- }
31
- function d() {
32
- const t = getComputedStyle(document.documentElement), e = (r) => t.getPropertyValue(r).trim();
33
- return {
34
- theme: { mode: document.documentElement.classList.contains("theme-dark") ? "dark" : "light" },
35
- colors: [
36
- e("--primary"),
37
- e("--accent"),
38
- e("--success"),
39
- e("--warning")
40
- ],
41
- chart: {
42
- background: e("--background"),
43
- foreColor: e("--foreground"),
44
- fontFamily: e("--font-sans")
45
- },
46
- grid: { borderColor: e("--border") }
47
- };
48
- }
49
- export {
50
- d as g,
51
- c as u
52
- };
53
- //# sourceMappingURL=apexcharts-theme-BJigns_V.js.map