@xlui/xux-ui 1.2.2 → 1.2.4

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.
@@ -0,0 +1,283 @@
1
+ import { MessageOptions, ConfirmOptions } from './composables/Msg';
2
+ import { AlertOptions } from './composables/Alert';
3
+ import { ComputedRef } from 'vue';
4
+ import { Dayjs, UnitType, ManipulateType, OpUnitType, ConfigType, QUnitType } from 'dayjs';
5
+ import { CalendarDate } from './composables/DateTime';
6
+ export { default as XButton } from './components/Button/index';
7
+ export { default as XCard } from './components/Card/index';
8
+ export { default as XCountrySelect } from './components/CountrySelect/index';
9
+ export { default as XSelect } from './components/Select/index';
10
+ export { default as XInput } from './components/Input/index';
11
+ export { default as XCheckboxes } from './components/Checkboxes/index';
12
+ export { default as XAccordion } from './components/Accordion/index';
13
+ export { default as XThumbnailContainer } from './components/ThumbnailContainer/index';
14
+ export { default as XSkeleton } from './components/Skeleton/index';
15
+ export { default as XModal } from './components/Modal/index';
16
+ export { default as XTooltips } from './components/Tooltips/index';
17
+ export { default as XSwitch } from './components/Switch/index';
18
+ export { default as XScore } from './components/Score/index';
19
+ export { default as XRadio } from './components/Radio/index';
20
+ export { default as XDateTimePicker } from './components/DateTimePicker/index';
21
+ export { default as XRegionCascader } from './components/RegionCascader/index';
22
+ export { default as XFirework } from './components/SpecialEffects/fireworks';
23
+ export { default as XGButton } from './components/SpecialEffects/glow';
24
+ export { default as XAdvancedGrid } from './components/DynamicMech/index';
25
+ export { default as XDynamicMech } from './components/DynamicMech/index';
26
+ export { default as XGrid } from './components/Grid/index';
27
+ export { default as XQrcode } from './components/Qrcode/index';
28
+ export { default as XSegmented } from './components/Segmented/index';
29
+ export { default as XForm } from './components/Form/index';
30
+ export { default as XFormItem } from './components/FormItem/index';
31
+ export { default as XColor } from './components/Color/index';
32
+ export { default as XBadge } from './components/Badge/index';
33
+ export { default as XChat } from './components/Chat/index';
34
+ export { default as XImage } from './components/Image/index';
35
+ export { xlMsg, default as useMsg } from './composables/Msg';
36
+ export { xlAlert, default as useAlert } from './composables/Alert';
37
+ export { useDateTime, useDateRange, useCountdown, default as useDateTimeDefault } from './composables/DateTime';
38
+ export declare const Msg: {
39
+ show: (options: MessageOptions) => void;
40
+ confirm: (options: ConfirmOptions) => void;
41
+ success: (title: string, content?: string, duration?: number) => void;
42
+ error: (title: string, content?: string, duration?: number) => void;
43
+ warning: (title: string, content?: string, duration?: number) => void;
44
+ info: (title: string, content?: string, duration?: number) => void;
45
+ remove: (messageId: string) => void;
46
+ };
47
+ export declare const Alert: {
48
+ show: (options: AlertOptions) => {
49
+ close: () => void;
50
+ };
51
+ success: (content: string, options?: Partial< AlertOptions>) => {
52
+ close: () => void;
53
+ };
54
+ error: (content: string, options?: Partial< AlertOptions>) => {
55
+ close: () => void;
56
+ };
57
+ warning: (content: string, options?: Partial< AlertOptions>) => {
58
+ close: () => void;
59
+ };
60
+ info: (content: string, options?: Partial< AlertOptions>) => {
61
+ close: () => void;
62
+ };
63
+ };
64
+ export declare const DateTime: {
65
+ now: ComputedRef<{
66
+ clone: () => Dayjs;
67
+ isValid: () => boolean;
68
+ year: {
69
+ (): number;
70
+ (value: number): Dayjs;
71
+ };
72
+ month: {
73
+ (): number;
74
+ (value: number): Dayjs;
75
+ };
76
+ date: {
77
+ (): number;
78
+ (value: number): Dayjs;
79
+ };
80
+ day: {
81
+ (): 0 | 1 | 2 | 3 | 4 | 5 | 6;
82
+ (value: number): Dayjs;
83
+ };
84
+ hour: {
85
+ (): number;
86
+ (value: number): Dayjs;
87
+ };
88
+ minute: {
89
+ (): number;
90
+ (value: number): Dayjs;
91
+ };
92
+ second: {
93
+ (): number;
94
+ (value: number): Dayjs;
95
+ };
96
+ millisecond: {
97
+ (): number;
98
+ (value: number): Dayjs;
99
+ };
100
+ set: (unit: UnitType, value: number) => Dayjs;
101
+ get: (unit: UnitType) => number;
102
+ add: {
103
+ (value: number, unit?: ManipulateType): Dayjs;
104
+ (duration: plugin.Duration): Dayjs;
105
+ };
106
+ subtract: {
107
+ (value: number, unit?: ManipulateType): Dayjs;
108
+ (duration: plugin.Duration): Dayjs;
109
+ };
110
+ startOf: {
111
+ (unit: OpUnitType): Dayjs;
112
+ (unit: "isoWeek" | OpUnitType): Dayjs;
113
+ };
114
+ endOf: {
115
+ (unit: OpUnitType): Dayjs;
116
+ (unit: "isoWeek" | OpUnitType): Dayjs;
117
+ };
118
+ format: (template?: string) => string;
119
+ diff: (date?: ConfigType, unit?: QUnitType | OpUnitType, float?: boolean) => number;
120
+ valueOf: () => number;
121
+ unix: () => number;
122
+ daysInMonth: () => number;
123
+ toDate: () => Date;
124
+ toJSON: () => string;
125
+ toISOString: () => string;
126
+ toString: () => string;
127
+ utcOffset: {
128
+ (): number;
129
+ (offset: number | string, keepLocalTime?: boolean): Dayjs;
130
+ };
131
+ isBefore: {
132
+ (date?: ConfigType, unit?: OpUnitType): boolean;
133
+ (date?: ConfigType, unit?: "isoWeek" | OpUnitType): boolean;
134
+ };
135
+ isSame: {
136
+ (date?: ConfigType, unit?: OpUnitType): boolean;
137
+ (date?: ConfigType, unit?: "isoWeek" | OpUnitType): boolean;
138
+ };
139
+ isAfter: {
140
+ (date?: ConfigType, unit?: OpUnitType): boolean;
141
+ (date?: ConfigType, unit?: "isoWeek" | OpUnitType): boolean;
142
+ };
143
+ locale: {
144
+ (): string;
145
+ (preset: string | ILocale, object?: Partial<ILocale>): Dayjs;
146
+ };
147
+ utc: (keepLocalTime?: boolean) => Dayjs;
148
+ local: () => Dayjs;
149
+ isUTC: () => boolean;
150
+ tz: (timezone?: string, keepLocalTime?: boolean) => Dayjs;
151
+ offsetName: (type?: "short" | "long") => string | undefined;
152
+ fromNow: (withoutSuffix?: boolean) => string;
153
+ from: (compared: ConfigType, withoutSuffix?: boolean) => string;
154
+ toNow: (withoutSuffix?: boolean) => string;
155
+ to: (compared: ConfigType, withoutSuffix?: boolean) => string;
156
+ isSameOrAfter: (date?: ConfigType, unit?: OpUnitType) => boolean;
157
+ isSameOrBefore: (date?: ConfigType, unit?: OpUnitType) => boolean;
158
+ isBetween: (a: ConfigType, b: ConfigType, c?: OpUnitType | null, d?: "()" | "[]" | "[)" | "(]") => boolean;
159
+ week: {
160
+ (): number;
161
+ (value: number): Dayjs;
162
+ };
163
+ isoWeekYear: () => number;
164
+ isoWeek: {
165
+ (): number;
166
+ (value: number): Dayjs;
167
+ };
168
+ isoWeekday: {
169
+ (): number;
170
+ (value: number): Dayjs;
171
+ };
172
+ }>;
173
+ updateNow: () => void;
174
+ getCurrent: () => Dayjs;
175
+ format: (v: string | number | Date | Dayjs | null | undefined, fmt?: string) => string;
176
+ parse: (v: string | number, fmt?: string) => Dayjs;
177
+ create: (v?: string | number | Date | Dayjs | null | undefined) => Dayjs;
178
+ isSame: (a: string | number | Date | Dayjs | null | undefined, b: string | number | Date | Dayjs | null | undefined, unit?: OpUnitType) => boolean;
179
+ isAfter: (a: string | number | Date | Dayjs | null | undefined, b: string | number | Date | Dayjs | null | undefined, unit?: OpUnitType) => boolean;
180
+ isBefore: (a: string | number | Date | Dayjs | null | undefined, b: string | number | Date | Dayjs | null | undefined, unit?: OpUnitType) => boolean;
181
+ isSameOrAfter: (a: string | number | Date | Dayjs | null | undefined, b: string | number | Date | Dayjs | null | undefined, unit?: OpUnitType) => boolean;
182
+ isSameOrBefore: (a: string | number | Date | Dayjs | null | undefined, b: string | number | Date | Dayjs | null | undefined, unit?: OpUnitType) => boolean;
183
+ isBetween: (v: string | number | Date | Dayjs | null | undefined, start: string | number | Date | Dayjs | null | undefined, end: string | number | Date | Dayjs | null | undefined, unit?: OpUnitType, inclusivity?: "()" | "[]" | "[)" | "(]") => boolean;
184
+ add: (v: string | number | Date | Dayjs | null | undefined, amount: number, unit: ManipulateType) => Dayjs;
185
+ subtract: (v: string | number | Date | Dayjs | null | undefined, amount: number, unit: ManipulateType) => Dayjs;
186
+ diff: (a: string | number | Date | Dayjs | null | undefined, b: string | number | Date | Dayjs | null | undefined, unit?: QUnitType, float?: boolean) => number;
187
+ startOf: (v: string | number | Date | Dayjs | null | undefined, unit: OpUnitType) => Dayjs;
188
+ endOf: (v: string | number | Date | Dayjs | null | undefined, unit: OpUnitType) => Dayjs;
189
+ fromNow: (v: string | number | Date | Dayjs | null | undefined) => string;
190
+ toNow: (v: string | number | Date | Dayjs | null | undefined) => string;
191
+ from: (a: string | number | Date | Dayjs | null | undefined, b: string | number | Date | Dayjs | null | undefined) => string;
192
+ to: (a: string | number | Date | Dayjs | null | undefined, b: string | number | Date | Dayjs | null | undefined) => string;
193
+ humanizeDiff: (a: string | number | Date | Dayjs | null | undefined, b?: string | number | Date | Dayjs | null | undefined, unit?: QUnitType) => string;
194
+ formatParts: (ms: number) => {
195
+ days: number;
196
+ hours: number;
197
+ minutes: number;
198
+ seconds: number;
199
+ };
200
+ getCalendarDates: (year: number, month: number, selectedDate?: string | number | Date | Dayjs | null | undefined, minDate?: string | number | Date | Dayjs | null | undefined, maxDate?: string | number | Date | Dayjs | null | undefined) => CalendarDate[];
201
+ getMonthInfo: (year: number, month: number) => {
202
+ firstDay: Dayjs;
203
+ lastDay: Dayjs;
204
+ daysInMonth: number;
205
+ firstWeekday: 0 | 1 | 2 | 3 | 4 | 5 | 6;
206
+ lastWeekday: 0 | 1 | 2 | 3 | 4 | 5 | 6;
207
+ weeksInMonth: number;
208
+ };
209
+ getTimeRanges: () => {
210
+ today: {
211
+ start: Dayjs;
212
+ end: Dayjs;
213
+ };
214
+ yesterday: {
215
+ start: Dayjs;
216
+ end: Dayjs;
217
+ };
218
+ thisWeek: {
219
+ start: Dayjs;
220
+ end: Dayjs;
221
+ };
222
+ lastWeek: {
223
+ start: Dayjs;
224
+ end: Dayjs;
225
+ };
226
+ thisMonth: {
227
+ start: Dayjs;
228
+ end: Dayjs;
229
+ };
230
+ lastMonth: {
231
+ start: Dayjs;
232
+ end: Dayjs;
233
+ };
234
+ thisYear: {
235
+ start: Dayjs;
236
+ end: Dayjs;
237
+ };
238
+ lastYear: {
239
+ start: Dayjs;
240
+ end: Dayjs;
241
+ };
242
+ };
243
+ isValid: (v: string | number | Date | Dayjs | null | undefined, fmt?: string) => boolean;
244
+ getUnit: (v: string | number | Date | Dayjs | null | undefined, unit: UnitType) => number;
245
+ setUnit: (v: string | number | Date | Dayjs | null | undefined, unit: UnitType, value: number) => Dayjs;
246
+ formats: {
247
+ readonly date: "YYYY-MM-DD";
248
+ readonly time: "HH:mm:ss";
249
+ readonly datetime: "YYYY-MM-DD HH:mm:ss";
250
+ readonly dateTime: "YYYY-MM-DD HH:mm";
251
+ readonly month: "YYYY-MM";
252
+ readonly year: "YYYY";
253
+ readonly timestamp: "X";
254
+ readonly iso: "YYYY-MM-DDTHH:mm:ssZ";
255
+ };
256
+ dayjs: (v?: string | number | Date | Dayjs | null | undefined) => Dayjs;
257
+ toUTC: (v: string | number | Date | Dayjs | null | undefined) => Dayjs;
258
+ fromUTC: (v: string | number | Date | Dayjs | null | undefined) => Dayjs;
259
+ };
260
+ export type { Country, CountrySelectProps } from './components/CountrySelect/index';
261
+ export type { SelectOption, SelectProps } from './components/Select/index';
262
+ export type { InputProps } from './components/Input/index';
263
+ export type { CheckboxOption, CheckboxesProps } from './components/Checkboxes/index';
264
+ export type { AccordionItem, AccordionProps } from './components/Accordion/index';
265
+ export type { ThumbnailContainerProps } from './components/ThumbnailContainer/index';
266
+ export type { SkeletonProps } from './components/Skeleton/index';
267
+ export type { ModalProps } from './components/Modal/index';
268
+ export type { TooltipsProps } from './components/Tooltips/index';
269
+ export type { ScoreProps } from './components/Score/index';
270
+ export type { RadioOption, RadioProps } from './components/Radio/index';
271
+ export type { DateTimePickerProps } from './components/DateTimePicker/index';
272
+ export type { RegionCascaderProps } from './components/RegionCascader/index';
273
+ export type { QrcodeProps } from './components/Qrcode/index';
274
+ export type { SegmentedOption, SegmentedProps } from './components/Segmented/index';
275
+ export type { FormProps, FormRule, FormRules } from './components/Form/index';
276
+ export type { FormItemProps } from './components/FormItem/index';
277
+ export type { ColorProps } from './components/Color/index';
278
+ export type { BadgeProps } from './types/badge';
279
+ export type { ChatMessage, ChatProps } from './components/Chat/index';
280
+ export type { ImageProps } from './components/Image/index';
281
+ export type { GridProps } from './components/Grid/index';
282
+ export type { DateTimeOptions, DateRange, CalendarDate } from './composables/DateTime';
283
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AACA,OAAO,oBAAoB,CAAA;AAG3B,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,+BAA+B,CAAA;AAClE,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,6BAA6B,CAAA;AAC9D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,sCAAsC,CAAA;AAChF,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,+BAA+B,CAAA;AAClE,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,8BAA8B,CAAA;AAChE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,mCAAmC,CAAA;AAC1E,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,kCAAkC,CAAA;AACxE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,2CAA2C,CAAA;AAC1F,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,iCAAiC,CAAA;AACtE,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,8BAA8B,CAAA;AAChE,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,iCAAiC,CAAA;AACtE,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,+BAA+B,CAAA;AAClE,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,8BAA8B,CAAA;AAChE,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,8BAA8B,CAAA;AAChE,OAAO,EAAE,OAA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