@sia.soul/sia-react-ui 0.1.114 → 0.1.115
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Select-Cf0xz1Tg.d.cts → Select-BAFXKVZB.d.cts} +1 -1
- package/dist/{Select-BddM4uXC.d.ts → Select-vjX7B63I.d.ts} +1 -1
- package/dist/{chunk-NKENBSLP.js → chunk-6XQ2LDGT.js} +1 -1
- package/dist/{chunk-DUOOIPWH.js → chunk-GNOZYUIH.js} +7 -4
- package/dist/{chunk-7KNHBJZX.js → chunk-KPOK4HIQ.js} +10 -3
- package/dist/{chunk-6CII5JCT.js → chunk-MDU5EONC.js} +1 -1
- package/dist/{chunk-IOVN3QL7.js → chunk-SPIQSYWQ.js} +4 -1
- package/dist/{core-CEaTbhWd.d.cts → core-O6oDXbkG.d.cts} +10 -6
- package/dist/{core-C6muCCSS.d.ts → core-uVaNwjTO.d.ts} +10 -6
- package/dist/core.cjs +13 -3
- package/dist/core.css +45 -0
- package/dist/core.d.cts +2 -2
- package/dist/core.d.ts +2 -2
- package/dist/core.js +3 -3
- package/dist/index.cjs +66 -13
- package/dist/index.css +76 -0
- package/dist/index.d.cts +8 -6
- package/dist/index.d.ts +8 -6
- package/dist/index.js +164 -124
- package/dist/rich-text-editor.cjs +4 -1
- package/dist/rich-text-editor.js +2 -2
- package/dist/{select-date-range-yGDEA1RP.d.ts → select-date-range-C9jlUrCX.d.ts} +1 -1
- package/dist/{select-date-range-Cm5o2xPp.d.cts → select-date-range-CIiI0F5o.d.cts} +1 -1
- package/dist/select-date-range.cjs +9 -2
- package/dist/select-date-range.d.cts +2 -2
- package/dist/select-date-range.d.ts +2 -2
- package/dist/select-date-range.js +3 -3
- package/package.json +1 -1
|
@@ -1726,6 +1726,7 @@ function MenuLevel({
|
|
|
1726
1726
|
function Menu({
|
|
1727
1727
|
items,
|
|
1728
1728
|
mode = "vertical",
|
|
1729
|
+
gridColumns = 2,
|
|
1729
1730
|
theme = "light",
|
|
1730
1731
|
selectedKeys,
|
|
1731
1732
|
defaultSelectedKeys = [],
|
|
@@ -1741,6 +1742,7 @@ function Menu({
|
|
|
1741
1742
|
onDeselect,
|
|
1742
1743
|
onOpenChange,
|
|
1743
1744
|
className = "",
|
|
1745
|
+
style,
|
|
1744
1746
|
...rest
|
|
1745
1747
|
}) {
|
|
1746
1748
|
const menuId = (0, import_react6.useId)();
|
|
@@ -1773,7 +1775,8 @@ function Menu({
|
|
|
1773
1775
|
else onSelect?.({ ...info, selectedKeys: [...next] });
|
|
1774
1776
|
if (mode !== "inline") setOpen([]);
|
|
1775
1777
|
}
|
|
1776
|
-
|
|
1778
|
+
const gridStyle = mode === "grid" ? { "--sia-menu-grid-columns": gridColumns === "auto" ? "repeat(auto-fill, minmax(88px, 1fr))" : `repeat(${Number.isFinite(gridColumns) ? Math.max(1, Math.floor(Number(gridColumns))) : 2}, minmax(0, 1fr))` } : {};
|
|
1779
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("ul", { ref: rootRef, className: `sia-menu sia-menu--${mode} sia-menu--${theme}${inlineCollapsed ? " sia-menu--collapsed" : ""} ${className}`.trim(), role: "menu", ...withTitleTooltip(rest), style: { ...gridStyle, ...style }, "data-sia-menu-owner": menuId, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(MenuLevel, { items, level: 0, parents: [], props: { menuId, mode, theme, multiple, selectable, inlineCollapsed, inlineIndent, triggerSubMenuAction, selected, open, select, toggle } }) });
|
|
1777
1780
|
}
|
|
1778
1781
|
|
|
1779
1782
|
// src/components/Dropdown.tsx
|
package/dist/rich-text-editor.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
RichTextContent,
|
|
3
3
|
RichTextEditor
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-MDU5EONC.js";
|
|
5
|
+
import "./chunk-SPIQSYWQ.js";
|
|
6
6
|
import "./chunk-SCEHVGKV.js";
|
|
7
7
|
import "./chunk-XY7CXJS6.js";
|
|
8
8
|
import "./chunk-CZ2ITBRW.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { InputHTMLAttributes, ReactNode, HTMLAttributes, CSSProperties } from 'react';
|
|
3
3
|
import { I as InputPlaceholderMode, C as ControlSize, a as ControlStatus } from './shared-Bx4B28Wh.js';
|
|
4
|
-
import { S as SelectOption, j as SelectValue } from './Select-
|
|
4
|
+
import { S as SelectOption, j as SelectValue } from './Select-vjX7B63I.js';
|
|
5
5
|
|
|
6
6
|
/** 日期选择附带的时间选择配置。 */
|
|
7
7
|
type DatePickerShowTime = boolean | {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { InputHTMLAttributes, ReactNode, HTMLAttributes, CSSProperties } from 'react';
|
|
3
3
|
import { I as InputPlaceholderMode, C as ControlSize, a as ControlStatus } from './shared-Bx4B28Wh.cjs';
|
|
4
|
-
import { S as SelectOption, j as SelectValue } from './Select-
|
|
4
|
+
import { S as SelectOption, j as SelectValue } from './Select-BAFXKVZB.cjs';
|
|
5
5
|
|
|
6
6
|
/** 日期选择附带的时间选择配置。 */
|
|
7
7
|
type DatePickerShowTime = boolean | {
|
|
@@ -4196,8 +4196,15 @@ var Select = (0, import_react18.forwardRef)(function Select2({
|
|
|
4196
4196
|
function clearSelection() {
|
|
4197
4197
|
setCurrentValue(multiple ? [] : null);
|
|
4198
4198
|
}
|
|
4199
|
+
function handleDropdownEscape(event) {
|
|
4200
|
+
if (event.key !== "Escape" || !open || popupMode !== "dropdown") return false;
|
|
4201
|
+
event.preventDefault();
|
|
4202
|
+
event.stopPropagation();
|
|
4203
|
+
closeDropdown();
|
|
4204
|
+
return true;
|
|
4205
|
+
}
|
|
4199
4206
|
function handleInteractionKeyDown(event, fromSearch = false) {
|
|
4200
|
-
if (popupMode === "modal" && open) return;
|
|
4207
|
+
if (handleDropdownEscape(event) || popupMode === "modal" && open) return;
|
|
4201
4208
|
if (event.key === "ArrowDown" || event.key === "ArrowUp") {
|
|
4202
4209
|
event.preventDefault();
|
|
4203
4210
|
if (!open) openDropdown();
|
|
@@ -4302,7 +4309,7 @@ var Select = (0, import_react18.forwardRef)(function Select2({
|
|
|
4302
4309
|
}
|
|
4303
4310
|
),
|
|
4304
4311
|
allowClear && hasValue && !disabled && !loading ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", { className: "sia-select__clear", type: "button", "aria-label": "\u6E05\u7A7A\u9009\u62E9", onClick: clearValue, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Icon, { name: "circle-close", variant: "filled", size: 15 }) }) : null,
|
|
4305
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(PopupPortal, { ref: popupRef, anchorRef: rootRef, open: open && popupMode === "dropdown", style: { fontSize: dropdownFontSize }, className: `sia-select__dropdown${filteredOptions.length === 0 && !canSubmitInput ? " sia-select__dropdown--empty" : ""}`, children: [
|
|
4312
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(PopupPortal, { ref: popupRef, onKeyDown: handleDropdownEscape, anchorRef: rootRef, open: open && popupMode === "dropdown", style: { fontSize: dropdownFontSize }, className: `sia-select__dropdown${filteredOptions.length === 0 && !canSubmitInput ? " sia-select__dropdown--empty" : ""}`, children: [
|
|
4306
4313
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(FloatingScrollbarProvider, { targetRef: listRef }),
|
|
4307
4314
|
showSearch || allowInput ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("label", { className: "sia-select__search", children: [
|
|
4308
4315
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Icon, { name: "search", size: 15 }),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { S as SelectDateRange, i as SelectDateRangeProps, j as SelectDateRangeValue } from './select-date-range-
|
|
1
|
+
export { S as SelectDateRange, i as SelectDateRangeProps, j as SelectDateRangeValue } from './select-date-range-CIiI0F5o.cjs';
|
|
2
2
|
import 'react';
|
|
3
3
|
import './shared-Bx4B28Wh.cjs';
|
|
4
|
-
import './Select-
|
|
4
|
+
import './Select-BAFXKVZB.cjs';
|
|
5
5
|
import './Button-O_pNB3SQ.cjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { S as SelectDateRange, i as SelectDateRangeProps, j as SelectDateRangeValue } from './select-date-range-
|
|
1
|
+
export { S as SelectDateRange, i as SelectDateRangeProps, j as SelectDateRangeValue } from './select-date-range-C9jlUrCX.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import './shared-Bx4B28Wh.js';
|
|
4
|
-
import './Select-
|
|
4
|
+
import './Select-vjX7B63I.js';
|
|
5
5
|
import './Button-BiL3Wjsd.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SelectDateRange
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-6XQ2LDGT.js";
|
|
4
|
+
import "./chunk-KPOK4HIQ.js";
|
|
5
|
+
import "./chunk-SPIQSYWQ.js";
|
|
6
6
|
import "./chunk-SCEHVGKV.js";
|
|
7
7
|
import "./chunk-XY7CXJS6.js";
|
|
8
8
|
import "./chunk-CZ2ITBRW.js";
|