@ncds/ui-admin 1.8.4 → 1.8.5

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 (177) hide show
  1. package/dist/cjs/assets/scripts/featuredIcon.js +87 -0
  2. package/dist/cjs/assets/scripts/notification/FloatingNotification.js +178 -0
  3. package/dist/cjs/assets/scripts/notification/FullWidthNotification.js +133 -0
  4. package/dist/cjs/assets/scripts/notification/MessageNotification.js +159 -0
  5. package/dist/cjs/assets/scripts/notification/Notification.js +120 -0
  6. package/dist/cjs/assets/scripts/notification/const/classNames.js +50 -0
  7. package/dist/cjs/assets/scripts/notification/const/icons.js +31 -0
  8. package/dist/cjs/assets/scripts/notification/const/index.js +87 -0
  9. package/dist/cjs/assets/scripts/notification/const/sizes.js +46 -0
  10. package/dist/cjs/assets/scripts/notification/const/types.js +14 -0
  11. package/dist/cjs/assets/scripts/notification/index.js +116 -0
  12. package/dist/cjs/assets/scripts/notification/positionSync.js +180 -0
  13. package/dist/cjs/assets/scripts/notification/utils.js +122 -0
  14. package/dist/cjs/assets/scripts/shared/ButtonCloseX.js +45 -0
  15. package/dist/cjs/assets/scripts/utils/sanitize.js +39 -0
  16. package/dist/cjs/src/components/data-display/data-grid/DataGrid.js +5 -1
  17. package/dist/cjs/src/components/data-display/table/Table.js +118 -96
  18. package/dist/cjs/src/components/data-display/table/useTableScrollbars.js +187 -0
  19. package/dist/cjs/src/components/forms-and-input/combo-box/ComboBox.js +11 -10
  20. package/dist/cjs/src/components/forms-and-input/image-file-input/ImageFileInput.js +5 -2
  21. package/dist/cjs/src/components/forms-and-input/select-box/SelectBox.js +67 -29
  22. package/dist/cjs/src/components/overlays/dropdown/Dropdown.js +47 -19
  23. package/dist/cjs/src/components/overlays/notification/CalloutNotification.js +25 -0
  24. package/dist/cjs/src/components/overlays/notification/FloatingNotification.js +86 -13
  25. package/dist/cjs/src/components/overlays/notification/Notification.js +7 -0
  26. package/dist/cjs/src/components/overlays/notification/host.js +12 -0
  27. package/dist/cjs/src/components/overlays/tooltip/Tooltip.js +57 -44
  28. package/dist/cjs/src/components/select-dropdown/SelectDropdown.js +2 -1
  29. package/dist/cjs/src/contexts/FloatingContext.js +11 -0
  30. package/dist/cjs/src/contexts/index.js +16 -0
  31. package/dist/cjs/src/hooks/index.js +11 -0
  32. package/dist/cjs/src/hooks/useFloatingPosition.js +78 -0
  33. package/dist/cjs/src/hooks/usePortalState.js +17 -0
  34. package/dist/cjs/src/utils/dropdown/maxSelection.js +35 -0
  35. package/dist/cjs/src/utils/dropdown/multiSelect.js +72 -15
  36. package/dist/esm/assets/scripts/featuredIcon.js +80 -0
  37. package/dist/esm/assets/scripts/notification/FloatingNotification.js +171 -0
  38. package/dist/esm/assets/scripts/notification/FullWidthNotification.js +126 -0
  39. package/dist/esm/assets/scripts/notification/MessageNotification.js +152 -0
  40. package/dist/esm/assets/scripts/notification/Notification.js +113 -0
  41. package/dist/esm/assets/scripts/notification/const/classNames.js +44 -0
  42. package/dist/esm/assets/scripts/notification/const/icons.js +25 -0
  43. package/dist/esm/assets/scripts/notification/const/index.js +4 -0
  44. package/dist/esm/assets/scripts/notification/const/sizes.js +40 -0
  45. package/dist/esm/assets/scripts/notification/const/types.js +8 -0
  46. package/dist/esm/assets/scripts/notification/index.js +10 -0
  47. package/dist/esm/assets/scripts/notification/positionSync.js +171 -0
  48. package/dist/esm/assets/scripts/notification/utils.js +109 -0
  49. package/dist/esm/assets/scripts/shared/ButtonCloseX.js +37 -0
  50. package/dist/esm/assets/scripts/utils/sanitize.js +31 -0
  51. package/dist/esm/src/components/data-display/data-grid/DataGrid.js +5 -1
  52. package/dist/esm/src/components/data-display/table/Table.js +118 -96
  53. package/dist/esm/src/components/data-display/table/useTableScrollbars.js +179 -0
  54. package/dist/esm/src/components/forms-and-input/combo-box/ComboBox.js +11 -10
  55. package/dist/esm/src/components/forms-and-input/image-file-input/ImageFileInput.js +5 -2
  56. package/dist/esm/src/components/forms-and-input/select-box/SelectBox.js +67 -29
  57. package/dist/esm/src/components/overlays/dropdown/Dropdown.js +47 -19
  58. package/dist/esm/src/components/overlays/notification/CalloutNotification.js +19 -0
  59. package/dist/esm/src/components/overlays/notification/FloatingNotification.js +86 -14
  60. package/dist/esm/src/components/overlays/notification/Notification.js +7 -0
  61. package/dist/esm/src/components/overlays/notification/host.js +9 -0
  62. package/dist/esm/src/components/overlays/tooltip/Tooltip.js +58 -45
  63. package/dist/esm/src/components/select-dropdown/SelectDropdown.js +2 -1
  64. package/dist/esm/src/contexts/FloatingContext.js +4 -0
  65. package/dist/esm/src/contexts/index.js +1 -0
  66. package/dist/esm/src/hooks/index.js +1 -0
  67. package/dist/esm/src/hooks/useFloatingPosition.js +71 -0
  68. package/dist/esm/src/hooks/usePortalState.js +10 -0
  69. package/dist/esm/src/utils/dropdown/maxSelection.js +27 -0
  70. package/dist/esm/src/utils/dropdown/multiSelect.js +70 -14
  71. package/dist/temp/assets/scripts/featuredIcon.d.ts +22 -0
  72. package/dist/temp/assets/scripts/featuredIcon.js +79 -0
  73. package/dist/temp/assets/scripts/notification/FloatingNotification.d.ts +24 -0
  74. package/dist/temp/assets/scripts/notification/FloatingNotification.js +156 -0
  75. package/dist/temp/assets/scripts/notification/FullWidthNotification.d.ts +21 -0
  76. package/dist/temp/assets/scripts/notification/FullWidthNotification.js +111 -0
  77. package/dist/temp/assets/scripts/notification/MessageNotification.d.ts +22 -0
  78. package/dist/temp/assets/scripts/notification/MessageNotification.js +140 -0
  79. package/dist/temp/assets/scripts/notification/Notification.d.ts +22 -0
  80. package/dist/temp/assets/scripts/notification/Notification.js +112 -0
  81. package/dist/temp/assets/scripts/notification/const/classNames.d.ts +43 -0
  82. package/dist/temp/assets/scripts/notification/const/classNames.js +44 -0
  83. package/dist/temp/assets/scripts/notification/const/icons.d.ts +25 -0
  84. package/dist/temp/assets/scripts/notification/const/icons.js +25 -0
  85. package/dist/temp/assets/scripts/notification/const/index.d.ts +5 -0
  86. package/dist/temp/assets/scripts/notification/const/index.js +4 -0
  87. package/dist/temp/assets/scripts/notification/const/sizes.d.ts +32 -0
  88. package/dist/temp/assets/scripts/notification/const/sizes.js +40 -0
  89. package/dist/temp/assets/scripts/notification/const/types.d.ts +19 -0
  90. package/dist/temp/assets/scripts/notification/const/types.js +8 -0
  91. package/dist/temp/assets/scripts/notification/index.d.ts +8 -0
  92. package/dist/temp/assets/scripts/notification/index.js +10 -0
  93. package/dist/temp/assets/scripts/notification/positionSync.d.ts +50 -0
  94. package/dist/temp/assets/scripts/notification/positionSync.js +170 -0
  95. package/dist/temp/assets/scripts/notification/utils.d.ts +8 -0
  96. package/dist/temp/assets/scripts/notification/utils.js +115 -0
  97. package/dist/temp/assets/scripts/shared/ButtonCloseX.d.ts +5 -0
  98. package/dist/temp/assets/scripts/shared/ButtonCloseX.js +33 -0
  99. package/dist/temp/assets/scripts/utils/sanitize.d.ts +22 -0
  100. package/dist/temp/assets/scripts/utils/sanitize.js +31 -0
  101. package/dist/temp/src/components/data-display/data-grid/DataGrid.js +1 -1
  102. package/dist/temp/src/components/data-display/data-grid/DataGrid.types.d.ts +7 -0
  103. package/dist/temp/src/components/data-display/table/Table.d.ts +4 -1
  104. package/dist/temp/src/components/data-display/table/Table.js +53 -68
  105. package/dist/temp/src/components/data-display/table/types.d.ts +18 -0
  106. package/dist/temp/src/components/data-display/table/useTableScrollbars.d.ts +25 -0
  107. package/dist/temp/src/components/data-display/table/useTableScrollbars.js +136 -0
  108. package/dist/temp/src/components/forms-and-input/combo-box/ComboBox.d.ts +8 -0
  109. package/dist/temp/src/components/forms-and-input/combo-box/ComboBox.js +7 -11
  110. package/dist/temp/src/components/forms-and-input/image-file-input/ImageFileInput.js +1 -1
  111. package/dist/temp/src/components/forms-and-input/select-box/SelectBox.d.ts +13 -0
  112. package/dist/temp/src/components/forms-and-input/select-box/SelectBox.js +30 -3
  113. package/dist/temp/src/components/overlays/dropdown/Dropdown.d.ts +5 -0
  114. package/dist/temp/src/components/overlays/dropdown/Dropdown.js +35 -11
  115. package/dist/temp/src/components/overlays/notification/CalloutNotification.d.ts +9 -0
  116. package/dist/temp/src/components/overlays/notification/CalloutNotification.js +6 -0
  117. package/dist/temp/src/components/overlays/notification/FloatingNotification.d.ts +15 -0
  118. package/dist/temp/src/components/overlays/notification/FloatingNotification.js +81 -13
  119. package/dist/temp/src/components/overlays/notification/Notification.d.ts +18 -3
  120. package/dist/temp/src/components/overlays/notification/Notification.js +4 -0
  121. package/dist/temp/src/components/overlays/notification/host.d.ts +9 -0
  122. package/dist/temp/src/components/overlays/notification/host.js +9 -0
  123. package/dist/temp/src/components/overlays/tooltip/Tooltip.d.ts +5 -1
  124. package/dist/temp/src/components/overlays/tooltip/Tooltip.js +25 -22
  125. package/dist/temp/src/components/select-dropdown/SelectDropdown.d.ts +6 -0
  126. package/dist/temp/src/components/select-dropdown/SelectDropdown.js +2 -2
  127. package/dist/temp/src/contexts/FloatingContext.d.ts +6 -0
  128. package/dist/temp/src/contexts/FloatingContext.js +4 -0
  129. package/dist/temp/src/contexts/index.d.ts +1 -0
  130. package/dist/temp/src/contexts/index.js +1 -0
  131. package/dist/temp/src/hooks/index.d.ts +1 -0
  132. package/dist/temp/src/hooks/index.js +1 -0
  133. package/dist/temp/src/hooks/useFloatingPosition.d.ts +19 -0
  134. package/dist/temp/src/hooks/useFloatingPosition.js +55 -0
  135. package/dist/temp/src/hooks/usePortalState.d.ts +6 -0
  136. package/dist/temp/src/hooks/usePortalState.js +7 -0
  137. package/dist/temp/src/utils/dropdown/maxSelection.d.ts +24 -0
  138. package/dist/temp/src/utils/dropdown/maxSelection.js +28 -0
  139. package/dist/temp/src/utils/dropdown/multiSelect.d.ts +42 -2
  140. package/dist/temp/src/utils/dropdown/multiSelect.js +66 -13
  141. package/dist/types/assets/scripts/featuredIcon.d.ts +22 -0
  142. package/dist/types/assets/scripts/notification/FloatingNotification.d.ts +24 -0
  143. package/dist/types/assets/scripts/notification/FullWidthNotification.d.ts +21 -0
  144. package/dist/types/assets/scripts/notification/MessageNotification.d.ts +22 -0
  145. package/dist/types/assets/scripts/notification/Notification.d.ts +22 -0
  146. package/dist/types/assets/scripts/notification/const/classNames.d.ts +43 -0
  147. package/dist/types/assets/scripts/notification/const/icons.d.ts +25 -0
  148. package/dist/types/assets/scripts/notification/const/index.d.ts +5 -0
  149. package/dist/types/assets/scripts/notification/const/sizes.d.ts +32 -0
  150. package/dist/types/assets/scripts/notification/const/types.d.ts +19 -0
  151. package/dist/types/assets/scripts/notification/index.d.ts +8 -0
  152. package/dist/types/assets/scripts/notification/positionSync.d.ts +50 -0
  153. package/dist/types/assets/scripts/notification/utils.d.ts +8 -0
  154. package/dist/types/assets/scripts/shared/ButtonCloseX.d.ts +5 -0
  155. package/dist/types/assets/scripts/utils/sanitize.d.ts +22 -0
  156. package/dist/types/src/components/data-display/data-grid/DataGrid.types.d.ts +7 -0
  157. package/dist/types/src/components/data-display/table/Table.d.ts +4 -1
  158. package/dist/types/src/components/data-display/table/types.d.ts +18 -0
  159. package/dist/types/src/components/data-display/table/useTableScrollbars.d.ts +25 -0
  160. package/dist/types/src/components/forms-and-input/combo-box/ComboBox.d.ts +8 -0
  161. package/dist/types/src/components/forms-and-input/select-box/SelectBox.d.ts +13 -0
  162. package/dist/types/src/components/overlays/dropdown/Dropdown.d.ts +5 -0
  163. package/dist/types/src/components/overlays/notification/CalloutNotification.d.ts +9 -0
  164. package/dist/types/src/components/overlays/notification/FloatingNotification.d.ts +15 -0
  165. package/dist/types/src/components/overlays/notification/Notification.d.ts +18 -3
  166. package/dist/types/src/components/overlays/notification/host.d.ts +9 -0
  167. package/dist/types/src/components/overlays/tooltip/Tooltip.d.ts +5 -1
  168. package/dist/types/src/components/select-dropdown/SelectDropdown.d.ts +6 -0
  169. package/dist/types/src/contexts/FloatingContext.d.ts +6 -0
  170. package/dist/types/src/contexts/index.d.ts +1 -0
  171. package/dist/types/src/hooks/index.d.ts +1 -0
  172. package/dist/types/src/hooks/useFloatingPosition.d.ts +19 -0
  173. package/dist/types/src/hooks/usePortalState.d.ts +6 -0
  174. package/dist/types/src/utils/dropdown/maxSelection.d.ts +24 -0
  175. package/dist/types/src/utils/dropdown/multiSelect.d.ts +42 -2
  176. package/dist/ui-admin/assets/styles/style.css +304 -64
  177. package/package.json +1 -1
