@alfadocs/ui-kit 1.4.12 → 1.4.14
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/actions-cell-renderer-BD-jruqA.js +1784 -0
- package/dist/_chunks/{address-fields-D-8akw2m.js → address-fields-CZP4Wncx.js} +2 -2
- package/dist/_chunks/{agenda-card-BQDs2ZMp.js → agenda-card-pdN49pMu.js} +2 -2
- package/dist/_chunks/{agenda-tray-BTyWsVwT.js → agenda-tray-CYR-znfE.js} +2 -2
- package/dist/_chunks/{ai-consent-banner-gVcoiXxv.js → ai-consent-banner-DLF6FNXv.js} +2 -2
- package/dist/_chunks/{anamnesis-card-Bt0twrML.js → anamnesis-card-BylMLHYj.js} +2 -2
- package/dist/_chunks/{anamnesis-summary-card-BKGVcwny.js → anamnesis-summary-card-DGVKBQoq.js} +134 -116
- package/dist/_chunks/{anamnesis-summary-rows-DAIpD0Or.js → anamnesis-summary-rows-C73SWVy3.js} +3145 -3007
- package/dist/_chunks/{antenatal-schedule-timeline-BSLrOQ3S.js → antenatal-schedule-timeline-BjlF2rTz.js} +2 -2
- package/dist/_chunks/{appointment-card-kcUC7vWR.js → appointment-card-BhcPJpXh.js} +2 -2
- package/dist/_chunks/{appointment-timeline-BC3dlZu5.js → appointment-timeline-DT1uFp8z.js} +2 -2
- package/dist/_chunks/{appointment-tray-BPY5rATW.js → appointment-tray-DvyVK7um.js} +2 -2
- package/dist/_chunks/{badge-CIt-UFEx.js → badge-sTusUqZD.js} +23 -18
- package/dist/_chunks/{bishop-score-B6iYYO0c.js → bishop-score-BV1JAEMV.js} +3 -3
- package/dist/_chunks/{bmi-calculator-CxPn0T0s.js → bmi-calculator-CdR-RLFj.js} +5 -5
- package/dist/_chunks/{booking-CmHX15dh.js → booking-CGKof8QU.js} +2 -2
- package/dist/_chunks/{care-plan-card-9tLgsDYY.js → care-plan-card-C83Hb9EE.js} +3 -3
- package/dist/_chunks/{care-plan-entry-card-CSan4h7A.js → care-plan-entry-card-CHMPSTCz.js} +2 -2
- package/dist/_chunks/{care-plan-header-D_BTi77b.js → care-plan-header-_B0TTWT1.js} +2 -2
- package/dist/_chunks/{clinical-note-card-ByzQ86uz.js → clinical-note-card-BBgFd2nB.js} +2 -2
- package/dist/_chunks/{connection-status-D8mZ4klk.js → connection-status-NT8hUtYl.js} +2 -2
- package/dist/_chunks/{contact-profile-card-DuW6VpzY.js → contact-profile-card-BxHiG8e6.js} +2 -2
- package/dist/_chunks/{cycle-calculator-D9M7IKfh.js → cycle-calculator-DJZYvNhw.js} +4 -4
- package/dist/_chunks/{dependent-selector-BUvrZRi0.js → dependent-selector-cJlJFAKD.js} +2 -2
- package/dist/_chunks/{document-preview-Di15VrpQ.js → document-preview-Aae2yKvY.js} +2 -2
- package/dist/_chunks/{due-date-calculator-BkqZEvL4.js → due-date-calculator-ajaQ4ya5.js} +6 -6
- package/dist/_chunks/{fetal-weight-C7JXGg6E.js → fetal-weight-jon6GIfQ.js} +4 -4
- package/dist/_chunks/{field-value-BCFLVBmu.js → field-value-BbiDRyNh.js} +2 -2
- package/dist/_chunks/{file-manager-DzWYcRpE.js → file-manager-CML_C6_h.js} +3 -3
- package/dist/_chunks/form-field-CahJzTxp.js +131 -0
- package/dist/_chunks/{gestational-age-calculator-Ch8vmJAl.js → gestational-age-calculator-dEpQDWcb.js} +5 -5
- package/dist/_chunks/{hcg-doubling-CFJlMH7Z.js → hcg-doubling-CC6TLtHd.js} +4 -4
- package/dist/_chunks/{link-cell-renderer-DCCca2m3.js → link-cell-renderer-D3IsW_2R.js} +3 -3
- package/dist/_chunks/{marketplace-app-shell-BhRH7Zi4.js → marketplace-app-shell-b5hN-Q0m.js} +2 -2
- package/dist/_chunks/{notes-panel-Bz83SO4-.js → notes-panel-D6HKLLS-.js} +2 -2
- package/dist/_chunks/number-input-Cgu2TtA8.js +423 -0
- package/dist/_chunks/{operator-hero-CpJkDNAM.js → operator-hero-CCDnIa1S.js} +2 -2
- package/dist/_chunks/{optical-prescription-Brs0CeP3.js → optical-prescription-DtzEqFQm.js} +2 -2
- package/dist/_chunks/{patient-details-CGhnfdUB.js → patient-details-rENrE_qY.js} +3 -3
- package/dist/_chunks/{patient-summary-card-DfbOtOV6.js → patient-summary-card-DQJgOOrA.js} +3 -3
- package/dist/_chunks/{patient-table-D2fhV4mV.js → patient-table-BubxfOWL.js} +4 -4
- package/dist/_chunks/{payment-automation-upsell-Ckh3b7Xx.js → payment-automation-upsell-CnaBPt5e.js} +2 -2
- package/dist/_chunks/{payment-request-card-Dn6-tH-D.js → payment-request-card-CvhDzDNk.js} +2 -2
- package/dist/_chunks/{periodontal-chart-B0yko9Xm.js → periodontal-chart-brakjj0s.js} +2 -2
- package/dist/_chunks/{periodontal-chart-card-HbYTmWlo.js → periodontal-chart-card-Bz-ebteE.js} +2 -2
- package/dist/_chunks/{periodontal-diagnosis-Qk4F3Wc_.js → periodontal-diagnosis-HrFsVi-C.js} +3 -3
- package/dist/_chunks/{periodontal-risk-chart-ByKuM4cF.js → periodontal-risk-chart-0x7KVZjL.js} +2 -2
- package/dist/_chunks/{practice-results-C5exrEn0.js → practice-results-DWUZRm2x.js} +2 -2
- package/dist/_chunks/{pregnancy-dating-iI6_j2K2.js → pregnancy-dating-DQVpFs_f.js} +6 -6
- package/dist/_chunks/{pregnancy-weight-gain-Co-YFMJZ.js → pregnancy-weight-gain-hm3QJALe.js} +5 -5
- package/dist/_chunks/radio-group-rXDJADzW.js +175 -0
- package/dist/_chunks/{radiograph-panel.agent-Drj0hYVV.js → radiograph-panel.agent-CAXFgCyn.js} +3 -3
- package/dist/_chunks/{signature-status-chip-DUcTgQ0E.js → signature-status-chip-DqrPIJtH.js} +17 -15
- package/dist/_chunks/{tab-bar-Ddp_ZbnL.js → tab-bar-DvFJIQfL.js} +2 -2
- package/dist/_chunks/{tasks-panel-T7vaKJcA.js → tasks-panel-BBkZuejF.js} +2 -2
- package/dist/_chunks/{unit-converter-BeTicruA.js → unit-converter-iDxlxKmm.js} +3 -3
- package/dist/_chunks/{widget-picker-DqMbjQy_.js → widget-picker-em4xGgv0.js} +2 -2
- package/dist/_chunks/{workflow-map-BNBeG2zn.js → workflow-map-BVofnDYh.js} +2 -2
- package/dist/agent-catalog.json +14 -8
- package/dist/agent-i18n/en.json +3 -2
- package/dist/components/address-fields/index.js +1 -1
- 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/anamnesis-card/index.js +1 -1
- package/dist/components/anamnesis-summary-card/anamnesis-summary-card.d.ts +2 -2
- package/dist/components/anamnesis-summary-card/index.js +1 -1
- package/dist/components/appointment-card/index.js +2 -2
- package/dist/components/appointment-timeline/index.js +1 -1
- 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/index.js +1 -1
- package/dist/components/clinical-note-card/index.js +1 -1
- package/dist/components/connection-status/index.js +1 -1
- package/dist/components/contact-profile-card/index.js +1 -1
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/data-table/data-table.d.ts +19 -0
- package/dist/components/data-table/expanded-row-renderer.d.ts +47 -0
- package/dist/components/data-table/index.d.ts +2 -0
- package/dist/components/data-table/index.js +31 -27
- package/dist/components/dependent-selector/index.js +1 -1
- package/dist/components/document-preview/index.js +1 -1
- package/dist/components/due-date-calculator/index.js +2 -2
- package/dist/components/fetal-weight/index.js +1 -1
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/form-field/form-field.d.ts +8 -0
- package/dist/components/form-field/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/notes-panel/index.js +1 -1
- package/dist/components/number-input/index.js +1 -1
- package/dist/components/number-input/number-input.d.ts +14 -0
- package/dist/components/operator-hero/index.js +1 -1
- package/dist/components/optical-prescription/index.js +1 -1
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/payment-card/index.js +1 -1
- package/dist/components/periodontal-chart/index.js +1 -1
- package/dist/components/periodontal-chart-card/index.js +1 -1
- package/dist/components/periodontal-diagnosis/index.js +1 -1
- package/dist/components/periodontal-risk-chart/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/radio-group/index.js +1 -1
- package/dist/components/radio-group/radio-group.d.ts +5 -0
- package/dist/components/radiograph-panel/index.js +1 -1
- package/dist/components/signature-status-chip/index.js +1 -1
- package/dist/components/tab-bar/index.js +1 -1
- package/dist/components/tasks-panel/index.js +1 -1
- package/dist/components/unit-converter/index.js +1 -1
- package/dist/components/widget-picker/index.js +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/host-compat.css +7 -1
- package/dist/i18n/locales/ar.d.ts +1 -0
- package/dist/i18n/locales/ar.js +1 -0
- package/dist/i18n/locales/de.d.ts +1 -0
- package/dist/i18n/locales/de.js +1 -0
- package/dist/i18n/locales/el.d.ts +1 -0
- package/dist/i18n/locales/el.js +1 -0
- package/dist/i18n/locales/en.d.ts +1 -0
- package/dist/i18n/locales/en.js +1 -0
- package/dist/i18n/locales/es.d.ts +1 -0
- package/dist/i18n/locales/es.js +1 -0
- package/dist/i18n/locales/fr.d.ts +1 -0
- package/dist/i18n/locales/fr.js +1 -0
- package/dist/i18n/locales/hi.d.ts +1 -0
- package/dist/i18n/locales/hi.js +1 -0
- package/dist/i18n/locales/it.d.ts +1 -0
- package/dist/i18n/locales/it.js +1 -0
- package/dist/i18n/locales/ja.d.ts +1 -0
- package/dist/i18n/locales/ja.js +1 -0
- package/dist/i18n/locales/nl.d.ts +1 -0
- package/dist/i18n/locales/nl.js +1 -0
- package/dist/i18n/locales/pl.d.ts +1 -0
- package/dist/i18n/locales/pl.js +1 -0
- package/dist/i18n/locales/pt.d.ts +1 -0
- package/dist/i18n/locales/pt.js +1 -0
- package/dist/i18n/locales/ro.d.ts +1 -0
- package/dist/i18n/locales/ro.js +1 -0
- package/dist/i18n/locales/ru.d.ts +1 -0
- package/dist/i18n/locales/ru.js +1 -0
- package/dist/i18n/locales/sq.d.ts +1 -0
- package/dist/i18n/locales/sq.js +1 -0
- package/dist/i18n/locales/sv.d.ts +1 -0
- package/dist/i18n/locales/sv.js +1 -0
- package/dist/i18n/locales/tr.d.ts +1 -0
- package/dist/i18n/locales/tr.js +1 -0
- package/dist/i18n/locales/zh.d.ts +1 -0
- package/dist/i18n/locales/zh.js +1 -0
- package/dist/index.js +785 -781
- package/dist/locales/ar.json +1 -0
- package/dist/locales/de.json +1 -0
- package/dist/locales/el.json +1 -0
- package/dist/locales/en.json +1 -0
- package/dist/locales/es.json +1 -0
- package/dist/locales/fr.json +1 -0
- package/dist/locales/hi.json +1 -0
- package/dist/locales/it.json +1 -0
- package/dist/locales/ja.json +1 -0
- package/dist/locales/nl.json +1 -0
- package/dist/locales/pl.json +1 -0
- package/dist/locales/pt.json +1 -0
- package/dist/locales/ro.json +1 -0
- package/dist/locales/ru.json +1 -0
- package/dist/locales/sq.json +1 -0
- package/dist/locales/sv.json +1 -0
- package/dist/locales/tr.json +1 -0
- package/dist/locales/zh.json +1 -0
- package/dist/patterns/anamnesis/anamnesis-evolution.d.ts +7 -1
- package/dist/patterns/anamnesis/anamnesis-field.d.ts +15 -1
- package/dist/patterns/anamnesis/anamnesis-indicators.d.ts +3 -1
- package/dist/patterns/anamnesis/anamnesis-intake.d.ts +6 -1
- package/dist/patterns/anamnesis/anamnesis-types.d.ts +3 -0
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/payment-automation-upsell/index.js +1 -1
- package/dist/tokens.css +5 -2
- package/package.json +1 -1
- package/dist/_chunks/actions-cell-renderer-C67oj7mR.js +0 -1581
- package/dist/_chunks/form-field-D1oqYisL.js +0 -127
- package/dist/_chunks/number-input-DOe5VYei.js +0 -370
- package/dist/_chunks/radio-group-BmIqhIT2.js +0 -171
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import { jsxs as a, Fragment as z, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as V, useId as B, useMemo as x } from "react";
|
|
3
|
-
import { c as u } from "./index-D2ZczOXr.js";
|
|
4
|
-
import { useTranslation as C } from "react-i18next";
|
|
5
|
-
import { F as I } from "./form-field-context-B3APVHKx.js";
|
|
6
|
-
import { C as $ } from "./circle-alert-rGDZ73Wh.js";
|
|
7
|
-
const k = u("ds:text-start", {
|
|
8
|
-
variants: {
|
|
9
|
-
orientation: {
|
|
10
|
-
vertical: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
|
|
11
|
-
horizontal: "ds:grid ds:grid-cols-[minmax(0,var(--form-label-inline-size))_minmax(0,1fr)] ds:items-start ds:gap-x-[var(--spacing-md)] ds:gap-y-[var(--spacing-xs)]"
|
|
12
|
-
},
|
|
13
|
-
disabled: {
|
|
14
|
-
true: "ds:opacity-50 ds:cursor-not-allowed",
|
|
15
|
-
false: ""
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
defaultVariants: {
|
|
19
|
-
orientation: "vertical",
|
|
20
|
-
disabled: !1
|
|
21
|
-
}
|
|
22
|
-
}), T = u("ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", {
|
|
23
|
-
variants: {
|
|
24
|
-
orientation: {
|
|
25
|
-
vertical: "",
|
|
26
|
-
horizontal: "ds:min-w-0"
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
defaultVariants: {
|
|
30
|
-
orientation: "vertical"
|
|
31
|
-
}
|
|
32
|
-
}), q = V(
|
|
33
|
-
(v, h) => {
|
|
34
|
-
const {
|
|
35
|
-
label: g,
|
|
36
|
-
labelEnd: l,
|
|
37
|
-
description: n,
|
|
38
|
-
error: r,
|
|
39
|
-
required: d = !1,
|
|
40
|
-
optional: b = !1,
|
|
41
|
-
orientation: c = "vertical",
|
|
42
|
-
disabled: o = !1,
|
|
43
|
-
className: y,
|
|
44
|
-
children: N,
|
|
45
|
-
...F
|
|
46
|
-
} = v, { t: j } = C(), s = B(), t = `${s}-help`, i = `${s}-error`, m = !!r, p = x(
|
|
47
|
-
() => [n ? t : null, r ? i : null].filter(Boolean).join(" "),
|
|
48
|
-
[n, r, t, i]
|
|
49
|
-
), w = x(
|
|
50
|
-
() => ({
|
|
51
|
-
id: s,
|
|
52
|
-
helpId: t,
|
|
53
|
-
errorId: i,
|
|
54
|
-
describedBy: p,
|
|
55
|
-
invalid: m,
|
|
56
|
-
required: d,
|
|
57
|
-
disabled: o
|
|
58
|
-
}),
|
|
59
|
-
[s, t, i, p, m, d, o]
|
|
60
|
-
), f = /* @__PURE__ */ a(z, { children: [
|
|
61
|
-
g,
|
|
62
|
-
d && /* @__PURE__ */ e(
|
|
63
|
-
"span",
|
|
64
|
-
{
|
|
65
|
-
"aria-hidden": "true",
|
|
66
|
-
className: "ds:text-destructive ds:ms-[var(--spacing-xs)]",
|
|
67
|
-
children: "*"
|
|
68
|
-
}
|
|
69
|
-
),
|
|
70
|
-
b && /* @__PURE__ */ a("span", { className: "ds:text-muted-foreground ds:ms-[var(--spacing-xs)] ds:font-normal", children: [
|
|
71
|
-
"(",
|
|
72
|
-
j("common.optional", "optional"),
|
|
73
|
-
")"
|
|
74
|
-
] })
|
|
75
|
-
] });
|
|
76
|
-
return /* @__PURE__ */ e(I.Provider, { value: w, children: /* @__PURE__ */ a(
|
|
77
|
-
"div",
|
|
78
|
-
{
|
|
79
|
-
ref: h,
|
|
80
|
-
className: k({ orientation: c, disabled: o, className: y }),
|
|
81
|
-
"data-component": "form-field",
|
|
82
|
-
...F,
|
|
83
|
-
children: [
|
|
84
|
-
/* @__PURE__ */ a(
|
|
85
|
-
"label",
|
|
86
|
-
{
|
|
87
|
-
id: `${s}-label`,
|
|
88
|
-
htmlFor: s,
|
|
89
|
-
className: l ? "type-label ds:text-foreground ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]" : "type-label ds:text-foreground",
|
|
90
|
-
children: [
|
|
91
|
-
l ? /* @__PURE__ */ e("span", { children: f }) : f,
|
|
92
|
-
l ? /* @__PURE__ */ e("span", { className: "ds:inline-flex ds:shrink-0 ds:items-center", children: l }) : null
|
|
93
|
-
]
|
|
94
|
-
}
|
|
95
|
-
),
|
|
96
|
-
/* @__PURE__ */ a("div", { className: T({ orientation: c }), children: [
|
|
97
|
-
N,
|
|
98
|
-
n && /* @__PURE__ */ e("p", { id: t, className: "type-body-sm ds:text-muted-foreground", children: n }),
|
|
99
|
-
r && /* @__PURE__ */ a(
|
|
100
|
-
"p",
|
|
101
|
-
{
|
|
102
|
-
id: i,
|
|
103
|
-
role: "alert",
|
|
104
|
-
className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)] type-body-sm ds:text-destructive",
|
|
105
|
-
children: [
|
|
106
|
-
/* @__PURE__ */ e(
|
|
107
|
-
$,
|
|
108
|
-
{
|
|
109
|
-
"aria-hidden": "true",
|
|
110
|
-
className: "ds:size-4 ds:shrink-0"
|
|
111
|
-
}
|
|
112
|
-
),
|
|
113
|
-
/* @__PURE__ */ e("span", { children: r })
|
|
114
|
-
]
|
|
115
|
-
}
|
|
116
|
-
)
|
|
117
|
-
] })
|
|
118
|
-
]
|
|
119
|
-
}
|
|
120
|
-
) });
|
|
121
|
-
}
|
|
122
|
-
);
|
|
123
|
-
q.displayName = "FormField";
|
|
124
|
-
export {
|
|
125
|
-
q as F
|
|
126
|
-
};
|
|
127
|
-
//# sourceMappingURL=form-field-D1oqYisL.js.map
|
|
@@ -1,370 +0,0 @@
|
|
|
1
|
-
import { jsxs as Ie, jsx as F } from "react/jsx-runtime";
|
|
2
|
-
import { useMemo as Y, forwardRef as De, useRef as K, useCallback as z, useState as q, useEffect as xe } from "react";
|
|
3
|
-
import { c as Ce } from "./index-D2ZczOXr.js";
|
|
4
|
-
import { useTranslation as Fe } from "react-i18next";
|
|
5
|
-
import { u as Se } from "./use-controllable-state-BiY4xTzM.js";
|
|
6
|
-
import { u as Ve } from "./form-field-context-B3APVHKx.js";
|
|
7
|
-
import { c as Me } from "./compose-refs-C0k0tdqF.js";
|
|
8
|
-
import { u as ke } from "./registry-DvAUVLHh.js";
|
|
9
|
-
import { C as Te } from "./chevron-down-DWE7GSq9.js";
|
|
10
|
-
import { C as Pe } from "./chevron-up-umRGgtJA.js";
|
|
11
|
-
const ze = {
|
|
12
|
-
id: "number-input",
|
|
13
|
-
capabilities: ["set_value"],
|
|
14
|
-
state: {
|
|
15
|
-
value: {
|
|
16
|
-
type: "number | null",
|
|
17
|
-
descriptionKey: "ui.agent.numberInput.state.value",
|
|
18
|
-
description: "Current numeric value, or null when empty.",
|
|
19
|
-
read: (n) => n.getValue()
|
|
20
|
-
},
|
|
21
|
-
isEmpty: {
|
|
22
|
-
type: "boolean",
|
|
23
|
-
descriptionKey: "ui.agent.numberInput.state.isEmpty",
|
|
24
|
-
description: "Whether the input has no value.",
|
|
25
|
-
read: (n) => n.getValue() === null
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
actions: {
|
|
29
|
-
set_value: {
|
|
30
|
-
safety: "write",
|
|
31
|
-
argsType: "{ value: number | null }",
|
|
32
|
-
argsSchema: {
|
|
33
|
-
type: "object",
|
|
34
|
-
properties: { value: { type: ["number", "null"] } },
|
|
35
|
-
required: ["value"]
|
|
36
|
-
},
|
|
37
|
-
idempotent: !0,
|
|
38
|
-
examples: [{ args: { value: 42 } }, { args: { value: null } }],
|
|
39
|
-
descriptionKey: "ui.agent.numberInput.actions.setValue",
|
|
40
|
-
description: "Replace the numeric value, or pass null to clear.",
|
|
41
|
-
invoke: (n, s) => {
|
|
42
|
-
n.setValue(s.value);
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
clear: {
|
|
46
|
-
safety: "destructive",
|
|
47
|
-
idempotent: !0,
|
|
48
|
-
descriptionKey: "ui.agent.numberInput.actions.clear",
|
|
49
|
-
description: "Empty the input. Loses any typed value.",
|
|
50
|
-
invoke: (n) => {
|
|
51
|
-
n.clear();
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
focus: {
|
|
55
|
-
safety: "read",
|
|
56
|
-
idempotent: !0,
|
|
57
|
-
descriptionKey: "ui.agent.numberInput.actions.focus",
|
|
58
|
-
description: "Move keyboard focus to the input.",
|
|
59
|
-
invoke: (n) => {
|
|
60
|
-
n.focus();
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
domHooks: {
|
|
65
|
-
root: {
|
|
66
|
-
attr: "data-component",
|
|
67
|
-
value: "number-input",
|
|
68
|
-
description: "Marks the NumberInput wrapper."
|
|
69
|
-
},
|
|
70
|
-
instanceId: {
|
|
71
|
-
attr: "data-component-id",
|
|
72
|
-
sourceProp: "id",
|
|
73
|
-
description: "Sourced from the id prop."
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
function Re(n) {
|
|
78
|
-
let s = "";
|
|
79
|
-
for (const l of n) {
|
|
80
|
-
const r = l.codePointAt(0);
|
|
81
|
-
r !== void 0 && (r >= 1632 && r <= 1641 ? s += String.fromCodePoint(48 + (r - 1632)) : r >= 1776 && r <= 1785 ? s += String.fromCodePoint(48 + (r - 1776)) : s += l);
|
|
82
|
-
}
|
|
83
|
-
return s;
|
|
84
|
-
}
|
|
85
|
-
function Ae(n, s, l) {
|
|
86
|
-
return Y(() => {
|
|
87
|
-
var V, M;
|
|
88
|
-
const r = new Intl.NumberFormat(n).formatToParts(1234.5), u = ((V = r.find((a) => a.type === "decimal")) == null ? void 0 : V.value) ?? ".", S = ((M = r.find((a) => a.type === "group")) == null ? void 0 : M.value) ?? ",", p = s === "currency" ? new Intl.NumberFormat(n, {
|
|
89
|
-
style: "currency",
|
|
90
|
-
currency: l ?? "USD"
|
|
91
|
-
}) : s === "percentage" ? new Intl.NumberFormat(n, {
|
|
92
|
-
style: "percent",
|
|
93
|
-
maximumFractionDigits: 4
|
|
94
|
-
}) : s === "integer" ? new Intl.NumberFormat(n, { maximumFractionDigits: 0 }) : new Intl.NumberFormat(n, { maximumFractionDigits: 10 }), R = (a) => Number.isFinite(a) ? p.format(a) : "", A = (a) => {
|
|
95
|
-
if (!a) return NaN;
|
|
96
|
-
const k = Re(a), h = k.trim(), I = h.startsWith("-") || h.startsWith("−");
|
|
97
|
-
let d = "";
|
|
98
|
-
for (const N of k)
|
|
99
|
-
N >= "0" && N <= "9" ? d += N : N === u && (d += ".");
|
|
100
|
-
if (!d || d === ".") return NaN;
|
|
101
|
-
let m = Number(d);
|
|
102
|
-
return Number.isFinite(m) ? (I && (m = -m), s === "percentage" && (m = m / 100), m) : NaN;
|
|
103
|
-
};
|
|
104
|
-
let g = "decimal";
|
|
105
|
-
if (s === "integer")
|
|
106
|
-
g = "numeric";
|
|
107
|
-
else if (s === "currency")
|
|
108
|
-
try {
|
|
109
|
-
const { maximumFractionDigits: a } = new Intl.NumberFormat(n, {
|
|
110
|
-
style: "currency",
|
|
111
|
-
currency: l ?? "USD"
|
|
112
|
-
}).resolvedOptions();
|
|
113
|
-
g = a === 0 ? "numeric" : "decimal";
|
|
114
|
-
} catch {
|
|
115
|
-
g = "decimal";
|
|
116
|
-
}
|
|
117
|
-
return {
|
|
118
|
-
format: R,
|
|
119
|
-
parse: A,
|
|
120
|
-
decimalSeparator: u,
|
|
121
|
-
groupingSeparator: S,
|
|
122
|
-
inputMode: g
|
|
123
|
-
};
|
|
124
|
-
}, [n, s, l]);
|
|
125
|
-
}
|
|
126
|
-
const je = Ce(
|
|
127
|
-
[
|
|
128
|
-
"ds:flex ds:items-center ds:w-full ds:rounded-[var(--radius-sm)]",
|
|
129
|
-
"ds:border ds:bg-input ds:text-foreground",
|
|
130
|
-
"ds:shadow-[var(--shadow-input)]",
|
|
131
|
-
"ds:transition-[colors,box-shadow] ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
|
|
132
|
-
"ds:focus-within:outline-[length:var(--focus-ring-width)] ds:focus-within:outline-solid",
|
|
133
|
-
"ds:focus-within:outline-ring ds:focus-within:outline-offset-[length:var(--focus-ring-offset)]",
|
|
134
|
-
"ds:has-[:disabled]:cursor-not-allowed ds:has-[:disabled]:opacity-50"
|
|
135
|
-
].join(" "),
|
|
136
|
-
{
|
|
137
|
-
variants: {
|
|
138
|
-
size: {
|
|
139
|
-
sm: "ds:h-8 ds:text-[length:var(--font-size-sm)]",
|
|
140
|
-
md: "ds:h-[var(--min-target-size)] ds:text-[length:var(--font-size-base)]",
|
|
141
|
-
lg: "ds:h-12 ds:text-[length:var(--font-size-lg)]"
|
|
142
|
-
},
|
|
143
|
-
tone: {
|
|
144
|
-
default: "ds:border-border",
|
|
145
|
-
error: "ds:border-destructive ds:focus-within:outline-destructive"
|
|
146
|
-
}
|
|
147
|
-
},
|
|
148
|
-
defaultVariants: { size: "md", tone: "default" }
|
|
149
|
-
}
|
|
150
|
-
), X = [
|
|
151
|
-
"ds:inline-flex ds:items-center ds:justify-center",
|
|
152
|
-
"ds:h-full ds:shrink-0",
|
|
153
|
-
"ds:text-muted-foreground ds:hover:text-foreground",
|
|
154
|
-
"ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
|
|
155
|
-
"ds:disabled:cursor-not-allowed ds:disabled:opacity-50"
|
|
156
|
-
].join(" "), Be = () => typeof navigator < "u" && navigator.language ? navigator.language : "en-US", Ee = (n) => typeof n == "string" && n.trim() !== "" ? n : void 0;
|
|
157
|
-
function Ue(n) {
|
|
158
|
-
if (!Number.isFinite(n)) return 0;
|
|
159
|
-
const s = String(n), l = s.indexOf(".");
|
|
160
|
-
return l === -1 ? 0 : s.length - l - 1;
|
|
161
|
-
}
|
|
162
|
-
function Le(n, s) {
|
|
163
|
-
if (s <= 0 || !Number.isFinite(s)) return n;
|
|
164
|
-
const r = 10 ** Ue(s);
|
|
165
|
-
return Math.round(n * r) / r;
|
|
166
|
-
}
|
|
167
|
-
const Ke = De(
|
|
168
|
-
({
|
|
169
|
-
value: n,
|
|
170
|
-
defaultValue: s,
|
|
171
|
-
onChange: l,
|
|
172
|
-
min: r,
|
|
173
|
-
max: u,
|
|
174
|
-
step: S = 1,
|
|
175
|
-
mode: p = "integer",
|
|
176
|
-
currency: R,
|
|
177
|
-
locale: A,
|
|
178
|
-
size: g = "md",
|
|
179
|
-
tone: V,
|
|
180
|
-
className: M,
|
|
181
|
-
id: a,
|
|
182
|
-
disabled: k,
|
|
183
|
-
onFocus: h,
|
|
184
|
-
onBlur: I,
|
|
185
|
-
onKeyDown: d,
|
|
186
|
-
...m
|
|
187
|
-
}, N) => {
|
|
188
|
-
const { t: H, i18n: Z } = Fe(), D = Ve(), ee = a ?? D.id, T = !!(D.disabled || k), te = A ?? Ee(Z.language) ?? Be(), j = Ae(te, p, R), {
|
|
189
|
-
decimalSeparator: P,
|
|
190
|
-
groupingSeparator: W,
|
|
191
|
-
format: B,
|
|
192
|
-
parse: O
|
|
193
|
-
} = j, _ = K(null), ne = Me(N, _), [re, se] = Se({
|
|
194
|
-
value: n,
|
|
195
|
-
defaultValue: s ?? null,
|
|
196
|
-
onChange: l
|
|
197
|
-
}), i = re ?? null, $ = K(i);
|
|
198
|
-
$.current = i;
|
|
199
|
-
const x = z(
|
|
200
|
-
(e) => {
|
|
201
|
-
const t = p === "percentage" ? e * 100 : e;
|
|
202
|
-
return (Number.isInteger(t) ? String(t) : t.toString()).replace(".", P);
|
|
203
|
-
},
|
|
204
|
-
[p, P]
|
|
205
|
-
), v = z(
|
|
206
|
-
(e) => e == null || Number.isNaN(e) ? "" : B(e),
|
|
207
|
-
[B]
|
|
208
|
-
), [E, c] = q(
|
|
209
|
-
() => v(i)
|
|
210
|
-
), y = K(!1), [oe, b] = q(!1), [U, C] = q(!1), L = z(
|
|
211
|
-
(e) => {
|
|
212
|
-
if (e >= "0" && e <= "9") return !0;
|
|
213
|
-
const t = e.codePointAt(0) ?? 0;
|
|
214
|
-
return t >= 1632 && t <= 1641 || t >= 1776 && t <= 1785 ? !0 : e === P || e === W || e === "-" || e === "−";
|
|
215
|
-
},
|
|
216
|
-
[P, W]
|
|
217
|
-
), ie = z(
|
|
218
|
-
(e) => {
|
|
219
|
-
let t = "";
|
|
220
|
-
for (const o of e)
|
|
221
|
-
L(o) && (t += o);
|
|
222
|
-
return t;
|
|
223
|
-
},
|
|
224
|
-
[L]
|
|
225
|
-
);
|
|
226
|
-
xe(() => {
|
|
227
|
-
!y.current && !U && c(v(i));
|
|
228
|
-
}, [i, v, U]);
|
|
229
|
-
const ae = oe || U || i !== null && (r !== void 0 && i < r || u !== void 0 && i > u), G = D.invalid || ae, ue = G ? "error" : V ?? "default", f = (e) => {
|
|
230
|
-
se(e);
|
|
231
|
-
}, w = (e) => {
|
|
232
|
-
let o = (i ?? 0) + S * e;
|
|
233
|
-
r !== void 0 && (o = Math.max(r, o)), u !== void 0 && (o = Math.min(u, o)), o = Le(o, S), f(o), b(!1), c(
|
|
234
|
-
y.current ? x(o) : v(o)
|
|
235
|
-
);
|
|
236
|
-
}, J = (e) => {
|
|
237
|
-
f(e), b(!1), c(
|
|
238
|
-
y.current ? x(e) : v(e)
|
|
239
|
-
);
|
|
240
|
-
}, le = (e) => {
|
|
241
|
-
if (d == null || d(e), e.defaultPrevented || T) return;
|
|
242
|
-
const { key: t, shiftKey: o } = e;
|
|
243
|
-
t === "ArrowUp" ? (e.preventDefault(), w(o ? 10 : 1)) : t === "ArrowDown" ? (e.preventDefault(), w(o ? -10 : -1)) : t === "PageUp" ? (e.preventDefault(), w(100)) : t === "PageDown" ? (e.preventDefault(), w(-100)) : t === "Home" && r !== void 0 ? (e.preventDefault(), J(r)) : t === "End" && u !== void 0 && (e.preventDefault(), J(u));
|
|
244
|
-
}, de = (e) => {
|
|
245
|
-
const t = ie(e.target.value);
|
|
246
|
-
if (c(t), t.trim() === "") {
|
|
247
|
-
f(null), b(!1), C(!1);
|
|
248
|
-
return;
|
|
249
|
-
}
|
|
250
|
-
const o = O(t);
|
|
251
|
-
Number.isNaN(o) || (f(o), C(!1));
|
|
252
|
-
}, ce = (e) => {
|
|
253
|
-
const { data: t } = e.nativeEvent;
|
|
254
|
-
typeof t != "string" || t.length !== 1 || L(t) || e.preventDefault();
|
|
255
|
-
}, fe = (e) => {
|
|
256
|
-
h == null || h(e), y.current = !0, i != null && c(x(i));
|
|
257
|
-
}, pe = (e) => {
|
|
258
|
-
if (I == null || I(e), y.current = !1, E.trim() === "") {
|
|
259
|
-
f(null), b(!1), C(!1), c("");
|
|
260
|
-
return;
|
|
261
|
-
}
|
|
262
|
-
const t = O(E);
|
|
263
|
-
if (Number.isNaN(t)) {
|
|
264
|
-
C(!0), b(!1), f(null);
|
|
265
|
-
return;
|
|
266
|
-
}
|
|
267
|
-
const o = r !== void 0 && t < r || u !== void 0 && t > u;
|
|
268
|
-
b(o), C(!1), f(t), c(v(t));
|
|
269
|
-
}, Q = (e) => {
|
|
270
|
-
e.preventDefault();
|
|
271
|
-
}, me = () => w(1), ve = () => w(-1), be = Y(
|
|
272
|
-
() => ({
|
|
273
|
-
getValue: () => $.current,
|
|
274
|
-
setValue: (e) => {
|
|
275
|
-
f(e), c(
|
|
276
|
-
e === null ? "" : y.current ? x(e) : v(e)
|
|
277
|
-
);
|
|
278
|
-
},
|
|
279
|
-
clear: () => {
|
|
280
|
-
f(null), c(""), b(!1);
|
|
281
|
-
},
|
|
282
|
-
focus: () => {
|
|
283
|
-
var e;
|
|
284
|
-
return (e = _.current) == null ? void 0 : e.focus();
|
|
285
|
-
}
|
|
286
|
-
}),
|
|
287
|
-
// The handle is reconstructed per render; consumers (the agent runtime)
|
|
288
|
-
// re-register only when the identity changes, which is a cheap no-op.
|
|
289
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
290
|
-
[x, v]
|
|
291
|
-
);
|
|
292
|
-
ke(ze, be, a);
|
|
293
|
-
const ge = T || r !== void 0 && i !== null && i <= r, he = T || u !== void 0 && i !== null && i >= u, Ne = i ?? void 0, ye = (p === "currency" || p === "percentage") && i !== null && i !== null ? B(i) : void 0, we = j.inputMode === "numeric" ? "[0-9]*" : void 0;
|
|
294
|
-
return /* @__PURE__ */ Ie(
|
|
295
|
-
"div",
|
|
296
|
-
{
|
|
297
|
-
className: je({
|
|
298
|
-
size: g,
|
|
299
|
-
tone: ue,
|
|
300
|
-
className: M
|
|
301
|
-
}),
|
|
302
|
-
"data-component": "number-input",
|
|
303
|
-
"data-component-id": a,
|
|
304
|
-
"data-mode": p,
|
|
305
|
-
children: [
|
|
306
|
-
/* @__PURE__ */ F(
|
|
307
|
-
"button",
|
|
308
|
-
{
|
|
309
|
-
type: "button",
|
|
310
|
-
tabIndex: -1,
|
|
311
|
-
"aria-label": H("inputs.number.decrement", "Decrement"),
|
|
312
|
-
onClick: ve,
|
|
313
|
-
onMouseDown: Q,
|
|
314
|
-
disabled: ge,
|
|
315
|
-
className: `${X} ds:ps-2 ds:pe-1`,
|
|
316
|
-
children: /* @__PURE__ */ F(Te, { "aria-hidden": "true", className: "ds:size-4" })
|
|
317
|
-
}
|
|
318
|
-
),
|
|
319
|
-
/* @__PURE__ */ F(
|
|
320
|
-
"input",
|
|
321
|
-
{
|
|
322
|
-
ref: ne,
|
|
323
|
-
id: ee,
|
|
324
|
-
type: "text",
|
|
325
|
-
role: "spinbutton",
|
|
326
|
-
inputMode: j.inputMode,
|
|
327
|
-
pattern: we,
|
|
328
|
-
autoComplete: "off",
|
|
329
|
-
value: E,
|
|
330
|
-
disabled: T,
|
|
331
|
-
"aria-valuemin": r,
|
|
332
|
-
"aria-valuemax": u,
|
|
333
|
-
"aria-valuenow": Ne,
|
|
334
|
-
"aria-valuetext": ye,
|
|
335
|
-
"aria-invalid": G || void 0,
|
|
336
|
-
"aria-required": D.required || void 0,
|
|
337
|
-
"aria-describedby": D.describedBy || void 0,
|
|
338
|
-
onBeforeInput: ce,
|
|
339
|
-
onChange: de,
|
|
340
|
-
onFocus: fe,
|
|
341
|
-
onBlur: pe,
|
|
342
|
-
onKeyDown: le,
|
|
343
|
-
className: "ds:flex-1 ds:w-full ds:min-w-0 ds:bg-transparent ds:outline-none ds:ps-2 ds:pe-2 ds:text-start ds:tabular-nums ds:disabled:cursor-not-allowed",
|
|
344
|
-
...m
|
|
345
|
-
}
|
|
346
|
-
),
|
|
347
|
-
/* @__PURE__ */ F(
|
|
348
|
-
"button",
|
|
349
|
-
{
|
|
350
|
-
type: "button",
|
|
351
|
-
tabIndex: -1,
|
|
352
|
-
"aria-label": H("inputs.number.increment", "Increment"),
|
|
353
|
-
onClick: me,
|
|
354
|
-
onMouseDown: Q,
|
|
355
|
-
disabled: he,
|
|
356
|
-
className: `${X} ds:ps-1 ds:pe-2`,
|
|
357
|
-
children: /* @__PURE__ */ F(Pe, { "aria-hidden": "true", className: "ds:size-4" })
|
|
358
|
-
}
|
|
359
|
-
)
|
|
360
|
-
]
|
|
361
|
-
}
|
|
362
|
-
);
|
|
363
|
-
}
|
|
364
|
-
);
|
|
365
|
-
Ke.displayName = "NumberInput";
|
|
366
|
-
export {
|
|
367
|
-
Ke as N,
|
|
368
|
-
Ae as u
|
|
369
|
-
};
|
|
370
|
-
//# sourceMappingURL=number-input-DOe5VYei.js.map
|
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
import { jsx as e, jsxs as o, Fragment as J } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as L, useId as O, useMemo as z, useRef as B, useState as Q } from "react";
|
|
3
|
-
import * as U from "@radix-ui/react-radio-group";
|
|
4
|
-
import { c as W } from "./index-D2ZczOXr.js";
|
|
5
|
-
import { a as S } from "./radio-TWf9Q-mp.js";
|
|
6
|
-
import { c as X } from "./compose-refs-C0k0tdqF.js";
|
|
7
|
-
import { u as Y } from "./registry-DvAUVLHh.js";
|
|
8
|
-
import { u as Z } from "./use-direction-Dp8h70PP.js";
|
|
9
|
-
import { C as E } from "./circle-alert-rGDZ73Wh.js";
|
|
10
|
-
const ee = {
|
|
11
|
-
id: "radio-group",
|
|
12
|
-
capabilities: ["select_single"],
|
|
13
|
-
state: {
|
|
14
|
-
value: {
|
|
15
|
-
type: "string",
|
|
16
|
-
descriptionKey: "ui.agent.radioGroup.state.value",
|
|
17
|
-
description: "Currently selected radio value, or empty string when none.",
|
|
18
|
-
read: (t) => t.getValue()
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
actions: {
|
|
22
|
-
set_value: {
|
|
23
|
-
safety: "write",
|
|
24
|
-
argsType: "{ value: string }",
|
|
25
|
-
descriptionKey: "ui.agent.radioGroup.actions.setValue",
|
|
26
|
-
description: "Select the radio with the given value.",
|
|
27
|
-
invoke: (t, s) => {
|
|
28
|
-
t.setValue(s.value);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
domHooks: {
|
|
33
|
-
root: {
|
|
34
|
-
attr: "data-component",
|
|
35
|
-
value: "radio-group",
|
|
36
|
-
description: "Marks the RadioGroup root."
|
|
37
|
-
},
|
|
38
|
-
instanceId: {
|
|
39
|
-
attr: "data-component-id",
|
|
40
|
-
sourceProp: "id",
|
|
41
|
-
description: "Sourced from the id prop."
|
|
42
|
-
},
|
|
43
|
-
item: {
|
|
44
|
-
attr: "data-option-id",
|
|
45
|
-
description: "Stable opaque value emitted on each rendered Radio child."
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}, se = W("ds:flex", {
|
|
49
|
-
variants: {
|
|
50
|
-
variant: {
|
|
51
|
-
vertical: "ds:flex-col ds:gap-[var(--spacing-sm)]",
|
|
52
|
-
horizontal: "ds:flex-row ds:flex-wrap ds:gap-[var(--spacing-md)]",
|
|
53
|
-
card: "ds:flex-col ds:gap-[var(--spacing-md)]"
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
defaultVariants: {
|
|
57
|
-
variant: "vertical"
|
|
58
|
-
}
|
|
59
|
-
}), te = L(
|
|
60
|
-
({
|
|
61
|
-
children: t,
|
|
62
|
-
variant: s = "vertical",
|
|
63
|
-
label: n,
|
|
64
|
-
labelEnd: l,
|
|
65
|
-
description: c,
|
|
66
|
-
error: a,
|
|
67
|
-
required: p,
|
|
68
|
-
disabled: $,
|
|
69
|
-
className: A,
|
|
70
|
-
id: u,
|
|
71
|
-
value: m,
|
|
72
|
-
defaultValue: v,
|
|
73
|
-
onValueChange: i,
|
|
74
|
-
...C
|
|
75
|
-
}, P) => {
|
|
76
|
-
const f = O(), g = `${f}-legend`, h = `${f}-description`, x = `${f}-error`, H = [c ? h : null, a ? x : null].filter(Boolean).join(" ") || void 0, K = n ? g : void 0, M = s === "horizontal" ? "horizontal" : "vertical", y = z(
|
|
77
|
-
() => ({ variant: s }),
|
|
78
|
-
[s]
|
|
79
|
-
), R = c ? /* @__PURE__ */ e("p", { id: h, className: "type-body-sm ds:text-muted-foreground", children: c }) : null, N = a ? /* @__PURE__ */ o(
|
|
80
|
-
"p",
|
|
81
|
-
{
|
|
82
|
-
id: x,
|
|
83
|
-
role: "alert",
|
|
84
|
-
className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)] type-body-sm ds:text-destructive",
|
|
85
|
-
children: [
|
|
86
|
-
/* @__PURE__ */ e(E, { "aria-hidden": "true", className: "ds:size-4 ds:shrink-0" }),
|
|
87
|
-
/* @__PURE__ */ e("span", { children: a })
|
|
88
|
-
]
|
|
89
|
-
}
|
|
90
|
-
) : null, b = B(null), T = X(P, b), _ = Z(b), r = m !== void 0, [D, F] = Q(
|
|
91
|
-
v ?? ""
|
|
92
|
-
), w = r ? m ?? "" : D, G = B(w);
|
|
93
|
-
G.current = w;
|
|
94
|
-
const V = (d) => {
|
|
95
|
-
r || F(d), i == null || i(d);
|
|
96
|
-
}, q = z(
|
|
97
|
-
() => ({
|
|
98
|
-
getValue: () => G.current,
|
|
99
|
-
setValue: (d) => V(d)
|
|
100
|
-
}),
|
|
101
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
102
|
-
[r, i]
|
|
103
|
-
);
|
|
104
|
-
Y(ee, q, u);
|
|
105
|
-
const I = /* @__PURE__ */ e(
|
|
106
|
-
U.Root,
|
|
107
|
-
{
|
|
108
|
-
ref: T,
|
|
109
|
-
id: u,
|
|
110
|
-
orientation: M,
|
|
111
|
-
dir: _,
|
|
112
|
-
disabled: $,
|
|
113
|
-
required: p,
|
|
114
|
-
value: r ? m : void 0,
|
|
115
|
-
defaultValue: r ? void 0 : v,
|
|
116
|
-
onValueChange: V,
|
|
117
|
-
"aria-labelledby": K,
|
|
118
|
-
"aria-describedby": H,
|
|
119
|
-
"aria-invalid": !!a || void 0,
|
|
120
|
-
"aria-required": p || void 0,
|
|
121
|
-
className: se({ variant: s, className: A }),
|
|
122
|
-
"data-component": "radio-group",
|
|
123
|
-
"data-component-id": u,
|
|
124
|
-
...C,
|
|
125
|
-
children: t
|
|
126
|
-
}
|
|
127
|
-
), k = "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:min-w-0", j = /* @__PURE__ */ o(J, { children: [
|
|
128
|
-
n,
|
|
129
|
-
p ? /* @__PURE__ */ e(
|
|
130
|
-
"span",
|
|
131
|
-
{
|
|
132
|
-
"aria-hidden": "true",
|
|
133
|
-
className: "ds:text-destructive ds:ms-[var(--spacing-xs)]",
|
|
134
|
-
children: "*"
|
|
135
|
-
}
|
|
136
|
-
) : null
|
|
137
|
-
] });
|
|
138
|
-
return n ? /* @__PURE__ */ e(S.Provider, { value: y, children: /* @__PURE__ */ o(
|
|
139
|
-
"fieldset",
|
|
140
|
-
{
|
|
141
|
-
role: "presentation",
|
|
142
|
-
className: `${k} ds:border-0 ds:p-0 ds:m-0`,
|
|
143
|
-
children: [
|
|
144
|
-
/* @__PURE__ */ e(
|
|
145
|
-
"legend",
|
|
146
|
-
{
|
|
147
|
-
id: g,
|
|
148
|
-
className: l ? "type-label ds:text-foreground ds:p-0 ds:w-full" : "type-label ds:text-foreground ds:p-0",
|
|
149
|
-
children: l ? /* @__PURE__ */ o("span", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
|
|
150
|
-
/* @__PURE__ */ e("span", { children: j }),
|
|
151
|
-
/* @__PURE__ */ e("span", { className: "ds:inline-flex ds:shrink-0 ds:items-center", children: l })
|
|
152
|
-
] }) : j
|
|
153
|
-
}
|
|
154
|
-
),
|
|
155
|
-
R,
|
|
156
|
-
I,
|
|
157
|
-
N
|
|
158
|
-
]
|
|
159
|
-
}
|
|
160
|
-
) }) : /* @__PURE__ */ e(S.Provider, { value: y, children: /* @__PURE__ */ o("div", { className: k, children: [
|
|
161
|
-
R,
|
|
162
|
-
I,
|
|
163
|
-
N
|
|
164
|
-
] }) });
|
|
165
|
-
}
|
|
166
|
-
);
|
|
167
|
-
te.displayName = "RadioGroup";
|
|
168
|
-
export {
|
|
169
|
-
te as R
|
|
170
|
-
};
|
|
171
|
-
//# sourceMappingURL=radio-group-BmIqhIT2.js.map
|