x-next 0.0.0-alpha.48 → 0.0.0-alpha.49

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # 简介
2
2
 
3
- X-Next是Ringing Tech的基础UI库。
3
+ X-Next致力打造一套最好看、最好用的Vue3 UI组件库。
4
4
 
5
5
  # 安装
6
6
 
@@ -24,3 +24,23 @@ const app = createApp(App)
24
24
  app.use(XNext)
25
25
  app.mount('#app')
26
26
  ```
27
+ ### 目前已完成的组件
28
+
29
+ ```
30
+ // Dialog, Message, MessageBox, Notification
31
+ // XButton: (typeof import('x-next'))['XButton'];
32
+ // XXDialog: (typeof import('x-next'))['XDialog'];
33
+ // XXMessage: (typeof import('x-next'))['XMessage'];
34
+ // XXMessageBox: (typeof import('x-next'))['XMessageBox'];
35
+ // XNotification: (typeof import('x-next'))['XNotification'];
36
+ // XSpace: (typeof import('x-next'))['XSpace'];
37
+ // XPopconfirm: (typeof import('x-next'))['XPopconfirm'];
38
+ // XTrendChart: (typeof import('x-next'))['XTrendChart'];
39
+ // XTimeline: (typeof import('x-next'))['XTimeline'];
40
+ // XTimelineItem: (typeof import('x-next'))['XTimelineItem'];
41
+ // XPopup: (typeof import('x-next'))['XPopup'];
42
+ // XScrollbar: (typeof import('x-next'))['XScrollbar'];
43
+ // XDrawer: (typeof import('x-next'))['XDrawer'];
44
+ // XTag: (typeof import('x-next'))['XTag'];
45
+ // XTooltip: (typeof import('x-next'))['XTooltip'];
46
+ ```
@@ -0,0 +1,12 @@
1
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
2
+ watchOnUpdated: BooleanConstructor;
3
+ }>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
4
+ [key: string]: any;
5
+ }>[] | undefined, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "resize"[], "resize", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
6
+ watchOnUpdated: BooleanConstructor;
7
+ }>> & Readonly<{
8
+ onResize?: ((...args: any[]) => any) | undefined;
9
+ }>, {
10
+ watchOnUpdated: boolean;
11
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
12
+ export default _default;
@@ -0,0 +1,2 @@
1
+ import { Slots } from 'vue';
2
+ export default function usePickSlots(slots: Slots, slotName: string): import('vue').Ref<import('vue').Slot<any> | undefined, import('vue').Slot<any> | undefined>;
@@ -0,0 +1,10 @@
1
+ import { Ref } from 'vue';
2
+ export declare const useTeleportContainer: ({ popupContainer, visible, defaultContainer, documentContainer, }: {
3
+ popupContainer: Ref<string | HTMLElement | undefined>;
4
+ visible: Ref<boolean>;
5
+ defaultContainer?: string;
6
+ documentContainer?: boolean;
7
+ }) => {
8
+ teleportContainer: Ref<string | HTMLElement | undefined, string | HTMLElement | undefined>;
9
+ containerRef: Ref<HTMLElement | undefined, HTMLElement | undefined>;
10
+ };
@@ -0,0 +1,4 @@
1
+ export declare const TRIGGER_POSITIONS: readonly ["top", "tl", "tr", "bottom", "bl", "br", "left", "lt", "lb", "right", "rt", "rb"];
2
+ export type TriggerPosition = (typeof TRIGGER_POSITIONS)[number];
3
+ export declare const TRIGGER_EVENTS: readonly ["hover", "click", "focus", "contextMenu"];
4
+ export type TriggerEvent = (typeof TRIGGER_EVENTS)[number];
@@ -0,0 +1 @@
1
+ export type ClassName = string | Record<string, boolean> | (string | Record<string, boolean>)[];
@@ -8,3 +8,8 @@ export declare const setStyle: (element: HTMLElement, styleName: CSSProperties |
8
8
  export declare const getElement: (target: string | HTMLElement | undefined, container?: Document | HTMLElement) => HTMLElement | undefined;
9
9
  export declare const on: <K extends keyof HTMLElementEventMap>(element: HTMLElement | Window, event: K, handler: (ev: HTMLElementEventMap[K]) => void, options?: boolean | AddEventListenerOptions) => void;
10
10
  export declare const off: <K extends keyof HTMLElementEventMap>(element: HTMLElement | Window, type: K, handler: (ev: HTMLElementEventMap[K]) => void, options?: boolean | EventListenerOptions) => void;
11
+ export interface Size {
12
+ height: number;
13
+ width: number;
14
+ }
15
+ export declare const getDocumentSize: () => Size;
@@ -0,0 +1,2 @@
1
+ import { Data } from './types';
2
+ export declare const omit: <T extends Data, K extends keyof any>(object: T, path: Array<K>) => Omit<T, K>;
@@ -0,0 +1,3 @@
1
+ declare const raf: typeof requestAnimationFrame;
2
+ declare const caf: typeof cancelAnimationFrame;
3
+ export { raf, caf };
@@ -0,0 +1,4 @@
1
+ export declare function throttleByRaf(cb: (...args: any[]) => void): {
2
+ (...args: any[]): void;
3
+ cancel(): void;
4
+ };
@@ -0,0 +1 @@
1
+ export type Data = Record<string, any>;
@@ -23,6 +23,7 @@ export declare const isComponent: (vn: VNode, type?: VNodeTypes) => type is Comp
23
23
  export declare const isTextChildren: (child: VNode, children: VNode["children"]) => children is string;
24
24
  export declare const isArrayChildren: (vn: VNode, children: VNode["children"]) => children is VNode[];
25
25
  export declare const isSlotsChildren: (vn: VNode, children: VNode["children"]) => children is Slots;
26
+ export declare const isEmptyChildren: (children?: VNode[]) => boolean;
26
27
  export declare const getAllElements: (children: VNode[] | undefined, includeText?: boolean) => VNode<import('vue').RendererNode, import('vue').RendererElement, {
27
28
  [key: string]: any;
28
29
  }>[];
@@ -11,4 +11,5 @@ export * from './space';
11
11
  export * from './tag';
12
12
  export * from './timeline';
13
13
  export * from './timeline-item';
14
+ export * from './tooltip';
14
15
  export * from './trend-chart';