@pixelium/web-vue 0.0.2 → 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.
- package/README.md +42 -0
- package/README.zh.md +6 -3
- package/coverage/base.css +224 -0
- package/coverage/block-navigation.js +87 -0
- package/coverage/coverage-final.json +106 -0
- package/coverage/favicon.png +0 -0
- package/coverage/index.html +926 -0
- package/coverage/prettify.css +1 -0
- package/coverage/prettify.js +2 -0
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +210 -0
- package/dist/font.css +1 -1
- package/dist/index.d.ts +1593 -248
- package/dist/normalize.css +2 -0
- package/dist/pixelium-vue-icon-hn.cjs +1 -1
- package/dist/pixelium-vue-icon-hn.css +2 -1
- package/dist/pixelium-vue-icon-hn.js +8533 -8154
- package/dist/pixelium-vue-icon-hn.umd.cjs +1 -1
- package/dist/pixelium-vue-icon-pa.cjs +1 -1
- package/dist/pixelium-vue-icon-pa.css +2 -1
- package/dist/pixelium-vue-icon-pa.js +10625 -10143
- package/dist/pixelium-vue-icon-pa.umd.cjs +1 -1
- package/dist/pixelium-vue.cjs +2 -2
- package/dist/pixelium-vue.css +2 -1
- package/dist/pixelium-vue.js +7402 -5852
- package/dist/pixelium-vue.umd.cjs +2 -2
- package/es/aside/index.js +46 -151
- package/es/auto-complete/draw.d.ts +1 -1
- package/es/auto-complete/draw.js +26 -51
- package/es/auto-complete/index.css +92 -32
- package/es/auto-complete/index.d.ts +12 -15
- package/es/auto-complete/index.js +338 -400
- package/es/auto-complete/type.d.ts +25 -13
- package/es/avatar/css.js +2 -0
- package/es/avatar/draw.d.ts +2 -0
- package/es/avatar/draw.js +11 -0
- package/es/avatar/index.css +49 -0
- package/es/avatar/index.d.ts +15 -0
- package/es/avatar/index.js +110 -0
- package/es/avatar/type.d.ts +34 -0
- package/es/button/draw.d.ts +4 -4
- package/es/button/draw.js +213 -297
- package/es/button/index.css +40 -30
- package/es/button/index.d.ts +0 -4
- package/es/button/index.js +230 -256
- package/es/button/type.d.ts +3 -3
- package/es/button-group/index.css +0 -3
- package/es/button-group/index.d.ts +1 -2
- package/es/button-group/index.js +59 -31
- package/es/button-group/type.d.ts +21 -4
- package/es/checkbox/css.js +2 -0
- package/es/checkbox/draw.d.ts +4 -0
- package/es/checkbox/draw.js +46 -0
- package/es/checkbox/index.css +85 -0
- package/es/checkbox/index.d.ts +31 -0
- package/es/checkbox/index.js +206 -0
- package/es/checkbox/type.d.ts +88 -0
- package/es/checkbox-group/css.js +2 -0
- package/es/checkbox-group/index.css +20 -0
- package/es/checkbox-group/index.d.ts +23 -0
- package/es/checkbox-group/index.js +84 -0
- package/es/checkbox-group/type.d.ts +78 -0
- package/es/col/index.d.ts +2 -2
- package/es/col/index.js +43 -58
- package/es/container/index.js +18 -31
- package/es/divider/index.js +39 -53
- package/es/empty/index.css +4 -4
- package/es/empty/index.js +16 -71
- package/es/entry.js +102 -0
- package/es/footer/index.js +31 -40
- package/es/form/css.js +1 -0
- package/es/form/index.d.ts +27 -0
- package/es/form/index.js +125 -0
- package/es/form/type.d.ts +238 -0
- package/es/form/use-form.d.ts +4 -0
- package/es/form/use-form.js +48 -0
- package/es/form-item/css.js +2 -0
- package/es/form-item/index.css +77 -0
- package/es/form-item/index.d.ts +37 -0
- package/es/form-item/index.js +318 -0
- package/es/form-item/type.d.ts +96 -0
- package/es/grid/index.js +56 -75
- package/es/grid-item/css.js +0 -1
- package/es/grid-item/index.d.ts +1 -1
- package/es/grid-item/index.js +85 -121
- package/es/header/index.js +31 -40
- package/es/icon/index.js +44 -55
- package/es/icons/css-hn.js +0 -1
- package/es/icons/css-pa.js +0 -1
- package/es/icons/icon-hn.js +10337 -15986
- package/es/icons/icon-pa.js +12573 -17447
- package/es/image/css.js +2 -0
- package/es/image/index.css +69 -0
- package/es/image/index.d.ts +35 -0
- package/es/image/index.js +199 -0
- package/es/image/type.d.ts +126 -0
- package/es/index.css +1 -515
- package/es/index.d.ts +22 -2
- package/es/index.js +143 -123
- package/es/input/draw.d.ts +1 -1
- package/es/input/draw.js +26 -51
- package/es/input/index.css +85 -33
- package/es/input/index.d.ts +9 -16
- package/es/input/index.js +319 -423
- package/es/input/type.d.ts +3 -3
- package/es/input-group/index.css +0 -1
- package/es/input-group/index.d.ts +2 -2
- package/es/input-group/index.js +66 -37
- package/es/input-group/type.d.ts +16 -4
- package/es/input-group-label/draw.d.ts +1 -1
- package/es/input-group-label/draw.js +26 -51
- package/es/input-group-label/index.css +33 -22
- package/es/input-group-label/index.d.ts +1 -4
- package/es/input-group-label/index.js +104 -127
- package/es/input-group-label/type.d.ts +3 -3
- package/es/input-number/draw.d.ts +1 -1
- package/es/input-number/draw.js +26 -51
- package/es/input-number/index.css +90 -35
- package/es/input-number/index.d.ts +9 -16
- package/es/input-number/index.js +428 -536
- package/es/input-number/type.d.ts +3 -3
- package/es/input-tag/draw.d.ts +1 -1
- package/es/input-tag/draw.js +26 -48
- package/es/input-tag/index.css +100 -33
- package/es/input-tag/index.d.ts +7 -13
- package/es/input-tag/index.js +442 -467
- package/es/input-tag/type.d.ts +24 -13
- package/es/link/index.js +75 -106
- package/es/main/index.js +11 -15
- package/es/mask/index.js +94 -115
- package/es/message/index.css +1 -1
- package/es/message/index.js +168 -346
- package/es/message-box/css.js +1 -1
- package/es/message-box/index.js +98 -114
- package/es/message-box/message-box-wrapped.js +33 -46
- package/es/message-box/message-box.js +79 -111
- package/es/option-list/index.css +13 -13
- package/es/option-list/index.d.ts +4 -31
- package/es/option-list/index.js +99 -167
- package/es/option-list/type.d.ts +5 -1
- package/es/pixelate/pixel.d.ts +5 -0
- package/es/pixelate/pixel.js +70 -0
- package/es/pixelate/pixelate.worker.d.ts +1 -0
- package/es/popover/index.d.ts +13 -99
- package/es/popover/index.js +75 -238
- package/es/popover/type.d.ts +7 -2
- package/es/popup/css.js +1 -0
- package/es/popup/index.d.ts +210 -0
- package/es/popup/index.js +203 -0
- package/es/popup/type.d.ts +105 -0
- package/es/popup-content/draw.d.ts +2 -2
- package/es/popup-content/draw.js +98 -143
- package/es/popup-content/index.css +11 -11
- package/es/popup-content/index.d.ts +1 -0
- package/es/popup-content/index.js +253 -1576
- package/es/popup-content/type.d.ts +1 -0
- package/es/popup-trigger/index.d.ts +8 -2
- package/es/popup-trigger/index.js +122 -95
- package/es/popup-trigger/type.d.ts +4 -1
- package/es/popup-wrapper/css.js +2 -0
- package/es/popup-wrapper/index.css +14 -0
- package/es/popup-wrapper/index.d.ts +18 -0
- package/es/popup-wrapper/index.js +67 -0
- package/es/popup-wrapper/type.d.ts +9 -0
- package/es/radio/css.js +1 -0
- package/es/radio/draw.d.ts +4 -0
- package/es/radio/draw.js +47 -0
- package/es/radio/index.d.ts +30 -0
- package/es/radio/index.js +190 -0
- package/es/radio/style.css +73 -0
- package/es/radio/type.d.ts +76 -0
- package/es/radio-group/css.js +2 -0
- package/es/radio-group/index.css +20 -0
- package/es/radio-group/index.d.ts +23 -0
- package/es/radio-group/index.js +77 -0
- package/es/radio-group/type.d.ts +77 -0
- package/es/row/index.js +56 -70
- package/es/select/draw.d.ts +1 -1
- package/es/select/draw.js +26 -51
- package/es/select/index.css +118 -36
- package/es/select/index.d.ts +14 -16
- package/es/select/index.js +625 -672
- package/es/select/type.d.ts +60 -25
- package/es/share/const/event-bus-key.js +1 -6
- package/es/share/const/index.d.ts +4 -0
- package/es/share/const/index.js +22 -24
- package/es/share/const/provide-key.d.ts +5 -0
- package/es/share/const/provide-key.js +6 -5
- package/es/share/const/style.d.ts +6 -0
- package/es/share/const/style.js +7 -0
- package/es/share/hook/use-cancelable-delay.d.ts +1 -0
- package/es/share/hook/use-cancelable-delay.js +42 -0
- package/es/share/hook/use-click-outside-listener.d.ts +1 -1
- package/es/share/hook/use-click-outside-listener.js +28 -41
- package/es/share/hook/use-composition.js +17 -15
- package/es/share/hook/use-controlled-mode.d.ts +3 -3
- package/es/share/hook/use-controlled-mode.js +20 -23
- package/es/share/hook/use-dark-mode.js +51 -65
- package/es/share/hook/use-index-of-children.d.ts +2 -1
- package/es/share/hook/use-index-of-children.js +47 -45
- package/es/share/hook/use-lazy-load.d.ts +10 -0
- package/es/share/hook/use-lazy-load.js +133 -0
- package/es/share/hook/use-props-detect.d.ts +2 -0
- package/es/share/hook/use-resize-observer.d.ts +1 -2
- package/es/share/hook/use-resize-observer.js +28 -20
- package/es/share/hook/use-screen-width.js +27 -36
- package/es/share/hook/use-smooth-transition.d.ts +2 -0
- package/es/share/hook/use-smooth-transition.js +65 -0
- package/es/share/hook/use-textarea-height.js +86 -92
- package/es/share/hook/use-theme-mode.js +41 -42
- package/es/share/hook/use-transition-end.d.ts +2 -0
- package/es/share/hook/use-transition-end.js +12 -0
- package/es/share/hook/use-watch-global-css-var.js +12 -16
- package/es/share/hook/use-window-resize-listener.d.ts +1 -0
- package/es/share/hook/use-window-resize-listener.js +15 -0
- package/es/share/hook/use-z-index.js +30 -27
- package/es/share/type/index.d.ts +18 -3
- package/es/share/util/color.d.ts +5 -3
- package/es/share/util/color.js +156 -149
- package/es/share/util/common.d.ts +7 -2
- package/es/share/util/common.js +127 -65
- package/es/share/util/console.d.ts +3 -3
- package/es/share/util/console.js +10 -7
- package/es/share/util/dom.d.ts +19 -0
- package/es/share/util/dom.js +88 -0
- package/es/share/util/env.d.ts +1 -0
- package/es/share/util/env.js +5 -4
- package/es/share/util/event-bus.js +3 -20
- package/es/share/util/lru-cache.js +29 -33
- package/es/share/util/pixel.d.ts +4 -0
- package/es/share/util/plot.d.ts +8 -3
- package/es/share/util/plot.js +457 -229
- package/es/share/util/reactivity.d.ts +8 -0
- package/es/share/util/reactivity.js +23 -0
- package/es/share/util/render.js +31 -41
- package/es/share/util/theme.d.ts +3 -0
- package/es/share/util/theme.js +77 -57
- package/es/slider/css.js +2 -0
- package/es/slider/draw.d.ts +25 -0
- package/es/slider/draw.js +113 -0
- package/es/slider/index.css +119 -0
- package/es/slider/index.d.ts +66 -0
- package/es/slider/index.js +503 -0
- package/es/slider/type.d.ts +162 -0
- package/es/slider/util.d.ts +37 -0
- package/es/slider/util.js +130 -0
- package/es/space/index.css +24 -29
- package/es/space/index.js +73 -97
- package/es/spin/index.css +18 -17
- package/es/spin/index.js +72 -102
- package/es/spin/type.d.ts +11 -5
- package/es/switch/css.js +2 -0
- package/es/switch/draw.d.ts +2 -0
- package/es/switch/draw.js +18 -0
- package/es/switch/index.css +121 -0
- package/es/switch/index.d.ts +42 -0
- package/es/switch/index.js +259 -0
- package/es/switch/type.d.ts +133 -0
- package/es/tag/draw.d.ts +2 -2
- package/es/tag/draw.js +80 -127
- package/es/tag/index.css +38 -22
- package/es/tag/index.d.ts +2 -2
- package/es/tag/index.js +121 -190
- package/es/tag/type.d.ts +3 -3
- package/es/text-outline/css.js +2 -0
- package/es/text-outline/index.css +4 -0
- package/es/text-outline/index.d.ts +17 -0
- package/es/text-outline/index.js +33 -0
- package/es/text-outline/type.d.ts +23 -0
- package/es/textarea/draw.js +9 -11
- package/es/textarea/index.css +37 -23
- package/es/textarea/index.d.ts +8 -14
- package/es/textarea/index.js +274 -262
- package/es/tooltip/index.d.ts +100 -4
- package/es/tooltip/index.js +70 -226
- package/es/tooltip/type.d.ts +7 -2
- package/es/vendor.js +504 -0
- package/es/virtual-list/css.js +2 -0
- package/es/virtual-list/index.css +25 -0
- package/es/virtual-list/index.d.ts +11 -0
- package/es/virtual-list/index.js +313 -0
- package/es/virtual-list/type.d.ts +26 -0
- package/package.json +10 -16
- package/es/grid-item/index.css +0 -0
- /package/es/message-box/{message-box.css → index.css} +0 -0
package/es/select/type.d.ts
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
|
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} [
|
|
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 {
|
|
106
|
-
* @version 0.0.
|
|
103
|
+
* @property {boolean} [virtualScroll=false]
|
|
104
|
+
* @version 0.0.3
|
|
107
105
|
*/
|
|
108
|
-
|
|
106
|
+
virtualScroll?: boolean;
|
|
109
107
|
/**
|
|
110
|
-
* @property {
|
|
111
|
-
* @version 0.0.
|
|
108
|
+
* @property {Omit<VirtualListProps, 'list' | 'fixedHeight'>} [virtualListProps]
|
|
109
|
+
* @version 0.0.3
|
|
112
110
|
*/
|
|
113
|
-
|
|
111
|
+
virtualListProps?: Omit<VirtualListProps, 'list' | 'fixedHeight'>;
|
|
114
112
|
/**
|
|
115
|
-
* @property {
|
|
116
|
-
* @version 0.0.
|
|
113
|
+
* @property {Omit<TagProps, 'size' | 'disabled' | 'closable'> & EmitEvent<TagEvents>} [tagProps]
|
|
114
|
+
* @version 0.0.3
|
|
117
115
|
*/
|
|
118
|
-
|
|
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 {'
|
|
126
|
-
* @version 0.0.
|
|
123
|
+
* @property {'rect' | 'round'} [shape='rect']
|
|
124
|
+
* @version 0.0.3
|
|
127
125
|
*/
|
|
128
|
-
shape?: '
|
|
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
|
-
* @
|
|
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";
|
package/es/share/const/index.js
CHANGED
|
@@ -1,30 +1,28 @@
|
|
|
1
1
|
const TRANSPARENT_RGBA_COLOR_OBJECT = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
r: 0,
|
|
3
|
+
g: 0,
|
|
4
|
+
b: 0,
|
|
5
|
+
a: 0
|
|
6
6
|
};
|
|
7
7
|
const COVER_Z_INDEX = 20;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
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
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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,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 {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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 {
|
|
1
|
+
import { nextTick, ref } from "vue";
|
|
2
2
|
function useComposition({ afterComposition }) {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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:
|
|
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?:
|
|
6
|
-
}) => readonly [Ref<Nullish |
|
|
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
|
|
1
|
+
import { computed, nextTick, ref, watch } from "vue";
|
|
2
2
|
const useControlledMode = (field, props, emits, options) => {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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 {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
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
|
-
|
|
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;
|