sard-uniapp 1.8.1 → 1.9.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 (190) hide show
  1. package/README.md +38 -14
  2. package/changelog.md +20 -2
  3. package/components/_template/_template.d.ts +7 -22
  4. package/components/accordion/accordion.d.ts +6 -21
  5. package/components/accordion-item/accordion-item.d.ts +6 -21
  6. package/components/action-sheet/action-sheet.d.ts +10 -33
  7. package/components/alert/alert.d.ts +8 -27
  8. package/components/alert/common.d.ts +1 -1
  9. package/components/alert/index.scss +6 -2
  10. package/components/avatar/avatar.d.ts +4 -23
  11. package/components/avatar/common.d.ts +1 -1
  12. package/components/back-top/back-top.d.ts +7 -28
  13. package/components/back-top/usePageBackTop.d.ts +1 -1
  14. package/components/back-top/useScrollViewBackTop.d.ts +1 -1
  15. package/components/badge/badge.d.ts +5 -26
  16. package/components/button/button.d.ts +13 -66
  17. package/components/button/common.d.ts +3 -3
  18. package/components/button/index.scss +3 -2
  19. package/components/calendar/calendar.d.ts +5 -30
  20. package/components/calendar/common.d.ts +1 -1
  21. package/components/calendar-input/calendar-input.d.ts +6 -35
  22. package/components/calendar-input/common.d.ts +1 -1
  23. package/components/calendar-month/calendar-month.d.ts +4 -21
  24. package/components/card/card.d.ts +6 -21
  25. package/components/cascader/cascader.d.ts +8 -27
  26. package/components/cascader-input/cascader-input.d.ts +9 -30
  27. package/components/check-icon/check-icon.d.ts +3 -26
  28. package/components/checkbox/checkbox.d.ts +10 -29
  29. package/components/checkbox/common.d.ts +1 -1
  30. package/components/checkbox-group/checkbox-group.d.ts +11 -32
  31. package/components/checkbox-input/checkbox-input.d.ts +6 -29
  32. package/components/col/col.d.ts +3 -18
  33. package/components/collapse/collapse.d.ts +3 -18
  34. package/components/config/index.d.ts +91 -52
  35. package/components/config/index.js +4 -0
  36. package/components/count-down/count-down.d.ts +9 -32
  37. package/components/count-to/count-to.d.ts +2 -29
  38. package/components/datetime-picker/datetime-picker.d.ts +5 -26
  39. package/components/datetime-picker-input/datetime-picker-input.d.ts +6 -29
  40. package/components/dialog/common.d.ts +1 -1
  41. package/components/dialog/dialog.d.ts +15 -44
  42. package/components/dialog-agent/common.d.ts +1 -1
  43. package/components/dialog-agent/dialog-agent.d.ts +3 -36
  44. package/components/dropdown/common.d.ts +1 -1
  45. package/components/dropdown/dropdown.d.ts +4 -31
  46. package/components/dropdown-item/dropdown-item.d.ts +8 -27
  47. package/components/empty/empty.d.ts +4 -23
  48. package/components/fab/fab.d.ts +6 -33
  49. package/components/fab/fab.vue +2 -2
  50. package/components/floating-bubble/common.d.ts +1 -1
  51. package/components/floating-bubble/floating-bubble.d.ts +9 -32
  52. package/components/form/Validator.d.ts +3 -3
  53. package/components/form/common.d.ts +2 -10
  54. package/components/form/form.d.ts +9 -42
  55. package/components/form-item/form-item.d.ts +6 -27
  56. package/components/grid/common.d.ts +1 -1
  57. package/components/grid/grid.d.ts +5 -26
  58. package/components/grid-item/grid-item.d.ts +6 -21
  59. package/components/icon/icon.d.ts +2 -25
  60. package/components/indexes/indexes.d.ts +7 -22
  61. package/components/indexes-anchor/indexes-anchor.d.ts +3 -18
  62. package/components/indexes-nav/indexes-nav.d.ts +6 -21
  63. package/components/input/common.d.ts +2 -2
  64. package/components/input/input.d.ts +17 -60
  65. package/components/keyboard/common.d.ts +1 -1
  66. package/components/keyboard/keyboard.d.ts +9 -28
  67. package/components/list/common.d.ts +1 -1
  68. package/components/list/list.d.ts +3 -18
  69. package/components/list-item/list-item.d.ts +8 -27
  70. package/components/load-more/load-more.d.ts +8 -27
  71. package/components/loading/common.d.ts +1 -1
  72. package/components/loading/loading.d.ts +5 -28
  73. package/components/locale/index.d.ts +1 -1
  74. package/components/marquee/common.d.ts +1 -1
  75. package/components/marquee/marquee.d.ts +5 -28
  76. package/components/menu/menu.d.ts +5 -26
  77. package/components/menu-item/menu-item.d.ts +4 -21
  78. package/components/navbar/navbar.d.ts +3 -18
  79. package/components/navbar-item/navbar-item.d.ts +6 -21
  80. package/components/notice-bar/common.d.ts +1 -1
  81. package/components/notice-bar/notice-bar.d.ts +9 -34
  82. package/components/notify/common.d.ts +2 -2
  83. package/components/notify/notify.d.ts +8 -35
  84. package/components/notify-agent/common.d.ts +2 -2
  85. package/components/notify-agent/notify-agent.d.ts +3 -32
  86. package/components/overlay/overlay.d.ts +7 -26
  87. package/components/pagination/common.d.ts +1 -1
  88. package/components/pagination/pagination.d.ts +8 -37
  89. package/components/password-input/common.d.ts +1 -1
  90. package/components/password-input/password-input.d.ts +6 -31
  91. package/components/picker/picker.d.ts +5 -28
  92. package/components/picker-input/picker-input.d.ts +6 -31
  93. package/components/popout/common.d.ts +1 -1
  94. package/components/popout/popout.d.ts +15 -44
  95. package/components/popout-input/popout-input.d.ts +6 -23
  96. package/components/popout-input/popout-input.vue +1 -1
  97. package/components/popover/common.d.ts +3 -3
  98. package/components/popover/popover.d.ts +9 -40
  99. package/components/popover-reference/popover-reference.d.ts +6 -21
  100. package/components/popup/common.d.ts +1 -1
  101. package/components/popup/popup.d.ts +11 -50
  102. package/components/progress-bar/progress-bar.d.ts +4 -25
  103. package/components/progress-circle/progress-circle.d.ts +4 -25
  104. package/components/pull-down-refresh/pull-down-refresh.d.ts +10 -39
  105. package/components/qrcode/common.d.ts +2 -2
  106. package/components/qrcode/qrcode.d.ts +3 -38
  107. package/components/radio/common.d.ts +1 -1
  108. package/components/radio/radio.d.ts +6 -21
  109. package/components/radio-group/radio-group.d.ts +9 -30
  110. package/components/radio-input/common.d.ts +1 -1
  111. package/components/radio-input/radio-input.d.ts +6 -31
  112. package/components/rate/rate.d.ts +5 -32
  113. package/components/result/common.d.ts +1 -1
  114. package/components/result/result.d.ts +5 -24
  115. package/components/row/row.d.ts +3 -18
  116. package/components/sard-uniapp/sard-uniapp.d.ts +1 -1
  117. package/components/search/common.d.ts +1 -1
  118. package/components/search/search.d.ts +17 -38
  119. package/components/share-sheet/share-sheet.d.ts +10 -33
  120. package/components/skeleton/skeleton.d.ts +4 -25
  121. package/components/skeleton-avatar/skeleton-avatar.d.ts +1 -18
  122. package/components/skeleton-block/skeleton-block.d.ts +1 -18
  123. package/components/skeleton-paragraph/skeleton-paragraph.d.ts +1 -18
  124. package/components/skeleton-title/skeleton-title.d.ts +1 -18
  125. package/components/slider/slider.d.ts +10 -35
  126. package/components/stepper/common.d.ts +2 -2
  127. package/components/stepper/stepper.d.ts +9 -46
  128. package/components/steps/common.d.ts +1 -1
  129. package/components/steps/steps.d.ts +2 -35
  130. package/components/style/functions.scss +22 -0
  131. package/components/style/mixins/bem.scss +3 -2
  132. package/components/style/mixins/border.scss +5 -3
  133. package/components/style/variables.scss +6 -6
  134. package/components/swiper-dot/common.d.ts +1 -1
  135. package/components/swiper-dot/swiper-dot.d.ts +3 -30
  136. package/components/switch/switch.d.ts +7 -32
  137. package/components/tab/tab.d.ts +6 -21
  138. package/components/tabbar/tabbar.d.ts +7 -26
  139. package/components/tabbar-item/tabbar-item.d.ts +6 -21
  140. package/components/table/common.d.ts +52 -0
  141. package/components/table/common.js +3 -0
  142. package/components/table/index.d.ts +1 -0
  143. package/components/table/index.js +1 -0
  144. package/components/table/index.scss +10 -0
  145. package/components/table/table.d.ts +13 -0
  146. package/components/table/table.vue +101 -0
  147. package/components/table/variables-dark.scss +8 -0
  148. package/components/table/variables.scss +12 -0
  149. package/components/table-cell/index.scss +90 -0
  150. package/components/table-cell/table-cell.d.ts +10 -0
  151. package/components/table-cell/table-cell.vue +57 -0
  152. package/components/table-fixation/index.scss +21 -0
  153. package/components/table-fixation/table-fixation.d.ts +14 -0
  154. package/components/table-fixation/table-fixation.vue +112 -0
  155. package/components/table-row/index.scss +15 -0
  156. package/components/table-row/table-row.d.ts +10 -0
  157. package/components/table-row/table-row.vue +46 -0
  158. package/components/tabs/common.d.ts +1 -1
  159. package/components/tabs/tabs.d.ts +7 -26
  160. package/components/tag/common.d.ts +2 -2
  161. package/components/tag/index.scss +2 -1
  162. package/components/tag/tag.d.ts +9 -30
  163. package/components/timeline/timeline.d.ts +3 -18
  164. package/components/timeline-item/timeline-item.d.ts +3 -18
  165. package/components/toast/common.d.ts +2 -2
  166. package/components/toast/toast.d.ts +8 -37
  167. package/components/toast-agent/common.d.ts +2 -2
  168. package/components/toast-agent/toast-agent.d.ts +4 -35
  169. package/components/tree/common.d.ts +1 -1
  170. package/components/tree/tree.d.ts +3 -30
  171. package/components/tree-branch/tree-branch.d.ts +1 -18
  172. package/components/tree-node/tree-node.d.ts +1 -18
  173. package/components/upload/common.d.ts +3 -11
  174. package/components/upload/upload.d.ts +9 -42
  175. package/components/upload/upload.vue +0 -1
  176. package/components/upload-preview/upload-preview.d.ts +6 -27
  177. package/components/upload-preview/upload-preview.vue +0 -1
  178. package/dark.scss +1 -0
  179. package/global.d.ts +3 -0
  180. package/index.d.ts +1 -0
  181. package/index.js +1 -0
  182. package/index.scss +1 -0
  183. package/package.json +118 -17
  184. package/use/useLuckyGrid.d.ts +1 -1
  185. package/use/useLuckyWheel.d.ts +1 -1
  186. package/use/useTransition.d.ts +2 -2
  187. package/use/useZIndex.d.ts +1 -1
  188. package/utils/bem.d.ts +1 -1
  189. package/utils/dom.js +1 -1
  190. package/utils/utils.js +0 -1
