@pixelium/web-vue 0.0.2-fix → 0.0.3-beta

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 (285) hide show
  1. package/README.md +42 -0
  2. package/README.zh.md +6 -3
  3. package/coverage/base.css +224 -0
  4. package/coverage/block-navigation.js +87 -0
  5. package/coverage/coverage-final.json +106 -0
  6. package/coverage/favicon.png +0 -0
  7. package/coverage/index.html +926 -0
  8. package/coverage/prettify.css +1 -0
  9. package/coverage/prettify.js +2 -0
  10. package/coverage/sort-arrow-sprite.png +0 -0
  11. package/coverage/sorter.js +210 -0
  12. package/dist/font.css +1 -1
  13. package/dist/index.d.ts +1593 -248
  14. package/dist/normalize.css +2 -0
  15. package/dist/pixelium-vue-icon-hn.cjs +1 -1
  16. package/dist/pixelium-vue-icon-hn.css +2 -1
  17. package/dist/pixelium-vue-icon-hn.js +8533 -8154
  18. package/dist/pixelium-vue-icon-hn.umd.cjs +1 -1
  19. package/dist/pixelium-vue-icon-pa.cjs +1 -1
  20. package/dist/pixelium-vue-icon-pa.css +2 -1
  21. package/dist/pixelium-vue-icon-pa.js +10625 -10143
  22. package/dist/pixelium-vue-icon-pa.umd.cjs +1 -1
  23. package/dist/pixelium-vue.cjs +2 -2
  24. package/dist/pixelium-vue.css +2 -1
  25. package/dist/pixelium-vue.js +7402 -5854
  26. package/dist/pixelium-vue.umd.cjs +2 -2
  27. package/es/aside/index.js +46 -151
  28. package/es/auto-complete/draw.d.ts +1 -1
  29. package/es/auto-complete/draw.js +26 -51
  30. package/es/auto-complete/index.css +92 -32
  31. package/es/auto-complete/index.d.ts +12 -15
  32. package/es/auto-complete/index.js +338 -400
  33. package/es/auto-complete/type.d.ts +25 -13
  34. package/es/avatar/css.js +2 -0
  35. package/es/avatar/draw.d.ts +2 -0
  36. package/es/avatar/draw.js +11 -0
  37. package/es/avatar/index.css +49 -0
  38. package/es/avatar/index.d.ts +15 -0
  39. package/es/avatar/index.js +110 -0
  40. package/es/avatar/type.d.ts +34 -0
  41. package/es/button/draw.d.ts +4 -4
  42. package/es/button/draw.js +213 -297
  43. package/es/button/index.css +40 -30
  44. package/es/button/index.d.ts +0 -4
  45. package/es/button/index.js +230 -256
  46. package/es/button/type.d.ts +3 -3
  47. package/es/button-group/index.css +0 -3
  48. package/es/button-group/index.d.ts +1 -2
  49. package/es/button-group/index.js +59 -31
  50. package/es/button-group/type.d.ts +21 -4
  51. package/es/checkbox/css.js +2 -0
  52. package/es/checkbox/draw.d.ts +4 -0
  53. package/es/checkbox/draw.js +46 -0
  54. package/es/checkbox/index.css +85 -0
  55. package/es/checkbox/index.d.ts +31 -0
  56. package/es/checkbox/index.js +206 -0
  57. package/es/checkbox/type.d.ts +88 -0
  58. package/es/checkbox-group/css.js +2 -0
  59. package/es/checkbox-group/index.css +20 -0
  60. package/es/checkbox-group/index.d.ts +23 -0
  61. package/es/checkbox-group/index.js +84 -0
  62. package/es/checkbox-group/type.d.ts +78 -0
  63. package/es/col/index.d.ts +2 -2
  64. package/es/col/index.js +43 -58
  65. package/es/container/index.js +18 -31
  66. package/es/divider/index.js +39 -53
  67. package/es/empty/index.css +4 -4
  68. package/es/empty/index.js +16 -71
  69. package/es/entry.js +102 -0
  70. package/es/footer/index.js +31 -40
  71. package/es/form/css.js +1 -0
  72. package/es/form/index.d.ts +27 -0
  73. package/es/form/index.js +125 -0
  74. package/es/form/type.d.ts +238 -0
  75. package/es/form/use-form.d.ts +4 -0
  76. package/es/form/use-form.js +48 -0
  77. package/es/form-item/css.js +2 -0
  78. package/es/form-item/index.css +77 -0
  79. package/es/form-item/index.d.ts +37 -0
  80. package/es/form-item/index.js +318 -0
  81. package/es/form-item/type.d.ts +96 -0
  82. package/es/grid/index.js +56 -75
  83. package/es/grid-item/css.js +0 -1
  84. package/es/grid-item/index.d.ts +1 -1
  85. package/es/grid-item/index.js +85 -121
  86. package/es/header/index.js +31 -40
  87. package/es/icon/index.js +44 -55
  88. package/es/icons/css-hn.js +0 -1
  89. package/es/icons/css-pa.js +0 -1
  90. package/es/icons/icon-hn.js +10337 -15986
  91. package/es/icons/icon-pa.js +12573 -17447
  92. package/es/image/css.js +2 -0
  93. package/es/image/index.css +69 -0
  94. package/es/image/index.d.ts +35 -0
  95. package/es/image/index.js +199 -0
  96. package/es/image/type.d.ts +126 -0
  97. package/es/index.css +1 -515
  98. package/es/index.d.ts +22 -2
  99. package/es/index.js +143 -123
  100. package/es/input/draw.d.ts +1 -1
  101. package/es/input/draw.js +26 -51
  102. package/es/input/index.css +85 -33
  103. package/es/input/index.d.ts +9 -16
  104. package/es/input/index.js +319 -423
  105. package/es/input/type.d.ts +3 -3
  106. package/es/input-group/index.css +0 -1
  107. package/es/input-group/index.d.ts +2 -2
  108. package/es/input-group/index.js +66 -37
  109. package/es/input-group/type.d.ts +16 -4
  110. package/es/input-group-label/draw.d.ts +1 -1
  111. package/es/input-group-label/draw.js +26 -51
  112. package/es/input-group-label/index.css +33 -22
  113. package/es/input-group-label/index.d.ts +1 -4
  114. package/es/input-group-label/index.js +104 -127
  115. package/es/input-group-label/type.d.ts +3 -3
  116. package/es/input-number/draw.d.ts +1 -1
  117. package/es/input-number/draw.js +26 -51
  118. package/es/input-number/index.css +90 -35
  119. package/es/input-number/index.d.ts +9 -16
  120. package/es/input-number/index.js +428 -536
  121. package/es/input-number/type.d.ts +3 -3
  122. package/es/input-tag/draw.d.ts +1 -1
  123. package/es/input-tag/draw.js +26 -48
  124. package/es/input-tag/index.css +100 -33
  125. package/es/input-tag/index.d.ts +7 -13
  126. package/es/input-tag/index.js +442 -467
  127. package/es/input-tag/type.d.ts +24 -13
  128. package/es/link/index.js +75 -106
  129. package/es/main/index.js +11 -15
  130. package/es/mask/index.js +94 -115
  131. package/es/message/index.css +1 -1
  132. package/es/message/index.js +168 -346
  133. package/es/message-box/css.js +1 -1
  134. package/es/message-box/index.js +98 -114
  135. package/es/message-box/message-box-wrapped.js +33 -46
  136. package/es/message-box/message-box.js +79 -111
  137. package/es/option-list/index.css +13 -13
  138. package/es/option-list/index.d.ts +4 -31
  139. package/es/option-list/index.js +99 -167
  140. package/es/option-list/type.d.ts +5 -1
  141. package/es/pixelate/pixel.d.ts +5 -0
  142. package/es/pixelate/pixel.js +70 -0
  143. package/es/pixelate/pixelate.worker.d.ts +1 -0
  144. package/es/popover/index.d.ts +13 -99
  145. package/es/popover/index.js +75 -238
  146. package/es/popover/type.d.ts +7 -2
  147. package/es/popup/css.js +1 -0
  148. package/es/popup/index.d.ts +210 -0
  149. package/es/popup/index.js +203 -0
  150. package/es/popup/type.d.ts +105 -0
  151. package/es/popup-content/draw.d.ts +2 -2
  152. package/es/popup-content/draw.js +98 -143
  153. package/es/popup-content/index.css +11 -11
  154. package/es/popup-content/index.d.ts +1 -0
  155. package/es/popup-content/index.js +253 -1576
  156. package/es/popup-content/type.d.ts +1 -0
  157. package/es/popup-trigger/index.d.ts +8 -2
  158. package/es/popup-trigger/index.js +122 -95
  159. package/es/popup-trigger/type.d.ts +4 -1
  160. package/es/popup-wrapper/css.js +2 -0
  161. package/es/popup-wrapper/index.css +14 -0
  162. package/es/popup-wrapper/index.d.ts +18 -0
  163. package/es/popup-wrapper/index.js +67 -0
  164. package/es/popup-wrapper/type.d.ts +9 -0
  165. package/es/radio/css.js +1 -0
  166. package/es/radio/draw.d.ts +4 -0
  167. package/es/radio/draw.js +47 -0
  168. package/es/radio/index.d.ts +30 -0
  169. package/es/radio/index.js +190 -0
  170. package/es/radio/style.css +73 -0
  171. package/es/radio/type.d.ts +76 -0
  172. package/es/radio-group/css.js +2 -0
  173. package/es/radio-group/index.css +20 -0
  174. package/es/radio-group/index.d.ts +23 -0
  175. package/es/radio-group/index.js +77 -0
  176. package/es/radio-group/type.d.ts +77 -0
  177. package/es/row/index.js +56 -70
  178. package/es/select/draw.d.ts +1 -1
  179. package/es/select/draw.js +26 -51
  180. package/es/select/index.css +118 -36
  181. package/es/select/index.d.ts +14 -16
  182. package/es/select/index.js +625 -675
  183. package/es/select/type.d.ts +60 -25
  184. package/es/share/const/event-bus-key.js +1 -6
  185. package/es/share/const/index.d.ts +4 -0
  186. package/es/share/const/index.js +22 -24
  187. package/es/share/const/provide-key.d.ts +5 -0
  188. package/es/share/const/provide-key.js +6 -5
  189. package/es/share/const/style.d.ts +6 -0
  190. package/es/share/const/style.js +7 -0
  191. package/es/share/hook/use-cancelable-delay.d.ts +1 -0
  192. package/es/share/hook/use-cancelable-delay.js +42 -0
  193. package/es/share/hook/use-click-outside-listener.d.ts +1 -1
  194. package/es/share/hook/use-click-outside-listener.js +28 -41
  195. package/es/share/hook/use-composition.js +17 -15
  196. package/es/share/hook/use-controlled-mode.d.ts +3 -3
  197. package/es/share/hook/use-controlled-mode.js +20 -23
  198. package/es/share/hook/use-dark-mode.js +51 -65
  199. package/es/share/hook/use-index-of-children.d.ts +2 -1
  200. package/es/share/hook/use-index-of-children.js +47 -45
  201. package/es/share/hook/use-lazy-load.d.ts +10 -0
  202. package/es/share/hook/use-lazy-load.js +133 -0
  203. package/es/share/hook/use-props-detect.d.ts +2 -0
  204. package/es/share/hook/use-resize-observer.d.ts +1 -2
  205. package/es/share/hook/use-resize-observer.js +28 -20
  206. package/es/share/hook/use-screen-width.js +27 -36
  207. package/es/share/hook/use-smooth-transition.d.ts +2 -0
  208. package/es/share/hook/use-smooth-transition.js +65 -0
  209. package/es/share/hook/use-textarea-height.js +86 -92
  210. package/es/share/hook/use-theme-mode.js +41 -42
  211. package/es/share/hook/use-transition-end.d.ts +2 -0
  212. package/es/share/hook/use-transition-end.js +12 -0
  213. package/es/share/hook/use-watch-global-css-var.js +12 -16
  214. package/es/share/hook/use-window-resize-listener.d.ts +1 -0
  215. package/es/share/hook/use-window-resize-listener.js +15 -0
  216. package/es/share/hook/use-z-index.js +30 -27
  217. package/es/share/type/index.d.ts +18 -3
  218. package/es/share/util/color.d.ts +5 -3
  219. package/es/share/util/color.js +156 -149
  220. package/es/share/util/common.d.ts +7 -2
  221. package/es/share/util/common.js +127 -65
  222. package/es/share/util/console.d.ts +3 -3
  223. package/es/share/util/console.js +10 -7
  224. package/es/share/util/dom.d.ts +19 -0
  225. package/es/share/util/dom.js +88 -0
  226. package/es/share/util/env.d.ts +1 -0
  227. package/es/share/util/env.js +5 -4
  228. package/es/share/util/event-bus.js +3 -20
  229. package/es/share/util/lru-cache.js +29 -33
  230. package/es/share/util/pixel.d.ts +4 -0
  231. package/es/share/util/plot.d.ts +8 -3
  232. package/es/share/util/plot.js +457 -229
  233. package/es/share/util/reactivity.d.ts +8 -0
  234. package/es/share/util/reactivity.js +23 -0
  235. package/es/share/util/render.js +31 -41
  236. package/es/share/util/theme.d.ts +3 -0
  237. package/es/share/util/theme.js +77 -57
  238. package/es/slider/css.js +2 -0
  239. package/es/slider/draw.d.ts +25 -0
  240. package/es/slider/draw.js +113 -0
  241. package/es/slider/index.css +119 -0
  242. package/es/slider/index.d.ts +66 -0
  243. package/es/slider/index.js +503 -0
  244. package/es/slider/type.d.ts +162 -0
  245. package/es/slider/util.d.ts +37 -0
  246. package/es/slider/util.js +130 -0
  247. package/es/space/index.css +24 -29
  248. package/es/space/index.js +73 -97
  249. package/es/spin/index.css +18 -17
  250. package/es/spin/index.js +72 -102
  251. package/es/spin/type.d.ts +11 -5
  252. package/es/switch/css.js +2 -0
  253. package/es/switch/draw.d.ts +2 -0
  254. package/es/switch/draw.js +18 -0
  255. package/es/switch/index.css +121 -0
  256. package/es/switch/index.d.ts +42 -0
  257. package/es/switch/index.js +259 -0
  258. package/es/switch/type.d.ts +133 -0
  259. package/es/tag/draw.d.ts +2 -2
  260. package/es/tag/draw.js +80 -127
  261. package/es/tag/index.css +38 -22
  262. package/es/tag/index.d.ts +2 -2
  263. package/es/tag/index.js +121 -190
  264. package/es/tag/type.d.ts +3 -3
  265. package/es/text-outline/css.js +2 -0
  266. package/es/text-outline/index.css +4 -0
  267. package/es/text-outline/index.d.ts +17 -0
  268. package/es/text-outline/index.js +33 -0
  269. package/es/text-outline/type.d.ts +23 -0
  270. package/es/textarea/draw.js +9 -11
  271. package/es/textarea/index.css +37 -23
  272. package/es/textarea/index.d.ts +8 -14
  273. package/es/textarea/index.js +274 -262
  274. package/es/tooltip/index.d.ts +100 -4
  275. package/es/tooltip/index.js +70 -226
  276. package/es/tooltip/type.d.ts +7 -2
  277. package/es/vendor.js +504 -0
  278. package/es/virtual-list/css.js +2 -0
  279. package/es/virtual-list/index.css +25 -0
  280. package/es/virtual-list/index.d.ts +11 -0
  281. package/es/virtual-list/index.js +313 -0
  282. package/es/virtual-list/type.d.ts +26 -0
  283. package/package.json +10 -16
  284. package/es/grid-item/index.css +0 -0
  285. /package/es/message-box/{message-box.css → index.css} +0 -0
