@snowui-design-system/components 0.3.0-alpha.1 → 0.3.0-alpha.3
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/AGENTS.md +21 -0
- package/LICENSE +133 -89
- package/README.md +21 -7
- package/component-catalog.json +505 -84
- package/dist/client/blocks/Sidebar.js +75 -46
- package/dist/client/blocks/SidebarSection.js +3 -1
- package/dist/client/blocks/index.js +2 -0
- package/dist/client/compat.js +2 -0
- package/dist/client/components/BarChart.js +1 -1
- package/dist/client/components/Breadcrumb.js +17 -11
- package/dist/client/components/CircularChart.js +2 -2
- package/dist/client/components/CodeBlock.js +278 -225
- package/dist/client/components/CopyButton.js +5 -2
- package/dist/client/components/ExpandButton.js +10 -3
- package/dist/client/components/Frame.js +15 -9
- package/dist/client/components/GaugeChart.js +2 -2
- package/dist/client/components/ImageViewer.js +51 -27
- package/dist/client/components/Indicator.js +5 -3
- package/dist/client/components/Input.js +27 -17
- package/dist/client/components/LineChart.js +1 -1
- package/dist/client/components/Link.d.ts +1 -1
- package/dist/client/components/Link.js +43 -22
- package/dist/client/components/Listbox.js +26 -15
- package/dist/client/components/OverflowAction.d.ts +2 -0
- package/dist/client/components/OverflowAction.js +146 -65
- package/dist/client/components/OverflowActions.d.ts +2 -0
- package/dist/client/components/OverflowActions.js +67 -16
- package/dist/client/components/Pagination.js +71 -48
- package/dist/client/components/Select.js +29 -18
- package/dist/client/components/SidePanel.js +76 -50
- package/dist/client/components/Tab.js +30 -31
- package/dist/client/components/TableBody.js +10 -4
- package/dist/client/components/TableCell.js +57 -32
- package/dist/client/components/TableHead.js +69 -38
- package/dist/client/components/TableToolbar.js +112 -79
- package/dist/client/components/Text.js +103 -47
- package/dist/client/components/Textarea.js +7 -1
- package/dist/client/components/Toast.js +8 -1
- package/dist/client/components/Tooltip.js +200 -195
- package/dist/client/context.js +2 -0
- package/dist/client/dev.js +2 -0
- package/dist/client/i18n/messages.d.ts +2 -2
- package/dist/client/i18n/messages.js +117 -1
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.js +3 -1
- package/dist/client/internal/code-block/prettier-svelte.d.ts +2 -0
- package/dist/client/internal/component-icon/index.js +2 -0
- package/dist/client/internal/snow-ui-logo/emoji-metrics.js +2 -0
- package/dist/client/keys.js +2 -0
- package/dist/client/lib/adaptive-contrast-renderer.js +2 -0
- package/dist/client/lib/chart/appearance-timeline.js +2 -0
- package/dist/client/lib/chart/arc-path.js +2 -0
- package/dist/client/lib/chart/colors.js +2 -0
- package/dist/client/lib/chart/size.js +2 -0
- package/dist/client/lib/clipboard.js +2 -0
- package/dist/client/lib/color.js +2 -0
- package/dist/client/lib/date-format.js +2 -0
- package/dist/client/lib/edge-fade.js +2 -0
- package/dist/client/lib/number-format.js +8 -0
- package/dist/client/lib/overflow-actions-motion.js +2 -0
- package/dist/client/lib/overlay-trigger-timing.js +2 -0
- package/dist/client/lib/progressive-blur.d.ts +13 -0
- package/dist/client/lib/progressive-blur.js +54 -0
- package/dist/client/lib/responsive-exit.js +2 -0
- package/dist/client/lib/search-filter.js +2 -0
- package/dist/client/lib/side-panel.js +2 -0
- package/dist/client/lib/split-pane.js +2 -0
- package/dist/client/lib/table-column-motion.js +2 -0
- package/dist/client/lib/table-responsive.js +2 -0
- package/dist/client/lib/table-selection-fade.js +2 -0
- package/dist/client/lib/table-truncation.js +2 -0
- package/dist/client/lib/text-motion/animation.js +2 -0
- package/dist/client/lib/text-motion/character.js +2 -0
- package/dist/client/lib/text-motion/color.js +2 -0
- package/dist/client/lib/text-motion/layout.js +2 -0
- package/dist/client/lib/text-motion/preference.js +2 -0
- package/dist/client/lib/text-motion/sequence.js +2 -0
- package/dist/client/lib/text-motion/typography.js +2 -0
- package/dist/client/lib/tooltip-delay.js +2 -0
- package/dist/client/lib/tooltip-motion-dismiss.js +2 -0
- package/dist/client/lib/tooltip-pointer-speed.js +2 -0
- package/dist/client/lib/truncate.js +2 -0
- package/dist/client/logic/ComponentPartsBoundary.d.ts +7 -0
- package/dist/client/logic/ComponentPartsBoundary.js +15 -0
- package/dist/client/logic/frame-field-control.js +2 -0
- package/dist/client/logic/frame-motion-defaults.js +2 -0
- package/dist/client/logic/frame-prop-filter.js +2 -0
- package/dist/client/logic/geometry-cache.js +2 -0
- package/dist/client/logic/layout-flip.js +2 -0
- package/dist/client/logic/morph.js +2 -0
- package/dist/client/logic/motion-engine.js +2 -0
- package/dist/client/logic/motion-orchestration.js +2 -0
- package/dist/client/logic/motion-types.js +2 -0
- package/dist/client/logic/overflow-actions.d.ts +3 -2
- package/dist/client/logic/wc-adapter.js +2 -0
- package/dist/client/motion/bridge.js +2 -0
- package/dist/client/motion/content-crossfade.js +2 -0
- package/dist/client/motion/expand.js +2 -0
- package/dist/client/motion/fade-in.js +2 -0
- package/dist/client/motion/fade-out.js +2 -0
- package/dist/client/motion/morph.js +2 -0
- package/dist/client/motion/move.js +2 -0
- package/dist/client/motion/number.js +2 -0
- package/dist/client/motion/replace.js +2 -0
- package/dist/client/motion/rotate.css +2 -0
- package/dist/client/motion/rotate.js +2 -0
- package/dist/client/motion/scale-in.js +2 -0
- package/dist/client/motion/tokens.js +2 -0
- package/dist/client/motion/while-2xl.js +2 -0
- package/dist/client/motion/while-active.js +2 -0
- package/dist/client/motion/while-appear.js +2 -0
- package/dist/client/motion/while-click.js +2 -0
- package/dist/client/motion/while-collapsed.js +2 -0
- package/dist/client/motion/while-disabled.js +2 -0
- package/dist/client/motion/while-disappear.js +2 -0
- package/dist/client/motion/while-drag.js +2 -0
- package/dist/client/motion/while-editing.js +2 -0
- package/dist/client/motion/while-expanded.js +2 -0
- package/dist/client/motion/while-focus.js +2 -0
- package/dist/client/motion/while-hover.js +2 -0
- package/dist/client/motion/while-idle.js +2 -0
- package/dist/client/motion/while-key.js +2 -0
- package/dist/client/motion/while-lg.js +2 -0
- package/dist/client/motion/while-load.js +2 -0
- package/dist/client/motion/while-md.js +2 -0
- package/dist/client/motion/while-reload.js +2 -0
- package/dist/client/motion/while-scroll.js +2 -0
- package/dist/client/motion/while-sm.js +2 -0
- package/dist/client/motion/while-uploading.js +2 -0
- package/dist/client/motion/while-validating.js +2 -0
- package/dist/client/motion/while-xl.js +2 -0
- package/dist/client/motion/while-xs.js +2 -0
- package/dist/client/styles/auto-layout.css +3 -1
- package/dist/client/styles/backdrop.css +2 -0
- package/dist/client/styles/components.css +6 -4
- package/dist/client/styles/index.css +2 -0
- package/dist/client/styles/layout.css +20 -4
- package/dist/client/styles/scale.css +2 -0
- package/dist/client/styles/scrollbar.css +3 -1
- package/dist/client/styles/tokens.css +2 -0
- package/dist/client/vite-env.d.ts +2 -0
- package/dist/server/blocks/Sidebar.js +41 -21
- package/dist/server/blocks/SidebarSection.js +3 -1
- package/dist/server/blocks/index.js +2 -0
- package/dist/server/compat.js +2 -0
- package/dist/server/components/BarChart.js +1 -1
- package/dist/server/components/Breadcrumb.js +9 -2
- package/dist/server/components/CircularChart.js +2 -2
- package/dist/server/components/CodeBlock.js +25 -13
- package/dist/server/components/CopyButton.js +6 -2
- package/dist/server/components/ExpandButton.js +7 -3
- package/dist/server/components/Frame.js +10 -3
- package/dist/server/components/GaugeChart.js +2 -2
- package/dist/server/components/ImageViewer.js +6 -3
- package/dist/server/components/Indicator.js +5 -3
- package/dist/server/components/Input.js +14 -17
- package/dist/server/components/LineChart.js +1 -1
- package/dist/server/components/Link.d.ts +1 -1
- package/dist/server/components/Link.js +20 -3
- package/dist/server/components/Listbox.js +17 -4
- package/dist/server/components/OverflowAction.d.ts +2 -0
- package/dist/server/components/OverflowAction.js +70 -26
- package/dist/server/components/OverflowActions.d.ts +2 -0
- package/dist/server/components/OverflowActions.js +49 -14
- package/dist/server/components/Pagination.js +21 -10
- package/dist/server/components/Select.js +23 -11
- package/dist/server/components/SidePanel.js +28 -8
- package/dist/server/components/Tab.js +61 -52
- package/dist/server/components/TableBody.js +9 -2
- package/dist/server/components/TableCell.js +28 -7
- package/dist/server/components/TableHead.js +31 -7
- package/dist/server/components/TableToolbar.js +57 -30
- package/dist/server/components/Text.js +52 -12
- package/dist/server/components/Textarea.js +4 -1
- package/dist/server/components/Toast.js +4 -1
- package/dist/server/components/Tooltip.js +10 -10
- package/dist/server/context.js +2 -0
- package/dist/server/dev.js +2 -0
- package/dist/server/i18n/messages.d.ts +2 -2
- package/dist/server/i18n/messages.js +117 -1
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.js +3 -1
- package/dist/server/internal/code-block/prettier-svelte.d.ts +2 -0
- package/dist/server/internal/component-icon/index.js +2 -0
- package/dist/server/internal/snow-ui-logo/emoji-metrics.js +2 -0
- package/dist/server/keys.js +2 -0
- package/dist/server/lib/adaptive-contrast-renderer.js +2 -0
- package/dist/server/lib/chart/appearance-timeline.js +2 -0
- package/dist/server/lib/chart/arc-path.js +2 -0
- package/dist/server/lib/chart/colors.js +2 -0
- package/dist/server/lib/chart/size.js +2 -0
- package/dist/server/lib/clipboard.js +2 -0
- package/dist/server/lib/color.js +2 -0
- package/dist/server/lib/date-format.js +2 -0
- package/dist/server/lib/edge-fade.js +2 -0
- package/dist/server/lib/number-format.js +8 -0
- package/dist/server/lib/overflow-actions-motion.js +2 -0
- package/dist/server/lib/overlay-trigger-timing.js +2 -0
- package/dist/server/lib/progressive-blur.d.ts +13 -0
- package/dist/server/lib/progressive-blur.js +54 -0
- package/dist/server/lib/responsive-exit.js +2 -0
- package/dist/server/lib/search-filter.js +2 -0
- package/dist/server/lib/side-panel.js +2 -0
- package/dist/server/lib/split-pane.js +2 -0
- package/dist/server/lib/table-column-motion.js +2 -0
- package/dist/server/lib/table-responsive.js +2 -0
- package/dist/server/lib/table-selection-fade.js +2 -0
- package/dist/server/lib/table-truncation.js +2 -0
- package/dist/server/lib/text-motion/animation.js +2 -0
- package/dist/server/lib/text-motion/character.js +2 -0
- package/dist/server/lib/text-motion/color.js +2 -0
- package/dist/server/lib/text-motion/layout.js +2 -0
- package/dist/server/lib/text-motion/preference.js +2 -0
- package/dist/server/lib/text-motion/sequence.js +2 -0
- package/dist/server/lib/text-motion/typography.js +2 -0
- package/dist/server/lib/tooltip-delay.js +2 -0
- package/dist/server/lib/tooltip-motion-dismiss.js +2 -0
- package/dist/server/lib/tooltip-pointer-speed.js +2 -0
- package/dist/server/lib/truncate.js +2 -0
- package/dist/server/logic/ComponentPartsBoundary.d.ts +7 -0
- package/dist/server/logic/ComponentPartsBoundary.js +12 -0
- package/dist/server/logic/frame-field-control.js +2 -0
- package/dist/server/logic/frame-motion-defaults.js +2 -0
- package/dist/server/logic/frame-prop-filter.js +2 -0
- package/dist/server/logic/geometry-cache.js +2 -0
- package/dist/server/logic/layout-flip.js +2 -0
- package/dist/server/logic/morph.js +2 -0
- package/dist/server/logic/motion-engine.js +2 -0
- package/dist/server/logic/motion-orchestration.js +2 -0
- package/dist/server/logic/motion-types.js +2 -0
- package/dist/server/logic/overflow-actions.d.ts +3 -2
- package/dist/server/logic/wc-adapter.js +2 -0
- package/dist/server/motion/bridge.js +2 -0
- package/dist/server/motion/content-crossfade.js +2 -0
- package/dist/server/motion/expand.js +2 -0
- package/dist/server/motion/fade-in.js +2 -0
- package/dist/server/motion/fade-out.js +2 -0
- package/dist/server/motion/morph.js +2 -0
- package/dist/server/motion/move.js +2 -0
- package/dist/server/motion/number.js +2 -0
- package/dist/server/motion/replace.js +2 -0
- package/dist/server/motion/rotate.css +2 -0
- package/dist/server/motion/rotate.js +2 -0
- package/dist/server/motion/scale-in.js +2 -0
- package/dist/server/motion/tokens.js +2 -0
- package/dist/server/motion/while-2xl.js +2 -0
- package/dist/server/motion/while-active.js +2 -0
- package/dist/server/motion/while-appear.js +2 -0
- package/dist/server/motion/while-click.js +2 -0
- package/dist/server/motion/while-collapsed.js +2 -0
- package/dist/server/motion/while-disabled.js +2 -0
- package/dist/server/motion/while-disappear.js +2 -0
- package/dist/server/motion/while-drag.js +2 -0
- package/dist/server/motion/while-editing.js +2 -0
- package/dist/server/motion/while-expanded.js +2 -0
- package/dist/server/motion/while-focus.js +2 -0
- package/dist/server/motion/while-hover.js +2 -0
- package/dist/server/motion/while-idle.js +2 -0
- package/dist/server/motion/while-key.js +2 -0
- package/dist/server/motion/while-lg.js +2 -0
- package/dist/server/motion/while-load.js +2 -0
- package/dist/server/motion/while-md.js +2 -0
- package/dist/server/motion/while-reload.js +2 -0
- package/dist/server/motion/while-scroll.js +2 -0
- package/dist/server/motion/while-sm.js +2 -0
- package/dist/server/motion/while-uploading.js +2 -0
- package/dist/server/motion/while-validating.js +2 -0
- package/dist/server/motion/while-xl.js +2 -0
- package/dist/server/motion/while-xs.js +2 -0
- package/dist/server/styles/auto-layout.css +3 -1
- package/dist/server/styles/backdrop.css +2 -0
- package/dist/server/styles/components.css +6 -4
- package/dist/server/styles/index.css +2 -0
- package/dist/server/styles/layout.css +20 -4
- package/dist/server/styles/scale.css +2 -0
- package/dist/server/styles/scrollbar.css +3 -1
- package/dist/server/styles/tokens.css +2 -0
- package/dist/server/vite-env.d.ts +2 -0
- package/llms.txt +5 -0
- package/package.json +14 -6
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/* SnowUI source notice | LICENSE 2.2.0: ../../../../LICENSE
|
|
2
|
+
复制或移植时随附该版本完整 LICENSE 与第三方声明;同任务、同版本、同已确认用途不逐组件重复检查。 */
|
|
1
3
|
// 品牌专用:以系统 emoji 的实际着色像素边界匹配 32×32 图标,保持原始比例。
|
|
2
4
|
export const LOGO_EMOJI_FONT = '"Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif';
|
|
3
5
|
const cache = new Map();
|
package/dist/client/keys.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/* SnowUI source notice | LICENSE 2.2.0: ../../../../LICENSE
|
|
2
|
+
复制或移植时随附该版本完整 LICENSE 与第三方声明;同任务、同版本、同已确认用途不逐组件重复检查。 */
|
|
1
3
|
import { clamp } from "./geometry.js";
|
|
2
4
|
export const SEGMENT_APPEARANCE_FILL_DURATION = 500;
|
|
3
5
|
export const SEGMENT_APPEARANCE_OPACITY_DURATION = 750;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/* SnowUI source notice | LICENSE 2.2.0: ../../../../LICENSE
|
|
2
|
+
复制或移植时随附该版本完整 LICENSE 与第三方声明;同任务、同版本、同已确认用途不逐组件重复检查。 */
|
|
1
3
|
import { arc } from "d3-shape";
|
|
2
4
|
import { clamp, formatPoint, normalizePositiveAngle } from "./geometry.js";
|
|
3
5
|
export function buildArcPath(cx, cy, outer, inner, start, end, corner, separator = 0) {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/* SnowUI source notice | LICENSE 2.2.0: ../../../../LICENSE
|
|
2
|
+
复制或移植时随附该版本完整 LICENSE 与第三方声明;同任务、同版本、同已确认用途不逐组件重复检查。 */
|
|
1
3
|
import { resizeManager } from "../../index.js";
|
|
2
4
|
import { toNumber } from "./geometry.js";
|
|
3
5
|
export function watchCartesianChartSize(element, onChange) {
|
package/dist/client/lib/color.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/* SnowUI source notice | LICENSE 2.2.0: ../../../LICENSE
|
|
2
|
+
复制或移植时随附该版本完整 LICENSE 与第三方声明;同任务、同版本、同已确认用途不逐组件重复检查。 */
|
|
1
3
|
export const DEFAULT_NUMBER_VALUE_LABEL_FRACTION_DIGITS = 2;
|
|
2
4
|
export const DEFAULT_NUMBER_PERCENT_FRACTION_DIGITS = 1;
|
|
3
5
|
export const DEFAULT_NUMBER_COMPACT_THRESHOLD = 1_000_000;
|
|
@@ -72,10 +74,16 @@ export function formatNumberLabel(value, options = {}) {
|
|
|
72
74
|
});
|
|
73
75
|
}
|
|
74
76
|
export function formatPercentLabel(value, options = {}) {
|
|
77
|
+
if (typeof value !== "number" || !Number.isFinite(value)) {
|
|
78
|
+
return options.emptyValue ?? DEFAULT_NUMBER_EMPTY_VALUE;
|
|
79
|
+
}
|
|
80
|
+
const hasExplicitFractionDigits = options.fractionDigits !== undefined ||
|
|
81
|
+
options.percentFractionDigits !== undefined;
|
|
75
82
|
return `${formatNumberLabel(value, {
|
|
76
83
|
...options,
|
|
77
84
|
fractionDigits: options.fractionDigits ??
|
|
78
85
|
options.percentFractionDigits ??
|
|
79
86
|
DEFAULT_NUMBER_PERCENT_FRACTION_DIGITS,
|
|
87
|
+
preserveTrailingZeros: options.preserveTrailingZeros ?? hasExplicitFractionDigits,
|
|
80
88
|
})}%`;
|
|
81
89
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/* SnowUI source notice | LICENSE 2.2.0: ../../../LICENSE
|
|
2
|
+
复制或移植时随附该版本完整 LICENSE 与第三方声明;同任务、同版本、同已确认用途不逐组件重复检查。 */
|
|
1
3
|
import { RESIZE_MOTION } from '../motion/presets/resize.js';
|
|
2
4
|
/** 操作组私有布局适配;Flex 决定终点,独立视觉壳只做平移,不缩放 Button。 */
|
|
3
5
|
export function createOverflowActionsMotion(root) {
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
export type ProgressiveBlurDirection = "left-to-right" | "right-to-left";
|
|
2
|
+
export type EdgeProgressiveBlurDirection = "top-to-bottom" | "bottom-to-top" | ProgressiveBlurDirection;
|
|
3
|
+
export interface EdgeProgressiveBlurOptions {
|
|
4
|
+
direction?: EdgeProgressiveBlurDirection;
|
|
5
|
+
/** Visible height for vertical directions or width for horizontal directions. */
|
|
6
|
+
extent?: string;
|
|
7
|
+
position?: "absolute" | "fixed";
|
|
8
|
+
zIndex?: number;
|
|
9
|
+
}
|
|
2
10
|
export interface ProgressiveBlurOptions {
|
|
3
11
|
direction?: ProgressiveBlurDirection;
|
|
4
12
|
width?: string;
|
|
@@ -29,6 +37,11 @@ export interface ProgressiveBlurStyles {
|
|
|
29
37
|
containerStyle: string;
|
|
30
38
|
layers: ProgressiveBlurLayerStyle[];
|
|
31
39
|
}
|
|
40
|
+
/**
|
|
41
|
+
* Decorative full-edge blur. The host supplies aria-hidden and owns its stacking context.
|
|
42
|
+
* Unsupported backdrop-filter leaves transparent layers and readable content.
|
|
43
|
+
*/
|
|
44
|
+
export declare function createEdgeProgressiveBlurStyles(options?: EdgeProgressiveBlurOptions): ProgressiveBlurStyles;
|
|
32
45
|
export declare const DEFAULT_PROGRESSIVE_BLUR_LAYER_COUNT = 16;
|
|
33
46
|
export declare const DEFAULT_PROGRESSIVE_BLUR_WIDTH = "calc((var(--size-12, 3rem) + var(--size-14, 3.5rem)) / 3)";
|
|
34
47
|
export declare const createProgressiveBlurContainerStyle: (options?: ProgressiveBlurOptions) => string;
|
|
@@ -1,3 +1,57 @@
|
|
|
1
|
+
/** Four layers match the established 80px Site edge treatment. */
|
|
2
|
+
const EDGE_BLUR_LAYERS = [
|
|
3
|
+
{ blur: "2px", solid: "20%", fade: "100%" },
|
|
4
|
+
{ blur: "6px", solid: "16%", fade: "72%" },
|
|
5
|
+
{ blur: "12px", solid: "10%", fade: "48%" },
|
|
6
|
+
{ blur: "24px", solid: "4%", fade: "28%" },
|
|
7
|
+
];
|
|
8
|
+
/**
|
|
9
|
+
* Decorative full-edge blur. The host supplies aria-hidden and owns its stacking context.
|
|
10
|
+
* Unsupported backdrop-filter leaves transparent layers and readable content.
|
|
11
|
+
*/
|
|
12
|
+
export function createEdgeProgressiveBlurStyles(options = {}) {
|
|
13
|
+
const direction = options.direction ?? "top-to-bottom";
|
|
14
|
+
const vertical = direction === "top-to-bottom" || direction === "bottom-to-top";
|
|
15
|
+
const edge = {
|
|
16
|
+
"top-to-bottom": "top: 0; left: 0; right: 0",
|
|
17
|
+
"bottom-to-top": "bottom: 0; left: 0; right: 0",
|
|
18
|
+
"left-to-right": "left: 0; top: 0; bottom: 0",
|
|
19
|
+
"right-to-left": "right: 0; top: 0; bottom: 0",
|
|
20
|
+
}[direction];
|
|
21
|
+
const gradient = {
|
|
22
|
+
"top-to-bottom": "to bottom",
|
|
23
|
+
"bottom-to-top": "to top",
|
|
24
|
+
"left-to-right": "to right",
|
|
25
|
+
"right-to-left": "to left",
|
|
26
|
+
}[direction];
|
|
27
|
+
const extent = options.extent ?? "80px";
|
|
28
|
+
const size = vertical ? `height: ${extent}` : `width: ${extent}`;
|
|
29
|
+
return {
|
|
30
|
+
containerStyle: [
|
|
31
|
+
`position: ${options.position ?? "absolute"}`,
|
|
32
|
+
edge,
|
|
33
|
+
size,
|
|
34
|
+
options.zIndex === undefined ? "" : `z-index: ${options.zIndex}`,
|
|
35
|
+
"pointer-events: none",
|
|
36
|
+
].filter(Boolean).join("; "),
|
|
37
|
+
layers: EDGE_BLUR_LAYERS.map((layer, index) => {
|
|
38
|
+
const mask = `linear-gradient(${gradient}, #000 0%, #000 ${layer.solid}, transparent ${layer.fade})`;
|
|
39
|
+
return {
|
|
40
|
+
index,
|
|
41
|
+
style: [
|
|
42
|
+
"position: absolute",
|
|
43
|
+
"inset: 0",
|
|
44
|
+
"pointer-events: none",
|
|
45
|
+
"background-image: linear-gradient(transparent, transparent)",
|
|
46
|
+
`-webkit-backdrop-filter: blur(${layer.blur})`,
|
|
47
|
+
`backdrop-filter: blur(${layer.blur})`,
|
|
48
|
+
`-webkit-mask-image: ${mask}`,
|
|
49
|
+
`mask-image: ${mask}`,
|
|
50
|
+
].join("; "),
|
|
51
|
+
};
|
|
52
|
+
}),
|
|
53
|
+
};
|
|
54
|
+
}
|
|
1
55
|
export const DEFAULT_PROGRESSIVE_BLUR_LAYER_COUNT = 16;
|
|
2
56
|
export const DEFAULT_PROGRESSIVE_BLUR_WIDTH = "calc((var(--size-12, 3rem) + var(--size-14, 3.5rem)) / 3)";
|
|
3
57
|
const DEFAULT_OPTIONS = {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/* SnowUI source notice | LICENSE 2.2.0: ../../../LICENSE
|
|
2
|
+
复制或移植时随附该版本完整 LICENSE 与第三方声明;同任务、同版本、同已确认用途不逐组件重复检查。 */
|
|
1
3
|
import { RESIZE_MOTION } from "../motion/presets/resize.js";
|
|
2
4
|
/** 宽度驱动的退出进度;requiredWidth 是宿主下一次收起项目的宽度阈值。 */
|
|
3
5
|
export function getResponsiveExitOpacity(availableWidth, requiredWidth, fadeDistance) {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/* SnowUI source notice | LICENSE 2.2.0: ../../../LICENSE
|
|
2
|
+
复制或移植时随附该版本完整 LICENSE 与第三方声明;同任务、同版本、同已确认用途不逐组件重复检查。 */
|
|
1
3
|
import { SIDE_PANEL_APPEAR_MOTION, SIDE_PANEL_DISAPPEAR_MOTION, } from "../motion/presets/effects.js";
|
|
2
4
|
import { resolveMotionCssTiming } from "../motion/spring.js";
|
|
3
5
|
export const SIDE_PANEL_INLINE_GAP_PX = 16;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/* SnowUI source notice | LICENSE 2.2.0: ../../../LICENSE
|
|
2
|
+
复制或移植时随附该版本完整 LICENSE 与第三方声明;同任务、同版本、同已确认用途不逐组件重复检查。 */
|
|
1
3
|
import { RESIZE_MOTION } from '../motion/presets/resize.js';
|
|
2
4
|
const contentSelector = ':scope > .snowui-table-cell-content, :scope > .snowui-table-head-content, :scope > .snowui-table-sort';
|
|
3
5
|
/** 原生网格始终保持自然布局,只有内容层做 FLIP 位移和宽度揭示。 */
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/* SnowUI source notice | LICENSE 2.2.0: ../../../LICENSE
|
|
2
|
+
复制或移植时随附该版本完整 LICENSE 与第三方声明;同任务、同版本、同已确认用途不逐组件重复检查。 */
|
|
1
3
|
import { createResponsiveExit } from "./responsive-exit.js";
|
|
2
4
|
import { createTableColumnMotion } from "./table-column-motion.js";
|
|
3
5
|
import { resizeManager } from "../logic/observer.js";
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/* SnowUI source notice | LICENSE 2.2.0: ../../../LICENSE
|
|
2
|
+
复制或移植时随附该版本完整 LICENSE 与第三方声明;同任务、同版本、同已确认用途不逐组件重复检查。 */
|
|
1
3
|
import { createEdgeFadeMaskImage } from "./edge-fade.js";
|
|
2
4
|
import { resizeManager } from "../logic/observer.js";
|
|
3
5
|
/** Table 私有布局适配:遮住实际 Checkbox,向内容侧保留固定 Token 长度的过渡。 */
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/* SnowUI source notice | LICENSE 2.2.0: ../../../../LICENSE
|
|
2
|
+
复制或移植时随附该版本完整 LICENSE 与第三方声明;同任务、同版本、同已确认用途不逐组件重复检查。 */
|
|
1
3
|
/** 内部连续重定向:逻辑终点与仍在播放的差值分离。 */
|
|
2
4
|
export function animateTextMotionDelta(element, property, from, to, timing) {
|
|
3
5
|
const previous = Number.parseFloat(element.style.getPropertyValue(property));
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/* SnowUI source notice | LICENSE 2.2.0: ../../../../LICENSE
|
|
2
|
+
复制或移植时随附该版本完整 LICENSE 与第三方声明;同任务、同版本、同已确认用途不逐组件重复检查。 */
|
|
1
3
|
import { animateSettledTextMotionColor, animateTextMotionColorSequence, cancelTextMotionColor, } from "./color.js";
|
|
2
4
|
import { cancelTextMotionLayout, flipTextMotionElement, splitTextMotionGraphemes, TEXT_MOTION_LAYOUT_TRANSITION, } from "./layout.js";
|
|
3
5
|
import { extractTextMotionNumber, getTextMotionNumberSign, resolveTextMotionTrend, } from "./numeric.js";
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/* SnowUI source notice | LICENSE 2.2.0: ../../../../LICENSE
|
|
2
|
+
复制或移植时随附该版本完整 LICENSE 与第三方声明;同任务、同版本、同已确认用途不逐组件重复检查。 */
|
|
1
3
|
import { getTextMotionStagger } from "./sequence.js";
|
|
2
4
|
import { resolveTextMotionColor } from "./typography.js";
|
|
3
5
|
const colorAnimations = new WeakMap();
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/* SnowUI source notice | LICENSE 2.2.0: ../../../../LICENSE
|
|
2
|
+
复制或移植时随附该版本完整 LICENSE 与第三方声明;同任务、同版本、同已确认用途不逐组件重复检查。 */
|
|
1
3
|
import { resolveSnowUIColor } from "../color.js";
|
|
2
4
|
function resolveCssValue(value, numberUnit = "unitless") {
|
|
3
5
|
if (value === undefined || value === null || value === "")
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/* SnowUI source notice | LICENSE 2.2.0: ../../../LICENSE
|
|
2
|
+
复制或移植时随附该版本完整 LICENSE 与第三方声明;同任务、同版本、同已确认用途不逐组件重复检查。 */
|
|
1
3
|
/** 仅由可见的共享 Tooltip 宿主持有;事件只更新数值,不读布局或驱动渲染。 */
|
|
2
4
|
export function trackTooltipPointerSpeed(document) {
|
|
3
5
|
const clock = () => document.defaultView.performance.now();
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Snippet } from "svelte";
|
|
2
|
+
type $$ComponentProps = {
|
|
3
|
+
children?: Snippet;
|
|
4
|
+
};
|
|
5
|
+
declare const ComponentPartsBoundary: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
6
|
+
type ComponentPartsBoundary = ReturnType<typeof ComponentPartsBoundary>;
|
|
7
|
+
export default ComponentPartsBoundary;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import 'svelte/internal/disclose-version';
|
|
2
|
+
import * as $ from 'svelte/internal/client';
|
|
3
|
+
import { provideComponentParts } from "./component-parts.js";
|
|
4
|
+
|
|
5
|
+
export default function ComponentPartsBoundary($$anchor, $$props) {
|
|
6
|
+
$.push($$props, true);
|
|
7
|
+
provideComponentParts(() => undefined);
|
|
8
|
+
|
|
9
|
+
var fragment = $.comment();
|
|
10
|
+
var node = $.first_child(fragment);
|
|
11
|
+
|
|
12
|
+
$.snippet(node, () => $$props.children ?? $.noop);
|
|
13
|
+
$.append($$anchor, fragment);
|
|
14
|
+
$.pop();
|
|
15
|
+
}
|
|
@@ -7,10 +7,11 @@ export interface OverflowActionRegistration {
|
|
|
7
7
|
icon?: OverflowActionIcon;
|
|
8
8
|
disabled: boolean;
|
|
9
9
|
href?: string;
|
|
10
|
+
target?: string;
|
|
11
|
+
rel?: string;
|
|
10
12
|
execute: (event?: MouseEvent) => void;
|
|
11
13
|
getElement: () => HTMLElement | undefined;
|
|
12
|
-
|
|
13
|
-
getCompactMeasureElement: () => HTMLElement | undefined;
|
|
14
|
+
getWidth: (mode: "full" | "compact") => number;
|
|
14
15
|
}
|
|
15
16
|
export interface OverflowActionsContext {
|
|
16
17
|
register: (action: OverflowActionRegistration) => () => void;
|