@fayz-ai/ui 0.9.0-next.0 → 0.9.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/{chunk-YLQGUJAQ.js → chunk-S5KNM4D2.js} +103 -45
- package/dist/chunk-S5KNM4D2.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/primitives/index.d.ts +1 -0
- package/dist/primitives/index.d.ts.map +1 -1
- package/dist/primitives/index.js +1 -1
- package/dist/primitives/phone-link.d.ts +35 -0
- package/dist/primitives/phone-link.d.ts.map +1 -0
- package/package.json +3 -3
- package/src/index.ts +4 -0
- package/src/primitives/index.ts +1 -0
- package/src/primitives/phone-link.tsx +138 -0
- package/dist/chunk-YLQGUJAQ.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useSaveBarVisible, useCrossModuleBack, useBackHandler } from './chunk-75EFDLST.js';
|
|
2
2
|
import { DataTable, SegmentedControl } from './chunk-G6OKZ7WL.js';
|
|
3
3
|
import { cn, Button } from './chunk-YRVE4FOD.js';
|
|
4
|
-
import * as
|
|
4
|
+
import * as React11 from 'react';
|
|
5
5
|
import { useState, useRef, useEffect, useMemo, useCallback } from 'react';
|
|
6
6
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
7
7
|
import { cva } from 'class-variance-authority';
|
|
@@ -17,9 +17,9 @@ import { createPortal } from 'react-dom';
|
|
|
17
17
|
import { useTranslation, getCurrentLocale } from '@fayz-ai/core';
|
|
18
18
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
19
19
|
|
|
20
|
-
var Input =
|
|
20
|
+
var Input = React11.forwardRef(
|
|
21
21
|
({ className, type, error, description, id, ...props }, ref) => {
|
|
22
|
-
const inputId = id ??
|
|
22
|
+
const inputId = id ?? React11.useId();
|
|
23
23
|
const descriptionId = description ? `${inputId}-description` : void 0;
|
|
24
24
|
const errorId = error ? `${inputId}-error` : void 0;
|
|
25
25
|
return /* @__PURE__ */ jsxs("div", { className: "w-full", children: [
|
|
@@ -107,7 +107,7 @@ var Modal = DialogPrimitive.Root;
|
|
|
107
107
|
var ModalTrigger = DialogPrimitive.Trigger;
|
|
108
108
|
var ModalClose = DialogPrimitive.Close;
|
|
109
109
|
var ModalPortal = DialogPrimitive.Portal;
|
|
110
|
-
var ModalOverlay =
|
|
110
|
+
var ModalOverlay = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
111
111
|
DialogPrimitive.Overlay,
|
|
112
112
|
{
|
|
113
113
|
ref,
|
|
@@ -120,7 +120,7 @@ var ModalOverlay = React10.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
120
120
|
}
|
|
121
121
|
));
|
|
122
122
|
ModalOverlay.displayName = "ModalOverlay";
|
|
123
|
-
var ModalContent =
|
|
123
|
+
var ModalContent = React11.forwardRef(({ className, children, size = "lg", hideClose, noPadding, onPointerDownOutside, onInteractOutside, onCloseAutoFocus, ...props }, ref) => /* @__PURE__ */ jsx(ModalPortal, { children: /* @__PURE__ */ jsx(ModalOverlay, { children: /* @__PURE__ */ jsxs(
|
|
124
124
|
DialogPrimitive.Content,
|
|
125
125
|
{
|
|
126
126
|
ref,
|
|
@@ -172,9 +172,9 @@ function ModalBody({ className, ...props }) {
|
|
|
172
172
|
function ModalFooter({ className, ...props }) {
|
|
173
173
|
return /* @__PURE__ */ jsx("div", { className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2 shrink-0", className), ...props });
|
|
174
174
|
}
|
|
175
|
-
var ModalTitle =
|
|
175
|
+
var ModalTitle = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(DialogPrimitive.Title, { ref, className: cn("text-lg font-semibold leading-none tracking-tight", className), ...props }));
|
|
176
176
|
ModalTitle.displayName = "ModalTitle";
|
|
177
|
-
var ModalDescription =
|
|
177
|
+
var ModalDescription = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(DialogPrimitive.Description, { ref, className: cn("text-sm text-muted-foreground", className), ...props }));
|
|
178
178
|
ModalDescription.displayName = "ModalDescription";
|
|
179
179
|
var COLOR_CLASSES = {
|
|
180
180
|
primary: "border-primary bg-primary text-primary-foreground",
|
|
@@ -182,7 +182,7 @@ var COLOR_CLASSES = {
|
|
|
182
182
|
warning: "border-warning bg-warning text-white",
|
|
183
183
|
destructive: "border-destructive bg-destructive text-destructive-foreground"
|
|
184
184
|
};
|
|
185
|
-
var Checkbox =
|
|
185
|
+
var Checkbox = React11.forwardRef(
|
|
186
186
|
({ checked = false, onChange, disabled, className, color = "primary", id, ...props }, ref) => {
|
|
187
187
|
return /* @__PURE__ */ jsx(
|
|
188
188
|
"button",
|
|
@@ -211,7 +211,7 @@ Checkbox.displayName = "Checkbox";
|
|
|
211
211
|
var Select = SelectPrimitive.Root;
|
|
212
212
|
var SelectGroup = SelectPrimitive.Group;
|
|
213
213
|
var SelectValue = SelectPrimitive.Value;
|
|
214
|
-
var SelectTrigger =
|
|
214
|
+
var SelectTrigger = React11.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
215
215
|
SelectPrimitive.Trigger,
|
|
216
216
|
{
|
|
217
217
|
ref,
|
|
@@ -227,7 +227,7 @@ var SelectTrigger = React10.forwardRef(({ className, children, ...props }, ref)
|
|
|
227
227
|
}
|
|
228
228
|
));
|
|
229
229
|
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
230
|
-
var SelectScrollUpButton =
|
|
230
|
+
var SelectScrollUpButton = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
231
231
|
SelectPrimitive.ScrollUpButton,
|
|
232
232
|
{
|
|
233
233
|
ref,
|
|
@@ -240,7 +240,7 @@ var SelectScrollUpButton = React10.forwardRef(({ className, ...props }, ref) =>
|
|
|
240
240
|
}
|
|
241
241
|
));
|
|
242
242
|
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
243
|
-
var SelectScrollDownButton =
|
|
243
|
+
var SelectScrollDownButton = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
244
244
|
SelectPrimitive.ScrollDownButton,
|
|
245
245
|
{
|
|
246
246
|
ref,
|
|
@@ -253,7 +253,7 @@ var SelectScrollDownButton = React10.forwardRef(({ className, ...props }, ref) =
|
|
|
253
253
|
}
|
|
254
254
|
));
|
|
255
255
|
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
256
|
-
var SelectContent =
|
|
256
|
+
var SelectContent = React11.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
|
|
257
257
|
SelectPrimitive.Content,
|
|
258
258
|
{
|
|
259
259
|
ref,
|
|
@@ -281,7 +281,7 @@ var SelectContent = React10.forwardRef(({ className, children, position = "poppe
|
|
|
281
281
|
}
|
|
282
282
|
) }));
|
|
283
283
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
284
|
-
var SelectLabel =
|
|
284
|
+
var SelectLabel = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
285
285
|
SelectPrimitive.Label,
|
|
286
286
|
{
|
|
287
287
|
ref,
|
|
@@ -290,7 +290,7 @@ var SelectLabel = React10.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
290
290
|
}
|
|
291
291
|
));
|
|
292
292
|
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
293
|
-
var SelectItem =
|
|
293
|
+
var SelectItem = React11.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
294
294
|
SelectPrimitive.Item,
|
|
295
295
|
{
|
|
296
296
|
ref,
|
|
@@ -306,7 +306,7 @@ var SelectItem = React10.forwardRef(({ className, children, ...props }, ref) =>
|
|
|
306
306
|
}
|
|
307
307
|
));
|
|
308
308
|
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
309
|
-
var SelectSeparator =
|
|
309
|
+
var SelectSeparator = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
310
310
|
SelectPrimitive.Separator,
|
|
311
311
|
{
|
|
312
312
|
ref,
|
|
@@ -344,7 +344,7 @@ function ToastProvider({
|
|
|
344
344
|
);
|
|
345
345
|
}
|
|
346
346
|
var Tabs = TabsPrimitive.Root;
|
|
347
|
-
var TabsList =
|
|
347
|
+
var TabsList = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
348
348
|
TabsPrimitive.List,
|
|
349
349
|
{
|
|
350
350
|
ref,
|
|
@@ -356,7 +356,7 @@ var TabsList = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
356
356
|
}
|
|
357
357
|
));
|
|
358
358
|
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
359
|
-
var TabsTrigger =
|
|
359
|
+
var TabsTrigger = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
360
360
|
TabsPrimitive.Trigger,
|
|
361
361
|
{
|
|
362
362
|
ref,
|
|
@@ -368,7 +368,7 @@ var TabsTrigger = React10.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
368
368
|
}
|
|
369
369
|
));
|
|
370
370
|
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
371
|
-
var TabsContent =
|
|
371
|
+
var TabsContent = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
372
372
|
TabsPrimitive.Content,
|
|
373
373
|
{
|
|
374
374
|
ref,
|
|
@@ -380,7 +380,7 @@ var TabsContent = React10.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
380
380
|
}
|
|
381
381
|
));
|
|
382
382
|
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
383
|
-
var Separator2 =
|
|
383
|
+
var Separator2 = React11.forwardRef(
|
|
384
384
|
({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
385
385
|
SeparatorPrimitive.Root,
|
|
386
386
|
{
|
|
@@ -397,6 +397,64 @@ var Separator2 = React10.forwardRef(
|
|
|
397
397
|
)
|
|
398
398
|
);
|
|
399
399
|
Separator2.displayName = SeparatorPrimitive.Root.displayName;
|
|
400
|
+
var DEFAULT_COUNTRY_CODE = "55";
|
|
401
|
+
var MIN_NATIONAL_DIGITS = 10;
|
|
402
|
+
var MAX_DIGITS = 15;
|
|
403
|
+
function normalizePhone(raw, countryCode = DEFAULT_COUNTRY_CODE) {
|
|
404
|
+
const input = (raw ?? "").trim();
|
|
405
|
+
if (!input) return { e164: null, display: "" };
|
|
406
|
+
const digits = input.replace(/\D/g, "");
|
|
407
|
+
if (!digits || digits.length > MAX_DIGITS) {
|
|
408
|
+
return { e164: null, display: input };
|
|
409
|
+
}
|
|
410
|
+
const explicit = input.startsWith("+");
|
|
411
|
+
let e164 = null;
|
|
412
|
+
if (explicit) {
|
|
413
|
+
e164 = digits;
|
|
414
|
+
} else if (digits.startsWith(countryCode) && digits.length > MIN_NATIONAL_DIGITS) {
|
|
415
|
+
e164 = digits;
|
|
416
|
+
} else if (digits.length >= MIN_NATIONAL_DIGITS) {
|
|
417
|
+
e164 = `${countryCode}${digits}`;
|
|
418
|
+
}
|
|
419
|
+
if (e164 && (e164.length < MIN_NATIONAL_DIGITS + 1 || e164.length > MAX_DIGITS)) {
|
|
420
|
+
e164 = null;
|
|
421
|
+
}
|
|
422
|
+
return { e164, display: formatPhone(e164 ?? digits, input, countryCode) };
|
|
423
|
+
}
|
|
424
|
+
function formatPhone(digits, fallback, countryCode) {
|
|
425
|
+
if (countryCode !== "55" || !digits.startsWith("55")) return fallback;
|
|
426
|
+
const national = digits.slice(2);
|
|
427
|
+
if (national.length !== 10 && national.length !== 11) return fallback;
|
|
428
|
+
const ddd = national.slice(0, 2);
|
|
429
|
+
const rest = national.slice(2);
|
|
430
|
+
const head = rest.length === 9 ? rest.slice(0, 5) : rest.slice(0, 4);
|
|
431
|
+
const tail = rest.length === 9 ? rest.slice(5) : rest.slice(4);
|
|
432
|
+
return `+55 (${ddd}) ${head}-${tail}`;
|
|
433
|
+
}
|
|
434
|
+
var PhoneLink = React11.forwardRef(
|
|
435
|
+
({ phone, message, countryCode, raw, className, children, ...props }, ref) => {
|
|
436
|
+
const { e164, display } = normalizePhone(phone, countryCode);
|
|
437
|
+
const label = children ?? (raw ? phone ?? "" : display);
|
|
438
|
+
if (!e164) {
|
|
439
|
+
return label ? /* @__PURE__ */ jsx("span", { className, children: label }) : null;
|
|
440
|
+
}
|
|
441
|
+
const href = message ? `https://wa.me/${e164}?text=${encodeURIComponent(message)}` : `https://wa.me/${e164}`;
|
|
442
|
+
return /* @__PURE__ */ jsx(
|
|
443
|
+
"a",
|
|
444
|
+
{
|
|
445
|
+
ref,
|
|
446
|
+
href,
|
|
447
|
+
target: "_blank",
|
|
448
|
+
rel: "noopener noreferrer",
|
|
449
|
+
title: `WhatsApp ${display}`,
|
|
450
|
+
className: cn("hover:underline", className),
|
|
451
|
+
...props,
|
|
452
|
+
children: label
|
|
453
|
+
}
|
|
454
|
+
);
|
|
455
|
+
}
|
|
456
|
+
);
|
|
457
|
+
PhoneLink.displayName = "PhoneLink";
|
|
400
458
|
function Breadcrumb({ parent, current, onBack }) {
|
|
401
459
|
const { onBack: effectiveOnBack, parentLabel: effectiveParent } = useCrossModuleBack(onBack, parent);
|
|
402
460
|
useBackHandler(effectiveOnBack);
|
|
@@ -422,7 +480,7 @@ function Breadcrumb({ parent, current, onBack }) {
|
|
|
422
480
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
423
481
|
var Tooltip = TooltipPrimitive.Root;
|
|
424
482
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
425
|
-
var TooltipContent =
|
|
483
|
+
var TooltipContent = React11.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
426
484
|
TooltipPrimitive.Content,
|
|
427
485
|
{
|
|
428
486
|
ref,
|
|
@@ -889,16 +947,16 @@ function SearchSelect({
|
|
|
889
947
|
className,
|
|
890
948
|
disabled
|
|
891
949
|
}) {
|
|
892
|
-
const [open, setOpen] =
|
|
893
|
-
const [query, setQuery] =
|
|
894
|
-
const [results, setResults] =
|
|
895
|
-
const [loading, setLoading] =
|
|
896
|
-
const [creating, setCreating] =
|
|
897
|
-
const [selectedLabel, setSelectedLabel] =
|
|
898
|
-
const containerRef =
|
|
899
|
-
const inputRef =
|
|
900
|
-
const timerRef =
|
|
901
|
-
|
|
950
|
+
const [open, setOpen] = React11.useState(false);
|
|
951
|
+
const [query, setQuery] = React11.useState("");
|
|
952
|
+
const [results, setResults] = React11.useState([]);
|
|
953
|
+
const [loading, setLoading] = React11.useState(false);
|
|
954
|
+
const [creating, setCreating] = React11.useState(false);
|
|
955
|
+
const [selectedLabel, setSelectedLabel] = React11.useState(displayValue ?? "");
|
|
956
|
+
const containerRef = React11.useRef(null);
|
|
957
|
+
const inputRef = React11.useRef(null);
|
|
958
|
+
const timerRef = React11.useRef();
|
|
959
|
+
React11.useEffect(() => {
|
|
902
960
|
function handler(e) {
|
|
903
961
|
if (containerRef.current && !containerRef.current.contains(e.target)) {
|
|
904
962
|
setOpen(false);
|
|
@@ -907,10 +965,10 @@ function SearchSelect({
|
|
|
907
965
|
document.addEventListener("mousedown", handler);
|
|
908
966
|
return () => document.removeEventListener("mousedown", handler);
|
|
909
967
|
}, []);
|
|
910
|
-
|
|
968
|
+
React11.useEffect(() => {
|
|
911
969
|
if (displayValue !== void 0) setSelectedLabel(displayValue);
|
|
912
970
|
}, [displayValue]);
|
|
913
|
-
|
|
971
|
+
React11.useEffect(() => {
|
|
914
972
|
if (open && loadOnOpen && query.length === 0 && results.length === 0 && !loading) {
|
|
915
973
|
setLoading(true);
|
|
916
974
|
Promise.resolve(onSearch("")).then(setResults).catch(() => setResults([])).finally(() => setLoading(false));
|
|
@@ -968,7 +1026,7 @@ function SearchSelect({
|
|
|
968
1026
|
setResults([]);
|
|
969
1027
|
setTimeout(() => inputRef.current?.focus(), 0);
|
|
970
1028
|
}
|
|
971
|
-
const groups =
|
|
1029
|
+
const groups = React11.useMemo(() => {
|
|
972
1030
|
const map = /* @__PURE__ */ new Map();
|
|
973
1031
|
for (const opt of results) {
|
|
974
1032
|
const group = opt.group ?? "";
|
|
@@ -1045,7 +1103,7 @@ function SearchSelect({
|
|
|
1045
1103
|
}
|
|
1046
1104
|
)
|
|
1047
1105
|
] }) : /* @__PURE__ */ jsxs("div", { className: "max-h-64 overflow-auto py-1", children: [
|
|
1048
|
-
[...groups.entries()].map(([group, options]) => /* @__PURE__ */ jsxs(
|
|
1106
|
+
[...groups.entries()].map(([group, options]) => /* @__PURE__ */ jsxs(React11.Fragment, { children: [
|
|
1049
1107
|
group && /* @__PURE__ */ jsx("div", { className: "sticky top-0 bg-muted/50 px-3 py-1 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground", children: group }),
|
|
1050
1108
|
options.map((opt) => /* @__PURE__ */ jsx(
|
|
1051
1109
|
"button",
|
|
@@ -1096,9 +1154,9 @@ function CurrencyInput({
|
|
|
1096
1154
|
className,
|
|
1097
1155
|
disabled
|
|
1098
1156
|
}) {
|
|
1099
|
-
const inputRef =
|
|
1100
|
-
const [focused, setFocused] =
|
|
1101
|
-
const format =
|
|
1157
|
+
const inputRef = React11.useRef(null);
|
|
1158
|
+
const [focused, setFocused] = React11.useState(false);
|
|
1159
|
+
const format = React11.useCallback((v) => {
|
|
1102
1160
|
return new Intl.NumberFormat(locale, {
|
|
1103
1161
|
minimumFractionDigits: 2,
|
|
1104
1162
|
maximumFractionDigits: 2
|
|
@@ -1207,7 +1265,7 @@ function ConfirmDialog({
|
|
|
1207
1265
|
}) {
|
|
1208
1266
|
const config = VARIANT_CONFIG[variant];
|
|
1209
1267
|
const Icon2 = config.icon;
|
|
1210
|
-
|
|
1268
|
+
React11.useEffect(() => {
|
|
1211
1269
|
if (!open) return;
|
|
1212
1270
|
function handleKey(e) {
|
|
1213
1271
|
if (e.key === "Escape") onCancel();
|
|
@@ -1254,7 +1312,7 @@ function ConfirmDialog({
|
|
|
1254
1312
|
}
|
|
1255
1313
|
var Popover = PopoverPrimitive.Root;
|
|
1256
1314
|
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
1257
|
-
var PopoverContent =
|
|
1315
|
+
var PopoverContent = React11.forwardRef(({ className, align = "start", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
1258
1316
|
PopoverPrimitive.Content,
|
|
1259
1317
|
{
|
|
1260
1318
|
ref,
|
|
@@ -1282,7 +1340,7 @@ function renderInline(text, keyPrefix) {
|
|
|
1282
1340
|
if (part.startsWith("`") && part.endsWith("`") && part.length > 2) {
|
|
1283
1341
|
return /* @__PURE__ */ jsx("code", { className: "rounded bg-muted px-1 py-0.5 font-mono text-[0.85em]", children: part.slice(1, -1) }, key);
|
|
1284
1342
|
}
|
|
1285
|
-
return part === "" ? null : /* @__PURE__ */ jsx(
|
|
1343
|
+
return part === "" ? null : /* @__PURE__ */ jsx(React11.Fragment, { children: part }, key);
|
|
1286
1344
|
});
|
|
1287
1345
|
}
|
|
1288
1346
|
function parseBlocks(source) {
|
|
@@ -1366,7 +1424,7 @@ function renderMarkdown(source) {
|
|
|
1366
1424
|
case "ol":
|
|
1367
1425
|
return /* @__PURE__ */ jsx("ol", { className: "list-decimal space-y-1 pl-5", children: block.items.map((item, li) => /* @__PURE__ */ jsx("li", { children: renderInline(item, `${key}-${li}`) }, `${key}-${li}`)) }, key);
|
|
1368
1426
|
case "p":
|
|
1369
|
-
return /* @__PURE__ */ jsx("p", { children: block.lines.map((l, li) => /* @__PURE__ */ jsxs(
|
|
1427
|
+
return /* @__PURE__ */ jsx("p", { children: block.lines.map((l, li) => /* @__PURE__ */ jsxs(React11.Fragment, { children: [
|
|
1370
1428
|
li > 0 && /* @__PURE__ */ jsx("br", {}),
|
|
1371
1429
|
renderInline(l, `${key}-${li}`)
|
|
1372
1430
|
] }, `${key}-${li}`)) }, key);
|
|
@@ -1387,7 +1445,7 @@ function MarkdownEditor({
|
|
|
1387
1445
|
renderPreview,
|
|
1388
1446
|
className
|
|
1389
1447
|
}) {
|
|
1390
|
-
const [mode, setMode] =
|
|
1448
|
+
const [mode, setMode] = React11.useState(
|
|
1391
1449
|
defaultMode === "preview" && value.trim() === "" ? "edit" : defaultMode
|
|
1392
1450
|
);
|
|
1393
1451
|
return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-2", className), children: [
|
|
@@ -1630,6 +1688,6 @@ function SearchCombobox({
|
|
|
1630
1688
|
] });
|
|
1631
1689
|
}
|
|
1632
1690
|
|
|
1633
|
-
export { Badge, Breadcrumb, Checkbox, ConfirmDialog, CurrencyInput, DatePicker, Input, ListView, Markdown, MarkdownEditor, Modal, ModalBody, ModalClose, ModalContent, ModalDescription, ModalFooter, ModalHeader, ModalOverlay, ModalPortal, ModalTitle, ModalTrigger, Popover, PopoverContent, PopoverTrigger, SearchCombobox, SearchSelect, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator2 as Separator, Tabs, TabsContent, TabsList, TabsTrigger, TimePicker, ToastProvider, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, renderMarkdown };
|
|
1634
|
-
//# sourceMappingURL=chunk-
|
|
1635
|
-
//# sourceMappingURL=chunk-
|
|
1691
|
+
export { Badge, Breadcrumb, Checkbox, ConfirmDialog, CurrencyInput, DatePicker, Input, ListView, Markdown, MarkdownEditor, Modal, ModalBody, ModalClose, ModalContent, ModalDescription, ModalFooter, ModalHeader, ModalOverlay, ModalPortal, ModalTitle, ModalTrigger, PhoneLink, Popover, PopoverContent, PopoverTrigger, SearchCombobox, SearchSelect, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator2 as Separator, Tabs, TabsContent, TabsList, TabsTrigger, TimePicker, ToastProvider, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, normalizePhone, renderMarkdown };
|
|
1692
|
+
//# sourceMappingURL=chunk-S5KNM4D2.js.map
|
|
1693
|
+
//# sourceMappingURL=chunk-S5KNM4D2.js.map
|