@underverse-ui/underverse 1.0.198 → 1.0.199
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/index.cjs +196 -166
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +253 -223
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2915,6 +2915,39 @@ function useOverlayScrollbarTarget(targetRef, options = {}) {
|
|
|
2915
2915
|
}
|
|
2916
2916
|
var OverlayScrollbarProvider_default = OverlayScrollbarProvider;
|
|
2917
2917
|
|
|
2918
|
+
// src/components/form-control-size.ts
|
|
2919
|
+
var formControlSizeStyles = {
|
|
2920
|
+
sm: {
|
|
2921
|
+
control: "h-8 px-3 text-sm leading-none md:h-7 md:text-xs",
|
|
2922
|
+
compactControl: "h-8 px-2.5 text-sm leading-none md:h-7 md:text-xs",
|
|
2923
|
+
input: "h-8 px-3 text-sm leading-none md:h-7 md:text-xs",
|
|
2924
|
+
label: "text-xs",
|
|
2925
|
+
icon: "h-4 w-4 md:h-3.5 md:w-3.5",
|
|
2926
|
+
iconButton: "h-7 w-7 md:h-6 md:w-6",
|
|
2927
|
+
tag: "h-5 max-w-24 px-2 text-[10px] leading-none"
|
|
2928
|
+
},
|
|
2929
|
+
md: {
|
|
2930
|
+
control: "h-10 px-3 text-sm leading-none",
|
|
2931
|
+
compactControl: "h-10 px-3 text-sm leading-none",
|
|
2932
|
+
input: "h-10 px-4 text-sm leading-none",
|
|
2933
|
+
label: "text-sm",
|
|
2934
|
+
icon: "h-4 w-4",
|
|
2935
|
+
iconButton: "h-8 w-8",
|
|
2936
|
+
tag: "h-6 max-w-28 px-2 text-xs leading-none"
|
|
2937
|
+
},
|
|
2938
|
+
lg: {
|
|
2939
|
+
control: "h-12 px-4 text-base leading-none",
|
|
2940
|
+
compactControl: "h-12 px-4 text-base leading-none",
|
|
2941
|
+
input: "h-12 px-5 text-base leading-none",
|
|
2942
|
+
label: "text-base",
|
|
2943
|
+
icon: "h-5 w-5",
|
|
2944
|
+
iconButton: "h-10 w-10",
|
|
2945
|
+
tag: "h-7 max-w-32 px-2.5 text-sm leading-none"
|
|
2946
|
+
}
|
|
2947
|
+
};
|
|
2948
|
+
var formControlFixedClass = "min-h-0 overflow-hidden";
|
|
2949
|
+
var formControlValueClass = "max-h-full min-w-0 flex-1 truncate whitespace-nowrap";
|
|
2950
|
+
|
|
2918
2951
|
// src/components/Input.tsx
|
|
2919
2952
|
import { jsx as jsx11, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
2920
2953
|
var Input = forwardRef3(
|
|
@@ -2978,23 +3011,7 @@ var Input = forwardRef3(
|
|
|
2978
3011
|
error: "border-destructive focus-visible:outline-none focus-visible:border-destructive"
|
|
2979
3012
|
}
|
|
2980
3013
|
};
|
|
2981
|
-
const sizeStyles8 =
|
|
2982
|
-
sm: {
|
|
2983
|
-
input: "px-3 py-1.5 text-sm h-8 md:h-7 md:py-1 md:text-xs",
|
|
2984
|
-
icon: "w-4 h-4",
|
|
2985
|
-
button: "h-7 w-7"
|
|
2986
|
-
},
|
|
2987
|
-
md: {
|
|
2988
|
-
input: "px-4 py-2 text-sm h-10",
|
|
2989
|
-
icon: "w-5 h-5",
|
|
2990
|
-
button: "h-8 w-8"
|
|
2991
|
-
},
|
|
2992
|
-
lg: {
|
|
2993
|
-
input: "px-5 py-4 text-base h-12",
|
|
2994
|
-
icon: "w-6 h-6",
|
|
2995
|
-
button: "h-10 w-10"
|
|
2996
|
-
}
|
|
2997
|
-
};
|
|
3014
|
+
const sizeStyles8 = formControlSizeStyles;
|
|
2998
3015
|
const getErrorKey = (v) => {
|
|
2999
3016
|
if (v.valueMissing) return "required";
|
|
3000
3017
|
if (v.typeMismatch) return "typeMismatch";
|
|
@@ -3053,7 +3070,7 @@ var Input = forwardRef3(
|
|
|
3053
3070
|
htmlFor: resolvedId,
|
|
3054
3071
|
className: cn(
|
|
3055
3072
|
// Label size follows input size
|
|
3056
|
-
size
|
|
3073
|
+
sizeStyles8[size].label,
|
|
3057
3074
|
"font-medium transition-colors duration-200",
|
|
3058
3075
|
// default color and highlight while any descendant focused
|
|
3059
3076
|
disabled ? "text-muted-foreground" : cn("text-foreground group-focus-within:text-primary", success && "text-primary"),
|
|
@@ -3087,7 +3104,7 @@ var Input = forwardRef3(
|
|
|
3087
3104
|
"div",
|
|
3088
3105
|
{
|
|
3089
3106
|
className: cn(
|
|
3090
|
-
"absolute left-3 top-1/2 -translate-y-1/2 z-10",
|
|
3107
|
+
"absolute left-3 top-1/2 -translate-y-1/2 z-10 flex max-h-full items-center overflow-hidden",
|
|
3091
3108
|
"text-muted-foreground transition-colors duration-200",
|
|
3092
3109
|
// highlight icon when input (or controls) focused
|
|
3093
3110
|
"group-focus-within:text-primary"
|
|
@@ -3117,6 +3134,7 @@ var Input = forwardRef3(
|
|
|
3117
3134
|
"aria-describedby": [errorId, descId].filter(Boolean).join(" ") || void 0,
|
|
3118
3135
|
className: cn(
|
|
3119
3136
|
"w-full text-foreground transition-all duration-200 ease-out",
|
|
3137
|
+
formControlFixedClass,
|
|
3120
3138
|
"placeholder:text-muted-foreground focus:outline-none focus-visible:outline-none",
|
|
3121
3139
|
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
3122
3140
|
// Size styles
|
|
@@ -3152,7 +3170,7 @@ var Input = forwardRef3(
|
|
|
3152
3170
|
"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors rounded-md",
|
|
3153
3171
|
"focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1",
|
|
3154
3172
|
"active:bg-accent active:text-accent-foreground",
|
|
3155
|
-
sizeStyles8[size].
|
|
3173
|
+
sizeStyles8[size].iconButton
|
|
3156
3174
|
),
|
|
3157
3175
|
tabIndex: 0,
|
|
3158
3176
|
"aria-label": gi18n.clearInput ?? "Clear input",
|
|
@@ -3168,7 +3186,7 @@ var Input = forwardRef3(
|
|
|
3168
3186
|
"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors rounded-full",
|
|
3169
3187
|
"focus:outline-none focus-visible:ring-1 focus-visible:ring-ring/40",
|
|
3170
3188
|
"active:bg-accent/50 active:text-accent-foreground",
|
|
3171
|
-
sizeStyles8[size].
|
|
3189
|
+
sizeStyles8[size].iconButton
|
|
3172
3190
|
),
|
|
3173
3191
|
tabIndex: 0,
|
|
3174
3192
|
"aria-label": showPassword ? gi18n.hidePassword ?? "Hide password" : gi18n.showPassword ?? "Show password",
|
|
@@ -5707,23 +5725,23 @@ var TagInput = forwardRef5(
|
|
|
5707
5725
|
const moreLabel = labels?.moreCount?.replace("{count}", String(hiddenCount)) ?? `+${hiddenCount} more`;
|
|
5708
5726
|
const sizeStyles8 = {
|
|
5709
5727
|
sm: {
|
|
5710
|
-
container:
|
|
5711
|
-
input:
|
|
5712
|
-
tag:
|
|
5728
|
+
container: formControlSizeStyles.sm.control,
|
|
5729
|
+
input: formControlSizeStyles.sm.label,
|
|
5730
|
+
tag: formControlSizeStyles.sm.tag,
|
|
5713
5731
|
tagIcon: "h-3 w-3",
|
|
5714
5732
|
button: "h-7 text-xs px-2"
|
|
5715
5733
|
},
|
|
5716
5734
|
md: {
|
|
5717
|
-
container:
|
|
5718
|
-
input:
|
|
5719
|
-
tag:
|
|
5735
|
+
container: formControlSizeStyles.md.control,
|
|
5736
|
+
input: formControlSizeStyles.md.label,
|
|
5737
|
+
tag: formControlSizeStyles.md.tag,
|
|
5720
5738
|
tagIcon: "h-3.5 w-3.5",
|
|
5721
5739
|
button: "h-9 text-sm px-3"
|
|
5722
5740
|
},
|
|
5723
5741
|
lg: {
|
|
5724
|
-
container:
|
|
5725
|
-
input:
|
|
5726
|
-
tag:
|
|
5742
|
+
container: formControlSizeStyles.lg.control,
|
|
5743
|
+
input: formControlSizeStyles.lg.label,
|
|
5744
|
+
tag: formControlSizeStyles.lg.tag,
|
|
5727
5745
|
tagIcon: "h-4 w-4",
|
|
5728
5746
|
button: "h-11 text-base px-4"
|
|
5729
5747
|
}
|
|
@@ -5794,7 +5812,7 @@ var TagInput = forwardRef5(
|
|
|
5794
5812
|
htmlFor: inputId,
|
|
5795
5813
|
className: cn(
|
|
5796
5814
|
"block font-medium transition-colors duration-200",
|
|
5797
|
-
size
|
|
5815
|
+
formControlSizeStyles[size].label,
|
|
5798
5816
|
disabled ? "text-muted-foreground" : isFocused ? "text-primary" : "text-foreground",
|
|
5799
5817
|
labelClassName
|
|
5800
5818
|
),
|
|
@@ -5815,7 +5833,8 @@ var TagInput = forwardRef5(
|
|
|
5815
5833
|
{
|
|
5816
5834
|
onClick: handleContainerClick,
|
|
5817
5835
|
className: cn(
|
|
5818
|
-
"flex
|
|
5836
|
+
"flex items-center gap-1.5 cursor-text",
|
|
5837
|
+
formControlFixedClass,
|
|
5819
5838
|
"bg-background border border-input",
|
|
5820
5839
|
"transition-all duration-200",
|
|
5821
5840
|
"hover:border-accent-foreground/20",
|
|
@@ -5829,13 +5848,13 @@ var TagInput = forwardRef5(
|
|
|
5829
5848
|
"span",
|
|
5830
5849
|
{
|
|
5831
5850
|
className: cn(
|
|
5832
|
-
"inline-flex items-center",
|
|
5851
|
+
"inline-flex min-w-0 shrink-0 items-center gap-1 overflow-hidden rounded-full",
|
|
5833
5852
|
"bg-primary/10 text-primary font-mono",
|
|
5834
5853
|
"animate-in fade-in-0 zoom-in-95 duration-200",
|
|
5835
5854
|
sizeStyles8[size].tag
|
|
5836
5855
|
),
|
|
5837
5856
|
children: [
|
|
5838
|
-
/* @__PURE__ */ jsx17("span", { className: "
|
|
5857
|
+
/* @__PURE__ */ jsx17("span", { className: "min-w-0 truncate", children: tag }),
|
|
5839
5858
|
/* @__PURE__ */ jsx17(
|
|
5840
5859
|
"button",
|
|
5841
5860
|
{
|
|
@@ -5869,7 +5888,7 @@ var TagInput = forwardRef5(
|
|
|
5869
5888
|
setIsExpanded(true);
|
|
5870
5889
|
},
|
|
5871
5890
|
className: cn(
|
|
5872
|
-
"inline-flex items-center cursor-pointer",
|
|
5891
|
+
"inline-flex shrink-0 items-center cursor-pointer overflow-hidden rounded-full",
|
|
5873
5892
|
"bg-muted text-muted-foreground hover:bg-muted/80",
|
|
5874
5893
|
"transition-colors duration-150",
|
|
5875
5894
|
"focus:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
@@ -5888,7 +5907,7 @@ var TagInput = forwardRef5(
|
|
|
5888
5907
|
setIsExpanded(false);
|
|
5889
5908
|
},
|
|
5890
5909
|
className: cn(
|
|
5891
|
-
"inline-flex items-center cursor-pointer",
|
|
5910
|
+
"inline-flex shrink-0 items-center cursor-pointer overflow-hidden rounded-full",
|
|
5892
5911
|
"bg-muted/50 text-muted-foreground hover:bg-muted/80",
|
|
5893
5912
|
"transition-colors duration-150",
|
|
5894
5913
|
"focus:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
@@ -5918,7 +5937,7 @@ var TagInput = forwardRef5(
|
|
|
5918
5937
|
placeholder: isMaxReached ? `Max ${maxTags} tags` : currentPlaceholder,
|
|
5919
5938
|
disabled: disabled || isMaxReached,
|
|
5920
5939
|
className: cn(
|
|
5921
|
-
"
|
|
5940
|
+
"h-full min-w-0 flex-1 bg-transparent outline-none",
|
|
5922
5941
|
"placeholder:text-muted-foreground",
|
|
5923
5942
|
"disabled:cursor-not-allowed",
|
|
5924
5943
|
sizeStyles8[size].input
|
|
@@ -8914,7 +8933,7 @@ var DropdownMenuSub = ({ label, icon: Icon, disabled, borderMode, children }) =>
|
|
|
8914
8933
|
}
|
|
8915
8934
|
);
|
|
8916
8935
|
};
|
|
8917
|
-
var SelectDropdown = ({ options, value, onChange, placeholder = "Select...", className, borderMode }) => {
|
|
8936
|
+
var SelectDropdown = ({ options, value, onChange, placeholder = "Select...", className, borderMode, size = "md" }) => {
|
|
8918
8937
|
const globalConfig = useUnderverseUIConfig();
|
|
8919
8938
|
const resolvedBorderMode = borderMode ?? globalConfig.dropdownMenu?.borderMode ?? globalConfig.borderMode;
|
|
8920
8939
|
return /* @__PURE__ */ jsx32(
|
|
@@ -8924,15 +8943,17 @@ var SelectDropdown = ({ options, value, onChange, placeholder = "Select...", cla
|
|
|
8924
8943
|
"button",
|
|
8925
8944
|
{
|
|
8926
8945
|
className: cn(
|
|
8927
|
-
"inline-flex items-center justify-between gap-2
|
|
8946
|
+
"inline-flex items-center justify-between gap-2 border bg-background border-border/60",
|
|
8928
8947
|
resolvedBorderMode ? getBorderRadiusClass(resolvedBorderMode) : "rounded-2xl",
|
|
8948
|
+
formControlFixedClass,
|
|
8949
|
+
formControlSizeStyles[size].control,
|
|
8929
8950
|
"hover:bg-accent/50",
|
|
8930
8951
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
|
8931
8952
|
className
|
|
8932
8953
|
),
|
|
8933
8954
|
children: [
|
|
8934
|
-
/* @__PURE__ */ jsx32("span", { className: "
|
|
8935
|
-
/* @__PURE__ */ jsx32("svg", { width: "16", height: "16", viewBox: "0 0 20 20", fill: "none", className: "opacity-70", children: /* @__PURE__ */ jsx32("path", { d: "M6 8l4 4 4-4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
8955
|
+
/* @__PURE__ */ jsx32("span", { className: cn(formControlValueClass, "max-w-64 text-foreground/90"), children: value || placeholder }),
|
|
8956
|
+
/* @__PURE__ */ jsx32("svg", { width: "16", height: "16", viewBox: "0 0 20 20", fill: "none", className: "shrink-0 opacity-70", children: /* @__PURE__ */ jsx32("path", { d: "M6 8l4 4 4-4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
8936
8957
|
]
|
|
8937
8958
|
}
|
|
8938
8959
|
),
|
|
@@ -9183,9 +9204,9 @@ var Combobox = ({
|
|
|
9183
9204
|
lg: "px-4 py-3 text-base gap-3"
|
|
9184
9205
|
};
|
|
9185
9206
|
const iconSizeStyles = {
|
|
9186
|
-
sm:
|
|
9187
|
-
md:
|
|
9188
|
-
lg:
|
|
9207
|
+
sm: formControlSizeStyles.sm.icon,
|
|
9208
|
+
md: formControlSizeStyles.md.icon,
|
|
9209
|
+
lg: formControlSizeStyles.lg.icon
|
|
9189
9210
|
};
|
|
9190
9211
|
const checkIconSizeStyles = {
|
|
9191
9212
|
sm: "h-3.5 w-3.5",
|
|
@@ -9392,9 +9413,9 @@ var Combobox = ({
|
|
|
9392
9413
|
}
|
|
9393
9414
|
);
|
|
9394
9415
|
const sizeStyles8 = {
|
|
9395
|
-
sm:
|
|
9396
|
-
md:
|
|
9397
|
-
lg:
|
|
9416
|
+
sm: formControlSizeStyles.sm.control,
|
|
9417
|
+
md: formControlSizeStyles.md.control,
|
|
9418
|
+
lg: formControlSizeStyles.lg.control
|
|
9398
9419
|
};
|
|
9399
9420
|
const variantStyles6 = {
|
|
9400
9421
|
default: "border border-input bg-background hover:bg-accent/5 hover:border-primary/40",
|
|
@@ -9402,7 +9423,7 @@ var Combobox = ({
|
|
|
9402
9423
|
ghost: "border-0 bg-transparent hover:bg-accent/50",
|
|
9403
9424
|
filled: "border-0 bg-muted/50 hover:bg-muted/80"
|
|
9404
9425
|
};
|
|
9405
|
-
const labelSize = size
|
|
9426
|
+
const labelSize = formControlSizeStyles[size].label;
|
|
9406
9427
|
const verticalGap = size === "sm" ? "space-y-1.5" : "space-y-2";
|
|
9407
9428
|
const dropdownBackgroundStyle = matchTriggerBackground && triggerBackgroundColor ? { backgroundColor: triggerBackgroundColor } : void 0;
|
|
9408
9429
|
const triggerButtonBaseProps = {
|
|
@@ -9428,7 +9449,8 @@ var Combobox = ({
|
|
|
9428
9449
|
}
|
|
9429
9450
|
},
|
|
9430
9451
|
className: cn(
|
|
9431
|
-
"group flex w-full items-center justify-between
|
|
9452
|
+
"group flex w-full items-center justify-between transition-all duration-200",
|
|
9453
|
+
formControlFixedClass,
|
|
9432
9454
|
radiusClass,
|
|
9433
9455
|
sizeStyles8[size],
|
|
9434
9456
|
variantStyles6[variant],
|
|
@@ -9440,8 +9462,8 @@ var Combobox = ({
|
|
|
9440
9462
|
)
|
|
9441
9463
|
};
|
|
9442
9464
|
const triggerContents = /* @__PURE__ */ jsxs23(Fragment7, { children: [
|
|
9443
|
-
selectedIcon && /* @__PURE__ */ jsx33("span", { className: "
|
|
9444
|
-
/* @__PURE__ */ jsx33("span", { className: cn("
|
|
9465
|
+
selectedIcon && /* @__PURE__ */ jsx33("span", { className: cn("mr-2 flex shrink-0 items-center justify-center overflow-hidden text-primary", formControlSizeStyles[size].icon), children: selectedIcon }),
|
|
9466
|
+
/* @__PURE__ */ jsx33("span", { className: cn(formControlValueClass, "text-left", !displayValue && "text-muted-foreground", fontBold && "font-semibold"), children: renderValue && selectedOption ? renderValue(selectedOption) : displayValue || placeholder }),
|
|
9445
9467
|
/* @__PURE__ */ jsxs23("div", { className: "flex items-center gap-1.5 ml-2 shrink-0", children: [
|
|
9446
9468
|
allowClear && value && !disabled && /* @__PURE__ */ jsx33(
|
|
9447
9469
|
"div",
|
|
@@ -10415,7 +10437,7 @@ var DatePicker = ({
|
|
|
10415
10437
|
useShadCNAnimations();
|
|
10416
10438
|
const sizeStyles8 = {
|
|
10417
10439
|
sm: {
|
|
10418
|
-
trigger:
|
|
10440
|
+
trigger: formControlSizeStyles.sm.compactControl,
|
|
10419
10441
|
dayCell: "w-7 h-7 text-xs",
|
|
10420
10442
|
monthCell: "w-6 h-6 text-xs",
|
|
10421
10443
|
navButton: "p-1.5",
|
|
@@ -10426,13 +10448,13 @@ var DatePicker = ({
|
|
|
10426
10448
|
actionIcon: "w-2.5 h-2.5",
|
|
10427
10449
|
contentWidth: 240,
|
|
10428
10450
|
contentPadding: "p-4",
|
|
10429
|
-
label:
|
|
10451
|
+
label: formControlSizeStyles.sm.label,
|
|
10430
10452
|
weekdayLabel: "text-[9px] py-1",
|
|
10431
10453
|
headerMargin: "mb-2",
|
|
10432
10454
|
footerMargin: "mt-3 pt-2 gap-1.5"
|
|
10433
10455
|
},
|
|
10434
10456
|
md: {
|
|
10435
|
-
trigger:
|
|
10457
|
+
trigger: formControlSizeStyles.md.control,
|
|
10436
10458
|
dayCell: "w-8 h-8 text-sm",
|
|
10437
10459
|
monthCell: "w-8 h-8 text-sm",
|
|
10438
10460
|
navButton: "p-2",
|
|
@@ -10443,13 +10465,13 @@ var DatePicker = ({
|
|
|
10443
10465
|
actionIcon: "w-3.5 h-3.5",
|
|
10444
10466
|
contentWidth: 280,
|
|
10445
10467
|
contentPadding: "p-5",
|
|
10446
|
-
label:
|
|
10468
|
+
label: formControlSizeStyles.md.label,
|
|
10447
10469
|
weekdayLabel: "text-[10px] py-1.5",
|
|
10448
10470
|
headerMargin: "mb-4",
|
|
10449
10471
|
footerMargin: "mt-4 pt-3 gap-2"
|
|
10450
10472
|
},
|
|
10451
10473
|
lg: {
|
|
10452
|
-
trigger:
|
|
10474
|
+
trigger: formControlSizeStyles.lg.control,
|
|
10453
10475
|
dayCell: "w-10 h-10 text-base",
|
|
10454
10476
|
monthCell: "w-10 h-10 text-base",
|
|
10455
10477
|
navButton: "p-2.5",
|
|
@@ -10460,7 +10482,7 @@ var DatePicker = ({
|
|
|
10460
10482
|
actionIcon: "w-4 h-4",
|
|
10461
10483
|
contentWidth: 340,
|
|
10462
10484
|
contentPadding: "p-6",
|
|
10463
|
-
label:
|
|
10485
|
+
label: formControlSizeStyles.lg.label,
|
|
10464
10486
|
weekdayLabel: "text-xs py-2",
|
|
10465
10487
|
headerMargin: "mb-5",
|
|
10466
10488
|
footerMargin: "mt-5 pt-4 gap-2.5"
|
|
@@ -10818,6 +10840,7 @@ var DatePicker = ({
|
|
|
10818
10840
|
"aria-invalid": !!effectiveError,
|
|
10819
10841
|
className: cn(
|
|
10820
10842
|
"group flex w-full items-center justify-between border bg-background/80 backdrop-blur-sm",
|
|
10843
|
+
formControlFixedClass,
|
|
10821
10844
|
getBorderRadiusClass(resolvedBorderMode),
|
|
10822
10845
|
sizeStyles8[size].trigger,
|
|
10823
10846
|
disabled ? "border-border/40 opacity-50 cursor-not-allowed" : [
|
|
@@ -10831,7 +10854,7 @@ var DatePicker = ({
|
|
|
10831
10854
|
className
|
|
10832
10855
|
),
|
|
10833
10856
|
children: [
|
|
10834
|
-
/* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-2.5
|
|
10857
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex min-h-0 min-w-0 flex-1 items-center gap-2.5 overflow-hidden", children: [
|
|
10835
10858
|
/* @__PURE__ */ jsx38(
|
|
10836
10859
|
"div",
|
|
10837
10860
|
{
|
|
@@ -10863,7 +10886,7 @@ var DatePicker = ({
|
|
|
10863
10886
|
e.stopPropagation();
|
|
10864
10887
|
}
|
|
10865
10888
|
},
|
|
10866
|
-
className: "
|
|
10889
|
+
className: "h-full min-w-0 flex-1 truncate bg-transparent border-none outline-none focus:outline-none p-0 text-foreground font-medium placeholder-muted-foreground/60"
|
|
10867
10890
|
}
|
|
10868
10891
|
)
|
|
10869
10892
|
] }),
|
|
@@ -11100,7 +11123,7 @@ var DateRangePicker = ({
|
|
|
11100
11123
|
};
|
|
11101
11124
|
const sizeStyles8 = {
|
|
11102
11125
|
sm: {
|
|
11103
|
-
trigger:
|
|
11126
|
+
trigger: formControlSizeStyles.sm.compactControl,
|
|
11104
11127
|
dayCell: "w-7 h-7 text-xs",
|
|
11105
11128
|
monthCell: "w-6 h-6 text-xs",
|
|
11106
11129
|
navButton: "p-1.5",
|
|
@@ -11111,13 +11134,13 @@ var DateRangePicker = ({
|
|
|
11111
11134
|
actionIcon: "w-2.5 h-2.5",
|
|
11112
11135
|
contentWidth: 240,
|
|
11113
11136
|
contentPadding: "p-4",
|
|
11114
|
-
label:
|
|
11137
|
+
label: formControlSizeStyles.sm.label,
|
|
11115
11138
|
weekdayLabel: "text-[9px] py-1",
|
|
11116
11139
|
headerMargin: "mb-2",
|
|
11117
11140
|
footerMargin: "mt-3 pt-2 gap-1.5"
|
|
11118
11141
|
},
|
|
11119
11142
|
md: {
|
|
11120
|
-
trigger:
|
|
11143
|
+
trigger: formControlSizeStyles.md.control,
|
|
11121
11144
|
dayCell: "w-8 h-8 text-sm",
|
|
11122
11145
|
monthCell: "w-8 h-8 text-sm",
|
|
11123
11146
|
navButton: "p-2",
|
|
@@ -11128,13 +11151,13 @@ var DateRangePicker = ({
|
|
|
11128
11151
|
actionIcon: "w-3.5 h-3.5",
|
|
11129
11152
|
contentWidth: 280,
|
|
11130
11153
|
contentPadding: "p-5",
|
|
11131
|
-
label:
|
|
11154
|
+
label: formControlSizeStyles.md.label,
|
|
11132
11155
|
weekdayLabel: "text-[10px] py-1.5",
|
|
11133
11156
|
headerMargin: "mb-4",
|
|
11134
11157
|
footerMargin: "mt-4 pt-3 gap-2"
|
|
11135
11158
|
},
|
|
11136
11159
|
lg: {
|
|
11137
|
-
trigger:
|
|
11160
|
+
trigger: formControlSizeStyles.lg.control,
|
|
11138
11161
|
dayCell: "w-10 h-10 text-base",
|
|
11139
11162
|
monthCell: "w-10 h-10 text-base",
|
|
11140
11163
|
navButton: "p-2.5",
|
|
@@ -11145,7 +11168,7 @@ var DateRangePicker = ({
|
|
|
11145
11168
|
actionIcon: "w-4 h-4",
|
|
11146
11169
|
contentWidth: 340,
|
|
11147
11170
|
contentPadding: "p-6",
|
|
11148
|
-
label:
|
|
11171
|
+
label: formControlSizeStyles.lg.label,
|
|
11149
11172
|
weekdayLabel: "text-xs py-2",
|
|
11150
11173
|
headerMargin: "mb-5",
|
|
11151
11174
|
footerMargin: "mt-5 pt-4 gap-2.5"
|
|
@@ -11572,6 +11595,7 @@ var DateRangePicker = ({
|
|
|
11572
11595
|
"aria-invalid": !!effectiveError,
|
|
11573
11596
|
className: cn(
|
|
11574
11597
|
"group flex w-full items-center justify-between border bg-background/80 backdrop-blur-sm",
|
|
11598
|
+
formControlFixedClass,
|
|
11575
11599
|
getBorderRadiusClass(resolvedBorderMode),
|
|
11576
11600
|
sizeStyles8[size].trigger,
|
|
11577
11601
|
disabled ? "border-border/40 opacity-50 cursor-not-allowed" : [
|
|
@@ -11584,7 +11608,7 @@ var DateRangePicker = ({
|
|
|
11584
11608
|
effectiveError && "border-destructive/60 focus-within:ring-destructive/50 bg-destructive/5"
|
|
11585
11609
|
),
|
|
11586
11610
|
children: [
|
|
11587
|
-
/* @__PURE__ */ jsxs25("div", { className: cn("flex
|
|
11611
|
+
/* @__PURE__ */ jsxs25("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: [
|
|
11588
11612
|
/* @__PURE__ */ jsx38(
|
|
11589
11613
|
"div",
|
|
11590
11614
|
{
|
|
@@ -11616,11 +11640,11 @@ var DateRangePicker = ({
|
|
|
11616
11640
|
e.stopPropagation();
|
|
11617
11641
|
}
|
|
11618
11642
|
},
|
|
11619
|
-
className: "
|
|
11643
|
+
className: "h-full min-w-0 flex-1 truncate bg-transparent border-none outline-none focus:outline-none p-0 text-foreground font-medium placeholder-muted-foreground/60"
|
|
11620
11644
|
}
|
|
11621
11645
|
)
|
|
11622
11646
|
] }),
|
|
11623
|
-
/* @__PURE__ */ jsx38("span", { className: cn("transition-all duration-300 text-muted-foreground group-hover:text-foreground", isOpen && "rotate-180 text-primary"), children: /* @__PURE__ */ jsx38("svg", { className: cn(sizeStyles8[size].navIcon), fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2.5, children: /* @__PURE__ */ jsx38("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19 9l-7 7-7-7" }) }) })
|
|
11647
|
+
/* @__PURE__ */ jsx38("span", { className: cn("shrink-0 transition-all duration-300 text-muted-foreground group-hover:text-foreground", isOpen && "rotate-180 text-primary"), children: /* @__PURE__ */ jsx38("svg", { className: cn(sizeStyles8[size].navIcon), fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2.5, children: /* @__PURE__ */ jsx38("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19 9l-7 7-7-7" }) }) })
|
|
11624
11648
|
]
|
|
11625
11649
|
}
|
|
11626
11650
|
),
|
|
@@ -12070,7 +12094,7 @@ var LunarDatePicker = ({
|
|
|
12070
12094
|
useShadCNAnimations();
|
|
12071
12095
|
const sizeStyles8 = {
|
|
12072
12096
|
sm: {
|
|
12073
|
-
trigger:
|
|
12097
|
+
trigger: formControlSizeStyles.sm.compactControl,
|
|
12074
12098
|
dayCell: "w-7 h-7 text-xs",
|
|
12075
12099
|
monthCell: "w-6 h-6 text-xs",
|
|
12076
12100
|
navButton: "p-1.5",
|
|
@@ -12081,13 +12105,13 @@ var LunarDatePicker = ({
|
|
|
12081
12105
|
actionIcon: "w-2.5 h-2.5",
|
|
12082
12106
|
contentWidth: 240,
|
|
12083
12107
|
contentPadding: "p-4",
|
|
12084
|
-
label:
|
|
12108
|
+
label: formControlSizeStyles.sm.label,
|
|
12085
12109
|
weekdayLabel: "text-[9px] py-1",
|
|
12086
12110
|
headerMargin: "mb-2",
|
|
12087
12111
|
footerMargin: "mt-3 pt-2 gap-1.5"
|
|
12088
12112
|
},
|
|
12089
12113
|
md: {
|
|
12090
|
-
trigger:
|
|
12114
|
+
trigger: formControlSizeStyles.md.control,
|
|
12091
12115
|
dayCell: "w-8 h-8 text-sm",
|
|
12092
12116
|
monthCell: "w-8 h-8 text-sm",
|
|
12093
12117
|
navButton: "p-2",
|
|
@@ -12098,13 +12122,13 @@ var LunarDatePicker = ({
|
|
|
12098
12122
|
actionIcon: "w-3.5 h-3.5",
|
|
12099
12123
|
contentWidth: 280,
|
|
12100
12124
|
contentPadding: "p-5",
|
|
12101
|
-
label:
|
|
12125
|
+
label: formControlSizeStyles.md.label,
|
|
12102
12126
|
weekdayLabel: "text-[10px] py-1.5",
|
|
12103
12127
|
headerMargin: "mb-4",
|
|
12104
12128
|
footerMargin: "mt-4 pt-3 gap-2"
|
|
12105
12129
|
},
|
|
12106
12130
|
lg: {
|
|
12107
|
-
trigger:
|
|
12131
|
+
trigger: formControlSizeStyles.lg.control,
|
|
12108
12132
|
dayCell: "w-10 h-10 text-base",
|
|
12109
12133
|
monthCell: "w-10 h-10 text-base",
|
|
12110
12134
|
navButton: "p-2.5",
|
|
@@ -12115,7 +12139,7 @@ var LunarDatePicker = ({
|
|
|
12115
12139
|
actionIcon: "w-4 h-4",
|
|
12116
12140
|
contentWidth: 340,
|
|
12117
12141
|
contentPadding: "p-6",
|
|
12118
|
-
label:
|
|
12142
|
+
label: formControlSizeStyles.lg.label,
|
|
12119
12143
|
weekdayLabel: "text-xs py-2",
|
|
12120
12144
|
headerMargin: "mb-5",
|
|
12121
12145
|
footerMargin: "mt-5 pt-4 gap-2.5"
|
|
@@ -12504,6 +12528,7 @@ var LunarDatePicker = ({
|
|
|
12504
12528
|
"aria-invalid": !!effectiveError,
|
|
12505
12529
|
className: cn(
|
|
12506
12530
|
"group flex w-full items-center justify-between border bg-background/80 backdrop-blur-sm",
|
|
12531
|
+
formControlFixedClass,
|
|
12507
12532
|
getBorderRadiusClass(resolvedBorderMode),
|
|
12508
12533
|
sizeStyles8[size].trigger,
|
|
12509
12534
|
disabled ? "border-border/40 opacity-50 cursor-not-allowed" : [
|
|
@@ -12517,7 +12542,7 @@ var LunarDatePicker = ({
|
|
|
12517
12542
|
className
|
|
12518
12543
|
),
|
|
12519
12544
|
children: [
|
|
12520
|
-
/* @__PURE__ */ jsxs26("div", { className: "flex items-center gap-2.5
|
|
12545
|
+
/* @__PURE__ */ jsxs26("div", { className: "flex min-h-0 min-w-0 flex-1 items-center gap-2.5 overflow-hidden", children: [
|
|
12521
12546
|
/* @__PURE__ */ jsx39(
|
|
12522
12547
|
"div",
|
|
12523
12548
|
{
|
|
@@ -12549,7 +12574,7 @@ var LunarDatePicker = ({
|
|
|
12549
12574
|
e.stopPropagation();
|
|
12550
12575
|
}
|
|
12551
12576
|
},
|
|
12552
|
-
className: "
|
|
12577
|
+
className: "h-full min-w-0 flex-1 truncate bg-transparent border-none outline-none focus:outline-none p-0 text-foreground font-medium placeholder-muted-foreground/60"
|
|
12553
12578
|
}
|
|
12554
12579
|
)
|
|
12555
12580
|
] }),
|
|
@@ -12633,7 +12658,7 @@ var LunarDateRangePicker = ({
|
|
|
12633
12658
|
const wheelDeltaRef = React35.useRef(0);
|
|
12634
12659
|
const sizeStyles8 = {
|
|
12635
12660
|
sm: {
|
|
12636
|
-
trigger:
|
|
12661
|
+
trigger: formControlSizeStyles.sm.compactControl,
|
|
12637
12662
|
dayCell: "w-7 h-7 text-xs",
|
|
12638
12663
|
monthCell: "w-6 h-6 text-xs",
|
|
12639
12664
|
navButton: "p-1.5",
|
|
@@ -12644,13 +12669,13 @@ var LunarDateRangePicker = ({
|
|
|
12644
12669
|
actionIcon: "w-2.5 h-2.5",
|
|
12645
12670
|
contentWidth: 240,
|
|
12646
12671
|
contentPadding: "p-4",
|
|
12647
|
-
label:
|
|
12672
|
+
label: formControlSizeStyles.sm.label,
|
|
12648
12673
|
weekdayLabel: "text-[9px] py-1",
|
|
12649
12674
|
headerMargin: "mb-2",
|
|
12650
12675
|
footerMargin: "mt-3 pt-2 gap-1.5"
|
|
12651
12676
|
},
|
|
12652
12677
|
md: {
|
|
12653
|
-
trigger:
|
|
12678
|
+
trigger: formControlSizeStyles.md.control,
|
|
12654
12679
|
dayCell: "w-8 h-8 text-sm",
|
|
12655
12680
|
monthCell: "w-8 h-8 text-sm",
|
|
12656
12681
|
navButton: "p-2",
|
|
@@ -12661,13 +12686,13 @@ var LunarDateRangePicker = ({
|
|
|
12661
12686
|
actionIcon: "w-3.5 h-3.5",
|
|
12662
12687
|
contentWidth: 280,
|
|
12663
12688
|
contentPadding: "p-5",
|
|
12664
|
-
label:
|
|
12689
|
+
label: formControlSizeStyles.md.label,
|
|
12665
12690
|
weekdayLabel: "text-[10px] py-1.5",
|
|
12666
12691
|
headerMargin: "mb-4",
|
|
12667
12692
|
footerMargin: "mt-4 pt-3 gap-2"
|
|
12668
12693
|
},
|
|
12669
12694
|
lg: {
|
|
12670
|
-
trigger:
|
|
12695
|
+
trigger: formControlSizeStyles.lg.control,
|
|
12671
12696
|
dayCell: "w-10 h-10 text-base",
|
|
12672
12697
|
monthCell: "w-10 h-10 text-base",
|
|
12673
12698
|
navButton: "p-2.5",
|
|
@@ -12678,7 +12703,7 @@ var LunarDateRangePicker = ({
|
|
|
12678
12703
|
actionIcon: "w-4 h-4",
|
|
12679
12704
|
contentWidth: 340,
|
|
12680
12705
|
contentPadding: "p-6",
|
|
12681
|
-
label:
|
|
12706
|
+
label: formControlSizeStyles.lg.label,
|
|
12682
12707
|
weekdayLabel: "text-xs py-2",
|
|
12683
12708
|
headerMargin: "mb-5",
|
|
12684
12709
|
footerMargin: "mt-5 pt-4 gap-2.5"
|
|
@@ -13125,6 +13150,7 @@ var LunarDateRangePicker = ({
|
|
|
13125
13150
|
"aria-invalid": !!effectiveError,
|
|
13126
13151
|
className: cn(
|
|
13127
13152
|
"group flex w-full items-center justify-between border bg-background/80 backdrop-blur-sm",
|
|
13153
|
+
formControlFixedClass,
|
|
13128
13154
|
getBorderRadiusClass(borderMode ?? "full"),
|
|
13129
13155
|
sizeStyles8[size].trigger,
|
|
13130
13156
|
disabled ? "border-border/40 opacity-50 cursor-not-allowed" : [
|
|
@@ -13137,7 +13163,7 @@ var LunarDateRangePicker = ({
|
|
|
13137
13163
|
effectiveError && "border-destructive/60 focus-within:ring-destructive/50 bg-destructive/5"
|
|
13138
13164
|
),
|
|
13139
13165
|
children: [
|
|
13140
|
-
/* @__PURE__ */ jsxs26("div", { className: cn("flex
|
|
13166
|
+
/* @__PURE__ */ jsxs26("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: [
|
|
13141
13167
|
/* @__PURE__ */ jsx39(
|
|
13142
13168
|
"div",
|
|
13143
13169
|
{
|
|
@@ -13148,9 +13174,9 @@ var LunarDateRangePicker = ({
|
|
|
13148
13174
|
children: /* @__PURE__ */ jsx39(Calendar2, { className: cn("transition-transform duration-300", sizeStyles8[size].calendarIcon, isOpen && "scale-110") })
|
|
13149
13175
|
}
|
|
13150
13176
|
),
|
|
13151
|
-
/* @__PURE__ */ jsx39("span", { className: cn("w-
|
|
13177
|
+
/* @__PURE__ */ jsx39("span", { className: cn("min-w-0 flex-1 truncate whitespace-nowrap font-medium", !tempStart && "text-muted-foreground/60"), children: tempStart ? displayLabel : placeholder })
|
|
13152
13178
|
] }),
|
|
13153
|
-
/* @__PURE__ */ jsx39("span", { className: cn("transition-all duration-300 text-muted-foreground group-hover:text-foreground", isOpen && "rotate-180 text-primary"), children: /* @__PURE__ */ jsx39("svg", { className: cn(sizeStyles8[size].navIcon), fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2.5, children: /* @__PURE__ */ jsx39("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19 9l-7 7-7-7" }) }) })
|
|
13179
|
+
/* @__PURE__ */ jsx39("span", { className: cn("shrink-0 transition-all duration-300 text-muted-foreground group-hover:text-foreground", isOpen && "rotate-180 text-primary"), children: /* @__PURE__ */ jsx39("svg", { className: cn(sizeStyles8[size].navIcon), fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2.5, children: /* @__PURE__ */ jsx39("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19 9l-7 7-7-7" }) }) })
|
|
13154
13180
|
]
|
|
13155
13181
|
}
|
|
13156
13182
|
),
|
|
@@ -13778,9 +13804,9 @@ function MonthYearPicker({
|
|
|
13778
13804
|
setOpen(false);
|
|
13779
13805
|
};
|
|
13780
13806
|
const sizeClasses2 = {
|
|
13781
|
-
sm: { label:
|
|
13782
|
-
md: { label:
|
|
13783
|
-
lg: { label:
|
|
13807
|
+
sm: { label: formControlSizeStyles.sm.label, control: formControlSizeStyles.sm.compactControl, icon: formControlSizeStyles.sm.icon },
|
|
13808
|
+
md: { label: formControlSizeStyles.md.label, control: formControlSizeStyles.md.control, icon: formControlSizeStyles.md.icon },
|
|
13809
|
+
lg: { label: formControlSizeStyles.lg.label, control: formControlSizeStyles.lg.control, icon: formControlSizeStyles.lg.icon }
|
|
13784
13810
|
};
|
|
13785
13811
|
const panelSizeClasses = {
|
|
13786
13812
|
sm: { contentPadding: "p-4", stackGap: "space-y-3", displayText: "text-lg", actionText: "text-[11px]", actionPadding: "px-3 py-2" },
|
|
@@ -13808,9 +13834,8 @@ function MonthYearPicker({
|
|
|
13808
13834
|
className: cn(
|
|
13809
13835
|
"group flex w-full items-center justify-between border bg-background/80 backdrop-blur-sm",
|
|
13810
13836
|
getBorderRadiusClass(resolvedBorderMode),
|
|
13811
|
-
sz.
|
|
13812
|
-
|
|
13813
|
-
sz.text,
|
|
13837
|
+
sz.control,
|
|
13838
|
+
formControlFixedClass,
|
|
13814
13839
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/50 focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
|
13815
13840
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
13816
13841
|
"transition-all duration-300 ease-out",
|
|
@@ -13822,7 +13847,7 @@ function MonthYearPicker({
|
|
|
13822
13847
|
className
|
|
13823
13848
|
),
|
|
13824
13849
|
children: [
|
|
13825
|
-
/* @__PURE__ */ jsxs27("div", { className: "flex min-w-0 flex-1 items-center gap-2.5", children: [
|
|
13850
|
+
/* @__PURE__ */ jsxs27("div", { className: "flex min-h-0 min-w-0 flex-1 items-center gap-2.5 overflow-hidden", children: [
|
|
13826
13851
|
/* @__PURE__ */ jsx40(
|
|
13827
13852
|
"div",
|
|
13828
13853
|
{
|
|
@@ -13836,7 +13861,7 @@ function MonthYearPicker({
|
|
|
13836
13861
|
/* @__PURE__ */ jsx40(
|
|
13837
13862
|
"span",
|
|
13838
13863
|
{
|
|
13839
|
-
className: cn("
|
|
13864
|
+
className: cn(formControlValueClass, "font-medium transition-colors duration-200", !hasValue && "text-muted-foreground", hasValue && "text-foreground"),
|
|
13840
13865
|
children: hasValue ? display : placeholder
|
|
13841
13866
|
}
|
|
13842
13867
|
)
|
|
@@ -15494,9 +15519,9 @@ function TimePicker({
|
|
|
15494
15519
|
}
|
|
15495
15520
|
};
|
|
15496
15521
|
const sizeClasses2 = {
|
|
15497
|
-
sm: { label:
|
|
15498
|
-
md: { label:
|
|
15499
|
-
lg: { label:
|
|
15522
|
+
sm: { label: formControlSizeStyles.sm.label, control: formControlSizeStyles.sm.compactControl, icon: formControlSizeStyles.sm.icon },
|
|
15523
|
+
md: { label: formControlSizeStyles.md.label, control: formControlSizeStyles.md.control, icon: formControlSizeStyles.md.icon },
|
|
15524
|
+
lg: { label: formControlSizeStyles.lg.label, control: formControlSizeStyles.lg.control, icon: formControlSizeStyles.lg.icon }
|
|
15500
15525
|
};
|
|
15501
15526
|
const sz = sizeClasses2[size];
|
|
15502
15527
|
const effectivePanelSize = variant === "compact" ? size === "lg" ? "md" : "sm" : size;
|
|
@@ -15519,9 +15544,8 @@ function TimePicker({
|
|
|
15519
15544
|
className: cn(
|
|
15520
15545
|
"group flex w-full items-center justify-between border bg-background/80 backdrop-blur-sm",
|
|
15521
15546
|
getBorderRadiusClass(resolvedBorderMode),
|
|
15522
|
-
sz.
|
|
15523
|
-
|
|
15524
|
-
sz.text,
|
|
15547
|
+
sz.control,
|
|
15548
|
+
formControlFixedClass,
|
|
15525
15549
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/50 focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
|
15526
15550
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
15527
15551
|
"transition-all duration-300 ease-out",
|
|
@@ -15533,7 +15557,7 @@ function TimePicker({
|
|
|
15533
15557
|
className
|
|
15534
15558
|
),
|
|
15535
15559
|
children: [
|
|
15536
|
-
/* @__PURE__ */ jsxs29("div", { className: "flex min-w-0 flex-1 items-center gap-2.5", children: [
|
|
15560
|
+
/* @__PURE__ */ jsxs29("div", { className: "flex min-h-0 min-w-0 flex-1 items-center gap-2.5 overflow-hidden", children: [
|
|
15537
15561
|
/* @__PURE__ */ jsx42(
|
|
15538
15562
|
"div",
|
|
15539
15563
|
{
|
|
@@ -15548,7 +15572,8 @@ function TimePicker({
|
|
|
15548
15572
|
"span",
|
|
15549
15573
|
{
|
|
15550
15574
|
className: cn(
|
|
15551
|
-
|
|
15575
|
+
formControlValueClass,
|
|
15576
|
+
"font-medium transition-colors duration-200",
|
|
15552
15577
|
!hasCommittedValue && "text-muted-foreground",
|
|
15553
15578
|
hasCommittedValue ? "text-foreground" : ""
|
|
15554
15579
|
),
|
|
@@ -16012,9 +16037,9 @@ var DateTimePicker = ({
|
|
|
16012
16037
|
const [localRequiredError, setLocalRequiredError] = React39.useState();
|
|
16013
16038
|
const sizeStyles8 = {
|
|
16014
16039
|
sm: {
|
|
16015
|
-
trigger:
|
|
16016
|
-
icon:
|
|
16017
|
-
label:
|
|
16040
|
+
trigger: formControlSizeStyles.sm.compactControl,
|
|
16041
|
+
icon: formControlSizeStyles.sm.icon,
|
|
16042
|
+
label: formControlSizeStyles.sm.label,
|
|
16018
16043
|
buttonSize: "sm",
|
|
16019
16044
|
calendarSize: "sm",
|
|
16020
16045
|
timePickerSize: "sm",
|
|
@@ -16022,9 +16047,9 @@ var DateTimePicker = ({
|
|
|
16022
16047
|
gap: "gap-2"
|
|
16023
16048
|
},
|
|
16024
16049
|
md: {
|
|
16025
|
-
trigger:
|
|
16026
|
-
icon:
|
|
16027
|
-
label:
|
|
16050
|
+
trigger: formControlSizeStyles.md.control,
|
|
16051
|
+
icon: formControlSizeStyles.md.icon,
|
|
16052
|
+
label: formControlSizeStyles.md.label,
|
|
16028
16053
|
buttonSize: "sm",
|
|
16029
16054
|
calendarSize: "md",
|
|
16030
16055
|
timePickerSize: "md",
|
|
@@ -16032,9 +16057,9 @@ var DateTimePicker = ({
|
|
|
16032
16057
|
gap: "gap-3"
|
|
16033
16058
|
},
|
|
16034
16059
|
lg: {
|
|
16035
|
-
trigger:
|
|
16036
|
-
icon:
|
|
16037
|
-
label:
|
|
16060
|
+
trigger: formControlSizeStyles.lg.control,
|
|
16061
|
+
icon: formControlSizeStyles.lg.icon,
|
|
16062
|
+
label: formControlSizeStyles.lg.label,
|
|
16038
16063
|
buttonSize: "md",
|
|
16039
16064
|
calendarSize: "lg",
|
|
16040
16065
|
timePickerSize: "lg",
|
|
@@ -16184,6 +16209,7 @@ var DateTimePicker = ({
|
|
|
16184
16209
|
"aria-invalid": !!effectiveError,
|
|
16185
16210
|
className: cn(
|
|
16186
16211
|
"flex w-full items-center justify-between border border-input bg-background",
|
|
16212
|
+
formControlFixedClass,
|
|
16187
16213
|
getBorderRadiusClass(resolvedBorderMode),
|
|
16188
16214
|
sizeStyles8[size].trigger,
|
|
16189
16215
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
@@ -16192,7 +16218,7 @@ var DateTimePicker = ({
|
|
|
16192
16218
|
effectiveError && "border-destructive/60 bg-destructive/5"
|
|
16193
16219
|
),
|
|
16194
16220
|
children: [
|
|
16195
|
-
/* @__PURE__ */ jsx43("span", { className: "
|
|
16221
|
+
/* @__PURE__ */ jsx43("span", { className: cn(formControlValueClass, "text-left"), children: displayValue || placeholder || "Select date & time" }),
|
|
16196
16222
|
/* @__PURE__ */ jsxs30("div", { className: "flex shrink-0 items-center gap-2 text-muted-foreground", children: [
|
|
16197
16223
|
value && /* @__PURE__ */ jsx43(
|
|
16198
16224
|
"span",
|
|
@@ -19188,7 +19214,7 @@ import * as React46 from "react";
|
|
|
19188
19214
|
import { useId as useId10 } from "react";
|
|
19189
19215
|
import { useVirtualizer as useVirtualizer2 } from "@tanstack/react-virtual";
|
|
19190
19216
|
import { ChevronDown as ChevronDown4, Search as Search6, Check as Check6, SearchX as SearchX2, Loader2 as Loader23, X as X14, Sparkles as Sparkles3 } from "lucide-react";
|
|
19191
|
-
import { Fragment as
|
|
19217
|
+
import { Fragment as Fragment15, jsx as jsx50, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
19192
19218
|
var comboboxScrollClassName2 = [
|
|
19193
19219
|
"scrollbar-thin",
|
|
19194
19220
|
"[scrollbar-width:thin]",
|
|
@@ -19390,25 +19416,25 @@ var MultiCombobox = ({
|
|
|
19390
19416
|
}, [maxInitialOptions, normalizedOptions.length, searchMode, virtualized]);
|
|
19391
19417
|
const sizeStyles8 = {
|
|
19392
19418
|
sm: {
|
|
19393
|
-
trigger:
|
|
19394
|
-
icon:
|
|
19419
|
+
trigger: formControlSizeStyles.sm.control,
|
|
19420
|
+
icon: formControlSizeStyles.sm.icon,
|
|
19395
19421
|
search: "px-8 py-1.5 text-xs",
|
|
19396
19422
|
item: "text-xs px-3 py-1.5",
|
|
19397
|
-
tag:
|
|
19423
|
+
tag: formControlSizeStyles.sm.tag
|
|
19398
19424
|
},
|
|
19399
19425
|
md: {
|
|
19400
|
-
trigger:
|
|
19401
|
-
icon:
|
|
19426
|
+
trigger: formControlSizeStyles.md.control,
|
|
19427
|
+
icon: formControlSizeStyles.md.icon,
|
|
19402
19428
|
search: "px-10 py-2 text-sm",
|
|
19403
19429
|
item: "text-sm px-3 py-2",
|
|
19404
|
-
tag:
|
|
19430
|
+
tag: formControlSizeStyles.md.tag
|
|
19405
19431
|
},
|
|
19406
19432
|
lg: {
|
|
19407
|
-
trigger:
|
|
19408
|
-
icon:
|
|
19433
|
+
trigger: formControlSizeStyles.lg.control,
|
|
19434
|
+
icon: formControlSizeStyles.lg.icon,
|
|
19409
19435
|
search: "px-10 py-3 text-base",
|
|
19410
19436
|
item: "text-base px-3 py-3",
|
|
19411
|
-
tag:
|
|
19437
|
+
tag: formControlSizeStyles.lg.tag
|
|
19412
19438
|
}
|
|
19413
19439
|
};
|
|
19414
19440
|
const variantStyles6 = {
|
|
@@ -19419,7 +19445,7 @@ var MultiCombobox = ({
|
|
|
19419
19445
|
const autoId = useId10();
|
|
19420
19446
|
const resolvedId = id ? String(id) : `multicombobox-${autoId}`;
|
|
19421
19447
|
const labelId = label ? `${resolvedId}-label` : void 0;
|
|
19422
|
-
const labelSize = size
|
|
19448
|
+
const labelSize = formControlSizeStyles[size].label;
|
|
19423
19449
|
const listboxId = `${resolvedId}-listbox`;
|
|
19424
19450
|
const renderOptionItem = (item, index, virtualItem) => {
|
|
19425
19451
|
const isSelected = value.includes(item.value);
|
|
@@ -19643,6 +19669,7 @@ var MultiCombobox = ({
|
|
|
19643
19669
|
"aria-invalid": !!effectiveError,
|
|
19644
19670
|
className: cn(
|
|
19645
19671
|
"group flex w-full items-center gap-2 transition-all duration-200",
|
|
19672
|
+
formControlFixedClass,
|
|
19646
19673
|
getBorderRadiusClass(resolvedBorderMode),
|
|
19647
19674
|
sizeStyles8[size].trigger,
|
|
19648
19675
|
variantStyles6[variant],
|
|
@@ -19652,22 +19679,22 @@ var MultiCombobox = ({
|
|
|
19652
19679
|
!!effectiveError && "border-destructive focus-visible:ring-destructive/30"
|
|
19653
19680
|
),
|
|
19654
19681
|
children: [
|
|
19655
|
-
/* @__PURE__ */ jsx50("div", { className:
|
|
19682
|
+
/* @__PURE__ */ jsx50("div", { className: "flex min-h-0 min-w-0 flex-1 items-center gap-1.5 overflow-hidden", children: value.length > 0 ? showTags ? /* @__PURE__ */ jsxs37(Fragment15, { children: [
|
|
19656
19683
|
visibleTags.map((option) => {
|
|
19657
19684
|
if (renderTag) {
|
|
19658
|
-
return /* @__PURE__ */ jsx50(
|
|
19685
|
+
return /* @__PURE__ */ jsx50("span", { className: "inline-flex max-h-full min-w-0 shrink overflow-hidden", children: renderTag(option, () => handleRemove(option.value)) }, option.value);
|
|
19659
19686
|
}
|
|
19660
19687
|
return /* @__PURE__ */ jsxs37(
|
|
19661
19688
|
"span",
|
|
19662
19689
|
{
|
|
19663
19690
|
className: cn(
|
|
19664
|
-
"inline-flex items-center gap-1.5 bg-primary/10 text-primary
|
|
19691
|
+
"inline-flex min-w-0 shrink-0 items-center gap-1.5 overflow-hidden rounded-full bg-primary/10 text-primary transition-all duration-200",
|
|
19665
19692
|
"hover:bg-primary/20",
|
|
19666
19693
|
sizeStyles8[size].tag
|
|
19667
19694
|
),
|
|
19668
19695
|
children: [
|
|
19669
19696
|
showSelectedIcons && option.icon && /* @__PURE__ */ jsx50("span", { className: "shrink-0 w-3.5 h-3.5 flex items-center justify-center", children: option.icon }),
|
|
19670
|
-
/* @__PURE__ */ jsx50("span", { className: "
|
|
19697
|
+
/* @__PURE__ */ jsx50("span", { className: "min-w-0 truncate", children: displayFormat(option) }),
|
|
19671
19698
|
/* @__PURE__ */ jsx50(
|
|
19672
19699
|
"span",
|
|
19673
19700
|
{
|
|
@@ -19696,7 +19723,7 @@ var MultiCombobox = ({
|
|
|
19696
19723
|
);
|
|
19697
19724
|
}),
|
|
19698
19725
|
hiddenCount > 0 && /* @__PURE__ */ jsx50("span", { className: cn("inline-flex items-center bg-muted text-muted-foreground rounded-lg shrink-0", sizeStyles8[size].tag), children: gi18n.moreCount ? gi18n.moreCount(hiddenCount) : `+${hiddenCount} more` })
|
|
19699
|
-
] }) : /* @__PURE__ */ jsx50("span", { className: "
|
|
19726
|
+
] }) : /* @__PURE__ */ jsx50("span", { className: cn(formControlValueClass, "font-medium"), children: gi18n.selectedCount ? gi18n.selectedCount(value.length) : `${value.length} item${value.length > 1 ? "s" : ""} selected` }) : /* @__PURE__ */ jsx50("span", { className: cn(formControlValueClass, "text-muted-foreground"), children: placeholder }) }),
|
|
19700
19727
|
/* @__PURE__ */ jsxs37("div", { className: "flex items-center gap-1.5 shrink-0", children: [
|
|
19701
19728
|
showClear && value.length > 0 && /* @__PURE__ */ jsx50(
|
|
19702
19729
|
"div",
|
|
@@ -20098,7 +20125,7 @@ RadioGroupItem.displayName = "RadioGroupItem";
|
|
|
20098
20125
|
|
|
20099
20126
|
// src/components/Slider.tsx
|
|
20100
20127
|
import * as React48 from "react";
|
|
20101
|
-
import { Fragment as
|
|
20128
|
+
import { Fragment as Fragment16, jsx as jsx52, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
20102
20129
|
var SIZE_STYLES = {
|
|
20103
20130
|
sm: {
|
|
20104
20131
|
track: "h-1",
|
|
@@ -20356,7 +20383,7 @@ var Slider = React48.forwardRef(
|
|
|
20356
20383
|
tooltipClassName
|
|
20357
20384
|
}
|
|
20358
20385
|
),
|
|
20359
|
-
isRange && /* @__PURE__ */ jsxs39(
|
|
20386
|
+
isRange && /* @__PURE__ */ jsxs39(Fragment16, { children: [
|
|
20360
20387
|
/* @__PURE__ */ jsx52(
|
|
20361
20388
|
SliderTooltip,
|
|
20362
20389
|
{
|
|
@@ -20452,7 +20479,7 @@ var Slider = React48.forwardRef(
|
|
|
20452
20479
|
}
|
|
20453
20480
|
const minZ = activeThumb === "min" ? "z-20" : "z-10";
|
|
20454
20481
|
const maxZ = activeThumb === "max" ? "z-20" : "z-10";
|
|
20455
|
-
return /* @__PURE__ */ jsxs39(
|
|
20482
|
+
return /* @__PURE__ */ jsxs39(Fragment16, { children: [
|
|
20456
20483
|
/* @__PURE__ */ jsx52(
|
|
20457
20484
|
"div",
|
|
20458
20485
|
{
|
|
@@ -20515,7 +20542,7 @@ Slider.displayName = "Slider";
|
|
|
20515
20542
|
// src/components/OverlayControls.tsx
|
|
20516
20543
|
import { Dot as Dot2, Maximize2, Pause, Play, RotateCcw, RotateCw, Volume2, VolumeX } from "lucide-react";
|
|
20517
20544
|
import React49 from "react";
|
|
20518
|
-
import { Fragment as
|
|
20545
|
+
import { Fragment as Fragment17, jsx as jsx53, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
20519
20546
|
function resolveKeyboardEventElement(target) {
|
|
20520
20547
|
if (target instanceof Element) return target;
|
|
20521
20548
|
if (target instanceof Node) return target.parentElement;
|
|
@@ -20760,7 +20787,7 @@ function OverlayControls({
|
|
|
20760
20787
|
const handleSliderMouseLeave = () => {
|
|
20761
20788
|
setPreviewData(null);
|
|
20762
20789
|
};
|
|
20763
|
-
return /* @__PURE__ */ jsxs40(
|
|
20790
|
+
return /* @__PURE__ */ jsxs40(Fragment17, { children: [
|
|
20764
20791
|
keyboardFeedback && /* @__PURE__ */ jsx53(
|
|
20765
20792
|
"div",
|
|
20766
20793
|
{
|
|
@@ -21670,29 +21697,29 @@ function CategoryTreeSelect(props) {
|
|
|
21670
21697
|
const selectedCount = valueArray.length;
|
|
21671
21698
|
const triggerSizeStyles = {
|
|
21672
21699
|
sm: {
|
|
21673
|
-
button:
|
|
21700
|
+
button: formControlSizeStyles.sm.control,
|
|
21674
21701
|
iconWrap: "p-1",
|
|
21675
|
-
icon:
|
|
21676
|
-
text:
|
|
21677
|
-
badge:
|
|
21678
|
-
actionIcon:
|
|
21702
|
+
icon: formControlSizeStyles.sm.icon,
|
|
21703
|
+
text: formControlSizeStyles.sm.label,
|
|
21704
|
+
badge: formControlSizeStyles.sm.tag,
|
|
21705
|
+
actionIcon: formControlSizeStyles.sm.icon,
|
|
21679
21706
|
clearIcon: "h-3 w-3"
|
|
21680
21707
|
},
|
|
21681
21708
|
md: {
|
|
21682
|
-
button:
|
|
21709
|
+
button: formControlSizeStyles.md.control,
|
|
21683
21710
|
iconWrap: "p-1.5",
|
|
21684
21711
|
icon: "w-4 h-4",
|
|
21685
|
-
text:
|
|
21686
|
-
badge:
|
|
21712
|
+
text: formControlSizeStyles.md.label,
|
|
21713
|
+
badge: formControlSizeStyles.md.tag,
|
|
21687
21714
|
actionIcon: "w-4 h-4",
|
|
21688
21715
|
clearIcon: "h-3.5 w-3.5"
|
|
21689
21716
|
},
|
|
21690
21717
|
lg: {
|
|
21691
|
-
button:
|
|
21718
|
+
button: formControlSizeStyles.lg.control,
|
|
21692
21719
|
iconWrap: "p-1.5",
|
|
21693
21720
|
icon: "w-5 h-5",
|
|
21694
|
-
text:
|
|
21695
|
-
badge:
|
|
21721
|
+
text: formControlSizeStyles.lg.label,
|
|
21722
|
+
badge: formControlSizeStyles.lg.tag,
|
|
21696
21723
|
actionIcon: "w-5 h-5",
|
|
21697
21724
|
clearIcon: "h-4 w-4"
|
|
21698
21725
|
}
|
|
@@ -21814,6 +21841,7 @@ function CategoryTreeSelect(props) {
|
|
|
21814
21841
|
},
|
|
21815
21842
|
className: cn(
|
|
21816
21843
|
"group flex w-full items-center justify-between transition-all duration-200",
|
|
21844
|
+
formControlFixedClass,
|
|
21817
21845
|
getBorderRadiusClass(resolvedBorderMode ?? "full"),
|
|
21818
21846
|
"backdrop-blur-sm",
|
|
21819
21847
|
triggerSizeStyles[size].button,
|
|
@@ -21824,7 +21852,7 @@ function CategoryTreeSelect(props) {
|
|
|
21824
21852
|
effectiveError && "border-destructive focus-visible:ring-destructive/30"
|
|
21825
21853
|
),
|
|
21826
21854
|
children: [
|
|
21827
|
-
/* @__PURE__ */ jsxs41("div", { className: "flex min-w-0 flex-1 items-center gap-2.5 text-left", children: [
|
|
21855
|
+
/* @__PURE__ */ jsxs41("div", { className: "flex min-h-0 min-w-0 flex-1 items-center gap-2.5 overflow-hidden text-left", children: [
|
|
21828
21856
|
/* @__PURE__ */ jsx54(
|
|
21829
21857
|
"div",
|
|
21830
21858
|
{
|
|
@@ -21840,7 +21868,8 @@ function CategoryTreeSelect(props) {
|
|
|
21840
21868
|
"span",
|
|
21841
21869
|
{
|
|
21842
21870
|
className: cn(
|
|
21843
|
-
|
|
21871
|
+
formControlValueClass,
|
|
21872
|
+
"font-medium transition-colors duration-200",
|
|
21844
21873
|
triggerSizeStyles[size].text,
|
|
21845
21874
|
selectedCount === 0 ? "text-muted-foreground" : "text-foreground"
|
|
21846
21875
|
),
|
|
@@ -21864,7 +21893,7 @@ function CategoryTreeSelect(props) {
|
|
|
21864
21893
|
children: /* @__PURE__ */ jsx54(X15, { className: triggerSizeStyles[size].clearIcon })
|
|
21865
21894
|
}
|
|
21866
21895
|
),
|
|
21867
|
-
selectedCount > 0 && !singleSelect && /* @__PURE__ */ jsx54("span", { className: cn("rounded-full bg-primary/15 font-bold text-primary", triggerSizeStyles[size].badge), children: selectedCount }),
|
|
21896
|
+
selectedCount > 0 && !singleSelect && /* @__PURE__ */ jsx54("span", { className: cn("inline-flex shrink-0 items-center justify-center overflow-hidden rounded-full bg-primary/15 font-bold text-primary", triggerSizeStyles[size].badge), children: selectedCount }),
|
|
21868
21897
|
/* @__PURE__ */ jsx54("span", { className: cn("transition-all duration-300 text-muted-foreground group-hover:text-foreground", isOpen && "rotate-180 text-primary"), children: /* @__PURE__ */ jsx54(ChevronDown5, { className: triggerSizeStyles[size].actionIcon }) })
|
|
21869
21898
|
] })
|
|
21870
21899
|
]
|
|
@@ -22147,7 +22176,7 @@ import {
|
|
|
22147
22176
|
Upload as Upload2
|
|
22148
22177
|
} from "lucide-react";
|
|
22149
22178
|
import { useCallback as useCallback20, useMemo as useMemo22, useRef as useRef23, useState as useState35 } from "react";
|
|
22150
|
-
import { Fragment as
|
|
22179
|
+
import { Fragment as Fragment18, jsx as jsx56, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
22151
22180
|
var formatFileSize = (bytes) => {
|
|
22152
22181
|
if (bytes === 0) return "0 Bytes";
|
|
22153
22182
|
const k = 1024;
|
|
@@ -22578,7 +22607,7 @@ function FileUpload({
|
|
|
22578
22607
|
] }),
|
|
22579
22608
|
/* @__PURE__ */ jsx56("p", { className: cn("text-muted-foreground", size === "lg" ? "text-sm" : "text-xs"), children: supportedFormatsText || t("supportedFormats") || `Max ${maxSize}MB per file \u2022 Up to ${maxFiles} files` })
|
|
22580
22609
|
] }),
|
|
22581
|
-
variant === "compact" && /* @__PURE__ */ jsxs43(
|
|
22610
|
+
variant === "compact" && /* @__PURE__ */ jsxs43(Fragment18, { children: [
|
|
22582
22611
|
/* @__PURE__ */ jsx56("div", { className: cn("shrink-0 rounded-lg flex items-center justify-center", "bg-primary/10", currentSize.iconSize), children: /* @__PURE__ */ jsx56(Upload2, { className: cn("text-primary", size === "sm" ? "w-4 h-4" : "w-5 h-5") }) }),
|
|
22583
22612
|
/* @__PURE__ */ jsxs43("div", { className: "flex-1 min-w-0", children: [
|
|
22584
22613
|
/* @__PURE__ */ jsx56("p", { className: cn("font-medium truncate", currentSize.text), children: dragDropText || t("dragDropText") || "Drop files here or" }),
|
|
@@ -22645,7 +22674,7 @@ function FileUpload({
|
|
|
22645
22674
|
// src/components/Carousel.tsx
|
|
22646
22675
|
import * as React51 from "react";
|
|
22647
22676
|
import { ChevronLeft as ChevronLeft6, ChevronRight as ChevronRight9 } from "lucide-react";
|
|
22648
|
-
import { Fragment as
|
|
22677
|
+
import { Fragment as Fragment19, jsx as jsx57, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
22649
22678
|
function Carousel({
|
|
22650
22679
|
children,
|
|
22651
22680
|
autoScroll = true,
|
|
@@ -23075,7 +23104,7 @@ function Carousel({
|
|
|
23075
23104
|
})
|
|
23076
23105
|
}
|
|
23077
23106
|
),
|
|
23078
|
-
shouldShowArrows && totalSlides > effectiveSlidesToShow && /* @__PURE__ */ jsxs44(
|
|
23107
|
+
shouldShowArrows && totalSlides > effectiveSlidesToShow && /* @__PURE__ */ jsxs44(Fragment19, { children: [
|
|
23079
23108
|
/* @__PURE__ */ jsx57(
|
|
23080
23109
|
Button_default,
|
|
23081
23110
|
{
|
|
@@ -23446,7 +23475,7 @@ function FallingIcons({
|
|
|
23446
23475
|
// src/components/List.tsx
|
|
23447
23476
|
import * as React53 from "react";
|
|
23448
23477
|
import { ChevronRight as ChevronRight10 } from "lucide-react";
|
|
23449
|
-
import { Fragment as
|
|
23478
|
+
import { Fragment as Fragment20, jsx as jsx59, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
23450
23479
|
var SIZE_STYLES2 = {
|
|
23451
23480
|
xs: { label: "text-xs", desc: "text-[11px]", icon: "h-3.5 w-3.5", avatar: "h-6 w-6" },
|
|
23452
23481
|
sm: { label: "text-[13px]", desc: "text-xs", icon: "h-4 w-4", avatar: "h-8 w-8" },
|
|
@@ -23615,7 +23644,7 @@ var ListItem = React53.forwardRef(
|
|
|
23615
23644
|
}
|
|
23616
23645
|
}
|
|
23617
23646
|
} : {};
|
|
23618
|
-
const inner = /* @__PURE__ */ jsxs46(
|
|
23647
|
+
const inner = /* @__PURE__ */ jsxs46(Fragment20, { children: [
|
|
23619
23648
|
/* @__PURE__ */ jsxs46("div", { className: cn("flex items-center gap-3 group/item relative max-md:gap-2.5", contentClassName), ...headerProps, children: [
|
|
23620
23649
|
avatar && /* @__PURE__ */ jsx59("div", { className: cn("shrink-0", sz.avatar), children: typeof avatar === "string" ? /* @__PURE__ */ jsx59("img", { src: avatar, alt: "", className: cn("rounded-full object-cover", sz.avatar) }) : avatar }),
|
|
23621
23650
|
Left && !avatar && /* @__PURE__ */ jsx59("span", { className: cn("text-muted-foreground shrink-0", sz.icon), children: /* @__PURE__ */ jsx59(Left, { className: cn(sz.icon) }) }),
|
|
@@ -23660,7 +23689,7 @@ var List_default = List;
|
|
|
23660
23689
|
// src/components/Watermark.tsx
|
|
23661
23690
|
import * as React54 from "react";
|
|
23662
23691
|
import { createPortal as createPortal5 } from "react-dom";
|
|
23663
|
-
import { Fragment as
|
|
23692
|
+
import { Fragment as Fragment21, jsx as jsx60, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
23664
23693
|
var PRESETS2 = {
|
|
23665
23694
|
confidential: { text: "CONFIDENTIAL", color: "rgba(220, 38, 38, 0.15)", rotate: -22, fontSize: 16, fontWeight: "bold" },
|
|
23666
23695
|
draft: { text: "DRAFT", color: "rgba(59, 130, 246, 0.15)", rotate: -22, fontSize: 18, fontWeight: "bold" },
|
|
@@ -23939,7 +23968,7 @@ var Watermark = ({
|
|
|
23939
23968
|
}
|
|
23940
23969
|
);
|
|
23941
23970
|
if (fullPage) {
|
|
23942
|
-
return /* @__PURE__ */ jsxs47(
|
|
23971
|
+
return /* @__PURE__ */ jsxs47(Fragment21, { children: [
|
|
23943
23972
|
children,
|
|
23944
23973
|
typeof window !== "undefined" ? createPortal5(overlay, document.body) : null
|
|
23945
23974
|
] });
|
|
@@ -24508,9 +24537,9 @@ function ColorPicker({
|
|
|
24508
24537
|
const alphaPct = Math.round(rgba.a * 100);
|
|
24509
24538
|
const harmony = showHarmony ? getColorHarmony(rgba) : null;
|
|
24510
24539
|
const sizeClasses2 = {
|
|
24511
|
-
sm:
|
|
24512
|
-
md:
|
|
24513
|
-
lg:
|
|
24540
|
+
sm: formControlSizeStyles.sm.control,
|
|
24541
|
+
md: formControlSizeStyles.md.control,
|
|
24542
|
+
lg: formControlSizeStyles.lg.control
|
|
24514
24543
|
};
|
|
24515
24544
|
const swatchSize = size === "sm" ? "sm" : size === "lg" ? "lg" : "md";
|
|
24516
24545
|
const trigger = /* @__PURE__ */ jsxs49(
|
|
@@ -24519,16 +24548,17 @@ function ColorPicker({
|
|
|
24519
24548
|
type: "button",
|
|
24520
24549
|
disabled,
|
|
24521
24550
|
className: cn(
|
|
24522
|
-
"w-full
|
|
24551
|
+
"w-full border border-input bg-background flex items-center justify-between",
|
|
24523
24552
|
getBorderRadiusClass(resolvedBorderMode),
|
|
24524
24553
|
sizeClasses2[size],
|
|
24554
|
+
formControlFixedClass,
|
|
24525
24555
|
"hover:border-accent-foreground/30 transition-colors",
|
|
24526
24556
|
disabled && "opacity-50 cursor-not-allowed",
|
|
24527
24557
|
triggerClassName
|
|
24528
24558
|
),
|
|
24529
24559
|
"aria-label": gi18n.openColorPicker ?? "Open color picker",
|
|
24530
24560
|
children: [
|
|
24531
|
-
/* @__PURE__ */ jsxs49("div", { className: "flex items-center gap-2", children: [
|
|
24561
|
+
/* @__PURE__ */ jsxs49("div", { className: "flex min-h-0 min-w-0 flex-1 items-center gap-2 overflow-hidden", children: [
|
|
24532
24562
|
/* @__PURE__ */ jsx62(
|
|
24533
24563
|
"span",
|
|
24534
24564
|
{
|
|
@@ -24536,9 +24566,9 @@ function ColorPicker({
|
|
|
24536
24566
|
style: { backgroundColor: withAlpha ? `rgba(${rgba.r}, ${rgba.g}, ${rgba.b}, ${rgba.a})` : hexForInput }
|
|
24537
24567
|
}
|
|
24538
24568
|
),
|
|
24539
|
-
/* @__PURE__ */ jsx62("span", { className: "font-mono text-muted-foreground", children: text })
|
|
24569
|
+
/* @__PURE__ */ jsx62("span", { className: cn(formControlValueClass, "font-mono text-muted-foreground"), children: text })
|
|
24540
24570
|
] }),
|
|
24541
|
-
/* @__PURE__ */ jsx62(Pipette, { className: cn(size
|
|
24571
|
+
/* @__PURE__ */ jsx62(Pipette, { className: cn(formControlSizeStyles[size].icon, "shrink-0 text-muted-foreground") })
|
|
24542
24572
|
]
|
|
24543
24573
|
}
|
|
24544
24574
|
);
|
|
@@ -25121,7 +25151,7 @@ var MusicPlayer_default = MusicPlayer;
|
|
|
25121
25151
|
|
|
25122
25152
|
// src/components/Grid.tsx
|
|
25123
25153
|
import React58, { useId as useId13 } from "react";
|
|
25124
|
-
import { Fragment as
|
|
25154
|
+
import { Fragment as Fragment22, jsx as jsx64, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
25125
25155
|
var BP_MIN = {
|
|
25126
25156
|
sm: 640,
|
|
25127
25157
|
md: 768,
|
|
@@ -25278,7 +25308,7 @@ var GridItem = React58.forwardRef(
|
|
|
25278
25308
|
st.opacity = 0;
|
|
25279
25309
|
st.animation = `uvGridItemFadeIn 0.5s ease-out forwards`;
|
|
25280
25310
|
}
|
|
25281
|
-
return /* @__PURE__ */ jsxs51(
|
|
25311
|
+
return /* @__PURE__ */ jsxs51(Fragment22, { children: [
|
|
25282
25312
|
animationDelay != null && /* @__PURE__ */ jsx64(
|
|
25283
25313
|
"style",
|
|
25284
25314
|
{
|
|
@@ -25308,13 +25338,13 @@ var Grid = Object.assign(GridRoot, { Item: GridItem });
|
|
|
25308
25338
|
var Grid_default = Grid;
|
|
25309
25339
|
|
|
25310
25340
|
// src/components/ClientOnly.tsx
|
|
25311
|
-
import { Fragment as
|
|
25341
|
+
import { Fragment as Fragment23, jsx as jsx65 } from "react/jsx-runtime";
|
|
25312
25342
|
function ClientOnly({ children, fallback = null }) {
|
|
25313
25343
|
const hasMounted = useHydrated();
|
|
25314
25344
|
if (!hasMounted) {
|
|
25315
|
-
return /* @__PURE__ */ jsx65(
|
|
25345
|
+
return /* @__PURE__ */ jsx65(Fragment23, { children: fallback });
|
|
25316
25346
|
}
|
|
25317
|
-
return /* @__PURE__ */ jsx65(
|
|
25347
|
+
return /* @__PURE__ */ jsx65(Fragment23, { children });
|
|
25318
25348
|
}
|
|
25319
25349
|
|
|
25320
25350
|
// src/components/Loading.tsx
|
|
@@ -25496,7 +25526,7 @@ import React69 from "react";
|
|
|
25496
25526
|
|
|
25497
25527
|
// src/components/DataTable/components/DataTableBody.tsx
|
|
25498
25528
|
import React60 from "react";
|
|
25499
|
-
import { Fragment as
|
|
25529
|
+
import { Fragment as Fragment24, jsx as jsx68, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
25500
25530
|
function DataTableOverflowText({
|
|
25501
25531
|
text,
|
|
25502
25532
|
align
|
|
@@ -25591,7 +25621,7 @@ function DataTableBodyRows({
|
|
|
25591
25621
|
t("loading"),
|
|
25592
25622
|
"\u2026"
|
|
25593
25623
|
] })
|
|
25594
|
-
] }) }) }) : displayedData.length === 0 ? /* @__PURE__ */ jsx68(TableRow, { children: /* @__PURE__ */ jsx68(TableCell, { colSpan: leafColumns.length, className: "text-center py-6 text-muted-foreground", children: labels?.noData || t("noData") }) }) : /* @__PURE__ */ jsxs54(
|
|
25624
|
+
] }) }) }) : displayedData.length === 0 ? /* @__PURE__ */ jsx68(TableRow, { children: /* @__PURE__ */ jsx68(TableCell, { colSpan: leafColumns.length, className: "text-center py-6 text-muted-foreground", children: labels?.noData || t("noData") }) }) : /* @__PURE__ */ jsxs54(Fragment24, { children: [
|
|
25595
25625
|
virtualPaddingTop > 0 && /* @__PURE__ */ jsx68(TableRow, { "aria-hidden": "true", className: "border-0 hover:bg-transparent hover:shadow-none", children: /* @__PURE__ */ jsx68(TableCell, { colSpan: leafColumns.length, className: "p-0", style: { height: virtualPaddingTop } }) }),
|
|
25596
25626
|
rowsToRender.map(({ row, idx, virtualRow }) => {
|
|
25597
25627
|
const isStripedRow = striped && idx % 2 === 0;
|
|
@@ -25720,7 +25750,7 @@ function groupColumnsByColorTag(leafCols, colorGroups) {
|
|
|
25720
25750
|
}
|
|
25721
25751
|
|
|
25722
25752
|
// src/components/DataTable/components/DataTableHeader.tsx
|
|
25723
|
-
import { Fragment as
|
|
25753
|
+
import { Fragment as Fragment25, jsx as jsx69, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
25724
25754
|
function getColumnLabel(title) {
|
|
25725
25755
|
if (typeof title === "string" || typeof title === "number") {
|
|
25726
25756
|
return String(title).replace(/\s+/g, " ").trim();
|
|
@@ -25940,10 +25970,10 @@ function DataTableHeader({
|
|
|
25940
25970
|
!isRightAlign && !isCenterAlign && "justify-start",
|
|
25941
25971
|
useEndIcon && "w-full"
|
|
25942
25972
|
),
|
|
25943
|
-
children: isRightAlign ? /* @__PURE__ */ jsxs55(
|
|
25973
|
+
children: isRightAlign ? /* @__PURE__ */ jsxs55(Fragment25, { children: [
|
|
25944
25974
|
filterContent,
|
|
25945
25975
|
titleContent
|
|
25946
|
-
] }) : /* @__PURE__ */ jsxs55(
|
|
25976
|
+
] }) : /* @__PURE__ */ jsxs55(Fragment25, { children: [
|
|
25947
25977
|
titleContent,
|
|
25948
25978
|
filterContent
|
|
25949
25979
|
] })
|
|
@@ -25964,7 +25994,7 @@ function DataTableHeader({
|
|
|
25964
25994
|
t
|
|
25965
25995
|
]
|
|
25966
25996
|
);
|
|
25967
|
-
return /* @__PURE__ */ jsx69(
|
|
25997
|
+
return /* @__PURE__ */ jsx69(Fragment25, { children: headerRows.map((row, rowIndex) => /* @__PURE__ */ jsx69(TableRow, { children: row.map((headerCell, cellIndex) => {
|
|
25968
25998
|
const { column: col, colSpan, rowSpan, isLeaf } = headerCell;
|
|
25969
25999
|
const prevCell = cellIndex > 0 ? row[cellIndex - 1] : null;
|
|
25970
26000
|
const prevCol = prevCell?.column;
|
|
@@ -27588,7 +27618,7 @@ function AccessDenied({
|
|
|
27588
27618
|
import { Moon as Moon2, Sun as Sun2, Monitor } from "lucide-react";
|
|
27589
27619
|
import { useRef as useRef27, useState as useState43 } from "react";
|
|
27590
27620
|
import { createPortal as createPortal6 } from "react-dom";
|
|
27591
|
-
import { Fragment as
|
|
27621
|
+
import { Fragment as Fragment26, jsx as jsx76, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
27592
27622
|
function ThemeToggleHeadless({
|
|
27593
27623
|
theme,
|
|
27594
27624
|
onChange,
|
|
@@ -27638,7 +27668,7 @@ function ThemeToggleHeadless({
|
|
|
27638
27668
|
children: /* @__PURE__ */ jsx76(CurrentIcon, { className: "h-5 w-5" })
|
|
27639
27669
|
}
|
|
27640
27670
|
),
|
|
27641
|
-
isOpen && /* @__PURE__ */ jsxs62(
|
|
27671
|
+
isOpen && /* @__PURE__ */ jsxs62(Fragment26, { children: [
|
|
27642
27672
|
typeof window !== "undefined" && createPortal6(/* @__PURE__ */ jsx76("div", { className: "fixed inset-0 z-[99998]", onClick: () => setIsOpen(false) }), document.body),
|
|
27643
27673
|
typeof window !== "undefined" && dropdownPosition && createPortal6(
|
|
27644
27674
|
/* @__PURE__ */ jsx76(
|
|
@@ -27690,7 +27720,7 @@ function ThemeToggleHeadless({
|
|
|
27690
27720
|
import { useRef as useRef28, useState as useState44 } from "react";
|
|
27691
27721
|
import { createPortal as createPortal7 } from "react-dom";
|
|
27692
27722
|
import { Globe } from "lucide-react";
|
|
27693
|
-
import { Fragment as
|
|
27723
|
+
import { Fragment as Fragment27, jsx as jsx77, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
27694
27724
|
function LanguageSwitcherHeadless({
|
|
27695
27725
|
locales,
|
|
27696
27726
|
currentLocale,
|
|
@@ -27735,7 +27765,7 @@ function LanguageSwitcherHeadless({
|
|
|
27735
27765
|
children: /* @__PURE__ */ jsx77(Globe, { className: "h-5 w-5" })
|
|
27736
27766
|
}
|
|
27737
27767
|
),
|
|
27738
|
-
isOpen && /* @__PURE__ */ jsxs63(
|
|
27768
|
+
isOpen && /* @__PURE__ */ jsxs63(Fragment27, { children: [
|
|
27739
27769
|
typeof window !== "undefined" && createPortal7(/* @__PURE__ */ jsx77("div", { className: "fixed inset-0 z-[99998]", onClick: () => setIsOpen(false) }), document.body),
|
|
27740
27770
|
typeof window !== "undefined" && dropdownPosition && createPortal7(
|
|
27741
27771
|
/* @__PURE__ */ jsx77(
|
|
@@ -31926,7 +31956,7 @@ var table_align_default = UEditorTable;
|
|
|
31926
31956
|
import React80, { useState as useState48 } from "react";
|
|
31927
31957
|
import { NodeViewWrapper as NodeViewWrapper7, NodeViewContent as NodeViewContent2 } from "@tiptap/react";
|
|
31928
31958
|
import { Check as Check11, Copy as Copy2, ChevronDown as ChevronDown7 } from "lucide-react";
|
|
31929
|
-
import { Fragment as
|
|
31959
|
+
import { Fragment as Fragment28, jsx as jsx89, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
31930
31960
|
var LANGUAGES = [
|
|
31931
31961
|
{ label: "Plain Text", value: "text" },
|
|
31932
31962
|
{ label: "JavaScript", value: "javascript" },
|
|
@@ -31994,7 +32024,7 @@ var CodeBlockView = ({
|
|
|
31994
32024
|
]
|
|
31995
32025
|
}
|
|
31996
32026
|
),
|
|
31997
|
-
isDropdownOpen && /* @__PURE__ */ jsxs72(
|
|
32027
|
+
isDropdownOpen && /* @__PURE__ */ jsxs72(Fragment28, { children: [
|
|
31998
32028
|
/* @__PURE__ */ jsx89(
|
|
31999
32029
|
"div",
|
|
32000
32030
|
{
|
|
@@ -33522,7 +33552,7 @@ function getDefaultLetterSpacings() {
|
|
|
33522
33552
|
}
|
|
33523
33553
|
|
|
33524
33554
|
// src/components/UEditor/toolbar.tsx
|
|
33525
|
-
import { Fragment as
|
|
33555
|
+
import { Fragment as Fragment29, jsx as jsx93, jsxs as jsxs75 } from "react/jsx-runtime";
|
|
33526
33556
|
function getTableAnchorPos(editor) {
|
|
33527
33557
|
const tableInfo = findTableNodeInfoFromState(editor.state);
|
|
33528
33558
|
if (tableInfo) return editor.state.selection.from;
|
|
@@ -33774,7 +33804,7 @@ var EditorToolbar = ({
|
|
|
33774
33804
|
},
|
|
33775
33805
|
onCancel: () => setShowLinkInput(false)
|
|
33776
33806
|
}
|
|
33777
|
-
) : /* @__PURE__ */ jsxs75(
|
|
33807
|
+
) : /* @__PURE__ */ jsxs75(Fragment29, { children: [
|
|
33778
33808
|
/* @__PURE__ */ jsx93(
|
|
33779
33809
|
DropdownMenuItem,
|
|
33780
33810
|
{
|
|
@@ -33916,7 +33946,7 @@ var EditorToolbar = ({
|
|
|
33916
33946
|
]
|
|
33917
33947
|
}
|
|
33918
33948
|
),
|
|
33919
|
-
isFull && /* @__PURE__ */ jsxs75(
|
|
33949
|
+
isFull && /* @__PURE__ */ jsxs75(Fragment29, { children: [
|
|
33920
33950
|
/* @__PURE__ */ jsxs75(
|
|
33921
33951
|
DropdownMenu,
|
|
33922
33952
|
{
|
|
@@ -33988,7 +34018,7 @@ var EditorToolbar = ({
|
|
|
33988
34018
|
),
|
|
33989
34019
|
/* @__PURE__ */ jsx93(ToolbarButton, { onClick: () => editor.chain().focus().toggleStrike().run(), active: editor.isActive("strike"), title: t("toolbar.strike"), children: /* @__PURE__ */ jsx93(FigmaStrikeIcon, { className: "h-4 w-4" }) }),
|
|
33990
34020
|
(isMediumFull || isFull) && /* @__PURE__ */ jsx93(ToolbarButton, { onClick: () => editor.chain().focus().toggleCode().run(), active: editor.isActive("code"), title: t("toolbar.code"), children: /* @__PURE__ */ jsx93(FigmaCodeIcon, { className: "h-4 w-4" }) }),
|
|
33991
|
-
isFull && /* @__PURE__ */ jsxs75(
|
|
34021
|
+
isFull && /* @__PURE__ */ jsxs75(Fragment29, { children: [
|
|
33992
34022
|
/* @__PURE__ */ jsx93(
|
|
33993
34023
|
ToolbarButton,
|
|
33994
34024
|
{
|
|
@@ -34023,7 +34053,7 @@ var EditorToolbar = ({
|
|
|
34023
34053
|
},
|
|
34024
34054
|
onCancel: () => setShowLinkInput(false)
|
|
34025
34055
|
}
|
|
34026
|
-
) : /* @__PURE__ */ jsxs75(
|
|
34056
|
+
) : /* @__PURE__ */ jsxs75(Fragment29, { children: [
|
|
34027
34057
|
/* @__PURE__ */ jsx93(
|
|
34028
34058
|
DropdownMenuItem,
|
|
34029
34059
|
{
|
|
@@ -34098,7 +34128,7 @@ var EditorToolbar = ({
|
|
|
34098
34128
|
)
|
|
34099
34129
|
}
|
|
34100
34130
|
),
|
|
34101
|
-
(isMediumFull || isFull) && /* @__PURE__ */ jsxs75(
|
|
34131
|
+
(isMediumFull || isFull) && /* @__PURE__ */ jsxs75(Fragment29, { children: [
|
|
34102
34132
|
/* @__PURE__ */ jsx93(ToolbarDivider, {}),
|
|
34103
34133
|
/* @__PURE__ */ jsx93(
|
|
34104
34134
|
DropdownMenu,
|
|
@@ -34117,7 +34147,7 @@ var EditorToolbar = ({
|
|
|
34117
34147
|
}
|
|
34118
34148
|
)
|
|
34119
34149
|
] }),
|
|
34120
|
-
(isMediumFull || isFull) && /* @__PURE__ */ jsxs75(
|
|
34150
|
+
(isMediumFull || isFull) && /* @__PURE__ */ jsxs75(Fragment29, { children: [
|
|
34121
34151
|
/* @__PURE__ */ jsx93(ToolbarDivider, {}),
|
|
34122
34152
|
/* @__PURE__ */ jsxs75(
|
|
34123
34153
|
DropdownMenu,
|
|
@@ -34164,7 +34194,7 @@ var EditorToolbar = ({
|
|
|
34164
34194
|
active: editor.isActive({ textAlign: "justify" })
|
|
34165
34195
|
}
|
|
34166
34196
|
),
|
|
34167
|
-
hasTableContext && /* @__PURE__ */ jsxs75(
|
|
34197
|
+
hasTableContext && /* @__PURE__ */ jsxs75(Fragment29, { children: [
|
|
34168
34198
|
/* @__PURE__ */ jsx93("div", { className: "my-1 border-t" }),
|
|
34169
34199
|
/* @__PURE__ */ jsx93(
|
|
34170
34200
|
DropdownMenuItem,
|
|
@@ -34349,7 +34379,7 @@ var EditorToolbar = ({
|
|
|
34349
34379
|
},
|
|
34350
34380
|
onCancel: () => setShowImageInput(false)
|
|
34351
34381
|
}
|
|
34352
|
-
) : /* @__PURE__ */ jsxs75(
|
|
34382
|
+
) : /* @__PURE__ */ jsxs75(Fragment29, { children: [
|
|
34353
34383
|
/* @__PURE__ */ jsx93(DropdownMenuItem, { icon: LinkIcon, label: t("imageInput.addFromUrl"), onClick: () => setShowImageInput(true), closeOnSelect: false }),
|
|
34354
34384
|
/* @__PURE__ */ jsx93(
|
|
34355
34385
|
DropdownMenuItem,
|
|
@@ -34607,7 +34637,7 @@ var EditorToolbar = ({
|
|
|
34607
34637
|
/* @__PURE__ */ jsx93(ToolbarDivider, {}),
|
|
34608
34638
|
/* @__PURE__ */ jsx93(ToolbarButton, { onClick: () => editor.chain().focus().undo().run(), disabled: !editor.can().undo(), title: t("toolbar.undo"), children: /* @__PURE__ */ jsx93(FigmaUndoIcon, { className: "h-4 w-4" }) }),
|
|
34609
34639
|
/* @__PURE__ */ jsx93(ToolbarButton, { onClick: () => editor.chain().focus().redo().run(), disabled: !editor.can().redo(), title: t("toolbar.redo"), children: /* @__PURE__ */ jsx93(FigmaRedoIcon, { className: "h-4 w-4" }) }),
|
|
34610
|
-
hasTableContext && /* @__PURE__ */ jsxs75(
|
|
34640
|
+
hasTableContext && /* @__PURE__ */ jsxs75(Fragment29, { children: [
|
|
34611
34641
|
/* @__PURE__ */ jsx93(ToolbarDivider, {}),
|
|
34612
34642
|
/* @__PURE__ */ jsx93(
|
|
34613
34643
|
ToolbarButton,
|
|
@@ -35772,7 +35802,7 @@ function recalculateAllTableFormulas(editor) {
|
|
|
35772
35802
|
}
|
|
35773
35803
|
|
|
35774
35804
|
// src/components/UEditor/menus.tsx
|
|
35775
|
-
import { Fragment as
|
|
35805
|
+
import { Fragment as Fragment30, jsx as jsx94, jsxs as jsxs76 } from "react/jsx-runtime";
|
|
35776
35806
|
var FloatingSlashCommandMenu = ({ editor, onClose }) => {
|
|
35777
35807
|
const t = useSmartTranslations("UEditor");
|
|
35778
35808
|
const messages = useMemo25(() => buildSlashCommandMessages(t), [t]);
|
|
@@ -36580,7 +36610,7 @@ var BubbleMenuContent = ({
|
|
|
36580
36610
|
),
|
|
36581
36611
|
/* @__PURE__ */ jsx94(ToolbarButton, { onClick: () => setActiveColorPalette("text"), title: t("colors.textColor"), children: /* @__PURE__ */ jsx94(TextColorIcon, { color: currentTextColor }) }),
|
|
36582
36612
|
/* @__PURE__ */ jsx94(ToolbarButton, { onClick: () => setActiveColorPalette("highlight"), active: editor.isActive("highlight"), title: t("colors.highlight"), children: /* @__PURE__ */ jsx94(HighlightColorIcon, { color: currentHighlightColor }) }),
|
|
36583
|
-
isInTable2 && /* @__PURE__ */ jsxs76(
|
|
36613
|
+
isInTable2 && /* @__PURE__ */ jsxs76(Fragment30, { children: [
|
|
36584
36614
|
/* @__PURE__ */ jsx94(
|
|
36585
36615
|
ToolbarButton,
|
|
36586
36616
|
{
|
|
@@ -37515,7 +37545,7 @@ function findDiffEnd(a, b, posA, posB) {
|
|
|
37515
37545
|
posB -= size;
|
|
37516
37546
|
}
|
|
37517
37547
|
}
|
|
37518
|
-
var
|
|
37548
|
+
var Fragment31 = class _Fragment {
|
|
37519
37549
|
/**
|
|
37520
37550
|
@internal
|
|
37521
37551
|
*/
|
|
@@ -37807,7 +37837,7 @@ var Fragment32 = class _Fragment {
|
|
|
37807
37837
|
throw new RangeError("Can not convert " + nodes + " to a Fragment" + (nodes.nodesBetween ? " (looks like multiple versions of prosemirror-model were loaded)" : ""));
|
|
37808
37838
|
}
|
|
37809
37839
|
};
|
|
37810
|
-
|
|
37840
|
+
Fragment31.empty = new Fragment31([], 0);
|
|
37811
37841
|
var found = { index: 0, offset: 0 };
|
|
37812
37842
|
function retIndex(index, offset) {
|
|
37813
37843
|
found.index = index;
|
|
@@ -38032,7 +38062,7 @@ var Slice = class _Slice {
|
|
|
38032
38062
|
let openStart = json.openStart || 0, openEnd = json.openEnd || 0;
|
|
38033
38063
|
if (typeof openStart != "number" || typeof openEnd != "number")
|
|
38034
38064
|
throw new RangeError("Invalid input for Slice.fromJSON");
|
|
38035
|
-
return new _Slice(
|
|
38065
|
+
return new _Slice(Fragment31.fromJSON(schema, json.content), openStart, openEnd);
|
|
38036
38066
|
}
|
|
38037
38067
|
/**
|
|
38038
38068
|
Create a slice from a fragment by taking the maximum possible
|
|
@@ -38047,7 +38077,7 @@ var Slice = class _Slice {
|
|
|
38047
38077
|
return new _Slice(fragment, openStart, openEnd);
|
|
38048
38078
|
}
|
|
38049
38079
|
};
|
|
38050
|
-
Slice.empty = new Slice(
|
|
38080
|
+
Slice.empty = new Slice(Fragment31.empty, 0, 0);
|
|
38051
38081
|
function removeRange(content, from, to) {
|
|
38052
38082
|
let { index, offset } = content.findIndex(from), child = content.maybeChild(index);
|
|
38053
38083
|
let { index: indexTo, offset: offsetTo } = content.findIndex(to);
|
|
@@ -38145,7 +38175,7 @@ function replaceThreeWay($from, $start, $end, $to, depth) {
|
|
|
38145
38175
|
addNode(close(openEnd, replaceTwoWay($end, $to, depth + 1)), content);
|
|
38146
38176
|
}
|
|
38147
38177
|
addRange($to, null, depth, content);
|
|
38148
|
-
return new
|
|
38178
|
+
return new Fragment31(content);
|
|
38149
38179
|
}
|
|
38150
38180
|
function replaceTwoWay($from, $to, depth) {
|
|
38151
38181
|
let content = [];
|
|
@@ -38155,13 +38185,13 @@ function replaceTwoWay($from, $to, depth) {
|
|
|
38155
38185
|
addNode(close(type, replaceTwoWay($from, $to, depth + 1)), content);
|
|
38156
38186
|
}
|
|
38157
38187
|
addRange($to, null, depth, content);
|
|
38158
|
-
return new
|
|
38188
|
+
return new Fragment31(content);
|
|
38159
38189
|
}
|
|
38160
38190
|
function prepareSliceForReplace(slice, $along) {
|
|
38161
38191
|
let extra = $along.depth - slice.openStart, parent = $along.node(extra);
|
|
38162
38192
|
let node = parent.copy(slice.content);
|
|
38163
38193
|
for (let i = extra - 1; i >= 0; i--)
|
|
38164
|
-
node = $along.node(i).copy(
|
|
38194
|
+
node = $along.node(i).copy(Fragment31.from(node));
|
|
38165
38195
|
return {
|
|
38166
38196
|
start: node.resolveNoCache(slice.openStart + extra),
|
|
38167
38197
|
end: node.resolveNoCache(node.content.size - slice.openEnd - extra)
|
|
@@ -38500,7 +38530,7 @@ var Node7 = class _Node {
|
|
|
38500
38530
|
this.type = type;
|
|
38501
38531
|
this.attrs = attrs;
|
|
38502
38532
|
this.marks = marks;
|
|
38503
|
-
this.content = content ||
|
|
38533
|
+
this.content = content || Fragment31.empty;
|
|
38504
38534
|
}
|
|
38505
38535
|
/**
|
|
38506
38536
|
The array of this node's child nodes.
|
|
@@ -38805,7 +38835,7 @@ var Node7 = class _Node {
|
|
|
38805
38835
|
can optionally pass `start` and `end` indices into the
|
|
38806
38836
|
replacement fragment.
|
|
38807
38837
|
*/
|
|
38808
|
-
canReplace(from, to, replacement =
|
|
38838
|
+
canReplace(from, to, replacement = Fragment31.empty, start = 0, end = replacement.childCount) {
|
|
38809
38839
|
let one = this.contentMatchAt(from).matchFragment(replacement, start, end);
|
|
38810
38840
|
let two = one && one.matchFragment(this.content, to);
|
|
38811
38841
|
if (!two || !two.validEnd)
|
|
@@ -38887,7 +38917,7 @@ var Node7 = class _Node {
|
|
|
38887
38917
|
throw new RangeError("Invalid text node in JSON");
|
|
38888
38918
|
return schema.text(json.text, marks);
|
|
38889
38919
|
}
|
|
38890
|
-
let content =
|
|
38920
|
+
let content = Fragment31.fromJSON(schema, json.content);
|
|
38891
38921
|
let node = schema.nodeType(json.type).create(json.attrs, content, marks);
|
|
38892
38922
|
node.type.checkAttrs(node.attrs);
|
|
38893
38923
|
return node;
|
|
@@ -38983,7 +39013,7 @@ var ContentMatch = class _ContentMatch {
|
|
|
38983
39013
|
function search(match, types) {
|
|
38984
39014
|
let finished = match.matchFragment(after, startIndex);
|
|
38985
39015
|
if (finished && (!toEnd || finished.validEnd))
|
|
38986
|
-
return
|
|
39016
|
+
return Fragment31.from(types.map((tp) => tp.createAndFill()));
|
|
38987
39017
|
for (let i = 0; i < match.next.length; i++) {
|
|
38988
39018
|
let { type, next } = match.next[i];
|
|
38989
39019
|
if (!(type.isText || type.hasRequiredAttrs()) && seen.indexOf(next) == -1) {
|
|
@@ -39551,7 +39581,7 @@ function mapFragment(fragment, f, parent) {
|
|
|
39551
39581
|
child = f(child, parent, i);
|
|
39552
39582
|
mapped.push(child);
|
|
39553
39583
|
}
|
|
39554
|
-
return
|
|
39584
|
+
return Fragment31.fromArray(mapped);
|
|
39555
39585
|
}
|
|
39556
39586
|
var AddMarkStep = class _AddMarkStep extends Step {
|
|
39557
39587
|
/**
|
|
@@ -39668,7 +39698,7 @@ var AddNodeMarkStep = class _AddNodeMarkStep extends Step {
|
|
|
39668
39698
|
if (!node)
|
|
39669
39699
|
return StepResult.fail("No node at mark step's position");
|
|
39670
39700
|
let updated = node.type.create(node.attrs, null, this.mark.addToSet(node.marks));
|
|
39671
|
-
return StepResult.fromReplace(doc, this.pos, this.pos + 1, new Slice(
|
|
39701
|
+
return StepResult.fromReplace(doc, this.pos, this.pos + 1, new Slice(Fragment31.from(updated), 0, node.isLeaf ? 0 : 1));
|
|
39672
39702
|
}
|
|
39673
39703
|
invert(doc) {
|
|
39674
39704
|
let node = doc.nodeAt(this.pos);
|
|
@@ -39714,7 +39744,7 @@ var RemoveNodeMarkStep = class _RemoveNodeMarkStep extends Step {
|
|
|
39714
39744
|
if (!node)
|
|
39715
39745
|
return StepResult.fail("No node at mark step's position");
|
|
39716
39746
|
let updated = node.type.create(node.attrs, null, this.mark.removeFromSet(node.marks));
|
|
39717
|
-
return StepResult.fromReplace(doc, this.pos, this.pos + 1, new Slice(
|
|
39747
|
+
return StepResult.fromReplace(doc, this.pos, this.pos + 1, new Slice(Fragment31.from(updated), 0, node.isLeaf ? 0 : 1));
|
|
39718
39748
|
}
|
|
39719
39749
|
invert(doc) {
|
|
39720
39750
|
let node = doc.nodeAt(this.pos);
|
|
@@ -39915,7 +39945,7 @@ var AttrStep = class _AttrStep extends Step {
|
|
|
39915
39945
|
attrs[name] = node.attrs[name];
|
|
39916
39946
|
attrs[this.attr] = this.value;
|
|
39917
39947
|
let updated = node.type.create(attrs, null, node.marks);
|
|
39918
|
-
return StepResult.fromReplace(doc, this.pos, this.pos + 1, new Slice(
|
|
39948
|
+
return StepResult.fromReplace(doc, this.pos, this.pos + 1, new Slice(Fragment31.from(updated), 0, node.isLeaf ? 0 : 1));
|
|
39919
39949
|
}
|
|
39920
39950
|
getMap() {
|
|
39921
39951
|
return StepMap.empty;
|
|
@@ -40299,7 +40329,7 @@ var NodeSelection2 = class _NodeSelection extends Selection {
|
|
|
40299
40329
|
return new _NodeSelection($pos);
|
|
40300
40330
|
}
|
|
40301
40331
|
content() {
|
|
40302
|
-
return new Slice(
|
|
40332
|
+
return new Slice(Fragment31.from(this.node), 0, 0);
|
|
40303
40333
|
}
|
|
40304
40334
|
eq(other) {
|
|
40305
40335
|
return other instanceof _NodeSelection && other.anchor == this.anchor;
|
|
@@ -41027,10 +41057,10 @@ var CellSelection = class CellSelection2 extends Selection {
|
|
|
41027
41057
|
}
|
|
41028
41058
|
rowContent.push(cell);
|
|
41029
41059
|
}
|
|
41030
|
-
rows.push(table.child(row).copy(
|
|
41060
|
+
rows.push(table.child(row).copy(Fragment31.from(rowContent)));
|
|
41031
41061
|
}
|
|
41032
41062
|
const fragment = this.isColSelection() && this.isRowSelection() ? table : rows;
|
|
41033
|
-
return new Slice(
|
|
41063
|
+
return new Slice(Fragment31.from(fragment), 1, 1);
|
|
41034
41064
|
}
|
|
41035
41065
|
replace(tr, content = Slice.empty) {
|
|
41036
41066
|
const mapFrom = tr.steps.length, ranges = this.ranges;
|
|
@@ -41042,7 +41072,7 @@ var CellSelection = class CellSelection2 extends Selection {
|
|
|
41042
41072
|
if (sel) tr.setSelection(sel);
|
|
41043
41073
|
}
|
|
41044
41074
|
replaceWith(tr, node) {
|
|
41045
|
-
this.replace(tr, new Slice(
|
|
41075
|
+
this.replace(tr, new Slice(Fragment31.from(node), 0, 0));
|
|
41046
41076
|
}
|
|
41047
41077
|
forEachCell(f) {
|
|
41048
41078
|
const table = this.$anchorCell.node(-1);
|
|
@@ -41943,7 +41973,7 @@ function buildTableHoverState({
|
|
|
41943
41973
|
}
|
|
41944
41974
|
|
|
41945
41975
|
// src/components/UEditor/table-drag-preview.tsx
|
|
41946
|
-
import { Fragment as
|
|
41976
|
+
import { Fragment as Fragment32, jsx as jsx95, jsxs as jsxs78 } from "react/jsx-runtime";
|
|
41947
41977
|
function TableDragPreview({
|
|
41948
41978
|
columnDragLabel,
|
|
41949
41979
|
dragPreview,
|
|
@@ -41954,8 +41984,8 @@ function TableDragPreview({
|
|
|
41954
41984
|
const expandPreviewWidth = dragPreview.kind === "add-column" ? layout.tableWidth + dragPreview.previewCols * layout.avgColumnWidth : layout.tableWidth;
|
|
41955
41985
|
const expandPreviewHeight = dragPreview.kind === "add-row" ? layout.tableHeight + dragPreview.previewRows * layout.avgRowHeight : layout.tableHeight;
|
|
41956
41986
|
const dragStatusText = dragPreview.kind === "row" ? `${rowDragLabel} ${dragPreview.originIndex + 1} -> ${dragPreview.targetIndex + 1}` : dragPreview.kind === "column" ? `${columnDragLabel} ${dragPreview.originIndex + 1} -> ${dragPreview.targetIndex + 1}` : dragPreview.kind === "add-row" ? `+${dragPreview.previewRows}R` : `+${dragPreview.previewCols}C`;
|
|
41957
|
-
return /* @__PURE__ */ jsxs78(
|
|
41958
|
-
dragPreview.kind === "row" && /* @__PURE__ */ jsxs78(
|
|
41987
|
+
return /* @__PURE__ */ jsxs78(Fragment32, { children: [
|
|
41988
|
+
dragPreview.kind === "row" && /* @__PURE__ */ jsxs78(Fragment32, { children: [
|
|
41959
41989
|
/* @__PURE__ */ jsx95(
|
|
41960
41990
|
"div",
|
|
41961
41991
|
{
|
|
@@ -41983,7 +42013,7 @@ function TableDragPreview({
|
|
|
41983
42013
|
}
|
|
41984
42014
|
)
|
|
41985
42015
|
] }),
|
|
41986
|
-
dragPreview.kind === "column" && /* @__PURE__ */ jsxs78(
|
|
42016
|
+
dragPreview.kind === "column" && /* @__PURE__ */ jsxs78(Fragment32, { children: [
|
|
41987
42017
|
/* @__PURE__ */ jsx95(
|
|
41988
42018
|
"div",
|
|
41989
42019
|
{
|
|
@@ -42040,7 +42070,7 @@ function TableDragPreview({
|
|
|
42040
42070
|
}
|
|
42041
42071
|
|
|
42042
42072
|
// src/components/UEditor/table-add-rails.tsx
|
|
42043
|
-
import { Fragment as
|
|
42073
|
+
import { Fragment as Fragment33, jsx as jsx96, jsxs as jsxs79 } from "react/jsx-runtime";
|
|
42044
42074
|
var ADD_COLUMN_RAIL_GAP = 4;
|
|
42045
42075
|
var ADD_ROW_RAIL_GAP = 4;
|
|
42046
42076
|
function TableAddRails({
|
|
@@ -42061,7 +42091,7 @@ function TableAddRails({
|
|
|
42061
42091
|
const rowRailLeft = visibleBounds.left;
|
|
42062
42092
|
const showColumnRail = controlsVisible || addColumnVisible;
|
|
42063
42093
|
const showRowRail = controlsVisible || addRowVisible;
|
|
42064
|
-
return /* @__PURE__ */ jsxs79(
|
|
42094
|
+
return /* @__PURE__ */ jsxs79(Fragment33, { children: [
|
|
42065
42095
|
/* @__PURE__ */ jsx96(
|
|
42066
42096
|
Tooltip,
|
|
42067
42097
|
{
|
|
@@ -42205,7 +42235,7 @@ function TableControlMenu({
|
|
|
42205
42235
|
|
|
42206
42236
|
// src/components/UEditor/table-axis-handles.tsx
|
|
42207
42237
|
import { GripHorizontal, GripVertical as GripVertical3 } from "lucide-react";
|
|
42208
|
-
import { Fragment as
|
|
42238
|
+
import { Fragment as Fragment34, jsx as jsx98 } from "react/jsx-runtime";
|
|
42209
42239
|
var IDLE_HANDLE_SCALE = "0.78";
|
|
42210
42240
|
function TableRowHandles({
|
|
42211
42241
|
activeRowIndex,
|
|
@@ -42219,7 +42249,7 @@ function TableRowHandles({
|
|
|
42219
42249
|
rowHandleLeft,
|
|
42220
42250
|
rowHandles
|
|
42221
42251
|
}) {
|
|
42222
|
-
return /* @__PURE__ */ jsx98(
|
|
42252
|
+
return /* @__PURE__ */ jsx98(Fragment34, { children: rowHandles.map((rowHandle) => {
|
|
42223
42253
|
const menuKey = `row:${rowHandle.index}`;
|
|
42224
42254
|
const isActive = rowHandle.index === activeRowIndex;
|
|
42225
42255
|
const visible = controlsVisible || hoverRowHandleIndex === rowHandle.index || openMenuKey === menuKey;
|
|
@@ -42290,7 +42320,7 @@ function TableColumnHandles({
|
|
|
42290
42320
|
onStartDrag,
|
|
42291
42321
|
openMenuKey
|
|
42292
42322
|
}) {
|
|
42293
|
-
return /* @__PURE__ */ jsx98(
|
|
42323
|
+
return /* @__PURE__ */ jsx98(Fragment34, { children: columnHandles.map((columnHandle) => {
|
|
42294
42324
|
const menuKey = `column:${columnHandle.index}`;
|
|
42295
42325
|
const isActive = columnHandle.index === activeColumnIndex;
|
|
42296
42326
|
const visible = controlsVisible || hoverColumnHandleIndex === columnHandle.index || openMenuKey === menuKey;
|
|
@@ -42351,7 +42381,7 @@ function TableColumnHandles({
|
|
|
42351
42381
|
}
|
|
42352
42382
|
|
|
42353
42383
|
// src/components/UEditor/table-controls.tsx
|
|
42354
|
-
import { Fragment as
|
|
42384
|
+
import { Fragment as Fragment35, jsx as jsx99, jsxs as jsxs80 } from "react/jsx-runtime";
|
|
42355
42385
|
var TABLE_MENU_TOP_OFFSET = 10;
|
|
42356
42386
|
function nearestIndex(centers, position) {
|
|
42357
42387
|
let bestIndex = 0;
|
|
@@ -42798,7 +42828,7 @@ function TableControls({ editor, containerRef }) {
|
|
|
42798
42828
|
const menuLeft = Math.max(8, layout.tableLeft);
|
|
42799
42829
|
const rowHandleLeft = layout.tableLeft - 12;
|
|
42800
42830
|
const columnHandleTop = layout.tableTop - 12;
|
|
42801
|
-
return /* @__PURE__ */ jsxs80(
|
|
42831
|
+
return /* @__PURE__ */ jsxs80(Fragment35, { children: [
|
|
42802
42832
|
/* @__PURE__ */ jsx99(
|
|
42803
42833
|
TableRowHandles,
|
|
42804
42834
|
{
|
|
@@ -44151,7 +44181,7 @@ function prepareUEditorPreviewHtml(html) {
|
|
|
44151
44181
|
}
|
|
44152
44182
|
|
|
44153
44183
|
// src/components/UEditor/menu-bar.tsx
|
|
44154
|
-
import { Fragment as
|
|
44184
|
+
import { Fragment as Fragment36, jsx as jsx100, jsxs as jsxs81 } from "react/jsx-runtime";
|
|
44155
44185
|
function MenuTableInsertGrid({
|
|
44156
44186
|
insertLabel,
|
|
44157
44187
|
previewTemplate,
|
|
@@ -44672,7 +44702,7 @@ var MenuBar = ({
|
|
|
44672
44702
|
{
|
|
44673
44703
|
type: "custom",
|
|
44674
44704
|
key: "image",
|
|
44675
|
-
render: () => showImageInput ? /* @__PURE__ */ jsx100(ImageInput, { onSubmit: handleImageUrl, onCancel: () => setShowImageInput(false) }) : /* @__PURE__ */ jsxs81(
|
|
44705
|
+
render: () => showImageInput ? /* @__PURE__ */ jsx100(ImageInput, { onSubmit: handleImageUrl, onCancel: () => setShowImageInput(false) }) : /* @__PURE__ */ jsxs81(Fragment36, { children: [
|
|
44676
44706
|
/* @__PURE__ */ jsx100(DropdownMenuItem, { label: t("menubar.image"), icon: ImageIcon2, onClick: () => setShowImageInput(true), closeOnSelect: false }),
|
|
44677
44707
|
/* @__PURE__ */ jsx100(
|
|
44678
44708
|
DropdownMenuItem,
|
|
@@ -44788,7 +44818,7 @@ var MenuBar = ({
|
|
|
44788
44818
|
},
|
|
44789
44819
|
{ label: t("menubar.table"), items: buildTableMenuItems(t, editor, handleInsertTable), open: void 0, onOpenChange: void 0 }
|
|
44790
44820
|
];
|
|
44791
|
-
return /* @__PURE__ */ jsxs81(
|
|
44821
|
+
return /* @__PURE__ */ jsxs81(Fragment36, { children: [
|
|
44792
44822
|
/* @__PURE__ */ jsx100(
|
|
44793
44823
|
"input",
|
|
44794
44824
|
{
|