yuyeon 0.0.12 → 0.0.14
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/style.css +1 -1
- package/dist/yuyeon.mjs +2370 -1926
- package/dist/yuyeon.umd.js +1 -1
- package/lib/components/card/YCard.scss +5 -0
- package/lib/components/chip/YChip.mjs +1 -0
- package/lib/components/chip/YChip.mjs.map +1 -1
- package/lib/components/chip/YChip.scss +7 -0
- package/lib/components/dialog/YDialog.mjs +24 -15
- package/lib/components/dialog/YDialog.mjs.map +1 -1
- package/lib/components/dialog/YDialog.scss +12 -0
- package/lib/components/dropdown/YDropdown.mjs +7 -0
- package/lib/components/dropdown/YDropdown.mjs.map +1 -0
- package/lib/components/dropdown/index.mjs +2 -0
- package/lib/components/dropdown/index.mjs.map +1 -0
- package/lib/components/layer/YLayer.mjs +99 -49
- package/lib/components/layer/YLayer.mjs.map +1 -1
- package/lib/components/menu/YMenu.mjs +20 -110
- package/lib/components/menu/YMenu.mjs.map +1 -1
- package/lib/components/pagination/YPagination.mjs +18 -7
- package/lib/components/pagination/YPagination.mjs.map +1 -1
- package/lib/components/pagination/YPagination.scss +10 -1
- package/lib/components/table/YDataTableBody.mjs +14 -2
- package/lib/components/table/YDataTableBody.mjs.map +1 -1
- package/lib/composables/coordinate/arrangement.mjs +14 -0
- package/lib/composables/coordinate/arrangement.mjs.map +1 -0
- package/lib/composables/coordinate/index.mjs +67 -0
- package/lib/composables/coordinate/index.mjs.map +1 -0
- package/lib/composables/coordinate/levitation.mjs +300 -0
- package/lib/composables/coordinate/levitation.mjs.map +1 -0
- package/lib/composables/coordinate/types.mjs +2 -0
- package/lib/composables/coordinate/types.mjs.map +1 -0
- package/lib/composables/coordinate/utils/point.mjs +55 -0
- package/lib/composables/coordinate/utils/point.mjs.map +1 -0
- package/lib/styles/base.scss +6 -0
- package/lib/styles/settings/provided.scss +33 -35
- package/lib/util/Rect.mjs +12 -0
- package/lib/util/Rect.mjs.map +1 -1
- package/lib/util/anchor.mjs +53 -0
- package/lib/util/anchor.mjs.map +1 -0
- package/lib/util/reactivity.mjs +14 -0
- package/lib/util/reactivity.mjs.map +1 -0
- package/package.json +1 -1
- package/types/components/chip/YChip.d.ts +1 -0
- package/types/components/dialog/YDialog.d.ts +1625 -8
- package/types/components/layer/YLayer.d.ts +1786 -1
- package/types/components/menu/YMenu.d.ts +1701 -43
- package/types/components/pagination/YPagination.d.ts +34 -14
- package/types/components/snackbar/YSnackbar.d.ts +2 -2
- package/types/components/table/YDataTable.d.ts +8 -8
- package/types/components/table/YDataTableBody.d.ts +4 -0
- package/types/components/table/YDataTableCell.d.ts +3 -3
- package/types/components/table/YDataTableServer.d.ts +8 -8
- package/types/components/table/composibles/header.d.ts +2 -2
- package/types/components/table/composibles/selection.d.ts +4 -4
- package/types/components/tooltip/YTooltip.d.ts +1620 -6
- package/types/composables/coordinate/arrangement.d.ts +6 -0
- package/types/composables/coordinate/index.d.ts +1638 -0
- package/types/composables/coordinate/levitation.d.ts +6 -0
- package/types/composables/coordinate/types.d.ts +6 -0
- package/types/composables/coordinate/utils/point.d.ts +21 -0
- package/types/util/Rect.d.ts +36 -0
- package/types/util/anchor.d.ts +23 -0
- package/types/util/reactivity.d.ts +2 -0
- package/types/util/scroll.d.ts +3 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { CSSProperties, Ref } from 'vue';
|
|
2
|
+
import { Rect } from '../../util/Rect';
|
|
3
|
+
import { CoordinateState } from './types';
|
|
4
|
+
export declare function applyLevitation(props: any, state: CoordinateState, coordinate: Ref<Rect | undefined>, coordinateStyles: Ref<CSSProperties>): {
|
|
5
|
+
updateCoordinate: () => any;
|
|
6
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { MutableRect } from '../../../util/Rect';
|
|
2
|
+
import { ParsedAnchor } from '../../../util/anchor';
|
|
3
|
+
type Point = {
|
|
4
|
+
x: number;
|
|
5
|
+
y: number;
|
|
6
|
+
};
|
|
7
|
+
declare class As<T extends string> {
|
|
8
|
+
private as;
|
|
9
|
+
}
|
|
10
|
+
type ElementPoint = Point & As<'element'>;
|
|
11
|
+
type ViewportPoint = Point & As<'viewport'>;
|
|
12
|
+
type Offset = Point & As<'offset'>;
|
|
13
|
+
/** Convert a point in local space to viewport space */
|
|
14
|
+
export declare function elementToViewport(point: ElementPoint, offset: Offset | MutableRect): ViewportPoint;
|
|
15
|
+
/** Convert a point in viewport space to local space */
|
|
16
|
+
export declare function viewportToElement(point: ViewportPoint, offset: Offset | MutableRect): ElementPoint;
|
|
17
|
+
/** Get the difference between two points */
|
|
18
|
+
export declare function getOffset<T extends Point>(a: T, b: T): Offset;
|
|
19
|
+
/** Convert an anchor object to a point in local space */
|
|
20
|
+
export declare function anchorToPoint(anchor: ParsedAnchor, box: MutableRect): ViewportPoint;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export interface Rect {
|
|
2
|
+
x: number;
|
|
3
|
+
y: number;
|
|
4
|
+
width: number;
|
|
5
|
+
height: number;
|
|
6
|
+
get top(): number;
|
|
7
|
+
get bottom(): number;
|
|
8
|
+
get left(): number;
|
|
9
|
+
get right(): number;
|
|
10
|
+
}
|
|
11
|
+
export declare class MutableRect implements Rect {
|
|
12
|
+
x: number;
|
|
13
|
+
y: number;
|
|
14
|
+
width: number;
|
|
15
|
+
height: number;
|
|
16
|
+
constructor({ x, y, width, height }: {
|
|
17
|
+
x: number;
|
|
18
|
+
y: number;
|
|
19
|
+
width: number;
|
|
20
|
+
height: number;
|
|
21
|
+
});
|
|
22
|
+
get top(): number;
|
|
23
|
+
get bottom(): number;
|
|
24
|
+
get left(): number;
|
|
25
|
+
get right(): number;
|
|
26
|
+
}
|
|
27
|
+
export declare function getOverflow(a: MutableRect, b: MutableRect): {
|
|
28
|
+
x: {
|
|
29
|
+
before: number;
|
|
30
|
+
after: number;
|
|
31
|
+
};
|
|
32
|
+
y: {
|
|
33
|
+
before: number;
|
|
34
|
+
after: number;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
declare const block: readonly ["top", "bottom"];
|
|
2
|
+
declare const inline: readonly ["start", "end", "left", "right"];
|
|
3
|
+
type Tblock = (typeof block)[number];
|
|
4
|
+
type Tinline = (typeof inline)[number];
|
|
5
|
+
export type Anchor = Tblock | Tinline | 'center' | 'center center' | `${Tblock} ${Tinline | 'center'}` | `${Tinline} ${Tblock | 'center'}`;
|
|
6
|
+
export type ParsedAnchor = {
|
|
7
|
+
side: 'center';
|
|
8
|
+
align: 'center';
|
|
9
|
+
} | {
|
|
10
|
+
side: Tblock;
|
|
11
|
+
align: 'left' | 'right' | 'center';
|
|
12
|
+
} | {
|
|
13
|
+
side: 'left' | 'right';
|
|
14
|
+
align: Tblock | 'center';
|
|
15
|
+
};
|
|
16
|
+
/** Parse a raw anchor string into an object */
|
|
17
|
+
export declare function parseAnchor(anchor: Anchor, isRtl: boolean): ParsedAnchor;
|
|
18
|
+
export declare function toPhysical(str: 'center' | Tblock | Tinline, isRtl: boolean): "top" | "right" | "bottom" | "left" | "center";
|
|
19
|
+
export declare function flipSide(anchor: ParsedAnchor): ParsedAnchor;
|
|
20
|
+
export declare function flipAlign(anchor: ParsedAnchor): ParsedAnchor;
|
|
21
|
+
export declare function flipCorner(anchor: ParsedAnchor): ParsedAnchor;
|
|
22
|
+
export declare function getAxis(anchor: ParsedAnchor): "y" | "x";
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare function getScrollParent(el?: HTMLElement, horizontal?: boolean): HTMLElement;
|
|
2
|
+
export declare function getScrollParents(el?: Element | null, stopAt?: Element | null, horizontal?: boolean): HTMLElement[];
|
|
3
|
+
export declare function hasScrollbar(el?: Element | null, horizontal?: boolean): boolean;
|