@@ -1,13 +1,11 @@
1
- import type { NumberOrPercentage } from '../share/type';
2
- import type { GroupOption, Option } from '../share/type';
3
- import type { TagProps } from '../tag/type';
4
- export interface SelectOption extends Option<string> {
5
- value: any;
6
- disabled?: boolean;
1
+ import type { OptionListGroupOption, OptionListOption } from '../option-list/type';
2
+ import type { PopoverEvents, PopoverProps } from '../popover/type';
3
+ import type { EmitEvent, NumberOrPercentage } from '../share/type';
4
+ import type { TagEvents, TagProps } from '../tag/type';
5
+ import type { VirtualListProps } from '../virtual-list/type';
6
+ export interface SelectOption extends OptionListOption<any> {
7
7
  }
8
- export interface SelectGroupOption extends GroupOption {
9
- label: string;
10
- key: string | number | symbol;
8
+ export interface SelectGroupOption extends OptionListGroupOption {
11
9
  children: (SelectOption | string)[];
12
10
  }
13
11
  export type SelectProps = {
@@ -92,7 +90,7 @@ export type SelectProps = {
92
90
  */
93
91
  collapseTags?: boolean;
94
92
  /**
95
- * @property {number} [collapseTags]
93
+ * @property {number} [maxDisplayTags]
96
94
  * @version 0.0.2
97
95
  */
98
96
  maxDisplayTags?: number;
@@ -102,30 +100,30 @@ export type SelectProps = {
102
100
  */
103
101
  collapseTagsPopover?: boolean;
104
102
  /**
105
- * @property {'primary' | 'sakura' | 'success' | 'warning' | 'danger' | 'info'} [tagTheme='info']
106
- * @version 0.0.2
103
+ * @property {boolean} [virtualScroll=false]
104
+ * @version 0.0.3
107
105
  */
108
- tagTheme?: TagProps['theme'];
106
+ virtualScroll?: boolean;
109
107
  /**
110
- * @property {'primary' | 'plain' | 'outline'} [tagVariant='plain']
111
- * @version 0.0.2
108
+ * @property {Omit<VirtualListProps, 'list' | 'fixedHeight'>} [virtualListProps]
109
+ * @version 0.0.3
112
110
  */
113
- tagVariant?: TagProps['variant'];
111
+ virtualListProps?: Omit<VirtualListProps, 'list' | 'fixedHeight'>;
114
112
  /**
115
- * @property {string} [tagColor]
116
- * @version 0.0.2
113
+ * @property {Omit<TagProps, 'size' | 'disabled' | 'closable'> & EmitEvent<TagEvents>} [tagProps]
114
+ * @version 0.0.3
117
115
  */
118
- tagColor?: TagProps['color'];
116
+ tagProps?: Omit<TagProps, 'size' | 'disabled' | 'closable'> & EmitEvent<TagEvents>;
119
117
  /**
120
118
  * @property {'medium' | 'large' | 'small'} [size='medium']
121
119
  * @version 0.0.2
122
120
  */
123
121
  size?: 'medium' | 'large' | 'small';
124
122
  /**
125
- * @property {'default' | 'round'} [shape='default']
126
- * @version 0.0.2
123
+ * @property {'rect' | 'round'} [shape='rect']
124
+ * @version 0.0.3
127
125
  */
128
- shape?: 'default' | 'round';
126
+ shape?: 'rect' | 'round' | 'default';
129
127
  /**
130
128
  * @property {NumberOrPercentage | NumberOrPercentage[]} [borderRadius]
131
129
  * @version 0.0.2
@@ -136,6 +134,31 @@ export type SelectProps = {
136
134
  * @version 0.0.2
137
135
  */
138
136
  status?: 'success' | 'warning' | 'error' | 'normal';
137
+ /**
138
+ * @property {'primary' | 'sakura' | 'success' | 'warning' | 'danger' | 'info'} [tagTheme='info']
139
+ * @version 0.0.2
140
+ */
141
+ tagTheme?: TagProps['theme'];
142
+ /**
143
+ * @property {'primary' | 'plain' | 'outline'} [tagVariant='plain']
144
+ * @version 0.0.2
145
+ */
146
+ tagVariant?: TagProps['variant'];
147
+ /**
148
+ * @property {string} [tagColor]
149
+ * @version 0.0.2
150
+ */
151
+ tagColor?: TagProps['color'];
152
+ /**
153
+ * @property {Omit<PopoverProps, 'visible' | 'content'> & EmitEvent<PopoverEvents>} [popoverProps]
154
+ * @version 0.0.3
155
+ */
156
+ popoverProps?: Omit<PopoverProps, 'visible' | 'content'> & EmitEvent<PopoverEvents>;
157
+ /**
158
+ * @property {boolean} [optionsDestroyOnHide=false]
159
+ * @version 0.0.3
160
+ */
161
+ optionsDestroyOnHide?: boolean;
139
162
  };
140
163
  export type SelectEvents = {
141
164
  /**
@@ -180,12 +203,13 @@ export type SelectEvents = {
180
203
  * @event blur
181
204
  * @version 0.0.2
182
205
  */
183
- blur: [];
206
+ blur: [event: FocusEvent];
184
207
  /**
185
208
  * @event focus
209
+ * @param {FocusEvent} event
186
210
  * @version 0.0.2
187
211
  */
188
- focus: [];
212
+ focus: [event: FocusEvent];
189
213
  /**
190
214
  * @event select
191
215
  * @param {any} value
@@ -229,9 +253,20 @@ export type SelectSlots = {
229
253
  * @param {any} value
230
254
  * @param {string} label
231
255
  * @param {number} index
232
- * @version 0.0.2
256
+ * @param {boolean} disabled
257
+ * @param {boolean} readonly
258
+ * @version 0.0.3
233
259
  */
234
260
  tag: {};
261
+ /**
262
+ * @slot label
263
+ * @param {any} value
264
+ * @param {string} label
265
+ * @param {boolean} disabled
266
+ * @param {boolean} readonly
267
+ * @version 0.0.3
268
+ */
269
+ label: {};
235
270
  };
236
271
  export type SelectExpose = {
237
272
  /**
@@ -2,9 +2,4 @@ const BUTTON_GROUP_UPDATE = "px-button-group-update";
2
2
  const GRID_UPDATE = "px-grid-update";
3
3
  const GLOBAL_CSS_VAR_CHANGE = "px-global-css-var-change";
4
4
  const INPUT_GROUP_UPDATE = "px-input-group-update";
5
- export {
6
- BUTTON_GROUP_UPDATE as B,
7
- GRID_UPDATE as G,
8
- INPUT_GROUP_UPDATE as I,
9
- GLOBAL_CSS_VAR_CHANGE as a
10
- };
5
+ export { INPUT_GROUP_UPDATE as i, GLOBAL_CSS_VAR_CHANGE as n, GRID_UPDATE as r, BUTTON_GROUP_UPDATE as t };
@@ -13,3 +13,7 @@ export declare enum SCREEN_SIZE_TYPE {
13
13
  }
14
14
  export declare const GROUP_OPTION_TYPE = "group";
15
15
  export declare const BORDER_CORNER_RAD_RANGE: [number, number][];
16
+ export declare const POPUP_CONTENT_DEFAULT_MAX_WIDTH = 400;
17
+ export declare const SQRT3: number;
18
+ export declare const INV_SQRT3: number;
19
+ export declare const GET_ELEMENT_RENDERED = "getElementRendered";
@@ -1,30 +1,28 @@
1
1
  const TRANSPARENT_RGBA_COLOR_OBJECT = {
2
- r: 0,
3
- g: 0,
4
- b: 0,
5
- a: 0
2
+ r: 0,
3
+ g: 0,
4
+ b: 0,
5
+ a: 0
6
6
  };
7
7
  const COVER_Z_INDEX = 20;
8
- var SCREEN_SIZE_TYPE = /* @__PURE__ */ ((SCREEN_SIZE_TYPE2) => {
9
- SCREEN_SIZE_TYPE2["XS"] = "xs";
10
- SCREEN_SIZE_TYPE2["SM"] = "sm";
11
- SCREEN_SIZE_TYPE2["MD"] = "md";
12
- SCREEN_SIZE_TYPE2["LG"] = "lg";
13
- SCREEN_SIZE_TYPE2["XL"] = "xl";
14
- SCREEN_SIZE_TYPE2["XXL"] = "xxl";
15
- return SCREEN_SIZE_TYPE2;
16
- })(SCREEN_SIZE_TYPE || {});
8
+ let SCREEN_SIZE_TYPE = /* @__PURE__ */ function(SCREEN_SIZE_TYPE$1) {
9
+ SCREEN_SIZE_TYPE$1["XS"] = "xs";
10
+ SCREEN_SIZE_TYPE$1["SM"] = "sm";
11
+ SCREEN_SIZE_TYPE$1["MD"] = "md";
12
+ SCREEN_SIZE_TYPE$1["LG"] = "lg";
13
+ SCREEN_SIZE_TYPE$1["XL"] = "xl";
14
+ SCREEN_SIZE_TYPE$1["XXL"] = "xxl";
15
+ return SCREEN_SIZE_TYPE$1;
16
+ }({});
17
17
  const GROUP_OPTION_TYPE = "group";
18
18
  const BORDER_CORNER_RAD_RANGE = [
19
- [Math.PI, Math.PI * 3 / 2],
20
- [Math.PI * 3 / 2, Math.PI * 2],
21
- [0, Math.PI / 2],
22
- [Math.PI / 2, Math.PI]
19
+ [Math.PI, Math.PI * 3 / 2],
20
+ [Math.PI * 3 / 2, Math.PI * 2],
21
+ [0, Math.PI / 2],
22
+ [Math.PI / 2, Math.PI]
23
23
  ];
24
- export {
25
- BORDER_CORNER_RAD_RANGE as B,
26
- COVER_Z_INDEX as C,
27
- GROUP_OPTION_TYPE as G,
28
- SCREEN_SIZE_TYPE as S,
29
- TRANSPARENT_RGBA_COLOR_OBJECT as T
30
- };
24
+ const POPUP_CONTENT_DEFAULT_MAX_WIDTH = 400;
25
+ const SQRT3 = Math.sqrt(3);
26
+ const INV_SQRT3 = 1 / SQRT3;
27
+ const GET_ELEMENT_RENDERED = "getElementRendered";
28
+ export { INV_SQRT3 as a, SQRT3 as c, GROUP_OPTION_TYPE as i, TRANSPARENT_RGBA_COLOR_OBJECT as l, COVER_Z_INDEX as n, POPUP_CONTENT_DEFAULT_MAX_WIDTH as o, GET_ELEMENT_RENDERED as r, SCREEN_SIZE_TYPE as s, BORDER_CORNER_RAD_RANGE as t };
@@ -1,3 +1,8 @@
1
1
  export declare const BUTTON_GROUP_PROVIDE = "px-button-group-provide";
2
2
  export declare const INPUT_GROUP_PROVIDE = "px-input-group-provide";
3
3
  export declare const GRID_PROVIDE = "px-grid-provide";
4
+ export declare const CONTAINER_PROVIDE = "px-container-provide";
5
+ export declare const FORM_PROVIDE = "px-form-provide";
6
+ export declare const FORM_ITEM_PROVIDE = "px-form-item-provide";
7
+ export declare const CHECKBOX_GROUP_PROVIDE = "px-checkbox-group-provide";
8
+ export declare const RADIO_GROUP_PROVIDE = "px-radio-group-provide";
@@ -1,8 +1,9 @@
1
1
  const BUTTON_GROUP_PROVIDE = "px-button-group-provide";
2
2
  const INPUT_GROUP_PROVIDE = "px-input-group-provide";
3
3
  const GRID_PROVIDE = "px-grid-provide";
4
- export {
5
- BUTTON_GROUP_PROVIDE as B,
6
- GRID_PROVIDE as G,
7
- INPUT_GROUP_PROVIDE as I
8
- };
4
+ const CONTAINER_PROVIDE = "px-container-provide";
5
+ const FORM_PROVIDE = "px-form-provide";
6
+ const FORM_ITEM_PROVIDE = "px-form-item-provide";
7
+ const CHECKBOX_GROUP_PROVIDE = "px-checkbox-group-provide";
8
+ const RADIO_GROUP_PROVIDE = "px-radio-group-provide";
9
+ export { FORM_PROVIDE as a, RADIO_GROUP_PROVIDE as c, FORM_ITEM_PROVIDE as i, CHECKBOX_GROUP_PROVIDE as n, GRID_PROVIDE as o, CONTAINER_PROVIDE as r, INPUT_GROUP_PROVIDE as s, BUTTON_GROUP_PROVIDE as t };
@@ -0,0 +1,6 @@
1
+ export declare const DEFAULT_PIXEL_SIZE = 4;
2
+ export declare const INTERVAL = 4;
3
+ export declare const INTERVAL_MINI = 2;
4
+ export declare const LARGE_BASE_SIZE = 36;
5
+ export declare const MEDIUM_BASE_SIZE = 28;
6
+ export declare const SMALL_BASE_SIZE = 20;
@@ -0,0 +1,7 @@
1
+ const DEFAULT_PIXEL_SIZE = 4;
2
+ const INTERVAL = 4;
3
+ const INTERVAL_MINI = 2;
4
+ const LARGE_BASE_SIZE = 36;
5
+ const MEDIUM_BASE_SIZE = 28;
6
+ const SMALL_BASE_SIZE = 20;
7
+ export { MEDIUM_BASE_SIZE as a, LARGE_BASE_SIZE as i, INTERVAL as n, SMALL_BASE_SIZE as o, INTERVAL_MINI as r, DEFAULT_PIXEL_SIZE as t };
@@ -0,0 +1 @@
1
+ export declare function useCancelableDelay(delay?: number): readonly [(delayTime?: number) => Promise<boolean>, () => void, import("vue").ComputedRef<boolean>];
@@ -0,0 +1,42 @@
1
+ import { computed, ref } from "vue";
2
+ function useCancelableDelay(delay = 150) {
3
+ const pendingReject = ref(null);
4
+ const isPending = computed(() => pendingReject.value !== null);
5
+ const cancel = () => {
6
+ if (pendingReject.value) {
7
+ pendingReject.value();
8
+ pendingReject.value = null;
9
+ }
10
+ };
11
+ async function wait(delayTime = delay) {
12
+ cancel();
13
+ let timer = null;
14
+ const p = new Promise((resolve, reject) => {
15
+ pendingReject.value = () => {
16
+ if (timer !== null) {
17
+ clearTimeout(timer);
18
+ timer = null;
19
+ }
20
+ pendingReject.value = null;
21
+ reject();
22
+ };
23
+ timer = setTimeout(() => {
24
+ timer = null;
25
+ pendingReject.value = null;
26
+ resolve();
27
+ }, delayTime);
28
+ });
29
+ try {
30
+ await p;
31
+ return true;
32
+ } catch {
33
+ return false;
34
+ }
35
+ }
36
+ return [
37
+ wait,
38
+ cancel,
39
+ isPending
40
+ ];
41
+ }
42
+ export { useCancelableDelay as t };
@@ -1,4 +1,4 @@
1
1
  import { type ShallowRef, type VNode } from 'vue';
2
- type ElGetter = ShallowRef<HTMLElement | VNode | null> | (() => any);
2
+ type ElGetter = ShallowRef<HTMLElement | SVGElement | VNode | null> | (() => any);
3
3
  export declare const useClickOutsideListener: (ref: ElGetter | ElGetter[], callback: (event: MouseEvent) => any) => void;
4
4
  export {};
@@ -1,44 +1,31 @@
1
- import { $, m } from "../../aside/index.js";
2
- import { onMounted, onBeforeUnmount } from "vue";
3
- const check = (target, range) => {
4
- if (!range) {
5
- return true;
6
- }
7
- return range.contains(target);
1
+ import { D as S, F as m } from "../../vendor.js";
2
+ import { onBeforeUnmount, onMounted } from "vue";
3
+ var check = (target, range) => {
4
+ if (!range) return true;
5
+ return range.contains(target);
8
6
  };
9
- const getEl = (ref) => {
10
- if (m(ref)) {
11
- const res = ref();
12
- return res instanceof HTMLElement ? res : null;
13
- }
14
- if (!ref.value) {
15
- return null;
16
- }
17
- return ref.value instanceof HTMLElement ? ref.value : ref.value.el && ref.value.el instanceof HTMLElement ? ref.value.el : null;
7
+ var getEl = (ref$1) => {
8
+ if (m(ref$1)) {
9
+ const res = ref$1();
10
+ return res instanceof HTMLElement ? res : null;
11
+ }
12
+ if (!ref$1.value) return null;
13
+ return ref$1.value instanceof HTMLElement || ref$1.value instanceof SVGElement ? ref$1.value : ref$1.value.el && ref$1.value.el instanceof HTMLElement ? ref$1.value.el : null;
18
14
  };
19
- const useClickOutsideListener = (ref, callback) => {
20
- const clickOutsideHandler = (event) => {
21
- const target = event.target;
22
- if (!(target instanceof HTMLElement)) {
23
- return;
24
- }
25
- if ($(ref) ? ref.length === 0 : m(ref) ? false : !ref.value) {
26
- return;
27
- }
28
- const clickInside = $(ref) ? ref.reduce((pre, cur) => {
29
- return pre || check(target, getEl(cur));
30
- }, false) : check(target, getEl(ref));
31
- if (!clickInside) {
32
- callback(event);
33
- }
34
- };
35
- onMounted(() => {
36
- document.addEventListener("click", clickOutsideHandler);
37
- });
38
- onBeforeUnmount(() => {
39
- document.removeEventListener("click", clickOutsideHandler);
40
- });
41
- };
42
- export {
43
- useClickOutsideListener as u
15
+ const useClickOutsideListener = (ref$1, callback) => {
16
+ const clickOutsideHandler = (event) => {
17
+ const target = event.target;
18
+ if (!(target instanceof HTMLElement)) return;
19
+ if (S(ref$1) ? ref$1.length === 0 : m(ref$1) ? false : !ref$1.value) return;
20
+ if (!(S(ref$1) ? ref$1.reduce((pre, cur) => {
21
+ return pre || check(target, getEl(cur));
22
+ }, false) : check(target, getEl(ref$1)))) callback(event);
23
+ };
24
+ onMounted(() => {
25
+ document.addEventListener("click", clickOutsideHandler);
26
+ });
27
+ onBeforeUnmount(() => {
28
+ document.removeEventListener("click", clickOutsideHandler);
29
+ });
44
30
  };
31
+ export { useClickOutsideListener as t };
@@ -1,17 +1,19 @@
1
- import { ref, nextTick } from "vue";
1
+ import { nextTick, ref } from "vue";
2
2
  function useComposition({ afterComposition }) {
3
- const isComposing = ref(false);
4
- const compositionStartHandler = (_) => {
5
- isComposing.value = true;
6
- };
7
- const compositionEndHandler = (event) => {
8
- if (isComposing.value) {
9
- isComposing.value = false;
10
- nextTick(() => afterComposition(event));
11
- }
12
- };
13
- return [isComposing, compositionStartHandler, compositionEndHandler];
3
+ const isComposing = ref(false);
4
+ const compositionStartHandler = (_) => {
5
+ isComposing.value = true;
6
+ };
7
+ const compositionEndHandler = (event) => {
8
+ if (isComposing.value) {
9
+ isComposing.value = false;
10
+ nextTick(() => afterComposition(event));
11
+ }
12
+ };
13
+ return [
14
+ isComposing,
15
+ compositionStartHandler,
16
+ compositionEndHandler
17
+ ];
14
18
  }
15
- export {
16
- useComposition as u
17
- };
19
+ export { useComposition as t };
@@ -1,6 +1,6 @@
1
1
  import type { Nullish } from 'parsnip-kit';
2
2
  import { type Ref } from 'vue';
3
- export declare const useControlledMode: <T>(field: string, props: Record<string, any>, emits: Function, options?: {
3
+ export declare const useControlledMode: <T extends any, K extends string = string, D extends string | undefined = undefined, const P extends { [key in (K | D) & string]: T | Nullish; } = { [key in (K | D) & string]: T | Nullish; }, const V extends P[K] = P[K]>(field: K, props: P, emits: Function, options?: {
4
4
  transform?: (nextValue: T | Nullish) => T | Nullish;
5
- defaultField?: string;
6
- }) => readonly [Ref<Nullish | T, Nullish | T>, (nextValue: T) => Promise<void>, import("vue").ComputedRef<boolean>];
5
+ defaultField?: D;
6
+ }) => readonly [Ref<Nullish | V, Nullish | V>, (nextValue: V) => Promise<void>, import("vue").ComputedRef<boolean>];
@@ -1,25 +1,22 @@
1
- import { computed, ref, watch, nextTick } from "vue";
1
+ import { computed, nextTick, ref, watch } from "vue";
2
2
  const useControlledMode = (field, props, emits, options) => {
3
- const controlledMode = computed(() => props[field] !== void 0);
4
- const preValue = controlledMode.value ? props[field] : (options == null ? void 0 : options.defaultField) ? props[options.defaultField] : null;
5
- const innerState = ref((options == null ? void 0 : options.transform) ? options == null ? void 0 : options.transform(preValue) : preValue);
6
- const updateState = async (nextValue) => {
7
- if (controlledMode.value) {
8
- emits(`update:${field}`, nextValue);
9
- await nextTick();
10
- innerState.value = (options == null ? void 0 : options.transform) ? options == null ? void 0 : options.transform(props[field]) : props[field];
11
- } else {
12
- innerState.value = (options == null ? void 0 : options.transform) ? options == null ? void 0 : options.transform(nextValue) : nextValue;
13
- }
14
- };
15
- watch(
16
- () => props[field],
17
- (val) => {
18
- innerState.value = (options == null ? void 0 : options.transform) ? options == null ? void 0 : options.transform(val) : val;
19
- }
20
- );
21
- return [innerState, updateState, controlledMode];
22
- };
23
- export {
24
- useControlledMode as u
3
+ const controlledMode = computed(() => props[field] !== void 0);
4
+ const preValue = controlledMode.value ? props[field] : (options === null || options === void 0 ? void 0 : options.defaultField) ? props[options.defaultField] : null;
5
+ const innerState = ref((options === null || options === void 0 ? void 0 : options.transform) ? options === null || options === void 0 ? void 0 : options.transform(preValue) : preValue);
6
+ const updateState = async (nextValue) => {
7
+ if (controlledMode.value) {
8
+ emits(`update:${field}`, nextValue);
9
+ await nextTick();
10
+ innerState.value = (options === null || options === void 0 ? void 0 : options.transform) ? options === null || options === void 0 ? void 0 : options.transform(props[field]) : props[field];
11
+ } else innerState.value = (options === null || options === void 0 ? void 0 : options.transform) ? options === null || options === void 0 ? void 0 : options.transform(nextValue) : nextValue;
12
+ };
13
+ watch(() => props[field], (val) => {
14
+ innerState.value = (options === null || options === void 0 ? void 0 : options.transform) ? options === null || options === void 0 ? void 0 : options.transform(val) : val;
15
+ });
16
+ return [
17
+ innerState,
18
+ updateState,
19
+ controlledMode
20
+ ];
25
21
  };
22
+ export { useControlledMode as t };
@@ -1,68 +1,54 @@
1
- import { ref, onBeforeUnmount, onMounted, computed } from "vue";
2
- import { i as inBrowser } from "../util/env.js";
3
- const observerMap = /* @__PURE__ */ new WeakMap();
4
- const observerCallbacksMap = /* @__PURE__ */ new WeakMap();
5
- const runCallbacks = (observed) => {
6
- return () => {
7
- const list = observerCallbacksMap.get(observed);
8
- list == null ? void 0 : list.forEach((func) => func());
9
- };
1
+ import { t as inBrowser } from "../util/env.js";
2
+ import { computed, onBeforeUnmount, onMounted, ref } from "vue";
3
+ var observerMap = /* @__PURE__ */ new WeakMap();
4
+ var observerCallbacksMap = /* @__PURE__ */ new WeakMap();
5
+ var runCallbacks = (observed) => {
6
+ return () => {
7
+ const list = observerCallbacksMap.get(observed);
8
+ list === null || list === void 0 || list.forEach((func) => func());
9
+ };
10
10
  };
11
11
  const useDarkMode = () => {
12
- const darkMode = ref(false);
13
- const darkModeHtml = ref(void 0);
14
- function handleDarkModeChange(e) {
15
- darkMode.value = e.matches;
16
- }
17
- if (inBrowser()) {
18
- const darkModeQuery = window.matchMedia("(prefers-color-scheme: dark)");
19
- handleDarkModeChange(darkModeQuery);
20
- darkModeQuery.addEventListener("change", handleDarkModeChange);
21
- onBeforeUnmount(() => {
22
- darkModeQuery.removeEventListener("change", handleDarkModeChange);
23
- });
24
- }
25
- const callback = () => {
26
- if (inBrowser()) {
27
- let hasDark = false, hasLight = false;
28
- document.documentElement.className.split(" ").forEach((cls) => {
29
- if (cls === "dark") {
30
- hasDark = true;
31
- }
32
- if (cls === "light") {
33
- hasLight = true;
34
- }
35
- });
36
- darkModeHtml.value = hasDark ? true : hasLight ? false : void 0;
37
- }
38
- };
39
- if (inBrowser()) {
40
- onMounted(() => {
41
- const observer = observerMap.get(document.documentElement) || new MutationObserver(runCallbacks(document.documentElement));
42
- observerMap.set(document.documentElement, observer);
43
- observer.observe(document.documentElement, {
44
- attributes: true,
45
- attributeFilter: ["class"]
46
- });
47
- observerCallbacksMap.set(document.documentElement, [
48
- ...observerCallbacksMap.get(document.documentElement) || [],
49
- callback
50
- ]);
51
- callback();
52
- });
53
- onBeforeUnmount(() => {
54
- observerCallbacksMap.set(
55
- document.documentElement,
56
- (observerCallbacksMap.get(document.documentElement) || []).filter(
57
- (func) => func !== callback
58
- )
59
- );
60
- });
61
- }
62
- return computed(() => {
63
- return darkModeHtml.value ?? darkMode.value;
64
- });
65
- };
66
- export {
67
- useDarkMode as u
12
+ const darkMode = ref(false);
13
+ const darkModeHtml = ref(void 0);
14
+ function handleDarkModeChange(e) {
15
+ darkMode.value = e.matches;
16
+ }
17
+ if (inBrowser()) {
18
+ const darkModeQuery = window.matchMedia("(prefers-color-scheme: dark)");
19
+ handleDarkModeChange(darkModeQuery);
20
+ darkModeQuery.addEventListener("change", handleDarkModeChange);
21
+ onBeforeUnmount(() => {
22
+ darkModeQuery.removeEventListener("change", handleDarkModeChange);
23
+ });
24
+ }
25
+ const callback = () => {
26
+ if (inBrowser()) {
27
+ let hasDark = false, hasLight = false;
28
+ document.documentElement.className.split(" ").forEach((cls) => {
29
+ if (cls === "dark") hasDark = true;
30
+ if (cls === "light") hasLight = true;
31
+ });
32
+ darkModeHtml.value = hasDark ? true : hasLight ? false : void 0;
33
+ }
34
+ };
35
+ if (inBrowser()) {
36
+ onMounted(() => {
37
+ const observer = observerMap.get(document.documentElement) || new MutationObserver(runCallbacks(document.documentElement));
38
+ observerMap.set(document.documentElement, observer);
39
+ observer.observe(document.documentElement, {
40
+ attributes: true,
41
+ attributeFilter: ["class"]
42
+ });
43
+ observerCallbacksMap.set(document.documentElement, [...observerCallbacksMap.get(document.documentElement) || [], callback]);
44
+ callback();
45
+ });
46
+ onBeforeUnmount(() => {
47
+ observerCallbacksMap.set(document.documentElement, (observerCallbacksMap.get(document.documentElement) || []).filter((func) => func !== callback));
48
+ });
49
+ }
50
+ return computed(() => {
51
+ return darkModeHtml.value ?? darkMode.value;
52
+ });
68
53
  };
54
+ export { useDarkMode as t };
@@ -1,2 +1,3 @@
1
- export declare const useIndexOfChildren: (eventBusKey: string) => readonly [import("vue").Ref<number, number>, import("vue").Ref<boolean, boolean>, import("vue").Ref<boolean, boolean>];
1
+ import { type ComponentInternalInstance } from 'vue';
2
+ export declare const useIndexOfChildren: (eventBusKey: string, elGetter?: (instance: ComponentInternalInstance | null) => HTMLElement | null) => readonly [import("vue").Ref<number, number>, import("vue").Ref<boolean, boolean>, import("vue").Ref<boolean, boolean>];
2
3
  export declare const emitParentUpdate: (eventBusKey: string) => void;