@stll/folio-react 0.25.2 → 0.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/{CommentsSidebar-IR9uTkkk.js → CommentsSidebar-C4IpXib8.js} +53 -33
- package/dist/{FindReplaceDialog-BUwFQWaq.js → FindReplaceDialog-LlVMe3EW.js} +148 -107
- package/dist/{FootnotePropertiesDialog-6XdO0zBH.js → FootnotePropertiesDialog-D73t3LNP.js} +1 -1
- package/dist/ImagePositionDialog-Cwt6R8iM.js +1039 -0
- package/dist/ImagePropertiesDialog-GNZLBFLB.js +607 -0
- package/dist/{InsertSymbolDialog-Cn_Nifhg.js → InsertSymbolDialog-CeEhkEvc.js} +1 -1
- package/dist/PageSetupDialog-DD6IEZAo.js +805 -0
- package/dist/SetNumberingValueDialog-CDQGDvP1.js +233 -0
- package/dist/TablePropertiesDialog-Vu0HXQz6.js +416 -0
- package/dist/{TextContextMenu-Bqth8itn.js → TextContextMenu-DZ3AUFKh.js} +4 -2
- package/dist/compat/eigenpal.js +1 -1
- package/dist/{dialogs-DZz6gVev.d.ts → dialogs-BENP66Ly.d.ts} +11 -11
- package/dist/{dialogs-Dzu4hqRp.js → dialogs-De-oslzU.js} +417 -394
- package/dist/dialogs.d.ts +1 -1
- package/dist/dialogs.js +8 -8
- package/dist/{folio-ui-DO95voaI.js → folio-ui-rCHqCEG6.js} +125 -35
- package/dist/index.d.ts +1 -1
- package/dist/index.js +10 -10
- package/dist/{renderAsync-C0_y_c9Y.js → renderAsync-T2p_qqNU.js} +2843 -2022
- package/package.json +4 -4
- package/dist/ImagePositionDialog-9q71ka9N.js +0 -1065
- package/dist/ImagePropertiesDialog-o79NCGk7.js +0 -613
- package/dist/PageSetupDialog-CMdVXCZ-.js +0 -820
- package/dist/SetNumberingValueDialog-DOsaSq7e.js +0 -237
- package/dist/TablePropertiesDialog-DwPiUj4m.js +0 -421
|
@@ -0,0 +1,607 @@
|
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-BBjsoOtd.js";
|
|
2
|
+
import { r as useFolioUI } from "./folio-ui-rCHqCEG6.js";
|
|
3
|
+
import { u as useCloseOnDialogOpenChange } from "./dialogChrome-BoGYPgeu.js";
|
|
4
|
+
import { c } from "react-compiler-runtime";
|
|
5
|
+
import { useId, useState } from "react";
|
|
6
|
+
import { useTranslations } from "use-intl";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
//#region src/components/dialogs/ImagePropertiesDialog.tsx
|
|
9
|
+
/**
|
|
10
|
+
* Image Properties Dialog
|
|
11
|
+
*
|
|
12
|
+
* Modal for editing image properties:
|
|
13
|
+
* - Alt text for accessibility
|
|
14
|
+
* - Border/outline style, color, and width
|
|
15
|
+
*/
|
|
16
|
+
var ImagePropertiesDialog_exports = /* @__PURE__ */ __exportAll({ ImagePropertiesDialog: () => ImagePropertiesDialog });
|
|
17
|
+
function ImagePropertiesDialog(props) {
|
|
18
|
+
const $ = c(5);
|
|
19
|
+
if (!props.isOpen) return null;
|
|
20
|
+
let t0;
|
|
21
|
+
if ($[0] !== props.currentData) {
|
|
22
|
+
t0 = JSON.stringify(props.currentData);
|
|
23
|
+
$[0] = props.currentData;
|
|
24
|
+
$[1] = t0;
|
|
25
|
+
} else t0 = $[1];
|
|
26
|
+
let t1;
|
|
27
|
+
if ($[2] !== props || $[3] !== t0) {
|
|
28
|
+
t1 = /* @__PURE__ */ jsx(ImagePropertiesDialogForm, { ...props }, t0);
|
|
29
|
+
$[2] = props;
|
|
30
|
+
$[3] = t0;
|
|
31
|
+
$[4] = t1;
|
|
32
|
+
} else t1 = $[4];
|
|
33
|
+
return t1;
|
|
34
|
+
}
|
|
35
|
+
function ImagePropertiesDialogForm(t0) {
|
|
36
|
+
const $ = c(157);
|
|
37
|
+
const { isOpen, onClose, onApply, currentData } = t0;
|
|
38
|
+
const { Root: Dialog, Portal: DialogPortal, Backdrop: DialogBackdrop, Popup: DialogPopup, Title: DialogTitle, Close: DialogClose } = useFolioUI().Dialog;
|
|
39
|
+
const handleOpenChange = useCloseOnDialogOpenChange(onClose);
|
|
40
|
+
const t = useTranslations("folio");
|
|
41
|
+
const id = useId();
|
|
42
|
+
const [alt, setAlt] = useState(currentData?.alt ?? "");
|
|
43
|
+
const [borderWidth, setBorderWidth] = useState(currentData?.borderWidth ?? 0);
|
|
44
|
+
const [borderColor, setBorderColor] = useState(currentData?.borderColor ?? "#000000");
|
|
45
|
+
const [borderStyle, setBorderStyle] = useState(currentData?.borderStyle ?? "solid");
|
|
46
|
+
let t1;
|
|
47
|
+
if ($[0] !== alt || $[1] !== borderColor || $[2] !== borderStyle || $[3] !== borderWidth || $[4] !== onApply || $[5] !== onClose) {
|
|
48
|
+
t1 = () => {
|
|
49
|
+
onApply({
|
|
50
|
+
...alt ? { alt } : {},
|
|
51
|
+
...borderWidth > 0 ? {
|
|
52
|
+
borderWidth,
|
|
53
|
+
borderColor,
|
|
54
|
+
borderStyle
|
|
55
|
+
} : {}
|
|
56
|
+
});
|
|
57
|
+
onClose();
|
|
58
|
+
};
|
|
59
|
+
$[0] = alt;
|
|
60
|
+
$[1] = borderColor;
|
|
61
|
+
$[2] = borderStyle;
|
|
62
|
+
$[3] = borderWidth;
|
|
63
|
+
$[4] = onApply;
|
|
64
|
+
$[5] = onClose;
|
|
65
|
+
$[6] = t1;
|
|
66
|
+
} else t1 = $[6];
|
|
67
|
+
const handleApply = t1;
|
|
68
|
+
const t2 = `${id}-img-border-width`;
|
|
69
|
+
const t3 = `${id}-img-border-style`;
|
|
70
|
+
const t4 = `${id}-img-border-color`;
|
|
71
|
+
let t5;
|
|
72
|
+
if ($[7] !== t2 || $[8] !== t3 || $[9] !== t4) {
|
|
73
|
+
t5 = {
|
|
74
|
+
borderWidth: t2,
|
|
75
|
+
borderStyle: t3,
|
|
76
|
+
borderColor: t4
|
|
77
|
+
};
|
|
78
|
+
$[7] = t2;
|
|
79
|
+
$[8] = t3;
|
|
80
|
+
$[9] = t4;
|
|
81
|
+
$[10] = t5;
|
|
82
|
+
} else t5 = $[10];
|
|
83
|
+
const fieldIds = t5;
|
|
84
|
+
let t6;
|
|
85
|
+
if ($[11] !== DialogBackdrop) {
|
|
86
|
+
t6 = /* @__PURE__ */ jsx(DialogBackdrop, { className: "fixed inset-0 z-[10000] bg-black/50" });
|
|
87
|
+
$[11] = DialogBackdrop;
|
|
88
|
+
$[12] = t6;
|
|
89
|
+
} else t6 = $[12];
|
|
90
|
+
let t7;
|
|
91
|
+
if ($[13] !== t) {
|
|
92
|
+
t7 = t("dialogs.imageProperties.title");
|
|
93
|
+
$[13] = t;
|
|
94
|
+
$[14] = t7;
|
|
95
|
+
} else t7 = $[14];
|
|
96
|
+
let t8;
|
|
97
|
+
if ($[15] !== DialogTitle || $[16] !== t7) {
|
|
98
|
+
t8 = /* @__PURE__ */ jsx(DialogTitle, {
|
|
99
|
+
className: "border-b px-5 py-3 text-base font-semibold",
|
|
100
|
+
children: t7
|
|
101
|
+
});
|
|
102
|
+
$[15] = DialogTitle;
|
|
103
|
+
$[16] = t7;
|
|
104
|
+
$[17] = t8;
|
|
105
|
+
} else t8 = $[17];
|
|
106
|
+
let t9;
|
|
107
|
+
if ($[18] !== t) {
|
|
108
|
+
t9 = t("dialogs.imageProperties.altText");
|
|
109
|
+
$[18] = t;
|
|
110
|
+
$[19] = t9;
|
|
111
|
+
} else t9 = $[19];
|
|
112
|
+
let t10;
|
|
113
|
+
if ($[20] !== t9) {
|
|
114
|
+
t10 = /* @__PURE__ */ jsx("div", {
|
|
115
|
+
className: "text-foreground text-[13px] font-semibold",
|
|
116
|
+
children: t9
|
|
117
|
+
});
|
|
118
|
+
$[20] = t9;
|
|
119
|
+
$[21] = t10;
|
|
120
|
+
} else t10 = $[21];
|
|
121
|
+
let t11;
|
|
122
|
+
if ($[22] === Symbol.for("react.memo_cache_sentinel")) {
|
|
123
|
+
t11 = (e) => setAlt(e.target.value);
|
|
124
|
+
$[22] = t11;
|
|
125
|
+
} else t11 = $[22];
|
|
126
|
+
let t12;
|
|
127
|
+
if ($[23] !== t) {
|
|
128
|
+
t12 = t("dialogs.imageProperties.altTextPlaceholder");
|
|
129
|
+
$[23] = t;
|
|
130
|
+
$[24] = t12;
|
|
131
|
+
} else t12 = $[24];
|
|
132
|
+
let t13;
|
|
133
|
+
if ($[25] !== alt || $[26] !== t12) {
|
|
134
|
+
t13 = /* @__PURE__ */ jsx("textarea", {
|
|
135
|
+
className: "border-input bg-background text-foreground font-[inherit] min-h-[60px] resize-y rounded border px-1.5 py-1 text-xs outline-none",
|
|
136
|
+
value: alt,
|
|
137
|
+
onChange: t11,
|
|
138
|
+
placeholder: t12
|
|
139
|
+
});
|
|
140
|
+
$[25] = alt;
|
|
141
|
+
$[26] = t12;
|
|
142
|
+
$[27] = t13;
|
|
143
|
+
} else t13 = $[27];
|
|
144
|
+
let t14;
|
|
145
|
+
if ($[28] !== t10 || $[29] !== t13) {
|
|
146
|
+
t14 = /* @__PURE__ */ jsxs("div", {
|
|
147
|
+
className: "flex flex-col gap-2",
|
|
148
|
+
children: [t10, t13]
|
|
149
|
+
});
|
|
150
|
+
$[28] = t10;
|
|
151
|
+
$[29] = t13;
|
|
152
|
+
$[30] = t14;
|
|
153
|
+
} else t14 = $[30];
|
|
154
|
+
let t15;
|
|
155
|
+
if ($[31] !== t) {
|
|
156
|
+
t15 = t("dialogs.imageProperties.border");
|
|
157
|
+
$[31] = t;
|
|
158
|
+
$[32] = t15;
|
|
159
|
+
} else t15 = $[32];
|
|
160
|
+
let t16;
|
|
161
|
+
if ($[33] !== t15) {
|
|
162
|
+
t16 = /* @__PURE__ */ jsx("div", {
|
|
163
|
+
className: "text-foreground text-[13px] font-semibold",
|
|
164
|
+
children: t15
|
|
165
|
+
});
|
|
166
|
+
$[33] = t15;
|
|
167
|
+
$[34] = t16;
|
|
168
|
+
} else t16 = $[34];
|
|
169
|
+
const t17 = fieldIds.borderWidth;
|
|
170
|
+
let t18;
|
|
171
|
+
if ($[35] !== t) {
|
|
172
|
+
t18 = t("dialogs.imageProperties.width");
|
|
173
|
+
$[35] = t;
|
|
174
|
+
$[36] = t18;
|
|
175
|
+
} else t18 = $[36];
|
|
176
|
+
let t19;
|
|
177
|
+
if ($[37] !== fieldIds.borderWidth || $[38] !== t18) {
|
|
178
|
+
t19 = /* @__PURE__ */ jsx("label", {
|
|
179
|
+
htmlFor: t17,
|
|
180
|
+
className: "w-[60px] text-muted-foreground text-xs",
|
|
181
|
+
children: t18
|
|
182
|
+
});
|
|
183
|
+
$[37] = fieldIds.borderWidth;
|
|
184
|
+
$[38] = t18;
|
|
185
|
+
$[39] = t19;
|
|
186
|
+
} else t19 = $[39];
|
|
187
|
+
let t20;
|
|
188
|
+
if ($[40] === Symbol.for("react.memo_cache_sentinel")) {
|
|
189
|
+
t20 = (e_0) => setBorderWidth(Number(e_0.target.value) || 0);
|
|
190
|
+
$[40] = t20;
|
|
191
|
+
} else t20 = $[40];
|
|
192
|
+
let t21;
|
|
193
|
+
if ($[41] !== borderWidth || $[42] !== fieldIds.borderWidth) {
|
|
194
|
+
t21 = /* @__PURE__ */ jsx("input", {
|
|
195
|
+
id: fieldIds.borderWidth,
|
|
196
|
+
type: "number",
|
|
197
|
+
className: "border-input bg-background text-foreground flex-1 rounded border px-1.5 py-1 text-xs outline-none max-w-[80px]",
|
|
198
|
+
min: 0,
|
|
199
|
+
max: 20,
|
|
200
|
+
step: .5,
|
|
201
|
+
value: borderWidth,
|
|
202
|
+
onChange: t20
|
|
203
|
+
});
|
|
204
|
+
$[41] = borderWidth;
|
|
205
|
+
$[42] = fieldIds.borderWidth;
|
|
206
|
+
$[43] = t21;
|
|
207
|
+
} else t21 = $[43];
|
|
208
|
+
let t22;
|
|
209
|
+
if ($[44] === Symbol.for("react.memo_cache_sentinel")) {
|
|
210
|
+
t22 = /* @__PURE__ */ jsx("span", {
|
|
211
|
+
className: "text-muted-foreground text-xs",
|
|
212
|
+
children: "px"
|
|
213
|
+
});
|
|
214
|
+
$[44] = t22;
|
|
215
|
+
} else t22 = $[44];
|
|
216
|
+
let t23;
|
|
217
|
+
if ($[45] !== t19 || $[46] !== t21) {
|
|
218
|
+
t23 = /* @__PURE__ */ jsxs("div", {
|
|
219
|
+
className: "flex items-center gap-2",
|
|
220
|
+
children: [
|
|
221
|
+
t19,
|
|
222
|
+
t21,
|
|
223
|
+
t22
|
|
224
|
+
]
|
|
225
|
+
});
|
|
226
|
+
$[45] = t19;
|
|
227
|
+
$[46] = t21;
|
|
228
|
+
$[47] = t23;
|
|
229
|
+
} else t23 = $[47];
|
|
230
|
+
const t24 = fieldIds.borderStyle;
|
|
231
|
+
let t25;
|
|
232
|
+
if ($[48] !== t) {
|
|
233
|
+
t25 = t("dialogs.imageProperties.style");
|
|
234
|
+
$[48] = t;
|
|
235
|
+
$[49] = t25;
|
|
236
|
+
} else t25 = $[49];
|
|
237
|
+
let t26;
|
|
238
|
+
if ($[50] !== fieldIds.borderStyle || $[51] !== t25) {
|
|
239
|
+
t26 = /* @__PURE__ */ jsx("label", {
|
|
240
|
+
htmlFor: t24,
|
|
241
|
+
className: "w-[60px] text-muted-foreground text-xs",
|
|
242
|
+
children: t25
|
|
243
|
+
});
|
|
244
|
+
$[50] = fieldIds.borderStyle;
|
|
245
|
+
$[51] = t25;
|
|
246
|
+
$[52] = t26;
|
|
247
|
+
} else t26 = $[52];
|
|
248
|
+
const t27 = fieldIds.borderStyle;
|
|
249
|
+
let t28;
|
|
250
|
+
if ($[53] === Symbol.for("react.memo_cache_sentinel")) {
|
|
251
|
+
t28 = (e_1) => setBorderStyle(e_1.target.value);
|
|
252
|
+
$[53] = t28;
|
|
253
|
+
} else t28 = $[53];
|
|
254
|
+
let t29;
|
|
255
|
+
if ($[54] !== t) {
|
|
256
|
+
t29 = t("dialogs.imageProperties.borderStyles.solid");
|
|
257
|
+
$[54] = t;
|
|
258
|
+
$[55] = t29;
|
|
259
|
+
} else t29 = $[55];
|
|
260
|
+
let t30;
|
|
261
|
+
if ($[56] !== t29) {
|
|
262
|
+
t30 = /* @__PURE__ */ jsx("option", {
|
|
263
|
+
value: "solid",
|
|
264
|
+
children: t29
|
|
265
|
+
});
|
|
266
|
+
$[56] = t29;
|
|
267
|
+
$[57] = t30;
|
|
268
|
+
} else t30 = $[57];
|
|
269
|
+
let t31;
|
|
270
|
+
if ($[58] !== t) {
|
|
271
|
+
t31 = t("dialogs.imageProperties.borderStyles.dashed");
|
|
272
|
+
$[58] = t;
|
|
273
|
+
$[59] = t31;
|
|
274
|
+
} else t31 = $[59];
|
|
275
|
+
let t32;
|
|
276
|
+
if ($[60] !== t31) {
|
|
277
|
+
t32 = /* @__PURE__ */ jsx("option", {
|
|
278
|
+
value: "dashed",
|
|
279
|
+
children: t31
|
|
280
|
+
});
|
|
281
|
+
$[60] = t31;
|
|
282
|
+
$[61] = t32;
|
|
283
|
+
} else t32 = $[61];
|
|
284
|
+
let t33;
|
|
285
|
+
if ($[62] !== t) {
|
|
286
|
+
t33 = t("dialogs.imageProperties.borderStyles.dotted");
|
|
287
|
+
$[62] = t;
|
|
288
|
+
$[63] = t33;
|
|
289
|
+
} else t33 = $[63];
|
|
290
|
+
let t34;
|
|
291
|
+
if ($[64] !== t33) {
|
|
292
|
+
t34 = /* @__PURE__ */ jsx("option", {
|
|
293
|
+
value: "dotted",
|
|
294
|
+
children: t33
|
|
295
|
+
});
|
|
296
|
+
$[64] = t33;
|
|
297
|
+
$[65] = t34;
|
|
298
|
+
} else t34 = $[65];
|
|
299
|
+
let t35;
|
|
300
|
+
if ($[66] !== t) {
|
|
301
|
+
t35 = t("dialogs.imageProperties.borderStyles.double");
|
|
302
|
+
$[66] = t;
|
|
303
|
+
$[67] = t35;
|
|
304
|
+
} else t35 = $[67];
|
|
305
|
+
let t36;
|
|
306
|
+
if ($[68] !== t35) {
|
|
307
|
+
t36 = /* @__PURE__ */ jsx("option", {
|
|
308
|
+
value: "double",
|
|
309
|
+
children: t35
|
|
310
|
+
});
|
|
311
|
+
$[68] = t35;
|
|
312
|
+
$[69] = t36;
|
|
313
|
+
} else t36 = $[69];
|
|
314
|
+
let t37;
|
|
315
|
+
if ($[70] !== t) {
|
|
316
|
+
t37 = t("dialogs.imageProperties.borderStyles.groove");
|
|
317
|
+
$[70] = t;
|
|
318
|
+
$[71] = t37;
|
|
319
|
+
} else t37 = $[71];
|
|
320
|
+
let t38;
|
|
321
|
+
if ($[72] !== t37) {
|
|
322
|
+
t38 = /* @__PURE__ */ jsx("option", {
|
|
323
|
+
value: "groove",
|
|
324
|
+
children: t37
|
|
325
|
+
});
|
|
326
|
+
$[72] = t37;
|
|
327
|
+
$[73] = t38;
|
|
328
|
+
} else t38 = $[73];
|
|
329
|
+
let t39;
|
|
330
|
+
if ($[74] !== t) {
|
|
331
|
+
t39 = t("dialogs.imageProperties.borderStyles.ridge");
|
|
332
|
+
$[74] = t;
|
|
333
|
+
$[75] = t39;
|
|
334
|
+
} else t39 = $[75];
|
|
335
|
+
let t40;
|
|
336
|
+
if ($[76] !== t39) {
|
|
337
|
+
t40 = /* @__PURE__ */ jsx("option", {
|
|
338
|
+
value: "ridge",
|
|
339
|
+
children: t39
|
|
340
|
+
});
|
|
341
|
+
$[76] = t39;
|
|
342
|
+
$[77] = t40;
|
|
343
|
+
} else t40 = $[77];
|
|
344
|
+
let t41;
|
|
345
|
+
if ($[78] !== t) {
|
|
346
|
+
t41 = t("dialogs.imageProperties.borderStyles.inset");
|
|
347
|
+
$[78] = t;
|
|
348
|
+
$[79] = t41;
|
|
349
|
+
} else t41 = $[79];
|
|
350
|
+
let t42;
|
|
351
|
+
if ($[80] !== t41) {
|
|
352
|
+
t42 = /* @__PURE__ */ jsx("option", {
|
|
353
|
+
value: "inset",
|
|
354
|
+
children: t41
|
|
355
|
+
});
|
|
356
|
+
$[80] = t41;
|
|
357
|
+
$[81] = t42;
|
|
358
|
+
} else t42 = $[81];
|
|
359
|
+
let t43;
|
|
360
|
+
if ($[82] !== t) {
|
|
361
|
+
t43 = t("dialogs.imageProperties.borderStyles.outset");
|
|
362
|
+
$[82] = t;
|
|
363
|
+
$[83] = t43;
|
|
364
|
+
} else t43 = $[83];
|
|
365
|
+
let t44;
|
|
366
|
+
if ($[84] !== t43) {
|
|
367
|
+
t44 = /* @__PURE__ */ jsx("option", {
|
|
368
|
+
value: "outset",
|
|
369
|
+
children: t43
|
|
370
|
+
});
|
|
371
|
+
$[84] = t43;
|
|
372
|
+
$[85] = t44;
|
|
373
|
+
} else t44 = $[85];
|
|
374
|
+
let t45;
|
|
375
|
+
if ($[86] !== borderStyle || $[87] !== fieldIds.borderStyle || $[88] !== t30 || $[89] !== t32 || $[90] !== t34 || $[91] !== t36 || $[92] !== t38 || $[93] !== t40 || $[94] !== t42 || $[95] !== t44) {
|
|
376
|
+
t45 = /* @__PURE__ */ jsxs("select", {
|
|
377
|
+
id: t27,
|
|
378
|
+
className: "border-input bg-background text-foreground flex-1 rounded border px-1.5 py-1 text-xs outline-none",
|
|
379
|
+
value: borderStyle,
|
|
380
|
+
onChange: t28,
|
|
381
|
+
children: [
|
|
382
|
+
t30,
|
|
383
|
+
t32,
|
|
384
|
+
t34,
|
|
385
|
+
t36,
|
|
386
|
+
t38,
|
|
387
|
+
t40,
|
|
388
|
+
t42,
|
|
389
|
+
t44
|
|
390
|
+
]
|
|
391
|
+
});
|
|
392
|
+
$[86] = borderStyle;
|
|
393
|
+
$[87] = fieldIds.borderStyle;
|
|
394
|
+
$[88] = t30;
|
|
395
|
+
$[89] = t32;
|
|
396
|
+
$[90] = t34;
|
|
397
|
+
$[91] = t36;
|
|
398
|
+
$[92] = t38;
|
|
399
|
+
$[93] = t40;
|
|
400
|
+
$[94] = t42;
|
|
401
|
+
$[95] = t44;
|
|
402
|
+
$[96] = t45;
|
|
403
|
+
} else t45 = $[96];
|
|
404
|
+
let t46;
|
|
405
|
+
if ($[97] !== t26 || $[98] !== t45) {
|
|
406
|
+
t46 = /* @__PURE__ */ jsxs("div", {
|
|
407
|
+
className: "flex items-center gap-2",
|
|
408
|
+
children: [t26, t45]
|
|
409
|
+
});
|
|
410
|
+
$[97] = t26;
|
|
411
|
+
$[98] = t45;
|
|
412
|
+
$[99] = t46;
|
|
413
|
+
} else t46 = $[99];
|
|
414
|
+
const t47 = fieldIds.borderColor;
|
|
415
|
+
let t48;
|
|
416
|
+
if ($[100] !== t) {
|
|
417
|
+
t48 = t("dialogs.imageProperties.color");
|
|
418
|
+
$[100] = t;
|
|
419
|
+
$[101] = t48;
|
|
420
|
+
} else t48 = $[101];
|
|
421
|
+
let t49;
|
|
422
|
+
if ($[102] !== fieldIds.borderColor || $[103] !== t48) {
|
|
423
|
+
t49 = /* @__PURE__ */ jsx("label", {
|
|
424
|
+
htmlFor: t47,
|
|
425
|
+
className: "w-[60px] text-muted-foreground text-xs",
|
|
426
|
+
children: t48
|
|
427
|
+
});
|
|
428
|
+
$[102] = fieldIds.borderColor;
|
|
429
|
+
$[103] = t48;
|
|
430
|
+
$[104] = t49;
|
|
431
|
+
} else t49 = $[104];
|
|
432
|
+
let t50;
|
|
433
|
+
if ($[105] === Symbol.for("react.memo_cache_sentinel")) {
|
|
434
|
+
t50 = (e_2) => setBorderColor(e_2.target.value);
|
|
435
|
+
$[105] = t50;
|
|
436
|
+
} else t50 = $[105];
|
|
437
|
+
let t51;
|
|
438
|
+
if ($[106] !== borderColor || $[107] !== fieldIds.borderColor) {
|
|
439
|
+
t51 = /* @__PURE__ */ jsx("input", {
|
|
440
|
+
id: fieldIds.borderColor,
|
|
441
|
+
type: "color",
|
|
442
|
+
value: borderColor,
|
|
443
|
+
onChange: t50,
|
|
444
|
+
className: "border-input h-6 w-8 cursor-pointer rounded border p-0"
|
|
445
|
+
});
|
|
446
|
+
$[106] = borderColor;
|
|
447
|
+
$[107] = fieldIds.borderColor;
|
|
448
|
+
$[108] = t51;
|
|
449
|
+
} else t51 = $[108];
|
|
450
|
+
let t52;
|
|
451
|
+
if ($[109] === Symbol.for("react.memo_cache_sentinel")) {
|
|
452
|
+
t52 = (e_3) => setBorderColor(e_3.target.value);
|
|
453
|
+
$[109] = t52;
|
|
454
|
+
} else t52 = $[109];
|
|
455
|
+
let t53;
|
|
456
|
+
if ($[110] !== borderColor) {
|
|
457
|
+
t53 = /* @__PURE__ */ jsx("input", {
|
|
458
|
+
type: "text",
|
|
459
|
+
className: "border-input bg-background text-foreground flex-1 rounded border px-1.5 py-1 text-xs outline-none max-w-[90px]",
|
|
460
|
+
value: borderColor,
|
|
461
|
+
onChange: t52
|
|
462
|
+
});
|
|
463
|
+
$[110] = borderColor;
|
|
464
|
+
$[111] = t53;
|
|
465
|
+
} else t53 = $[111];
|
|
466
|
+
let t54;
|
|
467
|
+
if ($[112] !== t49 || $[113] !== t51 || $[114] !== t53) {
|
|
468
|
+
t54 = /* @__PURE__ */ jsxs("div", {
|
|
469
|
+
className: "flex items-center gap-2",
|
|
470
|
+
children: [
|
|
471
|
+
t49,
|
|
472
|
+
t51,
|
|
473
|
+
t53
|
|
474
|
+
]
|
|
475
|
+
});
|
|
476
|
+
$[112] = t49;
|
|
477
|
+
$[113] = t51;
|
|
478
|
+
$[114] = t53;
|
|
479
|
+
$[115] = t54;
|
|
480
|
+
} else t54 = $[115];
|
|
481
|
+
let t55;
|
|
482
|
+
if ($[116] !== borderColor || $[117] !== borderStyle || $[118] !== borderWidth || $[119] !== t) {
|
|
483
|
+
t55 = borderWidth > 0 && /* @__PURE__ */ jsx("div", {
|
|
484
|
+
className: "text-muted-foreground mt-1 rounded p-2 text-center text-[11px]",
|
|
485
|
+
style: { border: `${borderWidth}px ${borderStyle} ${borderColor}` },
|
|
486
|
+
children: t("dialogs.imageProperties.preview")
|
|
487
|
+
});
|
|
488
|
+
$[116] = borderColor;
|
|
489
|
+
$[117] = borderStyle;
|
|
490
|
+
$[118] = borderWidth;
|
|
491
|
+
$[119] = t;
|
|
492
|
+
$[120] = t55;
|
|
493
|
+
} else t55 = $[120];
|
|
494
|
+
let t56;
|
|
495
|
+
if ($[121] !== t16 || $[122] !== t23 || $[123] !== t46 || $[124] !== t54 || $[125] !== t55) {
|
|
496
|
+
t56 = /* @__PURE__ */ jsxs("div", {
|
|
497
|
+
className: "flex flex-col gap-2",
|
|
498
|
+
children: [
|
|
499
|
+
t16,
|
|
500
|
+
t23,
|
|
501
|
+
t46,
|
|
502
|
+
t54,
|
|
503
|
+
t55
|
|
504
|
+
]
|
|
505
|
+
});
|
|
506
|
+
$[121] = t16;
|
|
507
|
+
$[122] = t23;
|
|
508
|
+
$[123] = t46;
|
|
509
|
+
$[124] = t54;
|
|
510
|
+
$[125] = t55;
|
|
511
|
+
$[126] = t56;
|
|
512
|
+
} else t56 = $[126];
|
|
513
|
+
let t57;
|
|
514
|
+
if ($[127] !== t14 || $[128] !== t56) {
|
|
515
|
+
t57 = /* @__PURE__ */ jsxs("div", {
|
|
516
|
+
className: "flex flex-col gap-4 px-5 py-4",
|
|
517
|
+
children: [t14, t56]
|
|
518
|
+
});
|
|
519
|
+
$[127] = t14;
|
|
520
|
+
$[128] = t56;
|
|
521
|
+
$[129] = t57;
|
|
522
|
+
} else t57 = $[129];
|
|
523
|
+
let t58;
|
|
524
|
+
if ($[130] !== t) {
|
|
525
|
+
t58 = t("common.cancel");
|
|
526
|
+
$[130] = t;
|
|
527
|
+
$[131] = t58;
|
|
528
|
+
} else t58 = $[131];
|
|
529
|
+
let t59;
|
|
530
|
+
if ($[132] !== DialogClose || $[133] !== t58) {
|
|
531
|
+
t59 = /* @__PURE__ */ jsx(DialogClose, {
|
|
532
|
+
className: "border-input rounded border px-4 py-1.5 text-[13px]",
|
|
533
|
+
children: t58
|
|
534
|
+
});
|
|
535
|
+
$[132] = DialogClose;
|
|
536
|
+
$[133] = t58;
|
|
537
|
+
$[134] = t59;
|
|
538
|
+
} else t59 = $[134];
|
|
539
|
+
let t60;
|
|
540
|
+
if ($[135] !== t) {
|
|
541
|
+
t60 = t("common.apply");
|
|
542
|
+
$[135] = t;
|
|
543
|
+
$[136] = t60;
|
|
544
|
+
} else t60 = $[136];
|
|
545
|
+
let t61;
|
|
546
|
+
if ($[137] !== handleApply || $[138] !== t60) {
|
|
547
|
+
t61 = /* @__PURE__ */ jsx("button", {
|
|
548
|
+
className: "bg-primary text-primary-foreground rounded px-4 py-1.5 text-[13px] font-medium",
|
|
549
|
+
onClick: handleApply,
|
|
550
|
+
type: "button",
|
|
551
|
+
children: t60
|
|
552
|
+
});
|
|
553
|
+
$[137] = handleApply;
|
|
554
|
+
$[138] = t60;
|
|
555
|
+
$[139] = t61;
|
|
556
|
+
} else t61 = $[139];
|
|
557
|
+
let t62;
|
|
558
|
+
if ($[140] !== t59 || $[141] !== t61) {
|
|
559
|
+
t62 = /* @__PURE__ */ jsxs("div", {
|
|
560
|
+
className: "flex justify-end gap-2 border-t px-5 py-3",
|
|
561
|
+
children: [t59, t61]
|
|
562
|
+
});
|
|
563
|
+
$[140] = t59;
|
|
564
|
+
$[141] = t61;
|
|
565
|
+
$[142] = t62;
|
|
566
|
+
} else t62 = $[142];
|
|
567
|
+
let t63;
|
|
568
|
+
if ($[143] !== DialogPopup || $[144] !== t57 || $[145] !== t62 || $[146] !== t8) {
|
|
569
|
+
t63 = /* @__PURE__ */ jsxs(DialogPopup, {
|
|
570
|
+
className: "bg-popover fixed start-1/2 top-1/2 z-[10001] w-full max-w-[440px] min-w-[380px] -translate-x-1/2 -translate-y-1/2 rounded-lg border shadow-xl",
|
|
571
|
+
children: [
|
|
572
|
+
t8,
|
|
573
|
+
t57,
|
|
574
|
+
t62
|
|
575
|
+
]
|
|
576
|
+
});
|
|
577
|
+
$[143] = DialogPopup;
|
|
578
|
+
$[144] = t57;
|
|
579
|
+
$[145] = t62;
|
|
580
|
+
$[146] = t8;
|
|
581
|
+
$[147] = t63;
|
|
582
|
+
} else t63 = $[147];
|
|
583
|
+
let t64;
|
|
584
|
+
if ($[148] !== DialogPortal || $[149] !== t6 || $[150] !== t63) {
|
|
585
|
+
t64 = /* @__PURE__ */ jsxs(DialogPortal, { children: [t6, t63] });
|
|
586
|
+
$[148] = DialogPortal;
|
|
587
|
+
$[149] = t6;
|
|
588
|
+
$[150] = t63;
|
|
589
|
+
$[151] = t64;
|
|
590
|
+
} else t64 = $[151];
|
|
591
|
+
let t65;
|
|
592
|
+
if ($[152] !== Dialog || $[153] !== handleOpenChange || $[154] !== isOpen || $[155] !== t64) {
|
|
593
|
+
t65 = /* @__PURE__ */ jsx(Dialog, {
|
|
594
|
+
open: isOpen,
|
|
595
|
+
onOpenChange: handleOpenChange,
|
|
596
|
+
children: t64
|
|
597
|
+
});
|
|
598
|
+
$[152] = Dialog;
|
|
599
|
+
$[153] = handleOpenChange;
|
|
600
|
+
$[154] = isOpen;
|
|
601
|
+
$[155] = t64;
|
|
602
|
+
$[156] = t65;
|
|
603
|
+
} else t65 = $[156];
|
|
604
|
+
return t65;
|
|
605
|
+
}
|
|
606
|
+
//#endregion
|
|
607
|
+
export { ImagePropertiesDialog_exports as n, ImagePropertiesDialog as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-BBjsoOtd.js";
|
|
2
|
-
import { r as useFolioUI } from "./folio-ui-
|
|
2
|
+
import { r as useFolioUI } from "./folio-ui-rCHqCEG6.js";
|
|
3
3
|
import { c as DIALOG_SECONDARY_BUTTON_CLASS, i as DIALOG_INPUT_CLASS, l as DIALOG_TITLE_CLASS, n as DIALOG_BODY_CLASS, o as DIALOG_POPUP_CLASS, r as DIALOG_FOOTER_CLASS, s as DIALOG_PRIMARY_BUTTON_CLASS, t as DIALOG_BACKDROP_CLASS, u as useCloseOnDialogOpenChange } from "./dialogChrome-BoGYPgeu.js";
|
|
4
4
|
import { c } from "react-compiler-runtime";
|
|
5
5
|
import { useState } from "react";
|