package/README.md CHANGED
@@ -44,35 +44,59 @@
44
44
  git clone https://github.com/sutras/sard-uniapp.git
45
45
  ```
46
46
 
47
- ### 全局安装 pnpm(如果未安装)
47
+ ### 安装依赖
48
48
 
49
49
  ```bash
50
- npm install -g pnpm
50
+ npm install
51
51
  ```
52
52
 
53
- ### 使用 pnpm 安装依赖
53
+ ### 运行开发环境
54
54
 
55
55
  ```bash
56
- pnpm install
56
+ npm run dev
57
57
  ```
58
58
 
59
- ### 修改 @dcloudio 源码
59
+ 运行上面命令后会生成四个链接:
60
60
 
61
- 安装完依赖,需要修改@dcloudio 里面的一个地方,具体参考以下文档中的第一个问题(“热更新无效”):
61
+ ```bash
62
+ Local: http://localhost:5173/sard-uniapp-docs/mobile/ (演示)
63
+ Network: http://192.168.1.121:5173/sard-uniapp-docs/mobile/ (局域网演示)
64
+ Local: http://localhost:7761/sard-uniapp-docs/ (文档)
65
+ Network: http://192.168.1.121:7761/sard-uniapp-docs/ (局域网文档)
66
+ ```
62
67
 
63
- [https://zhuanlan.zhihu.com/p/665000866](https://zhuanlan.zhihu.com/p/665000866)
68
+ ### 测试
64
69
 
65
- ### 运行开发环境
70
+ ```bash
71
+ npm run test
72
+ ```
73
+
74
+ ### 构建文档站点
66
75
 
67
76
  ```bash
