@sia.soul/sia-react-ui 0.1.107 → 0.1.109
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/{chunk-JEDJQ257.js → chunk-XRHL56EV.js} +13 -6
- package/dist/{core-Bm-1bOjF.d.ts → core-gI4QB_Nz.d.ts} +6 -2
- package/dist/{core-zpQkbNf_.d.cts → core-lGT-8jSj.d.cts} +6 -2
- package/dist/core.cjs +13 -6
- package/dist/core.css +30 -0
- package/dist/core.d.cts +1 -1
- package/dist/core.d.ts +1 -1
- package/dist/core.js +1 -1
- package/dist/game.cjs +1653 -1181
- package/dist/game.css +196 -0
- package/dist/game.d.cts +99 -7
- package/dist/game.d.ts +99 -7
- package/dist/game.js +823 -355
- package/dist/index.cjs +17 -7
- package/dist/index.css +30 -0
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +5 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -5859,6 +5859,7 @@ function Card({
|
|
|
5859
5859
|
defaultSelected = false,
|
|
5860
5860
|
disabled = false,
|
|
5861
5861
|
onSelectedChange,
|
|
5862
|
+
onAction,
|
|
5862
5863
|
hoverActions,
|
|
5863
5864
|
accent,
|
|
5864
5865
|
accentColor,
|
|
@@ -5867,6 +5868,7 @@ function Card({
|
|
|
5867
5868
|
defaultCollapsed = false,
|
|
5868
5869
|
onCollapsedChange,
|
|
5869
5870
|
bodyHeight,
|
|
5871
|
+
fill = false,
|
|
5870
5872
|
bodyClassName = "",
|
|
5871
5873
|
bodyStyle,
|
|
5872
5874
|
className = "",
|
|
@@ -5879,6 +5881,7 @@ function Card({
|
|
|
5879
5881
|
const [internalCollapsed, setInternalCollapsed] = (0, import_react28.useState)(defaultCollapsed);
|
|
5880
5882
|
const [internalSelected, setInternalSelected] = (0, import_react28.useState)(defaultSelected);
|
|
5881
5883
|
const isSelected = selected ?? internalSelected;
|
|
5884
|
+
const actionable = Boolean(onAction) && !selectable;
|
|
5882
5885
|
function toggleSelected() {
|
|
5883
5886
|
if (!selectable || disabled) return;
|
|
5884
5887
|
const next = !isSelected;
|
|
@@ -5901,24 +5904,28 @@ function Card({
|
|
|
5901
5904
|
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
5902
5905
|
"section",
|
|
5903
5906
|
{
|
|
5904
|
-
className: `sia-card${!bordered ? " sia-card--borderless" : ""}${isCollapsed ? " sia-card--collapsed" : ""}${selectable ? " sia-card--selectable" : ""}${selectable && isSelected ? " sia-card--selected" : ""}${hoverActions ? " sia-card--hover-actions" : ""} ${className}`.trim(),
|
|
5907
|
+
className: `sia-card${fill ? " sia-card--fill" : ""}${fill && bodyHeight !== void 0 ? " sia-card--body-height" : ""}${!bordered ? " sia-card--borderless" : ""}${isCollapsed ? " sia-card--collapsed" : ""}${selectable ? " sia-card--selectable" : ""}${actionable ? " sia-card--actionable" : ""}${selectable && isSelected ? " sia-card--selected" : ""}${hoverActions ? " sia-card--hover-actions" : ""} ${className}`.trim(),
|
|
5905
5908
|
style: mergedStyle,
|
|
5906
|
-
role: selectable ? "checkbox" : void 0,
|
|
5909
|
+
role: selectable ? "checkbox" : actionable ? "button" : void 0,
|
|
5907
5910
|
"aria-checked": selectable ? isSelected : void 0,
|
|
5908
|
-
"aria-disabled": selectable ? disabled : void 0,
|
|
5909
|
-
tabIndex: selectable && !disabled ? 0 : void 0,
|
|
5911
|
+
"aria-disabled": selectable || actionable ? disabled : void 0,
|
|
5912
|
+
tabIndex: (selectable || actionable) && !disabled ? 0 : void 0,
|
|
5910
5913
|
...withTitleTooltip(props),
|
|
5911
5914
|
onClick: (event) => {
|
|
5912
5915
|
onClick?.(event);
|
|
5913
5916
|
const target = event.target;
|
|
5914
5917
|
const interactive = target.closest('button, a, input, select, textarea, label, [role="button"], [role="checkbox"], [role="radio"], [role="switch"], [contenteditable="true"], [tabindex]');
|
|
5915
|
-
if (!event.defaultPrevented && (!interactive || interactive === event.currentTarget))
|
|
5918
|
+
if (!event.defaultPrevented && (!interactive || interactive === event.currentTarget)) {
|
|
5919
|
+
toggleSelected();
|
|
5920
|
+
if (actionable && !disabled) onAction?.();
|
|
5921
|
+
}
|
|
5916
5922
|
},
|
|
5917
5923
|
onKeyDown: (event) => {
|
|
5918
5924
|
onKeyDown?.(event);
|
|
5919
|
-
if (!event.defaultPrevented && event.target === event.currentTarget && selectable && (event.key === "Enter" || event.key === " ")) {
|
|
5925
|
+
if (!event.defaultPrevented && event.target === event.currentTarget && (selectable || actionable) && (event.key === "Enter" || event.key === " ")) {
|
|
5920
5926
|
event.preventDefault();
|
|
5921
5927
|
toggleSelected();
|
|
5928
|
+
if (actionable && !disabled) onAction?.();
|
|
5922
5929
|
}
|
|
5923
5930
|
},
|
|
5924
5931
|
children: [
|
|
@@ -7469,7 +7476,10 @@ function Slider({
|
|
|
7469
7476
|
onPointerDown: () => setActiveThumb(index),
|
|
7470
7477
|
onChange: (event) => update(index, Number(event.currentTarget.value)),
|
|
7471
7478
|
onMouseUp: finish,
|
|
7472
|
-
onTouchEnd: finish
|
|
7479
|
+
onTouchEnd: finish,
|
|
7480
|
+
onKeyUp: (event) => {
|
|
7481
|
+
if (["ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown", "Home", "End", "PageUp", "PageDown"].includes(event.key)) finish();
|
|
7482
|
+
}
|
|
7473
7483
|
}
|
|
7474
7484
|
),
|
|
7475
7485
|
tooltip?.open || activeThumb === index ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
package/dist/index.css
CHANGED
|
@@ -2597,6 +2597,35 @@ fieldset:disabled .sia-input-number__floating-placeholder {
|
|
|
2597
2597
|
position: relative;
|
|
2598
2598
|
cursor: pointer;
|
|
2599
2599
|
}
|
|
2600
|
+
.sia-card--actionable {
|
|
2601
|
+
cursor: pointer;
|
|
2602
|
+
}
|
|
2603
|
+
.sia-card--actionable[aria-disabled=true] {
|
|
2604
|
+
cursor: default;
|
|
2605
|
+
}
|
|
2606
|
+
.sia-card--actionable:focus-visible {
|
|
2607
|
+
outline: 2px solid var(--sia-color-primary);
|
|
2608
|
+
outline-offset: 2px;
|
|
2609
|
+
}
|
|
2610
|
+
.sia-card--fill {
|
|
2611
|
+
height: 100%;
|
|
2612
|
+
min-height: 0;
|
|
2613
|
+
min-width: 0;
|
|
2614
|
+
display: flex;
|
|
2615
|
+
flex-direction: column;
|
|
2616
|
+
}
|
|
2617
|
+
.sia-card--fill > .sia-card__header,
|
|
2618
|
+
.sia-card--fill > .sia-card__description {
|
|
2619
|
+
flex-shrink: 0;
|
|
2620
|
+
}
|
|
2621
|
+
.sia-card--fill > .sia-card__body {
|
|
2622
|
+
flex: 1;
|
|
2623
|
+
min-height: 0;
|
|
2624
|
+
min-width: 0;
|
|
2625
|
+
}
|
|
2626
|
+
.sia-card--fill.sia-card--body-height > .sia-card__body {
|
|
2627
|
+
flex: 0 0 auto;
|
|
2628
|
+
}
|
|
2600
2629
|
.sia-card__selected-corner {
|
|
2601
2630
|
position: absolute;
|
|
2602
2631
|
top: 0;
|
|
@@ -6067,6 +6096,7 @@ body:has(.sia-window-frame[data-sia-text-selectable=false]) img {
|
|
|
6067
6096
|
}
|
|
6068
6097
|
.sia-checkbox,
|
|
6069
6098
|
.sia-radio {
|
|
6099
|
+
position: relative;
|
|
6070
6100
|
display: inline-flex;
|
|
6071
6101
|
align-items: center;
|
|
6072
6102
|
gap: 8px;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { HTMLAttributes, ReactNode, CSSProperties, ElementType, FormHTMLAttributes, InputHTMLAttributes, ChangeEvent, TextareaHTMLAttributes, MouseEvent, Key, PointerEvent, Ref, ReactElement, ButtonHTMLAttributes, RefObject } from 'react';
|
|
3
|
-
import { T as TagStatus, B as BadgeProps } from './core-
|
|
4
|
-
export { a as Badge, b as BadgeRibbonProps, c as BadgeStatus, d as Breadcrumb, e as BreadcrumbItem, f as BreadcrumbProps, C as Calendar, g as CalendarProps, h as Card, i as CardAccent, j as CardProps, k as Carousel, l as CarouselProps, m as CarouselRef, n as Collapse, o as CollapseItem, p as CollapseKey, q as CollapseProps, D as Dropdown, r as DropdownButtonProps, s as DropdownMenuProps, t as DropdownOpenSource, u as DropdownPlacement, v as DropdownProps, w as DropdownTrigger, F as FILLED_ICON_NAMES, x as FilledIconName, y as FloatButton, z as FloatButtonBackTopProps, A as FloatButtonGroupProps, E as FloatButtonProps, G as FloatButtonShape, H as FloatingPlacement, I as FloatingTrigger, J as ICON_NAMES, K as Icon, L as IconName, M as IconProps, N as IconVariant, O as Image, P as ImagePreview, Q as ImagePreviewConfig, R as ImagePreviewProps, S as ImageProps, U as Input, V as InputProps, W as Menu, X as MenuClickInfo, Y as MenuItem, Z as MenuMode, _ as MenuProps, $ as MenuTheme, a0 as MessageConfig, a1 as MessageHandle, a2 as MessageKey, a3 as MessageType, a4 as NotificationConfig, a5 as NotificationPlacement, a6 as NotificationType, a7 as Popconfirm, a8 as PopconfirmProps, a9 as Popover, aa as PopoverProps, ab as Progress, ac as ProgressProps, ad as ProgressStatus, ae as Rate, af as RateProps, ag as Result, ah as ResultProps, ai as ResultStatus, aj as Segmented, ak as SegmentedOption, al as SegmentedProps, am as SegmentedValue, an as Spin, ao as SpinProps, ap as StepItem, aq as StepStatus, ar as Steps, as as StepsProps, at as TabItem, au as Tabs, av as TabsContextMenuClickInfo, aw as TabsOrientation, ax as TabsPosition, ay as TabsProps, az as TabsType, aA as Tag, aB as TagProps, aC as TagSize, aD as TagVariant, aE as Timeline, aF as TimelineItem, aG as TimelineProps, aH as Toolbar, aI as ToolbarItem, aJ as ToolbarProps, aK as Tooltip, aL as TooltipProps, aM as Tour, aN as TourProps, aO as TourStep, aP as Tree, aQ as TreeDropPosition, aR as TreeKey, aS as TreeNode, aT as TreeProps, aU as Typography, aV as TypographyLinkProps, aW as TypographyProps, aX as TypographyTitleProps, aY as TypographyType, aZ as Upload, a_ as UploadChangeInfo, a$ as UploadDraggerProps, b0 as UploadFile, b1 as UploadFileStatus, b2 as UploadHttpRequest, b3 as UploadItemActions, b4 as UploadProps, b5 as UploadRef, b6 as UploadRejectInfo, b7 as UploadRequestHandle, b8 as UploadRequestOptions, b9 as Watermark, ba as WatermarkFont, bb as WatermarkProps, bc as message, bd as notification } from './core-
|
|
3
|
+
import { T as TagStatus, B as BadgeProps } from './core-lGT-8jSj.cjs';
|
|
4
|
+
export { a as Badge, b as BadgeRibbonProps, c as BadgeStatus, d as Breadcrumb, e as BreadcrumbItem, f as BreadcrumbProps, C as Calendar, g as CalendarProps, h as Card, i as CardAccent, j as CardProps, k as Carousel, l as CarouselProps, m as CarouselRef, n as Collapse, o as CollapseItem, p as CollapseKey, q as CollapseProps, D as Dropdown, r as DropdownButtonProps, s as DropdownMenuProps, t as DropdownOpenSource, u as DropdownPlacement, v as DropdownProps, w as DropdownTrigger, F as FILLED_ICON_NAMES, x as FilledIconName, y as FloatButton, z as FloatButtonBackTopProps, A as FloatButtonGroupProps, E as FloatButtonProps, G as FloatButtonShape, H as FloatingPlacement, I as FloatingTrigger, J as ICON_NAMES, K as Icon, L as IconName, M as IconProps, N as IconVariant, O as Image, P as ImagePreview, Q as ImagePreviewConfig, R as ImagePreviewProps, S as ImageProps, U as Input, V as InputProps, W as Menu, X as MenuClickInfo, Y as MenuItem, Z as MenuMode, _ as MenuProps, $ as MenuTheme, a0 as MessageConfig, a1 as MessageHandle, a2 as MessageKey, a3 as MessageType, a4 as NotificationConfig, a5 as NotificationPlacement, a6 as NotificationType, a7 as Popconfirm, a8 as PopconfirmProps, a9 as Popover, aa as PopoverProps, ab as Progress, ac as ProgressProps, ad as ProgressStatus, ae as Rate, af as RateProps, ag as Result, ah as ResultProps, ai as ResultStatus, aj as Segmented, ak as SegmentedOption, al as SegmentedProps, am as SegmentedValue, an as Spin, ao as SpinProps, ap as StepItem, aq as StepStatus, ar as Steps, as as StepsProps, at as TabItem, au as Tabs, av as TabsContextMenuClickInfo, aw as TabsOrientation, ax as TabsPosition, ay as TabsProps, az as TabsType, aA as Tag, aB as TagProps, aC as TagSize, aD as TagVariant, aE as Timeline, aF as TimelineItem, aG as TimelineProps, aH as Toolbar, aI as ToolbarItem, aJ as ToolbarProps, aK as Tooltip, aL as TooltipProps, aM as Tour, aN as TourProps, aO as TourStep, aP as Tree, aQ as TreeDropPosition, aR as TreeKey, aS as TreeNode, aT as TreeProps, aU as Typography, aV as TypographyLinkProps, aW as TypographyProps, aX as TypographyTitleProps, aY as TypographyType, aZ as Upload, a_ as UploadChangeInfo, a$ as UploadDraggerProps, b0 as UploadFile, b1 as UploadFileStatus, b2 as UploadHttpRequest, b3 as UploadItemActions, b4 as UploadProps, b5 as UploadRef, b6 as UploadRejectInfo, b7 as UploadRequestHandle, b8 as UploadRequestOptions, b9 as Watermark, ba as WatermarkFont, bb as WatermarkProps, bc as message, bd as notification } from './core-lGT-8jSj.cjs';
|
|
5
5
|
import { C as ControlSize, I as InputPlaceholderMode, a as ControlStatus } from './shared-Bx4B28Wh.cjs';
|
|
6
6
|
import { B as ButtonProps, a as ButtonSize } from './Button-O_pNB3SQ.cjs';
|
|
7
7
|
export { b as Button, c as ButtonVariant } from './Button-O_pNB3SQ.cjs';
|
|
@@ -1135,7 +1135,7 @@ interface SliderProps extends Omit<HTMLAttributes<HTMLDivElement>, "defaultValue
|
|
|
1135
1135
|
};
|
|
1136
1136
|
/** 值发生变化时调用;参数为新值及类型声明中列出的关联信息。 */
|
|
1137
1137
|
onChange?: (value: SliderValue) => void;
|
|
1138
|
-
/**
|
|
1138
|
+
/** 鼠标或触摸拖动结束、方向键等调整键松开时调用,参数为当前值;用于保存最终设置。 */
|
|
1139
1139
|
onChangeComplete?: (value: SliderValue) => void;
|
|
1140
1140
|
}
|
|
1141
1141
|
/** 滑块组件。 */
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { HTMLAttributes, ReactNode, CSSProperties, ElementType, FormHTMLAttributes, InputHTMLAttributes, ChangeEvent, TextareaHTMLAttributes, MouseEvent, Key, PointerEvent, Ref, ReactElement, ButtonHTMLAttributes, RefObject } from 'react';
|
|
3
|
-
import { T as TagStatus, B as BadgeProps } from './core-
|
|
4
|
-
export { a as Badge, b as BadgeRibbonProps, c as BadgeStatus, d as Breadcrumb, e as BreadcrumbItem, f as BreadcrumbProps, C as Calendar, g as CalendarProps, h as Card, i as CardAccent, j as CardProps, k as Carousel, l as CarouselProps, m as CarouselRef, n as Collapse, o as CollapseItem, p as CollapseKey, q as CollapseProps, D as Dropdown, r as DropdownButtonProps, s as DropdownMenuProps, t as DropdownOpenSource, u as DropdownPlacement, v as DropdownProps, w as DropdownTrigger, F as FILLED_ICON_NAMES, x as FilledIconName, y as FloatButton, z as FloatButtonBackTopProps, A as FloatButtonGroupProps, E as FloatButtonProps, G as FloatButtonShape, H as FloatingPlacement, I as FloatingTrigger, J as ICON_NAMES, K as Icon, L as IconName, M as IconProps, N as IconVariant, O as Image, P as ImagePreview, Q as ImagePreviewConfig, R as ImagePreviewProps, S as ImageProps, U as Input, V as InputProps, W as Menu, X as MenuClickInfo, Y as MenuItem, Z as MenuMode, _ as MenuProps, $ as MenuTheme, a0 as MessageConfig, a1 as MessageHandle, a2 as MessageKey, a3 as MessageType, a4 as NotificationConfig, a5 as NotificationPlacement, a6 as NotificationType, a7 as Popconfirm, a8 as PopconfirmProps, a9 as Popover, aa as PopoverProps, ab as Progress, ac as ProgressProps, ad as ProgressStatus, ae as Rate, af as RateProps, ag as Result, ah as ResultProps, ai as ResultStatus, aj as Segmented, ak as SegmentedOption, al as SegmentedProps, am as SegmentedValue, an as Spin, ao as SpinProps, ap as StepItem, aq as StepStatus, ar as Steps, as as StepsProps, at as TabItem, au as Tabs, av as TabsContextMenuClickInfo, aw as TabsOrientation, ax as TabsPosition, ay as TabsProps, az as TabsType, aA as Tag, aB as TagProps, aC as TagSize, aD as TagVariant, aE as Timeline, aF as TimelineItem, aG as TimelineProps, aH as Toolbar, aI as ToolbarItem, aJ as ToolbarProps, aK as Tooltip, aL as TooltipProps, aM as Tour, aN as TourProps, aO as TourStep, aP as Tree, aQ as TreeDropPosition, aR as TreeKey, aS as TreeNode, aT as TreeProps, aU as Typography, aV as TypographyLinkProps, aW as TypographyProps, aX as TypographyTitleProps, aY as TypographyType, aZ as Upload, a_ as UploadChangeInfo, a$ as UploadDraggerProps, b0 as UploadFile, b1 as UploadFileStatus, b2 as UploadHttpRequest, b3 as UploadItemActions, b4 as UploadProps, b5 as UploadRef, b6 as UploadRejectInfo, b7 as UploadRequestHandle, b8 as UploadRequestOptions, b9 as Watermark, ba as WatermarkFont, bb as WatermarkProps, bc as message, bd as notification } from './core-
|
|
3
|
+
import { T as TagStatus, B as BadgeProps } from './core-gI4QB_Nz.js';
|
|
4
|
+
export { a as Badge, b as BadgeRibbonProps, c as BadgeStatus, d as Breadcrumb, e as BreadcrumbItem, f as BreadcrumbProps, C as Calendar, g as CalendarProps, h as Card, i as CardAccent, j as CardProps, k as Carousel, l as CarouselProps, m as CarouselRef, n as Collapse, o as CollapseItem, p as CollapseKey, q as CollapseProps, D as Dropdown, r as DropdownButtonProps, s as DropdownMenuProps, t as DropdownOpenSource, u as DropdownPlacement, v as DropdownProps, w as DropdownTrigger, F as FILLED_ICON_NAMES, x as FilledIconName, y as FloatButton, z as FloatButtonBackTopProps, A as FloatButtonGroupProps, E as FloatButtonProps, G as FloatButtonShape, H as FloatingPlacement, I as FloatingTrigger, J as ICON_NAMES, K as Icon, L as IconName, M as IconProps, N as IconVariant, O as Image, P as ImagePreview, Q as ImagePreviewConfig, R as ImagePreviewProps, S as ImageProps, U as Input, V as InputProps, W as Menu, X as MenuClickInfo, Y as MenuItem, Z as MenuMode, _ as MenuProps, $ as MenuTheme, a0 as MessageConfig, a1 as MessageHandle, a2 as MessageKey, a3 as MessageType, a4 as NotificationConfig, a5 as NotificationPlacement, a6 as NotificationType, a7 as Popconfirm, a8 as PopconfirmProps, a9 as Popover, aa as PopoverProps, ab as Progress, ac as ProgressProps, ad as ProgressStatus, ae as Rate, af as RateProps, ag as Result, ah as ResultProps, ai as ResultStatus, aj as Segmented, ak as SegmentedOption, al as SegmentedProps, am as SegmentedValue, an as Spin, ao as SpinProps, ap as StepItem, aq as StepStatus, ar as Steps, as as StepsProps, at as TabItem, au as Tabs, av as TabsContextMenuClickInfo, aw as TabsOrientation, ax as TabsPosition, ay as TabsProps, az as TabsType, aA as Tag, aB as TagProps, aC as TagSize, aD as TagVariant, aE as Timeline, aF as TimelineItem, aG as TimelineProps, aH as Toolbar, aI as ToolbarItem, aJ as ToolbarProps, aK as Tooltip, aL as TooltipProps, aM as Tour, aN as TourProps, aO as TourStep, aP as Tree, aQ as TreeDropPosition, aR as TreeKey, aS as TreeNode, aT as TreeProps, aU as Typography, aV as TypographyLinkProps, aW as TypographyProps, aX as TypographyTitleProps, aY as TypographyType, aZ as Upload, a_ as UploadChangeInfo, a$ as UploadDraggerProps, b0 as UploadFile, b1 as UploadFileStatus, b2 as UploadHttpRequest, b3 as UploadItemActions, b4 as UploadProps, b5 as UploadRef, b6 as UploadRejectInfo, b7 as UploadRequestHandle, b8 as UploadRequestOptions, b9 as Watermark, ba as WatermarkFont, bb as WatermarkProps, bc as message, bd as notification } from './core-gI4QB_Nz.js';
|
|
5
5
|
import { C as ControlSize, I as InputPlaceholderMode, a as ControlStatus } from './shared-Bx4B28Wh.js';
|
|
6
6
|
import { B as ButtonProps, a as ButtonSize } from './Button-BiL3Wjsd.js';
|
|
7
7
|
export { b as Button, c as ButtonVariant } from './Button-BiL3Wjsd.js';
|
|
@@ -1135,7 +1135,7 @@ interface SliderProps extends Omit<HTMLAttributes<HTMLDivElement>, "defaultValue
|
|
|
1135
1135
|
};
|
|
1136
1136
|
/** 值发生变化时调用;参数为新值及类型声明中列出的关联信息。 */
|
|
1137
1137
|
onChange?: (value: SliderValue) => void;
|
|
1138
|
-
/**
|
|
1138
|
+
/** 鼠标或触摸拖动结束、方向键等调整键松开时调用,参数为当前值;用于保存最终设置。 */
|
|
1139
1139
|
onChangeComplete?: (value: SliderValue) => void;
|
|
1140
1140
|
}
|
|
1141
1141
|
/** 滑块组件。 */
|
package/dist/index.js
CHANGED
|
@@ -81,7 +81,7 @@ import {
|
|
|
81
81
|
Watermark,
|
|
82
82
|
message,
|
|
83
83
|
notification
|
|
84
|
-
} from "./chunk-
|
|
84
|
+
} from "./chunk-XRHL56EV.js";
|
|
85
85
|
import "./chunk-RX242MUO.js";
|
|
86
86
|
import {
|
|
87
87
|
MarkdownEditor
|
|
@@ -2181,7 +2181,10 @@ function Slider({
|
|
|
2181
2181
|
onPointerDown: () => setActiveThumb(index),
|
|
2182
2182
|
onChange: (event) => update(index, Number(event.currentTarget.value)),
|
|
2183
2183
|
onMouseUp: finish,
|
|
2184
|
-
onTouchEnd: finish
|
|
2184
|
+
onTouchEnd: finish,
|
|
2185
|
+
onKeyUp: (event) => {
|
|
2186
|
+
if (["ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown", "Home", "End", "PageUp", "PageDown"].includes(event.key)) finish();
|
|
2187
|
+
}
|
|
2185
2188
|
}
|
|
2186
2189
|
),
|
|
2187
2190
|
tooltip?.open || activeThumb === index ? /* @__PURE__ */ jsx13(
|