poe-svelte-ui-lib 2.6.0 → 2.7.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.
- package/README.md +12 -175
- package/dist/Accordion/Accordion.svelte +27 -6
- package/dist/Accordion/AccordionProps.svelte +13 -0
- package/dist/Accordion/README.md +39 -14
- package/dist/Button/Button.svelte +30 -12
- package/dist/Button/README.md +26 -14
- package/dist/CommonSnippets.svelte +2 -2
- package/dist/Divider/Divider.svelte +7 -5
- package/dist/Divider/DividerProps.svelte +8 -1
- package/dist/Divider/README.md +10 -8
- package/dist/Dropdown/Dropdown.svelte +212 -0
- package/dist/Dropdown/Dropdown.svelte.d.ts +4 -0
- package/dist/Dropdown/README.md +105 -0
- package/dist/ExpandIcon.svelte +6 -3
- package/dist/ExpandIcon.svelte.d.ts +1 -0
- package/dist/FieldLabel.svelte +3 -1
- package/dist/FileAttach/FileAttach.svelte +23 -9
- package/dist/FileAttach/FileAttach.svelte.d.ts +23 -2
- package/dist/FileAttach/README.md +18 -15
- package/dist/Graph/README.md +10 -10
- package/dist/Input/Input.svelte +34 -11
- package/dist/Input/Input.svelte.d.ts +3 -1
- package/dist/Input/README.md +21 -3
- package/dist/Joystick/README.md +13 -13
- package/dist/Loader/Loader.svelte +21 -0
- package/dist/Loader/Loader.svelte.d.ts +8 -0
- package/dist/Loader/README.md +35 -0
- package/dist/PeriodChart/README.md +2 -2
- package/dist/ProgressBar/README.md +13 -13
- package/dist/Select/README.md +39 -26
- package/dist/Select/Select.svelte +84 -22
- package/dist/Slider/README.md +15 -15
- package/dist/Switch/README.md +16 -16
- package/dist/Switch/Switch.svelte +6 -2
- package/dist/Table/README.md +29 -22
- package/dist/Tabs/README.md +21 -19
- package/dist/Tabs/Tabs.svelte +18 -8
- package/dist/Tabs/TabsProps.svelte +7 -0
- package/dist/TextsEditor.svelte +1 -9
- package/dist/VideoViewer/README.md +13 -13
- package/dist/WidgetMap/mission/MapAgro.svelte +2 -2
- package/dist/WidgetWiFi/WidgetWiFi.svelte +3 -3
- package/dist/defaults.js +3 -2
- package/dist/hints.js +2 -5
- package/dist/index.d.ts +17 -1
- package/dist/index.js +17 -0
- package/dist/locales/constructor.d.ts +30 -0
- package/dist/locales/constructor.js +18 -12
- package/dist/options.d.ts +32 -0
- package/dist/options.js +11 -0
- package/dist/popup.d.ts +25 -0
- package/dist/popup.js +22 -0
- package/dist/protocols/PROTOCOL.md +1 -1
- package/dist/types.d.ts +57 -4
- package/package.json +1 -1
- package/dist/WidgetMap/mission/SpinnerIcon.svelte +0 -9
- package/dist/WidgetMap/mission/SpinnerIcon.svelte.d.ts +0 -18
- package/dist/WidgetWiFi/LoaderIcon.svelte +0 -5
- package/dist/WidgetWiFi/LoaderIcon.svelte.d.ts +0 -18
package/dist/types.d.ts
CHANGED
|
@@ -68,7 +68,11 @@ export interface IAccordionProps {
|
|
|
68
68
|
id?: string;
|
|
69
69
|
isOpen?: boolean;
|
|
70
70
|
wrapperClass?: string;
|
|
71
|
+
componentClass?: string;
|
|
71
72
|
accent?: AccentColor;
|
|
73
|
+
stripe?: boolean;
|
|
74
|
+
outline?: boolean;
|
|
75
|
+
fill?: boolean;
|
|
72
76
|
size?: {
|
|
73
77
|
height?: number;
|
|
74
78
|
width?: number;
|
|
@@ -90,6 +94,8 @@ export interface IButtonProps {
|
|
|
90
94
|
variant?: "primary" | "secondary" | "plain";
|
|
91
95
|
accent?: AccentColor;
|
|
92
96
|
disabled?: boolean;
|
|
97
|
+
pressed?: boolean;
|
|
98
|
+
loading?: boolean;
|
|
93
99
|
content?: {
|
|
94
100
|
name?: string;
|
|
95
101
|
info?: {
|
|
@@ -98,6 +104,11 @@ export interface IButtonProps {
|
|
|
98
104
|
};
|
|
99
105
|
icon?: IconSource | null;
|
|
100
106
|
};
|
|
107
|
+
aria?: {
|
|
108
|
+
haspopup?: "menu" | "dialog" | "listbox" | true;
|
|
109
|
+
expanded?: boolean;
|
|
110
|
+
controls?: string;
|
|
111
|
+
};
|
|
101
112
|
keyBind?: {
|
|
102
113
|
showHint?: boolean;
|
|
103
114
|
key?: string;
|
|
@@ -108,6 +119,38 @@ export interface IButtonProps {
|
|
|
108
119
|
};
|
|
109
120
|
onClick?: () => void;
|
|
110
121
|
}
|
|
122
|
+
export interface IDropdownItem {
|
|
123
|
+
id?: string;
|
|
124
|
+
name?: string;
|
|
125
|
+
icon?: IconSource | null;
|
|
126
|
+
accent?: AccentColor;
|
|
127
|
+
disabled?: boolean;
|
|
128
|
+
divider?: boolean;
|
|
129
|
+
onClick?: () => void;
|
|
130
|
+
}
|
|
131
|
+
export interface IDropdownTriggerProps {
|
|
132
|
+
id: string;
|
|
133
|
+
"aria-haspopup": "menu" | "dialog";
|
|
134
|
+
"aria-expanded": boolean;
|
|
135
|
+
"aria-controls": string;
|
|
136
|
+
disabled: boolean;
|
|
137
|
+
onclick: (event: MouseEvent) => void;
|
|
138
|
+
onkeydown: (event: KeyboardEvent) => void;
|
|
139
|
+
}
|
|
140
|
+
export interface IDropdownProps {
|
|
141
|
+
wrapperClass?: string;
|
|
142
|
+
componentClass?: string;
|
|
143
|
+
isOpen?: boolean;
|
|
144
|
+
disabled?: boolean;
|
|
145
|
+
button?: Omit<IButtonProps, "onClick" | "disabled" | "aria" | "pressed" | "loading">;
|
|
146
|
+
trigger?: Snippet<[props: IDropdownTriggerProps, isOpen: boolean]>;
|
|
147
|
+
items?: IDropdownItem[];
|
|
148
|
+
children?: Snippet<[close: () => void]>;
|
|
149
|
+
align?: "start" | "end";
|
|
150
|
+
maxHeight?: string;
|
|
151
|
+
onSelect?: (item: IDropdownItem, index: number) => void;
|
|
152
|
+
onOpenChange?: (isOpen: boolean) => void;
|
|
153
|
+
}
|
|
111
154
|
export interface ICarouselProps {
|
|
112
155
|
id?: string;
|
|
113
156
|
wrapperClass?: string;
|
|
@@ -122,11 +165,13 @@ export interface IDividerProps {
|
|
|
122
165
|
id?: string;
|
|
123
166
|
wrapperClass?: string;
|
|
124
167
|
type?: "line" | "empty";
|
|
168
|
+
orientation?: "horizontal" | "vertical";
|
|
125
169
|
width?: number;
|
|
126
170
|
accent?: AccentColor;
|
|
127
171
|
anchor?: "top" | "center" | "bottom";
|
|
128
172
|
}
|
|
129
|
-
export
|
|
173
|
+
export type FileAttachValue<M extends boolean = false> = M extends true ? File[] : File | null;
|
|
174
|
+
export interface IFileAttachProps<M extends boolean = false> {
|
|
130
175
|
id?: string;
|
|
131
176
|
wrapperClass?: string;
|
|
132
177
|
componentClass?: string;
|
|
@@ -136,11 +181,13 @@ export interface IFileAttachProps {
|
|
|
136
181
|
};
|
|
137
182
|
type?: "file" | "image" | "button";
|
|
138
183
|
accept?: string;
|
|
184
|
+
multiple?: M;
|
|
139
185
|
info?: {
|
|
140
186
|
text: string;
|
|
141
187
|
side: "top" | "bottom" | "left" | "right";
|
|
142
188
|
};
|
|
143
189
|
icon?: IconSource | null;
|
|
190
|
+
caption?: string;
|
|
144
191
|
imageSize?: {
|
|
145
192
|
height?: string;
|
|
146
193
|
width?: string;
|
|
@@ -149,7 +196,7 @@ export interface IFileAttachProps {
|
|
|
149
196
|
};
|
|
150
197
|
disabled?: boolean;
|
|
151
198
|
currentImage?: string | null;
|
|
152
|
-
onUpdate?: (
|
|
199
|
+
onUpdate?: (value: FileAttachValue<M>, event: Event) => void;
|
|
153
200
|
}
|
|
154
201
|
export interface IGraphDataObject {
|
|
155
202
|
name: string;
|
|
@@ -232,6 +279,10 @@ export interface IInputProps {
|
|
|
232
279
|
regExp?: string | RegExp;
|
|
233
280
|
autocomplete?: "on" | "off" | "given-name" | "family-name" | "nickname" | "username" | "new-password" | "current-password" | "one-time-code" | "organization-title" | "country-name" | "address-level1" | "address-level2" | "street-address" | "postal-code" | "email" | "tel" | null;
|
|
234
281
|
};
|
|
282
|
+
error?: string;
|
|
283
|
+
autofocus?: boolean;
|
|
284
|
+
fill?: boolean;
|
|
285
|
+
ref?: HTMLInputElement | HTMLTextAreaElement | null;
|
|
235
286
|
onUpdate?: (value: string | number) => void;
|
|
236
287
|
onInput?: (value: string) => void;
|
|
237
288
|
}
|
|
@@ -292,9 +343,10 @@ export interface ISelectProps<T = unknown, M extends boolean = false> {
|
|
|
292
343
|
help?: {
|
|
293
344
|
info?: string;
|
|
294
345
|
};
|
|
295
|
-
type?: "select" | "buttons" | "input";
|
|
346
|
+
type?: "select" | "buttons" | "input" | "radio";
|
|
296
347
|
multiSelect?: M;
|
|
297
348
|
fitContent?: boolean;
|
|
349
|
+
showNames?: boolean;
|
|
298
350
|
listHeight?: string;
|
|
299
351
|
value?: SelectValue<T, M> | null;
|
|
300
352
|
options?: IOption<T>[];
|
|
@@ -312,7 +364,7 @@ export interface IOption<T = unknown> {
|
|
|
312
364
|
name?: string;
|
|
313
365
|
disabled?: boolean;
|
|
314
366
|
accent?: AccentColor;
|
|
315
|
-
icon?:
|
|
367
|
+
icon?: IconSource;
|
|
316
368
|
}
|
|
317
369
|
export interface ISliderProps {
|
|
318
370
|
id?: string;
|
|
@@ -459,6 +511,7 @@ export interface ITabsProps {
|
|
|
459
511
|
id?: string;
|
|
460
512
|
wrapperClass?: string;
|
|
461
513
|
accent?: AccentColor;
|
|
514
|
+
orientation?: "horizontal" | "vertical";
|
|
462
515
|
size?: {
|
|
463
516
|
height?: number;
|
|
464
517
|
width?: number;
|
package/package.json
CHANGED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
<!-- $lib/WidgetMap/mission/SpinnerIcon.svelte - колесо ожидания размером с родителя: подбор угла проходов; крутится CSS-анимацией, браузер ведёт её отдельно от расчёта, поэтому она не замирает -->
|
|
2
|
-
<script lang="ts"></script>
|
|
3
|
-
|
|
4
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 24 24" class="animate-spin [animation-duration:0.8s]"
|
|
5
|
-
><path fill="currentColor" d="M12 2A10 10 0 1 0 22 12A10 10 0 0 0 12 2Zm0 18a8 8 0 1 1 8-8A8 8 0 0 1 12 20Z" opacity=".35" /><path
|
|
6
|
-
fill="currentColor"
|
|
7
|
-
d="M20 12h2A10 10 0 0 0 12 2V4A8 8 0 0 1 20 12Z"
|
|
8
|
-
/></svg
|
|
9
|
-
>
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
-
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
-
$$bindings?: Bindings;
|
|
4
|
-
} & Exports;
|
|
5
|
-
(internal: unknown, props: {
|
|
6
|
-
$$events?: Events;
|
|
7
|
-
$$slots?: Slots;
|
|
8
|
-
}): Exports & {
|
|
9
|
-
$set?: any;
|
|
10
|
-
$on?: any;
|
|
11
|
-
};
|
|
12
|
-
z_$$bindings?: Bindings;
|
|
13
|
-
}
|
|
14
|
-
declare const SpinnerIcon: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
15
|
-
[evt: string]: CustomEvent<any>;
|
|
16
|
-
}, {}, {}, string>;
|
|
17
|
-
type SpinnerIcon = InstanceType<typeof SpinnerIcon>;
|
|
18
|
-
export default SpinnerIcon;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
-
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
-
$$bindings?: Bindings;
|
|
4
|
-
} & Exports;
|
|
5
|
-
(internal: unknown, props: {
|
|
6
|
-
$$events?: Events;
|
|
7
|
-
$$slots?: Slots;
|
|
8
|
-
}): Exports & {
|
|
9
|
-
$set?: any;
|
|
10
|
-
$on?: any;
|
|
11
|
-
};
|
|
12
|
-
z_$$bindings?: Bindings;
|
|
13
|
-
}
|
|
14
|
-
declare const LoaderIcon: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
15
|
-
[evt: string]: CustomEvent<any>;
|
|
16
|
-
}, {}, {}, string>;
|
|
17
|
-
type LoaderIcon = InstanceType<typeof LoaderIcon>;
|
|
18
|
-
export default LoaderIcon;
|