@alfadocs/ui-kit 0.17.1 → 0.17.3
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/{accordion-DOmxGEWU.js → accordion-CNcodXuO.js} +6 -6
- package/dist/_chunks/{ai-prompt-input-DEiQwIMn.js → ai-prompt-input-B-w5Rx3V.js} +184 -181
- package/dist/_chunks/{alert-pgdXrEO5.js → alert-DBnawbmf.js} +64 -59
- package/dist/_chunks/{audio-recorder-CRh4uyFL.js → audio-recorder-DNkQLW1G.js} +3 -3
- package/dist/_chunks/{autocomplete-mOg7WLOh.js → autocomplete-BxfabhZ8.js} +167 -164
- package/dist/_chunks/{balance-cell-renderer-DWWtX-VM.js → balance-cell-renderer-DJB6WDPe.js} +2 -2
- package/dist/_chunks/{chat-input-UK-bXU7u.js → chat-input-B3XmFGDw.js} +123 -122
- package/dist/_chunks/checkbox-group-Bwmt1ovQ.js +213 -0
- package/dist/_chunks/{checkbox-D5EHnB14.js → checkbox-mwbrPZDY.js} +75 -70
- package/dist/_chunks/{collapsible-CuxUBoHJ.js → collapsible-hHiyZp0b.js} +61 -63
- package/dist/_chunks/{color-picker-BPfcByHH.js → color-picker-Bm-gzpsh.js} +2 -2
- package/dist/_chunks/{combobox-D5tWe0t_.js → combobox-Da9eq00i.js} +214 -211
- package/dist/_chunks/{copy-field-BCHAZ8QV.js → copy-field-BAF4mt9h.js} +95 -132
- package/dist/_chunks/{date-picker-BlhtBhPo.js → date-picker-BIoSLRly.js} +222 -219
- package/dist/_chunks/{date-range-picker-C2hRu_Ke.js → date-range-picker-9gANFNG9.js} +81 -78
- package/dist/_chunks/{date-time-picker-B67mPZmP.js → date-time-picker-DG7BiGdb.js} +98 -95
- package/dist/_chunks/{dialog-DRp6Dejy.js → dialog-DUomPCRS.js} +69 -71
- package/dist/_chunks/{dropdown-menu-dyV7gHh_.js → dropdown-menu-DZxwF23X.js} +108 -110
- package/dist/_chunks/{freemium-paywall-BTEiVkes.js → freemium-paywall-DXc7XlGE.js} +98 -97
- package/dist/_chunks/{leo-sidebar-D3TuyH5_.js → leo-sidebar-DIsiTju3.js} +2 -2
- package/dist/_chunks/{list-DcjV0m5B.js → list-BdvDctBz.js} +184 -180
- package/dist/_chunks/{message-tray-Fsend-du.js → message-tray-BNAS8al4.js} +111 -111
- package/dist/_chunks/{multi-select-DooDzQIp.js → multi-select-CyspR5ZF.js} +157 -154
- package/dist/_chunks/{navigation-menu-DdufF-_4.js → navigation-menu-CyS1fBJ7.js} +85 -87
- package/dist/_chunks/{notification-tray-C3dYdLAF.js → notification-tray-D_69dXFY.js} +114 -114
- package/dist/_chunks/{number-input-DH00o0DN.js → number-input-BZXu6bPY.js} +92 -89
- package/dist/_chunks/{otp-input-BBXYvLx5.js → otp-input-BDF_iNpa.js} +92 -93
- package/dist/_chunks/{pagination-F1ei4khE.js → pagination-BWaXF7W0.js} +194 -211
- package/dist/_chunks/{patient-shell-BE0CdPOJ.js → patient-shell-BOOaWZA9.js} +3 -3
- package/dist/_chunks/{payment-form-CI77oIx1.js → payment-form-BjkuQeqR.js} +2 -2
- package/dist/_chunks/{pdf-viewer-CnEJvmXC.js → pdf-viewer-BG_nsFT5.js} +2 -2
- package/dist/_chunks/{radio-group-Cz1a4QCA.js → radio-group-BHZOxrIK.js} +4 -4
- package/dist/_chunks/{select-Ca6ibiDL.js → select-C92AT_OZ.js} +7 -7
- package/dist/_chunks/{sidebar-D8Lq065m.js → sidebar-BqzlRBvC.js} +271 -291
- package/dist/_chunks/{slider-CkR6CLun.js → slider-CfEzeseL.js} +4 -4
- package/dist/_chunks/{tabs-CRCyPpJo.js → tabs-aEQfQV3x.js} +8 -8
- package/dist/_chunks/{theme-toggle-B3meAb3y.js → theme-toggle-BswYl0Yp.js} +2 -2
- package/dist/_chunks/use-controllable-state-BiY4xTzM.js +23 -0
- package/dist/_chunks/use-copy-to-clipboard-Cyfc_dlv.js +43 -0
- package/dist/_chunks/use-persistent-state-i23OWy6G.js +24 -0
- package/dist/_chunks/{warning-stack-CeRihME9.js → warning-stack-CDH9TudY.js} +2 -2
- package/dist/_chunks/{workflow-map-D3MvrsZV.js → workflow-map-BeKe23uw.js} +3 -3
- package/dist/agent-catalog.json +1 -1
- package/dist/components/_shared/use-debounced-callback.d.ts +1 -5
- package/dist/components/_shared/use-direction.d.ts +1 -18
- package/dist/components/_shared/use-focus-trap.d.ts +1 -31
- package/dist/components/accordion/index.js +1 -1
- package/dist/components/ai-prompt-input/index.js +1 -1
- package/dist/components/alert/index.js +1 -1
- package/dist/components/audio-recorder/index.js +1 -1
- package/dist/components/autocomplete/index.js +1 -1
- package/dist/components/chat-input/index.js +1 -1
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/checkbox-group/index.js +1 -1
- package/dist/components/collapsible/index.js +1 -1
- package/dist/components/color-picker/index.js +1 -1
- package/dist/components/combobox/index.js +1 -1
- package/dist/components/command-palette/command-palette.d.ts +1 -1
- package/dist/components/copy-field/index.js +1 -1
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/date-picker/index.js +1 -1
- package/dist/components/date-range-picker/index.js +1 -1
- package/dist/components/date-time-picker/index.js +1 -1
- package/dist/components/dialog/index.js +1 -1
- package/dist/components/dropdown-menu/index.js +1 -1
- package/dist/components/freemium-paywall/index.js +1 -1
- package/dist/components/icon-button-group/icon-button-group.d.ts +14 -14
- package/dist/components/list/index.js +1 -1
- package/dist/components/message-tray/index.js +1 -1
- package/dist/components/multi-select/index.js +1 -1
- package/dist/components/navigation-menu/index.js +1 -1
- package/dist/components/notification-tray/index.js +1 -1
- package/dist/components/number-input/index.js +1 -1
- package/dist/components/otp-input/index.js +1 -1
- package/dist/components/pagination/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/radio-group/index.js +1 -1
- package/dist/components/select/index.js +1 -1
- package/dist/components/sidebar/index.js +8 -7
- package/dist/components/sidebar/sidebar.d.ts +1 -1
- package/dist/components/slider/index.js +1 -1
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/theme-toggle/index.js +1 -1
- package/dist/components/warning-stack/index.js +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/hooks/index.d.ts +8 -0
- package/dist/hooks/index.js +98 -15
- package/dist/hooks/use-debounced-callback.d.ts +19 -0
- package/dist/hooks/use-debounced-value.d.ts +16 -0
- package/dist/hooks/use-direction.d.ts +19 -0
- package/dist/hooks/use-focus-trap.d.ts +32 -0
- package/dist/hooks/use-isomorphic-layout-effect.d.ts +13 -0
- package/dist/hooks/use-persistent-state.d.ts +16 -0
- package/dist/index.js +493 -492
- package/dist/patterns/leo-assistant/index.js +1 -1
- package/dist/patterns/patient-shell/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +4 -2
- package/dist/_chunks/checkbox-group-Qkm3Rg1S.js +0 -208
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { c as
|
|
4
|
-
import { useTranslation as
|
|
1
|
+
import { jsxs as E, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as a, useState as R, useRef as V, useCallback as z, Children as B, isValidElement as D } from "react";
|
|
3
|
+
import { c as F } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as L } from "react-i18next";
|
|
5
|
+
import { u as W } from "./use-controllable-state-BiY4xTzM.js";
|
|
5
6
|
import { X } from "./x-CCcI3eJp.js";
|
|
6
7
|
import { C as G } from "./circle-x-Du2CmjaU.js";
|
|
7
8
|
import { T as H } from "./triangle-alert-CBPUIzQo.js";
|
|
8
9
|
import { C as M } from "./circle-check-9AeSgJD_.js";
|
|
9
10
|
import { I as P } from "./info-B9XNKn05.js";
|
|
10
|
-
const U =
|
|
11
|
+
const U = F(
|
|
11
12
|
[
|
|
12
13
|
// Default `items-center` keeps the icon + dismiss optically aligned
|
|
13
14
|
// with a single-line description. The `data-[has-title=true]`
|
|
@@ -92,81 +93,85 @@ const U = L(
|
|
|
92
93
|
role: "alert",
|
|
93
94
|
live: "assertive"
|
|
94
95
|
}
|
|
95
|
-
}, c =
|
|
96
|
-
({ as:
|
|
97
|
-
|
|
96
|
+
}, c = a(
|
|
97
|
+
({ as: e = "h5", className: s, ...o }, n) => /* @__PURE__ */ t(
|
|
98
|
+
e,
|
|
98
99
|
{
|
|
99
|
-
ref:
|
|
100
|
-
className: ["type-title-item",
|
|
101
|
-
...
|
|
100
|
+
ref: n,
|
|
101
|
+
className: ["type-title-item", s].filter(Boolean).join(" "),
|
|
102
|
+
...o
|
|
102
103
|
}
|
|
103
104
|
)
|
|
104
105
|
);
|
|
105
106
|
c.displayName = "Alert.Title";
|
|
106
|
-
const
|
|
107
|
+
const x = a(({ className: e, ...s }, o) => /* @__PURE__ */ t(
|
|
107
108
|
"p",
|
|
108
109
|
{
|
|
109
|
-
ref:
|
|
110
|
+
ref: o,
|
|
110
111
|
className: [
|
|
111
112
|
"ds:[[data-has-title=true]_&]:mt-[var(--spacing-xs)] type-body-sm",
|
|
112
|
-
|
|
113
|
+
e
|
|
113
114
|
].filter(Boolean).join(" "),
|
|
114
|
-
...
|
|
115
|
+
...s
|
|
115
116
|
}
|
|
116
117
|
));
|
|
117
|
-
|
|
118
|
-
const
|
|
119
|
-
({ className:
|
|
118
|
+
x.displayName = "Alert.Description";
|
|
119
|
+
const _ = a(
|
|
120
|
+
({ className: e, ...s }, o) => /* @__PURE__ */ t(
|
|
120
121
|
"div",
|
|
121
122
|
{
|
|
122
|
-
ref:
|
|
123
|
+
ref: o,
|
|
123
124
|
className: [
|
|
124
125
|
"ds:mt-[var(--spacing-sm)] ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]",
|
|
125
|
-
|
|
126
|
+
e
|
|
126
127
|
].filter(Boolean).join(" "),
|
|
127
|
-
...
|
|
128
|
+
...s
|
|
128
129
|
}
|
|
129
130
|
)
|
|
130
131
|
);
|
|
131
|
-
|
|
132
|
-
const
|
|
132
|
+
_.displayName = "Alert.Action";
|
|
133
|
+
const w = a(
|
|
133
134
|
({
|
|
134
|
-
variant:
|
|
135
|
-
dismissible:
|
|
136
|
-
open:
|
|
137
|
-
onOpenChange:
|
|
135
|
+
variant: e = "info",
|
|
136
|
+
dismissible: s = !1,
|
|
137
|
+
open: o,
|
|
138
|
+
onOpenChange: n,
|
|
138
139
|
icon: m,
|
|
139
|
-
live:
|
|
140
|
-
className:
|
|
140
|
+
live: C,
|
|
141
|
+
className: A,
|
|
141
142
|
children: u,
|
|
142
|
-
...
|
|
143
|
-
},
|
|
144
|
-
const { t:
|
|
143
|
+
...N
|
|
144
|
+
}, y) => {
|
|
145
|
+
const { t: T } = L(), [j, k] = W({
|
|
146
|
+
value: o,
|
|
147
|
+
defaultValue: !0,
|
|
148
|
+
onChange: n
|
|
149
|
+
}), I = j ?? !0, [f, g] = R(!1), i = V(null), O = z(() => {
|
|
145
150
|
if (typeof window > "u") return 200;
|
|
146
|
-
const
|
|
147
|
-
if (!
|
|
148
|
-
const
|
|
149
|
-
return Number.isFinite(l) ?
|
|
151
|
+
const r = window.getComputedStyle(document.documentElement).getPropertyValue("--animation-duration");
|
|
152
|
+
if (!r) return 200;
|
|
153
|
+
const b = r.trim(), l = parseFloat(b);
|
|
154
|
+
return Number.isFinite(l) ? b.endsWith("ms") ? l : l * 1e3 : 200;
|
|
150
155
|
}, []);
|
|
151
|
-
if (!
|
|
152
|
-
const d = J[
|
|
153
|
-
(
|
|
154
|
-
),
|
|
155
|
-
f || (
|
|
156
|
-
|
|
157
|
-
},
|
|
156
|
+
if (!I) return null;
|
|
157
|
+
const d = J[e], v = m !== void 0 ? m : d.icon, p = B.toArray(u).some(
|
|
158
|
+
(r) => D(r) && r.type === c
|
|
159
|
+
), S = () => {
|
|
160
|
+
f || (g(!0), i.current && clearTimeout(i.current), i.current = setTimeout(() => {
|
|
161
|
+
g(!1), k(!1);
|
|
162
|
+
}, O()));
|
|
158
163
|
};
|
|
159
|
-
return /* @__PURE__ */
|
|
164
|
+
return /* @__PURE__ */ E(
|
|
160
165
|
"div",
|
|
161
166
|
{
|
|
162
|
-
ref:
|
|
167
|
+
ref: y,
|
|
163
168
|
role: d.role,
|
|
164
|
-
"aria-live":
|
|
169
|
+
"aria-live": C ?? d.live,
|
|
165
170
|
"data-component": "alert",
|
|
166
|
-
"data-has-title":
|
|
171
|
+
"data-has-title": p ? "true" : "false",
|
|
167
172
|
"data-state": f ? "closing" : "open",
|
|
168
173
|
className: [
|
|
169
|
-
U({ variant:
|
|
174
|
+
U({ variant: e, className: A }),
|
|
170
175
|
// Entry: fade + slide-down on mount. Exit: fade + slide-up + slight
|
|
171
176
|
// scale when dismissed. Driven by `tw-animate-css`. Respects
|
|
172
177
|
// `prefers-reduced-motion` via `motion-safe:` and zeroes under the
|
|
@@ -180,16 +185,16 @@ const N = i(
|
|
|
180
185
|
"ds:motion-safe:data-[state=closing]:fill-mode-forwards",
|
|
181
186
|
"ds:motion-safe:duration-[var(--animation-duration)]"
|
|
182
187
|
].join(" "),
|
|
183
|
-
...
|
|
188
|
+
...N,
|
|
184
189
|
children: [
|
|
185
|
-
|
|
190
|
+
v ? /* @__PURE__ */ t("span", { className: p ? $ : h, children: v }) : null,
|
|
186
191
|
/* @__PURE__ */ t("div", { className: "ds:flex-1 ds:min-w-0", children: u }),
|
|
187
|
-
|
|
192
|
+
s ? /* @__PURE__ */ t(
|
|
188
193
|
"button",
|
|
189
194
|
{
|
|
190
195
|
type: "button",
|
|
191
|
-
"aria-label":
|
|
192
|
-
onClick:
|
|
196
|
+
"aria-label": T("common.close", "Close"),
|
|
197
|
+
onClick: S,
|
|
193
198
|
className: q,
|
|
194
199
|
children: /* @__PURE__ */ t(X, { "aria-hidden": "true", className: "ds:size-4" })
|
|
195
200
|
}
|
|
@@ -199,13 +204,13 @@ const N = i(
|
|
|
199
204
|
);
|
|
200
205
|
}
|
|
201
206
|
);
|
|
202
|
-
|
|
203
|
-
const
|
|
207
|
+
w.displayName = "Alert";
|
|
208
|
+
const nt = Object.assign(w, {
|
|
204
209
|
Title: c,
|
|
205
|
-
Description:
|
|
206
|
-
Action:
|
|
210
|
+
Description: x,
|
|
211
|
+
Action: _
|
|
207
212
|
});
|
|
208
213
|
export {
|
|
209
|
-
|
|
214
|
+
nt as A
|
|
210
215
|
};
|
|
211
|
-
//# sourceMappingURL=alert-
|
|
216
|
+
//# sourceMappingURL=alert-DBnawbmf.js.map
|
|
@@ -4,9 +4,9 @@ import { c as ce } from "./index-D2ZczOXr.js";
|
|
|
4
4
|
import { useTranslation as oe } from "react-i18next";
|
|
5
5
|
import { B as G } from "./button-DD_0Xdmr.js";
|
|
6
6
|
import { I as N } from "./icon-button-C4CGcYuz.js";
|
|
7
|
-
import { S as ue } from "./select-
|
|
7
|
+
import { S as ue } from "./select-C92AT_OZ.js";
|
|
8
8
|
import { A as pe } from "./audio-visualiser-I-T4Z7EU.js";
|
|
9
|
-
import { A as F } from "./alert-
|
|
9
|
+
import { A as F } from "./alert-DBnawbmf.js";
|
|
10
10
|
import { u as le } from "./registry-C9nwlNyL.js";
|
|
11
11
|
import { c as V } from "./createLucideIcon-CrFbzy84.js";
|
|
12
12
|
import { S as me } from "./square-CZoGU14v.js";
|
|
@@ -454,4 +454,4 @@ export {
|
|
|
454
454
|
Ne as A,
|
|
455
455
|
Re as a
|
|
456
456
|
};
|
|
457
|
-
//# sourceMappingURL=audio-recorder-
|
|
457
|
+
//# sourceMappingURL=audio-recorder-DNkQLW1G.js.map
|