@rockshin/tao-ui 0.0.19 → 0.0.21

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.
@@ -2,6 +2,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { c } from "react/compiler-runtime";
3
3
  import { useEffect, useRef, useState } from "react";
4
4
  import { TaoPortalScope } from "../../provider/tao-provider.js";
5
+ import { preventParentOutsideDismiss } from "../../utils/portal.js";
5
6
  import { cx } from "../../utils/semantic.js";
6
7
  import "./drawer.css";
7
8
  import * as __rspack_external__radix_ui_react_dialog_dabd8325 from "@radix-ui/react-dialog";
@@ -11,7 +12,7 @@ const SIZE_PRESET = {
11
12
  };
12
13
  const MIN_DRAG_SIZE = 200;
13
14
  function Drawer(t0) {
14
- const $ = c(90);
15
+ const $ = c(87);
15
16
  const { open, onClose, title, extra, footer, placement: t1, size, width, height, closable: t2, closeIcon, maskClosable: t3, mask: t4, keyboard: t5, resizable, afterOpenChange, afterClose, destroyOnHidden: t6, children, classNames, styles: stylesProp } = t0;
16
17
  const placement = void 0 === t1 ? "right" : t1;
17
18
  const closable = void 0 === t2 ? true : t2;
@@ -139,53 +140,40 @@ function Drawer(t0) {
139
140
  $[22] = t13;
140
141
  } else t13 = $[22];
141
142
  let t14;
142
- if ($[23] !== classNames?.overlay || $[24] !== forceMount || $[25] !== mask || $[26] !== stylesProp?.overlay) {
143
+ if ($[23] !== classNames?.overlay || $[24] !== forceMount || $[25] !== mask || $[26] !== maskClosable || $[27] !== onClose || $[28] !== stylesProp?.overlay) {
143
144
  t14 = mask && /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_dialog_dabd8325.Overlay, {
144
145
  forceMount: forceMount,
145
146
  "data-tao-drawer-overlay": "",
146
147
  className: cx(classNames?.overlay),
147
- style: stylesProp?.overlay
148
+ style: stylesProp?.overlay,
149
+ onClick: maskClosable ? onClose : void 0
148
150
  });
149
151
  $[23] = classNames?.overlay;
150
152
  $[24] = forceMount;
151
153
  $[25] = mask;
152
- $[26] = stylesProp?.overlay;
153
- $[27] = t14;
154
- } else t14 = $[27];
154
+ $[26] = maskClosable;
155
+ $[27] = onClose;
156
+ $[28] = stylesProp?.overlay;
157
+ $[29] = t14;
158
+ } else t14 = $[29];
155
159
  const t15 = classNames?.root;
156
160
  let t16;
157
- if ($[28] !== t15) {
161
+ if ($[30] !== t15) {
158
162
  t16 = cx(t15);
159
- $[28] = t15;
160
- $[29] = t16;
161
- } else t16 = $[29];
163
+ $[30] = t15;
164
+ $[31] = t16;
165
+ } else t16 = $[31];
162
166
  let t17;
163
- if ($[30] !== keyboard) {
167
+ if ($[32] !== keyboard) {
164
168
  t17 = (e_2)=>{
165
169
  if (!keyboard) e_2.preventDefault();
166
170
  };
167
- $[30] = keyboard;
168
- $[31] = t17;
169
- } else t17 = $[31];
171
+ $[32] = keyboard;
172
+ $[33] = t17;
173
+ } else t17 = $[33];
170
174
  let t18;
