@wot-ui/ui 2.0.7 → 2.1.0

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 (50) hide show
  1. package/README.md +11 -11
  2. package/attributes.json +1 -1
  3. package/changelog.md +26 -0
  4. package/common/AbortablePromise.ts +28 -0
  5. package/common/canvasHelper.ts +49 -0
  6. package/common/clickoutside.ts +25 -0
  7. package/common/event.ts +8 -0
  8. package/common/formatDate.ts +68 -0
  9. package/common/interceptor.ts +43 -0
  10. package/common/props.ts +53 -0
  11. package/common/util.ts +836 -0
  12. package/components/wd-avatar/wd-avatar.vue +1 -1
  13. package/components/wd-button/types.ts +11 -8
  14. package/components/wd-button/wd-button.vue +26 -4
  15. package/components/wd-calendar-view/monthPanel/month-panel.vue +1 -0
  16. package/components/wd-calendar-view/yearPanel/year-panel.vue +1 -0
  17. package/components/wd-cell/index.scss +12 -1
  18. package/components/wd-config-provider/global-config.ts +50 -0
  19. package/components/wd-config-provider/theme-vars.ts +2073 -0
  20. package/components/wd-config-provider/types.ts +20 -2071
  21. package/components/wd-config-provider/wd-config-provider.vue +15 -4
  22. package/components/wd-dialog/wd-dialog.vue +1 -0
  23. package/components/wd-drop-menu/wd-drop-menu.vue +1 -0
  24. package/components/wd-grid/wd-grid.vue +0 -2
  25. package/components/wd-icon/wd-icon.vue +2 -2
  26. package/components/wd-img/wd-img.vue +1 -0
  27. package/components/wd-index-anchor/index.scss +5 -5
  28. package/components/wd-index-bar/index.scss +14 -14
  29. package/components/wd-keyboard/key/index.vue +2 -0
  30. package/components/wd-notify/wd-notify.vue +1 -0
  31. package/components/wd-picker-view/useSelection.ts +3 -1
  32. package/components/wd-root-portal/wd-root-portal.vue +1 -1
  33. package/components/wd-select-picker/wd-select-picker.vue +1 -0
  34. package/components/wd-signature/wd-signature.vue +1 -0
  35. package/components/wd-slider/index.scss +45 -45
  36. package/components/wd-slider/wd-slider.vue +19 -3
  37. package/components/wd-switch/wd-switch.vue +2 -0
  38. package/components/wd-tabs/wd-tabs.vue +1 -0
  39. package/components/wd-tag/index.scss +8 -7
  40. package/components/wd-tag/types.ts +10 -7
  41. package/components/wd-tag/wd-tag.vue +23 -6
  42. package/components/wd-toast/wd-toast.vue +4 -0
  43. package/composables/index.ts +2 -0
  44. package/composables/useConfigProvider.ts +27 -12
  45. package/composables/useGlobalConfig.ts +9 -0
  46. package/index.ts +1 -1
  47. package/package.json +1 -1
  48. package/styles/variable.scss +381 -381
  49. package/tags.json +1 -1
  50. package/web-types.json +1 -1
@@ -0,0 +1,9 @@
1
+ import { computed, inject, type ComputedRef } from 'vue'
2
+ import { CONFIG_PROVIDER_KEY, type ConfigProviderProvide } from '../components/wd-config-provider/types'
3
+ import { DEFAULT_GLOBAL_CONFIG, type GlobalConfig } from '../components/wd-config-provider/global-config'
4
+
5
+ export function useGlobalConfig(): ComputedRef<GlobalConfig> {
6
+ const injected = inject<ConfigProviderProvide | null>(CONFIG_PROVIDER_KEY, null)
7
+ if (injected) return injected.globalConfig
8
+ return computed(() => ({ ...DEFAULT_GLOBAL_CONFIG }))
9
+ }
package/index.ts CHANGED
@@ -3,4 +3,4 @@ export { zodAdapter } from './components/wd-form'
3
3
  export type { FormSchema, FormSchemaIssue, FormValidateEvent, FormValidateTrigger } from './components/wd-form'
