@varlet/ui 1.23.4-alpha.8 → 1.23.7-alpha.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.
Files changed (62) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/es/action-sheet/index.js +1 -1
  3. package/es/back-top/BackTop.js +2 -2
  4. package/es/date-picker/date-picker.css +1 -1
  5. package/es/date-picker/date-picker.less +7 -3
  6. package/es/date-picker/src/day-picker-panel.js +5 -5
  7. package/es/date-picker/src/month-picker-panel.js +5 -5
  8. package/es/date-picker/src/panel-header.js +4 -11
  9. package/es/dialog/index.js +1 -1
  10. package/es/image-preview/index.js +1 -1
  11. package/es/index.d.ts +1 -0
  12. package/es/input/Input.js +36 -13
  13. package/es/list/List.js +1 -1
  14. package/es/loading/Loading.js +15 -5
  15. package/es/loading/props.js +1 -2
  16. package/es/popup/Popup.js +81 -59
  17. package/es/popup/index.js +1 -1
  18. package/es/popup/style/index.js +0 -1
  19. package/es/popup/style/less.js +0 -1
  20. package/es/pull-refresh/PullRefresh.js +1 -1
  21. package/es/sticky/Sticky.js +1 -1
  22. package/es/themes/dark/index.d.ts +5 -0
  23. package/es/utils/components.js +7 -0
  24. package/es/utils/elements.js +2 -2
  25. package/es/utils/shared.js +1 -1
  26. package/highlight/attributes.json +4 -0
  27. package/highlight/tags.json +2 -1
  28. package/highlight/web-types.json +10 -1
  29. package/lib/action-sheet/index.js +1 -1
  30. package/lib/back-top/BackTop.js +2 -2
  31. package/lib/date-picker/date-picker.css +1 -1
  32. package/lib/date-picker/date-picker.less +7 -3
  33. package/lib/date-picker/src/day-picker-panel.js +5 -5
  34. package/lib/date-picker/src/month-picker-panel.js +5 -5
  35. package/lib/date-picker/src/panel-header.js +3 -10
  36. package/lib/dialog/index.js +1 -1
  37. package/lib/image-preview/index.js +1 -1
  38. package/lib/index.d.ts +1 -0
  39. package/lib/input/Input.js +35 -12
  40. package/lib/list/List.js +1 -1
  41. package/lib/loading/Loading.js +14 -4
  42. package/lib/loading/props.js +1 -2
  43. package/lib/popup/Popup.js +78 -58
  44. package/lib/popup/index.js +1 -1
  45. package/lib/popup/style/index.js +0 -1
  46. package/lib/popup/style/less.js +0 -1
  47. package/lib/pull-refresh/PullRefresh.js +1 -1
  48. package/lib/sticky/Sticky.js +1 -1
  49. package/lib/style.css +1 -1
  50. package/lib/themes/dark/index.d.ts +5 -0
  51. package/lib/utils/components.js +9 -0
  52. package/lib/utils/elements.js +2 -2
  53. package/lib/utils/shared.js +3 -1
  54. package/package.json +3 -3
  55. package/types/global.d.ts +1 -0
  56. package/types/index.d.ts +1 -0
  57. package/types/list.d.ts +21 -0
  58. package/umd/varlet.js +4 -3
  59. package/es/popup/PopupSfc.css +0 -0
  60. package/es/popup/PopupSfc.less +0 -0
  61. package/lib/popup/PopupSfc.css +0 -0
  62. package/lib/popup/PopupSfc.less +0 -0
@@ -0,0 +1,5 @@
1
+ import { StyleVars } from '../../../types'
2
+
3
+ declare const dark: StyleVars
4
+
5
+ export default dark
@@ -13,6 +13,7 @@ exports.keyInProvides = keyInProvides;
13
13
  exports.useValidation = useValidation;
14
14
  exports.addRouteListener = addRouteListener;
15
15
  exports.useTeleport = useTeleport;
16
+ exports.exposeApis = exposeApis;
16
17
 
17
18
  var _vue = require("vue");
18
19
 
@@ -273,4 +274,12 @@ function useTeleport() {
273
274
  return {
274
275
  disabled
275
276
  };
277
+ }
278
+
279
+ function exposeApis(apis) {
280
+ var instance = (0, _vue.getCurrentInstance)();
281
+
282
+ if (instance) {
283
+ Object.assign(instance.proxy, apis);
284
+ }
276
285
  }
