poe-svelte-ui-lib 0.2.0 → 0.3.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/dist/Accordion/Accordion.svelte +53 -0
- package/dist/Accordion/Accordion.svelte.d.ts +14 -0
- package/dist/Accordion/AccordionProps.svelte +70 -0
- package/dist/Accordion/AccordionProps.svelte.d.ts +14 -0
- package/dist/{Button.svelte → Button/Button.svelte} +34 -45
- package/dist/Button/Button.svelte.d.ts +14 -0
- package/dist/Button/ButtonProps.svelte +200 -0
- package/dist/Button/ButtonProps.svelte.d.ts +14 -0
- package/dist/ColorPicker/ColorPicker.svelte +207 -0
- package/dist/ColorPicker/ColorPicker.svelte.d.ts +14 -0
- package/dist/ColorPicker/ColorPickerProps.svelte +100 -0
- package/dist/ColorPicker/ColorPickerProps.svelte.d.ts +14 -0
- package/dist/FileAttach/FileAttach.svelte +103 -0
- package/dist/FileAttach/FileAttach.svelte.d.ts +14 -0
- package/dist/Graph/Graph.svelte +270 -0
- package/dist/Graph/Graph.svelte.d.ts +14 -0
- package/dist/Graph/GraphProps.svelte +56 -0
- package/dist/Graph/GraphProps.svelte.d.ts +14 -0
- package/dist/Input/Input.svelte +239 -0
- package/dist/Input/Input.svelte.d.ts +14 -0
- package/dist/Input/InputProps.svelte +221 -0
- package/dist/Input/InputProps.svelte.d.ts +14 -0
- package/dist/Loader.svelte +12 -0
- package/dist/Loader.svelte.d.ts +14 -0
- package/dist/MessageModal.svelte +54 -0
- package/dist/MessageModal.svelte.d.ts +14 -0
- package/dist/ProgressBar/ProgressBar.svelte +48 -0
- package/dist/ProgressBar/ProgressBar.svelte.d.ts +14 -0
- package/dist/ProgressBar/ProgressBarProps.svelte +145 -0
- package/dist/ProgressBar/ProgressBarProps.svelte.d.ts +14 -0
- package/dist/Select/Select.svelte +187 -0
- package/dist/Select/Select.svelte.d.ts +14 -0
- package/dist/Select/SelectProps.svelte +260 -0
- package/dist/Select/SelectProps.svelte.d.ts +14 -0
- package/dist/Slider/Slider.svelte +260 -0
- package/dist/Slider/Slider.svelte.d.ts +14 -0
- package/dist/Slider/SliderProps.svelte +161 -0
- package/dist/Slider/SliderProps.svelte.d.ts +14 -0
- package/dist/Switch/Switch.svelte +83 -0
- package/dist/Switch/Switch.svelte.d.ts +14 -0
- package/dist/Switch/SwitchProps.svelte +144 -0
- package/dist/Switch/SwitchProps.svelte.d.ts +14 -0
- package/dist/Table/Table.svelte +276 -0
- package/dist/Table/Table.svelte.d.ts +14 -0
- package/dist/Table/TableProps.svelte +286 -0
- package/dist/Table/TableProps.svelte.d.ts +14 -0
- package/dist/TextField/TextField.svelte +22 -0
- package/dist/TextField/TextField.svelte.d.ts +14 -0
- package/dist/TextField/TextFieldProps.svelte +92 -0
- package/dist/TextField/TextFieldProps.svelte.d.ts +14 -0
- package/dist/appIcons/ButtonAdd.svelte +10 -0
- package/dist/appIcons/ButtonAdd.svelte.d.ts +14 -0
- package/dist/appIcons/ButtonDelete.svelte +13 -0
- package/dist/appIcons/ButtonDelete.svelte.d.ts +14 -0
- package/dist/appIcons/LoaderRotate.svelte +9 -0
- package/dist/appIcons/LoaderRotate.svelte.d.ts +14 -0
- package/dist/index.d.ts +25 -1
- package/dist/index.js +26 -2
- package/dist/locales/CircleFlagsEn.svelte +14 -0
- package/dist/locales/CircleFlagsEn.svelte.d.ts +23 -0
- package/dist/locales/CircleFlagsRu.svelte +8 -0
- package/dist/locales/CircleFlagsRu.svelte.d.ts +23 -0
- package/dist/locales/CircleFlagsZh.svelte +8 -0
- package/dist/locales/CircleFlagsZh.svelte.d.ts +23 -0
- package/dist/locales/i18n.d.ts +10 -0
- package/dist/locales/i18n.js +36 -0
- package/dist/locales/translations.d.ts +7 -0
- package/dist/locales/translations.js +450 -0
- package/dist/options.d.ts +78 -0
- package/dist/options.js +71 -0
- package/dist/types.d.ts +284 -0
- package/dist/types.js +1 -0
- package/package.json +24 -20
- package/dist/Button.svelte.d.ts +0 -37
package/dist/options.js
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
// $lib/ElementsUI/options.ts
|
|
2
|
+
import { derived } from 'svelte/store';
|
|
3
|
+
import { t } from './locales/i18n';
|
|
4
|
+
function id() {
|
|
5
|
+
return crypto.randomUUID();
|
|
6
|
+
}
|
|
7
|
+
export const optionsStore = derived(t, ($t) => {
|
|
8
|
+
return {
|
|
9
|
+
HEADER_OPTIONS: [
|
|
10
|
+
{ id: id(), name: 'GET', value: 'GET', class: '!w-1/4' },
|
|
11
|
+
{ id: id(), name: 'SET', value: 'SET', class: '!w-1/4' },
|
|
12
|
+
{ id: id(), name: 'OK!', value: 'OK!', class: '!w-1/4' },
|
|
13
|
+
{ id: id(), name: 'ER!', value: 'ER!', class: '!w-1/4' },
|
|
14
|
+
],
|
|
15
|
+
SHORT_ARGUMENT_OPTION: [
|
|
16
|
+
{ id: id(), value: 'NoSave', name: $t('service.constructor.props.action.update'), class: '!w-1/3' },
|
|
17
|
+
{ id: id(), value: 'Save', name: $t('service.constructor.props.action.save'), class: '!w-1/3' },
|
|
18
|
+
{ id: id(), value: 'NoSend', name: $t('service.constructor.props.action.nosend'), class: '!w-1/3' },
|
|
19
|
+
],
|
|
20
|
+
FULL_ARGUMENT_OPTION: [
|
|
21
|
+
{ id: id(), value: 'NoSave', name: $t('service.constructor.props.action.update'), class: '!w-1/3' },
|
|
22
|
+
{ id: id(), value: 'Save', name: $t('service.constructor.props.action.save'), class: '!w-1/3' },
|
|
23
|
+
{ id: id(), value: '', name: $t('service.constructor.props.action.custom'), class: '!w-1/3' },
|
|
24
|
+
],
|
|
25
|
+
INPUT_TYPE_OPTIONS: [
|
|
26
|
+
{ id: id(), value: 'text', name: $t('service.constructor.props.type.text') },
|
|
27
|
+
{ id: id(), value: 'password', name: $t('service.constructor.props.type.password') },
|
|
28
|
+
{ id: id(), value: 'number', name: $t('service.constructor.props.type.number') },
|
|
29
|
+
{ id: id(), value: 'text-area', name: $t('service.constructor.props.type.textarea') },
|
|
30
|
+
],
|
|
31
|
+
SELECT_TYPE_OPTIONS: [
|
|
32
|
+
{ id: id(), value: 'select', name: $t('service.constructor.props.type.select'), class: '!w-1/2' },
|
|
33
|
+
{ id: id(), value: 'buttons', name: $t('service.constructor.props.type.buttons'), class: '!w-1/2' },
|
|
34
|
+
],
|
|
35
|
+
SELECT_VALUE_TYPE_OPTIONS: [
|
|
36
|
+
{ id: id(), value: 'text', name: $t('service.constructor.props.valuetype.text'), class: '!w-1/2' },
|
|
37
|
+
{ id: id(), value: 'number', name: $t('service.constructor.props.valuetype.number'), class: '!w-1/2' },
|
|
38
|
+
],
|
|
39
|
+
SLIDER_TYPE_OPTIONS: [
|
|
40
|
+
{ id: id(), value: 'single', name: $t('service.constructor.props.type.single'), class: '!w-1/2' },
|
|
41
|
+
{ id: id(), value: 'range', name: $t('service.constructor.props.type.range'), class: '!w-1/2' },
|
|
42
|
+
],
|
|
43
|
+
TEXTFIELD_SIZE_OPTIONS: [
|
|
44
|
+
{ id: id(), value: 'small', name: $t('service.constructor.props.type.small'), class: '!w-1/3' },
|
|
45
|
+
{ id: id(), value: 'medium', name: $t('service.constructor.props.type.medium'), class: '!w-1/3' },
|
|
46
|
+
{ id: id(), value: 'xlarge', name: $t('service.constructor.props.type.xlarge'), class: '!w-1/3' },
|
|
47
|
+
],
|
|
48
|
+
COLOR_OPTIONS: [
|
|
49
|
+
{ id: id(), name: '', value: 'bg-gray', class: '!w-1/6 bg-gray' },
|
|
50
|
+
{ id: id(), name: '', value: 'bg-max', class: '!w-1/6 bg-max' },
|
|
51
|
+
{ id: id(), name: '', value: 'bg-red', class: '!w-1/6 bg-red' },
|
|
52
|
+
{ id: id(), name: '', value: 'bg-yellow', class: '!w-1/6 bg-yellow' },
|
|
53
|
+
{ id: id(), name: '', value: 'bg-green', class: '!w-1/6 bg-green' },
|
|
54
|
+
{ id: id(), name: '', value: 'bg-blue', class: '!w-1/6 bg-blue' },
|
|
55
|
+
],
|
|
56
|
+
ALIGN_OPTIONS: [
|
|
57
|
+
{ id: id(), value: 'text-left', name: $t('service.constructor.props.align.left'), class: '!w-1/3' },
|
|
58
|
+
{ id: id(), value: 'text-center', name: $t('service.constructor.props.align.center'), class: '!w-1/3' },
|
|
59
|
+
{ id: id(), value: 'text-right', name: $t('service.constructor.props.align.right'), class: '!w-1/3' },
|
|
60
|
+
],
|
|
61
|
+
HEIGHT_OPTIONS: [
|
|
62
|
+
{ id: id(), value: 'py-1', name: $t('service.constructor.props.height.small'), class: '!w-1/3' },
|
|
63
|
+
{ id: id(), value: 'py-2', name: $t('service.constructor.props.height.medium'), class: '!w-1/3' },
|
|
64
|
+
{ id: id(), value: 'py-3', name: $t('service.constructor.props.height.large'), class: '!w-1/3' },
|
|
65
|
+
],
|
|
66
|
+
ACCORDION_TYPE_OPTIONS: [
|
|
67
|
+
{ id: id(), value: 'main', name: $t('service.constructor.props.type.main'), class: '!w-1/2' },
|
|
68
|
+
{ id: id(), value: 'sub', name: $t('service.constructor.props.type.sub'), class: '!w-1/2' },
|
|
69
|
+
],
|
|
70
|
+
};
|
|
71
|
+
});
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
import type { Component, Snippet } from 'svelte';
|
|
2
|
+
import type { Writable } from 'svelte/store';
|
|
3
|
+
export interface UIComponent {
|
|
4
|
+
id: string;
|
|
5
|
+
type: 'Button' | 'Accordion' | 'Input' | 'Select' | 'Switch' | 'ColorPicker' | 'Slider' | 'TextField' | 'ProgressBar' | 'Graph' | 'Table';
|
|
6
|
+
component: Component<IButtonProps> | Component<IInputProps> | Component<ISelectProps> | Component<ISwitchProps> | Component<IColorPickerProps> | Component<ISliderProps> | Component<ITextFieldProps> | Component<IProgressBarProps> | Component<IGraphProps> | Component<ITableProps<object>> | null;
|
|
7
|
+
properties: IAccordionProps | IButtonProps | IInputProps | ISelectProps | ISwitchProps | IColorPickerProps | ISliderProps | ITextFieldProps | IProgressBarProps | IGraphProps | ITableProps<object>;
|
|
8
|
+
position: Position;
|
|
9
|
+
parentId: string;
|
|
10
|
+
}
|
|
11
|
+
export interface Position {
|
|
12
|
+
row: number;
|
|
13
|
+
col: number;
|
|
14
|
+
width: number;
|
|
15
|
+
height: number;
|
|
16
|
+
}
|
|
17
|
+
export interface IUIComponentHandler {
|
|
18
|
+
Header?: string;
|
|
19
|
+
Argument?: string;
|
|
20
|
+
Value?: string;
|
|
21
|
+
Variables?: string[];
|
|
22
|
+
}
|
|
23
|
+
export interface IButtonProps {
|
|
24
|
+
id?: {
|
|
25
|
+
value?: string;
|
|
26
|
+
name?: string;
|
|
27
|
+
};
|
|
28
|
+
wrapperClass?: string;
|
|
29
|
+
label?: {
|
|
30
|
+
name?: string;
|
|
31
|
+
class?: string;
|
|
32
|
+
};
|
|
33
|
+
componentClass?: string;
|
|
34
|
+
name?: string;
|
|
35
|
+
icon?: {
|
|
36
|
+
component?: ConstructorOfATypedSvelteComponent | null;
|
|
37
|
+
properties?: Record<string, unknown>;
|
|
38
|
+
};
|
|
39
|
+
info?: string;
|
|
40
|
+
keyBind?: {
|
|
41
|
+
key?: string;
|
|
42
|
+
ctrlKey?: boolean;
|
|
43
|
+
shiftKey?: boolean;
|
|
44
|
+
altKey?: boolean;
|
|
45
|
+
metaKey?: boolean;
|
|
46
|
+
};
|
|
47
|
+
disabled?: boolean;
|
|
48
|
+
eventHandler?: IUIComponentHandler;
|
|
49
|
+
onClick?: () => void;
|
|
50
|
+
}
|
|
51
|
+
export interface IAccordionProps {
|
|
52
|
+
id?: {
|
|
53
|
+
value?: string;
|
|
54
|
+
name?: string;
|
|
55
|
+
};
|
|
56
|
+
label?: {
|
|
57
|
+
name?: string;
|
|
58
|
+
class?: string;
|
|
59
|
+
};
|
|
60
|
+
isOpen: boolean;
|
|
61
|
+
componentClass?: string;
|
|
62
|
+
type?: 'main' | 'sub';
|
|
63
|
+
components?: UIComponent[];
|
|
64
|
+
image?: string;
|
|
65
|
+
children?: Snippet;
|
|
66
|
+
}
|
|
67
|
+
export interface IInputProps {
|
|
68
|
+
id?: {
|
|
69
|
+
value?: string;
|
|
70
|
+
name?: string;
|
|
71
|
+
};
|
|
72
|
+
wrapperClass?: string;
|
|
73
|
+
label?: {
|
|
74
|
+
name?: string;
|
|
75
|
+
class?: string;
|
|
76
|
+
};
|
|
77
|
+
disabled?: boolean;
|
|
78
|
+
readonly?: boolean;
|
|
79
|
+
value?: string | number;
|
|
80
|
+
type?: 'text' | 'password' | 'number' | 'text-area';
|
|
81
|
+
autocomplete?: 'on' | 'off' | 'given-name' | 'family-name' | 'name' | 'email' | 'username' | 'new-password' | 'current-password' | 'tel' | 'country-name' | 'address-level1' | 'address-level2' | 'street-address' | 'postal-code' | null;
|
|
82
|
+
componentClass?: string;
|
|
83
|
+
maxlength?: number;
|
|
84
|
+
number?: {
|
|
85
|
+
minNum?: number;
|
|
86
|
+
maxNum?: number;
|
|
87
|
+
step?: number;
|
|
88
|
+
};
|
|
89
|
+
textareaRows?: number;
|
|
90
|
+
regExp?: string | RegExp;
|
|
91
|
+
help?: {
|
|
92
|
+
placeholder?: string;
|
|
93
|
+
info?: string;
|
|
94
|
+
};
|
|
95
|
+
copyButton?: boolean;
|
|
96
|
+
eventHandler?: IUIComponentHandler;
|
|
97
|
+
onUpdate?: (value: string | number) => void;
|
|
98
|
+
}
|
|
99
|
+
export interface ISelectProps<T = unknown> {
|
|
100
|
+
id?: {
|
|
101
|
+
value?: string;
|
|
102
|
+
name?: string;
|
|
103
|
+
};
|
|
104
|
+
wrapperClass?: string;
|
|
105
|
+
disabled?: boolean;
|
|
106
|
+
label?: {
|
|
107
|
+
name?: string;
|
|
108
|
+
class?: string;
|
|
109
|
+
};
|
|
110
|
+
type?: 'select' | 'buttons' | 'input';
|
|
111
|
+
value?: ISelectOption<T> | null;
|
|
112
|
+
options?: ISelectOption<T>[];
|
|
113
|
+
eventHandler?: IUIComponentHandler;
|
|
114
|
+
onUpdate?: (value: ISelectOption<T>) => void;
|
|
115
|
+
}
|
|
116
|
+
export interface ISelectOption<T = unknown> {
|
|
117
|
+
id: string;
|
|
118
|
+
value?: T;
|
|
119
|
+
name?: string;
|
|
120
|
+
class?: string;
|
|
121
|
+
icon?: {
|
|
122
|
+
component?: ConstructorOfATypedSvelteComponent | null;
|
|
123
|
+
properties?: Record<string, unknown>;
|
|
124
|
+
};
|
|
125
|
+
disabled?: boolean;
|
|
126
|
+
}
|
|
127
|
+
export interface ISwitchProps {
|
|
128
|
+
id?: {
|
|
129
|
+
value?: string;
|
|
130
|
+
name?: string;
|
|
131
|
+
};
|
|
132
|
+
wrapperClass?: string;
|
|
133
|
+
disabled?: boolean;
|
|
134
|
+
label?: {
|
|
135
|
+
name?: string;
|
|
136
|
+
captionLeft?: string;
|
|
137
|
+
captionRight?: string;
|
|
138
|
+
class?: string;
|
|
139
|
+
};
|
|
140
|
+
height?: string;
|
|
141
|
+
value?: number;
|
|
142
|
+
eventHandler?: IUIComponentHandler;
|
|
143
|
+
onChange?: (value: number) => void;
|
|
144
|
+
}
|
|
145
|
+
export interface IColorPickerProps {
|
|
146
|
+
id?: {
|
|
147
|
+
name?: string;
|
|
148
|
+
value?: string;
|
|
149
|
+
};
|
|
150
|
+
wrapperClass?: string;
|
|
151
|
+
label?: {
|
|
152
|
+
name?: string;
|
|
153
|
+
class?: string;
|
|
154
|
+
};
|
|
155
|
+
value?: number[];
|
|
156
|
+
eventHandler?: IUIComponentHandler;
|
|
157
|
+
onChange?: (value: number[]) => void;
|
|
158
|
+
}
|
|
159
|
+
export interface ISliderProps {
|
|
160
|
+
id?: {
|
|
161
|
+
name?: string;
|
|
162
|
+
value?: string;
|
|
163
|
+
};
|
|
164
|
+
wrapperClass?: string;
|
|
165
|
+
label?: {
|
|
166
|
+
name?: string;
|
|
167
|
+
class?: string;
|
|
168
|
+
};
|
|
169
|
+
value?: number | [number, number];
|
|
170
|
+
type?: 'single' | 'range';
|
|
171
|
+
number?: {
|
|
172
|
+
minNum: number;
|
|
173
|
+
maxNum: number;
|
|
174
|
+
step: number;
|
|
175
|
+
};
|
|
176
|
+
disabled?: boolean;
|
|
177
|
+
eventHandler?: IUIComponentHandler;
|
|
178
|
+
onUpdate?: (value: number | [number, number]) => void;
|
|
179
|
+
}
|
|
180
|
+
export interface ITextFieldProps {
|
|
181
|
+
id?: {
|
|
182
|
+
name?: string;
|
|
183
|
+
value?: string;
|
|
184
|
+
};
|
|
185
|
+
wrapperClass?: string;
|
|
186
|
+
label?: {
|
|
187
|
+
name?: string;
|
|
188
|
+
class?: string;
|
|
189
|
+
};
|
|
190
|
+
type?: 'small' | 'medium' | 'xlarge';
|
|
191
|
+
bold?: boolean;
|
|
192
|
+
italic?: boolean;
|
|
193
|
+
}
|
|
194
|
+
export interface IProgressBarProps {
|
|
195
|
+
id?: {
|
|
196
|
+
name?: string;
|
|
197
|
+
value?: string;
|
|
198
|
+
};
|
|
199
|
+
label?: {
|
|
200
|
+
name?: string;
|
|
201
|
+
class?: string;
|
|
202
|
+
};
|
|
203
|
+
value?: boolean | string | number | number[] | object | null;
|
|
204
|
+
range?: {
|
|
205
|
+
min?: number;
|
|
206
|
+
max?: number;
|
|
207
|
+
units?: string;
|
|
208
|
+
};
|
|
209
|
+
wrapperClass?: string;
|
|
210
|
+
}
|
|
211
|
+
export interface IGraphDataObject {
|
|
212
|
+
name: string;
|
|
213
|
+
value: number;
|
|
214
|
+
timeshamp?: Date;
|
|
215
|
+
color?: string;
|
|
216
|
+
}
|
|
217
|
+
export interface IGraphProps {
|
|
218
|
+
id?: {
|
|
219
|
+
value: string;
|
|
220
|
+
name?: string;
|
|
221
|
+
};
|
|
222
|
+
wrapperClass?: string;
|
|
223
|
+
label?: {
|
|
224
|
+
name?: string;
|
|
225
|
+
class?: string;
|
|
226
|
+
};
|
|
227
|
+
streamingData?: {
|
|
228
|
+
data: IGraphDataObject[] | string | null;
|
|
229
|
+
timestamp?: number;
|
|
230
|
+
};
|
|
231
|
+
isTest?: boolean;
|
|
232
|
+
}
|
|
233
|
+
export interface ITableHeader<T extends object> {
|
|
234
|
+
wrapperClass?: string;
|
|
235
|
+
label?: string;
|
|
236
|
+
key: keyof T;
|
|
237
|
+
width?: string;
|
|
238
|
+
sortable?: boolean;
|
|
239
|
+
align?: 'left' | 'center' | 'right';
|
|
240
|
+
cellClass?: string;
|
|
241
|
+
overflow?: {
|
|
242
|
+
truncated?: boolean;
|
|
243
|
+
formatting?: (text: string) => string;
|
|
244
|
+
copy?: boolean;
|
|
245
|
+
modal?: boolean;
|
|
246
|
+
};
|
|
247
|
+
buttons?: {
|
|
248
|
+
name: string | ((row: T) => string);
|
|
249
|
+
class?: string | ((row: T) => string);
|
|
250
|
+
eventHandler?: IUIComponentHandler;
|
|
251
|
+
onClick?: (row: T) => void;
|
|
252
|
+
}[];
|
|
253
|
+
image?: {
|
|
254
|
+
src: string | ((row: T) => string);
|
|
255
|
+
alt?: string;
|
|
256
|
+
class?: string;
|
|
257
|
+
width?: number | string;
|
|
258
|
+
height?: number | string;
|
|
259
|
+
defaultIcon?: ConstructorOfATypedSvelteComponent;
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
export interface ITableProps<T extends object> {
|
|
263
|
+
id?: {
|
|
264
|
+
value?: string;
|
|
265
|
+
name?: string;
|
|
266
|
+
};
|
|
267
|
+
wrapperClass?: string;
|
|
268
|
+
label?: {
|
|
269
|
+
name?: string;
|
|
270
|
+
class?: string;
|
|
271
|
+
};
|
|
272
|
+
tableHeader: ITableHeader<T>[];
|
|
273
|
+
tableBody: T[];
|
|
274
|
+
showInfo?: boolean;
|
|
275
|
+
cursor?: string | null;
|
|
276
|
+
loader?: Writable<boolean>;
|
|
277
|
+
getData?: () => void;
|
|
278
|
+
modalData?: {
|
|
279
|
+
isOpen?: boolean;
|
|
280
|
+
rawData?: string;
|
|
281
|
+
formattedData?: string;
|
|
282
|
+
};
|
|
283
|
+
onClick?: (eventHandler: IUIComponentHandler) => void;
|
|
284
|
+
}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,21 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "poe-svelte-ui-lib",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"license": "MIT",
|
|
4
5
|
"svelte": "./dist/index.js",
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
"exports": {
|
|
8
|
-
".": {
|
|
9
|
-
"types": "./dist/index.d.ts",
|
|
10
|
-
"svelte": "./dist/index.js"
|
|
11
|
-
}
|
|
12
|
-
},
|
|
6
|
+
"types": "./dist/index.d.ts",
|
|
7
|
+
"type": "module",
|
|
13
8
|
"scripts": {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"
|
|
9
|
+
"dev": "vite dev",
|
|
10
|
+
"build": "vite build",
|
|
11
|
+
"package": "svelte-package && publint",
|
|
12
|
+
"prepack": "svelte-kit sync && npm run package",
|
|
13
|
+
"CheckUpdate": "npx npm-check-updates -u && npm install"
|
|
19
14
|
},
|
|
20
15
|
"files": [
|
|
21
16
|
"dist"
|
|
@@ -27,14 +22,23 @@
|
|
|
27
22
|
"runes"
|
|
28
23
|
],
|
|
29
24
|
"dependencies": {
|
|
30
|
-
"@
|
|
31
|
-
"tailwindcss": "^4.1.
|
|
25
|
+
"@sveltejs/adapter-auto": "^6.1.0",
|
|
26
|
+
"@tailwindcss/vite": "^4.1.13",
|
|
27
|
+
"tailwindcss": "^4.1.13",
|
|
28
|
+
"typescript": "^5.9.2"
|
|
32
29
|
},
|
|
33
30
|
"devDependencies": {
|
|
34
|
-
"@sveltejs/
|
|
35
|
-
"@sveltejs/
|
|
36
|
-
|
|
31
|
+
"@sveltejs/kit": "^2.43.5",
|
|
32
|
+
"@sveltejs/package": "^2.5.4",
|
|
33
|
+
"@sveltejs/vite-plugin-svelte": "^6.2.1",
|
|
34
|
+
"svelte": "^5.39.6",
|
|
37
35
|
"svelte-preprocess": "^6.0.3",
|
|
38
|
-
"vite": "^7.
|
|
36
|
+
"vite": "^7.1.7"
|
|
37
|
+
},
|
|
38
|
+
"exports": {
|
|
39
|
+
".": {
|
|
40
|
+
"types": "./dist/index.d.ts",
|
|
41
|
+
"svelte": "./dist/index.js"
|
|
42
|
+
}
|
|
39
43
|
}
|
|
40
44
|
}
|
package/dist/Button.svelte.d.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
export interface IUIComponentHandler {
|
|
2
|
-
Action: string;
|
|
3
|
-
Header?: string;
|
|
4
|
-
Argument?: string;
|
|
5
|
-
Variables?: string[];
|
|
6
|
-
}
|
|
7
|
-
export interface IButtonProps {
|
|
8
|
-
id?: {
|
|
9
|
-
value?: string;
|
|
10
|
-
name?: string;
|
|
11
|
-
};
|
|
12
|
-
wrapperClass?: string;
|
|
13
|
-
label?: {
|
|
14
|
-
name?: string;
|
|
15
|
-
class?: string;
|
|
16
|
-
};
|
|
17
|
-
componentClass?: string;
|
|
18
|
-
name?: string;
|
|
19
|
-
icon?: {
|
|
20
|
-
component?: ConstructorOfATypedSvelteComponent | null;
|
|
21
|
-
properties?: Record<string, unknown>;
|
|
22
|
-
};
|
|
23
|
-
keyBind?: {
|
|
24
|
-
key?: string;
|
|
25
|
-
ctrlKey?: boolean;
|
|
26
|
-
shiftKey?: boolean;
|
|
27
|
-
altKey?: boolean;
|
|
28
|
-
metaKey?: boolean;
|
|
29
|
-
};
|
|
30
|
-
disabled?: boolean;
|
|
31
|
-
eventHandler?: IUIComponentHandler;
|
|
32
|
-
onClick?: (id: string, eventHandler: IUIComponentHandler) => void;
|
|
33
|
-
onKeyBind?: (id: string, eventHandler: IUIComponentHandler) => void;
|
|
34
|
-
}
|
|
35
|
-
declare const Button: import("svelte").Component<IButtonProps, {}, "">;
|
|
36
|
-
type Button = ReturnType<typeof Button>;
|
|
37
|
-
export default Button;
|