lyco 1.2.8 → 1.3.0
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/index.cjs.js +658 -142
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +854 -338
- package/dist/index.es.js.map +1 -1
- package/dist/types/index.d.ts +2 -1
- package/dist/types/{components → src/components}/Column.d.ts +2 -0
- package/dist/types/src/components/Combobox.d.ts +23 -0
- package/dist/types/src/components/Dialog/Dialog.d.ts +40 -0
- package/dist/types/src/components/Dialog/DialogActions.d.ts +10 -0
- package/dist/types/src/components/Dialog/DialogButton.d.ts +13 -0
- package/dist/types/src/components/Dialog/DialogContent.d.ts +10 -0
- package/dist/types/src/components/Dialog/DialogTitle.d.ts +12 -0
- package/dist/types/src/components/Dialog/index.d.ts +5 -0
- package/dist/types/src/components/Progress.d.ts +26 -0
- package/dist/types/{components → src/components}/Row.d.ts +2 -0
- package/dist/types/src/components/SkeletonLoader.d.ts +19 -0
- package/dist/types/src/components/Spinner.d.ts +21 -0
- package/dist/types/src/components/SwitchInput.d.ts +12 -0
- package/dist/types/src/components/Tooltip.d.ts +48 -0
- package/dist/types/src/components/Virtualizer.labs.d.ts +86 -0
- package/dist/types/{components → src/components}/core.d.ts +16 -1
- package/dist/types/{components → src/components}/index.d.ts +7 -0
- package/dist/types/src/index.d.ts +1 -0
- package/dist/types/src/theme/md3.d.ts +35 -0
- package/dist/types/stories/Dialog.stories.d.ts +6 -0
- package/dist/types/stories/Spinner.stories.d.ts +15 -0
- package/dist/types/stories/virtualizer-example.d.ts +12 -0
- package/dist/types/stories/virtualizer-example.stories.d.ts +10 -0
- package/package.json +22 -5
- package/dist/types/components/SkeletonLoader.d.ts +0 -10
- /package/dist/types/{components → src/components}/AbsoluteBox.d.ts +0 -0
- /package/dist/types/{components → src/components}/AcrylicBar.d.ts +0 -0
- /package/dist/types/{components → src/components}/AspectRatio.d.ts +0 -0
- /package/dist/types/{components → src/components}/AutoFitGrid.d.ts +0 -0
- /package/dist/types/{components → src/components}/AvatarStack.d.ts +0 -0
- /package/dist/types/{components → src/components}/Badge.d.ts +0 -0
- /package/dist/types/{components → src/components}/Canvas.d.ts +0 -0
- /package/dist/types/{components → src/components}/Card.d.ts +0 -0
- /package/dist/types/{components → src/components}/Center.d.ts +0 -0
- /package/dist/types/{components → src/components}/ColumnSplit.d.ts +0 -0
- /package/dist/types/{components → src/components}/Container.d.ts +0 -0
- /package/dist/types/{components → src/components}/Divider.d.ts +0 -0
- /package/dist/types/{components → src/components}/Flex.d.ts +0 -0
- /package/dist/types/{components → src/components}/FlowItem.d.ts +0 -0
- /package/dist/types/{components → src/components}/FooterLayout.d.ts +0 -0
- /package/dist/types/{components → src/components}/ForEach.d.ts +0 -0
- /package/dist/types/{components → src/components}/Grid.d.ts +0 -0
- /package/dist/types/{components → src/components}/GridBreakpoint.d.ts +0 -0
- /package/dist/types/{components → src/components}/GridCol.d.ts +0 -0
- /package/dist/types/{components → src/components}/GridItem.d.ts +0 -0
- /package/dist/types/{components → src/components}/GridRow.d.ts +0 -0
- /package/dist/types/{components → src/components}/HeroSection.d.ts +0 -0
- /package/dist/types/{components → src/components}/Hidden.d.ts +0 -0
- /package/dist/types/{components → src/components}/LightboxContainer.d.ts +0 -0
- /package/dist/types/{components → src/components}/List.d.ts +0 -0
- /package/dist/types/{components → src/components}/ListGroup.d.ts +0 -0
- /package/dist/types/{components → src/components}/Overlay.d.ts +0 -0
- /package/dist/types/{components → src/components}/PositionContainer.d.ts +0 -0
- /package/dist/types/{components → src/components}/RowSplit.d.ts +0 -0
- /package/dist/types/{components → src/components}/ScrollBar.d.ts +0 -0
- /package/dist/types/{components → src/components}/SideBarContainer.d.ts +0 -0
- /package/dist/types/{components → src/components}/SizedBox.d.ts +0 -0
- /package/dist/types/{components → src/components}/Spacer.d.ts +0 -0
- /package/dist/types/{components → src/components}/Sticky.d.ts +0 -0
- /package/dist/types/{components → src/components}/Style.d.ts +0 -0
- /package/dist/types/{components → src/components}/Swiper.d.ts +0 -0
- /package/dist/types/{components → src/components}/Table.d.ts +0 -0
- /package/dist/types/{components → src/components}/WaterFlow.d.ts +0 -0
- /package/dist/types/{components → src/components}/Wrap.d.ts +0 -0
- /package/dist/types/{components → src/components}/ZStack.d.ts +0 -0
package/dist/types/index.d.ts
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
export * from './
|
1
|
+
export * from './src/index'
|
2
|
+
export {}
|
@@ -2,12 +2,14 @@ import { TemplateResult } from 'lit';
|
|
2
2
|
import { OnEvent, renderFnOrArrayType } from './core';
|
3
3
|
export declare function Column(props?: {
|
4
4
|
space?: string | number;
|
5
|
+
center?: boolean;
|
5
6
|
className?: string;
|
6
7
|
style?: string;
|
7
8
|
on?: OnEvent;
|
8
9
|
}): (children?: renderFnOrArrayType) => TemplateResult<1>;
|
9
10
|
export declare function Column(props?: {
|
10
11
|
space?: string | number;
|
12
|
+
center?: boolean;
|
11
13
|
className?: string;
|
12
14
|
style?: string;
|
13
15
|
on?: OnEvent;
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { TemplateResult } from 'lit';
|
2
|
+
import { OnEvent } from './core';
|
3
|
+
export interface ComboboxOption {
|
4
|
+
value: string;
|
5
|
+
label: string;
|
6
|
+
}
|
7
|
+
export interface ComboboxProps {
|
8
|
+
value?: string;
|
9
|
+
options: ComboboxOption[];
|
10
|
+
placeholder?: string;
|
11
|
+
disabled?: boolean;
|
12
|
+
error?: boolean;
|
13
|
+
className?: string;
|
14
|
+
style?: string;
|
15
|
+
maxHeight?: string;
|
16
|
+
onChange?: (value: string) => void;
|
17
|
+
onInput?: (value: string) => void;
|
18
|
+
onFocus?: () => void;
|
19
|
+
onBlur?: () => void;
|
20
|
+
on?: OnEvent;
|
21
|
+
optionRender?: (option: ComboboxOption) => TemplateResult<1>;
|
22
|
+
}
|
23
|
+
export declare function Combobox(props?: ComboboxProps): TemplateResult<1>;
|
@@ -0,0 +1,40 @@
|
|
1
|
+
import { TemplateResult } from 'lit';
|
2
|
+
import { Ref } from 'lit/directives/ref.js';
|
3
|
+
import { OnEvent, renderFnOrArrayType } from '../core';
|
4
|
+
export declare enum DialogPlacement {
|
5
|
+
Center = "center",
|
6
|
+
Left = "left",
|
7
|
+
Right = "right",
|
8
|
+
Top = "top",
|
9
|
+
Bottom = "bottom",
|
10
|
+
TopStart = "top-start",
|
11
|
+
TopEnd = "top-end",
|
12
|
+
BottomStart = "bottom-start",
|
13
|
+
BottomEnd = "bottom-end",
|
14
|
+
LeftStart = "left-start",
|
15
|
+
LeftEnd = "left-end",
|
16
|
+
RightStart = "right-start",
|
17
|
+
RightEnd = "right-end"
|
18
|
+
}
|
19
|
+
type DialogProps = {
|
20
|
+
open?: boolean;
|
21
|
+
onClose?: () => void;
|
22
|
+
proxyRef?: Ref<IDialogLike>;
|
23
|
+
className?: string;
|
24
|
+
style?: string;
|
25
|
+
on?: OnEvent;
|
26
|
+
movable?: Ref<HTMLElement> | "self" | false;
|
27
|
+
mask?: boolean;
|
28
|
+
placement?: DialogPlacement;
|
29
|
+
};
|
30
|
+
interface IDialogLike {
|
31
|
+
show(): void;
|
32
|
+
showModal(): void;
|
33
|
+
close(): void;
|
34
|
+
open: boolean;
|
35
|
+
style: CSSStyleDeclaration;
|
36
|
+
getBoundingClientRect(): DOMRect;
|
37
|
+
}
|
38
|
+
export declare function Dialog(props?: DialogProps): (children?: renderFnOrArrayType) => TemplateResult<1>;
|
39
|
+
export declare function Dialog(props?: DialogProps, children?: renderFnOrArrayType): TemplateResult<1>;
|
40
|
+
export {};
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { TemplateResult } from 'lit';
|
2
|
+
import { OnEvent, renderFnOrArrayType } from '../core';
|
3
|
+
type DialogActionsProps = {
|
4
|
+
className?: string;
|
5
|
+
style?: string;
|
6
|
+
on?: OnEvent;
|
7
|
+
};
|
8
|
+
export declare function DialogActions(props?: DialogActionsProps): (children?: renderFnOrArrayType) => TemplateResult<1>;
|
9
|
+
export declare function DialogActions(props?: DialogActionsProps, children?: renderFnOrArrayType): TemplateResult<1>;
|
10
|
+
export {};
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { TemplateResult } from 'lit';
|
2
|
+
import { OnEvent, renderFnType } from '../core';
|
3
|
+
type DialogButtonProps = {
|
4
|
+
variant?: "text" | "contained";
|
5
|
+
color?: "primary" | "secondary" | "default";
|
6
|
+
onClick?: (el: MouseEvent) => void;
|
7
|
+
className?: string;
|
8
|
+
style?: string;
|
9
|
+
on?: OnEvent;
|
10
|
+
};
|
11
|
+
export declare function DialogButton(props?: DialogButtonProps): (children?: renderFnType) => TemplateResult<1>;
|
12
|
+
export declare function DialogButton(props?: DialogButtonProps, children?: renderFnType): TemplateResult<1>;
|
13
|
+
export {};
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { TemplateResult } from 'lit';
|
2
|
+
import { OnEvent, renderFnOrArrayType } from '../core';
|
3
|
+
type DialogContentProps = {
|
4
|
+
className?: string;
|
5
|
+
style?: string;
|
6
|
+
on?: OnEvent;
|
7
|
+
};
|
8
|
+
export declare function DialogContent(props?: DialogContentProps): (children?: renderFnOrArrayType) => TemplateResult<1>;
|
9
|
+
export declare function DialogContent(props?: DialogContentProps, children?: renderFnOrArrayType): TemplateResult<1>;
|
10
|
+
export {};
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { TemplateResult } from 'lit';
|
2
|
+
import { Ref } from 'lit/directives/ref.js';
|
3
|
+
import { OnEvent, renderFnType } from '../core';
|
4
|
+
type DialogTitleProps = {
|
5
|
+
className?: string;
|
6
|
+
style?: string;
|
7
|
+
proxyRef?: Ref<Element>;
|
8
|
+
on?: OnEvent;
|
9
|
+
};
|
10
|
+
export declare function DialogTitle(props?: DialogTitleProps): (children?: renderFnType) => TemplateResult<1>;
|
11
|
+
export declare function DialogTitle(props?: DialogTitleProps, children?: renderFnType): TemplateResult<1>;
|
12
|
+
export {};
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import { TemplateResult } from 'lit';
|
2
|
+
import { OnEvent } from './core';
|
3
|
+
type ProgressProps = {
|
4
|
+
value?: number;
|
5
|
+
bufferValue?: number;
|
6
|
+
color?: string;
|
7
|
+
secondaryColor?: string;
|
8
|
+
backgroundColor?: string;
|
9
|
+
height?: string;
|
10
|
+
radius?: string;
|
11
|
+
showLabel?: boolean;
|
12
|
+
labelPosition?: "inside" | "outside";
|
13
|
+
labelColor?: string;
|
14
|
+
labelFontSize?: string;
|
15
|
+
striped?: boolean;
|
16
|
+
animated?: boolean;
|
17
|
+
paused?: boolean;
|
18
|
+
transitionDuration?: string;
|
19
|
+
prefixIcon?: TemplateResult<1>;
|
20
|
+
suffixIcon?: TemplateResult<1>;
|
21
|
+
className?: string;
|
22
|
+
style?: string;
|
23
|
+
on?: OnEvent;
|
24
|
+
};
|
25
|
+
export declare function Progress(props?: ProgressProps): TemplateResult<1>;
|
26
|
+
export {};
|
@@ -2,9 +2,11 @@ import { TemplateResult } from 'lit';
|
|
2
2
|
import { OnEvent, renderFnOrArrayType } from './core';
|
3
3
|
export declare function Row(props?: {
|
4
4
|
space?: string | number;
|
5
|
+
center?: boolean;
|
5
6
|
on?: OnEvent;
|
6
7
|
}): (children?: renderFnOrArrayType) => TemplateResult<1>;
|
7
8
|
export declare function Row(props?: {
|
8
9
|
space?: string | number;
|
10
|
+
center?: boolean;
|
9
11
|
on?: OnEvent;
|
10
12
|
}, children?: renderFnOrArrayType): TemplateResult<1>;
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { TemplateResult } from 'lit';
|
2
|
+
import { OnEvent } from './core';
|
3
|
+
export declare function SkeletonLoader(props?: {
|
4
|
+
type?: "rect" | "circle";
|
5
|
+
width?: string;
|
6
|
+
height?: string;
|
7
|
+
borderRadius?: string;
|
8
|
+
animation?: boolean;
|
9
|
+
animationType?: "shimmer" | "pulse";
|
10
|
+
bgColor?: string;
|
11
|
+
highlightColor?: string;
|
12
|
+
count?: number;
|
13
|
+
spacing?: string;
|
14
|
+
direction?: "horizontal" | "vertical";
|
15
|
+
delay?: number;
|
16
|
+
autoHide?: boolean;
|
17
|
+
duration?: number;
|
18
|
+
on?: OnEvent;
|
19
|
+
}): TemplateResult<1>;
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import { TemplateResult } from 'lit';
|
2
|
+
import { OnEvent } from './core';
|
3
|
+
type SpinnerProps = {
|
4
|
+
size?: string;
|
5
|
+
color?: string;
|
6
|
+
thickness?: string;
|
7
|
+
speed?: string;
|
8
|
+
className?: string;
|
9
|
+
style?: string;
|
10
|
+
opacity?: number;
|
11
|
+
startAngle?: number;
|
12
|
+
easing?: string;
|
13
|
+
reverse?: boolean;
|
14
|
+
on?: OnEvent;
|
15
|
+
children?: TemplateResult | string;
|
16
|
+
svgMode?: boolean;
|
17
|
+
strokeLinecap?: "butt" | "round" | "square";
|
18
|
+
strokeDasharray?: string;
|
19
|
+
};
|
20
|
+
export declare function Spinner(props?: SpinnerProps): TemplateResult<1>;
|
21
|
+
export {};
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { TemplateResult } from 'lit';
|
2
|
+
import { OnEvent } from './core';
|
3
|
+
export interface SwitchInputProps {
|
4
|
+
checked?: boolean;
|
5
|
+
disabled?: boolean;
|
6
|
+
size?: "small" | "medium" | "large";
|
7
|
+
color?: string;
|
8
|
+
onChange?: (checked: boolean) => void;
|
9
|
+
className?: string;
|
10
|
+
on?: OnEvent;
|
11
|
+
}
|
12
|
+
export declare function SwitchInput(props?: SwitchInputProps): TemplateResult<1>;
|
@@ -0,0 +1,48 @@
|
|
1
|
+
import { TemplateResult } from 'lit';
|
2
|
+
import { OnEvent, renderFnType } from './core';
|
3
|
+
export declare enum WithTooltipPlacement {
|
4
|
+
Top = "top",
|
5
|
+
Bottom = "bottom",
|
6
|
+
Left = "left",
|
7
|
+
Right = "right"
|
8
|
+
}
|
9
|
+
export type Offset = number | {
|
10
|
+
x: number;
|
11
|
+
y: number;
|
12
|
+
};
|
13
|
+
export type TooltipTheme = "light" | "dark" | "custom";
|
14
|
+
export interface WithTooltipProps {
|
15
|
+
/** 文本或模板内容 */
|
16
|
+
content: string | TemplateResult<1>;
|
17
|
+
/** 触发延迟: 显示/隐藏分别的 ms 延迟 */
|
18
|
+
delay?: {
|
19
|
+
show: number;
|
20
|
+
hide: number;
|
21
|
+
};
|
22
|
+
/** 指定显示位置 */
|
23
|
+
placement?: WithTooltipPlacement;
|
24
|
+
/** 偏移值,支持数字或 {x, y} */
|
25
|
+
offset?: Offset;
|
26
|
+
/** 是否在点击时隐藏 */
|
27
|
+
hideOnClick?: boolean;
|
28
|
+
/** 当鼠标移入 tooltip 内容时,保持可见 */
|
29
|
+
interactive?: boolean;
|
30
|
+
/** 最大宽度 */
|
31
|
+
maxWidth?: string;
|
32
|
+
/** 自定义主题,自定义时可以通过 CSS 覆盖 .lyco-tooltip--custom */
|
33
|
+
theme?: TooltipTheme;
|
34
|
+
/** 自定义 z-index */
|
35
|
+
zIndex?: number;
|
36
|
+
/** 附加类名 */
|
37
|
+
className?: string;
|
38
|
+
/** 行内样式 */
|
39
|
+
style?: string;
|
40
|
+
/** 事件绑定 */
|
41
|
+
on?: OnEvent;
|
42
|
+
/** 显示回调 */
|
43
|
+
onShow?: () => void;
|
44
|
+
/** 隐藏回调 */
|
45
|
+
onHide?: () => void;
|
46
|
+
}
|
47
|
+
export declare function WithTooltip(props: WithTooltipProps): (children?: renderFnType) => TemplateResult;
|
48
|
+
export declare function WithTooltip(props: WithTooltipProps, children?: renderFnType): TemplateResult;
|
@@ -0,0 +1,86 @@
|
|
1
|
+
import { ReactiveController, ReactiveControllerHost, TemplateResult } from 'lit';
|
2
|
+
import { Ref } from 'lit/directives/ref.js';
|
3
|
+
export type ItemsSource<T> = T[];
|
4
|
+
export interface VirtualizerConfig<T> {
|
5
|
+
items: ItemsSource<T>;
|
6
|
+
keyFunction?: (index: number) => string | number;
|
7
|
+
itemSize?: number | ((index: number) => number);
|
8
|
+
layout?: "vertical" | "horizontal";
|
9
|
+
padding?: number;
|
10
|
+
preloadCount?: number;
|
11
|
+
cacheSize?: number;
|
12
|
+
renderItem?: (item: T, index: number) => TemplateResult<1>;
|
13
|
+
pageSize?: number;
|
14
|
+
fetchMoreThreshold?: number;
|
15
|
+
onLoadMore?: () => Promise<void>;
|
16
|
+
}
|
17
|
+
export declare class VirtualizerController<T> implements ReactiveController {
|
18
|
+
host: ReactiveControllerHost;
|
19
|
+
private _items;
|
20
|
+
private _itemSize;
|
21
|
+
private _layout;
|
22
|
+
private _preloadCount;
|
23
|
+
private _cacheSize;
|
24
|
+
private _renderItem;
|
25
|
+
private _containerRef;
|
26
|
+
private _firstVisible;
|
27
|
+
private _lastVisible;
|
28
|
+
private _positionCache;
|
29
|
+
private _sizeCache;
|
30
|
+
private _cacheInitialized;
|
31
|
+
private _totalContentSize;
|
32
|
+
private _templateBuffer;
|
33
|
+
private _blockStore;
|
34
|
+
private _recycledNodes;
|
35
|
+
private readonly RECYCLE_POOL_SIZE;
|
36
|
+
private _intersectionObserver?;
|
37
|
+
private _mutationObserver?;
|
38
|
+
private _idleCallbackId?;
|
39
|
+
private _preRenderChunkSize;
|
40
|
+
private readonly CHUNK_SIZE;
|
41
|
+
private _chunks;
|
42
|
+
private _resizeObserver?;
|
43
|
+
private _visibleChunkIndexes;
|
44
|
+
private _loadedChunks;
|
45
|
+
private _estimatedItemHeight;
|
46
|
+
private _isLoading;
|
47
|
+
private _hasMore;
|
48
|
+
private _pageSize;
|
49
|
+
private _fetchMoreThreshold;
|
50
|
+
private _onLoadMore?;
|
51
|
+
constructor(host: ReactiveControllerHost, initialConfig: VirtualizerConfig<T>, initialRenderItem: (item: T, index: number) => TemplateResult<1>);
|
52
|
+
private _initializeItems;
|
53
|
+
private _updateMetricsForRange;
|
54
|
+
private _setupObservers;
|
55
|
+
private _setupResizeObserver;
|
56
|
+
private _initializeChunks;
|
57
|
+
private _updateChunkMetrics;
|
58
|
+
private _calculateVisibleChunks;
|
59
|
+
private _preloadAdjacentChunks;
|
60
|
+
private _loadChunk;
|
61
|
+
private _calculateMetricsForChunk;
|
62
|
+
private _preRenderChunk;
|
63
|
+
private _prerenderItem;
|
64
|
+
private _getItemStyle;
|
65
|
+
private _createItemTemplate;
|
66
|
+
hostConnected(): void;
|
67
|
+
hostDisconnected(): void;
|
68
|
+
hostUpdated(): void;
|
69
|
+
updateConfig(newConfig: VirtualizerConfig<T>, newRenderItem: (item: T, index: number) => TemplateResult<1>): Promise<void>;
|
70
|
+
private _checkAndLoadMore;
|
71
|
+
private _getItemSize;
|
72
|
+
private _calculateMetrics;
|
73
|
+
private _findItemIndexByOffset;
|
74
|
+
private _updateVisibleRange;
|
75
|
+
getRenderedItems(): TemplateResult[];
|
76
|
+
private _ticking;
|
77
|
+
private _lastUpdate;
|
78
|
+
private readonly FRAME_BUDGET;
|
79
|
+
private _scheduleUpdate;
|
80
|
+
getContainerRef(): Ref<HTMLElement>;
|
81
|
+
getTotalContentSize(): number;
|
82
|
+
getLayout(): "vertical" | "horizontal";
|
83
|
+
}
|
84
|
+
export declare function Virtualizer<T>(config: Omit<VirtualizerConfig<T>, "renderItem">): (renderItem: (item: T, index: number) => TemplateResult<1>) => TemplateResult<1>;
|
85
|
+
export declare function Virtualizer<T>(config: VirtualizerConfig<T>): TemplateResult<1>;
|
86
|
+
export declare function Virtualizer<T>(config: VirtualizerConfig<T>, renderItem: (item: T, index: number) => TemplateResult<1>): TemplateResult<1>;
|
@@ -31,7 +31,7 @@ declare const allRandomClassName: {
|
|
31
31
|
prefix: string;
|
32
32
|
className: string | typeof ___LYCO_NULL___;
|
33
33
|
};
|
34
|
-
"SkeletonLoader::skeleton
|
34
|
+
"SkeletonLoader::skeleton": {
|
35
35
|
init: boolean;
|
36
36
|
prefix: string;
|
37
37
|
className: string | typeof ___LYCO_NULL___;
|
@@ -71,6 +71,21 @@ declare const allRandomClassName: {
|
|
71
71
|
prefix: string;
|
72
72
|
className: string | typeof ___LYCO_NULL___;
|
73
73
|
};
|
74
|
+
"Dialog::dialog": {
|
75
|
+
init: boolean;
|
76
|
+
prefix: string;
|
77
|
+
className: string | typeof ___LYCO_NULL___;
|
78
|
+
};
|
79
|
+
"SwitchInput::switch": {
|
80
|
+
init: boolean;
|
81
|
+
prefix: string;
|
82
|
+
className: string | typeof ___LYCO_NULL___;
|
83
|
+
};
|
84
|
+
"Combobox::combobox": {
|
85
|
+
init: boolean;
|
86
|
+
prefix: string;
|
87
|
+
className: string | typeof ___LYCO_NULL___;
|
88
|
+
};
|
74
89
|
};
|
75
90
|
export declare function getRandomClassName(key: keyof typeof allRandomClassName): string;
|
76
91
|
type ComponentCountItem = {
|
@@ -1,3 +1,4 @@
|
|
1
|
+
export { Virtualizer, VirtualizerController, type ItemsSource, type VirtualizerConfig, } from './Virtualizer.labs';
|
1
2
|
export { LightboxContainer } from './LightboxContainer';
|
2
3
|
export { Column } from './Column';
|
3
4
|
export { Flex } from './Flex';
|
@@ -13,6 +14,7 @@ export { RowSplit } from './RowSplit';
|
|
13
14
|
export { ScrollBar } from './ScrollBar';
|
14
15
|
export { SideBarContainer } from './SideBarContainer';
|
15
16
|
export { Swiper } from './Swiper';
|
17
|
+
export { SwitchInput } from './SwitchInput';
|
16
18
|
export { AbsoluteBox } from './AbsoluteBox';
|
17
19
|
export { AcrylicBar } from './AcrylicBar';
|
18
20
|
export { AspectRatio } from './AspectRatio';
|
@@ -40,3 +42,8 @@ export { Sticky } from './Sticky';
|
|
40
42
|
export { Table } from './Table';
|
41
43
|
export { Wrap } from './Wrap';
|
42
44
|
export { ZStack } from './ZStack';
|
45
|
+
export { Combobox } from './Combobox';
|
46
|
+
export { Progress } from './Progress';
|
47
|
+
export { Spinner } from './Spinner';
|
48
|
+
export { WithTooltip } from './Tooltip';
|
49
|
+
export * from './Dialog';
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './components';
|
@@ -0,0 +1,35 @@
|
|
1
|
+
export declare const MD3: {
|
2
|
+
readonly borderRadius: {
|
3
|
+
readonly small: "4px";
|
4
|
+
readonly medium: "8px";
|
5
|
+
readonly large: "16px";
|
6
|
+
readonly full: "9999px";
|
7
|
+
};
|
8
|
+
readonly elevation: {
|
9
|
+
readonly level1: "0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.14)";
|
10
|
+
readonly level2: "0 3px 6px rgba(0,0,0,0.15), 0 2px 4px rgba(0,0,0,0.12)";
|
11
|
+
readonly level3: "0 10px 20px rgba(0,0,0,0.15), 0 3px 6px rgba(0,0,0,0.10)";
|
12
|
+
readonly level4: "0 15px 25px rgba(0,0,0,0.15), 0 5px 10px rgba(0,0,0,0.05)";
|
13
|
+
readonly level5: "0 20px 40px rgba(0,0,0,0.2)";
|
14
|
+
};
|
15
|
+
readonly animation: {
|
16
|
+
readonly standard: "0.2s cubic-bezier(0.4, 0, 0.2, 1)";
|
17
|
+
readonly emphasized: "0.3s cubic-bezier(0.4, 0, 0.2, 1)";
|
18
|
+
readonly decelerated: "0.4s cubic-bezier(0, 0, 0.2, 1)";
|
19
|
+
};
|
20
|
+
readonly colors: {
|
21
|
+
readonly primary: "#6750A4";
|
22
|
+
readonly onPrimary: "#FFFFFF";
|
23
|
+
readonly primaryContainer: "#EADDFF";
|
24
|
+
readonly onPrimaryContainer: "#21005E";
|
25
|
+
readonly secondary: "#625B71";
|
26
|
+
readonly onSecondary: "#FFFFFF";
|
27
|
+
readonly secondaryContainer: "#E8DEF8";
|
28
|
+
readonly onSecondaryContainer: "#1E192B";
|
29
|
+
readonly surface: "#FEF7FF";
|
30
|
+
readonly onSurface: "#1C1B1F";
|
31
|
+
readonly surfaceVariant: "#E7E0EB";
|
32
|
+
readonly onSurfaceVariant: "#49454E";
|
33
|
+
readonly error: "#B00020";
|
34
|
+
};
|
35
|
+
};
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import { Meta } from '@storybook/web-components';
|
2
|
+
export declare const WithComplexContent: () => import('lit').TemplateResult<1>;
|
3
|
+
export declare const MultipleButtons: () => import('lit').TemplateResult<1>;
|
4
|
+
export declare const CustomStyles: () => import('lit').TemplateResult<1>;
|
5
|
+
declare const meta: Meta;
|
6
|
+
export default meta;
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { Meta } from '@storybook/web-components';
|
2
|
+
declare const _default: Meta;
|
3
|
+
export default _default;
|
4
|
+
export declare const Basic: () => import('lit').TemplateResult<1>;
|
5
|
+
export declare const CustomSize: () => import('lit').TemplateResult<1>;
|
6
|
+
export declare const CustomColor: () => import('lit').TemplateResult<1>;
|
7
|
+
export declare const CustomSpeed: () => import('lit').TemplateResult<1>;
|
8
|
+
export declare const CustomThickness: () => import('lit').TemplateResult<1>;
|
9
|
+
export declare const CustomContent: () => import('lit').TemplateResult<1>;
|
10
|
+
export declare const CustomEasing: () => import('lit').TemplateResult<1>;
|
11
|
+
export declare const CustomStartAngle: () => import('lit').TemplateResult<1>;
|
12
|
+
export declare const ReverseAndOpacity: () => import('lit').TemplateResult<1>;
|
13
|
+
export declare const SVGMode: () => import('lit').TemplateResult<1>;
|
14
|
+
export declare const StrokeLinecap: () => import('lit').TemplateResult<1>;
|
15
|
+
export declare const StrokeDasharray: () => import('lit').TemplateResult<1>;
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { LitElement } from 'lit';
|
2
|
+
interface MyDataItem {
|
3
|
+
id: number;
|
4
|
+
text: string;
|
5
|
+
}
|
6
|
+
export declare class VirtualizerExample extends LitElement {
|
7
|
+
items: MyDataItem[];
|
8
|
+
pageSize: number;
|
9
|
+
private _renderMyItem;
|
10
|
+
render(): import('lit').TemplateResult<1>;
|
11
|
+
}
|
12
|
+
export {};
|
@@ -0,0 +1,10 @@
|
|
1
|
+
declare const meta: {
|
2
|
+
readonly title: "Example/Virtualizer";
|
3
|
+
readonly tags: readonly ["autodocs"];
|
4
|
+
readonly render: () => import('lit').TemplateResult<1>;
|
5
|
+
};
|
6
|
+
export default meta;
|
7
|
+
export declare const WithCustomItemRenderer: {
|
8
|
+
name: string;
|
9
|
+
render: () => import('lit').TemplateResult<1>;
|
10
|
+
};
|
package/package.json
CHANGED
@@ -1,9 +1,11 @@
|
|
1
1
|
{
|
2
2
|
"name": "lyco",
|
3
|
-
"version": "1.
|
4
|
-
"description": "
|
3
|
+
"version": "1.3.0",
|
4
|
+
"description": "Lit-based pure layout rendering function library , including Row/Column/Flex/Grid and other commonly used rendering functions .",
|
5
5
|
"scripts": {
|
6
|
-
"build": "vite build"
|
6
|
+
"build": "vite build",
|
7
|
+
"storybook": "storybook dev -p 6006",
|
8
|
+
"build-storybook": "storybook build"
|
7
9
|
},
|
8
10
|
"keywords": [
|
9
11
|
"lit",
|
@@ -13,7 +15,15 @@
|
|
13
15
|
"typescript",
|
14
16
|
"npm",
|
15
17
|
"flex",
|
16
|
-
"grid"
|
18
|
+
"grid",
|
19
|
+
"declarative",
|
20
|
+
"container",
|
21
|
+
"stack",
|
22
|
+
"center",
|
23
|
+
"responsive",
|
24
|
+
"web-components",
|
25
|
+
"layout-system",
|
26
|
+
"spacing"
|
17
27
|
],
|
18
28
|
"author": "AnNingUI <an3533581512@gmail.com>",
|
19
29
|
"license": "MIT",
|
@@ -39,6 +49,13 @@
|
|
39
49
|
"vite-plugin-dts": "^4.5.4"
|
40
50
|
},
|
41
51
|
"devDependencies": {
|
42
|
-
"@
|
52
|
+
"@chromatic-com/storybook": "3",
|
53
|
+
"@storybook/addon-essentials": "8.6.12",
|
54
|
+
"@storybook/blocks": "8.6.12",
|
55
|
+
"@storybook/experimental-addon-test": "8.6.12",
|
56
|
+
"@storybook/test": "8.6.12",
|
57
|
+
"@storybook/web-components": "8.6.12",
|
58
|
+
"@storybook/web-components-vite": "8.6.12",
|
59
|
+
"storybook": "8.6.12"
|
43
60
|
}
|
44
61
|
}
|
@@ -1,10 +0,0 @@
|
|
1
|
-
import { OnEvent } from './core';
|
2
|
-
export declare function SkeletonLoader(props?: {
|
3
|
-
type?: "rect" | "circle";
|
4
|
-
width?: string;
|
5
|
-
height?: string;
|
6
|
-
borderRadius?: string;
|
7
|
-
animation?: boolean;
|
8
|
-
className?: string;
|
9
|
-
on?: OnEvent;
|
10
|
-
}): import('lit').TemplateResult<1>;
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|