@sia.soul/sia-react-ui 0.1.40 → 0.1.41

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.
@@ -852,15 +852,15 @@ declare const Dropdown: typeof DropdownRoot & {
852
852
  Button: typeof DropdownButton;
853
853
  };
854
854
 
855
- /** Floating的位置类型。 */
856
- type FloatingPlacement = "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "right";
855
+ /** 气泡十二个方向;start/end 为对应边的起点/终点对齐,同时支持 topLeft、leftTop 等驼峰别名。 */
856
+ type FloatingPlacement = "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end" | "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom";
857
857
  /** 触发浮层显示的交互方式。 */
858
858
  type FloatingTrigger = "hover" | "focus" | "click";
859
859
  /** 文字提示的属性配置。 */
860
860
  interface TooltipProps {
861
861
  /** 标题内容,可传入文本或 React 节点。 */
862
862
  title?: ReactNode;
863
- /** 子内容;组件嵌套内容或当前节点的子项。 */
863
+ /** 触发气泡的元素;定位以实际接收触发事件的 DOM 元素为准,初始打开时使用首个子元素。 */
864
864
  children: ReactElement;
865
865
  /** 相对于触发元素的弹出方向和对齐位置。 */
866
866
  placement?: FloatingPlacement;
@@ -876,8 +876,13 @@ interface TooltipProps {
876
876
  mouseEnterDelay?: number;
877
877
  /** 鼠标移出后延迟隐藏的时间。 */
878
878
  mouseLeaveDelay?: number;
879
- /** 显示箭头及是否指向触发器中心 */
880
- arrow?: boolean;
879
+ /** 是否显示箭头,默认 true;对象配置可让箭头指向触发元素中心。 */
880
+ arrow?: boolean | {
881
+ /** 是否指向触发元素中心,默认 false;空间受限时箭头限制在气泡边缘内。 */
882
+ pointAtCenter?: boolean;
883
+ };
884
+ /** 是否自动翻转和贴边偏移,默认 true;滚动时始终跟随触发元素,目标完全离开可视区域时隐藏气泡。 */
885
+ autoAdjustOverflow?: boolean;
881
886
  /** 显示颜色,可使用 CSS 颜色值。 */
882
887
  color?: string;
883
888
  /** 附加到组件根节点的 CSS 类名。 */
@@ -1119,7 +1124,7 @@ declare function Tree({ treeData, selectedKeys, defaultSelectedKeys, expandedKey
1119
1124
 
1120
1125
  /** 气泡确认的属性配置。 */
1121
1126
  interface PopconfirmProps {
1122
- /** 子内容;组件嵌套内容或当前节点的子项。 */
1127
+ /** 触发确认框的元素;默认在该元素上方居中显示,空间不足时自动避让。 */
1123
1128
  children: ReactElement;
1124
1129
  /** 标题内容,可传入文本或 React 节点。 */
1125
1130
  title: ReactNode;
@@ -1144,6 +1149,12 @@ interface PopconfirmProps {
1144
1149
  * @defaultValue "top"
1145
1150
  */
1146
1151
  placement?: FloatingPlacement;
1152
+ /** 是否显示箭头,默认 true;设置 { pointAtCenter: true } 时指向触发元素中心。 */
1153
+ arrow?: TooltipProps["arrow"];
1154
+ /** 是否自动翻转和贴边偏移,默认 true;滚动时跟随目标,目标完全离开可视区域时隐藏。 */
1155
+ autoAdjustOverflow?: boolean;
1156
+ /** 是否跳过气泡直接确认,默认 false;为 true 时仅点击触发元素会调用 onConfirm,disabled 优先,异步执行期间忽略重复点击。 */
1157
+ skipConfirm?: boolean;
1147
1158
  /**
1148
1159
  * 触发显示的交互方式。
1149
1160
  * @defaultValue "click"
@@ -1168,15 +1179,17 @@ interface PopconfirmProps {
1168
1179
  showCancel?: boolean;
1169
1180
  /** 显示在内容旁的图标节点,建议使用 Icon 组件。 */
1170
1181
  icon?: ReactNode;
1171
- /** 用户确认时调用;支持异步返回值,具体签名见类型。 */
1172
- onConfirm?: (event?: React.MouseEvent) => void | boolean | Promise<void | boolean>;
1173
- /** 用户取消或通过关闭入口退出时调用。 */
1182
+ /** 点击确定或跳过确认时调用,参数为点击事件;返回 false 保持打开,其余同步结果关闭。返回 Promise 时显示加载状态,成功且结果不为 false 时关闭;抛错或拒绝时保持打开并调用 onConfirmError。受控模式通过 onOpenChange 请求关闭,需外部更新 open。 */
1183
+ onConfirm?: (event?: React.MouseEvent) => void | boolean | PromiseLike<void | boolean>;
1184
+ /** 确认回调抛错或 Promise 拒绝时调用,参数为原始错误;可用于展示失败提示,默认保持气泡并恢复按钮,不自动展示错误文案。 */
1185
+ onConfirmError?: (error: unknown) => void;
1186
+ /** 点击取消按钮时调用,参数为点击事件;点击外部关闭不会触发此回调。 */
1174
1187
  onCancel?: (event?: React.MouseEvent) => void;
1175
1188
  /** 打开状态改变时触发,参数为新的打开状态。 */
1176
1189
  onOpenChange?: (open: boolean) => void;
1177
1190
  }
1178
1191
  /** 气泡确认组件。 */
1179
- declare function Popconfirm({ children, title, description, okText, cancelText, okButtonProps, cancelButtonProps, placement, trigger, open, defaultOpen, disabled, showCancel, icon, onConfirm, onCancel, onOpenChange, }: PopconfirmProps): react.JSX.Element;
1192
+ declare function Popconfirm({ children, title, description, okText, cancelText, okButtonProps, cancelButtonProps, placement, trigger, open, defaultOpen, disabled, showCancel, icon, onConfirm, onConfirmError, onCancel, onOpenChange, arrow, autoAdjustOverflow, skipConfirm, }: PopconfirmProps): react.JSX.Element;
1180
1193
  /** 进度的状态类型。 */
1181
1194
  type ProgressStatus = "normal" | "active" | "success" | "exception";
1182
1195
  /** 进度的属性配置。 */
@@ -852,15 +852,15 @@ declare const Dropdown: typeof DropdownRoot & {
852
852
  Button: typeof DropdownButton;
853
853
  };
854
854
 
855
- /** Floating的位置类型。 */
856
- type FloatingPlacement = "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "right";
855
+ /** 气泡十二个方向;start/end 为对应边的起点/终点对齐,同时支持 topLeft、leftTop 等驼峰别名。 */
856
+ type FloatingPlacement = "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end" | "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom";
857
857
  /** 触发浮层显示的交互方式。 */
858
858
  type FloatingTrigger = "hover" | "focus" | "click";
859
859
  /** 文字提示的属性配置。 */
860
860
  interface TooltipProps {
861
861
  /** 标题内容,可传入文本或 React 节点。 */
862
862
  title?: ReactNode;
863
- /** 子内容;组件嵌套内容或当前节点的子项。 */
863
+ /** 触发气泡的元素;定位以实际接收触发事件的 DOM 元素为准,初始打开时使用首个子元素。 */
864
864
  children: ReactElement;
865
865
  /** 相对于触发元素的弹出方向和对齐位置。 */
866
866
  placement?: FloatingPlacement;
@@ -876,8 +876,13 @@ interface TooltipProps {
876
876
  mouseEnterDelay?: number;
877
877
  /** 鼠标移出后延迟隐藏的时间。 */
878
878
  mouseLeaveDelay?: number;
879
- /** 显示箭头及是否指向触发器中心 */
880
- arrow?: boolean;
879
+ /** 是否显示箭头,默认 true;对象配置可让箭头指向触发元素中心。 */
880
+ arrow?: boolean | {
881
+ /** 是否指向触发元素中心,默认 false;空间受限时箭头限制在气泡边缘内。 */
882
+ pointAtCenter?: boolean;
883
+ };
884
+ /** 是否自动翻转和贴边偏移,默认 true;滚动时始终跟随触发元素,目标完全离开可视区域时隐藏气泡。 */
885
+ autoAdjustOverflow?: boolean;
881
886
  /** 显示颜色,可使用 CSS 颜色值。 */
882
887
  color?: string;
883
888
  /** 附加到组件根节点的 CSS 类名。 */
@@ -1119,7 +1124,7 @@ declare function Tree({ treeData, selectedKeys, defaultSelectedKeys, expandedKey
1119
1124
 
1120
1125
  /** 气泡确认的属性配置。 */
1121
1126
  interface PopconfirmProps {
1122
- /** 子内容;组件嵌套内容或当前节点的子项。 */
1127
+ /** 触发确认框的元素;默认在该元素上方居中显示,空间不足时自动避让。 */
1123
1128
  children: ReactElement;
1124
1129
  /** 标题内容,可传入文本或 React 节点。 */
1125
1130
  title: ReactNode;
@@ -1144,6 +1149,12 @@ interface PopconfirmProps {
1144
1149
  * @defaultValue "top"
1145
1150
  */
1146
1151
  placement?: FloatingPlacement;
1152
+ /** 是否显示箭头,默认 true;设置 { pointAtCenter: true } 时指向触发元素中心。 */
1153
+ arrow?: TooltipProps["arrow"];
1154
+ /** 是否自动翻转和贴边偏移,默认 true;滚动时跟随目标,目标完全离开可视区域时隐藏。 */
1155
+ autoAdjustOverflow?: boolean;
1156
+ /** 是否跳过气泡直接确认,默认 false;为 true 时仅点击触发元素会调用 onConfirm,disabled 优先,异步执行期间忽略重复点击。 */
1157
+ skipConfirm?: boolean;
1147
1158
  /**
1148
1159
  * 触发显示的交互方式。
1149
1160
  * @defaultValue "click"
@@ -1168,15 +1179,17 @@ interface PopconfirmProps {
1168
1179
  showCancel?: boolean;
1169
1180
  /** 显示在内容旁的图标节点,建议使用 Icon 组件。 */
1170
1181
  icon?: ReactNode;
1171
- /** 用户确认时调用;支持异步返回值,具体签名见类型。 */
1172
- onConfirm?: (event?: React.MouseEvent) => void | boolean | Promise<void | boolean>;
1173
- /** 用户取消或通过关闭入口退出时调用。 */
1182
+ /** 点击确定或跳过确认时调用,参数为点击事件;返回 false 保持打开,其余同步结果关闭。返回 Promise 时显示加载状态,成功且结果不为 false 时关闭;抛错或拒绝时保持打开并调用 onConfirmError。受控模式通过 onOpenChange 请求关闭,需外部更新 open。 */
1183
+ onConfirm?: (event?: React.MouseEvent) => void | boolean | PromiseLike<void | boolean>;
1184
+ /** 确认回调抛错或 Promise 拒绝时调用,参数为原始错误;可用于展示失败提示,默认保持气泡并恢复按钮,不自动展示错误文案。 */
1185
+ onConfirmError?: (error: unknown) => void;
1186
+ /** 点击取消按钮时调用,参数为点击事件;点击外部关闭不会触发此回调。 */
1174
1187
  onCancel?: (event?: React.MouseEvent) => void;
1175
1188
  /** 打开状态改变时触发,参数为新的打开状态。 */
1176
1189
  onOpenChange?: (open: boolean) => void;
1177
1190
  }
1178
1191
  /** 气泡确认组件。 */
1179
- declare function Popconfirm({ children, title, description, okText, cancelText, okButtonProps, cancelButtonProps, placement, trigger, open, defaultOpen, disabled, showCancel, icon, onConfirm, onCancel, onOpenChange, }: PopconfirmProps): react.JSX.Element;
1192
+ declare function Popconfirm({ children, title, description, okText, cancelText, okButtonProps, cancelButtonProps, placement, trigger, open, defaultOpen, disabled, showCancel, icon, onConfirm, onConfirmError, onCancel, onOpenChange, arrow, autoAdjustOverflow, skipConfirm, }: PopconfirmProps): react.JSX.Element;
1180
1193
  /** 进度的状态类型。 */
1181
1194
  type ProgressStatus = "normal" | "active" | "success" | "exception";
1182
1195
  /** 进度的属性配置。 */
package/dist/core.cjs CHANGED
@@ -2204,38 +2204,66 @@ var activeTooltipClose;
2204
2204
  function clampFloating(value, min, max) {
2205
2205
  return Math.min(Math.max(value, min), Math.max(min, max));
2206
2206
  }
2207
- function resolveFloatingPosition(trigger, overlay, placement) {
2207
+ function normalizeFloatingPlacement(placement) {
2208
+ const aliases = {
2209
+ topLeft: "top-start",
2210
+ topRight: "top-end",
2211
+ bottomLeft: "bottom-start",
2212
+ bottomRight: "bottom-end",
2213
+ leftTop: "left-start",
2214
+ leftBottom: "left-end",
2215
+ rightTop: "right-start",
2216
+ rightBottom: "right-end"
2217
+ };
2218
+ return aliases[placement] ?? placement;
2219
+ }
2220
+ function resolveFloatingPosition(trigger, overlay, placement, pointAtCenter, adjust) {
2208
2221
  const viewportWidth = document.documentElement.clientWidth;
2209
2222
  const viewportHeight = document.documentElement.clientHeight;
2210
- let resolvedPlacement = placement;
2211
- if (placement.startsWith("top") && trigger.top - overlay.height - FLOATING_GAP < FLOATING_VIEWPORT_PADDING && trigger.bottom + overlay.height + FLOATING_GAP <= viewportHeight - FLOATING_VIEWPORT_PADDING) {
2212
- resolvedPlacement = placement.replace("top", "bottom");
2213
- } else if (placement.startsWith("bottom") && trigger.bottom + overlay.height + FLOATING_GAP > viewportHeight - FLOATING_VIEWPORT_PADDING && trigger.top - overlay.height - FLOATING_GAP >= FLOATING_VIEWPORT_PADDING) {
2214
- resolvedPlacement = placement.replace("bottom", "top");
2215
- } else if (placement === "left" && trigger.left - overlay.width - FLOATING_GAP < FLOATING_VIEWPORT_PADDING && trigger.right + overlay.width + FLOATING_GAP <= viewportWidth - FLOATING_VIEWPORT_PADDING) {
2216
- resolvedPlacement = "right";
2217
- } else if (placement === "right" && trigger.right + overlay.width + FLOATING_GAP > viewportWidth - FLOATING_VIEWPORT_PADDING && trigger.left - overlay.width - FLOATING_GAP >= FLOATING_VIEWPORT_PADDING) {
2218
- resolvedPlacement = "left";
2223
+ let resolvedPlacement = normalizeFloatingPlacement(placement);
2224
+ const side = resolvedPlacement.split("-")[0];
2225
+ const available = { top: trigger.top, bottom: viewportHeight - trigger.bottom, left: trigger.left, right: viewportWidth - trigger.right };
2226
+ const opposite = { top: "bottom", bottom: "top", left: "right", right: "left" };
2227
+ const preferred = side;
2228
+ const other = opposite[preferred];
2229
+ const needed = (side === "top" || side === "bottom" ? overlay.height : overlay.width) + FLOATING_GAP + FLOATING_VIEWPORT_PADDING;
2230
+ if (adjust && available[preferred] < needed && available[other] > available[preferred]) {
2231
+ resolvedPlacement = resolvedPlacement.replace(preferred, other);
2219
2232
  }
2220
- let top = trigger.top;
2221
- let left = trigger.left;
2222
- if (resolvedPlacement.startsWith("top") || resolvedPlacement.startsWith("bottom")) {
2223
- top = resolvedPlacement.startsWith("top") ? trigger.top - overlay.height - FLOATING_GAP : trigger.bottom + FLOATING_GAP;
2224
- left = resolvedPlacement.endsWith("-start") ? trigger.left : resolvedPlacement.endsWith("-end") ? trigger.right - overlay.width : trigger.left + (trigger.width - overlay.width) / 2;
2225
- } else {
2226
- top = trigger.top + (trigger.height - overlay.height) / 2;
2227
- left = resolvedPlacement === "left" ? trigger.left - overlay.width - FLOATING_GAP : trigger.right + FLOATING_GAP;
2233
+ const vertical = resolvedPlacement.startsWith("top") || resolvedPlacement.startsWith("bottom");
2234
+ const start = resolvedPlacement.endsWith("-start");
2235
+ const end = resolvedPlacement.endsWith("-end");
2236
+ let top = vertical ? resolvedPlacement.startsWith("top") ? trigger.top - overlay.height - FLOATING_GAP : trigger.bottom + FLOATING_GAP : start ? trigger.top : end ? trigger.bottom - overlay.height : trigger.top + (trigger.height - overlay.height) / 2;
2237
+ let left = vertical ? start ? trigger.left : end ? trigger.right - overlay.width : trigger.left + (trigger.width - overlay.width) / 2 : resolvedPlacement.startsWith("left") ? trigger.left - overlay.width - FLOATING_GAP : trigger.right + FLOATING_GAP;
2238
+ if (adjust) {
2239
+ if (vertical) left = clampFloating(left, FLOATING_VIEWPORT_PADDING, viewportWidth - overlay.width - FLOATING_VIEWPORT_PADDING);
2240
+ else top = clampFloating(top, FLOATING_VIEWPORT_PADDING, viewportHeight - overlay.height - FLOATING_VIEWPORT_PADDING);
2228
2241
  }
2229
- top = clampFloating(top, FLOATING_VIEWPORT_PADDING, viewportHeight - overlay.height - FLOATING_VIEWPORT_PADDING);
2230
- left = clampFloating(left, FLOATING_VIEWPORT_PADDING, viewportWidth - overlay.width - FLOATING_VIEWPORT_PADDING);
2231
2242
  const result = { top, left, placement: resolvedPlacement };
2232
- if (resolvedPlacement.startsWith("top") || resolvedPlacement.startsWith("bottom")) {
2233
- result.arrowX = resolvedPlacement.endsWith("-start") ? clampFloating(FLOATING_ARROW_EDGE_OFFSET, 8, overlay.width - 16) : resolvedPlacement.endsWith("-end") ? clampFloating(overlay.width - FLOATING_ARROW_EDGE_OFFSET - 8, 8, overlay.width - 16) : clampFloating(trigger.left + trigger.width / 2 - left - 4, 8, overlay.width - 16);
2234
- } else {
2235
- result.arrowY = clampFloating(trigger.top + trigger.height / 2 - top - 4, 8, overlay.height - 16);
2236
- }
2243
+ const size = vertical ? trigger.width : trigger.height;
2244
+ const anchorStart = vertical ? trigger.left : trigger.top;
2245
+ const edge = Math.min(size / 2, FLOATING_ARROW_EDGE_OFFSET + 4);
2246
+ const target = anchorStart + (pointAtCenter || !start && !end ? size / 2 : start ? edge : size - edge);
2247
+ if (vertical) result.arrowX = clampFloating(target - left - 4, 8, overlay.width - 16);
2248
+ else result.arrowY = clampFloating(target - top - 4, 8, overlay.height - 16);
2237
2249
  return result;
2238
2250
  }
2251
+ function isFloatingAnchorHidden(anchor, rect) {
2252
+ let left = 0, top = 0, right = document.documentElement.clientWidth, bottom = document.documentElement.clientHeight;
2253
+ for (let parent = anchor.parentElement; parent; parent = parent.parentElement) {
2254
+ const css = getComputedStyle(parent);
2255
+ const bounds = parent.getBoundingClientRect();
2256
+ if (/(auto|scroll|hidden|clip)/.test(css.overflowX)) {
2257
+ left = Math.max(left, bounds.left);
2258
+ right = Math.min(right, bounds.right);
2259
+ }
2260
+ if (/(auto|scroll|hidden|clip)/.test(css.overflowY)) {
2261
+ top = Math.max(top, bounds.top);
2262
+ bottom = Math.min(bottom, bounds.bottom);
2263
+ }
2264
+ }
2265
+ return rect.right <= left || rect.left >= right || rect.bottom <= top || rect.top >= bottom;
2266
+ }
2239
2267
  function Floating({
2240
2268
  children,
2241
2269
  content,
@@ -2246,6 +2274,7 @@ function Floating({
2246
2274
  mouseEnterDelay = 0.1,
2247
2275
  mouseLeaveDelay = 0.1,
2248
2276
  arrow = true,
2277
+ autoAdjustOverflow = true,
2249
2278
  color,
2250
2279
  className = "",
2251
2280
  overlayClassName = "",
@@ -2253,6 +2282,7 @@ function Floating({
2253
2282
  onOpenChange
2254
2283
  }) {
2255
2284
  const rootRef = (0, import_react13.useRef)(null);
2285
+ const triggerElementRef = (0, import_react13.useRef)(null);
2256
2286
  const overlayRef = (0, import_react13.useRef)(null);
2257
2287
  const enterTimer = (0, import_react13.useRef)();
2258
2288
  const leaveTimer = (0, import_react13.useRef)();
@@ -2304,28 +2334,42 @@ function Floating({
2304
2334
  setPosition(void 0);
2305
2335
  return;
2306
2336
  }
2337
+ const getAnchor = () => {
2338
+ const root = rootRef.current;
2339
+ const target = triggerElementRef.current;
2340
+ return target && root?.contains(target) ? target : root?.firstElementChild ?? root;
2341
+ };
2307
2342
  const update = () => {
2308
2343
  if (!rootRef.current || !overlayRef.current) return;
2309
- setPosition(resolveFloatingPosition(rootRef.current.getBoundingClientRect(), overlayRef.current.getBoundingClientRect(), placement));
2344
+ const anchor2 = getAnchor();
2345
+ if (anchor2) {
2346
+ const rect = anchor2.getBoundingClientRect();
2347
+ const next = resolveFloatingPosition(rect, overlayRef.current.getBoundingClientRect(), placement, typeof arrow === "object" && !!arrow.pointAtCenter, autoAdjustOverflow);
2348
+ next.hidden = isFloatingAnchorHidden(anchor2, rect);
2349
+ setPosition(next);
2350
+ }
2310
2351
  };
2311
2352
  update();
2312
2353
  window.addEventListener("resize", update);
2313
2354
  window.addEventListener("scroll", update, true);
2314
2355
  const observer = new ResizeObserver(update);
2315
2356
  if (rootRef.current) observer.observe(rootRef.current);
2357
+ const anchor = getAnchor();
2358
+ if (anchor) observer.observe(anchor);
2316
2359
  if (overlayRef.current) observer.observe(overlayRef.current);
2317
2360
  return () => {
2318
2361
  window.removeEventListener("resize", update);
2319
2362
  window.removeEventListener("scroll", update, true);
2320
2363
  observer.disconnect();
2321
2364
  };
2322
- }, [children, content, placement, visible]);
2365
+ }, [children, content, placement, visible, autoAdjustOverflow, typeof arrow === "object" && arrow.pointAtCenter]);
2323
2366
  (0, import_react13.useEffect)(() => () => {
2324
2367
  clearTimers();
2325
2368
  if (activeTooltipClose === closeSelfRef.current) activeTooltipClose = void 0;
2326
2369
  }, []);
2327
2370
  const child = (0, import_react13.cloneElement)(children, {
2328
2371
  ...triggers.includes("hover") ? { onMouseEnter: (event) => {
2372
+ triggerElementRef.current = event.currentTarget;
2329
2373
  children.props.onMouseEnter?.(event);
2330
2374
  show(mouseEnterDelay);
2331
2375
  }, onMouseLeave: (event) => {
@@ -2333,6 +2377,7 @@ function Floating({
2333
2377
  hide(mouseLeaveDelay);
2334
2378
  } } : {},
2335
2379
  ...triggers.includes("focus") ? { onFocus: (event) => {
2380
+ triggerElementRef.current = event.currentTarget;
2336
2381
  children.props.onFocus?.(event);
2337
2382
  show();
2338
2383
  }, onBlur: (event) => {
@@ -2340,6 +2385,7 @@ function Floating({
2340
2385
  hide();
2341
2386
  } } : {},
2342
2387
  ...triggers.includes("click") ? { onClick: (event) => {
2388
+ triggerElementRef.current = event.currentTarget;
2343
2389
  children.props.onClick?.(event);
2344
2390
  if (visible) closeNow();
2345
2391
  else openNow();
@@ -2354,14 +2400,14 @@ function Floating({
2354
2400
  id: contentId,
2355
2401
  role,
2356
2402
  "data-custom-color": color ? "" : void 0,
2357
- className: `sia-floating__overlay sia-floating__overlay--${position?.placement ?? placement} ${overlayClassName}`.trim(),
2403
+ className: `sia-floating__overlay sia-floating__overlay--${position?.placement ?? normalizeFloatingPlacement(placement)} ${overlayClassName}`.trim(),
2358
2404
  style: {
2359
2405
  "--sia-floating-color": color,
2360
2406
  "--sia-floating-arrow-x": position?.arrowX == null ? void 0 : `${position.arrowX}px`,
2361
2407
  "--sia-floating-arrow-y": position?.arrowY == null ? void 0 : `${position.arrowY}px`,
2362
2408
  top: position?.top ?? 0,
2363
2409
  left: position?.left ?? 0,
2364
- visibility: position ? "visible" : "hidden"
2410
+ visibility: position && !position.hidden ? "visible" : "hidden"
2365
2411
  },
2366
2412
  onMouseEnter: triggers.includes("hover") ? () => show() : void 0,
2367
2413
  onMouseLeave: triggers.includes("hover") ? () => hide(mouseLeaveDelay) : void 0,
package/dist/core.css CHANGED
@@ -121,6 +121,16 @@ fieldset:disabled .sia-input-number__floating-placeholder {
121
121
  min-width: 0;
122
122
  height: 100%;
123
123
  }
124
+ .sia-picker-range-control__field.is-active::after {
125
+ content: "";
126
+ position: absolute;
127
+ right: 0;
128
+ bottom: -1px;
129
+ left: 0;
130
+ height: 3px;
131
+ background: var(--sia-color-primary);
132
+ pointer-events: none;
133
+ }
124
134
  .sia-picker-range-control__field.sia-placeholder-floating > .is-placeholder {
125
135
  color: transparent;
126
136
  }
@@ -405,7 +415,7 @@ fieldset:disabled .sia-input-number__floating-placeholder {
405
415
  --sia-control-height-large: 38px;
406
416
  --sia-control-height: var(--sia-control-height-medium);
407
417
  --sia-spacing: 16px;
408
- --sia-font-size: 16px;
418
+ --sia-font-size: 13px;
409
419
  --sia-font-size-small: 13px;
410
420
  --sia-control-font-size: 13px;
411
421
  --sia-font-size-large: 18px;
@@ -7380,6 +7390,7 @@ fieldset:disabled .sia-input-number__floating-placeholder {
7380
7390
  .sia-form-item__label {
7381
7391
  padding-top: 8px;
7382
7392
  text-align: right;
7393
+ font-size: 13px;
7383
7394
  line-height: 1.45;
7384
7395
  }
7385
7396
  .sia-form-item__required-mark {
@@ -9075,13 +9086,17 @@ body > .sia-popup-portal[data-sia-popup-layer] {
9075
9086
  border-top-width: 1px;
9076
9087
  border-left-width: 1px;
9077
9088
  }
9078
- .sia-floating__overlay--left .sia-floating__arrow {
9089
+ .sia-floating__overlay--left .sia-floating__arrow,
9090
+ .sia-floating__overlay--left-start .sia-floating__arrow,
9091
+ .sia-floating__overlay--left-end .sia-floating__arrow {
9079
9092
  top: var(--sia-floating-arrow-y, calc(50% - 4px));
9080
9093
  right: -4px;
9081
9094
  border-top-width: 1px;
9082
9095
  border-right-width: 1px;
9083
9096
  }
9084
- .sia-floating__overlay--right .sia-floating__arrow {
9097
+ .sia-floating__overlay--right .sia-floating__arrow,
9098
+ .sia-floating__overlay--right-start .sia-floating__arrow,
9099
+ .sia-floating__overlay--right-end .sia-floating__arrow {
9085
9100
  top: var(--sia-floating-arrow-y, calc(50% - 4px));
9086
9101
  left: -4px;
9087
9102
  border-bottom-width: 1px;
package/dist/core.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- export { d as Breadcrumb, e as BreadcrumbItem, f as BreadcrumbProps, h as Card, i as CardAccent, j as CardProps, n as Collapse, o as CollapseItem, p as CollapseKey, q as CollapseProps, x as FilledIconName, y as FloatButton, z as FloatButtonBackTopProps, A as FloatButtonGroupProps, E as FloatButtonProps, G as FloatButtonShape, K as Icon, L as IconName, M as IconProps, N as IconVariant, U as Input, V as InputProps, a0 as MessageConfig, a1 as MessageHandle, a2 as MessageKey, a3 as MessageType, ab as Progress, ac as ProgressProps, ad as ProgressStatus, ag as Segmented, ah as SegmentedOption, ai as SegmentedProps, aj as SegmentedValue, aq as TabItem, ar as Tabs, at as TabsOrientation, au as TabsPosition, av as TabsProps, aw as TabsType, ax as Tag, ay as TagProps, az as TagSize, T as TagStatus, aA as TagVariant, aE as Toolbar, aF as ToolbarItem, aG as ToolbarProps, aR as Typography, aS as TypographyLinkProps, aT as TypographyProps, aU as TypographyTitleProps, aV as TypographyType, aW as Upload, aX as UploadChangeInfo, aY as UploadDraggerProps, aZ as UploadFile, a_ as UploadFileStatus, b1 as UploadProps, b5 as UploadRequestOptions, b9 as message } from './core-BAHoW7_e.cjs';
1
+ export { d as Breadcrumb, e as BreadcrumbItem, f as BreadcrumbProps, h as Card, i as CardAccent, j as CardProps, n as Collapse, o as CollapseItem, p as CollapseKey, q as CollapseProps, x as FilledIconName, y as FloatButton, z as FloatButtonBackTopProps, A as FloatButtonGroupProps, E as FloatButtonProps, G as FloatButtonShape, K as Icon, L as IconName, M as IconProps, N as IconVariant, U as Input, V as InputProps, a0 as MessageConfig, a1 as MessageHandle, a2 as MessageKey, a3 as MessageType, ab as Progress, ac as ProgressProps, ad as ProgressStatus, ag as Segmented, ah as SegmentedOption, ai as SegmentedProps, aj as SegmentedValue, aq as TabItem, ar as Tabs, at as TabsOrientation, au as TabsPosition, av as TabsProps, aw as TabsType, ax as Tag, ay as TagProps, az as TagSize, T as TagStatus, aA as TagVariant, aE as Toolbar, aF as ToolbarItem, aG as ToolbarProps, aR as Typography, aS as TypographyLinkProps, aT as TypographyProps, aU as TypographyTitleProps, aV as TypographyType, aW as Upload, aX as UploadChangeInfo, aY as UploadDraggerProps, aZ as UploadFile, a_ as UploadFileStatus, b1 as UploadProps, b5 as UploadRequestOptions, b9 as message } from './core-C2IieVNm.cjs';
2
2
  export { f as Button, B as ButtonProps, e as ButtonSize, g as ButtonVariant, h as Modal, d as ModalActionResult, M as ModalOpenConfig, i as ModalProps, j as ModalType, a as OverlayApiHandle, k as Select, S as SelectOption, c as SelectProps, m as SelectValue } from './Select-YJbT-MF1.cjs';
3
3
  import 'react';
4
4
  import './shared-Bx4B28Wh.cjs';
package/dist/core.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { d as Breadcrumb, e as BreadcrumbItem, f as BreadcrumbProps, h as Card, i as CardAccent, j as CardProps, n as Collapse, o as CollapseItem, p as CollapseKey, q as CollapseProps, x as FilledIconName, y as FloatButton, z as FloatButtonBackTopProps, A as FloatButtonGroupProps, E as FloatButtonProps, G as FloatButtonShape, K as Icon, L as IconName, M as IconProps, N as IconVariant, U as Input, V as InputProps, a0 as MessageConfig, a1 as MessageHandle, a2 as MessageKey, a3 as MessageType, ab as Progress, ac as ProgressProps, ad as ProgressStatus, ag as Segmented, ah as SegmentedOption, ai as SegmentedProps, aj as SegmentedValue, aq as TabItem, ar as Tabs, at as TabsOrientation, au as TabsPosition, av as TabsProps, aw as TabsType, ax as Tag, ay as TagProps, az as TagSize, T as TagStatus, aA as TagVariant, aE as Toolbar, aF as ToolbarItem, aG as ToolbarProps, aR as Typography, aS as TypographyLinkProps, aT as TypographyProps, aU as TypographyTitleProps, aV as TypographyType, aW as Upload, aX as UploadChangeInfo, aY as UploadDraggerProps, aZ as UploadFile, a_ as UploadFileStatus, b1 as UploadProps, b5 as UploadRequestOptions, b9 as message } from './core-fn8h4yRg.js';
1
+ export { d as Breadcrumb, e as BreadcrumbItem, f as BreadcrumbProps, h as Card, i as CardAccent, j as CardProps, n as Collapse, o as CollapseItem, p as CollapseKey, q as CollapseProps, x as FilledIconName, y as FloatButton, z as FloatButtonBackTopProps, A as FloatButtonGroupProps, E as FloatButtonProps, G as FloatButtonShape, K as Icon, L as IconName, M as IconProps, N as IconVariant, U as Input, V as InputProps, a0 as MessageConfig, a1 as MessageHandle, a2 as MessageKey, a3 as MessageType, ab as Progress, ac as ProgressProps, ad as ProgressStatus, ag as Segmented, ah as SegmentedOption, ai as SegmentedProps, aj as SegmentedValue, aq as TabItem, ar as Tabs, at as TabsOrientation, au as TabsPosition, av as TabsProps, aw as TabsType, ax as Tag, ay as TagProps, az as TagSize, T as TagStatus, aA as TagVariant, aE as Toolbar, aF as ToolbarItem, aG as ToolbarProps, aR as Typography, aS as TypographyLinkProps, aT as TypographyProps, aU as TypographyTitleProps, aV as TypographyType, aW as Upload, aX as UploadChangeInfo, aY as UploadDraggerProps, aZ as UploadFile, a_ as UploadFileStatus, b1 as UploadProps, b5 as UploadRequestOptions, b9 as message } from './core-ZmKnvCFV.js';
2
2
  export { f as Button, B as ButtonProps, e as ButtonSize, g as ButtonVariant, h as Modal, d as ModalActionResult, M as ModalOpenConfig, i as ModalProps, j as ModalType, a as OverlayApiHandle, k as Select, S as SelectOption, c as SelectProps, m as SelectValue } from './Select-CCrPqULn.js';
3
3
  import 'react';
4
4
  import './shared-Bx4B28Wh.js';
package/dist/core.js CHANGED
@@ -10,12 +10,12 @@ import {
10
10
  Typography,
11
11
  Upload,
12
12
  message
13
- } from "./chunk-CEZ4GW3X.js";
13
+ } from "./chunk-IPDCEXQO.js";
14
14
  import "./chunk-SMCYEPBL.js";
15
15
  import {
16
16
  Modal,
17
17
  Select
18
- } from "./chunk-ZTJUFVJO.js";
18
+ } from "./chunk-3Q3S6CDZ.js";
19
19
  import {
20
20
  Icon,
21
21
  Input,