171
- let t19;
172
- if ($[32] !== maskClosable) {
173
- t18 = (e_3)=>{
174
- if (!maskClosable) e_3.preventDefault();
175
- };
176
- t19 = (e_4)=>{
177
- if (!maskClosable) e_4.preventDefault();
178
- };
179
- $[32] = maskClosable;
180
- $[33] = t18;
181
- $[34] = t19;
182
- } else {
183
- t18 = $[33];
184
- t19 = $[34];
185
- }
186
- let t20;
187
- if ($[35] !== classNames?.dragger || $[36] !== isResizable || $[37] !== onDraggerPointerDown || $[38] !== onDraggerPointerMove || $[39] !== onDraggerPointerUp || $[40] !== placement || $[41] !== stylesProp?.dragger) {
188
- t20 = isResizable && /*#__PURE__*/ jsx("div", {
175
+ if ($[34] !== classNames?.dragger || $[35] !== isResizable || $[36] !== onDraggerPointerDown || $[37] !== onDraggerPointerMove || $[38] !== onDraggerPointerUp || $[39] !== placement || $[40] !== stylesProp?.dragger) {
176
+ t18 = isResizable && /*#__PURE__*/ jsx("div", {
189
177
  "data-tao-drawer-dragger": "",
190
178
  "data-tao-placement": placement,
191
179
  className: cx(classNames?.dragger),
@@ -194,18 +182,18 @@ function Drawer(t0) {
194
182
  onPointerMove: onDraggerPointerMove,
195
183
  onPointerUp: onDraggerPointerUp
196
184
  });
197
- $[35] = classNames?.dragger;
198
- $[36] = isResizable;
199
- $[37] = onDraggerPointerDown;
200
- $[38] = onDraggerPointerMove;
201
- $[39] = onDraggerPointerUp;
202
- $[40] = placement;
203
- $[41] = stylesProp?.dragger;
204
- $[42] = t20;
205
- } else t20 = $[42];
206
- let t21;
207
- if ($[43] !== classNames?.close || $[44] !== classNames?.extra || $[45] !== classNames?.header || $[46] !== classNames?.title || $[47] !== closable || $[48] !== closeIcon || $[49] !== extra || $[50] !== onClose || $[51] !== showHeader || $[52] !== stylesProp?.close || $[53] !== stylesProp?.extra || $[54] !== stylesProp?.header || $[55] !== stylesProp?.title || $[56] !== title) {
208
- t21 = showHeader && /*#__PURE__*/ jsxs("div", {
185
+ $[34] = classNames?.dragger;
186
+ $[35] = isResizable;
187
+ $[36] = onDraggerPointerDown;
188
+ $[37] = onDraggerPointerMove;
189
+ $[38] = onDraggerPointerUp;
190
+ $[39] = placement;
191
+ $[40] = stylesProp?.dragger;
192
+ $[41] = t18;
193
+ } else t18 = $[41];
194
+ let t19;
195
+ if ($[42] !== classNames?.close || $[43] !== classNames?.extra || $[44] !== classNames?.header || $[45] !== classNames?.title || $[46] !== closable || $[47] !== closeIcon || $[48] !== extra || $[49] !== onClose || $[50] !== showHeader || $[51] !== stylesProp?.close || $[52] !== stylesProp?.extra || $[53] !== stylesProp?.header || $[54] !== stylesProp?.title || $[55] !== title) {
196
+ t19 = showHeader && /*#__PURE__*/ jsxs("div", {
209
197
  "data-tao-drawer-header": "",
210
198
  className: cx(classNames?.header),
211
199
  style: stylesProp?.header,
@@ -243,59 +231,59 @@ function Drawer(t0) {
243
231
  })
244
232
  ]
245
233
  });
246
- $[43] = classNames?.close;
247
- $[44] = classNames?.extra;
248
- $[45] = classNames?.header;
249
- $[46] = classNames?.title;
250
- $[47] = closable;
251
- $[48] = closeIcon;
252
- $[49] = extra;
253
- $[50] = onClose;
254
- $[51] = showHeader;
255
- $[52] = stylesProp?.close;
256
- $[53] = stylesProp?.extra;
257
- $[54] = stylesProp?.header;
258
- $[55] = stylesProp?.title;
259
- $[56] = title;
260
- $[57] = t21;
261
- } else t21 = $[57];
262
- const t22 = classNames?.body;
234
+ $[42] = classNames?.close;
235
+ $[43] = classNames?.extra;
236
+ $[44] = classNames?.header;
237
+ $[45] = classNames?.title;
238
+ $[46] = closable;
239
+ $[47] = closeIcon;
240
+ $[48] = extra;
241
+ $[49] = onClose;
242
+ $[50] = showHeader;
243
+ $[51] = stylesProp?.close;
244
+ $[52] = stylesProp?.extra;
245
+ $[53] = stylesProp?.header;
246
+ $[54] = stylesProp?.title;
247
+ $[55] = title;
248
+ $[56] = t19;
249
+ } else t19 = $[56];
250
+ const t20 = classNames?.body;
251
+ let t21;
252
+ if ($[57] !== t20) {
253
+ t21 = cx(t20);
254
+ $[57] = t20;
255
+ $[58] = t21;
256
+ } else t21 = $[58];
257
+ const t22 = stylesProp?.body;
263
258
  let t23;
264
- if ($[58] !== t22) {
265
- t23 = cx(t22);
266
- $[58] = t22;
267
- $[59] = t23;
268
- } else t23 = $[59];
269
- const t24 = stylesProp?.body;
270
- let t25;
271
- if ($[60] !== children || $[61] !== t23 || $[62] !== t24) {
272
- t25 = /*#__PURE__*/ jsx("div", {
259
+ if ($[59] !== children || $[60] !== t21 || $[61] !== t22) {
260
+ t23 = /*#__PURE__*/ jsx("div", {
273
261
  "data-tao-drawer-body": "",
274
- className: t23,
275
- style: t24,
262
+ className: t21,
263
+ style: t22,
276
264
  children: children
277
265
  });
278
- $[60] = children;
279
- $[61] = t23;
280
- $[62] = t24;
281
- $[63] = t25;
282
- } else t25 = $[63];
283
- let t26;
284
- if ($[64] !== classNames?.footer || $[65] !== footer || $[66] !== stylesProp?.footer) {
285
- t26 = null != footer && /*#__PURE__*/ jsx("div", {
266
+ $[59] = children;
267
+ $[60] = t21;
268
+ $[61] = t22;
269
+ $[62] = t23;
270
+ } else t23 = $[62];
271
+ let t24;
272
+ if ($[63] !== classNames?.footer || $[64] !== footer || $[65] !== stylesProp?.footer) {
273
+ t24 = null != footer && /*#__PURE__*/ jsx("div", {
286
274
  "data-tao-drawer-footer": "",
287
275
  className: cx(classNames?.footer),
288
276
  style: stylesProp?.footer,
289
277
  children: footer
290
278
  });
291
- $[64] = classNames?.footer;
292
- $[65] = footer;
293
- $[66] = stylesProp?.footer;
294
- $[67] = t26;
295
- } else t26 = $[67];
296
- let t27;
297
- if ($[68] !== contentStyle || $[69] !== forceMount || $[70] !== placement || $[71] !== t16 || $[72] !== t17 || $[73] !== t18 || $[74] !== t19 || $[75] !== t20 || $[76] !== t21 || $[77] !== t25 || $[78] !== t26) {
298
- t27 = /*#__PURE__*/ jsxs(__rspack_external__radix_ui_react_dialog_dabd8325.Content, {
279
+ $[63] = classNames?.footer;
280
+ $[64] = footer;
281
+ $[65] = stylesProp?.footer;
282
+ $[66] = t24;
283
+ } else t24 = $[66];
284
+ let t25;
285
+ if ($[67] !== contentStyle || $[68] !== forceMount || $[69] !== placement || $[70] !== t16 || $[71] !== t17 || $[72] !== t18 || $[73] !== t19 || $[74] !== t23 || $[75] !== t24) {
286
+ t25 = /*#__PURE__*/ jsxs(__rspack_external__radix_ui_react_dialog_dabd8325.Content, {
299
287
  ref: contentRef,
300
288
  forceMount: forceMount,
301
289
  "data-tao-drawer": "",
@@ -304,63 +292,61 @@ function Drawer(t0) {
304
292
  className: t16,
305
293
  "aria-describedby": void 0,
306
294
  onEscapeKeyDown: t17,
307
- onPointerDownOutside: t18,
308
- onInteractOutside: t19,
295
+ onPointerDownOutside: preventParentOutsideDismiss,
296
+ onInteractOutside: preventParentOutsideDismiss,
309
297
  children: [
310
- t20,
311
- t21,
312
- t25,
313
- t26
298
+ t18,
299
+ t19,
300
+ t23,
301
+ t24
314
302
  ]
315
303
  });
316
- $[68] = contentStyle;
317
- $[69] = forceMount;
318
- $[70] = placement;
319
- $[71] = t16;
320
- $[72] = t17;
321
- $[73] = t18;
322
- $[74] = t19;
323
- $[75] = t20;
324
- $[76] = t21;
325
- $[77] = t25;
326
- $[78] = t26;
327
- $[79] = t27;
328
- } else t27 = $[79];
329
- let t28;
330
- if ($[80] !== t14 || $[81] !== t27) {
331
- t28 = /*#__PURE__*/ jsxs(TaoPortalScope, {
304
+ $[67] = contentStyle;
305
+ $[68] = forceMount;
306
+ $[69] = placement;
307
+ $[70] = t16;
308
+ $[71] = t17;
309
+ $[72] = t18;
310
+ $[73] = t19;
311
+ $[74] = t23;
312
+ $[75] = t24;
313
+ $[76] = t25;
314
+ } else t25 = $[76];
315
+ let t26;
316
+ if ($[77] !== t14 || $[78] !== t25) {
317
+ t26 = /*#__PURE__*/ jsxs(TaoPortalScope, {
332
318
  children: [
333
319
  t14,
334
- t27
320
+ t25
335
321
  ]
336
322
  });
337
- $[80] = t14;
338
- $[81] = t27;
339
- $[82] = t28;
340
- } else t28 = $[82];
341
- let t29;
342
- if ($[83] !== forceMount || $[84] !== t28) {
343
- t29 = /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_dialog_dabd8325.Portal, {
323
+ $[77] = t14;
324
+ $[78] = t25;
325
+ $[79] = t26;
326
+ } else t26 = $[79];
327
+ let t27;
328
+ if ($[80] !== forceMount || $[81] !== t26) {
329
+ t27 = /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_dialog_dabd8325.Portal, {
344
330
  forceMount: forceMount,
345
- children: t28
331
+ children: t26
346
332
  });
347
- $[83] = forceMount;
348
- $[84] = t28;
349
- $[85] = t29;
350
- } else t29 = $[85];
351
- let t30;
352
- if ($[86] !== open || $[87] !== t13 || $[88] !== t29) {
353
- t30 = /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_dialog_dabd8325.Root, {
333
+ $[80] = forceMount;
334
+ $[81] = t26;
335
+ $[82] = t27;
336
+ } else t27 = $[82];
337
+ let t28;
338
+ if ($[83] !== open || $[84] !== t13 || $[85] !== t27) {
339
+ t28 = /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_dialog_dabd8325.Root, {
354
340
  open: open,
355
341
  onOpenChange: t13,
356
- children: t29
342
+ children: t27
357
343
  });
358
- $[86] = open;
359
- $[87] = t13;
360
- $[88] = t29;
361
- $[89] = t30;
362
- } else t30 = $[89];
363
- return t30;
344
+ $[83] = open;
345
+ $[84] = t13;
346
+ $[85] = t27;
347
+ $[86] = t28;
348
+ } else t28 = $[86];
349
+ return t28;
364
350
  }
365
351
  function CloseIcon() {
366
352
  const $ = c(1);
@@ -67,20 +67,35 @@
67
67
  display: flex;
68
68
  }
69
69
 
70
- [data-tao-prefix] {
70
+ [data-tao-prefix], [data-tao-input] [data-tao-prefix] + input {
71
71
  padding-inline-start: var(--tao-padding-sm);
72
72
  }
73
73
 
74
- [data-tao-input] [data-tao-prefix] + input {
75
- padding-inline-start: var(--tao-size-unit);
74
+ [data-tao-prefix] svg, [data-tao-suffix] svg {
75
+ width: 16px;
76
+ height: 16px;
76
77
  }
77
78
 
78
- [data-tao-suffix] {
79
- padding-inline-end: var(--tao-padding-sm);
79
+ [data-tao-input]:has([data-tao-prefix] svg) [data-tao-prefix] {
80
+ inset-inline-start: var(--tao-padding-sm);
81
+ padding: 0;
82
+ position: absolute;
83
+ top: 50%;
84
+ transform: translateY(-50%);
80
85
  }
81
86
 
82
- [data-tao-prefix] svg, [data-tao-suffix] svg {
83
- width: 16px;
84
- height: 16px;
87
+ [data-tao-input]:has([data-tao-prefix] svg) [data-tao-prefix] svg {
88
+ position: static;
89
+ transform: none;
90
+ }
91
+
92
+ [data-tao-input]:has([data-tao-prefix] svg) input {
93
+ padding-inline-start: calc(var(--tao-padding-sm) +
94
+ 16px +
95
+ var(--tao-padding-sm));
96
+ }
97
+
98
+ [data-tao-suffix] {
99
+ padding-inline-end: var(--tao-padding-sm);
85
100
  }
86
101
 
@@ -2,12 +2,13 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
2
  import { c } from "react/compiler-runtime";
3
3
  import { useEffect, useRef } from "react";
4
4
  import { TaoPortalScope } from "../../provider/tao-provider.js";
5
+ import { preventParentOutsideDismiss } from "../../utils/portal.js";
5
6
  import { cx } from "../../utils/semantic.js";
6
7
  import { Button } from "../button/button.js";
7
8
  import "./modal.css";
8
9
  import * as __rspack_external__radix_ui_react_dialog_dabd8325 from "@radix-ui/react-dialog";
9
10
  function Modal(t0) {
10
- const $ = c(87);
11
+ const $ = c(83);
11
12
  const { open, onClose, title, footer, onOk, okText: t1, cancelText: t2, confirmLoading, okButtonProps, cancelButtonProps, width: t3, centered: t4, closable: t5, maskClosable: t6, keyboard: t7, afterClose, destroyOnHidden: t8, children, classNames, styles: stylesProp } = t0;
12
13
  const okText = void 0 === t1 ? "OK" : t1;
13
14
  const cancelText = void 0 === t2 ? "Cancel" : t2;
@@ -141,55 +142,42 @@ function Modal(t0) {
141
142
  $[31] = t21;
142
143
  } else t21 = $[31];
143
144
  const t22 = stylesProp?.overlay;
144
- let t23;
145
- if ($[32] !== forceMount || $[33] !== t21 || $[34] !== t22) {
146
- t23 = /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_dialog_dabd8325.Overlay, {
145
+ const t23 = maskClosable ? onClose : void 0;
146
+ let t24;
147
+ if ($[32] !== forceMount || $[33] !== t21 || $[34] !== t22 || $[35] !== t23) {
148
+ t24 = /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_dialog_dabd8325.Overlay, {
147
149
  forceMount: forceMount,
148
150
  "data-tao-modal-overlay": "",
149
151
  className: t21,
150
- style: t22
152
+ style: t22,
153
+ onClick: t23
151
154
  });
152
155
  $[32] = forceMount;
153
156
  $[33] = t21;
154
157
  $[34] = t22;
155
158
  $[35] = t23;
156
- } else t23 = $[35];
157
- const t24 = centered ? "" : void 0;
158
- const t25 = open ? "" : void 0;
159
- const t26 = classNames?.root;
160
- let t27;
161
- if ($[36] !== t26) {
162
- t27 = cx(t26);
163
- $[36] = t26;
164
- $[37] = t27;
165
- } else t27 = $[37];
159
+ $[36] = t24;
160
+ } else t24 = $[36];
161
+ const t25 = centered ? "" : void 0;
162
+ const t26 = open ? "" : void 0;
163
+ const t27 = classNames?.root;
166
164
  let t28;
167
- if ($[38] !== keyboard) {
168
- t28 = (e)=>{
165
+ if ($[37] !== t27) {
166
+ t28 = cx(t27);
167
+ $[37] = t27;
168
+ $[38] = t28;
169
+ } else t28 = $[38];
170
+ let t29;
171
+ if ($[39] !== keyboard) {
172
+ t29 = (e)=>{
169
173
  if (!keyboard) e.preventDefault();
170
174
  };
171
- $[38] = keyboard;
172
- $[39] = t28;
173
- } else t28 = $[39];
174
- let t29;
175
+ $[39] = keyboard;
176
+ $[40] = t29;
177
+ } else t29 = $[40];
175
178
  let t30;
176
- if ($[40] !== maskClosable) {
177
- t29 = (e_0)=>{
178
- if (!maskClosable) e_0.preventDefault();
179
- };
180
- t30 = (e_1)=>{
181
- if (!maskClosable) e_1.preventDefault();
182
- };
183
- $[40] = maskClosable;
184
- $[41] = t29;
185
- $[42] = t30;
186
- } else {
187
- t29 = $[41];
188
- t30 = $[42];
189
- }
190
- let t31;
191
- if ($[43] !== classNames?.close || $[44] !== classNames?.header || $[45] !== classNames?.title || $[46] !== closable || $[47] !== onClose || $[48] !== stylesProp?.close || $[49] !== stylesProp?.header || $[50] !== stylesProp?.title || $[51] !== title) {
192
- t31 = (null != title || closable) && /*#__PURE__*/ jsxs("div", {
179
+ if ($[41] !== classNames?.close || $[42] !== classNames?.header || $[43] !== classNames?.title || $[44] !== closable || $[45] !== onClose || $[46] !== stylesProp?.close || $[47] !== stylesProp?.header || $[48] !== stylesProp?.title || $[49] !== title) {
180
+ t30 = (null != title || closable) && /*#__PURE__*/ jsxs("div", {
193
181
  "data-tao-modal-header": "",
194
182
  className: cx(classNames?.header),
195
183
  style: stylesProp?.header,
@@ -216,127 +204,125 @@ function Modal(t0) {
216
204
  })
217
205
  ]
218
206
  });
219
- $[43] = classNames?.close;
220
- $[44] = classNames?.header;
221
- $[45] = classNames?.title;
222
- $[46] = closable;
223
- $[47] = onClose;
224
- $[48] = stylesProp?.close;
225
- $[49] = stylesProp?.header;
226
- $[50] = stylesProp?.title;
227
- $[51] = title;
228
- $[52] = t31;
229
- } else t31 = $[52];
230
- const t32 = classNames?.body;
231
- let t33;
232
- if ($[53] !== t32) {
233
- t33 = cx(t32);
234
- $[53] = t32;
235
- $[54] = t33;
236
- } else t33 = $[54];
237
- const t34 = stylesProp?.body;
238
- let t35;
239
- if ($[55] !== children || $[56] !== t33 || $[57] !== t34) {
240
- t35 = /*#__PURE__*/ jsx("div", {
207
+ $[41] = classNames?.close;
208
+ $[42] = classNames?.header;
209
+ $[43] = classNames?.title;
210
+ $[44] = closable;
211
+ $[45] = onClose;
212
+ $[46] = stylesProp?.close;
213
+ $[47] = stylesProp?.header;
214
+ $[48] = stylesProp?.title;
215
+ $[49] = title;
216
+ $[50] = t30;
217
+ } else t30 = $[50];
218
+ const t31 = classNames?.body;
219
+ let t32;
220
+ if ($[51] !== t31) {
221
+ t32 = cx(t31);
222
+ $[51] = t31;
223
+ $[52] = t32;
224
+ } else t32 = $[52];
225
+ const t33 = stylesProp?.body;
226
+ let t34;
227
+ if ($[53] !== children || $[54] !== t32 || $[55] !== t33) {
228
+ t34 = /*#__PURE__*/ jsx("div", {
241
229
  "data-tao-modal-body": "",
242
- className: t33,
243
- style: t34,
230
+ className: t32,
231
+ style: t33,
244
232
  children: children
245
233
  });
246
- $[55] = children;
247
- $[56] = t33;
248
- $[57] = t34;
249
- $[58] = t35;
250
- } else t35 = $[58];
251
- let t36;
252
- if ($[59] !== classNames?.footer || $[60] !== footerContent || $[61] !== stylesProp?.footer) {
253
- t36 = null != footerContent && /*#__PURE__*/ jsx("div", {
234
+ $[53] = children;
235
+ $[54] = t32;
236
+ $[55] = t33;
237
+ $[56] = t34;
238
+ } else t34 = $[56];
239
+ let t35;
240
+ if ($[57] !== classNames?.footer || $[58] !== footerContent || $[59] !== stylesProp?.footer) {
241
+ t35 = null != footerContent && /*#__PURE__*/ jsx("div", {
254
242
  "data-tao-modal-footer": "",
255
243
  className: cx(classNames?.footer),
256
244
  style: stylesProp?.footer,
257
245
  children: footerContent
258
246
  });
259
- $[59] = classNames?.footer;
260
- $[60] = footerContent;
261
- $[61] = stylesProp?.footer;
262
- $[62] = t36;
263
- } else t36 = $[62];
264
- let t37;
265
- if ($[63] !== contentStyle || $[64] !== forceMount || $[65] !== t27 || $[66] !== t28 || $[67] !== t29 || $[68] !== t30 || $[69] !== t31 || $[70] !== t35 || $[71] !== t36) {
266
- t37 = /*#__PURE__*/ jsxs(__rspack_external__radix_ui_react_dialog_dabd8325.Content, {
247
+ $[57] = classNames?.footer;
248
+ $[58] = footerContent;
249
+ $[59] = stylesProp?.footer;
250
+ $[60] = t35;
251
+ } else t35 = $[60];
252
+ let t36;
253
+ if ($[61] !== contentStyle || $[62] !== forceMount || $[63] !== t28 || $[64] !== t29 || $[65] !== t30 || $[66] !== t34 || $[67] !== t35) {
254
+ t36 = /*#__PURE__*/ jsxs(__rspack_external__radix_ui_react_dialog_dabd8325.Content, {
267
255
  forceMount: forceMount,
268
256
  "data-tao-modal": "",
269
257
  style: contentStyle,
270
- className: t27,
258
+ className: t28,
271
259
  "aria-describedby": void 0,
272
- onEscapeKeyDown: t28,
273
- onPointerDownOutside: t29,
274
- onInteractOutside: t30,
260
+ onEscapeKeyDown: t29,
261
+ onPointerDownOutside: preventParentOutsideDismiss,
262
+ onInteractOutside: preventParentOutsideDismiss,
275
263
  children: [
276
- t31,
277
- t35,
278
- t36
264
+ t30,
265
+ t34,
266
+ t35
279
267
  ]
280
268
  });
281
- $[63] = contentStyle;
282
- $[64] = forceMount;
283
- $[65] = t27;
284
- $[66] = t28;
285
- $[67] = t29;
286
- $[68] = t30;
287
- $[69] = t31;
288
- $[70] = t35;
269
+ $[61] = contentStyle;
270
+ $[62] = forceMount;
271
+ $[63] = t28;
272
+ $[64] = t29;
273
+ $[65] = t30;
274
+ $[66] = t34;
275
+ $[67] = t35;
276
+ $[68] = t36;
277
+ } else t36 = $[68];
278
+ let t37;
279
+ if ($[69] !== t25 || $[70] !== t26 || $[71] !== t36) {
280
+ t37 = /*#__PURE__*/ jsx("div", {
281
+ "data-tao-modal-wrap": "",
282
+ "data-tao-centered": t25,
283
+ "data-tao-open": t26,
284
+ children: t36
285
+ });
286
+ $[69] = t25;
287
+ $[70] = t26;
289
288
  $[71] = t36;
290
289
  $[72] = t37;
291
290
  } else t37 = $[72];
292
291
  let t38;
293
- if ($[73] !== t24 || $[74] !== t25 || $[75] !== t37) {
294
- t38 = /*#__PURE__*/ jsx("div", {
295
- "data-tao-modal-wrap": "",
296
- "data-tao-centered": t24,
297
- "data-tao-open": t25,
298
- children: t37
292
+ if ($[73] !== t24 || $[74] !== t37) {
293
+ t38 = /*#__PURE__*/ jsxs(TaoPortalScope, {
294
+ children: [
295
+ t24,
296
+ t37
297
+ ]
299
298
  });
300
299
  $[73] = t24;
301
- $[74] = t25;
302
- $[75] = t37;
303
- $[76] = t38;
304
- } else t38 = $[76];
300
+ $[74] = t37;
301
+ $[75] = t38;
302
+ } else t38 = $[75];
305
303
  let t39;
306
- if ($[77] !== t23 || $[78] !== t38) {
307
- t39 = /*#__PURE__*/ jsxs(TaoPortalScope, {
308
- children: [
309
- t23,
310
- t38
311
- ]
304
+ if ($[76] !== forceMount || $[77] !== t38) {
305
+ t39 = /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_dialog_dabd8325.Portal, {
306
+ forceMount: forceMount,
307
+ children: t38
312
308
  });
313
- $[77] = t23;
314
- $[78] = t38;
315
- $[79] = t39;
316
- } else t39 = $[79];
309
+ $[76] = forceMount;
310
+ $[77] = t38;
311
+ $[78] = t39;
312
+ } else t39 = $[78];
317
313
  let t40;
318
- if ($[80] !== forceMount || $[81] !== t39) {
319
- t40 = /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_dialog_dabd8325.Portal, {
320
- forceMount: forceMount,
314
+ if ($[79] !== open || $[80] !== t19 || $[81] !== t39) {
315
+ t40 = /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_dialog_dabd8325.Root, {
316
+ open: open,
317
+ onOpenChange: t19,
321
318
  children: t39
322
319
  });
323
- $[80] = forceMount;
320
+ $[79] = open;
321
+ $[80] = t19;
324
322
  $[81] = t39;
325
323
  $[82] = t40;
326
324
  } else t40 = $[82];
327
- let t41;
328
- if ($[83] !== open || $[84] !== t19 || $[85] !== t40) {
329
- t41 = /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_dialog_dabd8325.Root, {
330
- open: open,
331
- onOpenChange: t19,
332
- children: t40
333
- });
334
- $[83] = open;
335
- $[84] = t19;
336
- $[85] = t40;
337
- $[86] = t41;
338
- } else t41 = $[86];
339
- return t41;
325
+ return t40;
340
326
  }
341
327
  function CloseIcon() {
342
328
  const $ = c(1);
@@ -0,0 +1,4 @@
1
+ /** A parent dialog may close only through its own mask, not a portaled child. */
2
+ export declare function preventParentOutsideDismiss(event: {
3
+ preventDefault: () => void;
4
+ }): void;
@@ -0,0 +1,4 @@
1
+ function preventParentOutsideDismiss(event) {
2
+ event.preventDefault();
3
+ }
4
+ export { preventParentOutsideDismiss };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rockshin/tao-ui",
3
- "version": "0.0.19",
3
+ "version": "0.0.21",
4
4
  "type": "module",
5
5
  "description": "A modern React 19 component library with semantic DOM customization and OKLCH-based theming.",
6
6
  "keywords": [