@@ -2,8 +2,11 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
2
2
  import { ChevronDown } from '@ncds/ui-admin-icon';
3
3
  import classNames from 'classnames';
4
4
  import { forwardRef, useCallback, useImperativeHandle, useLayoutEffect, useMemo, useRef, useState } from 'react';
5
+ import { createPortal } from 'react-dom';
5
6
  import { COLOR } from '../../../../constant/color';
6
7
  import { useDropdown, useScrollLock } from '../../../hooks/dropdown';
8
+ import { useFloatingPosition } from '../../../hooks/useFloatingPosition';
9
+ import { usePortalState } from '../../../hooks/usePortalState';
7
10
  import { useMultiSelect } from '../../../utils/dropdown/multiSelect';
8
11
  import { Tag } from '../../feedback-and-status/tag';
9
12
  import { SelectDropdown } from '../../select-dropdown';
@@ -54,7 +57,9 @@ function DisplayValue(_ref) {
54
57
  })]
55
58
  });
56
59
  }
57
- const SelectBox = /*#__PURE__*/forwardRef((_ref2, ref) => {
60
+ const SelectBox = /*#__PURE__*/forwardRef((_ref2, ref
61
+ // biome-ignore lint/complexity/noExcessiveCognitiveComplexity: 옵션/멀티/태그/포탈 등 필수 분기 통합
62
+ ) => {
58
63
  let {
59
64
  placeholder = '선택하세요',
60
65
  disabledPlaceholder = false,
@@ -68,7 +73,9 @@ const SelectBox = /*#__PURE__*/forwardRef((_ref2, ref) => {
68
73
  disabled = false,
69
74
  maxHeight = DEFAULT_MAX_HEIGHT,
70
75
  multiple = false,
76
+ maxSelection,
71
77
  align = 'left',
78
+ usePortal,
72
79
  id,
73
80
  className,
74
81
  children,
@@ -79,6 +86,10 @@ const SelectBox = /*#__PURE__*/forwardRef((_ref2, ref) => {
79
86
  } = _ref2;
80
87
  const internalRef = useRef(null);
81
88
  const dropdownRef = useRef(null);
89
+ const {
90
+ shouldPortal,
91
+ portalContainer
92
+ } = usePortalState(usePortal);
82
93
  const [selectedTags, setSelectedTags] = useState([]);
83
94
  const selectedOption = useMemo(() => {
84
95
  if (multiple) return null;
@@ -92,6 +103,13 @@ const SelectBox = /*#__PURE__*/forwardRef((_ref2, ref) => {
92
103
  }, [multiple, selectedOption, placeholder]);
93
104
  const handleOptionSelect = option => {
94
105
  if (disabled) return;
106
+ if (multiple) {
107
+ const newValue = tryToggle(option.id, Array.isArray(value) ? value : []);
108
+ if (newValue === null) return;
109
+ onChange?.(newValue);
110
+ notifyRegister(register, newValue, multiple);
111
+ return;
112
+ }
95
113
  const newValue = computeNewValue(option, value, multiple);
96
114
  onChange?.(newValue);
97
115
  notifyRegister(register, newValue, multiple);
@@ -134,8 +152,12 @@ const SelectBox = /*#__PURE__*/forwardRef((_ref2, ref) => {
134
152
  buttonText: selectAllButtonText,
135
153
  toggleSelectAll,
136
154
  getSelectedTagsData,
137
- removeTag
138
- } = useMultiSelect(currentSelectedValues, optionItems);
155
+ removeTag,
156
+ isMaxSelectionActive,
157
+ tryToggle
158
+ } = useMultiSelect(currentSelectedValues, optionItems, {
159
+ maxSelection
160
+ });
139
161
  const handleSelectAll = () => {
140
162
  if (!multiple || !onChange) return;
141
163
  const newSelectedValues = toggleSelectAll();
@@ -160,13 +182,53 @@ const SelectBox = /*#__PURE__*/forwardRef((_ref2, ref) => {
160
182
  }
161
183
  };
162
184
  useScrollLock(isOpen, dropdownRef);
185
+ // biome-ignore lint/correctness/useExhaustiveDependencies: optionItems 변경 시 너비 재계산 필요
163
186
  useLayoutEffect(() => {
164
187
  if (autoWidth && isOpen && dropdownRef.current && internalRef.current) {
165
188
  const dropdownWidth = dropdownRef.current.offsetWidth;
166
189
  internalRef.current.style.width = `${dropdownWidth}px`;
167
190
  }
168
191
  }, [autoWidth, isOpen, optionItems]);
192
+ const floatingStyle = useFloatingPosition({
193
+ enabled: shouldPortal,
194
+ isOpen,
195
+ triggerRef: internalRef,
196
+ floatingRef: dropdownRef,
197
+ direction: dropdownDirection,
198
+ align,
199
+ matchTriggerWidth: true
200
+ });
201
+ // biome-ignore lint/style/noNonNullAssertion: forwardRef 패턴에서 internalRef는 항상 존재
169
202
  useImperativeHandle(ref, () => internalRef.current, []);
203
+ const selectDropdownNode = _jsx(SelectDropdown, {
204
+ ref: dropdownRef,
205
+ isOpen: isOpen,
206
+ direction: dropdownDirection,
207
+ size: size,
208
+ options: optionItems,
209
+ value: value,
210
+ focusedIndex: focusedIndex,
211
+ maxHeight: maxHeight,
212
+ listboxId: `selectbox-options-${id || 'default'}`,
213
+ multiple: multiple,
214
+ showFooterButtons: multiple,
215
+ selectAllButtonText: selectAllButtonText,
216
+ showSelectAllAction: !isMaxSelectionActive,
217
+ componentType: "selectbox",
218
+ isKeyboardNavigation: isKeyboardNavigation,
219
+ activeDescendantId: activeDescendantId,
220
+ align: align,
221
+ className: shouldPortal ? 'ncua-select-dropdown--portal' : undefined,
222
+ style: shouldPortal && floatingStyle ? floatingStyle : undefined,
223
+ onOptionSelect: handleDropdownSelect,
224
+ onMouseMove: handleMouseMove,
225
+ onOptionHover: handleOptionHover,
226
+ onSelectAll: handleSelectAll,
227
+ onEdit: handleEdit,
228
+ onComplete: handleComplete,
229
+ children: children
230
+ });
231
+ const portaledDropdown = shouldPortal && portalContainer && isOpen ? /*#__PURE__*/createPortal(selectDropdownNode, portalContainer) : null;
170
232
  return _jsxs(_Fragment, {
171
233
  children: [_jsxs("div", {
172
234
  ref: internalRef,
@@ -205,31 +267,7 @@ const SelectBox = /*#__PURE__*/forwardRef((_ref2, ref) => {
205
267
  'ncua-selectbox__arrow--up': isOpen
206
268
  })
207
269
  })]
208
- }), _jsx(SelectDropdown, {
209
- ref: dropdownRef,
210
- isOpen: isOpen,
211
- direction: dropdownDirection,
212
- size: size,
213
- options: optionItems,
214
- value: value,
215
- focusedIndex: focusedIndex,
216
- maxHeight: maxHeight,
217
- listboxId: `selectbox-options-${id || 'default'}`,
218
- multiple: multiple,
219
- showFooterButtons: multiple,
220
- selectAllButtonText: selectAllButtonText,
221
- componentType: "selectbox",
222
- isKeyboardNavigation: isKeyboardNavigation,
223
- activeDescendantId: activeDescendantId,
224
- align: align,
225
- onOptionSelect: handleDropdownSelect,
226
- onMouseMove: handleMouseMove,
227
- onOptionHover: handleOptionHover,
228
- onSelectAll: handleSelectAll,
229
- onEdit: handleEdit,
230
- onComplete: handleComplete,
231
- children: children
232
- })]
270
+ }), !shouldPortal && selectDropdownNode]
233
271
  }), hintText && _jsx(HintText, {
234
272
  destructive: destructive,
235
273
  className: "ncua-hint-text",
@@ -247,7 +285,7 @@ const SelectBox = /*#__PURE__*/forwardRef((_ref2, ref) => {
247
285
  close: true,
248
286
  onButtonClick: () => handleRemoveTag(tag.id)
249
287
  }, tag.id))
250
- })]
288
+ }), portaledDropdown]
251
289
  });