68
- pnpm run dev
77
+ npm run build:site
69
78
  ```
70
79
 
71
- 运行上面命令后会生成四个链接:
80
+ ### 预览构建的文档站点
72
81
 
73
82
  ```bash
74
- Local: http://localhost:5173/sard-uniapp-docs/mobile/ (演示)
75
- Network: http://192.168.1.121:5173/sard-uniapp-docs/mobile/ (局域网演示)
76
- Local: http://localhost:7761/sard-uniapp-docs/ (文档)
77
- Network: http://192.168.1.121:7761/sard-uniapp-docs/ (局域网文档)
83
+ npm run preview
84
+ ```
85
+
86
+ ### 构建组件库
87
+
88
+ ```bash
89
+ npm run build
90
+ ```
91
+
92
+ ### 部署文档站点到 github pages
93
+
94
+ ```bash
95
+ npm run deploy
96
+ ```
97
+
98
+ ### 发布组件库到 npm
99
+
100
+ ```bash
101
+ npm run release
78
102
  ```
package/changelog.md CHANGED
@@ -1,3 +1,21 @@
1
+ # [1.9.0](https://github.com/sutras/sard-uniapp/compare/v1.8.2...v1.9.0) (2024-12-22)
2
+
3
+
4
+ ### Features
5
+
6
+ * 新增表格组件 ([f2d0db6](https://github.com/sutras/sard-uniapp/commit/f2d0db61ab595a281590f9b840c25beea6dd4fe7))
7
+
8
+
9
+
10
+ ## [1.8.2](https://github.com/sutras/sard-uniapp/compare/v1.8.1...v1.8.2) (2024-12-06)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * **PopoutInput:** 只读时隐藏箭头 ([0efcdf7](https://github.com/sutras/sard-uniapp/commit/0efcdf77f39778521b8fe7d2b66c84b7a88496c5))
16
+
17
+
18
+
1
19
  ## [1.8.1](https://github.com/sutras/sard-uniapp/compare/v1.8.0...v1.8.1) (2024-10-22)
2
20
 
3
21
 
@@ -94,8 +112,8 @@
94
112
 
95
113
  ### Bug Fixes
96
114
 
97
- * 修复pnpm非扁平化依赖包下lwa依赖问题 close [#32](https://github.com/sutras/sard-uniapp/issues/32) ([5868e16](https://github.com/sutras/sard-uniapp/commit/5868e16587e8664705789e2e791c264f2a7d22f5))
98
115
  * lwa copy ([7dc350a](https://github.com/sutras/sard-uniapp/commit/7dc350a09f3d10e4bf9f08733e70e1ec73d15b26))
116
+ * 修复pnpm非扁平化依赖包下lwa依赖问题 close [#32](https://github.com/sutras/sard-uniapp/issues/32) ([5868e16](https://github.com/sutras/sard-uniapp/commit/5868e16587e8664705789e2e791c264f2a7d22f5))
99
117
 
100
118
 
101
119
 
@@ -231,8 +249,8 @@
231
249
 
232
250
  ### Features
233
251
 
234
- * 新增基础组件 ([8e6385e](https://github.com/sutras/sard-uniapp/commit/8e6385edfd0406aba96920eb1ee68432f1c714f9))
235
252
  * **global:** 新增组件 ([5c65aab](https://github.com/sutras/sard-uniapp/commit/5c65aab0860885324b93cac83817905f3a0df66c))
253
+ * 新增基础组件 ([8e6385e](https://github.com/sutras/sard-uniapp/commit/8e6385edfd0406aba96920eb1ee68432f1c714f9))
236
254
 
237
255
 
238
256
 
@@ -1,31 +1,16 @@
1
1
  import { type _TemplateProps, type _TemplateSlots } from './common';
2
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<_TemplateProps>, {}>, {
2
+ declare function __VLS_template(): Readonly<_TemplateSlots> & _TemplateSlots;
3
+ declare const __VLS_component: import("vue").DefineComponent<_TemplateProps, {
3
4
  reset: () => void;
4
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
5
- click: (event: any) => void;
6
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<_TemplateProps>, {}>>> & {
5
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
6
+ click: (event: any) => any;
7
+ }, string, import("vue").PublicProps, Readonly<_TemplateProps> & Readonly<{
7
8
  onClick?: ((event: any) => any) | undefined;
8
- }, {}, {}>, Readonly<_TemplateSlots> & _TemplateSlots>;
9
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
9
11
  export default _default;
10
- type __VLS_WithDefaults<P, D> = {
11
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
12
- default: D[K];
13
- }> : P[K];
14
- };
15
- type __VLS_Prettify<T> = {
16
- [K in keyof T]: T[K];
17
- } & {};
18
12
  type __VLS_WithTemplateSlots<T, S> = T & {
19
13
  new (): {
20
14
  $slots: S;
21
15
  };
22
16
  };
23
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
24
- type __VLS_TypePropsToOption<T> = {
25
- [K in keyof T]-?: {} extends Pick<T, K> ? {
26
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
27
- } : {
28
- type: import('vue').PropType<T[K]>;
29
- required: true;
30
- };
31
- };
@@ -1,30 +1,15 @@
1
1
  import { type AccordionProps, type AccordionSlots } from './common';
2
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<AccordionProps>, {}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
3
- "update:model-value": (event: any) => void;
4
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<AccordionProps>, {}>>> & {
2
+ declare function __VLS_template(): Readonly<AccordionSlots> & AccordionSlots;
3
+ declare const __VLS_component: import("vue").DefineComponent<AccordionProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
4
+ "update:model-value": (event: any) => any;
5
+ }, string, import("vue").PublicProps, Readonly<AccordionProps> & Readonly<{
5
6
  "onUpdate:model-value"?: ((event: any) => any) | undefined;
6
- }, {}, {}>, Readonly<AccordionSlots> & AccordionSlots>;
7
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
7
9
  export default _default;
8
10
 
9
- type __VLS_WithDefaults<P, D> = {
10
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
11
- default: D[K];
12
- }> : P[K];
13
- };
14
- type __VLS_Prettify<T> = {
15
- [K in keyof T]: T[K];
16
- } & {};
17
11
  type __VLS_WithTemplateSlots<T, S> = T & {
18
12
  new (): {
19
13
  $slots: S;
20
14
  };
21
15
  };
22
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
23
- type __VLS_TypePropsToOption<T> = {
24
- [K in keyof T]-?: {} extends Pick<T, K> ? {
25
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
26
- } : {
27
- type: import('vue').PropType<T[K]>;
28
- required: true;
29
- };
30
- };
@@ -1,29 +1,14 @@
1
1
  import { type AccordionItemProps, type AccordionItemSlots } from '../accordion/common';
2
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<AccordionItemProps>, {}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
3
- click: (event: any) => void;
4
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<AccordionItemProps>, {}>>> & {
2
+ declare function __VLS_template(): Readonly<AccordionItemSlots> & AccordionItemSlots;
3
+ declare const __VLS_component: import("vue").DefineComponent<AccordionItemProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
4
+ click: (event: any) => any;
5
+ }, string, import("vue").PublicProps, Readonly<AccordionItemProps> & Readonly<{
5
6
  onClick?: ((event: any) => any) | undefined;
6
- }, {}, {}>, Readonly<AccordionItemSlots> & AccordionItemSlots>;
7
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
7
9
  export default _default;
8
- type __VLS_WithDefaults<P, D> = {
9
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
10
- default: D[K];
11
- }> : P[K];
12
- };
13
- type __VLS_Prettify<T> = {
14
- [K in keyof T]: T[K];
15
- } & {};
16
10
  type __VLS_WithTemplateSlots<T, S> = T & {
17
11
  new (): {
18
12
  $slots: S;
19
13
  };
20
14
  };
21
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
22
- type __VLS_TypePropsToOption<T> = {
23
- [K in keyof T]-?: {} extends Pick<T, K> ? {
24
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
25
- } : {
26
- type: import('vue').PropType<T[K]>;
27
- required: true;
28
- };
29
- };
@@ -1,39 +1,16 @@
1
1
  import { type ActionSheetItem, type ActionSheetProps } from './common';
2
- declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<ActionSheetProps>, {
3
- overlayClosable: boolean;
4
- duration: number;
5
- }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
6
- "update:visible": (visible: boolean) => void;
7
- close: () => void;
8
- cancel: () => void;
9
- select: (item: ActionSheetItem, index: number) => void;
10
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<ActionSheetProps>, {
11
- overlayClosable: boolean;
12
- duration: number;
13
- }>>> & {
14
- onSelect?: ((item: ActionSheetItem, index: number) => any) | undefined;
15
- onClose?: (() => any) | undefined;
2
+ declare const _default: import("vue").DefineComponent<ActionSheetProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
3
+ cancel: () => any;
4
+ close: () => any;
5
+ select: (item: ActionSheetItem, index: number) => any;
6
+ "update:visible": (visible: boolean) => any;
7
+ }, string, import("vue").PublicProps, Readonly<ActionSheetProps> & Readonly<{
16
8
  onCancel?: (() => any) | undefined;
9
+ onClose?: (() => any) | undefined;
10
+ onSelect?: ((item: ActionSheetItem, index: number) => any) | undefined;
17
11
  "onUpdate:visible"?: ((visible: boolean) => any) | undefined;
18
- }, {
12
+ }>, {
19
13
  duration: number;
20
14
  overlayClosable: boolean;
21
- }, {}>;
15
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
22
16
  export default _default;
23
- type __VLS_WithDefaults<P, D> = {
24
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
25
- default: D[K];
26
- }> : P[K];
27
- };
28
- type __VLS_Prettify<T> = {
29
- [K in keyof T]: T[K];
30
- } & {};
31
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
32
- type __VLS_TypePropsToOption<T> = {
33
- [K in keyof T]-?: {} extends Pick<T, K> ? {
34
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
35
- } : {
36
- type: import('vue').PropType<T[K]>;
37
- required: true;
38
- };
39
- };
@@ -1,35 +1,16 @@
1
1
  import { type AlertProps, type AlertSlots } from './common';
2
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<AlertProps>, {
3
- type: "success" | "primary" | "warning" | "danger" | undefined;
4
- }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
5
- close: () => void;
6
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<AlertProps>, {
7
- type: "success" | "primary" | "warning" | "danger" | undefined;
8
- }>>> & {
2
+ declare function __VLS_template(): Readonly<AlertSlots> & AlertSlots;
3
+ declare const __VLS_component: import("vue").DefineComponent<AlertProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
4
+ close: () => any;
5
+ }, string, import("vue").PublicProps, Readonly<AlertProps> & Readonly<{
9
6
  onClose?: (() => any) | undefined;
10
- }, {
11
- type: "success" | "primary" | "warning" | "danger";
12
- }, {}>, Readonly<AlertSlots> & AlertSlots>;
7
+ }>, {
8
+ type: "primary" | "success" | "warning" | "danger";
9
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
13
11
  export default _default;
14
- type __VLS_WithDefaults<P, D> = {
15
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
16
- default: D[K];
17
- }> : P[K];
18
- };
19
- type __VLS_Prettify<T> = {
20
- [K in keyof T]: T[K];
21
- } & {};
22
12
  type __VLS_WithTemplateSlots<T, S> = T & {
23
13
  new (): {
24
14
  $slots: S;
25
15
  };
26
16
  };
27
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
28
- type __VLS_TypePropsToOption<T> = {
29
- [K in keyof T]-?: {} extends Pick<T, K> ? {
30
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
31
- } : {
32
- type: import('vue').PropType<T[K]>;
33
- required: true;
34
- };
35
- };
@@ -9,7 +9,7 @@ export interface AlertProps {
9
9
  background?: string;
10
10
  }
11
11
  export declare const defaultAlertProps: {
12
- type: "success" | "primary" | "warning" | "danger" | undefined;
12
+ type: AlertProps["type"];
13
13
  };
14
14
  export interface AlertSlots {
15
15
  default?(props: Record<string, never>): any;
@@ -1,3 +1,4 @@
1
+ @use 'sass:list';
1
2
  @use '../style/base' as *;
2
3
 
3
4
  @include bem(alert) {
@@ -30,8 +31,11 @@
30
31
  )
31
32
  {
32
33
  @include m($type) {
33
- color: nth($color, 1);
34
- background-color: rgba(nth($color, 2), var(--sar-alert-bg-opacity));
34
+ color: list.nth($color, 1);
35
+ background-color: rgba(
36
+ list.nth($color, 2),
37
+ var(--sar-alert-bg-opacity)
38
+ );
35
39
  }
36
40
  }
37
41
  }
@@ -1,31 +1,12 @@
1
1
  import { type AvatarProps, type AvatarSlots } from './common';
2
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<AvatarProps>, {
3
- shape: "circle" | "square" | undefined;
4
- }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<AvatarProps>, {
5
- shape: "circle" | "square" | undefined;
6
- }>>>, {
2
+ declare function __VLS_template(): Readonly<AvatarSlots> & AvatarSlots;
3
+ declare const __VLS_component: import("vue").DefineComponent<AvatarProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AvatarProps> & Readonly<{}>, {
7
4
  shape: "circle" | "square";
8
- }, {}>, Readonly<AvatarSlots> & AvatarSlots>;
5
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
9
7
  export default _default;
10
- type __VLS_WithDefaults<P, D> = {
11
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
12
- default: D[K];
13
- }> : P[K];
14
- };
15
- type __VLS_Prettify<T> = {
16
- [K in keyof T]: T[K];
17
- } & {};
18
8
  type __VLS_WithTemplateSlots<T, S> = T & {
19
9
  new (): {
20
10
  $slots: S;
21
11
  };
22
12
  };
23
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
24
- type __VLS_TypePropsToOption<T> = {
25
- [K in keyof T]-?: {} extends Pick<T, K> ? {
26
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
27
- } : {
28
- type: import('vue').PropType<T[K]>;
29
- required: true;
30
- };
31
- };
@@ -10,7 +10,7 @@ export interface AvatarProps {
10
10
  src?: string;
11
11
  }
12
12
  export declare const defaultAvatarProps: {
13
- shape: "circle" | "square" | undefined;
13
+ shape: AvatarProps["shape"];
14
14
  };
15
15
  export interface AvatarSlots {
16
16
  default?(props: Record<string, never>): any;
@@ -1,38 +1,17 @@
1
1
  import { type BackTopProps, type BackTopSlots } from './common';
2
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<BackTopProps>, {
3
- scrollTop: number;
4
- visibleHeight: number;
5
- }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
6
- click: (event: any) => void;
7
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<BackTopProps>, {
8
- scrollTop: number;
9
- visibleHeight: number;
10
- }>>> & {
2
+ declare function __VLS_template(): Readonly<BackTopSlots> & BackTopSlots;
3
+ declare const __VLS_component: import("vue").DefineComponent<BackTopProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
4
+ click: (event: any) => any;
5
+ }, string, import("vue").PublicProps, Readonly<BackTopProps> & Readonly<{
11
6
  onClick?: ((event: any) => any) | undefined;
12
- }, {
7
+ }>, {
13
8
  visibleHeight: number;
14
9
  scrollTop: number;
15
- }, {}>, Readonly<BackTopSlots> & BackTopSlots>;
10
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
16
12
  export default _default;
17
- type __VLS_WithDefaults<P, D> = {
18
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
19
- default: D[K];
20
- }> : P[K];
21
- };
22
- type __VLS_Prettify<T> = {
23
- [K in keyof T]: T[K];
24
- } & {};
25
13
  type __VLS_WithTemplateSlots<T, S> = T & {
26
14
  new (): {
27
15
  $slots: S;
28
16
  };
29
17
  };
30
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
31
- type __VLS_TypePropsToOption<T> = {
32
- [K in keyof T]-?: {} extends Pick<T, K> ? {
33
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
34
- } : {
35
- type: import('vue').PropType<T[K]>;
36
- required: true;
37
- };
38
- };
@@ -1,4 +1,4 @@
1
1
  export declare function usePageBackTop(duration?: number): {
2
- scrollTop: import("vue").Ref<number>;
2
+ scrollTop: import("vue").Ref<number, number>;
3
3
  onClick: () => void;
4
4
  };
@@ -1,5 +1,5 @@
1
1
  export declare function useScrollViewBackTop(): {
2
- scrollTop: import("vue").Ref<number>;
2
+ scrollTop: import("vue").Ref<number, number>;
3
3
  onScroll: (event: any) => void;
4
4
  onClick: () => void;
5
5
  };
@@ -1,34 +1,13 @@
1
1
  import { type BadgeProps, type BadgeSlots } from './common';
2
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<BadgeProps>, {
3
- value: number;
2
+ declare function __VLS_template(): Readonly<BadgeSlots> & BadgeSlots;
3
+ declare const __VLS_component: import("vue").DefineComponent<BadgeProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<BadgeProps> & Readonly<{}>, {
4
4
  max: number;
5
- }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<BadgeProps>, {
6
- value: number;
7
- max: number;
8
- }>>>, {
9
- max: number;
10
- value: string | number;
11
- }, {}>, Readonly<BadgeSlots> & BadgeSlots>;
5
+ value: number | string;
6
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
12
8
  export default _default;
13
- type __VLS_WithDefaults<P, D> = {
14
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
15
- default: D[K];
16
- }> : P[K];
17
- };
18
- type __VLS_Prettify<T> = {
19
- [K in keyof T]: T[K];
20
- } & {};
21
9
  type __VLS_WithTemplateSlots<T, S> = T & {
22
10
  new (): {
23
11
  $slots: S;
24
12
  };
25
13
  };
26
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
27
- type __VLS_TypePropsToOption<T> = {
28
- [K in keyof T]-?: {} extends Pick<T, K> ? {
29
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
30
- } : {
31
- type: import('vue').PropType<T[K]>;
32
- required: true;
33
- };
34
- };
@@ -1,76 +1,23 @@
1
1
  import { type ButtonProps, type ButtonSlots } from './common';
2
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<ButtonProps>, {
3
- type: "text" | "default" | "pale" | "mild" | "outline" | "pale-text" | undefined;
4
- theme: "success" | "primary" | "warning" | "danger" | "secondary" | "info" | "neutral" | undefined;
5
- size: "small" | "medium" | "mini" | "large" | undefined;
2
+ declare function __VLS_template(): Readonly<ButtonSlots> & ButtonSlots;
3
+ declare const __VLS_component: import("vue").DefineComponent<ButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
4
+ [x: string]: any;
5
+ } & {
6
+ [x: string]: any;
7
+ }, string, import("vue").PublicProps, Readonly<ButtonProps> & Readonly<{
8
+ [x: `on${Capitalize<any>}`]: ((...args: any) => any) | undefined;
9
+ }>, {
10
+ size: "mini" | "small" | "medium" | "large";
11
+ type: "default" | "pale" | "mild" | "outline" | "text" | "pale-text";
12
+ theme: "primary" | "secondary" | "success" | "info" | "warning" | "danger" | "neutral";
6
13
  hoverStopPropagation: boolean;
7
14
  lang: string;
8
15
  showMessageCard: boolean;
9
- }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
10
- click: (event: any) => void;
11
- getphonenumber: (event: any) => void;
12
- getuserinfo: (event: any) => void;
13
- error: (event: any) => void;
14
- opensetting: (event: any) => void;
15
- launchapp: (event: any) => void;
16
- contact: (event: any) => void;
17
- chooseavatar: (event: any) => void;
18
- agreeprivacyauthorization: (event: any) => void;
19
- addgroupapp: (event: any) => void;
20
- chooseaddress: (event: any) => void;
21
- chooseinvoicetitle: (event: any) => void;
22
- subscribe: (event: any) => void;
23
- login: (event: any) => void;
24
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<ButtonProps>, {
25
- type: "text" | "default" | "pale" | "mild" | "outline" | "pale-text" | undefined;
26
- theme: "success" | "primary" | "warning" | "danger" | "secondary" | "info" | "neutral" | undefined;
27
- size: "small" | "medium" | "mini" | "large" | undefined;
28
- hoverStopPropagation: boolean;
29
- lang: string;
30
- showMessageCard: boolean;
31
- }>>> & {
32
- onError?: ((event: any) => any) | undefined;
33
- onClick?: ((event: any) => any) | undefined;
34
- onGetphonenumber?: ((event: any) => any) | undefined;
35
- onGetuserinfo?: ((event: any) => any) | undefined;
36
- onOpensetting?: ((event: any) => any) | undefined;
37
- onLaunchapp?: ((event: any) => any) | undefined;
38
- onContact?: ((event: any) => any) | undefined;
39
- onChooseavatar?: ((event: any) => any) | undefined;
40
- onAgreeprivacyauthorization?: ((event: any) => any) | undefined;
41
- onAddgroupapp?: ((event: any) => any) | undefined;
42
- onChooseaddress?: ((event: any) => any) | undefined;
43
- onChooseinvoicetitle?: ((event: any) => any) | undefined;
44
- onSubscribe?: ((event: any) => any) | undefined;
45
- onLogin?: ((event: any) => any) | undefined;
46
- }, {
47
- size: "small" | "medium" | "mini" | "large";
48
- type: "text" | "default" | "pale" | "mild" | "outline" | "pale-text";
49
- theme: "success" | "primary" | "warning" | "danger" | "secondary" | "info" | "neutral";
50
- hoverStopPropagation: boolean;
51
- lang: string;
52
- showMessageCard: boolean;
53
- }, {}>, Readonly<ButtonSlots> & ButtonSlots>;
16
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
17
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
54
18
  export default _default;
55
- type __VLS_WithDefaults<P, D> = {
56
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
57
- default: D[K];
58
- }> : P[K];
59
- };
60
- type __VLS_Prettify<T> = {
61
- [K in keyof T]: T[K];
62
- } & {};
63
19
  type __VLS_WithTemplateSlots<T, S> = T & {
64
20
  new (): {
65
21
  $slots: S;
66
22
  };
67
23
  };
68
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
69
- type __VLS_TypePropsToOption<T> = {
70
- [K in keyof T]-?: {} extends Pick<T, K> ? {
71
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
72
- } : {
73
- type: import('vue').PropType<T[K]>;
74
- required: true;
75
- };
76
- };
@@ -26,9 +26,9 @@ export interface ButtonProps {
26
26
  publicId?: string;
27
27
  }
28
28
  export declare const defaultButtonProps: {
29
- type: "text" | "default" | "pale" | "mild" | "outline" | "pale-text" | undefined;
30
- theme: "success" | "primary" | "warning" | "danger" | "secondary" | "info" | "neutral" | undefined;
31
- size: "small" | "medium" | "mini" | "large" | undefined;
29
+ type: ButtonProps["type"];
30
+ theme: ButtonProps["theme"];
31
+ size: ButtonProps["size"];
32
32
  hoverStopPropagation: boolean;
33
33
  lang: string;
34
34
  showMessageCard: boolean;
@@ -1,3 +1,4 @@
1
+ @use 'sass:list';
1
2
  @use '../style/base' as *;
2
3
 
3
4
  @include bem(button) {
@@ -91,8 +92,8 @@
91
92
 
92
93
  // # 主题色
93
94
  @each $theme, $value in $sar-theme-colors {
94
- $color: nth($value, 1);
95
- $color-rgb: nth($value, 2);
95
+ $color: list.nth($value, 1);
96
+ $color-rgb: list.nth($value, 2);
96
97
 
97
98
  // ## 默认类型
98
99
  @include m(default-#{$theme}) {