4
4
  export * as CommonUtil from './common/util'
5
5
  export * from './locale'
6
- export type { ConfigProviderThemeVars } from './components/wd-config-provider/types'
6
+ export type { ConfigProviderThemeVars } from './components/wd-config-provider/theme-vars'
package/package.json CHANGED
@@ -1 +1 @@
1
- {"id":"wot-ui","name":"@wot-ui/ui","displayName":"wot-ui 一个轻量、美观、AI友好的 uni-app 组件库","version":"2.0.7","license":"MIT","description":"wot-ui 一个轻量、美观、AI友好的 uni-app 组件库。","keywords":["wot-ui","国际化","组件库","vue3","暗黑模式"],"main":"index.ts","repository":{"type":"git","url":"https://github.com/wot-ui/wot-ui.git"},"engines":{"HBuilderX":"^3.8.7"},"dcloudext":{"type":"component-vue","sale":{"regular":{"price":"0.00"},"sourcecode":{"price":"0.00"}},"contact":{"qq":""},"declaration":{"ads":"无","data":"插件不采集任何数据","permissions":"无"},"npmurl":"https://www.npmjs.com/package/@wot-ui/ui"},"vetur":{"tags":"tags.json","attributes":"attributes.json"},"web-types":"web-types.json","uni_modules":{"dependencies":[],"encrypt":[],"platforms":{"cloud":{"tcb":"y","aliyun":"y","alipay":"n"},"client":{"Vue":{"vue2":"n","vue3":"y"},"App":{"app-vue":"y","app-nvue":"n","app-uvue":"n"},"H5-mobile":{"Safari":"y","Android Browser":"y","微信浏览器(Android)":"y","QQ浏览器(Android)":"y"},"H5-pc":{"Chrome":"y","IE":"u","Edge":"y","Firefox":"y","Safari":"y"},"小程序":{"微信":"y","阿里":"y","百度":"u","字节跳动":"u","QQ":"y","钉钉":"y","快手":"u","飞书":"u","京东":"u"},"快应用":{"华为":"u","联盟":"u"}}}},"peerDependencies":{"vue":">=3.2.47"}}
1
+ {"id":"wot-ui","name":"@wot-ui/ui","displayName":"wot-ui 一个轻量、美观、AI友好的 uni-app 组件库","version":"2.1.0","license":"MIT","description":"wot-ui 一个轻量、美观、AI友好的 uni-app 组件库。","keywords":["wot-ui","国际化","组件库","vue3","暗黑模式"],"main":"index.ts","repository":{"type":"git","url":"https://github.com/wot-ui/wot-ui.git"},"engines":{"HBuilderX":"^3.8.7"},"dcloudext":{"type":"component-vue","sale":{"regular":{"price":"0.00"},"sourcecode":{"price":"0.00"}},"contact":{"qq":""},"declaration":{"ads":"无","data":"插件不采集任何数据","permissions":"无"},"npmurl":"https://www.npmjs.com/package/@wot-ui/ui"},"vetur":{"tags":"tags.json","attributes":"attributes.json"},"web-types":"web-types.json","uni_modules":{"dependencies":[],"encrypt":[],"platforms":{"cloud":{"tcb":"y","aliyun":"y","alipay":"n"},"client":{"Vue":{"vue2":"n","vue3":"y"},"App":{"app-vue":"y","app-nvue":"n","app-uvue":"n"},"H5-mobile":{"Safari":"y","Android Browser":"y","微信浏览器(Android)":"y","QQ浏览器(Android)":"y"},"H5-pc":{"Chrome":"y","IE":"u","Edge":"y","Firefox":"y","Safari":"y"},"小程序":{"微信":"y","阿里":"y","百度":"u","字节跳动":"u","QQ":"y","钉钉":"y","快手":"u","飞书":"u","京东":"u"},"快应用":{"华为":"u","联盟":"u"}}}},"peerDependencies":{"vue":">=3.2.47"}}