@rockshin/tao-ui 0.0.30 → 0.0.32

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.
Files changed (159) hide show
  1. package/README.md +14 -3
  2. package/dist/components/alert/alert.js +1 -1
  3. package/dist/components/breadcrumb/breadcrumb.js +1 -1
  4. package/dist/components/button/button.d.ts +2 -2
  5. package/dist/components/button/button.js +48 -50
  6. package/dist/components/checkbox/checkbox.css +5 -1
  7. package/dist/components/checkbox/checkbox.d.ts +2 -2
  8. package/dist/components/checkbox/checkbox.js +135 -120
  9. package/dist/components/collapsible/collapsible.js +1 -1
  10. package/dist/components/context-menu/context-menu.js +1 -1
  11. package/dist/components/date-picker/calendar/calendar-header.js +1 -1
  12. package/dist/components/date-picker/calendar/month-grid.d.ts +3 -1
  13. package/dist/components/date-picker/calendar/month-grid.js +19 -17
  14. package/dist/components/date-picker/calendar/time-panel.js +1 -1
  15. package/dist/components/date-picker/calendar/year-grid.d.ts +3 -1
  16. package/dist/components/date-picker/calendar/year-grid.js +28 -24
  17. package/dist/components/date-picker/date-picker.d.ts +1 -1
  18. package/dist/components/date-picker/date-picker.js +37 -24
  19. package/dist/components/date-picker/presets.js +1 -1
  20. package/dist/components/date-picker/range-picker.d.ts +1 -1
  21. package/dist/components/date-picker/range-picker.js +104 -56
  22. package/dist/components/drawer/drawer.d.ts +1 -1
  23. package/dist/components/drawer/drawer.js +98 -91
  24. package/dist/components/dropdown/dropdown.js +84 -84
  25. package/dist/components/form/form-item.js +8 -4
  26. package/dist/components/form/form.js +1 -1
  27. package/dist/components/form-actions/form-actions.js +1 -1
  28. package/dist/components/form-field/form-field-view.js +58 -51
  29. package/dist/components/form-field/form-field.js +1 -1
  30. package/dist/components/form-section/form-section.js +1 -1
  31. package/dist/components/input/input.js +42 -39
  32. package/dist/components/input-number/input-number.d.ts +2 -2
  33. package/dist/components/input-number/input-number.js +57 -59
  34. package/dist/components/menu/menu-render.js +1 -1
  35. package/dist/components/modal/confirm-dialog.d.ts +2 -1
  36. package/dist/components/modal/confirm-dialog.js +25 -5
  37. package/dist/components/modal/confirm.js +15 -3
  38. package/dist/components/modal/modal.d.ts +1 -1
  39. package/dist/components/modal/modal.js +131 -132
  40. package/dist/components/modal/use-modal.js +48 -35
  41. package/dist/components/pagination/pagination.js +3 -1
  42. package/dist/components/popconfirm/popconfirm.js +1 -1
  43. package/dist/components/popover/popover.js +253 -228
  44. package/dist/components/radio/radio.css +2 -2
  45. package/dist/components/radio/radio.d.ts +1 -1
  46. package/dist/components/radio/radio.js +7 -7
  47. package/dist/components/scroll-area/scroll-area.css +2 -2
  48. package/dist/components/scroll-area/scroll-area.js +187 -165
  49. package/dist/components/select/mobile-select.d.ts +2 -1
  50. package/dist/components/select/mobile-select.js +12 -6
  51. package/dist/components/select/select-icons.js +1 -1
  52. package/dist/components/select/select-searchable-list.d.ts +1 -1
  53. package/dist/components/select/select-searchable-list.js +35 -21
  54. package/dist/components/select/select-tags.js +1 -1
  55. package/dist/components/select/select-types.d.ts +2 -2
  56. package/dist/components/select/select.css +4 -0
  57. package/dist/components/select/select.d.ts +2 -2
  58. package/dist/components/select/select.js +124 -72
  59. package/dist/components/sonner/sonner.js +6 -5
  60. package/dist/components/spinner/spinner.js +1 -1
  61. package/dist/components/splitter/splitter.js +187 -194
  62. package/dist/components/status-icon/status-icon.js +1 -1
  63. package/dist/components/switch/switch.d.ts +1 -1
  64. package/dist/components/switch/switch.js +6 -6
  65. package/dist/components/table/table-filter.js +1 -1
  66. package/dist/components/table/table-icons.js +1 -1
  67. package/dist/components/table/table.css +11 -10
  68. package/dist/components/table/table.js +483 -599
  69. package/dist/components/tabs/tabs.js +179 -161
  70. package/dist/components/tag/tag.js +1 -1
  71. package/dist/components/textarea/textarea.d.ts +1 -1
  72. package/dist/components/textarea/textarea.js +142 -108
  73. package/dist/components/tooltip/tooltip.js +88 -72
  74. package/dist/entries/alert.d.ts +3 -0
  75. package/dist/entries/alert.js +4 -0
  76. package/dist/entries/breadcrumb.d.ts +3 -0
  77. package/dist/entries/breadcrumb.js +4 -0
  78. package/dist/entries/button.d.ts +3 -0
  79. package/dist/entries/button.js +4 -0
  80. package/dist/entries/checkbox.d.ts +3 -0
  81. package/dist/entries/checkbox.js +4 -0
  82. package/dist/entries/collapsible.d.ts +3 -0
  83. package/dist/entries/collapsible.js +4 -0
  84. package/dist/entries/context-menu.d.ts +3 -0
  85. package/dist/entries/context-menu.js +4 -0
  86. package/dist/entries/date-picker.d.ts +3 -0
  87. package/dist/entries/date-picker.js +4 -0
  88. package/dist/entries/drawer.d.ts +3 -0
  89. package/dist/entries/drawer.js +4 -0
  90. package/dist/entries/dropdown.d.ts +3 -0
  91. package/dist/entries/dropdown.js +4 -0
  92. package/dist/entries/form-actions.d.ts +3 -0
  93. package/dist/entries/form-actions.js +4 -0
  94. package/dist/entries/form-field.d.ts +3 -0
  95. package/dist/entries/form-field.js +4 -0
  96. package/dist/entries/form-layout.d.ts +3 -0
  97. package/dist/entries/form-layout.js +4 -0
  98. package/dist/entries/form-section.d.ts +3 -0
  99. package/dist/entries/form-section.js +4 -0
  100. package/dist/entries/form.d.ts +4 -0
  101. package/dist/entries/form.js +4 -0
  102. package/dist/entries/input-number.d.ts +3 -0
  103. package/dist/entries/input-number.js +4 -0
  104. package/dist/entries/input.d.ts +3 -0
  105. package/dist/entries/input.js +4 -0
  106. package/dist/entries/modal.d.ts +3 -0
  107. package/dist/entries/modal.js +4 -0
  108. package/dist/entries/number-input.d.ts +3 -0
  109. package/dist/entries/number-input.js +4 -0
  110. package/dist/entries/pagination.d.ts +3 -0
  111. package/dist/entries/pagination.js +4 -0
  112. package/dist/entries/popconfirm.d.ts +3 -0
  113. package/dist/entries/popconfirm.js +4 -0
  114. package/dist/entries/popover.d.ts +3 -0
  115. package/dist/entries/popover.js +4 -0
  116. package/dist/entries/provider.d.ts +3 -0
  117. package/dist/entries/provider.js +4 -0
  118. package/dist/entries/radio.d.ts +3 -0
  119. package/dist/entries/radio.js +4 -0
  120. package/dist/entries/range-picker.d.ts +3 -0
  121. package/dist/entries/range-picker.js +4 -0
  122. package/dist/entries/scroll-area.d.ts +3 -0
  123. package/dist/entries/scroll-area.js +4 -0
  124. package/dist/entries/select.d.ts +3 -0
  125. package/dist/entries/select.js +4 -0
  126. package/dist/entries/sonner.d.ts +3 -0
  127. package/dist/entries/sonner.js +4 -0
  128. package/dist/entries/spinner.d.ts +3 -0
  129. package/dist/entries/spinner.js +4 -0
  130. package/dist/entries/splitter.d.ts +3 -0
  131. package/dist/entries/splitter.js +4 -0
  132. package/dist/entries/stack.d.ts +3 -0
  133. package/dist/entries/stack.js +4 -0
  134. package/dist/entries/switch.d.ts +3 -0
  135. package/dist/entries/switch.js +4 -0
  136. package/dist/entries/table.d.ts +3 -0
  137. package/dist/entries/table.js +4 -0
  138. package/dist/entries/tabs.d.ts +3 -0
  139. package/dist/entries/tabs.js +4 -0
  140. package/dist/entries/tag.d.ts +3 -0
  141. package/dist/entries/tag.js +4 -0
  142. package/dist/entries/textarea.d.ts +3 -0
  143. package/dist/entries/textarea.js +4 -0
  144. package/dist/entries/tooltip.d.ts +3 -0
  145. package/dist/entries/tooltip.js +4 -0
  146. package/dist/layouts/form-layout/form-layout.js +1 -1
  147. package/dist/layouts/stack/stack.js +1 -1
  148. package/dist/number-input/number-input.js +1 -1
  149. package/dist/number-input/use-number-input.d.ts +2 -2
  150. package/dist/number-input/use-number-input.js +224 -131
  151. package/dist/number-input/validate.js +7 -2
  152. package/dist/provider/tao-provider.js +1 -1
  153. package/dist/utils/dialog-content.d.ts +10 -0
  154. package/dist/utils/dialog-content.js +222 -0
  155. package/dist/utils/overlay.d.ts +2 -2
  156. package/dist/utils/overlay.js +8 -3
  157. package/dist/utils/refs.js +17 -2
  158. package/llms.txt +5 -3
  159. package/package.json +21 -8
