@underverse-ui/underverse 2.0.7 → 2.0.9
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/api-reference.json +1 -1
- package/dist/{EmojiPicker-34YATB7Z.js → EmojiPicker-RPB24XXJ.js} +4 -4
- package/dist/{chunk-JINSMREP.js → chunk-7V65PWQN.js} +3 -3
- package/dist/{chunk-PLHJWXCW.js → chunk-CKG2QLQL.js} +61 -1
- package/dist/chunk-CKG2QLQL.js.map +1 -0
- package/dist/{chunk-A7XL4RDV.js → chunk-K5PVUTXH.js} +7 -5
- package/dist/chunk-K5PVUTXH.js.map +1 -0
- package/dist/{chunk-KGNYK5YF.js → chunk-KKASHK7A.js} +2 -2
- package/dist/{chunk-TETMVVUP.js → chunk-VDIAFUIE.js} +11 -65
- package/dist/chunk-VDIAFUIE.js.map +1 -0
- package/dist/{chunk-XE3RJHVX.js → chunk-WNVGXH5Y.js} +12 -10
- package/dist/chunk-WNVGXH5Y.js.map +1 -0
- package/dist/index.cjs +278 -141
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +297 -167
- package/dist/index.js.map +1 -1
- package/dist/{menu-bar-NFEW4FOJ.js → menu-bar-R5ZFI2ST.js} +4 -4
- package/dist/ueditor.cjs +25 -9
- package/dist/ueditor.cjs.map +1 -1
- package/dist/ueditor.js +4 -4
- package/package.json +2 -1
- package/dist/chunk-A7XL4RDV.js.map +0 -1
- package/dist/chunk-PLHJWXCW.js.map +0 -1
- package/dist/chunk-TETMVVUP.js.map +0 -1
- package/dist/chunk-XE3RJHVX.js.map +0 -1
- /package/dist/{EmojiPicker-34YATB7Z.js.map → EmojiPicker-RPB24XXJ.js.map} +0 -0
- /package/dist/{chunk-JINSMREP.js.map → chunk-7V65PWQN.js.map} +0 -0
- /package/dist/{chunk-KGNYK5YF.js.map → chunk-KKASHK7A.js.map} +0 -0
- /package/dist/{menu-bar-NFEW4FOJ.js.map → menu-bar-R5ZFI2ST.js.map} +0 -0
package/dist/index.cjs
CHANGED
|
@@ -31,7 +31,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
31
31
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
32
32
|
|
|
33
33
|
// src/constants/form-control-size.ts
|
|
34
|
-
var formControlSizeStyles, formControlLabelClass, formControlFixedClass, formControlValueClass;
|
|
34
|
+
var formControlSizeStyles, formControlLabelClass, formControlFixedClass, formControlValueClass, formControlOutlineClass, formControlGroupOutlineClass;
|
|
35
35
|
var init_form_control_size = __esm({
|
|
36
36
|
"src/constants/form-control-size.ts"() {
|
|
37
37
|
"use strict";
|
|
@@ -85,6 +85,8 @@ var init_form_control_size = __esm({
|
|
|
85
85
|
formControlLabelClass = "font-medium";
|
|
86
86
|
formControlFixedClass = "min-h-0 overflow-hidden";
|
|
87
87
|
formControlValueClass = "max-h-full min-w-0 flex-1 truncate whitespace-nowrap";
|
|
88
|
+
formControlOutlineClass = "border border-input hover:border-primary/40 focus-visible:outline-none focus-visible:border-ring";
|
|
89
|
+
formControlGroupOutlineClass = "border border-input hover:border-primary/40 focus-within:border-ring";
|
|
88
90
|
}
|
|
89
91
|
});
|
|
90
92
|
|
|
@@ -3528,6 +3530,7 @@ var init_EmojiPicker = __esm({
|
|
|
3528
3530
|
init_emoji_ui();
|
|
3529
3531
|
init_Tooltip();
|
|
3530
3532
|
init_emojis();
|
|
3533
|
+
init_form_control_size();
|
|
3531
3534
|
import_jsx_runtime14 = require("react/jsx-runtime");
|
|
3532
3535
|
CATEGORY_ICONS = {
|
|
3533
3536
|
smileys_people: import_lucide_react4.Smile,
|
|
@@ -3667,8 +3670,9 @@ var init_EmojiPicker = __esm({
|
|
|
3667
3670
|
value: search,
|
|
3668
3671
|
onChange: (e) => setSearch(e.target.value),
|
|
3669
3672
|
className: cn(
|
|
3670
|
-
"w-full rounded-2xl
|
|
3671
|
-
|
|
3673
|
+
"w-full rounded-2xl bg-muted/20 py-2 pl-9.5 pr-9 text-sm transition-all duration-300",
|
|
3674
|
+
formControlOutlineClass,
|
|
3675
|
+
"placeholder:text-muted-foreground/60",
|
|
3672
3676
|
"focus:bg-background/90 focus:shadow-[0_0_12px_rgba(var(--color-primary-rgb),0.04)]"
|
|
3673
3677
|
)
|
|
3674
3678
|
}
|
|
@@ -4835,12 +4839,12 @@ var init_DropdownMenu = __esm({
|
|
|
4835
4839
|
"button",
|
|
4836
4840
|
{
|
|
4837
4841
|
className: cn(
|
|
4838
|
-
"inline-flex items-center justify-between gap-2
|
|
4842
|
+
"inline-flex items-center justify-between gap-2 bg-background",
|
|
4843
|
+
formControlOutlineClass,
|
|
4839
4844
|
resolvedBorderMode ? getBorderRadiusClass(resolvedBorderMode) : "rounded-2xl",
|
|
4840
4845
|
formControlFixedClass,
|
|
4841
4846
|
formControlSizeStyles[size].control,
|
|
4842
4847
|
"hover:bg-accent/50",
|
|
4843
|
-
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
|
4844
4848
|
className
|
|
4845
4849
|
),
|
|
4846
4850
|
children: [
|
|
@@ -6854,6 +6858,7 @@ var init_inputs = __esm({
|
|
|
6854
6858
|
init_useSmartTranslations();
|
|
6855
6859
|
import_lucide_react51 = require("lucide-react");
|
|
6856
6860
|
init_url_safety();
|
|
6861
|
+
init_form_control_size();
|
|
6857
6862
|
import_jsx_runtime92 = require("react/jsx-runtime");
|
|
6858
6863
|
LinkInput = ({
|
|
6859
6864
|
onSubmit,
|
|
@@ -6894,7 +6899,7 @@ var init_inputs = __esm({
|
|
|
6894
6899
|
placeholder: t("linkInput.placeholder"),
|
|
6895
6900
|
"aria-invalid": Boolean(error),
|
|
6896
6901
|
"aria-describedby": error ? errorId : void 0,
|
|
6897
|
-
className:
|
|
6902
|
+
className: `flex-1 rounded-lg bg-muted/50 px-3 py-2 text-sm ${formControlOutlineClass} aria-invalid:border-destructive`
|
|
6898
6903
|
}
|
|
6899
6904
|
),
|
|
6900
6905
|
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("button", { type: "submit", className: "p-2 rounded-lg bg-primary text-primary-foreground hover:bg-primary/90 transition-colors", children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react51.Check, { className: "w-4 h-4" }) }),
|
|
@@ -6929,7 +6934,7 @@ var init_inputs = __esm({
|
|
|
6929
6934
|
value: url,
|
|
6930
6935
|
onChange: (e) => setUrl(e.target.value),
|
|
6931
6936
|
placeholder: t("imageInput.urlPlaceholder"),
|
|
6932
|
-
className:
|
|
6937
|
+
className: `mt-1 w-full rounded-lg bg-muted/50 px-3 py-2 text-sm ${formControlOutlineClass}`
|
|
6933
6938
|
}
|
|
6934
6939
|
)
|
|
6935
6940
|
] }),
|
|
@@ -6942,7 +6947,7 @@ var init_inputs = __esm({
|
|
|
6942
6947
|
value: alt,
|
|
6943
6948
|
onChange: (e) => setAlt(e.target.value),
|
|
6944
6949
|
placeholder: t("imageInput.altPlaceholder"),
|
|
6945
|
-
className:
|
|
6950
|
+
className: `mt-1 w-full rounded-lg bg-muted/50 px-3 py-2 text-sm ${formControlOutlineClass}`
|
|
6946
6951
|
}
|
|
6947
6952
|
)
|
|
6948
6953
|
] }),
|
|
@@ -10357,6 +10362,7 @@ var Input = (0, import_react4.forwardRef)(
|
|
|
10357
10362
|
value,
|
|
10358
10363
|
maxLength,
|
|
10359
10364
|
rightAddon,
|
|
10365
|
+
rightSection,
|
|
10360
10366
|
borderMode,
|
|
10361
10367
|
...rest
|
|
10362
10368
|
}, ref) => {
|
|
@@ -10376,19 +10382,19 @@ var Input = (0, import_react4.forwardRef)(
|
|
|
10376
10382
|
const containerSpacing = size === "xs" || size === "sm" ? "space-y-1.5" : "space-y-2";
|
|
10377
10383
|
const variantStyles6 = {
|
|
10378
10384
|
default: {
|
|
10379
|
-
container: "bg-background
|
|
10380
|
-
focus: "
|
|
10381
|
-
error: "border-destructive focus-visible:outline-none focus-visible:
|
|
10385
|
+
container: cn("bg-background", formControlOutlineClass),
|
|
10386
|
+
focus: "",
|
|
10387
|
+
error: "border-destructive focus-visible:outline-none focus-visible:border-destructive"
|
|
10382
10388
|
},
|
|
10383
10389
|
filled: {
|
|
10384
10390
|
container: "bg-muted/50 border border-transparent hover:bg-muted/70",
|
|
10385
10391
|
focus: "focus-visible:outline-none focus-visible:bg-background focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background focus-visible:border-transparent",
|
|
10386
|
-
error: "bg-destructive/10 border-destructive focus-visible:outline-none focus-visible:
|
|
10392
|
+
error: "bg-destructive/10 border-destructive focus-visible:outline-none focus-visible:border-destructive"
|
|
10387
10393
|
},
|
|
10388
10394
|
outlined: {
|
|
10389
10395
|
container: "bg-transparent border border-border/50 hover:border-accent-foreground/30",
|
|
10390
10396
|
focus: "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background focus-visible:border-transparent",
|
|
10391
|
-
error: "border-destructive focus-visible:outline-none focus-visible:
|
|
10397
|
+
error: "border-destructive focus-visible:outline-none focus-visible:border-destructive"
|
|
10392
10398
|
},
|
|
10393
10399
|
minimal: {
|
|
10394
10400
|
container: "bg-transparent border-0 border-b border-border/50 hover:border-accent-foreground/30",
|
|
@@ -10528,7 +10534,7 @@ var Input = (0, import_react4.forwardRef)(
|
|
|
10528
10534
|
radiusClass,
|
|
10529
10535
|
// Icon padding adjustments
|
|
10530
10536
|
LeftIcon && "pl-10",
|
|
10531
|
-
(RightIcon || showPasswordToggle || clearable || loading2 || success || errMsg) && "pr-10",
|
|
10537
|
+
(RightIcon || showPasswordToggle || clearable || loading2 || success || errMsg || rightSection) && "pr-10",
|
|
10532
10538
|
// Variant styles
|
|
10533
10539
|
variantStyles6[variant].container,
|
|
10534
10540
|
errMsg ? variantStyles6[variant].error : variantStyles6[variant].focus,
|
|
@@ -10541,45 +10547,57 @@ var Input = (0, import_react4.forwardRef)(
|
|
|
10541
10547
|
...restInput
|
|
10542
10548
|
}
|
|
10543
10549
|
),
|
|
10544
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
10545
|
-
|
|
10546
|
-
|
|
10547
|
-
|
|
10548
|
-
|
|
10549
|
-
|
|
10550
|
-
|
|
10551
|
-
|
|
10552
|
-
|
|
10553
|
-
|
|
10554
|
-
|
|
10555
|
-
|
|
10556
|
-
|
|
10557
|
-
|
|
10558
|
-
|
|
10559
|
-
|
|
10560
|
-
|
|
10561
|
-
|
|
10562
|
-
|
|
10563
|
-
|
|
10564
|
-
|
|
10565
|
-
|
|
10566
|
-
|
|
10567
|
-
|
|
10568
|
-
|
|
10569
|
-
|
|
10570
|
-
|
|
10571
|
-
|
|
10572
|
-
|
|
10573
|
-
|
|
10574
|
-
|
|
10575
|
-
|
|
10576
|
-
|
|
10577
|
-
|
|
10578
|
-
|
|
10579
|
-
|
|
10580
|
-
|
|
10581
|
-
|
|
10582
|
-
|
|
10550
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
10551
|
+
"div",
|
|
10552
|
+
{
|
|
10553
|
+
className: cn(
|
|
10554
|
+
"absolute z-10 flex items-center gap-1",
|
|
10555
|
+
rightSection ? "inset-y-0 right-0" : "right-3 top-1/2 -translate-y-1/2"
|
|
10556
|
+
),
|
|
10557
|
+
children: [
|
|
10558
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: cn("flex items-center gap-1", rightSection && "px-1"), children: [
|
|
10559
|
+
getStatusIcon(),
|
|
10560
|
+
RightIcon && !loading2 && !success && !errMsg && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(RightIcon, { className: cn("text-muted-foreground", sizeStyles8[size].icon) }),
|
|
10561
|
+
clearable && hasValue && !loading2 && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
10562
|
+
"button",
|
|
10563
|
+
{
|
|
10564
|
+
type: "button",
|
|
10565
|
+
onClick: () => {
|
|
10566
|
+
if (onClear) return onClear();
|
|
10567
|
+
rest.onChange?.({ target: { value: "" } });
|
|
10568
|
+
},
|
|
10569
|
+
className: cn(
|
|
10570
|
+
"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors rounded-md",
|
|
10571
|
+
"focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1",
|
|
10572
|
+
"active:bg-accent active:text-accent-foreground",
|
|
10573
|
+
sizeStyles8[size].iconButton
|
|
10574
|
+
),
|
|
10575
|
+
tabIndex: 0,
|
|
10576
|
+
"aria-label": gi18n.clearInput ?? "Clear input",
|
|
10577
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react3.X, { className: sizeStyles8[size].icon })
|
|
10578
|
+
}
|
|
10579
|
+
),
|
|
10580
|
+
showPasswordToggle && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
10581
|
+
"button",
|
|
10582
|
+
{
|
|
10583
|
+
type: "button",
|
|
10584
|
+
onClick: () => setShowPassword(!showPassword),
|
|
10585
|
+
className: cn(
|
|
10586
|
+
"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors rounded-full",
|
|
10587
|
+
"focus:outline-none focus-visible:ring-1 focus-visible:ring-ring/40",
|
|
10588
|
+
"active:bg-accent/50 active:text-accent-foreground",
|
|
10589
|
+
sizeStyles8[size].iconButton
|
|
10590
|
+
),
|
|
10591
|
+
tabIndex: 0,
|
|
10592
|
+
"aria-label": showPassword ? gi18n.hidePassword ?? "Hide password" : gi18n.showPassword ?? "Show password",
|
|
10593
|
+
children: showPassword ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react3.EyeOff, { className: sizeStyles8[size].icon }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react3.Eye, { className: sizeStyles8[size].icon })
|
|
10594
|
+
}
|
|
10595
|
+
)
|
|
10596
|
+
] }),
|
|
10597
|
+
rightSection
|
|
10598
|
+
]
|
|
10599
|
+
}
|
|
10600
|
+
),
|
|
10583
10601
|
rightAddon,
|
|
10584
10602
|
variant === "minimal" && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
10585
10603
|
"div",
|
|
@@ -10614,27 +10632,128 @@ var Input = (0, import_react4.forwardRef)(
|
|
|
10614
10632
|
}
|
|
10615
10633
|
);
|
|
10616
10634
|
Input.displayName = "Input";
|
|
10635
|
+
var searchButtonWidthStyles = {
|
|
10636
|
+
xs: "w-6",
|
|
10637
|
+
sm: "w-8",
|
|
10638
|
+
md: "w-10",
|
|
10639
|
+
lg: "w-12",
|
|
10640
|
+
xl: "w-14"
|
|
10641
|
+
};
|
|
10642
|
+
var searchButtonPaddingStyles = {
|
|
10643
|
+
xs: "pr-14",
|
|
10644
|
+
sm: "pr-18",
|
|
10645
|
+
md: "pr-20",
|
|
10646
|
+
lg: "pr-24",
|
|
10647
|
+
xl: "pr-28"
|
|
10648
|
+
};
|
|
10649
|
+
var searchButtonRadiusStyles = {
|
|
10650
|
+
none: "rounded-r-none",
|
|
10651
|
+
sm: "rounded-r-sm",
|
|
10652
|
+
md: "rounded-r-md",
|
|
10653
|
+
lg: "rounded-r-lg",
|
|
10654
|
+
xl: "rounded-r-xl",
|
|
10655
|
+
"2xl": "rounded-r-2xl",
|
|
10656
|
+
"3xl": "rounded-r-3xl",
|
|
10657
|
+
full: "rounded-r-full",
|
|
10658
|
+
daewoo: "rounded-r",
|
|
10659
|
+
infiniq: "rounded-r-full"
|
|
10660
|
+
};
|
|
10617
10661
|
var SearchInput = (0, import_react4.forwardRef)(
|
|
10618
|
-
({
|
|
10619
|
-
|
|
10662
|
+
({
|
|
10663
|
+
mode = "default",
|
|
10664
|
+
onSearch,
|
|
10665
|
+
searchDelay = 300,
|
|
10666
|
+
searchButtonLabel = "Search",
|
|
10667
|
+
placeholder = "Search\u2026",
|
|
10668
|
+
value,
|
|
10669
|
+
defaultValue,
|
|
10670
|
+
onChange,
|
|
10671
|
+
onClear,
|
|
10672
|
+
onKeyDown,
|
|
10673
|
+
clearable = true,
|
|
10674
|
+
size = "md",
|
|
10675
|
+
className,
|
|
10676
|
+
disabled,
|
|
10677
|
+
loading: loading2 = false,
|
|
10678
|
+
rightSection,
|
|
10679
|
+
borderMode,
|
|
10680
|
+
...props
|
|
10681
|
+
}, ref) => {
|
|
10682
|
+
const [uncontrolledValue, setUncontrolledValue] = (0, import_react4.useState)(defaultValue ?? "");
|
|
10683
|
+
const isControlled = value !== void 0;
|
|
10684
|
+
const searchValue = isControlled ? value : uncontrolledValue;
|
|
10685
|
+
const searchText = String(searchValue ?? "");
|
|
10686
|
+
const globalConfig = useUnderverseUIConfig();
|
|
10687
|
+
const resolvedBorderMode = borderMode ?? globalConfig.input?.borderMode ?? globalConfig.borderMode ?? "full";
|
|
10688
|
+
const searchButtonRadiusClass = searchButtonRadiusStyles[resolvedBorderMode] ?? getBorderRadiusClass(resolvedBorderMode);
|
|
10689
|
+
const triggerSearch = (0, import_react4.useCallback)(() => {
|
|
10690
|
+
onSearch?.(searchText);
|
|
10691
|
+
}, [onSearch, searchText]);
|
|
10620
10692
|
import_react4.default.useEffect(() => {
|
|
10621
|
-
if (!onSearch) return;
|
|
10693
|
+
if (!onSearch || mode !== "default") return;
|
|
10622
10694
|
const timer = setTimeout(() => {
|
|
10623
|
-
onSearch(
|
|
10695
|
+
onSearch(searchText);
|
|
10624
10696
|
}, searchDelay);
|
|
10625
10697
|
return () => clearTimeout(timer);
|
|
10626
|
-
}, [
|
|
10698
|
+
}, [mode, onSearch, searchDelay, searchText]);
|
|
10699
|
+
const searchButton = mode === "button" ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
10700
|
+
"button",
|
|
10701
|
+
{
|
|
10702
|
+
type: "button",
|
|
10703
|
+
onClick: triggerSearch,
|
|
10704
|
+
disabled: disabled || loading2,
|
|
10705
|
+
className: cn(
|
|
10706
|
+
"flex h-full shrink-0 cursor-pointer items-center justify-center border-l border-border bg-transparent text-foreground",
|
|
10707
|
+
"transition-colors hover:bg-accent hover:text-accent-foreground",
|
|
10708
|
+
"focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring",
|
|
10709
|
+
"disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-transparent",
|
|
10710
|
+
searchButtonWidthStyles[size],
|
|
10711
|
+
searchButtonRadiusClass
|
|
10712
|
+
),
|
|
10713
|
+
"aria-label": searchButtonLabel,
|
|
10714
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react3.Search, { className: formControlSizeStyles[size].icon, "aria-hidden": "true" })
|
|
10715
|
+
}
|
|
10716
|
+
) : null;
|
|
10627
10717
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
10628
10718
|
Input,
|
|
10629
10719
|
{
|
|
10630
10720
|
ref,
|
|
10631
10721
|
type: "search",
|
|
10632
|
-
leftIcon: import_lucide_react3.Search,
|
|
10722
|
+
leftIcon: mode === "default" ? import_lucide_react3.Search : void 0,
|
|
10633
10723
|
placeholder,
|
|
10634
|
-
clearable
|
|
10724
|
+
clearable,
|
|
10635
10725
|
value: searchValue,
|
|
10636
|
-
onChange: (
|
|
10637
|
-
|
|
10726
|
+
onChange: (event) => {
|
|
10727
|
+
if (!isControlled) setUncontrolledValue(event.target.value);
|
|
10728
|
+
onChange?.(event);
|
|
10729
|
+
},
|
|
10730
|
+
onClear: () => {
|
|
10731
|
+
if (!isControlled) {
|
|
10732
|
+
setUncontrolledValue("");
|
|
10733
|
+
} else if (!onClear && onChange) {
|
|
10734
|
+
onChange({ target: { value: "" }, currentTarget: { value: "" } });
|
|
10735
|
+
}
|
|
10736
|
+
onClear?.();
|
|
10737
|
+
},
|
|
10738
|
+
onKeyDown: (event) => {
|
|
10739
|
+
onKeyDown?.(event);
|
|
10740
|
+
if (mode === "button" && event.key === "Enter" && !event.defaultPrevented && !event.nativeEvent.isComposing) {
|
|
10741
|
+
triggerSearch();
|
|
10742
|
+
}
|
|
10743
|
+
},
|
|
10744
|
+
size,
|
|
10745
|
+
className: cn(
|
|
10746
|
+
"[&::-webkit-search-cancel-button]:appearance-none [&::-webkit-search-decoration]:appearance-none",
|
|
10747
|
+
mode === "button" && searchButtonPaddingStyles[size],
|
|
10748
|
+
className
|
|
10749
|
+
),
|
|
10750
|
+
disabled,
|
|
10751
|
+
loading: loading2,
|
|
10752
|
+
rightSection: mode === "button" ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
|
|
10753
|
+
rightSection,
|
|
10754
|
+
searchButton
|
|
10755
|
+
] }) : rightSection,
|
|
10756
|
+
borderMode,
|
|
10638
10757
|
...props
|
|
10639
10758
|
}
|
|
10640
10759
|
);
|
|
@@ -10851,7 +10970,7 @@ var Textarea = (0, import_react4.forwardRef)(
|
|
|
10851
10970
|
[ref]
|
|
10852
10971
|
);
|
|
10853
10972
|
const variantStyles6 = {
|
|
10854
|
-
default: "bg-background
|
|
10973
|
+
default: cn("bg-background", formControlOutlineClass),
|
|
10855
10974
|
filled: "bg-muted/50 border border-transparent hover:bg-muted/70 focus-visible:outline-none focus-visible:bg-background focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background focus-visible:border-transparent",
|
|
10856
10975
|
outlined: "bg-transparent border border-border/50 hover:border-accent-foreground/30 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background focus-visible:border-transparent",
|
|
10857
10976
|
minimal: "bg-transparent border-0 border-b border-border/50 hover:border-accent-foreground/30 focus-visible:outline-none focus-visible:border-ring focus-visible:ring-0 rounded-none"
|
|
@@ -10919,7 +11038,7 @@ var Textarea = (0, import_react4.forwardRef)(
|
|
|
10919
11038
|
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
10920
11039
|
sizeStyles8[size],
|
|
10921
11040
|
variantStyles6[variant],
|
|
10922
|
-
error && "border-destructive focus-visible:outline-none focus-visible:
|
|
11041
|
+
error && "border-destructive focus-visible:outline-none focus-visible:border-destructive",
|
|
10923
11042
|
resizeClasses[resize],
|
|
10924
11043
|
isFocused && "shadow-md",
|
|
10925
11044
|
variant !== "minimal" && "shadow-sm",
|
|
@@ -11496,6 +11615,7 @@ var StickerGridButton = ({ packId, stickerId, name, onClick, className, active =
|
|
|
11496
11615
|
|
|
11497
11616
|
// src/components/StickerPicker.tsx
|
|
11498
11617
|
init_Tooltip();
|
|
11618
|
+
init_form_control_size();
|
|
11499
11619
|
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
11500
11620
|
var StickerPicker = ({
|
|
11501
11621
|
onStickerSelect,
|
|
@@ -11602,8 +11722,9 @@ var StickerPicker = ({
|
|
|
11602
11722
|
value: search,
|
|
11603
11723
|
onChange: (e) => setSearch(e.target.value),
|
|
11604
11724
|
className: cn(
|
|
11605
|
-
"w-full rounded-2xl
|
|
11606
|
-
|
|
11725
|
+
"w-full rounded-2xl bg-muted/20 py-2 pl-9.5 pr-9 text-sm transition-all duration-300",
|
|
11726
|
+
formControlOutlineClass,
|
|
11727
|
+
"placeholder:text-muted-foreground/60",
|
|
11607
11728
|
"focus:bg-background/90 focus:shadow-[0_0_12px_rgba(var(--color-primary-rgb),0.04)]"
|
|
11608
11729
|
)
|
|
11609
11730
|
}
|
|
@@ -11866,11 +11987,11 @@ var TagInput = (0, import_react10.forwardRef)(
|
|
|
11866
11987
|
className: cn(
|
|
11867
11988
|
"flex items-center gap-1.5 cursor-text",
|
|
11868
11989
|
formControlFixedClass,
|
|
11869
|
-
"bg-background
|
|
11990
|
+
"bg-background",
|
|
11991
|
+
formControlGroupOutlineClass,
|
|
11870
11992
|
"transition-all duration-200",
|
|
11871
|
-
"hover:border-accent-foreground/20",
|
|
11872
11993
|
getBorderRadiusClass(resolvedBorderMode),
|
|
11873
|
-
isFocused && "
|
|
11994
|
+
isFocused && "shadow-md",
|
|
11874
11995
|
disabled && "opacity-50 cursor-not-allowed",
|
|
11875
11996
|
sizeStyles8[size].container
|
|
11876
11997
|
),
|
|
@@ -14459,7 +14580,7 @@ var Combobox = ({
|
|
|
14459
14580
|
xl: formControlSizeStyles.xl.control
|
|
14460
14581
|
};
|
|
14461
14582
|
const variantStyles6 = {
|
|
14462
|
-
default: "
|
|
14583
|
+
default: "bg-background hover:bg-accent/5",
|
|
14463
14584
|
outline: "border-2 border-input bg-transparent hover:border-primary/60",
|
|
14464
14585
|
ghost: "border-0 bg-transparent hover:bg-accent/50",
|
|
14465
14586
|
filled: "border-0 bg-muted/50 hover:bg-muted/80"
|
|
@@ -14492,13 +14613,13 @@ var Combobox = ({
|
|
|
14492
14613
|
className: cn(
|
|
14493
14614
|
"group flex w-full items-center justify-between transition-all duration-200",
|
|
14494
14615
|
formControlFixedClass,
|
|
14616
|
+
formControlOutlineClass,
|
|
14495
14617
|
radiusClass,
|
|
14496
14618
|
sizeStyles8[size],
|
|
14497
14619
|
variantStyles6[variant],
|
|
14498
|
-
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30 focus-visible:border-primary",
|
|
14499
14620
|
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
14500
|
-
open && "border-
|
|
14501
|
-
!!effectiveError && "border-destructive
|
|
14621
|
+
open && "border-ring",
|
|
14622
|
+
!!effectiveError && "border-destructive",
|
|
14502
14623
|
className
|
|
14503
14624
|
)
|
|
14504
14625
|
};
|
|
@@ -14564,6 +14685,7 @@ var Combobox = ({
|
|
|
14564
14685
|
formControlLabelClass,
|
|
14565
14686
|
"transition-colors duration-200",
|
|
14566
14687
|
disabled ? "text-muted-foreground" : "text-foreground group-focus-within:text-primary",
|
|
14688
|
+
open && "text-primary",
|
|
14567
14689
|
effectiveError && "text-destructive",
|
|
14568
14690
|
labelClassName
|
|
14569
14691
|
),
|
|
@@ -15846,6 +15968,7 @@ var DatePicker = ({
|
|
|
15846
15968
|
formControlLabelClass,
|
|
15847
15969
|
"transition-colors duration-300 cursor-pointer",
|
|
15848
15970
|
disabled ? "text-muted-foreground" : "text-foreground group-focus-within:text-primary hover:text-primary",
|
|
15971
|
+
isOpen && "text-primary",
|
|
15849
15972
|
effectiveError && "text-destructive",
|
|
15850
15973
|
labelClassName
|
|
15851
15974
|
),
|
|
@@ -15895,19 +16018,19 @@ var DatePicker = ({
|
|
|
15895
16018
|
{
|
|
15896
16019
|
ref: triggerRef,
|
|
15897
16020
|
className: cn(
|
|
15898
|
-
"group flex w-full items-center justify-between
|
|
16021
|
+
"group flex w-full items-center justify-between bg-background/80 backdrop-blur-sm",
|
|
15899
16022
|
formControlFixedClass,
|
|
16023
|
+
formControlGroupOutlineClass,
|
|
15900
16024
|
getBorderRadiusClass(resolvedBorderMode),
|
|
15901
16025
|
sizeStyles8[size].trigger,
|
|
15902
16026
|
formControlSizeStyles[requestedSize].control,
|
|
15903
16027
|
disabled ? "border-border/40 opacity-50 cursor-not-allowed" : [
|
|
15904
|
-
"
|
|
15905
|
-
"focus-within:border-primary focus-within:ring-0",
|
|
16028
|
+
"focus-within:border-ring",
|
|
15906
16029
|
"hover:bg-accent/10"
|
|
15907
16030
|
],
|
|
15908
16031
|
"transition-all duration-300 ease-out",
|
|
15909
|
-
isOpen &&
|
|
15910
|
-
effectiveError && "border-destructive/60
|
|
16032
|
+
isOpen && "border-ring shadow-lg shadow-primary/10",
|
|
16033
|
+
effectiveError && "border-destructive/60 bg-destructive/5",
|
|
15911
16034
|
className
|
|
15912
16035
|
),
|
|
15913
16036
|
children: [
|
|
@@ -16606,6 +16729,7 @@ var DateRangePicker = ({
|
|
|
16606
16729
|
formControlLabelClass,
|
|
16607
16730
|
"transition-colors duration-300",
|
|
16608
16731
|
disabled ? "text-muted-foreground cursor-not-allowed" : "text-foreground group-focus-within:text-primary hover:text-primary cursor-pointer",
|
|
16732
|
+
isOpen && "text-primary",
|
|
16609
16733
|
effectiveError && "text-destructive",
|
|
16610
16734
|
labelClassName
|
|
16611
16735
|
),
|
|
@@ -16654,19 +16778,19 @@ var DateRangePicker = ({
|
|
|
16654
16778
|
{
|
|
16655
16779
|
ref: triggerRef,
|
|
16656
16780
|
className: cn(
|
|
16657
|
-
"group flex w-full items-center justify-between
|
|
16781
|
+
"group flex w-full items-center justify-between bg-background/80 backdrop-blur-sm",
|
|
16658
16782
|
formControlFixedClass,
|
|
16783
|
+
formControlGroupOutlineClass,
|
|
16659
16784
|
getBorderRadiusClass(resolvedBorderMode),
|
|
16660
16785
|
sizeStyles8[size].trigger,
|
|
16661
16786
|
formControlSizeStyles[requestedSize].control,
|
|
16662
16787
|
disabled ? "border-border/40 opacity-50 cursor-not-allowed" : [
|
|
16663
|
-
"
|
|
16664
|
-
"focus-within:border-primary focus-within:ring-0",
|
|
16788
|
+
"focus-within:border-ring",
|
|
16665
16789
|
"hover:bg-accent/10"
|
|
16666
16790
|
],
|
|
16667
16791
|
"transition-all duration-300 ease-out",
|
|
16668
|
-
isOpen &&
|
|
16669
|
-
effectiveError && "border-destructive/60
|
|
16792
|
+
isOpen && "border-ring shadow-lg shadow-primary/10",
|
|
16793
|
+
effectiveError && "border-destructive/60 bg-destructive/5"
|
|
16670
16794
|
),
|
|
16671
16795
|
children: [
|
|
16672
16796
|
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: cn("flex min-h-0 min-w-0 flex-1 items-center overflow-hidden", size === "sm" ? "gap-1.5" : "gap-2.5"), children: [
|
|
@@ -17552,6 +17676,7 @@ var LunarDatePicker = ({
|
|
|
17552
17676
|
formControlLabelClass,
|
|
17553
17677
|
"transition-colors duration-300 cursor-pointer",
|
|
17554
17678
|
disabled ? "text-muted-foreground" : "text-foreground group-focus-within:text-primary hover:text-primary",
|
|
17679
|
+
isOpen && "text-primary",
|
|
17555
17680
|
effectiveError && "text-destructive",
|
|
17556
17681
|
labelClassName
|
|
17557
17682
|
),
|
|
@@ -17601,19 +17726,19 @@ var LunarDatePicker = ({
|
|
|
17601
17726
|
{
|
|
17602
17727
|
ref: triggerRef,
|
|
17603
17728
|
className: cn(
|
|
17604
|
-
"group flex w-full items-center justify-between
|
|
17729
|
+
"group flex w-full items-center justify-between bg-background/80 backdrop-blur-sm",
|
|
17605
17730
|
formControlFixedClass,
|
|
17731
|
+
formControlGroupOutlineClass,
|
|
17606
17732
|
getBorderRadiusClass(resolvedBorderMode),
|
|
17607
17733
|
sizeStyles8[size].trigger,
|
|
17608
17734
|
formControlSizeStyles[requestedSize].control,
|
|
17609
17735
|
disabled ? "border-border/40 opacity-50 cursor-not-allowed" : [
|
|
17610
|
-
"
|
|
17611
|
-
"focus-within:border-primary focus-within:ring-0",
|
|
17736
|
+
"focus-within:border-ring",
|
|
17612
17737
|
"hover:bg-accent/10"
|
|
17613
17738
|
],
|
|
17614
17739
|
"transition-all duration-300 ease-out",
|
|
17615
|
-
isOpen &&
|
|
17616
|
-
effectiveError && "border-destructive/60
|
|
17740
|
+
isOpen && "border-ring shadow-lg shadow-primary/10",
|
|
17741
|
+
effectiveError && "border-destructive/60 bg-destructive/5",
|
|
17617
17742
|
className
|
|
17618
17743
|
),
|
|
17619
17744
|
children: [
|
|
@@ -18182,6 +18307,7 @@ var LunarDateRangePicker = ({
|
|
|
18182
18307
|
formControlLabelClass,
|
|
18183
18308
|
"transition-colors duration-300",
|
|
18184
18309
|
disabled ? "text-muted-foreground cursor-not-allowed" : "text-foreground group-focus-within:text-primary hover:text-primary cursor-pointer",
|
|
18310
|
+
isOpen && "text-primary",
|
|
18185
18311
|
effectiveError && "text-destructive",
|
|
18186
18312
|
labelClassName
|
|
18187
18313
|
),
|
|
@@ -18241,19 +18367,19 @@ var LunarDateRangePicker = ({
|
|
|
18241
18367
|
"aria-required": required,
|
|
18242
18368
|
"aria-invalid": !!effectiveError,
|
|
18243
18369
|
className: cn(
|
|
18244
|
-
"group flex w-full items-center justify-between
|
|
18370
|
+
"group flex w-full items-center justify-between bg-background/80 backdrop-blur-sm",
|
|
18245
18371
|
formControlFixedClass,
|
|
18372
|
+
formControlGroupOutlineClass,
|
|
18246
18373
|
getBorderRadiusClass(borderMode ?? "full"),
|
|
18247
18374
|
sizeStyles8[size].trigger,
|
|
18248
18375
|
formControlSizeStyles[requestedSize].control,
|
|
18249
18376
|
disabled ? "border-border/40 opacity-50 cursor-not-allowed" : [
|
|
18250
|
-
"
|
|
18251
|
-
"focus-within:border-primary focus-within:ring-0",
|
|
18377
|
+
"focus-within:border-ring",
|
|
18252
18378
|
"hover:bg-accent/10"
|
|
18253
18379
|
],
|
|
18254
18380
|
"transition-all duration-300 ease-out text-left",
|
|
18255
|
-
isOpen && "border-
|
|
18256
|
-
effectiveError && "border-destructive/60
|
|
18381
|
+
isOpen && "border-ring shadow-lg shadow-primary/10",
|
|
18382
|
+
effectiveError && "border-destructive/60 bg-destructive/5"
|
|
18257
18383
|
),
|
|
18258
18384
|
children: [
|
|
18259
18385
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: cn("flex min-h-0 min-w-0 flex-1 items-center overflow-hidden", size === "sm" ? "gap-1.5" : "gap-2.5"), children: [
|
|
@@ -18942,18 +19068,18 @@ function MonthYearPicker({
|
|
|
18942
19068
|
"aria-required": required,
|
|
18943
19069
|
"aria-invalid": !!effectiveError,
|
|
18944
19070
|
className: cn(
|
|
18945
|
-
"group flex w-full items-center justify-between
|
|
19071
|
+
"group flex w-full items-center justify-between bg-background/80 backdrop-blur-sm",
|
|
18946
19072
|
getBorderRadiusClass(resolvedBorderMode),
|
|
18947
19073
|
sz.control,
|
|
18948
19074
|
formControlSizeStyles[requestedSize].control,
|
|
18949
19075
|
formControlFixedClass,
|
|
18950
|
-
|
|
19076
|
+
formControlOutlineClass,
|
|
18951
19077
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
18952
19078
|
"transition-all duration-300 ease-out",
|
|
18953
|
-
effectiveError && "border-destructive/60
|
|
18954
|
-
success && !effectiveError && "border-success/60
|
|
18955
|
-
!effectiveError && !success && "
|
|
18956
|
-
open && "border-
|
|
19079
|
+
effectiveError && "border-destructive/60 bg-destructive/5",
|
|
19080
|
+
success && !effectiveError && "border-success/60 bg-success/5",
|
|
19081
|
+
!effectiveError && !success && "hover:bg-accent/10",
|
|
19082
|
+
open && "border-ring shadow-lg shadow-primary/10",
|
|
18957
19083
|
className
|
|
18958
19084
|
),
|
|
18959
19085
|
children: [
|
|
@@ -19135,7 +19261,7 @@ function MonthYearPicker({
|
|
|
19135
19261
|
] });
|
|
19136
19262
|
}
|
|
19137
19263
|
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: cn("w-full", className), ...rest, children: [
|
|
19138
|
-
label && /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("label", { className: cn(sz.label, "block mb-1.5 text-foreground/80", formControlLabelClass, effectiveError && "text-destructive", labelClassName), children: [
|
|
19264
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("label", { className: cn(sz.label, "block mb-1.5 text-foreground/80", formControlLabelClass, open && "text-primary", effectiveError && "text-destructive", labelClassName), children: [
|
|
19139
19265
|
label,
|
|
19140
19266
|
required && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "text-destructive ml-0.5", children: "*" })
|
|
19141
19267
|
] }),
|
|
@@ -20664,18 +20790,18 @@ function TimePicker({
|
|
|
20664
20790
|
"aria-required": required,
|
|
20665
20791
|
"aria-invalid": !!effectiveError,
|
|
20666
20792
|
className: cn(
|
|
20667
|
-
"group flex w-full items-center justify-between
|
|
20793
|
+
"group flex w-full items-center justify-between bg-background/80 backdrop-blur-sm",
|
|
20668
20794
|
getBorderRadiusClass(resolvedBorderMode),
|
|
20669
20795
|
sz.control,
|
|
20670
20796
|
formControlSizeStyles[requestedSize].control,
|
|
20671
20797
|
formControlFixedClass,
|
|
20672
|
-
|
|
20798
|
+
formControlOutlineClass,
|
|
20673
20799
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
20674
20800
|
"transition-all duration-300 ease-out",
|
|
20675
|
-
effectiveError && "border-destructive/60
|
|
20676
|
-
success && !effectiveError && "border-success/60
|
|
20677
|
-
!effectiveError && !success && "
|
|
20678
|
-
open && "border-
|
|
20801
|
+
effectiveError && "border-destructive/60 bg-destructive/5",
|
|
20802
|
+
success && !effectiveError && "border-success/60 bg-success/5",
|
|
20803
|
+
!effectiveError && !success && "hover:bg-accent/10",
|
|
20804
|
+
open && "border-ring shadow-lg shadow-primary/10",
|
|
20679
20805
|
className
|
|
20680
20806
|
),
|
|
20681
20807
|
children: [
|
|
@@ -21067,6 +21193,7 @@ function TimePicker({
|
|
|
21067
21193
|
sz.label,
|
|
21068
21194
|
formControlLabelClass,
|
|
21069
21195
|
disabled ? "text-muted-foreground" : "text-foreground",
|
|
21196
|
+
open && "text-primary",
|
|
21070
21197
|
effectiveError && "text-destructive",
|
|
21071
21198
|
"cursor-pointer transition-colors hover:text-primary"
|
|
21072
21199
|
),
|
|
@@ -21314,6 +21441,7 @@ var DateTimePicker = ({
|
|
|
21314
21441
|
sizeStyles8[size].label,
|
|
21315
21442
|
formControlLabelClass,
|
|
21316
21443
|
"text-foreground flex items-center gap-1",
|
|
21444
|
+
open && "text-primary",
|
|
21317
21445
|
effectiveError && "text-destructive",
|
|
21318
21446
|
labelClassName
|
|
21319
21447
|
),
|
|
@@ -21362,14 +21490,15 @@ var DateTimePicker = ({
|
|
|
21362
21490
|
"aria-required": required,
|
|
21363
21491
|
"aria-invalid": !!effectiveError,
|
|
21364
21492
|
className: cn(
|
|
21365
|
-
"flex w-full items-center justify-between
|
|
21493
|
+
"flex w-full items-center justify-between bg-background",
|
|
21366
21494
|
formControlFixedClass,
|
|
21495
|
+
formControlOutlineClass,
|
|
21367
21496
|
getBorderRadiusClass(resolvedBorderMode),
|
|
21368
21497
|
sizeStyles8[size].trigger,
|
|
21369
21498
|
formControlSizeStyles[requestedSize].control,
|
|
21370
|
-
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
21371
21499
|
disabled && "opacity-50 cursor-not-allowed",
|
|
21372
21500
|
!displayValue && "text-muted-foreground",
|
|
21501
|
+
open && "border-ring",
|
|
21373
21502
|
effectiveError && "border-destructive/60 bg-destructive/5"
|
|
21374
21503
|
),
|
|
21375
21504
|
children: [
|
|
@@ -24626,7 +24755,7 @@ var MultiCombobox = ({
|
|
|
24626
24755
|
}
|
|
24627
24756
|
};
|
|
24628
24757
|
const variantStyles6 = {
|
|
24629
|
-
default: "
|
|
24758
|
+
default: "bg-background shadow-sm",
|
|
24630
24759
|
outline: "border-2 border-input bg-transparent hover:border-primary",
|
|
24631
24760
|
ghost: "border border-transparent bg-muted/50 hover:bg-muted"
|
|
24632
24761
|
};
|
|
@@ -24858,13 +24987,13 @@ var MultiCombobox = ({
|
|
|
24858
24987
|
className: cn(
|
|
24859
24988
|
"group flex w-full items-center gap-2 transition-all duration-200",
|
|
24860
24989
|
formControlFixedClass,
|
|
24990
|
+
formControlOutlineClass,
|
|
24861
24991
|
getBorderRadiusClass(resolvedBorderMode),
|
|
24862
24992
|
sizeStyles8[size].trigger,
|
|
24863
24993
|
variantStyles6[variant],
|
|
24864
|
-
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30 focus-visible:border-primary",
|
|
24865
24994
|
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
24866
|
-
open && "border-
|
|
24867
|
-
!!effectiveError && "border-destructive
|
|
24995
|
+
open && "border-ring",
|
|
24996
|
+
!!effectiveError && "border-destructive"
|
|
24868
24997
|
),
|
|
24869
24998
|
children: [
|
|
24870
24999
|
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "flex min-h-0 min-w-0 flex-1 items-center gap-1.5 overflow-hidden", children: value.length > 0 ? showTags ? /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_jsx_runtime50.Fragment, { children: [
|
|
@@ -24952,6 +25081,7 @@ var MultiCombobox = ({
|
|
|
24952
25081
|
formControlLabelClass,
|
|
24953
25082
|
"transition-colors duration-200",
|
|
24954
25083
|
disabled ? "text-muted-foreground" : "text-foreground group-focus-within:text-primary",
|
|
25084
|
+
open && "text-primary",
|
|
24955
25085
|
effectiveError && "text-destructive",
|
|
24956
25086
|
labelClassName
|
|
24957
25087
|
),
|
|
@@ -24971,6 +25101,7 @@ var MultiCombobox = ({
|
|
|
24971
25101
|
formControlLabelClass,
|
|
24972
25102
|
"transition-colors duration-200",
|
|
24973
25103
|
disabled ? "text-muted-foreground" : "text-foreground group-focus-within:text-primary",
|
|
25104
|
+
open && "text-primary",
|
|
24974
25105
|
effectiveError && "text-destructive",
|
|
24975
25106
|
labelClassName
|
|
24976
25107
|
),
|
|
@@ -26984,6 +27115,7 @@ function CategoryTreeSelect(props) {
|
|
|
26984
27115
|
className: cn(
|
|
26985
27116
|
size === "sm" ? "text-xs" : size === "lg" ? "text-base" : "text-sm",
|
|
26986
27117
|
disabled ? "text-muted-foreground" : "text-foreground",
|
|
27118
|
+
isOpen && "text-primary",
|
|
26987
27119
|
effectiveError && "text-destructive",
|
|
26988
27120
|
labelClassName
|
|
26989
27121
|
),
|
|
@@ -27119,7 +27251,7 @@ function CategoryTreeSelect(props) {
|
|
|
27119
27251
|
}
|
|
27120
27252
|
};
|
|
27121
27253
|
const triggerVariantStyles = {
|
|
27122
|
-
default: "
|
|
27254
|
+
default: "bg-background shadow-sm",
|
|
27123
27255
|
outline: "border-2 border-input bg-transparent hover:border-primary",
|
|
27124
27256
|
ghost: "border border-transparent bg-muted/50 hover:bg-muted",
|
|
27125
27257
|
filled: "border border-transparent bg-muted/70 hover:bg-muted"
|
|
@@ -27236,14 +27368,14 @@ function CategoryTreeSelect(props) {
|
|
|
27236
27368
|
className: cn(
|
|
27237
27369
|
"group flex w-full items-center justify-between transition-all duration-200",
|
|
27238
27370
|
formControlFixedClass,
|
|
27371
|
+
formControlOutlineClass,
|
|
27239
27372
|
getBorderRadiusClass(resolvedBorderMode ?? "full"),
|
|
27240
27373
|
"backdrop-blur-sm",
|
|
27241
27374
|
triggerSizeStyles[size].button,
|
|
27242
27375
|
triggerVariantStyles[variant],
|
|
27243
|
-
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/50 focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
|
27244
27376
|
disabled && "opacity-50 cursor-not-allowed hover:transform-none hover:shadow-none",
|
|
27245
|
-
isOpen && "border-
|
|
27246
|
-
effectiveError && "border-destructive
|
|
27377
|
+
isOpen && "border-ring shadow-lg shadow-primary/10",
|
|
27378
|
+
effectiveError && "border-destructive"
|
|
27247
27379
|
),
|
|
27248
27380
|
children: [
|
|
27249
27381
|
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex min-h-0 min-w-0 flex-1 items-center gap-2.5 overflow-hidden text-left", children: [
|
|
@@ -29947,11 +30079,13 @@ function ColorPicker({
|
|
|
29947
30079
|
type: "button",
|
|
29948
30080
|
disabled,
|
|
29949
30081
|
className: cn(
|
|
29950
|
-
"w-full
|
|
30082
|
+
"w-full bg-background flex items-center justify-between",
|
|
30083
|
+
formControlOutlineClass,
|
|
29951
30084
|
getBorderRadiusClass(resolvedBorderMode),
|
|
29952
30085
|
sizeClasses2[size],
|
|
29953
30086
|
formControlFixedClass,
|
|
29954
|
-
"
|
|
30087
|
+
"transition-colors",
|
|
30088
|
+
open && "border-ring",
|
|
29955
30089
|
disabled && "opacity-50 cursor-not-allowed",
|
|
29956
30090
|
triggerClassName
|
|
29957
30091
|
),
|
|
@@ -34266,6 +34400,7 @@ init_cn();
|
|
|
34266
34400
|
init_Popover();
|
|
34267
34401
|
var import_lucide_react45 = require("lucide-react");
|
|
34268
34402
|
init_useSmartTranslations();
|
|
34403
|
+
init_form_control_size();
|
|
34269
34404
|
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
34270
34405
|
var FormRadioView = ({ node, updateAttributes, editor, selected }) => {
|
|
34271
34406
|
const t = useSmartTranslations("UEditor");
|
|
@@ -34338,7 +34473,7 @@ var FormRadioView = ({ node, updateAttributes, editor, selected }) => {
|
|
|
34338
34473
|
type: "text",
|
|
34339
34474
|
value: groupName,
|
|
34340
34475
|
onChange: (e) => updateAttributes({ name: e.target.value }),
|
|
34341
|
-
className:
|
|
34476
|
+
className: `w-full rounded-lg bg-background px-2 py-1.5 text-sm text-foreground ${formControlOutlineClass}`
|
|
34342
34477
|
}
|
|
34343
34478
|
)
|
|
34344
34479
|
] })
|
|
@@ -38574,6 +38709,7 @@ var import_react_dom8 = require("react-dom");
|
|
|
38574
38709
|
init_useSmartTranslations();
|
|
38575
38710
|
var import_lucide_react53 = require("lucide-react");
|
|
38576
38711
|
init_cn();
|
|
38712
|
+
init_form_control_size();
|
|
38577
38713
|
init_toolbar();
|
|
38578
38714
|
init_inputs();
|
|
38579
38715
|
init_link_commands();
|
|
@@ -39329,7 +39465,7 @@ var BubbleMenuContent = ({
|
|
|
39329
39465
|
}
|
|
39330
39466
|
)
|
|
39331
39467
|
] }),
|
|
39332
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "flex h-9 items-center overflow-hidden rounded-md
|
|
39468
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: cn("flex h-9 items-center overflow-hidden rounded-md bg-muted/40", formControlGroupOutlineClass), children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
39333
39469
|
"input",
|
|
39334
39470
|
{
|
|
39335
39471
|
value: formulaDraft,
|
|
@@ -39427,7 +39563,7 @@ var BubbleMenuContent = ({
|
|
|
39427
39563
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "space-y-2", children: [
|
|
39428
39564
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { children: [
|
|
39429
39565
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "mb-1 px-1 text-[11px] font-medium text-muted-foreground", children: t("toolbar.fontSize") }),
|
|
39430
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "flex h-9 items-center overflow-hidden rounded-md
|
|
39566
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: cn("flex h-9 items-center overflow-hidden rounded-md bg-muted/40", formControlGroupOutlineClass), children: [
|
|
39431
39567
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
39432
39568
|
"input",
|
|
39433
39569
|
{
|
|
@@ -40587,7 +40723,7 @@ function surrogateLow(ch) {
|
|
|
40587
40723
|
function surrogateHigh(ch) {
|
|
40588
40724
|
return ch >= 55296 && ch < 56320;
|
|
40589
40725
|
}
|
|
40590
|
-
var
|
|
40726
|
+
var Fragment31 = class _Fragment {
|
|
40591
40727
|
/**
|
|
40592
40728
|
@internal
|
|
40593
40729
|
*/
|
|
@@ -40879,7 +41015,7 @@ var Fragment30 = class _Fragment {
|
|
|
40879
41015
|
throw new RangeError("Can not convert " + nodes + " to a Fragment" + (nodes.nodesBetween ? " (looks like multiple versions of prosemirror-model were loaded)" : ""));
|
|
40880
41016
|
}
|
|
40881
41017
|
};
|
|
40882
|
-
|
|
41018
|
+
Fragment31.empty = new Fragment31([], 0);
|
|
40883
41019
|
var found = { index: 0, offset: 0 };
|
|
40884
41020
|
function retIndex(index, offset) {
|
|
40885
41021
|
found.index = index;
|
|
@@ -41104,7 +41240,7 @@ var Slice = class _Slice {
|
|
|
41104
41240
|
let openStart = json.openStart || 0, openEnd = json.openEnd || 0;
|
|
41105
41241
|
if (typeof openStart != "number" || typeof openEnd != "number")
|
|
41106
41242
|
throw new RangeError("Invalid input for Slice.fromJSON");
|
|
41107
|
-
return new _Slice(
|
|
41243
|
+
return new _Slice(Fragment31.fromJSON(schema, json.content), openStart, openEnd);
|
|
41108
41244
|
}
|
|
41109
41245
|
/**
|
|
41110
41246
|
Create a slice from a fragment by taking the maximum possible
|
|
@@ -41119,7 +41255,7 @@ var Slice = class _Slice {
|
|
|
41119
41255
|
return new _Slice(fragment, openStart, openEnd);
|
|
41120
41256
|
}
|
|
41121
41257
|
};
|
|
41122
|
-
Slice.empty = new Slice(
|
|
41258
|
+
Slice.empty = new Slice(Fragment31.empty, 0, 0);
|
|
41123
41259
|
function removeRange(content, from, to) {
|
|
41124
41260
|
let { index, offset } = content.findIndex(from), child = content.maybeChild(index);
|
|
41125
41261
|
let { index: indexTo, offset: offsetTo } = content.findIndex(to);
|
|
@@ -41218,7 +41354,7 @@ function replaceThreeWay($from, $start, $end, $to, depth) {
|
|
|
41218
41354
|
addNode(close(openEnd, replaceTwoWay($end, $to, depth + 1)), content);
|
|
41219
41355
|
}
|
|
41220
41356
|
addRange($to, null, depth, content);
|
|
41221
|
-
return new
|
|
41357
|
+
return new Fragment31(content);
|
|
41222
41358
|
}
|
|
41223
41359
|
function replaceTwoWay($from, $to, depth) {
|
|
41224
41360
|
let content = [];
|
|
@@ -41228,13 +41364,13 @@ function replaceTwoWay($from, $to, depth) {
|
|
|
41228
41364
|
addNode(close(type, replaceTwoWay($from, $to, depth + 1)), content);
|
|
41229
41365
|
}
|
|
41230
41366
|
addRange($to, null, depth, content);
|
|
41231
|
-
return new
|
|
41367
|
+
return new Fragment31(content);
|
|
41232
41368
|
}
|
|
41233
41369
|
function prepareSliceForReplace(slice, $along) {
|
|
41234
41370
|
let extra = $along.depth - slice.openStart, parent = $along.node(extra);
|
|
41235
41371
|
let node = parent.copy(slice.content);
|
|
41236
41372
|
for (let i = extra - 1; i >= 0; i--)
|
|
41237
|
-
node = $along.node(i).copy(
|
|
41373
|
+
node = $along.node(i).copy(Fragment31.from(node));
|
|
41238
41374
|
return {
|
|
41239
41375
|
start: node.resolveNoCache(slice.openStart + extra),
|
|
41240
41376
|
end: node.resolveNoCache(node.content.size - slice.openEnd - extra)
|
|
@@ -41573,7 +41709,7 @@ var Node7 = class _Node {
|
|
|
41573
41709
|
this.type = type;
|
|
41574
41710
|
this.attrs = attrs;
|
|
41575
41711
|
this.marks = marks;
|
|
41576
|
-
this.content = content ||
|
|
41712
|
+
this.content = content || Fragment31.empty;
|
|
41577
41713
|
}
|
|
41578
41714
|
/**
|
|
41579
41715
|
The array of this node's child nodes.
|
|
@@ -41879,7 +42015,7 @@ var Node7 = class _Node {
|
|
|
41879
42015
|
can optionally pass `start` and `end` indices into the
|
|
41880
42016
|
replacement fragment.
|
|
41881
42017
|
*/
|
|
41882
|
-
canReplace(from, to, replacement =
|
|
42018
|
+
canReplace(from, to, replacement = Fragment31.empty, start = 0, end = replacement.childCount) {
|
|
41883
42019
|
let one = this.contentMatchAt(from).matchFragment(replacement, start, end);
|
|
41884
42020
|
let two = one && one.matchFragment(this.content, to);
|
|
41885
42021
|
if (!two || !two.validEnd)
|
|
@@ -41961,7 +42097,7 @@ var Node7 = class _Node {
|
|
|
41961
42097
|
throw new RangeError("Invalid text node in JSON");
|
|
41962
42098
|
return schema.text(json.text, marks);
|
|
41963
42099
|
}
|
|
41964
|
-
let content =
|
|
42100
|
+
let content = Fragment31.fromJSON(schema, json.content);
|
|
41965
42101
|
let node = schema.nodeType(json.type).create(json.attrs, content, marks);
|
|
41966
42102
|
node.type.checkAttrs(node.attrs);
|
|
41967
42103
|
return node;
|
|
@@ -42057,7 +42193,7 @@ var ContentMatch = class _ContentMatch {
|
|
|
42057
42193
|
function search(match, types) {
|
|
42058
42194
|
let finished = match.matchFragment(after, startIndex);
|
|
42059
42195
|
if (finished && (!toEnd || finished.validEnd))
|
|
42060
|
-
return
|
|
42196
|
+
return Fragment31.from(types.map((tp) => tp.createAndFill()));
|
|
42061
42197
|
for (let i = 0; i < match.next.length; i++) {
|
|
42062
42198
|
let { type, next } = match.next[i];
|
|
42063
42199
|
if (!(type.isText || type.hasRequiredAttrs()) && seen.indexOf(next) == -1) {
|
|
@@ -42625,7 +42761,7 @@ function mapFragment(fragment, f, parent) {
|
|
|
42625
42761
|
child = f(child, parent, i);
|
|
42626
42762
|
mapped.push(child);
|
|
42627
42763
|
}
|
|
42628
|
-
return
|
|
42764
|
+
return Fragment31.fromArray(mapped);
|
|
42629
42765
|
}
|
|
42630
42766
|
var AddMarkStep = class _AddMarkStep extends Step {
|
|
42631
42767
|
/**
|
|
@@ -42742,7 +42878,7 @@ var AddNodeMarkStep = class _AddNodeMarkStep extends Step {
|
|
|
42742
42878
|
if (!node)
|
|
42743
42879
|
return StepResult.fail("No node at mark step's position");
|
|
42744
42880
|
let updated = node.type.create(node.attrs, null, this.mark.addToSet(node.marks));
|
|
42745
|
-
return StepResult.fromReplace(doc, this.pos, this.pos + 1, new Slice(
|
|
42881
|
+
return StepResult.fromReplace(doc, this.pos, this.pos + 1, new Slice(Fragment31.from(updated), 0, node.isLeaf ? 0 : 1));
|
|
42746
42882
|
}
|
|
42747
42883
|
invert(doc) {
|
|
42748
42884
|
let node = doc.nodeAt(this.pos);
|
|
@@ -42788,7 +42924,7 @@ var RemoveNodeMarkStep = class _RemoveNodeMarkStep extends Step {
|
|
|
42788
42924
|
if (!node)
|
|
42789
42925
|
return StepResult.fail("No node at mark step's position");
|
|
42790
42926
|
let updated = node.type.create(node.attrs, null, this.mark.removeFromSet(node.marks));
|
|
42791
|
-
return StepResult.fromReplace(doc, this.pos, this.pos + 1, new Slice(
|
|
42927
|
+
return StepResult.fromReplace(doc, this.pos, this.pos + 1, new Slice(Fragment31.from(updated), 0, node.isLeaf ? 0 : 1));
|
|
42792
42928
|
}
|
|
42793
42929
|
invert(doc) {
|
|
42794
42930
|
let node = doc.nodeAt(this.pos);
|
|
@@ -42991,7 +43127,7 @@ var AttrStep = class _AttrStep extends Step {
|
|
|
42991
43127
|
attrs[name] = node.attrs[name];
|
|
42992
43128
|
attrs[this.attr] = this.value;
|
|
42993
43129
|
let updated = node.type.create(attrs, null, node.marks);
|
|
42994
|
-
return StepResult.fromReplace(doc, this.pos, this.pos + 1, new Slice(
|
|
43130
|
+
return StepResult.fromReplace(doc, this.pos, this.pos + 1, new Slice(Fragment31.from(updated), 0, node.isLeaf ? 0 : 1));
|
|
42995
43131
|
}
|
|
42996
43132
|
getMap() {
|
|
42997
43133
|
return StepMap.empty;
|
|
@@ -43375,7 +43511,7 @@ var NodeSelection2 = class _NodeSelection extends Selection {
|
|
|
43375
43511
|
return new _NodeSelection($pos);
|
|
43376
43512
|
}
|
|
43377
43513
|
content() {
|
|
43378
|
-
return new Slice(
|
|
43514
|
+
return new Slice(Fragment31.from(this.node), 0, 0);
|
|
43379
43515
|
}
|
|
43380
43516
|
eq(other) {
|
|
43381
43517
|
return other instanceof _NodeSelection && other.anchor == this.anchor;
|
|
@@ -44103,10 +44239,10 @@ var CellSelection2 = class CellSelection3 extends Selection {
|
|
|
44103
44239
|
}
|
|
44104
44240
|
rowContent.push(cell);
|
|
44105
44241
|
}
|
|
44106
|
-
rows.push(table.child(row).copy(
|
|
44242
|
+
rows.push(table.child(row).copy(Fragment31.from(rowContent)));
|
|
44107
44243
|
}
|
|
44108
44244
|
const fragment = this.isColSelection() && this.isRowSelection() ? table : rows;
|
|
44109
|
-
return new Slice(
|
|
44245
|
+
return new Slice(Fragment31.from(fragment), 1, 1);
|
|
44110
44246
|
}
|
|
44111
44247
|
replace(tr, content = Slice.empty) {
|
|
44112
44248
|
const mapFrom = tr.steps.length, ranges = this.ranges;
|
|
@@ -44118,7 +44254,7 @@ var CellSelection2 = class CellSelection3 extends Selection {
|
|
|
44118
44254
|
if (sel) tr.setSelection(sel);
|
|
44119
44255
|
}
|
|
44120
44256
|
replaceWith(tr, node) {
|
|
44121
|
-
this.replace(tr, new Slice(
|
|
44257
|
+
this.replace(tr, new Slice(Fragment31.from(node), 0, 0));
|
|
44122
44258
|
}
|
|
44123
44259
|
forEachCell(f) {
|
|
44124
44260
|
const table = this.$anchorCell.node(-1);
|
|
@@ -47382,6 +47518,7 @@ var import_react82 = require("@tiptap/react");
|
|
|
47382
47518
|
var import_lucide_react58 = require("lucide-react");
|
|
47383
47519
|
init_useSmartTranslations();
|
|
47384
47520
|
init_table_dom_utils();
|
|
47521
|
+
init_form_control_size();
|
|
47385
47522
|
var import_jsx_runtime102 = require("react/jsx-runtime");
|
|
47386
47523
|
function TableFormulaBar({ editor }) {
|
|
47387
47524
|
const t = useSmartTranslations("UEditor");
|
|
@@ -47480,7 +47617,7 @@ function TableFormulaBar({ editor }) {
|
|
|
47480
47617
|
}
|
|
47481
47618
|
},
|
|
47482
47619
|
"aria-label": t("tableMenu.editFormula"),
|
|
47483
|
-
className:
|
|
47620
|
+
className: `h-7 min-w-0 flex-1 rounded-md bg-background px-2 font-mono text-sm text-foreground ${formControlOutlineClass}`
|
|
47484
47621
|
}
|
|
47485
47622
|
),
|
|
47486
47623
|
selectedCell.formulaState === "error" && /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(
|