@varlet/ui 3.0.3 → 3.0.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.
- package/README.md +1 -0
- package/README.zh-CN.md +1 -0
- package/es/app-bar/AppBar.mjs +6 -3
- package/es/app-bar/appBar.css +1 -1
- package/es/app-bar/props.mjs +6 -1
- package/es/button/Button.mjs +10 -5
- package/es/hover/index.mjs +3 -4
- package/es/hover-overlay/HoverOverlay.mjs +1 -1
- package/es/hover-overlay/hoverOverlay.css +1 -1
- package/es/hover-overlay/props.mjs +2 -4
- package/es/hover-overlay/style/index.mjs +1 -0
- package/es/image/Image.mjs +4 -2
- package/es/image/props.mjs +1 -0
- package/es/index.bundle.mjs +1 -1
- package/es/index.mjs +1 -1
- package/es/menu/usePopover.mjs +2 -1
- package/es/ripple/index.mjs +24 -3
- package/es/snackbar/style/index.mjs +1 -1
- package/es/style.css +1 -1
- package/es/styles/common.css +1 -1
- package/es/themes/dark/hoverOverlay.mjs +2 -1
- package/es/themes/dark/index.mjs +2 -0
- package/es/themes/md3-dark/hoverOverlay.mjs +2 -1
- package/es/themes/md3-dark/index.mjs +2 -0
- package/es/themes/md3-light/hoverOverlay.mjs +2 -1
- package/es/themes/md3-light/index.mjs +2 -0
- package/es/utils/test.mjs +10 -3
- package/es/varlet.esm.js +3647 -3618
- package/highlight/web-types.en-US.json +38 -2
- package/highlight/web-types.zh-CN.json +28 -1
- package/lib/style.css +1 -1
- package/lib/varlet.cjs.js +69 -24
- package/package.json +7 -7
- package/types/appBar.d.ts +2 -0
- package/types/image.d.ts +2 -1
- package/types/input.d.ts +2 -2
- package/types/styleVars.d.ts +4 -0
- package/types/uploader.d.ts +2 -2
- package/umd/varlet.js +6 -6
package/es/styles/common.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.var--box { box-sizing: border-box;}.var--box * { box-sizing: border-box;}.var--relative { position: relative;}.var--absolute { position: absolute;}.var--hidden { overflow: hidden;}.var--lock { overflow: hidden !important;}.var--block { display: block;}.var--ellipsis { overflow-x: hidden; text-overflow: ellipsis; white-space: nowrap;}.var--inline-block { display: inline-block;}.var--flex { display: flex;}.var--inline-flex { display: inline-flex;}:root { --font-size-xs: 10px; --font-size-sm: 12px; --font-size-md: 14px; --font-size-lg: 16px; --icon-size-xs: 16px; --icon-size-sm: 18px; --icon-size-md: 20px; --icon-size-lg: 22px; --color-body: #fff; --color-text: #333; --color-primary: #3a7afe; --color-info: #00afef; --color-success: #00c48f; --color-warning: #ff9f00; --color-danger: #f44336; --color-disabled: #e0e0e0; --color-text-disabled: #aaa; --color-on-primary: #fff; --color-on-info: #fff; --color-on-success: #fff; --color-on-warning: #fff; --color-on-danger: #fff; --color-primary-container: #3a7afe; --color-info-container: #00afef; --color-success-container: #00c48f; --color-warning-container: #ff9f00; --color-danger-container: #f44336; --color-on-primary-container: #fff; --color-on-info-container: #fff; --color-on-success-container: #fff; --color-on-warning-container: #fff; --color-on-danger-container: #fff; --color-surface-container: #fff; --color-surface-container-low: #fff; --color-surface-container-high: #fff; --color-surface-container-highest: #fff; --color-inverse-surface: #333; --color-outline: rgba(0, 0, 0, 0.12); --color-on-surface-variant: #888; --opacity-disabled: 0.6; --cubic-bezier: cubic-bezier(0.25, 0.8, 0.5, 1); --shadow-key-umbra-opacity: rgba(0, 0, 0, 0.2); --shadow-key-penumbra-opacity: rgba(0, 0, 0, 0.14); --shadow-key-ambient-opacity: rgba(0, 0, 0, 0.12);}
|
|
1
|
+
.var--box { box-sizing: border-box;}.var--box * { box-sizing: border-box;}.var--relative { position: relative;}.var--absolute { position: absolute;}.var--hidden { overflow: hidden;}.var--lock { overflow: hidden !important;}.var--block { display: block;}.var--ellipsis { overflow-x: hidden; text-overflow: ellipsis; white-space: nowrap;}.var--inline-block { display: inline-block;}.var--flex { display: flex;}.var--inline-flex { display: inline-flex;}:root { --font-size-xs: 10px; --font-size-sm: 12px; --font-size-md: 14px; --font-size-lg: 16px; --icon-size-xs: 16px; --icon-size-sm: 18px; --icon-size-md: 20px; --icon-size-lg: 22px; --color-body: #fff; --color-text: #333; --color-primary: #3a7afe; --color-info: #00afef; --color-success: #00c48f; --color-warning: #ff9f00; --color-danger: #f44336; --color-disabled: #e0e0e0; --color-text-disabled: #aaa; --color-on-primary: #fff; --color-on-info: #fff; --color-on-success: #fff; --color-on-warning: #fff; --color-on-danger: #fff; --color-primary-container: #3a7afe; --color-info-container: #00afef; --color-success-container: #00c48f; --color-warning-container: #ff9f00; --color-danger-container: #f44336; --color-on-primary-container: #fff; --color-on-info-container: #fff; --color-on-success-container: #fff; --color-on-warning-container: #fff; --color-on-danger-container: #fff; --color-surface-container: #fff; --color-surface-container-low: #fff; --color-surface-container-high: #fff; --color-surface-container-highest: #fff; --color-inverse-surface: #333; --color-outline: rgba(0, 0, 0, 0.12); --color-on-surface-variant: #888; --opacity-disabled: 0.6; --opacity-hover: 0.15; --opacity-focus: 0.2; --cubic-bezier: cubic-bezier(0.25, 0.8, 0.5, 1); --shadow-key-umbra-opacity: rgba(0, 0, 0, 0.2); --shadow-key-penumbra-opacity: rgba(0, 0, 0, 0.14); --shadow-key-ambient-opacity: rgba(0, 0, 0, 0.12);}
|
package/es/themes/dark/index.mjs
CHANGED
|
@@ -118,6 +118,8 @@ var stdin_default = __spreadValues(__spreadValues(__spreadValues(__spreadValues(
|
|
|
118
118
|
"--color-outline": "rgba(255, 255, 255, 0.2)",
|
|
119
119
|
"--color-on-surface-variant": "#fff",
|
|
120
120
|
"--opacity-disabled": "0.6",
|
|
121
|
+
"--opacity-hover": "0.15",
|
|
122
|
+
"--opacity-focus": "0.2",
|
|
121
123
|
"--cubic-bezier": "cubic-bezier(0.25, 0.8, 0.5, 1)",
|
|
122
124
|
"--shadow-key-umbra-opacity": "rgba(0, 0, 0, 0.2)",
|
|
123
125
|
"--shadow-key-penumbra-opacity": "rgba(0, 0, 0, 0.14)",
|
|
@@ -118,6 +118,8 @@ var stdin_default = __spreadValues(__spreadValues(__spreadValues(__spreadValues(
|
|
|
118
118
|
"--color-outline": "#49454F",
|
|
119
119
|
"--color-on-surface-variant": "#CAC4D0",
|
|
120
120
|
"--opacity-disabled": "0.6",
|
|
121
|
+
"--opacity-hover": "0.12",
|
|
122
|
+
"--opacity-focus": "0.2",
|
|
121
123
|
"--cubic-bezier": "cubic-bezier(0.25, 0.8, 0.5, 1)",
|
|
122
124
|
"--shadow-key-umbra-opacity": "rgba(0, 0, 0, 0.2)",
|
|
123
125
|
"--shadow-key-penumbra-opacity": "rgba(0, 0, 0, 0.14)",
|
|
@@ -118,6 +118,8 @@ var stdin_default = __spreadValues(__spreadValues(__spreadValues(__spreadValues(
|
|
|
118
118
|
"--color-outline": "#CAC4D0",
|
|
119
119
|
"--color-on-surface-variant": "#49454F",
|
|
120
120
|
"--opacity-disabled": "0.6",
|
|
121
|
+
"--opacity-hover": "0.12",
|
|
122
|
+
"--opacity-focus": "0.2",
|
|
121
123
|
"--cubic-bezier": "cubic-bezier(0.25, 0.8, 0.5, 1)",
|
|
122
124
|
"--shadow-key-umbra-opacity": "rgba(0, 0, 0, 0.2)",
|
|
123
125
|
"--shadow-key-penumbra-opacity": "rgba(0, 0, 0, 0.14)",
|
package/es/utils/test.mjs
CHANGED
|
@@ -67,12 +67,18 @@ function trigger(wrapper, eventName, x = 0, y = 0, offsetX = 0, offsetY = 0) {
|
|
|
67
67
|
offsetX,
|
|
68
68
|
offsetY,
|
|
69
69
|
touches: touchList,
|
|
70
|
-
targetTouches: touchList,
|
|
71
|
-
changedTouches: touchList
|
|
70
|
+
targetTouches: eventName.startsWith("touch") ? touchList : void 0,
|
|
71
|
+
changedTouches: eventName.startsWith("touch") ? touchList : void 0
|
|
72
72
|
});
|
|
73
73
|
el.dispatchEvent(event);
|
|
74
74
|
return nextTick();
|
|
75
75
|
}
|
|
76
|
+
function triggerKeyboard(wrapper, eventName, eventInitDict = {}) {
|
|
77
|
+
const el = "element" in wrapper ? wrapper.element : wrapper;
|
|
78
|
+
const event = new KeyboardEvent(eventName, eventInitDict);
|
|
79
|
+
el.dispatchEvent(event);
|
|
80
|
+
return nextTick();
|
|
81
|
+
}
|
|
76
82
|
function mockOffset({
|
|
77
83
|
offsetWidth,
|
|
78
84
|
offsetHeight,
|
|
@@ -277,5 +283,6 @@ export {
|
|
|
277
283
|
mockTranslate,
|
|
278
284
|
mockUserAgent,
|
|
279
285
|
trigger,
|
|
280
|
-
triggerDrag
|
|
286
|
+
triggerDrag,
|
|
287
|
+
triggerKeyboard
|
|
281
288
|
};
|