@@ -1,16 +1,16 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import { c } from "react/compiler-runtime";
2
+ import { c } from "react-compiler-runtime";
3
+ import { forwardRef } from "react";
3
4
  import { useNumberInput } from "../../number-input/use-number-input.js";
4
5
  import { mergeRefs } from "../../utils/refs.js";
5
6
  import { Input } from "../input/input.js";
6
- function InputNumber(t0) {
7
- const $ = c(40);
7
+ const input_number_InputNumber = /*#__PURE__*/ forwardRef(function(t0, forwardedRef) {
8
+ const $ = c(39);
8
9
  let ariaLabel;
9
10
  let className;
10
11
  let classNames;
11
12
  let disabled;
12
13
  let error;
13
- let forwardedRef;
14
14
  let hookOptions;
15
15
  let id;
16
16
  let name;
@@ -22,63 +22,61 @@ function InputNumber(t0) {
22
22
  let suffix;
23
23
  let variant;
24
24
  if ($[0] !== t0) {
25
- ({ prefix, suffix, size, variant, error, status, disabled, placeholder, id, name, "aria-label": ariaLabel, className, classNames, styles, ref: forwardedRef, ...hookOptions } = t0);
25
+ ({ prefix, suffix, size, variant, error, status, disabled, placeholder, id, name, "aria-label": ariaLabel, className, classNames, styles, ...hookOptions } = t0);
26
26
  $[0] = t0;
27
27
  $[1] = ariaLabel;
28
28
  $[2] = className;
29
29
  $[3] = classNames;
30
30
  $[4] = disabled;
31
31
  $[5] = error;
32
- $[6] = forwardedRef;
33
- $[7] = hookOptions;
34
- $[8] = id;
35
- $[9] = name;
36
- $[10] = placeholder;
37
- $[11] = prefix;
38
- $[12] = size;
39
- $[13] = status;
40
- $[14] = styles;
41
- $[15] = suffix;
42
- $[16] = variant;
32
+ $[6] = hookOptions;
33
+ $[7] = id;
34
+ $[8] = name;
35
+ $[9] = placeholder;
36
+ $[10] = prefix;
37
+ $[11] = size;
38
+ $[12] = status;
39
+ $[13] = styles;
40
+ $[14] = suffix;
41
+ $[15] = variant;
43
42
  } else {
44
43
  ariaLabel = $[1];
45
44
  className = $[2];
46
45
  classNames = $[3];
47
46
  disabled = $[4];
48
47
  error = $[5];
49
- forwardedRef = $[6];
50
- hookOptions = $[7];
51
- id = $[8];
52
- name = $[9];
53
- placeholder = $[10];
54
- prefix = $[11];
55
- size = $[12];
56
- status = $[13];
57
- styles = $[14];
58
- suffix = $[15];
59
- variant = $[16];
48
+ hookOptions = $[6];
49
+ id = $[7];
50
+ name = $[8];
51
+ placeholder = $[9];
52
+ prefix = $[10];
53
+ size = $[11];
54
+ status = $[12];
55
+ styles = $[13];
56
+ suffix = $[14];
57
+ variant = $[15];
60
58
  }
61
59
  const { inputProps } = useNumberInput(hookOptions);
62
60
  let inputRest;
63
61
  let ref;
64
- if ($[17] !== inputProps) {
62
+ if ($[16] !== inputProps) {
65
63
  ({ ref, ...inputRest } = inputProps);
66
- $[17] = inputProps;
67
- $[18] = inputRest;
68
- $[19] = ref;
64
+ $[16] = inputProps;
65
+ $[17] = inputRest;
66
+ $[18] = ref;
69
67
  } else {
70
- inputRest = $[18];
71
- ref = $[19];
68
+ inputRest = $[17];
69
+ ref = $[18];
72
70
  }
73
71
  let t1;
74
- if ($[20] !== forwardedRef || $[21] !== ref) {
72
+ if ($[19] !== forwardedRef || $[20] !== ref) {
75
73
  t1 = mergeRefs(ref, forwardedRef);
76
- $[20] = forwardedRef;
77
- $[21] = ref;
78
- $[22] = t1;
79
- } else t1 = $[22];
74
+ $[19] = forwardedRef;
75
+ $[20] = ref;
76
+ $[21] = t1;
77
+ } else t1 = $[21];
80
78
  let t2;
81
- if ($[23] !== ariaLabel || $[24] !== className || $[25] !== classNames || $[26] !== disabled || $[27] !== error || $[28] !== id || $[29] !== inputRest || $[30] !== name || $[31] !== placeholder || $[32] !== prefix || $[33] !== size || $[34] !== status || $[35] !== styles || $[36] !== suffix || $[37] !== t1 || $[38] !== variant) {
79
+ if ($[22] !== ariaLabel || $[23] !== className || $[24] !== classNames || $[25] !== disabled || $[26] !== error || $[27] !== id || $[28] !== inputRest || $[29] !== name || $[30] !== placeholder || $[31] !== prefix || $[32] !== size || $[33] !== status || $[34] !== styles || $[35] !== suffix || $[36] !== t1 || $[37] !== variant) {
82
80
  t2 = /*#__PURE__*/ jsx(Input, {
83
81
  ref: t1,
84
82
  prefix: prefix,
@@ -97,24 +95,24 @@ function InputNumber(t0) {
97
95
  styles: styles,
98
96
  ...inputRest
99
97
  });
100
- $[23] = ariaLabel;
101
- $[24] = className;
102
- $[25] = classNames;
103
- $[26] = disabled;
104
- $[27] = error;
105
- $[28] = id;
106
- $[29] = inputRest;
107
- $[30] = name;
108
- $[31] = placeholder;
109
- $[32] = prefix;
110
- $[33] = size;
111
- $[34] = status;
112
- $[35] = styles;
113
- $[36] = suffix;
114
- $[37] = t1;
115
- $[38] = variant;
116
- $[39] = t2;
117
- } else t2 = $[39];
98
+ $[22] = ariaLabel;
99
+ $[23] = className;
100
+ $[24] = classNames;
101
+ $[25] = disabled;
102
+ $[26] = error;
103
+ $[27] = id;
104
+ $[28] = inputRest;
105
+ $[29] = name;
106
+ $[30] = placeholder;
107
+ $[31] = prefix;
108
+ $[32] = size;
109
+ $[33] = status;
110
+ $[34] = styles;
111
+ $[35] = suffix;
112
+ $[36] = t1;
113
+ $[37] = variant;
114
+ $[38] = t2;
115
+ } else t2 = $[38];
118
116
  return t2;
119
- }
120
- export { InputNumber };
117
+ });
118
+ export { input_number_InputNumber as InputNumber };
@@ -1,5 +1,5 @@
1
1
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
- import { c } from "react/compiler-runtime";
2
+ import { c } from "react-compiler-runtime";
3
3
  import { useState } from "react";
4
4
  import { TaoPortalScope } from "../../provider/tao-provider.js";
5
5
  import { cx } from "../../utils/semantic.js";
@@ -33,5 +33,6 @@ export interface ConfirmDialogProps extends ModalFuncProps {
33
33
  open: boolean;
34
34
  /** Requests close (container flips `open` to false). */
35
35
  close: () => void;
36
+ onMount?: () => void;
36
37
  }
37
- export declare function ConfirmDialog({ open, close, type, icon, title, content, okText, cancelText, okCancel, okButtonProps, cancelButtonProps, onOk, onCancel, afterClose, centered, width, maskClosable, closable, keyboard, className, classNames, styles, }: ConfirmDialogProps): import("react/jsx-runtime").JSX.Element;
38
+ export declare function ConfirmDialog({ onMount, open, close, type, icon, title, content, okText, cancelText, okCancel, okButtonProps, cancelButtonProps, onOk, onCancel, afterClose, centered, width, maskClosable, closable, keyboard, className, classNames, styles, }: ConfirmDialogProps): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
- import { c } from "react/compiler-runtime";
3
- import { useState } from "react";
2
+ import { c } from "react-compiler-runtime";
3
+ import { useLayoutEffect, useRef, useState } from "react";
4
4
  import { cx } from "../../utils/semantic.js";
5
5
  import { Button } from "../button/button.js";
6
6
  import { StatusIcon } from "../status-icon/status-icon.js";
@@ -8,23 +8,41 @@ import { Modal } from "./modal.js";
8
8
  function isPromise(v) {
9
9
  return !!v && 'function' == typeof v.then;
10
10
  }
11
- function ConfirmDialog({ open, close, type = 'confirm', icon, title, content, okText, cancelText, okCancel, okButtonProps, cancelButtonProps, onOk, onCancel, afterClose, centered = true, width = 416, maskClosable = false, closable = false, keyboard = true, className, classNames, styles }) {
11
+ function ConfirmDialog({ onMount, open, close, type = 'confirm', icon, title, content, okText, cancelText, okCancel, okButtonProps, cancelButtonProps, onOk, onCancel, afterClose, centered = true, width = 416, maskClosable = false, closable = false, keyboard = true, className, classNames, styles }) {
12
12
  const [loading, setLoading] = useState(false);
13
+ const [cancelLoading, setCancelLoading] = useState(false);
14
+ const cancelPending = useRef(false);
15
+ useLayoutEffect(()=>onMount?.(), [
16
+ onMount
17
+ ]);
13
18
  const showCancel = okCancel ?? 'confirm' === type;
14
19
  const runAndClose = async (handler, withLoading)=>{
15
20
  const result = handler?.();
16
21
  if (isPromise(result)) {
17
22
  if (withLoading) setLoading(true);
23
+ else setCancelLoading(true);
18
24
  try {
19
25
  await result;
20
26
  close();
21
27
  } catch {} finally{
22
28
  if (withLoading) setLoading(false);
29
+ else setCancelLoading(false);
23
30
  }
24
31
  } else close();
25
32
  };
26
- const handleOk = ()=>runAndClose(onOk, true);
27
- const handleCancel = ()=>runAndClose(onCancel, false);
33
+ const handleOk = ()=>{
34
+ if (cancelPending.current) return;
35
+ return runAndClose(onOk, true);
36
+ };
37
+ const handleCancel = async ()=>{
38
+ if (cancelPending.current) return;
39
+ cancelPending.current = true;
40
+ try {
41
+ await runAndClose(onCancel, false);
42
+ } finally{
43
+ cancelPending.current = false;
44
+ }
45
+ };
28
46
  const iconNode = null === icon ? null : icon ?? /*#__PURE__*/ jsx(StatusIconFor, {
29
47
  type: type
30
48
  });
@@ -48,6 +66,7 @@ function ConfirmDialog({ open, close, type = 'confirm', icon, title, content, ok
48
66
  children: [
49
67
  showCancel && /*#__PURE__*/ jsx(Button, {
50
68
  variant: "secondary",
69
+ loading: cancelLoading,
51
70
  onClick: handleCancel,
52
71
  ...cancelButtonProps,
53
72
  children: cancelText ?? 'Cancel'
@@ -57,6 +76,7 @@ function ConfirmDialog({ open, close, type = 'confirm', icon, title, content, ok
57
76
  loading: loading,
58
77
  onClick: handleOk,
59
78
  ...okButtonProps,
79
+ disabled: cancelLoading || okButtonProps?.disabled,
60
80
  children: okText ?? 'OK'
61
81
  })
62
82
  ]
@@ -7,28 +7,40 @@ function confirm_confirm(config) {
7
7
  const root = createRoot(container);
8
8
  let currentConfig = config;
9
9
  let open = true;
10
+ let mounted = false;
11
+ let destroyed = false;
12
+ function onMount() {
13
+ mounted = true;
14
+ }
10
15
  function destroy() {
16
+ if (destroyed) return;
17
+ destroyed = true;
11
18
  root.unmount();
12
19
  const idx = destroyFns.indexOf(destroy);
13
20
  if (-1 !== idx) destroyFns.splice(idx, 1);
14
21
  }
15
22
  function afterClose() {
16
- currentConfig.afterClose?.();
23
+ if (destroyed) return;
17
24
  destroy();
25
+ currentConfig.afterClose?.();
18
26
  }
19
27
  function close() {
28
+ if (destroyed || !open) return;
20
29
  open = false;
21
- render();
30
+ if (mounted) render();
31
+ else afterClose();
22
32
  }
23
33
  function render() {
24
34
  root.render(/*#__PURE__*/ jsx(ConfirmDialog, {
25
35
  ...currentConfig,
26
36
  open: open,
27
37
  close: close,
28
- afterClose: afterClose
38
+ afterClose: afterClose,
39
+ onMount: onMount
29
40
  }));
30
41
  }
31
42
  function update(configUpdate) {
43
+ if (destroyed) return;
32
44
  currentConfig = 'function' == typeof configUpdate ? configUpdate(currentConfig) : {
33
45
  ...currentConfig,
34
46
  ...configUpdate
@@ -46,7 +46,7 @@ export interface ModalProps {
46
46
  afterClose?: () => void;
47
47
  /**
48
48
  * Unmount children when closed. Defaults to `true`.
49
- * Set `false` to keep children mounted and preserve their state across open/close.
49
+ * Set `false` to keep children mounted while releasing modal interaction locks when hidden.
50
50
  */
51
51
  destroyOnHidden?: boolean;
52
52
  children?: ReactNode;
@@ -1,15 +1,16 @@
1
1
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
- import { c } from "react/compiler-runtime";
2
+ import { c } from "react-compiler-runtime";
3
3
  import { useEffect, useRef } from "react";
4
4
  import { TaoPortalScope } from "../../provider/tao-provider.js";
5
5
  import { resolveResponsiveValue, useBreakpoint } from "../../utils/breakpoint.js";
6
+ import { DialogContent } from "../../utils/dialog-content.js";
6
7
  import { preventParentOutsideDismiss } from "../../utils/portal.js";
7
8
  import { cx } from "../../utils/semantic.js";
8
9
  import { Button } from "../button/button.js";
9
10
  import "./modal.css";
10
11
  import * as __rspack_external__radix_ui_react_dialog_dabd8325 from "@radix-ui/react-dialog";
11
12
  function Modal(t0) {
12
- const $ = c(86);
13
+ const $ = c(89);
13
14
  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;
14
15
  const okText = void 0 === t1 ? "OK" : t1;
15
16
  const cancelText = void 0 === t2 ? "Cancel" : t2;
@@ -144,50 +145,44 @@ function Modal(t0) {
144
145
  $[31] = onClose;
145
146
  $[32] = t20;
146
147
  } else t20 = $[32];
147
- const t21 = classNames?.overlay;
148
- let t22;
149
- if ($[33] !== t21) {
150
- t22 = cx(t21);
151
- $[33] = t21;
152
- $[34] = t22;
153
- } else t22 = $[34];
154
- const t23 = stylesProp?.overlay;
155
- const t24 = maskClosable ? onClose : void 0;
156
- let t25;
157
- if ($[35] !== forceMount || $[36] !== t22 || $[37] !== t23 || $[38] !== t24) {
158
- t25 = /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_dialog_dabd8325.Overlay, {
148
+ let t21;
149
+ if ($[33] !== classNames?.overlay || $[34] !== forceMount || $[35] !== keepAlive || $[36] !== maskClosable || $[37] !== onClose || $[38] !== open || $[39] !== stylesProp?.overlay) {
150
+ t21 = (!keepAlive || open) && /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_dialog_dabd8325.Overlay, {
159
151
  forceMount: forceMount,
160
152
  "data-tao-modal-overlay": "",
161
- className: t22,
162
- style: t23,
163
- onClick: t24
153
+ className: cx(classNames?.overlay),
154
+ style: stylesProp?.overlay,
155
+ onClick: maskClosable ? onClose : void 0
164
156
  });
165
- $[35] = forceMount;
166
- $[36] = t22;
167
- $[37] = t23;
168
- $[38] = t24;
169
- $[39] = t25;
170
- } else t25 = $[39];
171
- const t26 = centered ? "" : void 0;
172
- const t27 = open ? "" : void 0;
173
- const t28 = classNames?.root;
174
- let t29;
175
- if ($[40] !== t28) {
176
- t29 = cx(t28);
177
- $[40] = t28;
178
- $[41] = t29;
179
- } else t29 = $[41];
180
- let t30;
181
- if ($[42] !== keyboard) {
182
- t30 = (e)=>{
157
+ $[33] = classNames?.overlay;
158
+ $[34] = forceMount;
159
+ $[35] = keepAlive;
160
+ $[36] = maskClosable;
161
+ $[37] = onClose;
162
+ $[38] = open;
163
+ $[39] = stylesProp?.overlay;
164
+ $[40] = t21;
165
+ } else t21 = $[40];
166
+ const t22 = centered ? "" : void 0;
167
+ const t23 = open ? "" : void 0;
168
+ const t24 = classNames?.root;
169
+ let t25;
170
+ if ($[41] !== t24) {
171
+ t25 = cx(t24);
172
+ $[41] = t24;
173
+ $[42] = t25;
174
+ } else t25 = $[42];
175
+ let t26;
176
+ if ($[43] !== keyboard) {
177
+ t26 = (e)=>{
183
178
  if (!keyboard) e.preventDefault();
184
179
  };
185
- $[42] = keyboard;
186
- $[43] = t30;
187
- } else t30 = $[43];
188
- let t31;
189
- if ($[44] !== classNames?.close || $[45] !== classNames?.header || $[46] !== classNames?.title || $[47] !== closable || $[48] !== onClose || $[49] !== stylesProp?.close || $[50] !== stylesProp?.header || $[51] !== stylesProp?.title || $[52] !== title) {
190
- t31 = (null != title || closable) && /*#__PURE__*/ jsxs("div", {
180
+ $[43] = keyboard;
181
+ $[44] = t26;
182
+ } else t26 = $[44];
183
+ let t27;
184
+ if ($[45] !== classNames?.close || $[46] !== classNames?.header || $[47] !== classNames?.title || $[48] !== closable || $[49] !== onClose || $[50] !== stylesProp?.close || $[51] !== stylesProp?.header || $[52] !== stylesProp?.title || $[53] !== title) {
185
+ t27 = (null != title || closable) && /*#__PURE__*/ jsxs("div", {
191
186
  "data-tao-modal-header": "",
192
187
  className: cx(classNames?.header),
193
188
  style: stylesProp?.header,
@@ -214,125 +209,129 @@ function Modal(t0) {
214
209
  })
215
210
  ]
216
211
  });
217
- $[44] = classNames?.close;
218
- $[45] = classNames?.header;
219
- $[46] = classNames?.title;
220
- $[47] = closable;
221
- $[48] = onClose;
222
- $[49] = stylesProp?.close;
223
- $[50] = stylesProp?.header;
224
- $[51] = stylesProp?.title;
225
- $[52] = title;
226
- $[53] = t31;
227
- } else t31 = $[53];
228
- const t32 = classNames?.body;
229
- let t33;
230
- if ($[54] !== t32) {
231
- t33 = cx(t32);
232
- $[54] = t32;
233
- $[55] = t33;
234
- } else t33 = $[55];
235
- const t34 = stylesProp?.body;
236
- let t35;
237
- if ($[56] !== children || $[57] !== t33 || $[58] !== t34) {
238
- t35 = /*#__PURE__*/ jsx("div", {
212
+ $[45] = classNames?.close;
213
+ $[46] = classNames?.header;
214
+ $[47] = classNames?.title;
215
+ $[48] = closable;
216
+ $[49] = onClose;
217
+ $[50] = stylesProp?.close;
218
+ $[51] = stylesProp?.header;
219
+ $[52] = stylesProp?.title;
220
+ $[53] = title;
221
+ $[54] = t27;
222
+ } else t27 = $[54];
223
+ const t28 = classNames?.body;
224
+ let t29;
225
+ if ($[55] !== t28) {
226
+ t29 = cx(t28);
227
+ $[55] = t28;
228
+ $[56] = t29;
229
+ } else t29 = $[56];
230
+ const t30 = stylesProp?.body;
231
+ let t31;
232
+ if ($[57] !== children || $[58] !== t29 || $[59] !== t30) {
233
+ t31 = /*#__PURE__*/ jsx("div", {
239
234
  "data-tao-modal-body": "",
240
- className: t33,
241
- style: t34,
235
+ className: t29,
236
+ style: t30,
242
237
  children: children
243
238
  });
244
- $[56] = children;
245
- $[57] = t33;
246
- $[58] = t34;
247
- $[59] = t35;
248
- } else t35 = $[59];
249
- let t36;
250
- if ($[60] !== classNames?.footer || $[61] !== footerContent || $[62] !== stylesProp?.footer) {
251
- t36 = null != footerContent && /*#__PURE__*/ jsx("div", {
239
+ $[57] = children;
240
+ $[58] = t29;
241
+ $[59] = t30;
242
+ $[60] = t31;
243
+ } else t31 = $[60];
244
+ let t32;
245
+ if ($[61] !== classNames?.footer || $[62] !== footerContent || $[63] !== stylesProp?.footer) {
246
+ t32 = null != footerContent && /*#__PURE__*/ jsx("div", {
252
247
  "data-tao-modal-footer": "",
253
248
  className: cx(classNames?.footer),
254
249
  style: stylesProp?.footer,
255
250
  children: footerContent
256
251
  });
257
- $[60] = classNames?.footer;
258
- $[61] = footerContent;
259
- $[62] = stylesProp?.footer;
260
- $[63] = t36;
261
- } else t36 = $[63];
262
- let t37;
263
- if ($[64] !== contentStyle || $[65] !== forceMount || $[66] !== t29 || $[67] !== t30 || $[68] !== t31 || $[69] !== t35 || $[70] !== t36) {
264
- t37 = /*#__PURE__*/ jsxs(__rspack_external__radix_ui_react_dialog_dabd8325.Content, {
252
+ $[61] = classNames?.footer;
253
+ $[62] = footerContent;
254
+ $[63] = stylesProp?.footer;
255
+ $[64] = t32;
256
+ } else t32 = $[64];
257
+ let t33;
258
+ if ($[65] !== contentStyle || $[66] !== forceMount || $[67] !== keepAlive || $[68] !== open || $[69] !== t25 || $[70] !== t26 || $[71] !== t27 || $[72] !== t31 || $[73] !== t32) {
259
+ t33 = /*#__PURE__*/ jsxs(DialogContent, {
260
+ open: open,
261
+ keepAlive: keepAlive,
265
262
  forceMount: forceMount,
266
263
  "data-tao-modal": "",
267
264
  style: contentStyle,
268
- className: t29,
265
+ className: t25,
269
266
  "aria-describedby": void 0,
270
- onEscapeKeyDown: t30,
267
+ onEscapeKeyDown: t26,
271
268
  onPointerDownOutside: preventParentOutsideDismiss,
272
269
  onInteractOutside: preventParentOutsideDismiss,
273
270
  children: [
271
+ t27,
274
272
  t31,
275
- t35,
276
- t36
273
+ t32
277
274
  ]
278
275
  });
279
- $[64] = contentStyle;
280
- $[65] = forceMount;
281
- $[66] = t29;
282
- $[67] = t30;
283
- $[68] = t31;
284
- $[69] = t35;
285
- $[70] = t36;
286
- $[71] = t37;
287
- } else t37 = $[71];
288
- let t38;
289
- if ($[72] !== t26 || $[73] !== t27 || $[74] !== t37) {
290
- t38 = /*#__PURE__*/ jsx("div", {
276
+ $[65] = contentStyle;
277
+ $[66] = forceMount;
278
+ $[67] = keepAlive;
279
+ $[68] = open;
280
+ $[69] = t25;
281
+ $[70] = t26;
282
+ $[71] = t27;
283
+ $[72] = t31;
284
+ $[73] = t32;
285
+ $[74] = t33;
286
+ } else t33 = $[74];
287
+ let t34;
288
+ if ($[75] !== t22 || $[76] !== t23 || $[77] !== t33) {
289
+ t34 = /*#__PURE__*/ jsx("div", {
291
290
  "data-tao-modal-wrap": "",
292
- "data-tao-centered": t26,
293
- "data-tao-open": t27,
294
- children: t37
291
+ "data-tao-centered": t22,
292
+ "data-tao-open": t23,
293
+ children: t33
295
294
  });
296
- $[72] = t26;
297
- $[73] = t27;
298
- $[74] = t37;
299
- $[75] = t38;
300
- } else t38 = $[75];
301
- let t39;
302
- if ($[76] !== t25 || $[77] !== t38) {
303
- t39 = /*#__PURE__*/ jsxs(TaoPortalScope, {
295
+ $[75] = t22;
296
+ $[76] = t23;
297
+ $[77] = t33;
298
+ $[78] = t34;
299
+ } else t34 = $[78];
300
+ let t35;
301
+ if ($[79] !== t21 || $[80] !== t34) {
302
+ t35 = /*#__PURE__*/ jsxs(TaoPortalScope, {
304
303
  children: [
305
- t25,
306
- t38
304
+ t21,
305
+ t34
307
306
  ]
308
307
  });
309
- $[76] = t25;
310
- $[77] = t38;
311
- $[78] = t39;
312
- } else t39 = $[78];
313
- let t40;
314
- if ($[79] !== forceMount || $[80] !== t39) {
315
- t40 = /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_dialog_dabd8325.Portal, {
308
+ $[79] = t21;
309
+ $[80] = t34;
310
+ $[81] = t35;
311
+ } else t35 = $[81];
312
+ let t36;
313
+ if ($[82] !== forceMount || $[83] !== t35) {
314
+ t36 = /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_dialog_dabd8325.Portal, {
316
315
  forceMount: forceMount,
317
- children: t39
316
+ children: t35
318
317
  });
319
- $[79] = forceMount;
320
- $[80] = t39;
321
- $[81] = t40;
322
- } else t40 = $[81];
323
- let t41;
324
- if ($[82] !== open || $[83] !== t20 || $[84] !== t40) {
325
- t41 = /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_dialog_dabd8325.Root, {
318
+ $[82] = forceMount;
319
+ $[83] = t35;
320
+ $[84] = t36;
321
+ } else t36 = $[84];
322
+ let t37;
323
+ if ($[85] !== open || $[86] !== t20 || $[87] !== t36) {
324
+ t37 = /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_dialog_dabd8325.Root, {
326
325
  open: open,
327
326
  onOpenChange: t20,
328
- children: t40
327
+ children: t36
329
328
  });
330
- $[82] = open;
331
- $[83] = t20;
332
- $[84] = t40;
333
- $[85] = t41;
334
- } else t41 = $[85];
335
- return t41;
329
+ $[85] = open;
330
+ $[86] = t20;
331
+ $[87] = t36;
332
+ $[88] = t37;
333
+ } else t37 = $[88];
334
+ return t37;
336
335
  }
337
336
  function CloseIcon() {
338
337
  const $ = c(1);