@varlet/ui 3.0.7 → 3.1.0-alpha.1709537939980
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 +79 -0
- package/es/action-sheet/ActionItemSfc.css +0 -0
- package/es/action-sheet/ActionSheet.mjs +29 -56
- package/es/action-sheet/actionSheet.css +1 -1
- package/es/action-sheet/props.mjs +3 -1
- package/es/action-sheet/style/index.mjs +1 -0
- package/es/button/Button.mjs +6 -6
- package/es/checkbox/Checkbox.mjs +83 -50
- package/es/checkbox/checkbox.css +1 -1
- package/es/context/stack.mjs +46 -0
- package/es/dialog/Dialog.mjs +12 -2
- package/es/dialog/props.mjs +4 -1
- package/es/field-decorator/FieldDecorator.mjs +10 -7
- package/es/field-decorator/props.mjs +1 -1
- package/es/hover-overlay/HoverOverlay.mjs +4 -2
- package/es/image-preview/ImagePreview.mjs +12 -16
- package/es/image-preview/props.mjs +4 -1
- package/es/index.bundle.mjs +1 -1
- package/es/index.mjs +1 -1
- package/es/input/Input.mjs +8 -8
- package/es/link/Link.mjs +10 -4
- package/es/link/link.css +1 -1
- package/es/menu/menu.css +1 -1
- package/es/menu/props.mjs +6 -1
- package/es/menu/usePopover.mjs +12 -2
- package/es/menu-option/MenuOption.mjs +72 -43
- package/es/menu-option/menuOption.css +1 -1
- package/es/menu-select/MenuSelect.mjs +28 -3
- package/es/option/Option.mjs +77 -48
- package/es/option/option.css +1 -1
- package/es/overlay/Overlay.mjs +19 -2
- package/es/overlay/props.mjs +7 -1
- package/es/paper/paper.css +1 -1
- package/es/picker/Picker.mjs +2 -0
- package/es/picker/props.mjs +4 -1
- package/es/popup/Popup.mjs +18 -2
- package/es/popup/props.mjs +7 -1
- package/es/radio/Radio.mjs +84 -42
- package/es/radio/radio.css +1 -1
- package/es/radio-group/RadioGroup.mjs +43 -1
- package/es/select/Select.mjs +279 -213
- package/es/select/select.css +1 -1
- package/es/style.css +1 -1
- package/es/switch/Switch.mjs +82 -52
- package/es/switch/switch.css +1 -1
- package/es/tab/tab.css +1 -1
- package/es/themes/dark/link.mjs +2 -1
- package/es/themes/dark/paper.mjs +2 -1
- package/es/themes/dark/tab.mjs +3 -1
- package/es/themes/md3-dark/link.mjs +2 -1
- package/es/themes/md3-dark/paper.mjs +2 -1
- package/es/themes/md3-dark/tab.mjs +3 -1
- package/es/themes/md3-light/link.mjs +2 -1
- package/es/themes/md3-light/paper.mjs +2 -1
- package/es/themes/md3-light/tab.mjs +3 -1
- package/es/tooltip/props.mjs +6 -1
- package/es/uploader/Uploader.mjs +70 -44
- package/es/uploader/uploader.css +1 -1
- package/es/utils/elements.mjs +32 -0
- package/es/varlet.esm.js +8014 -7704
- package/highlight/web-types.en-US.json +15 -2
- package/lib/style.css +1 -1
- package/lib/varlet.cjs.js +1753 -1224
- package/package.json +7 -7
- package/types/actionSheet.d.ts +4 -0
- package/types/input.d.ts +5 -1
- package/types/select.d.ts +6 -1
- package/types/styleVars.d.ts +100 -92
- package/umd/varlet.js +6 -6
- package/highlight/web-types.zh-CN.json +0 -8045
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@varlet/ui",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.1.0-alpha.1709537939980",
|
|
4
4
|
"description": "A material like components library",
|
|
5
5
|
"main": "lib/varlet.cjs.js",
|
|
6
6
|
"module": "es/index.mjs",
|
|
@@ -48,9 +48,9 @@
|
|
|
48
48
|
"@popperjs/core": "^2.11.6",
|
|
49
49
|
"dayjs": "^1.10.4",
|
|
50
50
|
"decimal.js": "^10.2.1",
|
|
51
|
-
"@varlet/
|
|
52
|
-
"@varlet/use": "3.0.
|
|
53
|
-
"@varlet/
|
|
51
|
+
"@varlet/shared": "3.1.0-alpha.1709537939980",
|
|
52
|
+
"@varlet/use": "3.1.0-alpha.1709537939980",
|
|
53
|
+
"@varlet/icons": "3.1.0-alpha.1709537939980"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@vue/runtime-core": "3.4.15",
|
|
@@ -66,9 +66,9 @@
|
|
|
66
66
|
"typescript": "^5.1.5",
|
|
67
67
|
"vue": "3.4.15",
|
|
68
68
|
"vue-router": "4.2.0",
|
|
69
|
-
"@varlet/
|
|
70
|
-
"@varlet/
|
|
71
|
-
"@varlet/
|
|
69
|
+
"@varlet/touch-emulator": "3.1.0-alpha.1709537939980",
|
|
70
|
+
"@varlet/ui": "3.1.0-alpha.1709537939980",
|
|
71
|
+
"@varlet/cli": "3.1.0-alpha.1709537939980"
|
|
72
72
|
},
|
|
73
73
|
"scripts": {
|
|
74
74
|
"dev": "varlet-cli dev",
|
package/types/actionSheet.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export interface ActionSheetProps extends BasicAttributes {
|
|
|
13
13
|
lockScroll?: boolean
|
|
14
14
|
closeOnClickAction?: boolean
|
|
15
15
|
closeOnClickOverlay?: boolean
|
|
16
|
+
closeOnKeyEscape?: boolean
|
|
16
17
|
safeArea?: boolean
|
|
17
18
|
teleport?: TeleportProps['to'] | false
|
|
18
19
|
onOpen?: ListenerProp<() => void>
|
|
@@ -21,6 +22,7 @@ export interface ActionSheetProps extends BasicAttributes {
|
|
|
21
22
|
onClosed?: ListenerProp<() => void>
|
|
22
23
|
onSelect?: ListenerProp<(action: ActionItem) => void>
|
|
23
24
|
onClickOverlay?: ListenerProp<() => void>
|
|
25
|
+
onKeyEscape?: ListenerProp<() => void>
|
|
24
26
|
'onUpdate:show'?: ListenerProp<(show: boolean) => void>
|
|
25
27
|
}
|
|
26
28
|
|
|
@@ -43,12 +45,14 @@ export interface ActionSheetOptions {
|
|
|
43
45
|
lockScroll?: boolean
|
|
44
46
|
closeOnClickAction?: boolean
|
|
45
47
|
closeOnClickOverlay?: boolean
|
|
48
|
+
closeOnKeyEscape?: boolean
|
|
46
49
|
safeArea?: boolean
|
|
47
50
|
onOpen?: () => void
|
|
48
51
|
onOpened?: () => void
|
|
49
52
|
onClose?: () => void
|
|
50
53
|
onClosed?: () => void
|
|
51
54
|
onClickOverlay?: () => void
|
|
55
|
+
onKeyEscape?: () => void
|
|
52
56
|
onSelect?: (action: ActionItem) => void
|
|
53
57
|
}
|
|
54
58
|
|
package/types/input.d.ts
CHANGED
|
@@ -39,6 +39,10 @@ export interface InputProps extends BasicAttributes {
|
|
|
39
39
|
'onUpdate:modelValue'?: ListenerProp<(value: string) => void>
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
+
export interface InputClearIconData {
|
|
43
|
+
clear: (e: Event) => void
|
|
44
|
+
}
|
|
45
|
+
|
|
42
46
|
export class Input extends VarComponent {
|
|
43
47
|
static setPropsDefaults: SetPropsDefaults<InputProps>
|
|
44
48
|
|
|
@@ -47,7 +51,7 @@ export class Input extends VarComponent {
|
|
|
47
51
|
$slots: {
|
|
48
52
|
'prepend-icon'(): VNode[]
|
|
49
53
|
'append-icon'(): VNode[]
|
|
50
|
-
'clear-icon'(): VNode[]
|
|
54
|
+
'clear-icon'(data: InputClearIconData): VNode[]
|
|
51
55
|
'extra-message'(): VNode[]
|
|
52
56
|
}
|
|
53
57
|
|
package/types/select.d.ts
CHANGED
|
@@ -40,6 +40,11 @@ export interface SelectProps extends BasicAttributes {
|
|
|
40
40
|
|
|
41
41
|
export interface SelectArrowIconData {
|
|
42
42
|
focus: boolean
|
|
43
|
+
menuOpen: boolean
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface SelectClearIconData {
|
|
47
|
+
clear: (e: Event) => void
|
|
43
48
|
}
|
|
44
49
|
|
|
45
50
|
export class Select extends VarComponent {
|
|
@@ -50,7 +55,7 @@ export class Select extends VarComponent {
|
|
|
50
55
|
$slots: {
|
|
51
56
|
'selected'(): VNode[]
|
|
52
57
|
'prepend-icon'(): VNode[]
|
|
53
|
-
'clear-icon'(): VNode[]
|
|
58
|
+
'clear-icon'(data: SelectClearIconData): VNode[]
|
|
54
59
|
'append-icon'(): VNode[]
|
|
55
60
|
'arrow-icon'(data: SelectArrowIconData): VNode[]
|
|
56
61
|
}
|
package/types/styleVars.d.ts
CHANGED
|
@@ -753,6 +753,8 @@ export interface StyleVars {
|
|
|
753
753
|
linkDisabledColor?: string
|
|
754
754
|
'--link-font-size'?: string
|
|
755
755
|
linkFontSize?: string
|
|
756
|
+
'--link-focus-opacity'?: string
|
|
757
|
+
linkFocusOpacity?: string
|
|
756
758
|
'--list-loading-height'?: string
|
|
757
759
|
listLoadingHeight?: string
|
|
758
760
|
'--list-finished-height'?: string
|
|
@@ -857,6 +859,8 @@ export interface StyleVars {
|
|
|
857
859
|
paginationSizePadding?: string
|
|
858
860
|
'--paper-background'?: string
|
|
859
861
|
paperBackground?: string
|
|
862
|
+
'--paper-border-radius'?: string
|
|
863
|
+
paperBorderRadius?: string
|
|
860
864
|
'--picker-background'?: string
|
|
861
865
|
pickerBackground?: string
|
|
862
866
|
'--picker-toolbar-height'?: string
|
|
@@ -1151,98 +1155,6 @@ export interface StyleVars {
|
|
|
1151
1155
|
stepVerticalTagMargin?: string
|
|
1152
1156
|
'--step-vertical-min-height'?: string
|
|
1153
1157
|
stepVerticalMinHeight?: string
|
|
1154
|
-
'--font-size-xs'?: string
|
|
1155
|
-
fontSizeXs?: string
|
|
1156
|
-
'--font-size-sm'?: string
|
|
1157
|
-
fontSizeSm?: string
|
|
1158
|
-
'--font-size-md'?: string
|
|
1159
|
-
fontSizeMd?: string
|
|
1160
|
-
'--font-size-lg'?: string
|
|
1161
|
-
fontSizeLg?: string
|
|
1162
|
-
'--icon-size-xs'?: string
|
|
1163
|
-
iconSizeXs?: string
|
|
1164
|
-
'--icon-size-sm'?: string
|
|
1165
|
-
iconSizeSm?: string
|
|
1166
|
-
'--icon-size-md'?: string
|
|
1167
|
-
iconSizeMd?: string
|
|
1168
|
-
'--icon-size-lg'?: string
|
|
1169
|
-
iconSizeLg?: string
|
|
1170
|
-
'--color-body'?: string
|
|
1171
|
-
colorBody?: string
|
|
1172
|
-
'--color-text'?: string
|
|
1173
|
-
colorText?: string
|
|
1174
|
-
'--color-primary'?: string
|
|
1175
|
-
colorPrimary?: string
|
|
1176
|
-
'--color-info'?: string
|
|
1177
|
-
colorInfo?: string
|
|
1178
|
-
'--color-success'?: string
|
|
1179
|
-
colorSuccess?: string
|
|
1180
|
-
'--color-warning'?: string
|
|
1181
|
-
colorWarning?: string
|
|
1182
|
-
'--color-danger'?: string
|
|
1183
|
-
colorDanger?: string
|
|
1184
|
-
'--color-disabled'?: string
|
|
1185
|
-
colorDisabled?: string
|
|
1186
|
-
'--color-text-disabled'?: string
|
|
1187
|
-
colorTextDisabled?: string
|
|
1188
|
-
'--color-on-primary'?: string
|
|
1189
|
-
colorOnPrimary?: string
|
|
1190
|
-
'--color-on-info'?: string
|
|
1191
|
-
colorOnInfo?: string
|
|
1192
|
-
'--color-on-success'?: string
|
|
1193
|
-
colorOnSuccess?: string
|
|
1194
|
-
'--color-on-warning'?: string
|
|
1195
|
-
colorOnWarning?: string
|
|
1196
|
-
'--color-on-danger'?: string
|
|
1197
|
-
colorOnDanger?: string
|
|
1198
|
-
'--color-primary-container'?: string
|
|
1199
|
-
colorPrimaryContainer?: string
|
|
1200
|
-
'--color-info-container'?: string
|
|
1201
|
-
colorInfoContainer?: string
|
|
1202
|
-
'--color-success-container'?: string
|
|
1203
|
-
colorSuccessContainer?: string
|
|
1204
|
-
'--color-warning-container'?: string
|
|
1205
|
-
colorWarningContainer?: string
|
|
1206
|
-
'--color-danger-container'?: string
|
|
1207
|
-
colorDangerContainer?: string
|
|
1208
|
-
'--color-on-primary-container'?: string
|
|
1209
|
-
colorOnPrimaryContainer?: string
|
|
1210
|
-
'--color-on-info-container'?: string
|
|
1211
|
-
colorOnInfoContainer?: string
|
|
1212
|
-
'--color-on-success-container'?: string
|
|
1213
|
-
colorOnSuccessContainer?: string
|
|
1214
|
-
'--color-on-warning-container'?: string
|
|
1215
|
-
colorOnWarningContainer?: string
|
|
1216
|
-
'--color-on-danger-container'?: string
|
|
1217
|
-
colorOnDangerContainer?: string
|
|
1218
|
-
'--color-surface-container'?: string
|
|
1219
|
-
colorSurfaceContainer?: string
|
|
1220
|
-
'--color-surface-container-low'?: string
|
|
1221
|
-
colorSurfaceContainerLow?: string
|
|
1222
|
-
'--color-surface-container-high'?: string
|
|
1223
|
-
colorSurfaceContainerHigh?: string
|
|
1224
|
-
'--color-surface-container-highest'?: string
|
|
1225
|
-
colorSurfaceContainerHighest?: string
|
|
1226
|
-
'--color-inverse-surface'?: string
|
|
1227
|
-
colorInverseSurface?: string
|
|
1228
|
-
'--color-outline'?: string
|
|
1229
|
-
colorOutline?: string
|
|
1230
|
-
'--color-on-surface-variant'?: string
|
|
1231
|
-
colorOnSurfaceVariant?: string
|
|
1232
|
-
'--opacity-disabled'?: string
|
|
1233
|
-
opacityDisabled?: string
|
|
1234
|
-
'--opacity-hover'?: string
|
|
1235
|
-
opacityHover?: string
|
|
1236
|
-
'--opacity-focus'?: string
|
|
1237
|
-
opacityFocus?: string
|
|
1238
|
-
'--cubic-bezier'?: string
|
|
1239
|
-
cubicBezier?: string
|
|
1240
|
-
'--shadow-key-umbra-opacity'?: string
|
|
1241
|
-
shadowKeyUmbraOpacity?: string
|
|
1242
|
-
'--shadow-key-penumbra-opacity'?: string
|
|
1243
|
-
shadowKeyPenumbraOpacity?: string
|
|
1244
|
-
'--shadow-key-ambient-opacity'?: string
|
|
1245
|
-
shadowKeyAmbientOpacity?: string
|
|
1246
1158
|
'--swipe-indicator-color'?: string
|
|
1247
1159
|
swipeIndicatorColor?: string
|
|
1248
1160
|
'--swipe-indicators-offset'?: string
|
|
@@ -1341,6 +1253,102 @@ export interface StyleVars {
|
|
|
1341
1253
|
tabFontSize?: string
|
|
1342
1254
|
'--tab-font-weight'?: string
|
|
1343
1255
|
tabFontWeight?: string
|
|
1256
|
+
'--tab-active-font-size'?: string
|
|
1257
|
+
tabActiveFontSize?: string
|
|
1258
|
+
'--tab-active-font-weight'?: string
|
|
1259
|
+
tabActiveFontWeight?: string
|
|
1260
|
+
'--font-size-xs'?: string
|
|
1261
|
+
fontSizeXs?: string
|
|
1262
|
+
'--font-size-sm'?: string
|
|
1263
|
+
fontSizeSm?: string
|
|
1264
|
+
'--font-size-md'?: string
|
|
1265
|
+
fontSizeMd?: string
|
|
1266
|
+
'--font-size-lg'?: string
|
|
1267
|
+
fontSizeLg?: string
|
|
1268
|
+
'--icon-size-xs'?: string
|
|
1269
|
+
iconSizeXs?: string
|
|
1270
|
+
'--icon-size-sm'?: string
|
|
1271
|
+
iconSizeSm?: string
|
|
1272
|
+
'--icon-size-md'?: string
|
|
1273
|
+
iconSizeMd?: string
|
|
1274
|
+
'--icon-size-lg'?: string
|
|
1275
|
+
iconSizeLg?: string
|
|
1276
|
+
'--color-body'?: string
|
|
1277
|
+
colorBody?: string
|
|
1278
|
+
'--color-text'?: string
|
|
1279
|
+
colorText?: string
|
|
1280
|
+
'--color-primary'?: string
|
|
1281
|
+
colorPrimary?: string
|
|
1282
|
+
'--color-info'?: string
|
|
1283
|
+
colorInfo?: string
|
|
1284
|
+
'--color-success'?: string
|
|
1285
|
+
colorSuccess?: string
|
|
1286
|
+
'--color-warning'?: string
|
|
1287
|
+
colorWarning?: string
|
|
1288
|
+
'--color-danger'?: string
|
|
1289
|
+
colorDanger?: string
|
|
1290
|
+
'--color-disabled'?: string
|
|
1291
|
+
colorDisabled?: string
|
|
1292
|
+
'--color-text-disabled'?: string
|
|
1293
|
+
colorTextDisabled?: string
|
|
1294
|
+
'--color-on-primary'?: string
|
|
1295
|
+
colorOnPrimary?: string
|
|
1296
|
+
'--color-on-info'?: string
|
|
1297
|
+
colorOnInfo?: string
|
|
1298
|
+
'--color-on-success'?: string
|
|
1299
|
+
colorOnSuccess?: string
|
|
1300
|
+
'--color-on-warning'?: string
|
|
1301
|
+
colorOnWarning?: string
|
|
1302
|
+
'--color-on-danger'?: string
|
|
1303
|
+
colorOnDanger?: string
|
|
1304
|
+
'--color-primary-container'?: string
|
|
1305
|
+
colorPrimaryContainer?: string
|
|
1306
|
+
'--color-info-container'?: string
|
|
1307
|
+
colorInfoContainer?: string
|
|
1308
|
+
'--color-success-container'?: string
|
|
1309
|
+
colorSuccessContainer?: string
|
|
1310
|
+
'--color-warning-container'?: string
|
|
1311
|
+
colorWarningContainer?: string
|
|
1312
|
+
'--color-danger-container'?: string
|
|
1313
|
+
colorDangerContainer?: string
|
|
1314
|
+
'--color-on-primary-container'?: string
|
|
1315
|
+
colorOnPrimaryContainer?: string
|
|
1316
|
+
'--color-on-info-container'?: string
|
|
1317
|
+
colorOnInfoContainer?: string
|
|
1318
|
+
'--color-on-success-container'?: string
|
|
1319
|
+
colorOnSuccessContainer?: string
|
|
1320
|
+
'--color-on-warning-container'?: string
|
|
1321
|
+
colorOnWarningContainer?: string
|
|
1322
|
+
'--color-on-danger-container'?: string
|
|
1323
|
+
colorOnDangerContainer?: string
|
|
1324
|
+
'--color-surface-container'?: string
|
|
1325
|
+
colorSurfaceContainer?: string
|
|
1326
|
+
'--color-surface-container-low'?: string
|
|
1327
|
+
colorSurfaceContainerLow?: string
|
|
1328
|
+
'--color-surface-container-high'?: string
|
|
1329
|
+
colorSurfaceContainerHigh?: string
|
|
1330
|
+
'--color-surface-container-highest'?: string
|
|
1331
|
+
colorSurfaceContainerHighest?: string
|
|
1332
|
+
'--color-inverse-surface'?: string
|
|
1333
|
+
colorInverseSurface?: string
|
|
1334
|
+
'--color-outline'?: string
|
|
1335
|
+
colorOutline?: string
|
|
1336
|
+
'--color-on-surface-variant'?: string
|
|
1337
|
+
colorOnSurfaceVariant?: string
|
|
1338
|
+
'--opacity-disabled'?: string
|
|
1339
|
+
opacityDisabled?: string
|
|
1340
|
+
'--opacity-hover'?: string
|
|
1341
|
+
opacityHover?: string
|
|
1342
|
+
'--opacity-focus'?: string
|
|
1343
|
+
opacityFocus?: string
|
|
1344
|
+
'--cubic-bezier'?: string
|
|
1345
|
+
cubicBezier?: string
|
|
1346
|
+
'--shadow-key-umbra-opacity'?: string
|
|
1347
|
+
shadowKeyUmbraOpacity?: string
|
|
1348
|
+
'--shadow-key-penumbra-opacity'?: string
|
|
1349
|
+
shadowKeyPenumbraOpacity?: string
|
|
1350
|
+
'--shadow-key-ambient-opacity'?: string
|
|
1351
|
+
shadowKeyAmbientOpacity?: string
|
|
1344
1352
|
'--time-picker-border-radius'?: string
|
|
1345
1353
|
timePickerBorderRadius?: string
|
|
1346
1354
|
'--time-picker-font-size'?: string
|