@pixelium/web-vue 0.0.3-alpha → 0.0.3

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.
@@ -0,0 +1,308 @@
1
+ import type { ButtonEvents, ButtonProps } from '../button/type';
2
+ import type { MaskProps } from '../mask/type';
3
+ import type { EmitEvent, RestAttrs, ValidContent, ValidVNodeContent } from '../share/type';
4
+ export type DialogOptions = {
5
+ /**
6
+ * @property {ValidContent} content
7
+ * @version 0.0.4
8
+ */
9
+ content: ValidContent;
10
+ /**
11
+ * @property {ValidContent} [title]
12
+ * @version 0.0.4
13
+ */
14
+ title?: ValidContent;
15
+ /**
16
+ * @property {ValidVNodeContent} [icon]
17
+ * @version 0.0.4
18
+ */
19
+ icon?: ValidVNodeContent;
20
+ /**
21
+ * @property {ValidVNodeContent} [footer]
22
+ * @version 0.0.4
23
+ */
24
+ footer?: ValidVNodeContent;
25
+ /**
26
+ * @property {'info' | 'success' | 'warning' | 'error' | 'normal' | 'confirm'} [type='normal']
27
+ * @version 0.0.4
28
+ */
29
+ type?: 'info' | 'success' | 'warning' | 'error' | 'normal' | 'confirm';
30
+ /**
31
+ * @property {boolean} [closable=true]
32
+ * @version 0.0.4
33
+ */
34
+ closable?: boolean;
35
+ /**
36
+ * @property {boolean} [mask=true]
37
+ * @version 0.0.4
38
+ */
39
+ mask?: boolean;
40
+ /**
41
+ * @property {boolean} [maskClosable=true]
42
+ * @version 0.0.4
43
+ */
44
+ maskClosable?: boolean;
45
+ /**
46
+ * @property {boolean} [escToClose=true]
47
+ * @version 0.0.4
48
+ */
49
+ escToClose?: boolean;
50
+ /**
51
+ * @property {boolean} [showCancel]
52
+ * @version 0.0.4
53
+ */
54
+ showCancel?: boolean;
55
+ /**
56
+ * @property {string} [okText]
57
+ * @version 0.0.4
58
+ */
59
+ okText?: string;
60
+ /**
61
+ * @property {string} [cancelText]
62
+ * @version 0.0.4
63
+ */
64
+ cancelText?: string;
65
+ /**
66
+ * @property {boolean} [showFooter=true]
67
+ * @version 0.0.4
68
+ */
69
+ showFooter?: boolean;
70
+ /**
71
+ * @property {number} [zIndex]
72
+ * @version 0.0.4
73
+ */
74
+ zIndex?: number;
75
+ /**
76
+ * @property {string | HTMLElement} [root='body']
77
+ * @version 0.0.4
78
+ */
79
+ root?: string | HTMLElement;
80
+ /**
81
+ * @property {ButtonProps & EmitEvent<ButtonEvents> & RestAttrs} [okButtonProps]
82
+ * @version 0.0.4
83
+ */
84
+ okButtonProps?: ButtonProps & EmitEvent<ButtonEvents> & RestAttrs;
85
+ /**
86
+ * @property {ButtonProps & EmitEvent<ButtonEvents> & RestAttrs} [cancelButtonProps]
87
+ * @version 0.0.4
88
+ */
89
+ cancelButtonProps?: ButtonProps & EmitEvent<ButtonEvents> & RestAttrs;
90
+ /**
91
+ * @property {Omit<MaskProps, 'zIndex'>} [maskProps]
92
+ * @version 0.0.4
93
+ */
94
+ maskProps?: Omit<MaskProps, 'zIndex'>;
95
+ /**
96
+ * @property {RestAttrs} [containerProps]
97
+ * @version 0.0.4
98
+ */
99
+ containerProps?: RestAttrs;
100
+ /**
101
+ * @property {RestAttrs} [headerProps]
102
+ * @version 0.0.4
103
+ */
104
+ headerProps?: RestAttrs;
105
+ /**
106
+ * @property {RestAttrs} [bodyProps]
107
+ * @version 0.0.4
108
+ */
109
+ bodyProps?: RestAttrs;
110
+ /**
111
+ * @property {RestAttrs} [footerProps]
112
+ * @version 0.0.4
113
+ */
114
+ footerProps?: RestAttrs;
115
+ };
116
+ export type DialogProps = {
117
+ /**
118
+ * @property {boolean | null} [visible]
119
+ * @version 0.0.4
120
+ */
121
+ visible?: boolean | null;
122
+ /**
123
+ * @property {boolean | null} [visible]
124
+ * @version 0.0.4
125
+ */
126
+ defaultVisible?: boolean | null;
127
+ /**
128
+ * @property {string} [title='']
129
+ * @version 0.0.4
130
+ */
131
+ title?: string;
132
+ /**
133
+ * @property {boolean} [closable=true]
134
+ * @version 0.0.4
135
+ */
136
+ closable?: boolean;
137
+ /**
138
+ * @property {boolean} [mask=true]
139
+ * @version 0.0.4
140
+ */
141
+ mask?: boolean;
142
+ /**
143
+ * @property {boolean} [maskClosable=true]
144
+ * @version 0.0.4
145
+ */
146
+ maskClosable?: boolean;
147
+ /**
148
+ * @property {boolean} [escToClose=true]
149
+ * @version 0.0.4
150
+ */
151
+ escToClose?: boolean;
152
+ /**
153
+ * @property {boolean} [showCancel=true]
154
+ * @version 0.0.4
155
+ */
156
+ showCancel?: boolean;
157
+ /**
158
+ * @property {string} [okText]
159
+ * @version 0.0.4
160
+ */
161
+ okText?: string;
162
+ /**
163
+ * @property {string} [cancelText]
164
+ * @version 0.0.4
165
+ */
166
+ cancelText?: string;
167
+ /**
168
+ * @property {boolean} [boolean=false]
169
+ * @version 0.0.4
170
+ */
171
+ loading?: boolean;
172
+ /**
173
+ * @property {boolean} [showFooter=true]
174
+ * @version 0.0.4
175
+ */
176
+ showFooter?: boolean;
177
+ /**
178
+ * @property {string | HTMLElement} [root='body']
179
+ * @version 0.0.4
180
+ */
181
+ root?: string | HTMLElement;
182
+ /**
183
+ * @property {number} [zIndex]
184
+ * @version 0.0.4
185
+ */
186
+ zIndex?: number;
187
+ /**
188
+ * @property {boolean} [destroyOnHide=false]
189
+ * @version 0.0.4
190
+ */
191
+ destroyOnHide?: boolean;
192
+ /**
193
+ * @property {ButtonProps & EmitEvent<ButtonEvents> & RestAttrs} [okButtonProps]
194
+ * @version 0.0.4
195
+ */
196
+ okButtonProps?: ButtonProps & EmitEvent<ButtonEvents> & RestAttrs;
197
+ /**
198
+ * @property {ButtonProps & EmitEvent<ButtonEvents> & RestAttrs} [cancelButtonProps]
199
+ * @version 0.0.4
200
+ */
201
+ cancelButtonProps?: ButtonProps & EmitEvent<ButtonEvents> & RestAttrs;
202
+ /**
203
+ * @property {Omit<MaskProps, 'zIndex'>} [maskProps]
204
+ * @version 0.0.4
205
+ */
206
+ maskProps?: Omit<MaskProps, 'zIndex'>;
207
+ /**
208
+ * @property {RestAttrs} [containerProps]
209
+ * @version 0.0.4
210
+ */
211
+ containerProps?: RestAttrs;
212
+ /**
213
+ * @property {RestAttrs} [headerProps]
214
+ * @version 0.0.4
215
+ */
216
+ headerProps?: RestAttrs;
217
+ /**
218
+ * @property {RestAttrs} [bodyProps]
219
+ * @version 0.0.4
220
+ */
221
+ bodyProps?: RestAttrs;
222
+ /**
223
+ * @property {RestAttrs} [footerProps]
224
+ * @version 0.0.4
225
+ */
226
+ footerProps?: RestAttrs;
227
+ };
228
+ export type DialogSlots = {
229
+ /**
230
+ * @slot default
231
+ * @version 0.0.4
232
+ */
233
+ default: {};
234
+ /**
235
+ * @slot title
236
+ * @version 0.0.4
237
+ */
238
+ title: {};
239
+ /**
240
+ * @slot icon
241
+ * @version 0.0.4
242
+ */
243
+ icon: {};
244
+ /**
245
+ * @slot footer
246
+ * @version 0.0.4
247
+ */
248
+ footer: {};
249
+ };
250
+ export type DialogEvents = {
251
+ /**
252
+ * @event update:visible
253
+ * @version 0.0.4
254
+ */
255
+ 'update:visible': [visible: boolean];
256
+ /**
257
+ * @event beforeOk
258
+ * @version 0.0.4
259
+ */
260
+ beforeOk: [];
261
+ /**
262
+ * @event ok
263
+ * @param {MouseEvent} event
264
+ * @version 0.0.4
265
+ */
266
+ ok: [event: MouseEvent];
267
+ /**
268
+ * @event cancel
269
+ * @param {MouseEvent | KeyboardEvent} event
270
+ * @version 0.0.4
271
+ */
272
+ cancel: [event: MouseEvent | KeyboardEvent];
273
+ /**
274
+ * @event open
275
+ * @version 0.0.4
276
+ */
277
+ open: [];
278
+ /**
279
+ * @event afterOpen
280
+ * @version 0.0.4
281
+ */
282
+ afterOpen: [];
283
+ /**
284
+ * @event close
285
+ * @version 0.0.4
286
+ */
287
+ close: [];
288
+ /**
289
+ * @event afterClose
290
+ * @version 0.0.4
291
+ */
292
+ afterClose: [];
293
+ };
294
+ export type DialogExpose = {
295
+ /**
296
+ * @property {() => void} close
297
+ * @version 0.0.4
298
+ */
299
+ close: () => void;
300
+ /**
301
+ * @property {() => void} open
302
+ * @version 0.0.4
303
+ */
304
+ open: () => void;
305
+ };
306
+ export type DialogReturn = Promise<boolean> & {
307
+ close: () => void;
308
+ };
@@ -58,9 +58,6 @@
58
58
  min-height: var(--px-medium-size);