@@ -203,11 +203,11 @@ var toSizeUnit = value => {
203
203
  exports.toSizeUnit = toSizeUnit;
204
204
 
205
205
  function requestAnimationFrame(fn) {
206
- return window.requestAnimationFrame ? window.requestAnimationFrame(fn) : window.setTimeout(fn, 16);
206
+ return globalThis.requestAnimationFrame ? globalThis.requestAnimationFrame(fn) : globalThis.setTimeout(fn, 16);
207
207
  }
208
208
 
209
209
  function cancelAnimationFrame(handle) {
210
- window.cancelAnimationFrame ? window.cancelAnimationFrame(handle) : window.clearTimeout(handle);
210
+ globalThis.cancelAnimationFrame ? globalThis.cancelAnimationFrame(handle) : globalThis.clearTimeout(handle);
211
211
  }
212
212
 
213
213
  function nextTickFrame(fn) {
@@ -199,7 +199,9 @@ function parseFormat(format, time) {
199
199
  var dt = (value, defaultText) => value == null ? defaultText : value;
200
200
 
201
201
  exports.dt = dt;
202
- var inBrowser = typeof window !== 'undefined';
202
+
203
+ var inBrowser = () => typeof window !== 'undefined';
204
+
203
205
  exports.inBrowser = inBrowser;
204
206
 
205
207
  var uniq = arr => [...new Set(arr)];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@varlet/ui",
3
- "version": "1.23.4-alpha.8+c5c2b12f",
3
+ "version": "1.23.7-alpha.4+21c1a885",
4
4
  "description": "A material like components library",
5
5
  "module": "es/index.js",
6
6
  "main": "lib/index.js",
@@ -49,9 +49,9 @@
49
49
  "peerDependencies": {
50
50
  "vue": "^3.2.0"
51
51
  },
52
- "gitHead": "c5c2b12f163bed130b3c6c0ee0eb805fe4a015f1",
52
+ "gitHead": "21c1a8859ba686314f1422afdc34e881fbcc92eb",
53
53
  "devDependencies": {
54
- "@varlet/cli": "^1.23.4-alpha.8+c5c2b12f"
54
+ "@varlet/cli": "^1.23.5"
55
55
  },
56
56
  "dependencies": {
57
57
  "dayjs": "^1.10.4",
package/types/global.d.ts CHANGED
@@ -26,6 +26,7 @@ declare module 'vue' {
26
26
  VarIndexBar: typeof import('@varlet/ui')['_IndexBarComponent']
27
27
  VarInput: typeof import('@varlet/ui')['_InputComponent']
28
28
  VarLazy: typeof import('@varlet/ui')['_LazyComponent']
29
+ VarList: typeof import('@varlet/ui')['_ListComponent']
29
30
  VarLoading: typeof import('@varlet/ui')['_LoadingComponent']
30
31
  VarLocale: typeof import('@varlet/ui')['_LocaleComponent']
31
32
  VarMenu: typeof import('@varlet/ui')['_MenuComponent']
package/types/index.d.ts CHANGED
@@ -28,6 +28,7 @@ export * from './indexAnchor'
28
28
  export * from './indexBar'
29
29
  export * from './input'
30
30
  export * from './lazy'
31
+ export * from './list'
31
32
  export * from './loading'
32
33
  export * from './locale'
33
34
  export * from './menu'
@@ -0,0 +1,21 @@
1
+ import { VarComponent } from './varComponent'
2
+
3
+ export interface ListProps {
4
+ loading?: boolean
5
+ immediateCheck?: boolean
6
+ finished?: boolean
7
+ error?: boolean
8
+ offset?: string | number
9
+ loadingText?: string
10
+ finishedText?: string
11
+ errorText?: string
12
+ onLoad?: () => void
13
+ 'onUpdate:loading'?: (loading: boolean) => void
14
+ 'onUpdate:error'?: (error: boolean) => void
15
+ }
16
+
17
+ export class List extends VarComponent {
18
+ $props: ListProps
19
+ }
20
+
21
+ export class _ListComponent extends List {}