poe-svelte-ui-lib 1.0.2 → 1.0.4
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 +1 -0
- package/dist/Button/Button.svelte +5 -38
- package/dist/Button/Button.svelte.d.ts +1 -34
- package/dist/ColorPicker/ColorPicker.svelte +1 -3
- package/dist/FileAttach/FileAttach.svelte +3 -3
- package/dist/Input/Input.svelte +21 -20
- package/dist/Select/Select.svelte +4 -6
- package/dist/Switch/Switch.svelte +3 -2
- package/dist/Table/Table.svelte +5 -6
- package/dist/index.d.ts +0 -11
- package/dist/index.js +0 -11
- package/dist/options.d.ts +11 -11
- package/dist/options.js +27 -27
- package/dist/types.d.ts +1 -1
- package/package.json +8 -9
- package/dist/Accordion/AccordionProps.svelte +0 -70
- package/dist/Accordion/AccordionProps.svelte.d.ts +0 -10
- package/dist/Button/ButtonProps.svelte +0 -200
- package/dist/Button/ButtonProps.svelte.d.ts +0 -10
- package/dist/ColorPicker/ColorPickerProps.svelte +0 -100
- package/dist/ColorPicker/ColorPickerProps.svelte.d.ts +0 -10
- package/dist/Graph/GraphProps.svelte +0 -56
- package/dist/Graph/GraphProps.svelte.d.ts +0 -10
- package/dist/Input/InputProps.svelte +0 -221
- package/dist/Input/InputProps.svelte.d.ts +0 -10
- package/dist/ProgressBar/ProgressBarProps.svelte +0 -145
- package/dist/ProgressBar/ProgressBarProps.svelte.d.ts +0 -10
- package/dist/Select/SelectProps.svelte +0 -260
- package/dist/Select/SelectProps.svelte.d.ts +0 -10
- package/dist/Slider/SliderProps.svelte +0 -161
- package/dist/Slider/SliderProps.svelte.d.ts +0 -10
- package/dist/Switch/SwitchProps.svelte +0 -144
- package/dist/Switch/SwitchProps.svelte.d.ts +0 -10
- package/dist/Table/TableProps.svelte +0 -286
- package/dist/Table/TableProps.svelte.d.ts +0 -10
- package/dist/TextField/TextFieldProps.svelte +0 -92
- package/dist/TextField/TextFieldProps.svelte.d.ts +0 -10
- package/dist/locales/CircleFlagsEn.svelte +0 -14
- package/dist/locales/CircleFlagsEn.svelte.d.ts +0 -26
- package/dist/locales/CircleFlagsRu.svelte +0 -8
- package/dist/locales/CircleFlagsRu.svelte.d.ts +0 -26
- package/dist/locales/CircleFlagsZh.svelte +0 -8
- package/dist/locales/CircleFlagsZh.svelte.d.ts +0 -26
- package/dist/locales/i18n.d.ts +0 -10
- package/dist/locales/i18n.js +0 -36
- package/dist/locales/translations.d.ts +0 -7
- package/dist/locales/translations.js +0 -450
package/README.md
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Набор компонентов на Svelte в режиме рун
|
|
@@ -1,39 +1,9 @@
|
|
|
1
1
|
<!-- $lib/ElementsUI/Button.svelte -->
|
|
2
2
|
<script lang="ts">
|
|
3
3
|
import { onMount } from 'svelte'
|
|
4
|
-
|
|
4
|
+
import type { IButtonProps } from '../types'
|
|
5
5
|
import { fly } from 'svelte/transition'
|
|
6
6
|
|
|
7
|
-
interface IUIComponentHandler {
|
|
8
|
-
Header?: string
|
|
9
|
-
Argument?: string
|
|
10
|
-
Value?: string
|
|
11
|
-
Variables?: string[]
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
interface IButtonProps {
|
|
15
|
-
id?: { value?: string; name?: string }
|
|
16
|
-
wrapperClass?: string
|
|
17
|
-
label?: { name?: string; class?: string }
|
|
18
|
-
componentClass?: string
|
|
19
|
-
name?: string
|
|
20
|
-
icon?: {
|
|
21
|
-
component?: ConstructorOfATypedSvelteComponent | null
|
|
22
|
-
properties?: Record<string, unknown>
|
|
23
|
-
}
|
|
24
|
-
info?: string
|
|
25
|
-
keyBind?: {
|
|
26
|
-
key?: string
|
|
27
|
-
ctrlKey?: boolean
|
|
28
|
-
shiftKey?: boolean
|
|
29
|
-
altKey?: boolean
|
|
30
|
-
metaKey?: boolean /* Поддержка Meta (Cmd на Mac) */
|
|
31
|
-
}
|
|
32
|
-
disabled?: boolean
|
|
33
|
-
eventHandler?: IUIComponentHandler
|
|
34
|
-
onClick?: () => void
|
|
35
|
-
}
|
|
36
|
-
|
|
37
7
|
let {
|
|
38
8
|
id = { value: crypto.randomUUID(), name: '' },
|
|
39
9
|
wrapperClass = 'bg-blue',
|
|
@@ -94,7 +64,7 @@
|
|
|
94
64
|
id={id.value}
|
|
95
65
|
class={`
|
|
96
66
|
relative m-0 inline-block w-full items-center rounded-2xl border border-[var(--bg-color)] bg-[var(--bg-color)]
|
|
97
|
-
px-2 py-1 font-semibold transition duration-200 select-none
|
|
67
|
+
px-2 py-1 font-semibold shadow-sm transition duration-200 select-none
|
|
98
68
|
${disabled ? 'cursor-not-allowed opacity-50' : 'cursor-pointer hover:shadow-md active:scale-97'}
|
|
99
69
|
${componentClass}
|
|
100
70
|
`}
|
|
@@ -129,15 +99,12 @@
|
|
|
129
99
|
{#if showInfo}
|
|
130
100
|
<div
|
|
131
101
|
transition:fly={{ y: -15, duration: 300 }}
|
|
132
|
-
class="absolute bottom-full left-1/2 z-50 mb-2 w-max max-w-xs rounded-md px-3 py-1 text-sm shadow-lg"
|
|
133
|
-
style="
|
|
102
|
+
class="absolute bottom-full left-1/2 z-50 mb-2 w-max max-w-xs rounded-md bg-[var(--conteiner-color)] px-3 py-1 text-sm shadow-lg"
|
|
103
|
+
style="transform: translateX(-50%);"
|
|
134
104
|
>
|
|
135
105
|
{info}
|
|
136
106
|
<!-- Треугольная стрелка -->
|
|
137
|
-
<div
|
|
138
|
-
class="absolute top-full left-1/2 h-2 w-2 -translate-x-1/2 -translate-y-1/2 rotate-45 transform"
|
|
139
|
-
style="background: color-mix(in srgb, var(--yellow-color) 30%, var(--back-color));"
|
|
140
|
-
></div>
|
|
107
|
+
<div class="absolute top-full left-1/2 h-2 w-2 -translate-x-1/2 -translate-y-1/2 rotate-45 transform bg-[var(--conteiner-color)]"></div>
|
|
141
108
|
</div>
|
|
142
109
|
{/if}
|
|
143
110
|
</div>
|
|
@@ -1,37 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Header?: string;
|
|
3
|
-
Argument?: string;
|
|
4
|
-
Value?: string;
|
|
5
|
-
Variables?: string[];
|
|
6
|
-
}
|
|
7
|
-
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
|
-
info?: string;
|
|
24
|
-
keyBind?: {
|
|
25
|
-
key?: string;
|
|
26
|
-
ctrlKey?: boolean;
|
|
27
|
-
shiftKey?: boolean;
|
|
28
|
-
altKey?: boolean;
|
|
29
|
-
metaKey?: boolean;
|
|
30
|
-
};
|
|
31
|
-
disabled?: boolean;
|
|
32
|
-
eventHandler?: IUIComponentHandler;
|
|
33
|
-
onClick?: () => void;
|
|
34
|
-
}
|
|
1
|
+
import type { IButtonProps } from '../types';
|
|
35
2
|
declare const Button: import("svelte").Component<IButtonProps, {}, "">;
|
|
36
3
|
type Button = ReturnType<typeof Button>;
|
|
37
4
|
export default Button;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<!-- $lib/ElementsUI/ColorPicker.svelte -->
|
|
2
2
|
<script lang="ts">
|
|
3
|
-
import { t } from '../locales/i18n'
|
|
4
3
|
import type { IColorPickerProps } from '../types'
|
|
5
4
|
|
|
6
5
|
let {
|
|
@@ -175,9 +174,8 @@
|
|
|
175
174
|
</div>
|
|
176
175
|
|
|
177
176
|
<!-- Яркость белого цвета -->
|
|
178
|
-
<p class="h-4 px-4 text-start font-bold">{$t('component.colorpicker.whitehue')}</p>
|
|
179
177
|
<div
|
|
180
|
-
class="white-slider relative h-4 w-full cursor-pointer overflow-hidden rounded-full border border-gray-400"
|
|
178
|
+
class="white-slider mt-4 relative h-4 w-full cursor-pointer overflow-hidden rounded-full border border-gray-400"
|
|
181
179
|
role="slider"
|
|
182
180
|
aria-valuenow={null}
|
|
183
181
|
tabindex={null}
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
<div class="relative">
|
|
66
66
|
<button
|
|
67
67
|
class="flex items-center justify-center overflow-hidden {imageSize.form === 'circle' ? 'rounded-full' : 'rounded-2xl'}
|
|
68
|
-
|
|
68
|
+
bg-[var(--back-color)] shadow-sm transition duration-250 hover:shadow-md
|
|
69
69
|
{disabled ? 'cursor-not-allowed opacity-50' : 'cursor-pointer'}"
|
|
70
70
|
style={`height: ${imageSize.height}; width: ${imageSize.width}`}
|
|
71
71
|
onclick={triggerFileInput}
|
|
@@ -87,11 +87,11 @@
|
|
|
87
87
|
<input {id} type="file" class="absolute -z-10 h-0 w-0 overflow-hidden opacity-0" {accept} {disabled} onchange={handleFileChange} />
|
|
88
88
|
</div>
|
|
89
89
|
{:else}
|
|
90
|
-
<label class="relative inline-block w-full
|
|
90
|
+
<label class="relative inline-block w-full">
|
|
91
91
|
<input
|
|
92
92
|
{id}
|
|
93
93
|
type="file"
|
|
94
|
-
class={`h-
|
|
94
|
+
class={`h-8.5 w-full rounded-2xl bg-[var(--back-color)] font-semibold shadow-sm transition duration-250 hover:shadow-md
|
|
95
95
|
${disabled ? 'cursor-not-allowed opacity-50' : 'cursor-pointer'} file:h-full file:w-1/3 file:cursor-pointer
|
|
96
96
|
file:border-none file:bg-[var(--blue-color)] invalid:border-red-400 invalid:shadow-[0_0_6px_var(--red-color)]`}
|
|
97
97
|
{accept}
|
package/dist/Input/Input.svelte
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
import { onMount } from 'svelte'
|
|
4
4
|
import { fly } from 'svelte/transition'
|
|
5
5
|
import type { IInputProps } from '../types'
|
|
6
|
-
import { t } from '../locales/i18n'
|
|
7
6
|
|
|
8
7
|
let {
|
|
9
8
|
id = { name: '', value: crypto.randomUUID() },
|
|
@@ -127,19 +126,22 @@
|
|
|
127
126
|
aria-label={showPassword ? 'Скрыть пароль' : 'Показать пароль'}
|
|
128
127
|
>
|
|
129
128
|
{#if showPassword}
|
|
130
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="1.5rem" height="1.5rem" viewBox="0 0 24 24"
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
129
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="1.5rem" height="1.5rem" viewBox="0 0 24 24"
|
|
130
|
+
><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"
|
|
131
|
+
><path d="M15 12a3 3 0 1 1-6 0a3 3 0 0 1 6 0" /><path
|
|
132
|
+
d="M2 12c1.6-4.097 5.336-7 10-7s8.4 2.903 10 7c-1.6 4.097-5.336 7-10 7s-8.4-2.903-10-7"
|
|
133
|
+
/></g
|
|
134
|
+
></svg
|
|
135
|
+
>
|
|
136
136
|
{:else}
|
|
137
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="1.5rem" height="1.5rem" viewBox="0 0 24 24"
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
137
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="1.5rem" height="1.5rem" viewBox="0 0 24 24"
|
|
138
|
+
><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"
|
|
139
|
+
><path
|
|
140
|
+
stroke-linejoin="round"
|
|
141
|
+
d="M10.73 5.073A11 11 0 0 1 12 5c4.664 0 8.4 2.903 10 7a11.6 11.6 0 0 1-1.555 2.788M6.52 6.519C4.48 7.764 2.9 9.693 2 12c1.6 4.097 5.336 7 10 7a10.44 10.44 0 0 0 5.48-1.52m-7.6-7.6a3 3 0 1 0 4.243 4.243"
|
|
142
|
+
/><path d="m4 4l16 16" /></g
|
|
143
|
+
></svg
|
|
144
|
+
>
|
|
143
145
|
{/if}
|
|
144
146
|
</button>
|
|
145
147
|
{/if}
|
|
@@ -171,7 +173,7 @@
|
|
|
171
173
|
class="absolute top-1/2 right-10 -translate-y-1/2 transform rounded-md bg-[var(--green-color)] px-2 py-1 text-sm shadow-lg"
|
|
172
174
|
transition:fly={{ x: 10, duration: 200 }}
|
|
173
175
|
>
|
|
174
|
-
|
|
176
|
+
✔
|
|
175
177
|
</div>
|
|
176
178
|
{/if}
|
|
177
179
|
{/if}
|
|
@@ -217,12 +219,11 @@
|
|
|
217
219
|
onclick={() => (showInfo = !showInfo)}
|
|
218
220
|
aria-label={showInfo ? 'Скрыть инфо' : 'Показать инфо'}
|
|
219
221
|
>
|
|
220
|
-
<svg xmlns="http://www.w3.org/2000/svg"
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
</svg>
|
|
222
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="1.5rem" height="1.5rem" viewBox="0 0 24 24"
|
|
223
|
+
><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"
|
|
224
|
+
><circle cx="12" cy="12" r="10" stroke-width="1.3" /><path stroke-width="1.5" d="M12 16v-4.5" /><path stroke-width="1.8" d="M12 8.012v-.01" /></g
|
|
225
|
+
></svg
|
|
226
|
+
>
|
|
226
227
|
</button>
|
|
227
228
|
|
|
228
229
|
{#if showInfo}
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
import { slide } from 'svelte/transition'
|
|
4
4
|
import { onMount } from 'svelte'
|
|
5
5
|
import type { ISelectOption, ISelectProps } from '../types'
|
|
6
|
-
import { t } from '../locales/i18n'
|
|
7
6
|
|
|
8
7
|
let isDropdownOpen = $state(false)
|
|
9
8
|
let dropdownElement: HTMLDivElement
|
|
@@ -102,7 +101,7 @@
|
|
|
102
101
|
aria-expanded={isDropdownOpen}
|
|
103
102
|
{disabled}
|
|
104
103
|
>
|
|
105
|
-
{value?.name ||
|
|
104
|
+
{value?.name || ''}
|
|
106
105
|
</button>
|
|
107
106
|
|
|
108
107
|
{#if isDropdownOpen}
|
|
@@ -131,10 +130,9 @@
|
|
|
131
130
|
{#each options as option, index (option.id)}
|
|
132
131
|
<button
|
|
133
132
|
id={option.id}
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
{option.
|
|
137
|
-
{option.value === value?.value && value !== null ? 'z-10 text-blue-600 ring-2 ring-[var(--blue-color)]' : ''}
|
|
133
|
+
class="m-0 inline-block min-w-0 flex-1 items-center bg-[var(--bg-color)] px-2 py-1 font-semibold shadow-sm transition-all duration-200 select-none
|
|
134
|
+
{option.disabled || disabled ? 'opacity-50' : 'cursor-pointer hover:shadow-md'}
|
|
135
|
+
{option.value === value?.value && value !== null ? 'z-10 !border-[var(--blue-color)] text-cyan-500 ring-3 ring-[var(--blue-color)]' : ''}
|
|
138
136
|
{option.class} {options.length > 0 && index === 0 ? 'rounded-l-2xl' : ''} {index === options.length - 1 ? 'rounded-r-2xl' : ''}"
|
|
139
137
|
onclick={(e) => selectOption(option, e)}
|
|
140
138
|
disabled={option.disabled}
|
|
@@ -43,12 +43,12 @@
|
|
|
43
43
|
)
|
|
44
44
|
</script>
|
|
45
45
|
|
|
46
|
-
<div class="
|
|
46
|
+
<div class="relative flex w-full flex-col items-center justify-center {wrapperClass}">
|
|
47
47
|
{#if label.name}
|
|
48
48
|
<h5 class={`w-full px-4 text-center ${label.class}`}>{label.name}</h5>
|
|
49
49
|
{/if}
|
|
50
50
|
|
|
51
|
-
<div class="relative flex w-full grow items-center justify-center !bg-transparent"
|
|
51
|
+
<div class="relative flex w-full grow items-center justify-center !bg-transparent">
|
|
52
52
|
<button class="mr-2 {disabled ? 'opacity-60' : 'cursor-pointer'}" style="width: {maxCaptionWidth}; text-align: end;" onclick={() => handleCaptionClick(1)}
|
|
53
53
|
>{label.captionLeft}</button
|
|
54
54
|
>
|
|
@@ -58,6 +58,7 @@
|
|
|
58
58
|
{disabled ? 'opacity-60' : ''}"
|
|
59
59
|
>
|
|
60
60
|
<input
|
|
61
|
+
id={id.value}
|
|
61
62
|
type="checkbox"
|
|
62
63
|
class="absolute left-1/2 h-full w-full -translate-x-1/2 cursor-pointer appearance-none rounded-md"
|
|
63
64
|
bind:checked
|
package/dist/Table/Table.svelte
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<!-- $lib/ElementsUI/Table.svelte -->
|
|
2
2
|
<script lang="ts">
|
|
3
|
-
import { t } from '../locales/i18n'
|
|
4
3
|
import { get } from 'svelte/store'
|
|
5
4
|
import type { ITableHeader, ITableProps } from '../types'
|
|
6
5
|
import { fly } from 'svelte/transition'
|
|
@@ -14,7 +13,7 @@
|
|
|
14
13
|
cursor = null,
|
|
15
14
|
loader,
|
|
16
15
|
getData = () => {},
|
|
17
|
-
|
|
16
|
+
info = '',
|
|
18
17
|
modalData = $bindable({ isOpen: false, rawData: '', formattedData: '' }),
|
|
19
18
|
onClick,
|
|
20
19
|
}: ITableProps<any> = $props()
|
|
@@ -152,7 +151,7 @@
|
|
|
152
151
|
{#each tableHeader as column (column)}
|
|
153
152
|
<div
|
|
154
153
|
class="relative flex w-full min-w-0 items-center px-2 py-1 break-words
|
|
155
|
-
{index % 2 ? '!bg-[var(--
|
|
154
|
+
{index % 2 ? '!bg-[var(--back-color)]/40' : ''}
|
|
156
155
|
{column.cellClass}
|
|
157
156
|
{column.align === 'center'
|
|
158
157
|
? 'flex justify-center text-center'
|
|
@@ -243,7 +242,7 @@
|
|
|
243
242
|
class="absolute top-1/2 right-10 -translate-y-1/2 transform rounded-md bg-[var(--green-color)] px-2 py-1 text-sm shadow-lg"
|
|
244
243
|
transition:fly={{ x: 10, duration: 200 }}
|
|
245
244
|
>
|
|
246
|
-
|
|
245
|
+
✔
|
|
247
246
|
</div>
|
|
248
247
|
{/if}
|
|
249
248
|
{/if}
|
|
@@ -267,9 +266,9 @@
|
|
|
267
266
|
{/if}
|
|
268
267
|
|
|
269
268
|
<!-- Нижнее поле для сводной информации -->
|
|
270
|
-
{#if
|
|
269
|
+
{#if info != ''}
|
|
271
270
|
<div class="flex h-8 items-center justify-center bg-[var(--bg-color)]">
|
|
272
|
-
<h5>{
|
|
271
|
+
<h5>{info}</h5>
|
|
273
272
|
</div>
|
|
274
273
|
{/if}
|
|
275
274
|
</div>
|
package/dist/index.d.ts
CHANGED
|
@@ -1,26 +1,15 @@
|
|
|
1
1
|
export { default as Accordion } from './Accordion/Accordion.svelte';
|
|
2
|
-
export { default as AccordionProps } from './Accordion/AccordionProps.svelte';
|
|
3
2
|
export { default as Button } from './Button/Button.svelte';
|
|
4
|
-
export { default as ButtonProps } from './Button/ButtonProps.svelte';
|
|
5
3
|
export { default as ColorPicker } from './ColorPicker/ColorPicker.svelte';
|
|
6
|
-
export { default as ColorPickerProps } from './ColorPicker/ColorPickerProps.svelte';
|
|
7
4
|
export { default as FileAttach } from './FileAttach/FileAttach.svelte';
|
|
8
5
|
export { default as Graph } from './Graph/Graph.svelte';
|
|
9
|
-
export { default as GraphProps } from './Graph/GraphProps.svelte';
|
|
10
6
|
export { default as Input } from './Input/Input.svelte';
|
|
11
|
-
export { default as InputProps } from './Input/InputProps.svelte';
|
|
12
7
|
export { default as ProgressBar } from './ProgressBar/ProgressBar.svelte';
|
|
13
|
-
export { default as ProgressBarProps } from './ProgressBar/ProgressBarProps.svelte';
|
|
14
8
|
export { default as Select } from './Select/Select.svelte';
|
|
15
|
-
export { default as SelectProps } from './Select/SelectProps.svelte';
|
|
16
9
|
export { default as Slider } from './Slider/Slider.svelte';
|
|
17
|
-
export { default as SliderProps } from './Slider/SliderProps.svelte';
|
|
18
10
|
export { default as Switch } from './Switch/Switch.svelte';
|
|
19
|
-
export { default as SwitchProps } from './Switch/SwitchProps.svelte';
|
|
20
11
|
export { default as Table } from './Table/Table.svelte';
|
|
21
|
-
export { default as TableProps } from './Table/TableProps.svelte';
|
|
22
12
|
export { default as TextField } from './TextField/TextField.svelte';
|
|
23
|
-
export { default as TextFieldProps } from './TextField/TextFieldProps.svelte';
|
|
24
13
|
export { default as Loader } from './Loader.svelte';
|
|
25
14
|
export { default as MessageModal } from './MessageModal.svelte';
|
|
26
15
|
export { type UIComponent, type Position, type IUIComponentHandler, type IButtonProps, type IAccordionProps, type IInputProps, type ISelectProps, type ISelectOption, type ISwitchProps, type IColorPickerProps, type ISliderProps, type ITextFieldProps, type IProgressBarProps, type IGraphProps, type IGraphDataObject, type ITableHeader, type ITableProps, } from './types';
|
package/dist/index.js
CHANGED
|
@@ -1,27 +1,16 @@
|
|
|
1
1
|
/* Реэкспорт всех UI компонентов для удобного импорта */
|
|
2
2
|
export { default as Accordion } from './Accordion/Accordion.svelte';
|
|
3
|
-
export { default as AccordionProps } from './Accordion/AccordionProps.svelte';
|
|
4
3
|
export { default as Button } from './Button/Button.svelte';
|
|
5
|
-
export { default as ButtonProps } from './Button/ButtonProps.svelte';
|
|
6
4
|
export { default as ColorPicker } from './ColorPicker/ColorPicker.svelte';
|
|
7
|
-
export { default as ColorPickerProps } from './ColorPicker/ColorPickerProps.svelte';
|
|
8
5
|
export { default as FileAttach } from './FileAttach/FileAttach.svelte';
|
|
9
6
|
export { default as Graph } from './Graph/Graph.svelte';
|
|
10
|
-
export { default as GraphProps } from './Graph/GraphProps.svelte';
|
|
11
7
|
export { default as Input } from './Input/Input.svelte';
|
|
12
|
-
export { default as InputProps } from './Input/InputProps.svelte';
|
|
13
8
|
export { default as ProgressBar } from './ProgressBar/ProgressBar.svelte';
|
|
14
|
-
export { default as ProgressBarProps } from './ProgressBar/ProgressBarProps.svelte';
|
|
15
9
|
export { default as Select } from './Select/Select.svelte';
|
|
16
|
-
export { default as SelectProps } from './Select/SelectProps.svelte';
|
|
17
10
|
export { default as Slider } from './Slider/Slider.svelte';
|
|
18
|
-
export { default as SliderProps } from './Slider/SliderProps.svelte';
|
|
19
11
|
export { default as Switch } from './Switch/Switch.svelte';
|
|
20
|
-
export { default as SwitchProps } from './Switch/SwitchProps.svelte';
|
|
21
12
|
export { default as Table } from './Table/Table.svelte';
|
|
22
|
-
export { default as TableProps } from './Table/TableProps.svelte';
|
|
23
13
|
export { default as TextField } from './TextField/TextField.svelte';
|
|
24
|
-
export { default as TextFieldProps } from './TextField/TextFieldProps.svelte';
|
|
25
14
|
export { default as Loader } from './Loader.svelte';
|
|
26
15
|
export { default as MessageModal } from './MessageModal.svelte';
|
|
27
16
|
export {} from './types';
|
package/dist/options.d.ts
CHANGED
|
@@ -8,47 +8,47 @@ export declare const optionsStore: import("svelte/store").Readable<{
|
|
|
8
8
|
SHORT_ARGUMENT_OPTION: {
|
|
9
9
|
id: string;
|
|
10
10
|
value: string;
|
|
11
|
-
name:
|
|
11
|
+
name: any;
|
|
12
12
|
class: string;
|
|
13
13
|
}[];
|
|
14
14
|
FULL_ARGUMENT_OPTION: {
|
|
15
15
|
id: string;
|
|
16
16
|
value: string;
|
|
17
|
-
name:
|
|
17
|
+
name: any;
|
|
18
18
|
class: string;
|
|
19
19
|
}[];
|
|
20
20
|
INPUT_TYPE_OPTIONS: {
|
|
21
21
|
id: string;
|
|
22
22
|
value: string;
|
|
23
|
-
name:
|
|
23
|
+
name: any;
|
|
24
24
|
}[];
|
|
25
25
|
SELECT_TYPE_OPTIONS: {
|
|
26
26
|
id: string;
|
|
27
27
|
value: string;
|
|
28
|
-
name:
|
|
28
|
+
name: any;
|
|
29
29
|
class: string;
|
|
30
30
|
}[];
|
|
31
31
|
SELECT_VALUE_TYPE_OPTIONS: ({
|
|
32
32
|
id: string;
|
|
33
33
|
value: "text";
|
|
34
|
-
name:
|
|
34
|
+
name: any;
|
|
35
35
|
class: string;
|
|
36
36
|
} | {
|
|
37
37
|
id: string;
|
|
38
38
|
value: "number";
|
|
39
|
-
name:
|
|
39
|
+
name: any;
|
|
40
40
|
class: string;
|
|
41
41
|
})[];
|
|
42
42
|
SLIDER_TYPE_OPTIONS: {
|
|
43
43
|
id: string;
|
|
44
44
|
value: string;
|
|
45
|
-
name:
|
|
45
|
+
name: any;
|
|
46
46
|
class: string;
|
|
47
47
|
}[];
|
|
48
48
|
TEXTFIELD_SIZE_OPTIONS: {
|
|
49
49
|
id: string;
|
|
50
50
|
value: string;
|
|
51
|
-
name:
|
|
51
|
+
name: any;
|
|
52
52
|
class: string;
|
|
53
53
|
}[];
|
|
54
54
|
COLOR_OPTIONS: {
|
|
@@ -60,19 +60,19 @@ export declare const optionsStore: import("svelte/store").Readable<{
|
|
|
60
60
|
ALIGN_OPTIONS: {
|
|
61
61
|
id: string;
|
|
62
62
|
value: string;
|
|
63
|
-
name:
|
|
63
|
+
name: any;
|
|
64
64
|
class: string;
|
|
65
65
|
}[];
|
|
66
66
|
HEIGHT_OPTIONS: {
|
|
67
67
|
id: string;
|
|
68
68
|
value: string;
|
|
69
|
-
name:
|
|
69
|
+
name: any;
|
|
70
70
|
class: string;
|
|
71
71
|
}[];
|
|
72
72
|
ACCORDION_TYPE_OPTIONS: {
|
|
73
73
|
id: string;
|
|
74
74
|
value: string;
|
|
75
|
-
name:
|
|
75
|
+
name: any;
|
|
76
76
|
class: string;
|
|
77
77
|
}[];
|
|
78
78
|
}>;
|
package/dist/options.js
CHANGED
|
@@ -13,37 +13,37 @@ export const optionsStore = derived(t, ($t) => {
|
|
|
13
13
|
{ id: id(), name: 'ER!', value: 'ER!', class: '!w-1/4' },
|
|
14
14
|
],
|
|
15
15
|
SHORT_ARGUMENT_OPTION: [
|
|
16
|
-
{ id: id(), value: 'NoSave', name: $t('
|
|
17
|
-
{ id: id(), value: 'Save', name: $t('
|
|
18
|
-
{ id: id(), value: 'NoSend', name: $t('
|
|
16
|
+
{ id: id(), value: 'NoSave', name: $t('constructor.props.action.update'), class: '!w-1/3' },
|
|
17
|
+
{ id: id(), value: 'Save', name: $t('constructor.props.action.save'), class: '!w-1/3' },
|
|
18
|
+
{ id: id(), value: 'NoSend', name: $t('constructor.props.action.nosend'), class: '!w-1/3' },
|
|
19
19
|
],
|
|
20
20
|
FULL_ARGUMENT_OPTION: [
|
|
21
|
-
{ id: id(), value: 'NoSave', name: $t('
|
|
22
|
-
{ id: id(), value: 'Save', name: $t('
|
|
23
|
-
{ id: id(), value: '', name: $t('
|
|
21
|
+
{ id: id(), value: 'NoSave', name: $t('constructor.props.action.update'), class: '!w-1/3' },
|
|
22
|
+
{ id: id(), value: 'Save', name: $t('constructor.props.action.save'), class: '!w-1/3' },
|
|
23
|
+
{ id: id(), value: '', name: $t('constructor.props.action.custom'), class: '!w-1/3' },
|
|
24
24
|
],
|
|
25
25
|
INPUT_TYPE_OPTIONS: [
|
|
26
|
-
{ id: id(), value: 'text', name: $t('
|
|
27
|
-
{ id: id(), value: 'password', name: $t('
|
|
28
|
-
{ id: id(), value: 'number', name: $t('
|
|
29
|
-
{ id: id(), value: 'text-area', name: $t('
|
|
26
|
+
{ id: id(), value: 'text', name: $t('constructor.props.type.text') },
|
|
27
|
+
{ id: id(), value: 'password', name: $t('constructor.props.type.password') },
|
|
28
|
+
{ id: id(), value: 'number', name: $t('constructor.props.type.number') },
|
|
29
|
+
{ id: id(), value: 'text-area', name: $t('constructor.props.type.textarea') },
|
|
30
30
|
],
|
|
31
31
|
SELECT_TYPE_OPTIONS: [
|
|
32
|
-
{ id: id(), value: 'select', name: $t('
|
|
33
|
-
{ id: id(), value: 'buttons', name: $t('
|
|
32
|
+
{ id: id(), value: 'select', name: $t('constructor.props.type.select'), class: '!w-1/2' },
|
|
33
|
+
{ id: id(), value: 'buttons', name: $t('constructor.props.type.buttons'), class: '!w-1/2' },
|
|
34
34
|
],
|
|
35
35
|
SELECT_VALUE_TYPE_OPTIONS: [
|
|
36
|
-
{ id: id(), value: 'text', name: $t('
|
|
37
|
-
{ id: id(), value: 'number', name: $t('
|
|
36
|
+
{ id: id(), value: 'text', name: $t('constructor.props.valuetype.text'), class: '!w-1/2' },
|
|
37
|
+
{ id: id(), value: 'number', name: $t('constructor.props.valuetype.number'), class: '!w-1/2' },
|
|
38
38
|
],
|
|
39
39
|
SLIDER_TYPE_OPTIONS: [
|
|
40
|
-
{ id: id(), value: 'single', name: $t('
|
|
41
|
-
{ id: id(), value: 'range', name: $t('
|
|
40
|
+
{ id: id(), value: 'single', name: $t('constructor.props.type.single'), class: '!w-1/2' },
|
|
41
|
+
{ id: id(), value: 'range', name: $t('constructor.props.type.range'), class: '!w-1/2' },
|
|
42
42
|
],
|
|
43
43
|
TEXTFIELD_SIZE_OPTIONS: [
|
|
44
|
-
{ id: id(), value: 'small', name: $t('
|
|
45
|
-
{ id: id(), value: 'medium', name: $t('
|
|
46
|
-
{ id: id(), value: 'xlarge', name: $t('
|
|
44
|
+
{ id: id(), value: 'small', name: $t('constructor.props.type.small'), class: '!w-1/3' },
|
|
45
|
+
{ id: id(), value: 'medium', name: $t('constructor.props.type.medium'), class: '!w-1/3' },
|
|
46
|
+
{ id: id(), value: 'xlarge', name: $t('constructor.props.type.xlarge'), class: '!w-1/3' },
|
|
47
47
|
],
|
|
48
48
|
COLOR_OPTIONS: [
|
|
49
49
|
{ id: id(), name: '', value: 'bg-gray', class: '!w-1/6 bg-gray' },
|
|
@@ -54,18 +54,18 @@ export const optionsStore = derived(t, ($t) => {
|
|
|
54
54
|
{ id: id(), name: '', value: 'bg-blue', class: '!w-1/6 bg-blue' },
|
|
55
55
|
],
|
|
56
56
|
ALIGN_OPTIONS: [
|
|
57
|
-
{ id: id(), value: 'text-left', name: $t('
|
|
58
|
-
{ id: id(), value: 'text-center', name: $t('
|
|
59
|
-
{ id: id(), value: 'text-right', name: $t('
|
|
57
|
+
{ id: id(), value: 'text-left', name: $t('constructor.props.align.left'), class: '!w-1/3' },
|
|
58
|
+
{ id: id(), value: 'text-center', name: $t('constructor.props.align.center'), class: '!w-1/3' },
|
|
59
|
+
{ id: id(), value: 'text-right', name: $t('constructor.props.align.right'), class: '!w-1/3' },
|
|
60
60
|
],
|
|
61
61
|
HEIGHT_OPTIONS: [
|
|
62
|
-
{ id: id(), value: 'py-1', name: $t('
|
|
63
|
-
{ id: id(), value: 'py-2', name: $t('
|
|
64
|
-
{ id: id(), value: 'py-3', name: $t('
|
|
62
|
+
{ id: id(), value: 'py-1', name: $t('constructor.props.height.small'), class: '!w-1/3' },
|
|
63
|
+
{ id: id(), value: 'py-2', name: $t('constructor.props.height.medium'), class: '!w-1/3' },
|
|
64
|
+
{ id: id(), value: 'py-3', name: $t('constructor.props.height.large'), class: '!w-1/3' },
|
|
65
65
|
],
|
|
66
66
|
ACCORDION_TYPE_OPTIONS: [
|
|
67
|
-
{ id: id(), value: 'main', name: $t('
|
|
68
|
-
{ id: id(), value: 'sub', name: $t('
|
|
67
|
+
{ id: id(), value: 'main', name: $t('constructor.props.type.main'), class: '!w-1/2' },
|
|
68
|
+
{ id: id(), value: 'sub', name: $t('constructor.props.type.sub'), class: '!w-1/2' },
|
|
69
69
|
],
|
|
70
70
|
};
|
|
71
71
|
});
|
package/dist/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "poe-svelte-ui-lib",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"dev": "vite dev",
|
|
8
8
|
"build": "vite build",
|
|
9
9
|
"preview": "vite preview",
|
|
10
|
-
"
|
|
11
|
-
"prepack": "svelte-kit sync && npm run package",
|
|
10
|
+
"prepack": "svelte-kit sync && svelte-package && publint",
|
|
12
11
|
"CheckUpdate": "npx npm-check-updates -u && npm install"
|
|
13
12
|
},
|
|
14
13
|
"svelte": "./dist/index.js",
|
|
@@ -32,18 +31,18 @@
|
|
|
32
31
|
"svelte": "^5.0.0"
|
|
33
32
|
},
|
|
34
33
|
"dependencies": {
|
|
35
|
-
"@sveltejs/adapter-static": "^3.0.
|
|
36
|
-
"@tailwindcss/vite": "^4.1.
|
|
37
|
-
"tailwindcss": "^4.1.
|
|
34
|
+
"@sveltejs/adapter-static": "^3.0.10",
|
|
35
|
+
"@tailwindcss/vite": "^4.1.14",
|
|
36
|
+
"tailwindcss": "^4.1.14",
|
|
38
37
|
"typescript": "^5.9.3"
|
|
39
38
|
},
|
|
40
39
|
"devDependencies": {
|
|
41
|
-
"@sveltejs/kit": "^2.43.
|
|
40
|
+
"@sveltejs/kit": "^2.43.7",
|
|
42
41
|
"@sveltejs/package": "^2.5.4",
|
|
43
42
|
"@sveltejs/vite-plugin-svelte": "^6.2.1",
|
|
44
43
|
"publint": "^0.3.13",
|
|
45
|
-
"svelte": "^5.39.
|
|
44
|
+
"svelte": "^5.39.8",
|
|
46
45
|
"svelte-preprocess": "^6.0.3",
|
|
47
|
-
"vite": "^7.1.
|
|
46
|
+
"vite": "^7.1.9"
|
|
48
47
|
}
|
|
49
48
|
}
|