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