@varlet/ui 3.18.2 → 3.19.1
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/es/action-sheet/ActionItem.mjs +28 -8
- package/es/action-sheet/actionSheet.css +1 -1
- package/es/action-sheet/index.mjs +4 -2
- package/es/alert/alert.css +1 -1
- package/es/back-top/BackTop.mjs +2 -1
- package/es/back-top/props.mjs +1 -0
- package/es/badge/Badge.mjs +20 -10
- package/es/badge/badge.css +1 -1
- package/es/bottom-navigation-item/BottomNavigationItem.mjs +34 -20
- package/es/bottom-navigation-item/bottomNavigationItem.css +1 -1
- package/es/checkbox/Checkbox.mjs +45 -22
- package/es/checkbox/checkbox.css +1 -1
- package/es/chip/Chip.mjs +11 -4
- package/es/chip/chip.css +1 -1
- package/es/chip/props.mjs +4 -0
- package/es/date-input/DateInput.mjs +865 -0
- package/es/date-input/DateInputSfc.css +0 -0
- package/es/date-input/TimeSelect.mjs +201 -0
- package/es/date-input/date-input.css +1 -0
- package/es/date-input/index.mjs +12 -0
- package/es/date-input/props.mjs +77 -0
- package/es/date-input/style/index.mjs +14 -0
- package/es/date-picker/DatePicker.mjs +522 -451
- package/es/date-picker/DayPickerPanel.mjs +318 -0
- package/es/date-picker/MonthPickerPanel.mjs +187 -0
- package/es/date-picker/PanelHeader.mjs +332 -0
- package/es/date-picker/YearPickerPanel.mjs +199 -0
- package/es/date-picker/constants.mjs +31 -0
- package/es/date-picker/date-picker.css +1 -1
- package/es/date-picker/props.mjs +6 -9
- package/es/date-picker/style/index.mjs +0 -1
- package/es/date-picker/types.mjs +0 -0
- package/es/field-decorator/FieldDecorator.mjs +5 -1
- package/es/field-decorator/fieldDecorator.css +1 -1
- package/es/icon/icon.css +1 -1
- package/es/index.bundle.mjs +7 -1
- package/es/index.mjs +6 -1
- package/es/input/props.mjs +1 -1
- package/es/locale/en-US.mjs +2 -0
- package/es/locale/fa-IR.mjs +2 -0
- package/es/locale/ja-JP.mjs +2 -0
- package/es/locale/zh-CN.mjs +2 -0
- package/es/locale/zh-TW.mjs +2 -0
- package/es/menu-select/MenuSelect.mjs +11 -2
- package/es/menu-select/menuSelect.css +1 -1
- package/es/radio/Radio.mjs +30 -14
- package/es/radio/radio.css +1 -1
- package/es/rail-navigation-item/RailNavigationItem.mjs +33 -19
- package/es/rail-navigation-item/railNavigationItem.css +1 -1
- package/es/rate/Rate.mjs +23 -12
- package/es/rate/rate.css +1 -1
- package/es/select/Select.mjs +10 -1
- package/es/select/select.css +1 -1
- package/es/snackbar/style/index.mjs +1 -1
- package/es/step/Step.mjs +50 -20
- package/es/step/step.css +1 -1
- package/es/style.mjs +1 -0
- package/es/themes/dark/alert.mjs +2 -2
- package/es/themes/dark/dateInput.mjs +9 -0
- package/es/themes/dark/datePicker.mjs +23 -19
- package/es/themes/dark/index.mjs +3 -2
- package/es/themes/md3-dark/alert.mjs +2 -2
- package/es/themes/md3-dark/dateInput.mjs +9 -0
- package/es/themes/md3-dark/datePicker.mjs +18 -13
- package/es/themes/md3-dark/index.mjs +3 -2
- package/es/themes/md3-light/alert.mjs +2 -2
- package/es/themes/md3-light/dateInput.mjs +9 -0
- package/es/themes/md3-light/datePicker.mjs +18 -13
- package/es/themes/md3-light/index.mjs +3 -2
- package/es/utils/elements.mjs +7 -0
- package/es/utils/shared.mjs +15 -0
- package/es/varlet.css +1 -1
- package/es/varlet.esm.js +11913 -10674
- package/highlight/web-types.en-US.json +608 -73
- package/highlight/web-types.zh-CN.json +581 -67
- package/lib/varlet.cjs.js +5597 -4212
- package/lib/varlet.css +1 -1
- package/package.json +7 -7
- package/types/actionSheet.d.ts +1 -1
- package/types/badge.d.ts +1 -0
- package/types/chip.d.ts +3 -0
- package/types/dateInput.d.ts +96 -0
- package/types/datePicker.d.ts +4 -2
- package/types/index.d.ts +2 -0
- package/types/locale.d.ts +2 -0
- package/types/rate.d.ts +7 -0
- package/types/step.d.ts +3 -0
- package/types/styleVars.d.ts +14 -4
- package/umd/varlet.js +7 -7
- package/es/date-picker/src/day-picker-panel.mjs +0 -385
- package/es/date-picker/src/month-picker-panel.mjs +0 -300
- package/es/date-picker/src/panel-header.mjs +0 -142
- package/es/date-picker/src/year-picker-panel.mjs +0 -311
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@varlet/ui",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.19.1",
|
|
4
4
|
"description": "A Vue3 component library based on Material Design 2 and 3, supporting mobile and desktop.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Vue3",
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
"@popperjs/core": "^2.11.6",
|
|
45
45
|
"dayjs": "^1.10.4",
|
|
46
46
|
"decimal.js": "^10.2.1",
|
|
47
|
-
"@varlet/
|
|
48
|
-
"@varlet/use": "3.
|
|
49
|
-
"@varlet/
|
|
47
|
+
"@varlet/shared": "3.19.1",
|
|
48
|
+
"@varlet/use": "3.19.1",
|
|
49
|
+
"@varlet/icons": "3.19.1"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@types/node": "^20.19.0",
|
|
@@ -62,9 +62,9 @@
|
|
|
62
62
|
"vue": "3.5.21",
|
|
63
63
|
"vue-router": "4.5.1",
|
|
64
64
|
"zod": "^3.23.8",
|
|
65
|
-
"@varlet/
|
|
66
|
-
"@varlet/cli": "3.
|
|
67
|
-
"@varlet/
|
|
65
|
+
"@varlet/ui": "3.19.1",
|
|
66
|
+
"@varlet/cli": "3.19.1",
|
|
67
|
+
"@varlet/touch-emulator": "3.19.1"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
70
|
"vue": "^3.2.0"
|
package/types/actionSheet.d.ts
CHANGED
package/types/badge.d.ts
CHANGED
package/types/chip.d.ts
CHANGED
|
@@ -17,6 +17,8 @@ export interface ChipProps extends BasicAttributes {
|
|
|
17
17
|
size?: ChipSize
|
|
18
18
|
color?: string
|
|
19
19
|
textColor?: string
|
|
20
|
+
icon?: string
|
|
21
|
+
/** @deprecated Use icon instead. */
|
|
20
22
|
iconName?: string
|
|
21
23
|
namespace?: string
|
|
22
24
|
plain?: boolean
|
|
@@ -36,6 +38,7 @@ export class Chip extends VarComponent {
|
|
|
36
38
|
default(): VNode[]
|
|
37
39
|
left(): VNode[]
|
|
38
40
|
right(): VNode[]
|
|
41
|
+
icon(): VNode[]
|
|
39
42
|
}
|
|
40
43
|
}
|
|
41
44
|
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { InputHTMLAttributes, VNode } from 'vue'
|
|
2
|
+
import {
|
|
3
|
+
BasicAttributes,
|
|
4
|
+
ListenerProp,
|
|
5
|
+
Rules as DateInputRules,
|
|
6
|
+
SetPropsDefaults,
|
|
7
|
+
VarComponent,
|
|
8
|
+
Variant as DateInputVariant,
|
|
9
|
+
} from './varComponent'
|
|
10
|
+
|
|
11
|
+
export declare const dateInputProps: Record<keyof DateInputProps, any>
|
|
12
|
+
|
|
13
|
+
export type DateInputType = 'date' | 'month' | 'year' | 'datetime'
|
|
14
|
+
|
|
15
|
+
export type DateInputValidateTrigger = 'onFocus' | 'onBlur' | 'onChange' | 'onClick' | 'onClear' | 'onInput'
|
|
16
|
+
|
|
17
|
+
export type DateInputValue = string | number | Date
|
|
18
|
+
|
|
19
|
+
export type DateInputValueFormat = 'timestamp' | 'date' | string
|
|
20
|
+
|
|
21
|
+
export type DateInputRangePosition = 'start' | 'end'
|
|
22
|
+
|
|
23
|
+
export interface DateInputAllowedTimeValidators {
|
|
24
|
+
hours?: (hour: number) => boolean
|
|
25
|
+
minutes?: (minute: number, hour: number) => boolean
|
|
26
|
+
seconds?: (second: number, minute: number, hour: number) => boolean
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export type DateInputAllowedTimes = (date: string, position?: DateInputRangePosition) => DateInputAllowedTimeValidators
|
|
30
|
+
|
|
31
|
+
export interface DateInputProps extends BasicAttributes {
|
|
32
|
+
modelValue?: DateInputValue | DateInputValue[]
|
|
33
|
+
type?: DateInputType
|
|
34
|
+
format?: string
|
|
35
|
+
valueFormat?: DateInputValueFormat
|
|
36
|
+
useSeconds?: boolean
|
|
37
|
+
multiple?: boolean
|
|
38
|
+
range?: boolean
|
|
39
|
+
separator?: string
|
|
40
|
+
rangeSeparator?: string
|
|
41
|
+
placeholder?: string
|
|
42
|
+
variant?: DateInputVariant
|
|
43
|
+
size?: 'normal' | 'small'
|
|
44
|
+
line?: boolean
|
|
45
|
+
hint?: boolean
|
|
46
|
+
textColor?: string
|
|
47
|
+
focusColor?: string
|
|
48
|
+
blurColor?: string
|
|
49
|
+
clearable?: boolean
|
|
50
|
+
readonly?: boolean
|
|
51
|
+
disabled?: boolean
|
|
52
|
+
validateTrigger?: DateInputValidateTrigger[]
|
|
53
|
+
rules?: DateInputRules
|
|
54
|
+
allowedDates?: (value: string) => boolean
|
|
55
|
+
allowedTimes?: DateInputAllowedTimes
|
|
56
|
+
min?: string
|
|
57
|
+
max?: string
|
|
58
|
+
firstDayOfWeek?: string | number
|
|
59
|
+
tabindex?: InputHTMLAttributes['tabindex']
|
|
60
|
+
onFocus?: ListenerProp<(e: FocusEvent) => void>
|
|
61
|
+
onBlur?: ListenerProp<(e: FocusEvent) => void>
|
|
62
|
+
onChange?: ListenerProp<(value: DateInputValue | DateInputValue[] | undefined) => void>
|
|
63
|
+
onClear?: ListenerProp<(value: string) => void>
|
|
64
|
+
'onUpdate:modelValue'?: ListenerProp<(value: DateInputValue | DateInputValue[] | undefined) => void>
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export interface DateInputClearIconData {
|
|
68
|
+
clear: (e: Event) => void
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export class DateInput extends VarComponent {
|
|
72
|
+
static setPropsDefaults: SetPropsDefaults<DateInputProps>
|
|
73
|
+
|
|
74
|
+
$props: DateInputProps
|
|
75
|
+
|
|
76
|
+
$slots: {
|
|
77
|
+
'prepend-icon'(): VNode[]
|
|
78
|
+
'append-icon'(): VNode[]
|
|
79
|
+
'clear-icon'(data: DateInputClearIconData): VNode[]
|
|
80
|
+
'extra-message'(): VNode[]
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
focus(): void
|
|
84
|
+
|
|
85
|
+
blur(): void
|
|
86
|
+
|
|
87
|
+
select(): void
|
|
88
|
+
|
|
89
|
+
validate(): Promise<boolean>
|
|
90
|
+
|
|
91
|
+
resetValidation(): void
|
|
92
|
+
|
|
93
|
+
reset(): void
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export class _DateInputComponent extends DateInput {}
|
package/types/datePicker.d.ts
CHANGED
|
@@ -18,12 +18,12 @@ export interface DatePickerProps extends BasicAttributes {
|
|
|
18
18
|
min?: string
|
|
19
19
|
max?: string
|
|
20
20
|
showCurrent?: boolean
|
|
21
|
+
showTitle?: boolean
|
|
21
22
|
readonly?: boolean
|
|
22
23
|
multiple?: boolean
|
|
23
24
|
range?: boolean
|
|
24
|
-
touchable?: boolean
|
|
25
25
|
fallbackViewDate?: string
|
|
26
|
-
onPreview?: ListenerProp<(year: number, month: number,
|
|
26
|
+
onPreview?: ListenerProp<(year: number, month: number, dayOfMonth?: number) => void>
|
|
27
27
|
onChange?: ListenerProp<(value: string | string[]) => void>
|
|
28
28
|
'onUpdate:modelValue'?: ListenerProp<(value: string | string[]) => void>
|
|
29
29
|
}
|
|
@@ -54,6 +54,8 @@ export class DatePicker extends VarComponent {
|
|
|
54
54
|
|
|
55
55
|
$props: DatePickerProps
|
|
56
56
|
|
|
57
|
+
resetPreview(): void
|
|
58
|
+
|
|
57
59
|
$slots: {
|
|
58
60
|
year(data: DatePickerYear): VNode[]
|
|
59
61
|
month(data: DatePickerMonth): VNode[]
|
package/types/index.d.ts
CHANGED
|
@@ -32,6 +32,7 @@ export * from './countTo'
|
|
|
32
32
|
export * from './countdown'
|
|
33
33
|
export * from './counter'
|
|
34
34
|
export * from './dataTable'
|
|
35
|
+
export * from './dateInput'
|
|
35
36
|
export * from './datePicker'
|
|
36
37
|
export * from './dialog'
|
|
37
38
|
export * from './divider'
|
|
@@ -138,6 +139,7 @@ declare module 'vue' {
|
|
|
138
139
|
VarCountdown: typeof import('@varlet/ui')['_CountdownComponent']
|
|
139
140
|
VarCounter: typeof import('@varlet/ui')['_CounterComponent']
|
|
140
141
|
VarDataTable: typeof import('@varlet/ui')['_DataTableComponent']
|
|
142
|
+
VarDateInput: typeof import('@varlet/ui')['_DateInputComponent']
|
|
141
143
|
VarDatePicker: typeof import('@varlet/ui')['_DatePickerComponent']
|
|
142
144
|
VarDialog: typeof import('@varlet/ui')['_DialogComponent']
|
|
143
145
|
VarDivider: typeof import('@varlet/ui')['_DividerComponent']
|
package/types/locale.d.ts
CHANGED
|
@@ -24,6 +24,8 @@ export type Message = {
|
|
|
24
24
|
datePickerWeekDict: Record<Week, { name: string; abbr: string }>
|
|
25
25
|
datePickerSelected: string
|
|
26
26
|
datePickerHint: string
|
|
27
|
+
datePickerYearHint: string
|
|
28
|
+
datePickerMonthHint: string
|
|
27
29
|
// pagination
|
|
28
30
|
paginationItem: string
|
|
29
31
|
paginationPage: string
|
package/types/rate.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { VNode } from 'vue'
|
|
1
2
|
import { BasicAttributes, ListenerProp, Rules as RateRules, SetPropsDefaults, VarComponent } from './varComponent'
|
|
2
3
|
|
|
3
4
|
export declare const rateProps: Record<keyof RateProps, any>
|
|
@@ -30,6 +31,12 @@ export class Rate extends VarComponent {
|
|
|
30
31
|
static setPropsDefaults: SetPropsDefaults<RateProps>
|
|
31
32
|
|
|
32
33
|
$props: RateProps
|
|
34
|
+
|
|
35
|
+
$slots: {
|
|
36
|
+
icon(): VNode[]
|
|
37
|
+
'empty-icon'(): VNode[]
|
|
38
|
+
'half-icon'(): VNode[]
|
|
39
|
+
}
|
|
33
40
|
}
|
|
34
41
|
|
|
35
42
|
export class _RateComponent extends Rate {}
|
package/types/step.d.ts
CHANGED
package/types/styleVars.d.ts
CHANGED
|
@@ -322,6 +322,10 @@ interface BaseStyleVars {
|
|
|
322
322
|
'--data-table-row-large-height'?: string
|
|
323
323
|
'--data-table-footer-padding'?: string
|
|
324
324
|
'--data-table-empty-padding'?: string
|
|
325
|
+
'--date-input-picker-width'?: string
|
|
326
|
+
'--date-input-time-select-separator-color'?: string
|
|
327
|
+
'--date-input-time-select-border-color'?: string
|
|
328
|
+
'--date-input-time-select-active-color'?: string
|
|
325
329
|
'--date-picker-border-radius'?: string
|
|
326
330
|
'--date-picker-font-size'?: string
|
|
327
331
|
'--date-picker-min-width'?: string
|
|
@@ -332,10 +336,6 @@ interface BaseStyleVars {
|
|
|
332
336
|
'--date-picker-title-padding'?: string
|
|
333
337
|
'--date-picker-title-background'?: string
|
|
334
338
|
'--date-picker-title-color'?: string
|
|
335
|
-
'--date-picker-title-year-font-size'?: string
|
|
336
|
-
'--date-picker-title-year-font-weight'?: string
|
|
337
|
-
'--date-picker-title-year-margin-bottom'?: string
|
|
338
|
-
'--date-picker-title-year-min-height'?: string
|
|
339
339
|
'--date-picker-title-date-height'?: string
|
|
340
340
|
'--date-picker-title-date-font-size'?: string
|
|
341
341
|
'--date-picker-title-date-font-weight'?: string
|
|
@@ -344,18 +344,22 @@ interface BaseStyleVars {
|
|
|
344
344
|
'--date-picker-header-arrow-filter'?: string
|
|
345
345
|
'--date-picker-body-background-color'?: string
|
|
346
346
|
'--date-picker-body-height'?: string
|
|
347
|
+
'--date-picker-body-padding-horizontal'?: string
|
|
347
348
|
'--date-picker-body-padding'?: string
|
|
348
349
|
'--date-picker-header-padding'?: string
|
|
350
|
+
'--date-picker-header-padding-top-no-title'?: string
|
|
349
351
|
'--date-picker-actions-padding'?: string
|
|
350
352
|
'--date-picker-header-color'?: string
|
|
351
353
|
'--month-picker-padding'?: string
|
|
352
354
|
'--month-picker-item-width'?: string
|
|
353
355
|
'--month-picker-item-height'?: string
|
|
354
356
|
'--month-picker-item-button-max-width'?: string
|
|
357
|
+
'--month-picker-item-button-font-weight'?: string
|
|
355
358
|
'--year-picker-padding'?: string
|
|
356
359
|
'--year-picker-item-width'?: string
|
|
357
360
|
'--year-picker-item-height'?: string
|
|
358
361
|
'--year-picker-item-button-max-width'?: string
|
|
362
|
+
'--year-picker-item-button-font-weight'?: string
|
|
359
363
|
'--day-picker-content-item-width'?: string
|
|
360
364
|
'--day-picker-content-item-min-height'?: string
|
|
361
365
|
'--day-picker-content-item-font-size'?: string
|
|
@@ -364,8 +368,14 @@ interface BaseStyleVars {
|
|
|
364
368
|
'--day-picker-content-item-button-height'?: string
|
|
365
369
|
'--day-picker-content-item-button-font-size'?: string
|
|
366
370
|
'--day-picker-head-item-color'?: string
|
|
371
|
+
'--day-picker-head-item-font-size'?: string
|
|
367
372
|
'--day-picker-head-item-padding'?: string
|
|
368
373
|
'--day-picker-head-item-font-weight'?: string
|
|
374
|
+
'--day-picker-adjacent-item-color'?: string
|
|
375
|
+
'--date-picker-title-year-font-size'?: string
|
|
376
|
+
'--date-picker-title-year-font-weight'?: string
|
|
377
|
+
'--date-picker-title-year-margin-bottom'?: string
|
|
378
|
+
'--date-picker-title-year-min-height'?: string
|
|
369
379
|
'--dialog-width'?: string
|
|
370
380
|
'--dialog-background'?: string
|
|
371
381
|
'--dialog-border-radius'?: string
|