252
290
  });
253
291
  SelectBox.displayName = 'SelectBox';
@@ -7,6 +7,9 @@ import { autoScrollForElements } from '@atlaskit/pragmatic-drag-and-drop-auto-sc
7
7
  import { attachClosestEdge, extractClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';
8
8
  import { DotsGrid02, DotsVertical, Eye, EyeOff } from '@ncds/ui-admin-icon';
9
9
  import { useEffect, useLayoutEffect, useRef, useState } from 'react';
10
+ import { createPortal } from 'react-dom';
11
+ import { useFloatingPosition } from '../../../hooks/useFloatingPosition';
12
+ import { usePortalState } from '../../../hooks/usePortalState';
10
13
  import { Button } from '../../action/button';
11
14
  import { applyDraftToItems, arrayReorderByEdge, hasDraftChanged, initDraftState } from './utils';
12
15
  const DROPDOWN_ID_RADIX = 36;
@@ -143,6 +146,7 @@ const SortableConfigItem = _ref => {
143
146
  })]
144
147
  });
145
148
  };
149
+ // biome-ignore lint/complexity/noExcessiveCognitiveComplexity: 액션/설정 두 variant 통합 + drag-and-drop 필수 분기
146
150
  export const Dropdown = props => {
147
151
  const {
148
152
  trigger,
@@ -151,14 +155,28 @@ export const Dropdown = props => {
151
155
  groups,
152
156
  className,
153
157
  opened = false,
154
- closeOnClickOutside = true
158
+ closeOnClickOutside = true,
159
+ usePortal
155
160
  } = props;
156
161
  const variant = props.variant ?? 'action';
157
162
  const closeOnClickItem = variant === 'action' ? props.closeOnClickItem ?? true : false;
158
163
  const [isOpen, setIsOpen] = useState(opened);
159
164
  const dropdownRef = useRef(null);
160
165
  const triggerRef = useRef(null);
166
+ const menuRef = useRef(null);
161
167
  const menuItemsRef = useRef(null);
168
+ const {
169
+ shouldPortal,
170
+ portalContainer
171
+ } = usePortalState(usePortal);
172
+ const floatingStyle = useFloatingPosition({
173
+ enabled: shouldPortal,
174
+ isOpen,
175
+ triggerRef,
176
+ floatingRef: menuRef,
177
+ direction: 'down',
178
+ align
179
+ });
162
180
  const dropdownIdRef = useRef(`ncua-dropdown-${Math.random().toString(DROPDOWN_ID_RADIX).slice(DROPDOWN_ID_SLICE_START, DROPDOWN_ID_SLICE_END)}`);
163
181
  const dropdownId = dropdownIdRef.current;
164
182
  useEffect(() => {
@@ -221,7 +239,10 @@ export const Dropdown = props => {
221
239
  triggerRef.current?.focus();
222
240
  };
223
241
  const handleClickOutside = event => {
224
- if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
242
+ const target = event.target;
243
+ const insideContainer = dropdownRef.current?.contains(target) ?? false;
244
+ const insidePortaledMenu = menuRef.current?.contains(target) ?? false;
245
+ if (!insideContainer && !insidePortaledMenu) {
225
246
  setIsOpen(false);
226
247
  }
227
248
  };
@@ -233,6 +254,7 @@ export const Dropdown = props => {
233
254
  }
234
255
  }
235
256
  };
257
+ // biome-ignore lint/correctness/useExhaustiveDependencies: handleClickOutside는 안정적 참조
236
258
  useEffect(() => {
237
259
  if (closeOnClickOutside) {
238
260
  document.addEventListener('mousedown', handleClickOutside);
@@ -242,6 +264,7 @@ export const Dropdown = props => {
242
264
  }
243
265
  }, [closeOnClickOutside]);
244
266
  // ESC 키로 닫고 trigger로 포커스 복귀
267
+ // biome-ignore lint/correctness/useExhaustiveDependencies: closeAndRestoreFocus는 안정적 참조
245
268
  useEffect(() => {
246
269
  if (!isOpen) return;
247
270
  const handleEsc = event => {
@@ -422,25 +445,30 @@ export const Dropdown = props => {
422
445
  });
423
446
  };
424
447
  const dropdownClasses = ['ncua-dropdown', className, align === 'right' ? 'ncua-dropdown--right' : ''].filter(Boolean).join(' ');
448
+ const menuClasses = ['ncua-dropdown__menu', shouldPortal ? 'ncua-dropdown__menu--portal' : ''].filter(Boolean).join(' ');
449
+ const menuNode = isOpen ? _jsxs("div", {
450
+ ref: menuRef,
451
+ className: menuClasses,
452
+ role: variant === 'config' ? 'dialog' : 'menu',
453
+ "aria-label": variant === 'config' ? '설정' : undefined,
454
+ style: shouldPortal && floatingStyle ? floatingStyle : undefined,
455
+ children: [renderHeader(), _jsx("div", {
456
+ ref: menuItemsRef,
457
+ className: "ncua-dropdown__menu-items",
458
+ children: groups.map(group => {
459
+ // config variant uses draft.order to drive the rendered order
460
+ const orderedItems = variant === 'config' && draft ? draft.order.map(id => group.items.find(i => i.id === id)).filter(i => i !== undefined) : group.items;
461
+ return _jsx("div", {
462
+ className: "ncua-dropdown__group",
463
+ children: orderedItems.map(item => variant === 'config' ? renderConfigItem(item, group.sortable === true) : renderActionItem(item))
464
+ }, group.items[0]?.id);
465
+ })
466
+ }), renderFooter()]
467
+ }) : null;
468
+ const portaledMenu = shouldPortal && portalContainer && menuNode ? /*#__PURE__*/createPortal(menuNode, portalContainer) : null;
425
469
  return _jsxs("div", {
426
470
  className: dropdownClasses,
427
471
  ref: dropdownRef,
428
- children: [renderTrigger(), isOpen && _jsxs("div", {
429
- className: "ncua-dropdown__menu",
430
- role: variant === 'config' ? 'dialog' : 'menu',
431
- "aria-label": variant === 'config' ? '설정' : undefined,
432
- children: [renderHeader(), _jsx("div", {
433
- ref: menuItemsRef,
434
- className: "ncua-dropdown__menu-items",
435
- children: groups.map(group => {
436
- // config variant uses draft.order to drive the rendered order
437
- const orderedItems = variant === 'config' && draft ? draft.order.map(id => group.items.find(i => i.id === id)).filter(i => i !== undefined) : group.items;
438
- return _jsx("div", {
439
- className: "ncua-dropdown__group",
440
- children: orderedItems.map(item => variant === 'config' ? renderConfigItem(item, group.sortable === true) : renderActionItem(item))
441
- }, group.items[0]?.id);
442
- })
443
- }), renderFooter()]
444
- })]
472
+ children: [renderTrigger(), !shouldPortal && menuNode, portaledMenu]
445
473
  });
446
474
  };
@@ -0,0 +1,19 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import classNames from 'classnames';
3
+ import { forwardRef } from 'react';
4
+ const CalloutNotification = /*#__PURE__*/forwardRef((_ref, ref) => {
5
+ let {
6
+ color = 'neutral',
7
+ className,
8
+ title,
9
+ ...rest
10
+ } = _ref;
11
+ return _jsx("div", {
12
+ ref: ref,
13
+ className: classNames('ncua-callout-notification', `ncua-callout-notification--${color}`, className),
14
+ ...rest,
15
+ children: title
16
+ });
17
+ });
18
+ CalloutNotification.displayName = 'CalloutNotification';
19
+ export { CalloutNotification };
@@ -1,19 +1,64 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { AlertCircle, AlertTriangle, CheckCircle, Pin02 } from '@ncds/ui-admin-icon';
3
3
  import classNames from 'classnames';
4
- import { forwardRef, useEffect, useRef, useState } from 'react';
4
+ import { forwardRef, useEffect, useId, useRef, useState } from 'react';
5
+ import { createPortal } from 'react-dom';
5
6
  import { MEDIA_QUERY } from '../../../constant/breakpoint';
6
7
  import { useMediaQuery } from '../../../hooks/useMediaQuery';
7
8
  import { Button } from '../../action/button';
8
9
  import { ButtonCloseX } from '../../action/button/ButtonCloseX';
9
10
  import { FeaturedIcon } from '../../image-and-icons/featured-icon/FeaturedIcon';
11
+ // 호스트 싱글톤은 vanilla/React 양쪽이 동일한 함수를 공유한다 — host.ts 가 가까운 진입점 역할을
12
+ // 하므로 React 컴포넌트는 deep relative path 로 vanilla internals 를 직접 import 하지 않는다.
13
+ import { mountFloatingNotificationHost } from './host';
14
+ /**
15
+ * 색상별 a11y role.
16
+ * - error/warning → role="alert" (implicit aria-live="assertive": 즉시 발화)
17
+ * - 그 외 → role="status" (implicit aria-live="polite": 현재 발화 끝난 후 발화)
18
+ * role 이 implicit live-region 을 가져오므로 호스트 컨테이너에는 aria-live 를 두지 않는다.
19
+ */
20
+ const ASSERTIVE_COLORS = {
21
+ error: true,
22
+ warning: true
23
+ };
10
24
  const iconMap = {
11
25
  neutral: Pin02,
12
26
  error: AlertTriangle,
13
27
  warning: AlertCircle,
14
28
  success: CheckCircle
15
- // info는 floating에서는 지원하지 않음
29
+ // info full-width 전용이라 floating 아이콘 매핑 없음.
30
+ };
31
+ /**
32
+ * NotificationColor → FeaturedIconColor 매핑.
33
+ * `info` 는 FeaturedIconColor 에 존재하지 않으므로 `neutral` 로 안전 fallback.
34
+ * `satisfies` 가 매핑 누락을 컴파일 타임에 강제하므로 향후 색상이 추가되면 즉시 타입 에러로 잡힌다.
35
+ */
36
+ const iconColorMap = {
37
+ neutral: 'neutral',
38
+ error: 'error',
39
+ warning: 'warning',
40
+ success: 'success',
41
+ info: 'neutral'
16
42
  };
43
+ /**
44
+ * `.ncua-floating-notification-host` 싱글톤을 보장하고 반환하는 훅.
45
+ *
46
+ * 이름의 `useMount...` 는 단순 조회가 아닌 **DOM 부수효과** 를 동반함을 신호한다 —
47
+ * 내부적으로 `mountFloatingNotificationHost()` 를 호출해 document.body 에 호스트를 append 하고
48
+ * (없으면) 글로벌 scroll/resize/MutationObserver 까지 부착한다. 호스트는 페이지 lifetime
49
+ * 싱글톤이므로 언마운트 시 제거하지 않는다.
50
+ *
51
+ * `mountFloatingNotificationHost` 는 **동기 함수** 이므로 effect 안의 호출 → setHost 가 같은 tick
52
+ * 에 끝나 cancellation race 가 없다. cancel flag 는 의미 없어 두지 않는다.
53
+ */
54
+ function useMountFloatingNotificationHost(enabled) {
55
+ const [host, setHost] = useState(null);
56
+ useEffect(() => {
57
+ if (!enabled) return;
58
+ setHost(mountFloatingNotificationHost());
59
+ }, [enabled]);
60
+ return host;
61
+ }
17
62
  const FloatingNotification = /*#__PURE__*/forwardRef((_ref, ref) => {
18
63
  let {
19
64
  title,
@@ -23,49 +68,65 @@ const FloatingNotification = /*#__PURE__*/forwardRef((_ref, ref) => {
23
68
  className,
24
69
  actions,
25
70
  autoClose = 0,
71
+ portal = false,
26
72
  ...rest
27
73
  } = _ref;
28
74
  const [shouldRemove, setShouldRemove] = useState(false);
29
- const iconColor = color;
30
75
  const featuredIconProps = {
31
76
  icon: iconMap[color] || Pin02,
32
77
  size: 'sm',
33
- color: iconColor,
78
+ color: iconColorMap[color],
34
79
  theme: 'dark-circle'
35
80
  };
36
81
  const isMobile = useMediaQuery(MEDIA_QUERY.mobile, {
37
82
  onMatched: onClose
38
83
  });
84
+ // onClose 는 매 렌더 새 함수 ref 일 수 있으므로 ref 로 latest 만 보관.
85
+ // → autoClose 타이머 effect 의 deps 에서 onClose 를 빼서 타이머 재시작 회피.
86
+ // render 본문에서 직접 할당 — useEffect 로 미루면 같은 commit 안에서 fire 되는 타이머가 stale onClose 를 볼 위험.
87
+ const onCloseRef = useRef(onClose);
88
+ onCloseRef.current = onClose;
39
89
  // autoClose 타이머 관리
40
90
  const timerRef = useRef(null);
91
+ // onClose 는 onCloseRef 로 latest 만 추적하므로 deps 에서 제외 (의도된 패턴).
41
92
  useEffect(() => {
42
- // autoClose가 0보다 크면 무조건 타이머 설정
93
+ // autoClose 가 0 보다 크면 타이머 설정.
43
94
  if (autoClose > 0) {
44
95
  timerRef.current = setTimeout(() => {
45
- if (onClose) {
46
- onClose();
47
- }
48
- // DOM에서 바로 제거
96
+ onCloseRef.current?.();
97
+ // DOM 에서 바로 제거
49
98
  setShouldRemove(true);
50
99
  }, autoClose);
51
100
  }
52
- // cleanup 함수: 컴포넌트 언마운트 시 타이머 정리
101
+ // cleanup: 컴포넌트 언마운트 또는 autoClose 변경 시 타이머 정리
53
102
  return () => {
54
103
  if (timerRef.current) {
55
104
  clearTimeout(timerRef.current);
56
105
  timerRef.current = null;
57
106
  }
58
107
  };
59
- }, [autoClose, onClose]);
108
+ }, [autoClose]);
109
+ // portal=true 일 때만 호스트가 필요하다.
110
+ const host = useMountFloatingNotificationHost(portal);
111
+ // a11y — 카드 root 의 role 과 제목/본문 ID. 색상에 따라 alert(error/warning) / status(나머지) 로 분기.
112
+ const reactId = useId();
113
+ const titleId = `${reactId}-title`;
114
+ const descId = `${reactId}-desc`;
115
+ const role = ASSERTIVE_COLORS[color] ? 'alert' : 'status';
60
116
  // DOM에서 완전히 제거
61
117
  if (shouldRemove) {
62
118
  return null;
63
119
  }
64
- return _jsxs("div", {
120
+ const card =
121
+ // a11y/예측가능성 — caller 가 className/id 등 일부는 덮어쓸 수 있게 {...rest} 를 먼저 펼치고,
122
+ // role/aria-labelledby/aria-describedby 같은 컴포넌트 본질 prop 은 그 뒤에 두어 우선 적용.
123
+ _jsxs("div", {
124
+ ...rest,
65
125
  ref: ref,
66
126
  className: classNames('ncua-floating-notification', `ncua-floating-notification--${color}`, className),
67
- role: "alert",
68
- ...rest,
127
+ role: role,
128
+ "aria-labelledby": titleId,
129
+ "aria-describedby": supportingText ? descId : undefined,
69
130
  children: [_jsx("div", {
70
131
  className: "ncua-floating-notification__content",
71
132
  children: _jsxs("div", {
@@ -78,10 +139,12 @@ const FloatingNotification = /*#__PURE__*/forwardRef((_ref, ref) => {
78
139
  children: [_jsx("div", {
79
140
  className: "ncua-floating-notification__title-wrapper",
80
141
  children: _jsx("span", {
142
+ id: titleId,
81
143
  className: "ncua-floating-notification__title",
82
144
  children: title
83
145
  })
84
146
  }), supportingText && _jsx("span", {
147
+ id: descId,
85
148
  className: "ncua-floating-notification__supporting-text",
86
149
  children: supportingText
87
150
  }), actions && _jsx("div", {
@@ -102,5 +165,14 @@ const FloatingNotification = /*#__PURE__*/forwardRef((_ref, ref) => {
102
165
  onClick: onClose
103
166
  })]
104
167
  });
168
+ // 기본은 인라인 렌더 — 부모 JSX 트리에 카드를 그대로 둔다.
169
+ if (!portal) {
170
+ return card;
171
+ }
172
+ // portal=true 인데 SSR이거나 첫 렌더(호스트 미생성)에서는 null. useEffect 후 host 설정되면 재렌더되어 portal 마운트.
173
+ if (!host) {
174
+ return null;
175
+ }
176
+ return /*#__PURE__*/createPortal(card, host);
105
177
  });
106
178
  export { FloatingNotification };
@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { forwardRef } from 'react';
3
+ import { CalloutNotification } from './CalloutNotification';
3
4
  import { FloatingNotification } from './FloatingNotification';
4
5
  import { FullWidthNotification } from './FullWidthNotification';
5
6
  import { MessageNotification } from './MessageNotification';
@@ -30,6 +31,12 @@ const Notification = /*#__PURE__*/forwardRef((_ref, ref) => {
30
31
  ref: ref
31
32
  });
32
33
  }
34
+ if (type === 'callout') {
35
+ return _jsx(CalloutNotification, {
36
+ color: color,
37
+ ...rest
38
+ });
39
+ }
33
40
  return null;
34
41
  });
35
42
  Notification.displayName = 'Notification';
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Floating Notification 호스트 관리 — React 측 진입점.
3
+ *
4
+ * 실제 구현은 vanilla/React 가 공유하는 `assets/scripts/notification/positionSync.ts` 에 있고,
5
+ * 외부 노출은 그 폴더의 public barrel(`assets/scripts/notification/index.ts`)이 담당한다.
6
+ * 이 모듈은 React 컴포넌트가 vanilla 내부 파일을 직접 참조하지 않도록 barrel 을 경유하는
7
+ * 한 단계 re-export 만 제공한다 — positionSync.ts 의 위치/이름이 바뀌어도 host.ts 만 영향.
8
+ */
9
+ export { mountFloatingNotificationHost } from '../../../../assets/scripts/notification';
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { AlertCircle, AlertCircleFill, HelpCircle, HelpCircleFill } from '@ncds/ui-admin-icon';
3
3
  import classNames from 'classnames';
4
4
  import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
@@ -70,6 +70,42 @@ const computePanelCoords = (prefer, anchor, panel) => {
70
70
  calculatedPosition
71
71
  };
72
72
  };
73
+ const buildPanelStyle = (disablePortal, coords, visible, zIndex) => {
74
+ const opacity = visible ? 1 : 0;
75
+ if (disablePortal) return {
76
+ opacity
77
+ };
78
+ return {
79
+ top: `${coords.top}px`,
80
+ left: `${coords.left}px`,
81
+ opacity,
82
+ ...(zIndex && {
83
+ zIndex
84
+ })
85
+ };
86
+ };
87
+ const renderIcon = (iconStyle, iconType, iconSize, iconColor) => {
88
+ if (iconStyle === 'help-circle') {
89
+ return iconType === 'stroke' ? _jsx(HelpCircle, {
90
+ width: iconSize,
91
+ height: iconSize,
92
+ color: iconColor
93
+ }) : _jsx(HelpCircleFill, {
94
+ width: iconSize,
95
+ height: iconSize,
96
+ color: iconColor
97
+ });
98
+ }
99
+ return iconType === 'stroke' ? _jsx(AlertCircle, {
100
+ width: iconSize,
101
+ height: iconSize,
102
+ color: iconColor
103
+ }) : _jsx(AlertCircleFill, {
104
+ width: iconSize,
105
+ height: iconSize,
106
+ color: iconColor
107
+ });
108
+ };
73
109
  export const Tooltip = _ref => {
74
110
  let {
75
111
  tooltipType = 'white',
@@ -83,7 +119,9 @@ export const Tooltip = _ref => {
83
119
  iconColor = 'var(--gray-300)',
84
120
  iconStyle = 'help-circle',
85
121
  className,
86
- zIndex
122
+ zIndex,
123
+ forceVisible,
124
+ disablePortal = false
87
125
  } = _ref;
88
126
  const iconSize = size === 'sm' ? ICON_SIZE_SM : ICON_SIZE_DEFAULT;
89
127
  const anchorRef = useRef(null);
@@ -97,6 +135,7 @@ export const Tooltip = _ref => {
97
135
  const [calculatedPosition, setCalculatedPosition] = useState(position === 'auto' ? 'bottom' : position);
98
136
  const [isVisible, setIsVisible] = useState(false);
99
137
  const [isManuallyClose, setIsManuallyClose] = useState(false);
138
+ const effectiveVisible = forceVisible ?? isVisible;
100
139
  useEffect(() => {
101
140
  setMounted(true);
102
141
  return () => {
@@ -107,7 +146,7 @@ export const Tooltip = _ref => {
107
146
  };
108
147
  }, []);
109
148
  const updatePosition = useCallback(() => {
110
- if (!anchorRef.current || !panelRef.current) return;
149
+ if (disablePortal || !anchorRef.current || !panelRef.current) return;
111
150
  const anchor = anchorRef.current.getBoundingClientRect();
112
151
  const panel = panelRef.current.getBoundingClientRect();
113
152
  const next = computePanelCoords(position, anchor, panel);
@@ -116,9 +155,9 @@ export const Tooltip = _ref => {
116
155
  left: next.left
117
156
  });
118
157
  setCalculatedPosition(next.calculatedPosition);
119
- }, [position]);
158
+ }, [position, disablePortal]);
120
159
  useEffect(() => {
121
- if (!isVisible) return;
160
+ if (!effectiveVisible || disablePortal) return;
122
161
  updatePosition();
123
162
  window.addEventListener('resize', updatePosition, {
124
163
  passive: true
@@ -133,13 +172,10 @@ export const Tooltip = _ref => {
133
172
  capture: true
134
173
  });
135
174
  };
136
- }, [isVisible, updatePosition]);
175
+ }, [effectiveVisible, updatePosition, disablePortal]);
137
176
  const handleMouseEnter = useCallback(() => {
138
177
  if (isManuallyClose) return;
139
- // opacity 전환 전에 좌표 확정 (ref 가드는 updatePosition 내부)
140
178
  updatePosition();
141
- // 웹폰트 로드·max-content 재계산 등 비동기 layout 안정화 후 한 번 더 보정
142
- // 빠른 hover in/out 시 이전 프레임 요청은 취소해 중복/unmount 후 실행 방지
143
179
  if (rafIdRef.current !== null) cancelAnimationFrame(rafIdRef.current);
144
180
  rafIdRef.current = requestAnimationFrame(() => {
145
181
  rafIdRef.current = null;
@@ -163,18 +199,13 @@ export const Tooltip = _ref => {
163
199
  'ncua-tooltip--stroke': iconType === 'stroke',
164
200
  'ncua-tooltip--auto': position === 'auto'
165
201
  }, className), [size, type, hideArrow, iconType, position, className]);
166
- const panelClassName = useMemo(() => classNames('ncua-tooltip-panel', 'ncua-tooltip__bg', `ncua-tooltip__bg--${tooltipType}`, `ncua-tooltip__bg--${finalPosition}`, {
167
- 'ncua-tooltip__bg--visible': isVisible,
168
- 'ncua-tooltip__bg--force-hidden': isManuallyClose
169
- }), [tooltipType, finalPosition, isVisible, isManuallyClose]);
170
- const panelStyle = {
171
- top: `${coords.top}px`,
172
- left: `${coords.left}px`,
173
- opacity: isVisible ? 1 : 0,
174
- ...(zIndex && {
175
- zIndex
176
- })
177
- };
202
+ const panelClassName = useMemo(() => classNames({
203
+ 'ncua-tooltip-panel': !disablePortal
204
+ }, 'ncua-tooltip__bg', `ncua-tooltip__bg--${tooltipType}`, `ncua-tooltip__bg--${finalPosition}`, {
205
+ 'ncua-tooltip__bg--visible': effectiveVisible,
206
+ 'ncua-tooltip__bg--force-hidden': isManuallyClose && !forceVisible
207
+ }), [tooltipType, finalPosition, effectiveVisible, isManuallyClose, forceVisible, disablePortal]);
208
+ const panelStyle = buildPanelStyle(disablePortal, coords, effectiveVisible, zIndex);
178
209
  const portalTarget = mounted ? resolvePortalTarget() : null;
179
210
  const panel = _jsxs("span", {
180
211
  ref: panelRef,
@@ -194,29 +225,11 @@ export const Tooltip = _ref => {
194
225
  "aria-label": "\uD234\uD301 \uB2EB\uAE30"
195
226
  })]
196
227
  });
197
- return _jsxs(_Fragment, {
198
- children: [_jsxs("span", {
199
- ref: anchorRef,
200
- className: tooltipClassName,
201
- onMouseEnter: handleMouseEnter,
202
- onMouseLeave: handleMouseLeave,
203
- children: [iconStyle === 'help-circle' && (iconType === 'stroke' ? _jsx(HelpCircle, {
204
- width: iconSize,
205
- height: iconSize,
206
- color: iconColor
207
- }) : _jsx(HelpCircleFill, {
208
- width: iconSize,
209
- height: iconSize,
210
- color: iconColor
211
- })), iconStyle === 'alert-circle' && (iconType === 'stroke' ? _jsx(AlertCircle, {
212
- width: iconSize,
213
- height: iconSize,
214
- color: iconColor
215
- }) : _jsx(AlertCircleFill, {
216
- width: iconSize,
217
- height: iconSize,
218
- color: iconColor
219
- }))]
220
- }), portalTarget && /*#__PURE__*/createPortal(panel, portalTarget)]
228
+ return _jsxs("span", {
229
+ ref: anchorRef,
230
+ className: tooltipClassName,
231
+ onMouseEnter: handleMouseEnter,
232
+ onMouseLeave: handleMouseLeave,
233
+ children: [renderIcon(iconStyle, iconType, iconSize, iconColor), disablePortal ? panel : portalTarget && /*#__PURE__*/createPortal(panel, portalTarget)]
221
234
  });
222
235
  };