59
59
  font-size: 14px;
60
60
  }
61
- .px-form-item-content > *:first-child {
62
- flex-grow: 1;
63
- }
64
61
  .px-form-item-content__large {
65
62
  min-height: var(--px-large-size);
66
63
  font-size: 15px;
@@ -12,6 +12,7 @@
12
12
  height: var(--input-size);
13
13
  cursor: text;
14
14
  transition: 0.25s all;
15
+ flex-grow: 1;
15
16
  }
16
17
  .px-input-inner {
17
18
  height: 100%;
@@ -11,6 +11,7 @@
11
11
  box-sizing: border-box;
12
12
  height: var(--input-number-size);
13
13
  transition: 0.25s;
14
+ flex-grow: 1;
14
15
  }
15
16
  .px-input-number-inner {
16
17
  height: 100%;
@@ -11,6 +11,7 @@
11
11
  box-sizing: border-box;
12
12
  cursor: text;
13
13
  transition: 0.25s;
14
+ flex-grow: 1;
14
15
  }
15
16
  .px-input-tag.px-input-tag__small {
16
17
  padding-right: 8px;
@@ -43,7 +43,7 @@ var MessageManager = class {
43
43
  unmount() {
44
44
  if (this.container) {
45
45
  const container = this.container;
46
- render(this.messageBox, container);
46
+ render(null, container);
47
47
  nextTick(() => {
48
48
  container.remove();
49
49
  this.container = null;
@@ -0,0 +1,15 @@
1
+ import type { PopupPortalProps } from './type';
2
+ declare var __VLS_6: {};
3
+ type __VLS_Slots = {} & {
4
+ default?: (props: typeof __VLS_6) => any;
5
+ };
6
+ declare const __VLS_component: import("vue").DefineComponent<PopupPortalProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<PopupPortalProps> & Readonly<{}>, {
7
+ root: HTMLElement | string;
8
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
10
+ export default _default;
11
+ type __VLS_WithSlots<T, S> = T & {
12
+ new (): {
13
+ $slots: S;
14
+ };
15
+ };
@@ -0,0 +1,3 @@
1
+ export type PopupPortalProps = {
2
+ root?: HTMLElement | string;
3
+ };
@@ -0,0 +1 @@
1
+ export declare const usePopupWrapperManager: (id: string) => readonly [() => void, () => void];
@@ -12,6 +12,7 @@
12
12
  min-height: var(--select-size);
13
13
  cursor: text;
14
14
  transition: 0.25s;
15
+ flex-grow: 1;
15
16
  }
16
17
  .px-select.px-select__small {
17
18
  padding-right: 8px;
@@ -0,0 +1,2 @@
1
+ import { type WatchSource } from 'vue';
2
+ export declare const usePolling: (watchTarge: WatchSource<any>, callback: Function) => void;
@@ -0,0 +1,46 @@
1
+ // Generated by dts-bundle-generator v9.5.1
2
+
3
+ import { Emitter } from 'mitt';
4
+
5
+ declare const _default: {
6
+ dialog: {
7
+ confirm: string;
8
+ cancel: string;
9
+ infoTitle: string;
10
+ successTitle: string;
11
+ warningTitle: string;
12
+ errorTitle: string;
13
+ confirmTitle: string;
14
+ };
15
+ };
16
+ export type DeepPartial<T> = {
17
+ [K in keyof T]?: T[K] extends object ? DeepPartial<T[K]> : T[K];
18
+ };
19
+ export type Events = {
20
+ "lang-change": string;
21
+ };
22
+ export type LangMessages = typeof _default;
23
+ declare class LocaleManager {
24
+ private currentLang;
25
+ private emitter;
26
+ constructor();
27
+ getCurrentLang(): string;
28
+ setLocale(lang: string): void;
29
+ addMessages(lang: string, msg: DeepPartial<LangMessages>): void;
30
+ t(path: string, fallback?: string): string;
31
+ getMessages(lang: string): LangMessages;
32
+ getEmitter(): Emitter<Events>;
33
+ }
34
+ declare const localeManager: LocaleManager;
35
+ export declare const t: (path: string, fallback?: string) => string;
36
+ export declare function useLocale(): readonly [
37
+ (path: string, fallback?: string) => string,
38
+ (lang: string) => void,
39
+ import("vue").Ref<string, string>
40
+ ];
41
+
42
+ export {
43
+ localeManager as locale,
44
+ };
45
+
46
+ export {};
@@ -22,6 +22,9 @@
22
22
  cursor: pointer;
23
23
  transition: 0.25s;
24
24
  }
25
+ .px-slider__horizontal {
26
+ flex-grow: 1;
27
+ }
25
28
  .px-slider__horizontal.px-slider__reverse .px-slider-mark {
26
29
  left: auto;
27
30
  transform: translate(50%, -50%);
@@ -10,6 +10,7 @@
10
10
  display: flex;
11
11
  box-sizing: border-box;
12
12
  transition: 0.25s;
13
+ flex-grow: 1;
13
14
  }
14
15
  .px-textarea.px-textarea__small {
15
16
  font-size: 12px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pixelium/web-vue",
3
- "version": "0.0.3-alpha",
3
+ "version": "0.0.3",
4
4
  "type": "module",
5
5
  "main": "./dist/pixelium-vue.js",
6
6
  "exports": {