@alfadocs/ui-kit 0.69.0 → 0.70.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/dist/_chunks/{agenda-card-BxSFkqgY.js → agenda-card-BQ-IKAru.js} +2 -2
- package/dist/_chunks/{agenda-tray-g0kg7HwB.js → agenda-tray-CGXRk58j.js} +2 -2
- package/dist/_chunks/{ai-consent-banner-CXlsNX1c.js → ai-consent-banner-Be-h9mRI.js} +3 -3
- package/dist/_chunks/ai-tools-rail-B5NEghsp.js +511 -0
- package/dist/_chunks/{alert-_mUKLmwA.js → alert-CHYZ96tR.js} +150 -96
- package/dist/_chunks/{anamnesis-card-DRmE24OQ.js → anamnesis-card-DvYCa16e.js} +2 -2
- package/dist/_chunks/anatomy-scheme-CJB6dI6p.js +2445 -0
- package/dist/_chunks/annotation-marker-qt5R9WZX.js +120 -0
- package/dist/_chunks/{antenatal-schedule-timeline-35ebkcZT.js → antenatal-schedule-timeline-CwXrQRm1.js} +2 -2
- package/dist/_chunks/appointment-card-C06aZqA7.js +310 -0
- package/dist/_chunks/appointment-timeline-BJM0S_Fg.js +386 -0
- package/dist/_chunks/appointment-tray-DRRw5ROi.js +193 -0
- package/dist/_chunks/{audio-recorder-DYXXnGug.js → audio-recorder-Cpdk5qpQ.js} +2 -2
- package/dist/_chunks/{badge-CqGsX32l.js → badge-DCOqV9mI.js} +32 -27
- package/dist/_chunks/{bishop-score-PJI3AXzA.js → bishop-score-DnYWtZa_.js} +2 -2
- package/dist/_chunks/{bmi-calculator-BZtIJ53x.js → bmi-calculator-zjeY4E7J.js} +2 -2
- package/dist/_chunks/{booking-C3VqFReX.js → booking-DUBI0oqt.js} +4 -4
- package/dist/_chunks/{care-plan-card-CvFGXa2z.js → care-plan-card-C5sTfY9G.js} +5 -5
- package/dist/_chunks/{care-plan-entry-card-C3E_gClk.js → care-plan-entry-card-CXnxGCWA.js} +5 -5
- package/dist/_chunks/care-plan-header-BUwqDTtz.js +206 -0
- package/dist/_chunks/clinical-note-card-BUvNMNGL.js +436 -0
- package/dist/_chunks/{contact-profile-card-Dramqa9C.js → contact-profile-card-DDPwRFiP.js} +2 -2
- package/dist/_chunks/control-room-rail-Y8ryLYsP.js +229 -0
- package/dist/_chunks/{cycle-calculator-DmRGJNaT.js → cycle-calculator-CCmPwcBl.js} +2 -2
- package/dist/_chunks/{dependent-selector-CG_FOHya.js → dependent-selector-DUV4thxX.js} +2 -2
- package/dist/_chunks/{document-scanner-CTubA0-N.js → document-scanner-C_AxLooF.js} +3 -3
- package/dist/_chunks/{due-date-calculator-BTmsIQqD.js → due-date-calculator-Brdj-euS.js} +3 -3
- package/dist/_chunks/editable-currency-cell-renderer-C9twtALM.js +328 -0
- package/dist/_chunks/email-input-DJ7EXklP.js +397 -0
- package/dist/_chunks/{entity-card-COhmqHly.js → entity-card-9_62gY7l.js} +38 -20
- package/dist/_chunks/entity-summary-BxRjFh_4.js +138 -0
- package/dist/_chunks/{fetal-weight-CRz7KE2D.js → fetal-weight-DNCkyeVo.js} +2 -2
- package/dist/_chunks/field-value-NXYczdpO.js +415 -0
- package/dist/_chunks/{file-upload-5ScQd4fE.js → file-upload-DwZcAK8D.js} +2 -1
- package/dist/_chunks/{freemium-paywall-DZ2mBS3w.js → freemium-paywall-WYlNO7yT.js} +2 -2
- package/dist/_chunks/{gestational-age-calculator-BleUdhbI.js → gestational-age-calculator-CF2ISaYQ.js} +3 -3
- package/dist/_chunks/hash-CysBBS_N.js +17 -0
- package/dist/_chunks/{hcg-doubling-CnjDXX6U.js → hcg-doubling-C7bmuaU3.js} +2 -2
- package/dist/_chunks/{actions-cell-renderer-DrcaxB0w.js → link-cell-renderer-CTXqtXV-.js} +715 -592
- package/dist/_chunks/lock-CKOIn0IK.js +15 -0
- package/dist/_chunks/{marketplace-app-shell-6T9W4Knl.js → marketplace-app-shell-Skhfp6vK.js} +3 -3
- package/dist/_chunks/notes-panel-ay8_lPrA.js +158 -0
- package/dist/_chunks/{notification-card-BiESdm8q.js → notification-card-D2jiKSJJ.js} +27 -23
- package/dist/_chunks/{notification-tray-Btb9oQeZ.js → notification-tray-AEun6DN2.js} +2 -2
- package/dist/_chunks/{operator-hero-CP2Nhupm.js → operator-hero-CR0Rqh4-.js} +3 -3
- package/dist/_chunks/patient-details-Dlhqb5ig.js +675 -0
- package/dist/_chunks/{patient-search-CBC_ySF6.js → patient-search-Be6cLrHR.js} +2 -2
- package/dist/_chunks/patient-summary-card-WySCMwwA.js +437 -0
- package/dist/_chunks/patient-table-CHxf3Oqk.js +1110 -0
- package/dist/_chunks/{payment-form-DvjwYVIT.js → payment-form-CxqIXqw7.js} +2 -2
- package/dist/_chunks/{payment-request-card-DioWKBUq.js → payment-request-card-BcZJwu9z.js} +125 -136
- package/dist/_chunks/{pdf-viewer-D6BPfW2D.js → pdf-viewer-QfebdLOd.js} +192 -214
- package/dist/_chunks/{periodontal-chart-card-BuDEMbHE.js → periodontal-chart-card-hRRJY1NN.js} +2 -2
- package/dist/_chunks/{practice-results-KrTHqZua.js → practice-results-C6qDfxos.js} +3 -3
- package/dist/_chunks/{pregnancy-dating-DORUAOHB.js → pregnancy-dating-CRVWswD-.js} +3 -3
- package/dist/_chunks/{pregnancy-weight-gain-DVz4rr7-.js → pregnancy-weight-gain-BUNpTsH-.js} +2 -2
- package/dist/_chunks/radiograph-panel.agent-CAX-C3g3.js +558 -0
- package/dist/_chunks/{rich-text-editor-BsV7zUdg.js → rich-text-editor-DlCqPixb.js} +410 -394
- package/dist/_chunks/{sign-document-B4DeRhTe.js → sign-document-By6hMOra.js} +2 -2
- package/dist/_chunks/{stepper-accordion-Dki6r9ZE.js → stepper-accordion-DC-H-8v4.js} +38 -48
- package/dist/_chunks/tab-bar-Bv9nGNdO.js +262 -0
- package/dist/_chunks/tooth-scheme-BhQoPNBD.js +2131 -0
- package/dist/_chunks/{transaction-chip-DK84XCBU.js → transaction-chip-CscoQbxF.js} +88 -61
- package/dist/_chunks/use-clamp-overflow-DQE2kwZ9.js +20 -0
- package/dist/_chunks/use-overflow-collapse-BIOzKbni.js +32 -0
- package/dist/_chunks/use-persistent-state-nZwZAnE9.js +24 -0
- package/dist/_chunks/{warning-stack-BsgaEbL8.js → warning-stack--sTrrBDA.js} +86 -101
- package/dist/_chunks/{workflow-map-Bdam9pGp.js → workflow-map-Dy8mLCqF.js} +3 -3
- package/dist/_chunks/zoom-out-CgVtf2Wx.js +29 -0
- package/dist/agent/index.js +5 -4
- package/dist/agent/types.d.ts +19 -2
- package/dist/agent-catalog.json +1253 -86
- package/dist/agent-i18n/en.json +108 -6
- package/dist/components/_shared/entity-card/entity-card.d.ts +6 -0
- package/dist/components/_shared/entity-card/index.d.ts +1 -1
- package/dist/components/_shared/field-value.d.ts +21 -0
- package/dist/components/_shared/field-visibility-cog.d.ts +20 -0
- package/dist/components/_shared/field-visibility.d.ts +36 -0
- package/dist/components/_shared/patient-fields.d.ts +119 -0
- package/dist/components/agenda-card/index.js +1 -1
- package/dist/components/agenda-tray/index.js +1 -1
- package/dist/components/ai-consent-banner/index.js +1 -1
- package/dist/components/ai-tools-rail/ai-tools-rail.d.ts +75 -0
- package/dist/components/ai-tools-rail/index.js +1 -1
- package/dist/components/alert/alert.d.ts +5 -0
- package/dist/components/alert/index.js +1 -1
- package/dist/components/anamnesis-card/index.js +1 -1
- package/dist/components/anatomy-scheme/anatomy-face-paths.d.ts +15 -0
- package/dist/components/anatomy-scheme/anatomy-muscle-paths.d.ts +20 -0
- package/dist/components/anatomy-scheme/anatomy-scheme-data.d.ts +121 -0
- package/dist/components/anatomy-scheme/anatomy-scheme.agent.d.ts +6 -0
- package/dist/components/anatomy-scheme/anatomy-scheme.d.ts +69 -0
- package/dist/components/anatomy-scheme/index.d.ts +6 -0
- package/dist/components/anatomy-scheme/index.js +17 -0
- package/dist/components/annotation-marker/annotation-marker.d.ts +33 -0
- package/dist/components/annotation-marker/index.d.ts +3 -0
- package/dist/components/annotation-marker/index.js +7 -0
- package/dist/components/appointment-card/appointment-card.d.ts +25 -1
- package/dist/components/appointment-card/index.js +6 -5
- package/dist/components/appointment-timeline/appointment-timeline.agent.d.ts +4 -0
- package/dist/components/appointment-timeline/appointment-timeline.d.ts +66 -0
- package/dist/components/appointment-timeline/index.d.ts +4 -0
- package/dist/components/appointment-timeline/index.js +6 -0
- package/dist/components/audio-recorder/index.js +1 -1
- package/dist/components/badge/badge.d.ts +6 -2
- package/dist/components/badge/index.js +1 -1
- package/dist/components/bishop-score/index.js +1 -1
- package/dist/components/bmi-calculator/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/care-plan-card/index.js +1 -1
- package/dist/components/care-plan-entry-card/index.js +1 -1
- package/dist/components/care-plan-header/care-plan-header.agent.d.ts +4 -0
- package/dist/components/care-plan-header/care-plan-header.d.ts +100 -0
- package/dist/components/care-plan-header/index.d.ts +4 -0
- package/dist/components/care-plan-header/index.js +6 -0
- package/dist/components/clinical-note-card/clinical-note-card.d.ts +21 -1
- package/dist/components/clinical-note-card/index.js +1 -1
- package/dist/components/contact-profile-card/index.js +1 -1
- package/dist/components/control-room-rail/control-room-context.d.ts +53 -0
- package/dist/components/control-room-rail/control-room-rail.d.ts +35 -0
- package/dist/components/control-room-rail/index.d.ts +5 -0
- package/dist/components/control-room-rail/index.js +9 -0
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/data-table/cell-renderers/actions-cell-renderer.d.ts +18 -0
- package/dist/components/data-table/index.d.ts +1 -1
- package/dist/components/data-table/index.js +32 -31
- package/dist/components/dependent-selector/index.js +1 -1
- package/dist/components/document-scanner/index.js +1 -1
- package/dist/components/due-date-calculator/index.js +2 -2
- package/dist/components/email-input/index.js +1 -1
- package/dist/components/entity-summary/entity-summary.d.ts +43 -0
- package/dist/components/entity-summary/index.d.ts +3 -0
- package/dist/components/entity-summary/index.js +5 -0
- package/dist/components/fetal-weight/index.js +1 -1
- package/dist/components/file-upload/index.js +1 -1
- package/dist/components/freemium-paywall/index.js +1 -1
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/hcg-doubling/index.js +1 -1
- package/dist/components/index.d.ts +9 -0
- package/dist/components/notes-panel/index.d.ts +3 -0
- package/dist/components/notes-panel/index.js +5 -0
- package/dist/components/notes-panel/notes-panel.d.ts +64 -0
- package/dist/components/notification-card/index.js +1 -1
- package/dist/components/notification-tray/index.js +1 -1
- package/dist/components/operator-hero/index.js +1 -1
- package/dist/components/patient-details/index.d.ts +5 -0
- package/dist/components/patient-details/index.js +6 -0
- package/dist/components/patient-details/patient-details.agent.d.ts +4 -0
- package/dist/components/patient-details/patient-details.d.ts +96 -0
- package/dist/components/patient-search/index.js +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/patient-summary-card/patient-summary-card.d.ts +40 -1
- package/dist/components/patient-table/columns.d.ts +69 -40
- package/dist/components/patient-table/index.d.ts +2 -6
- package/dist/components/patient-table/index.js +8 -9
- package/dist/components/patient-table/patient-table.d.ts +38 -4
- package/dist/components/patient-table/types.d.ts +52 -2
- package/dist/components/patient-table/use-responsive-columns.d.ts +8 -6
- package/dist/components/payment-card/index.js +1 -1
- package/dist/components/payment-form/index.js +1 -1
- package/dist/components/pdf-viewer/index.js +1 -1
- package/dist/components/periodontal-chart-card/index.js +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/pregnancy-dating/index.js +1 -1
- package/dist/components/pregnancy-weight-gain/index.js +1 -1
- package/dist/components/radiograph-panel/index.d.ts +4 -0
- package/dist/components/radiograph-panel/index.js +7 -0
- package/dist/components/radiograph-panel/radiograph-panel.agent.d.ts +13 -0
- package/dist/components/radiograph-panel/radiograph-panel.d.ts +36 -0
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/sidebar/index.js +1 -1
- package/dist/components/sign-document/index.js +1 -1
- package/dist/components/stepper-accordion/index.js +1 -1
- package/dist/components/tab-bar/index.js +1 -1
- package/dist/components/tab-bar/tab-bar.d.ts +18 -1
- package/dist/components/tooth-scheme/index.d.ts +2 -2
- package/dist/components/tooth-scheme/index.js +30 -23
- package/dist/components/tooth-scheme/tooth-data.d.ts +112 -1
- package/dist/components/tooth-scheme/tooth-scheme.agent.d.ts +2 -2
- package/dist/components/tooth-scheme/tooth-scheme.d.ts +75 -11
- package/dist/components/transaction-chip/index.js +1 -1
- package/dist/components/transaction-chip/transaction-chip.d.ts +2 -2
- package/dist/components/warning-stack/index.js +1 -1
- package/dist/components/warning-stack/warning-stack.d.ts +10 -7
- package/dist/components/workflow/index.js +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.js +24 -22
- package/dist/hooks/use-clamp-overflow.d.ts +19 -0
- package/dist/hooks/use-overflow-collapse.d.ts +46 -0
- package/dist/hooks/use-persistent-state.d.ts +7 -1
- package/dist/hooks/use-scroll-overflow.d.ts +36 -0
- package/dist/i18n/locales/ar.d.ts +308 -24
- package/dist/i18n/locales/ar.js +322 -27
- package/dist/i18n/locales/de.d.ts +308 -24
- package/dist/i18n/locales/de.js +322 -27
- package/dist/i18n/locales/el.d.ts +308 -24
- package/dist/i18n/locales/el.js +322 -27
- package/dist/i18n/locales/en.d.ts +309 -32
- package/dist/i18n/locales/en.js +323 -35
- package/dist/i18n/locales/es.d.ts +308 -24
- package/dist/i18n/locales/es.js +322 -27
- package/dist/i18n/locales/fr.d.ts +308 -24
- package/dist/i18n/locales/fr.js +322 -27
- package/dist/i18n/locales/hi.d.ts +308 -24
- package/dist/i18n/locales/hi.js +322 -27
- package/dist/i18n/locales/it.d.ts +308 -24
- package/dist/i18n/locales/it.js +322 -27
- package/dist/i18n/locales/ja.d.ts +308 -24
- package/dist/i18n/locales/ja.js +322 -27
- package/dist/i18n/locales/nl.d.ts +308 -24
- package/dist/i18n/locales/nl.js +322 -27
- package/dist/i18n/locales/pl.d.ts +308 -24
- package/dist/i18n/locales/pl.js +322 -27
- package/dist/i18n/locales/pt.d.ts +308 -24
- package/dist/i18n/locales/pt.js +322 -27
- package/dist/i18n/locales/ro.d.ts +308 -24
- package/dist/i18n/locales/ro.js +322 -27
- package/dist/i18n/locales/ru.d.ts +308 -24
- package/dist/i18n/locales/ru.js +322 -27
- package/dist/i18n/locales/sq.d.ts +308 -24
- package/dist/i18n/locales/sq.js +322 -27
- package/dist/i18n/locales/sv.d.ts +308 -24
- package/dist/i18n/locales/sv.js +322 -27
- package/dist/i18n/locales/tr.d.ts +308 -24
- package/dist/i18n/locales/tr.js +322 -27
- package/dist/i18n/locales/zh.d.ts +308 -24
- package/dist/i18n/locales/zh.js +322 -27
- package/dist/index.js +672 -623
- package/dist/locales/ar.json +311 -27
- package/dist/locales/de.json +311 -27
- package/dist/locales/el.json +311 -27
- package/dist/locales/en.json +311 -27
- package/dist/locales/es.json +311 -27
- package/dist/locales/fr.json +311 -27
- package/dist/locales/hi.json +311 -27
- package/dist/locales/it.json +311 -27
- package/dist/locales/ja.json +311 -27
- package/dist/locales/nl.json +311 -27
- package/dist/locales/pl.json +311 -27
- package/dist/locales/pt.json +311 -27
- package/dist/locales/ro.json +311 -27
- package/dist/locales/ru.json +311 -27
- package/dist/locales/sq.json +311 -27
- package/dist/locales/sv.json +311 -27
- package/dist/locales/tr.json +311 -27
- package/dist/locales/zh.json +311 -27
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +37 -1
- package/dist/_chunks/ai-tools-rail-BA_sqy1A.js +0 -373
- package/dist/_chunks/appointment-tray-CZtvtaH-.js +0 -431
- package/dist/_chunks/clinical-note-card-DqQYf_D4.js +0 -333
- package/dist/_chunks/editable-currency-cell-renderer-kgqp_mIw.js +0 -448
- package/dist/_chunks/email-input-B_Y55f5G.js +0 -396
- package/dist/_chunks/patient-summary-card-B836_fDB.js +0 -435
- package/dist/_chunks/patient-table-CDuosVru.js +0 -889
- package/dist/_chunks/tab-bar-B1ovILzh.js +0 -105
- package/dist/_chunks/tooth-scheme-yBr53cvv.js +0 -1330
- package/dist/_chunks/use-persistent-state-i23OWy6G.js +0 -24
- package/dist/components/patient-table/cell-renderers/contact-cell.d.ts +0 -45
- package/dist/components/patient-table/cell-renderers/patient-identity-cell.d.ts +0 -26
|
@@ -1,448 +0,0 @@
|
|
|
1
|
-
import { useMemo as V, useState as F, useRef as k, useEffect as A } from "react";
|
|
2
|
-
import { jsx as d, jsxs as z } from "react/jsx-runtime";
|
|
3
|
-
import { B as $ } from "./badge-CqGsX32l.js";
|
|
4
|
-
import { A as H } from "./avatar-BNQNhoyL.js";
|
|
5
|
-
import { T as M } from "./tag-BQXwuJq1.js";
|
|
6
|
-
import { useTranslation as C } from "react-i18next";
|
|
7
|
-
import { S as q } from "./square-check-big-Jr-0202D.js";
|
|
8
|
-
import { S as G } from "./square-CZoGU14v.js";
|
|
9
|
-
import { u as X } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
|
|
10
|
-
import { c as D, a as P, b as L, d as B } from "./input-surface-xyERuLU_.js";
|
|
11
|
-
function be(n, e, t) {
|
|
12
|
-
return V(() => {
|
|
13
|
-
const o = {};
|
|
14
|
-
for (const r of e) {
|
|
15
|
-
let f = 0;
|
|
16
|
-
for (const i of n ?? []) {
|
|
17
|
-
const a = i[r], c = typeof a == "number" ? a : Number(a);
|
|
18
|
-
Number.isFinite(c) && (f += c);
|
|
19
|
-
}
|
|
20
|
-
o[r] = f;
|
|
21
|
-
}
|
|
22
|
-
return t != null && t.labelField && t.labelValue !== void 0 && (o[t.labelField] = t.labelValue), o;
|
|
23
|
-
}, [n, e, t == null ? void 0 : t.labelField, t == null ? void 0 : t.labelValue]);
|
|
24
|
-
}
|
|
25
|
-
function he(n) {
|
|
26
|
-
const { value: e, variantMap: t } = n, o = (t == null ? void 0 : t[e]) ?? "neutral";
|
|
27
|
-
return /* @__PURE__ */ d($, { variant: o, withDot: !0, size: "sm", children: String(e ?? "") });
|
|
28
|
-
}
|
|
29
|
-
const K = {
|
|
30
|
-
sm: "ds:size-8",
|
|
31
|
-
md: "ds:size-10",
|
|
32
|
-
lg: "ds:size-12"
|
|
33
|
-
}, O = {
|
|
34
|
-
square: "ds:rounded-none",
|
|
35
|
-
rounded: "ds:rounded-[var(--radius-md)]",
|
|
36
|
-
circle: "ds:rounded-[var(--radius-full)]"
|
|
37
|
-
};
|
|
38
|
-
function E(n, e) {
|
|
39
|
-
if (!n || typeof n != "object") return;
|
|
40
|
-
const t = n[e];
|
|
41
|
-
return typeof t == "string" ? t : void 0;
|
|
42
|
-
}
|
|
43
|
-
const Z = /^(?:https?:|data:image\/)/i;
|
|
44
|
-
function W(n) {
|
|
45
|
-
if (!n) return;
|
|
46
|
-
const e = n.trim();
|
|
47
|
-
if (e.length !== 0)
|
|
48
|
-
return Z.test(e) ? e : void 0;
|
|
49
|
-
}
|
|
50
|
-
function ye(n) {
|
|
51
|
-
const {
|
|
52
|
-
data: e,
|
|
53
|
-
srcField: t,
|
|
54
|
-
altField: o,
|
|
55
|
-
fallbackField: r,
|
|
56
|
-
size: f = "md",
|
|
57
|
-
shape: i = "rounded"
|
|
58
|
-
} = n;
|
|
59
|
-
if (!e) return null;
|
|
60
|
-
const a = E(e, t), c = W(a), s = o ? E(e, o) ?? "" : "", l = r ? E(e, r) : void 0;
|
|
61
|
-
return c ? /* @__PURE__ */ d(
|
|
62
|
-
"img",
|
|
63
|
-
{
|
|
64
|
-
src: c,
|
|
65
|
-
alt: s,
|
|
66
|
-
loading: "lazy",
|
|
67
|
-
decoding: "async",
|
|
68
|
-
className: ["ds:object-cover", K[f], O[i]].join(
|
|
69
|
-
" "
|
|
70
|
-
)
|
|
71
|
-
}
|
|
72
|
-
) : l ? /* @__PURE__ */ d(H, { name: l, size: f }) : null;
|
|
73
|
-
}
|
|
74
|
-
function J() {
|
|
75
|
-
return /* @__PURE__ */ d(
|
|
76
|
-
"svg",
|
|
77
|
-
{
|
|
78
|
-
viewBox: "0 0 24 24",
|
|
79
|
-
fill: "none",
|
|
80
|
-
stroke: "currentColor",
|
|
81
|
-
strokeWidth: 1.75,
|
|
82
|
-
strokeLinecap: "round",
|
|
83
|
-
strokeLinejoin: "round",
|
|
84
|
-
"aria-hidden": "true",
|
|
85
|
-
className: "ds:size-3.5",
|
|
86
|
-
children: /* @__PURE__ */ d("path", { d: "M12 5.5c-1.074 -1.426 -2.45 -2.2 -4 -2c-2.5 .323 -3.7 2.5 -3.5 5c.1 1.5 .5 3 .5 4.5c0 1.5 .5 3.5 1 5c.3 .9 .5 2 1.5 2s1.3 -1.5 1.5 -2.5c.2 -1 .5 -2 1.5 -2s1.3 1 1.5 2c.2 1 .5 2.5 1.5 2.5s1.2 -1.1 1.5 -2c.5 -1.5 1 -3.5 1 -5c0 -1.5 .4 -3 .5 -4.5c.2 -2.5 -1 -4.677 -3.5 -5c-1.55 -.2 -2.926 .574 -4 2z" })
|
|
87
|
-
}
|
|
88
|
-
);
|
|
89
|
-
}
|
|
90
|
-
function Ne(n) {
|
|
91
|
-
const { value: e, maxInlineSize: t = "8rem" } = n;
|
|
92
|
-
return !Array.isArray(e) || e.length === 0 ? null : /* @__PURE__ */ d(
|
|
93
|
-
M,
|
|
94
|
-
{
|
|
95
|
-
label: e.join(", "),
|
|
96
|
-
size: "sm",
|
|
97
|
-
fill: "outline",
|
|
98
|
-
leading: /* @__PURE__ */ d(J, {}),
|
|
99
|
-
maxInlineSize: t
|
|
100
|
-
}
|
|
101
|
-
);
|
|
102
|
-
}
|
|
103
|
-
function Q(n) {
|
|
104
|
-
if (n == null || n === "") return null;
|
|
105
|
-
const e = typeof n == "number" ? n : Number(n);
|
|
106
|
-
return Number.isFinite(e) ? e : null;
|
|
107
|
-
}
|
|
108
|
-
function Ce(n) {
|
|
109
|
-
const {
|
|
110
|
-
value: e,
|
|
111
|
-
currency: t = "EUR",
|
|
112
|
-
colorNegative: o,
|
|
113
|
-
strikethrough: r,
|
|
114
|
-
options: f
|
|
115
|
-
} = n, { i18n: i } = C(), a = Q(e);
|
|
116
|
-
if (a === null) return null;
|
|
117
|
-
const c = i.language || "en", s = new Intl.NumberFormat(c, {
|
|
118
|
-
style: "currency",
|
|
119
|
-
currency: t,
|
|
120
|
-
...f
|
|
121
|
-
}).format(a), l = ["ds:tabular-nums"];
|
|
122
|
-
return o && a < 0 && l.push("ds:text-[color:var(--destructive)]"), r && l.push("line-through"), /* @__PURE__ */ d("span", { className: l.join(" "), children: s });
|
|
123
|
-
}
|
|
124
|
-
function w(n, e) {
|
|
125
|
-
return typeof n == "function" ? n(e) : n;
|
|
126
|
-
}
|
|
127
|
-
function Y(n) {
|
|
128
|
-
return /^(https?:\/\/|\/|#|mailto:|tel:)/i.test(n) ? n : "#";
|
|
129
|
-
}
|
|
130
|
-
function xe(n) {
|
|
131
|
-
const { value: e, data: t, href: o, onClick: r, secondary: f } = n;
|
|
132
|
-
if (!t) return null;
|
|
133
|
-
const i = w(o, t), a = w(f, t), c = e == null || e === "" ? "" : String(e), s = [
|
|
134
|
-
"ds:text-[color:var(--primary)]",
|
|
135
|
-
"ds:hover:underline",
|
|
136
|
-
"ds:focus-visible:outline-[length:var(--focus-ring-width)]",
|
|
137
|
-
"ds:focus-visible:outline-solid",
|
|
138
|
-
"ds:focus-visible:outline-[color:var(--ring)]",
|
|
139
|
-
"ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
140
|
-
"ds:rounded-[var(--radius-sm)]"
|
|
141
|
-
].join(" "), l = (u) => {
|
|
142
|
-
r && (i || u.preventDefault(), u.stopPropagation(), r(t));
|
|
143
|
-
};
|
|
144
|
-
return /* @__PURE__ */ z("span", { className: "ds:flex ds:flex-col ds:leading-tight", children: [
|
|
145
|
-
i ? /* @__PURE__ */ d(
|
|
146
|
-
"a",
|
|
147
|
-
{
|
|
148
|
-
href: Y(i),
|
|
149
|
-
onClick: l,
|
|
150
|
-
className: s,
|
|
151
|
-
children: c
|
|
152
|
-
}
|
|
153
|
-
) : /* @__PURE__ */ d(
|
|
154
|
-
"button",
|
|
155
|
-
{
|
|
156
|
-
type: "button",
|
|
157
|
-
onClick: l,
|
|
158
|
-
className: [
|
|
159
|
-
"ds:appearance-none ds:bg-transparent ds:p-0 ds:text-start",
|
|
160
|
-
s
|
|
161
|
-
].join(" "),
|
|
162
|
-
children: c
|
|
163
|
-
}
|
|
164
|
-
),
|
|
165
|
-
a ? /* @__PURE__ */ d("span", { className: "type-meta ds:text-[color:var(--muted-foreground)]", children: a }) : null
|
|
166
|
-
] });
|
|
167
|
-
}
|
|
168
|
-
function Se(n) {
|
|
169
|
-
const {
|
|
170
|
-
value: e,
|
|
171
|
-
data: t,
|
|
172
|
-
onToggle: o,
|
|
173
|
-
onError: r,
|
|
174
|
-
trueIcon: f,
|
|
175
|
-
falseIcon: i,
|
|
176
|
-
trueClass: a = "ds:text-[color:var(--success)]",
|
|
177
|
-
falseClass: c = "ds:text-[color:var(--muted-foreground)]",
|
|
178
|
-
label: s
|
|
179
|
-
} = n, { t: l } = C(), [u, b] = F(!1);
|
|
180
|
-
if (!t) return null;
|
|
181
|
-
const h = !!e, x = h ? f ?? /* @__PURE__ */ d(q, { "aria-hidden": !0, className: "ds:size-4" }) : i ?? /* @__PURE__ */ d(G, { "aria-hidden": !0, className: "ds:size-4" }), y = h ? a : c, N = s ?? l(h ? "inputs.switch.on" : "inputs.switch.off");
|
|
182
|
-
async function m(g) {
|
|
183
|
-
if (g.stopPropagation(), u || !t) return;
|
|
184
|
-
const v = o(t, !h);
|
|
185
|
-
if (v && typeof v.then == "function") {
|
|
186
|
-
b(!0);
|
|
187
|
-
try {
|
|
188
|
-
await v;
|
|
189
|
-
} catch (S) {
|
|
190
|
-
r == null || r(t, S);
|
|
191
|
-
} finally {
|
|
192
|
-
b(!1);
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
return /* @__PURE__ */ d(
|
|
197
|
-
"button",
|
|
198
|
-
{
|
|
199
|
-
type: "button",
|
|
200
|
-
role: "switch",
|
|
201
|
-
"aria-checked": h,
|
|
202
|
-
"aria-busy": u,
|
|
203
|
-
"aria-label": N,
|
|
204
|
-
disabled: u,
|
|
205
|
-
onClick: m,
|
|
206
|
-
className: [
|
|
207
|
-
"ds:inline-flex ds:items-center ds:justify-center",
|
|
208
|
-
"ds:min-h-[var(--min-target-size)] ds:min-w-[var(--min-target-size)]",
|
|
209
|
-
"ds:appearance-none ds:bg-transparent ds:p-[var(--spacing-xs)]",
|
|
210
|
-
"ds:rounded-[var(--radius-sm)]",
|
|
211
|
-
"ds:focus-visible:outline-[length:var(--focus-ring-width)]",
|
|
212
|
-
"ds:focus-visible:outline-solid",
|
|
213
|
-
"ds:focus-visible:outline-[color:var(--ring)]",
|
|
214
|
-
"ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
215
|
-
"ds:disabled:opacity-50",
|
|
216
|
-
y
|
|
217
|
-
].join(" "),
|
|
218
|
-
children: x
|
|
219
|
-
}
|
|
220
|
-
);
|
|
221
|
-
}
|
|
222
|
-
const ee = {
|
|
223
|
-
sm: "ds:size-[var(--icon-size-sm)]",
|
|
224
|
-
md: "ds:size-[var(--icon-size-md)]",
|
|
225
|
-
lg: "ds:size-[var(--icon-size-lg)]"
|
|
226
|
-
};
|
|
227
|
-
function T(n, e) {
|
|
228
|
-
if (!n || typeof n != "object") return;
|
|
229
|
-
const t = n[e];
|
|
230
|
-
return typeof t == "string" ? t : void 0;
|
|
231
|
-
}
|
|
232
|
-
const ne = /^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i, te = /^rgba?\(\s*[\d.\s,%/]+\)$/i, re = /^hsla?\(\s*[\d.\s,%/]+\)$/i, se = /^var\(--[a-z0-9-]+(?:,\s*[^)]+)?\)$/i;
|
|
233
|
-
function ae(n) {
|
|
234
|
-
if (!n) return;
|
|
235
|
-
const e = n.trim();
|
|
236
|
-
if (ne.test(e) || te.test(e) || re.test(e) || se.test(e))
|
|
237
|
-
return e;
|
|
238
|
-
}
|
|
239
|
-
function Re(n) {
|
|
240
|
-
const { data: e, colorField: t, size: o = "md", labelField: r } = n, f = k(null), i = e ? T(e, t) : void 0, a = ae(i), c = e && r ? T(e, r) : void 0;
|
|
241
|
-
return X(() => {
|
|
242
|
-
const s = f.current;
|
|
243
|
-
s && (a ? s.style.setProperty("--data-table-dot-color", a) : s.style.removeProperty("--data-table-dot-color"));
|
|
244
|
-
}, [a]), a ? /* @__PURE__ */ z("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
|
|
245
|
-
/* @__PURE__ */ d(
|
|
246
|
-
"span",
|
|
247
|
-
{
|
|
248
|
-
ref: f,
|
|
249
|
-
"aria-hidden": "true",
|
|
250
|
-
className: [
|
|
251
|
-
"ds:inline-block ds:shrink-0 ds:rounded-[var(--radius-full)]",
|
|
252
|
-
"ds:bg-[var(--data-table-dot-color)]",
|
|
253
|
-
"ds:border ds:border-[color:var(--border)]",
|
|
254
|
-
ee[o]
|
|
255
|
-
].join(" ")
|
|
256
|
-
}
|
|
257
|
-
),
|
|
258
|
-
c ? /* @__PURE__ */ d("span", { children: c }) : null
|
|
259
|
-
] }) : null;
|
|
260
|
-
}
|
|
261
|
-
function le(n, e) {
|
|
262
|
-
if (!n || typeof n != "object") return null;
|
|
263
|
-
const t = n[e], o = typeof t == "number" ? t : Number(t);
|
|
264
|
-
return Number.isFinite(o) ? o : null;
|
|
265
|
-
}
|
|
266
|
-
function Ee(n) {
|
|
267
|
-
const { data: e, lines: t, currency: o = "EUR", highlightNegative: r } = n, { i18n: f } = C();
|
|
268
|
-
if (!e) return null;
|
|
269
|
-
const i = f.language || "en", a = (s) => {
|
|
270
|
-
const l = le(e, s.valueField);
|
|
271
|
-
if (l === null) return null;
|
|
272
|
-
let u;
|
|
273
|
-
switch (s.format ?? "number") {
|
|
274
|
-
case "currency":
|
|
275
|
-
u = new Intl.NumberFormat(i, {
|
|
276
|
-
style: "currency",
|
|
277
|
-
currency: o
|
|
278
|
-
}).format(l);
|
|
279
|
-
break;
|
|
280
|
-
case "percent":
|
|
281
|
-
u = new Intl.NumberFormat(i, {
|
|
282
|
-
style: "percent",
|
|
283
|
-
maximumFractionDigits: 1
|
|
284
|
-
}).format(l / 100);
|
|
285
|
-
break;
|
|
286
|
-
default:
|
|
287
|
-
u = new Intl.NumberFormat(i).format(l);
|
|
288
|
-
}
|
|
289
|
-
return {
|
|
290
|
-
label: s.label,
|
|
291
|
-
formatted: u,
|
|
292
|
-
negative: !!r && l < 0
|
|
293
|
-
};
|
|
294
|
-
}, c = t.map(a).filter(
|
|
295
|
-
(s) => s !== null
|
|
296
|
-
);
|
|
297
|
-
return c.length === 0 ? null : /* @__PURE__ */ d(
|
|
298
|
-
"div",
|
|
299
|
-
{
|
|
300
|
-
className: [
|
|
301
|
-
"ds:flex",
|
|
302
|
-
"ds:flex-wrap",
|
|
303
|
-
"ds:items-center",
|
|
304
|
-
"ds:gap-x-[var(--spacing-sm)]",
|
|
305
|
-
"ds:gap-y-0",
|
|
306
|
-
"type-meta",
|
|
307
|
-
"ds:leading-tight"
|
|
308
|
-
].join(" "),
|
|
309
|
-
children: c.map((s, l) => /* @__PURE__ */ z(
|
|
310
|
-
"span",
|
|
311
|
-
{
|
|
312
|
-
className: "ds:inline-flex ds:items-baseline ds:gap-x-[var(--spacing-xs)]",
|
|
313
|
-
children: [
|
|
314
|
-
l > 0 ? /* @__PURE__ */ d(
|
|
315
|
-
"span",
|
|
316
|
-
{
|
|
317
|
-
"aria-hidden": "true",
|
|
318
|
-
className: "ds:me-[var(--spacing-xs)] ds:text-[color:var(--muted-foreground)]",
|
|
319
|
-
children: "·"
|
|
320
|
-
}
|
|
321
|
-
) : null,
|
|
322
|
-
/* @__PURE__ */ d("span", { className: "ds:text-[color:var(--muted-foreground)]", children: s.label }),
|
|
323
|
-
/* @__PURE__ */ d(
|
|
324
|
-
"span",
|
|
325
|
-
{
|
|
326
|
-
className: [
|
|
327
|
-
"ds:tabular-nums",
|
|
328
|
-
"ds:font-medium",
|
|
329
|
-
s.negative ? "ds:text-[color:var(--destructive)]" : ""
|
|
330
|
-
].filter(Boolean).join(" "),
|
|
331
|
-
children: s.formatted
|
|
332
|
-
}
|
|
333
|
-
)
|
|
334
|
-
]
|
|
335
|
-
},
|
|
336
|
-
`${s.label}-${l}`
|
|
337
|
-
))
|
|
338
|
-
}
|
|
339
|
-
);
|
|
340
|
-
}
|
|
341
|
-
function Fe(n) {
|
|
342
|
-
var s, l;
|
|
343
|
-
const { initialValue: e, onValueChange: t, stopEditing: o, column: r } = n, [f, i] = F(e ?? ""), a = k(null);
|
|
344
|
-
A(() => {
|
|
345
|
-
const u = a.current;
|
|
346
|
-
u && (u.focus(), u.select());
|
|
347
|
-
}, []);
|
|
348
|
-
const c = ((l = (s = r == null ? void 0 : r.getColDef) == null ? void 0 : s.call(r)) == null ? void 0 : l.headerName) ?? void 0;
|
|
349
|
-
return /* @__PURE__ */ d(
|
|
350
|
-
"input",
|
|
351
|
-
{
|
|
352
|
-
ref: a,
|
|
353
|
-
type: "text",
|
|
354
|
-
value: f,
|
|
355
|
-
"aria-label": c,
|
|
356
|
-
onChange: (u) => {
|
|
357
|
-
const b = u.target.value;
|
|
358
|
-
i(b), t(b);
|
|
359
|
-
},
|
|
360
|
-
onKeyDown: (u) => {
|
|
361
|
-
u.key === "Enter" && (u.preventDefault(), o());
|
|
362
|
-
},
|
|
363
|
-
className: [
|
|
364
|
-
"ds:block ds:w-full ds:appearance-none",
|
|
365
|
-
// Input surface chrome: rounded border + bg + focus halo.
|
|
366
|
-
D,
|
|
367
|
-
// Use the `md` height (`--min-target-size`) so the input
|
|
368
|
-
// auto-lifts to 48px under `.theme-accessible` to satisfy
|
|
369
|
-
// WCAG 2.5.5 target size.
|
|
370
|
-
P.md,
|
|
371
|
-
L.sm,
|
|
372
|
-
B.sm
|
|
373
|
-
].join(" ")
|
|
374
|
-
}
|
|
375
|
-
);
|
|
376
|
-
}
|
|
377
|
-
function ke(n) {
|
|
378
|
-
var y, N;
|
|
379
|
-
const {
|
|
380
|
-
initialValue: e,
|
|
381
|
-
onValueChange: t,
|
|
382
|
-
stopEditing: o,
|
|
383
|
-
column: r,
|
|
384
|
-
decimals: f = 2,
|
|
385
|
-
min: i,
|
|
386
|
-
max: a
|
|
387
|
-
} = n, { i18n: c } = C(), s = k(null), l = ((N = (y = r == null ? void 0 : r.getColDef) == null ? void 0 : y.call(r)) == null ? void 0 : N.headerName) ?? void 0, [u, b] = F(() => e == null || Number.isNaN(e) ? "" : String(e));
|
|
388
|
-
A(() => {
|
|
389
|
-
const m = s.current;
|
|
390
|
-
m && (m.focus(), m.select());
|
|
391
|
-
}, []);
|
|
392
|
-
function h(m) {
|
|
393
|
-
var j, _;
|
|
394
|
-
if (m.trim().length === 0) return null;
|
|
395
|
-
const g = c.language || "en", p = new Intl.NumberFormat(g).formatToParts(12345.6), v = ((j = p.find((R) => R.type === "group")) == null ? void 0 : j.value) ?? "", S = ((_ = p.find((R) => R.type === "decimal")) == null ? void 0 : _.value) ?? ".", U = m.replace(new RegExp(`\\${v}`, "g"), "").replace(S, ".").replace(/[^\d.-]/g, ""), I = Number(U);
|
|
396
|
-
return Number.isFinite(I) ? I : null;
|
|
397
|
-
}
|
|
398
|
-
function x(m) {
|
|
399
|
-
const g = h(m);
|
|
400
|
-
if (g == null) {
|
|
401
|
-
t(null);
|
|
402
|
-
return;
|
|
403
|
-
}
|
|
404
|
-
let p = g;
|
|
405
|
-
typeof i == "number" && (p = Math.max(i, p)), typeof a == "number" && (p = Math.min(a, p));
|
|
406
|
-
const v = 10 ** f;
|
|
407
|
-
t(Math.round(p * v) / v);
|
|
408
|
-
}
|
|
409
|
-
return /* @__PURE__ */ d(
|
|
410
|
-
"input",
|
|
411
|
-
{
|
|
412
|
-
ref: s,
|
|
413
|
-
type: "text",
|
|
414
|
-
inputMode: "decimal",
|
|
415
|
-
value: u,
|
|
416
|
-
"aria-label": l,
|
|
417
|
-
onChange: (m) => {
|
|
418
|
-
const g = m.target.value;
|
|
419
|
-
b(g), x(g);
|
|
420
|
-
},
|
|
421
|
-
onKeyDown: (m) => {
|
|
422
|
-
m.key === "Enter" && (m.preventDefault(), o());
|
|
423
|
-
},
|
|
424
|
-
className: [
|
|
425
|
-
"ds:block ds:w-full ds:appearance-none ds:text-end ds:tabular-nums",
|
|
426
|
-
D,
|
|
427
|
-
// Use `md` height — see editable-text-cell-renderer for rationale.
|
|
428
|
-
P.md,
|
|
429
|
-
L.sm,
|
|
430
|
-
B.sm
|
|
431
|
-
].join(" ")
|
|
432
|
-
}
|
|
433
|
-
);
|
|
434
|
-
}
|
|
435
|
-
export {
|
|
436
|
-
Ee as B,
|
|
437
|
-
Re as C,
|
|
438
|
-
ke as E,
|
|
439
|
-
ye as I,
|
|
440
|
-
xe as L,
|
|
441
|
-
he as S,
|
|
442
|
-
Se as T,
|
|
443
|
-
Ce as a,
|
|
444
|
-
Fe as b,
|
|
445
|
-
Ne as c,
|
|
446
|
-
be as u
|
|
447
|
-
};
|
|
448
|
-
//# sourceMappingURL=editable-currency-cell-renderer-kgqp_mIw.js.map
|