poe-svelte-ui-lib 1.0.1 → 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/LICENSE +3 -3
- package/README.md +1 -0
- package/dist/Accordion/Accordion.svelte +53 -53
- package/dist/Button/Button.svelte +111 -144
- package/dist/Button/Button.svelte.d.ts +1 -34
- package/dist/ColorPicker/ColorPicker.svelte +205 -207
- package/dist/FileAttach/FileAttach.svelte +103 -103
- package/dist/Graph/Graph.svelte +270 -270
- package/dist/Input/Input.svelte +240 -239
- package/dist/Loader.svelte +12 -12
- package/dist/MessageModal.svelte +54 -54
- package/dist/ProgressBar/ProgressBar.svelte +48 -48
- package/dist/Select/Select.svelte +189 -191
- package/dist/Slider/Slider.svelte +260 -260
- package/dist/Switch/Switch.svelte +84 -83
- package/dist/Table/Table.svelte +275 -276
- package/dist/TextField/TextField.svelte +22 -22
- package/dist/index.d.ts +0 -11
- package/dist/index.js +0 -11
- package/dist/{appIcons → libIcons}/ButtonAdd.svelte +10 -10
- package/dist/{appIcons → libIcons}/ButtonDelete.svelte +13 -13
- package/dist/{appIcons → libIcons}/LoaderRotate.svelte +9 -9
- package/dist/options.d.ts +11 -11
- package/dist/options.js +27 -27
- package/dist/types.d.ts +1 -1
- package/package.json +48 -47
- 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/dist/{appIcons → libIcons}/ButtonAdd.svelte.d.ts +0 -0
- /package/dist/{appIcons → libIcons}/ButtonDelete.svelte.d.ts +0 -0
- /package/dist/{appIcons → libIcons}/LoaderRotate.svelte.d.ts +0 -0
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';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
<script lang="ts"></script>
|
|
2
|
-
|
|
3
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"
|
|
4
|
-
><path fill="currentColor" d="M12.75 9a.75.75 0 0 0-1.5 0v2.25H9a.75.75 0 0 0 0 1.5h2.25V15a.75.75 0 0 0 1.5 0v-2.25H15a.75.75 0 0 0 0-1.5h-2.25z" /><path
|
|
5
|
-
fill="currentColor"
|
|
6
|
-
fill-rule="evenodd"
|
|
7
|
-
d="M12.057 1.25h-.114c-2.309 0-4.118 0-5.53.19c-1.444.194-2.584.6-3.479 1.494c-.895.895-1.3 2.035-1.494 3.48c-.19 1.411-.19 3.22-.19 5.529v.114c0 2.309 0 4.118.19 5.53c.194 1.444.6 2.584 1.494 3.479c.895.895 2.035 1.3 3.48 1.494c1.411.19 3.22.19 5.529.19h.114c2.309 0 4.118 0 5.53-.19c1.444-.194 2.584-.6 3.479-1.494c.895-.895 1.3-2.035 1.494-3.48c.19-1.411.19-3.22.19-5.529v-.114c0-2.309 0-4.118-.19-5.53c-.194-1.444-.6-2.584-1.494-3.479c-.895-.895-2.035-1.3-3.48-1.494c-1.411-.19-3.22-.19-5.529-.19M3.995 3.995c.57-.57 1.34-.897 2.619-1.069c1.3-.174 3.008-.176 5.386-.176s4.086.002 5.386.176c1.279.172 2.05.5 2.62 1.069c.569.57.896 1.34 1.068 2.619c.174 1.3.176 3.008.176 5.386s-.002 4.086-.176 5.386c-.172 1.279-.5 2.05-1.069 2.62c-.57.569-1.34.896-2.619 1.068c-1.3.174-3.008.176-5.386.176s-4.086-.002-5.386-.176c-1.279-.172-2.05-.5-2.62-1.069c-.569-.57-.896-1.34-1.068-2.619c-.174-1.3-.176-3.008-.176-5.386s.002-4.086.176-5.386c.172-1.279.5-2.05 1.069-2.62"
|
|
8
|
-
clip-rule="evenodd"
|
|
9
|
-
/></svg
|
|
10
|
-
>
|
|
1
|
+
<script lang="ts"></script>
|
|
2
|
+
|
|
3
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"
|
|
4
|
+
><path fill="currentColor" d="M12.75 9a.75.75 0 0 0-1.5 0v2.25H9a.75.75 0 0 0 0 1.5h2.25V15a.75.75 0 0 0 1.5 0v-2.25H15a.75.75 0 0 0 0-1.5h-2.25z" /><path
|
|
5
|
+
fill="currentColor"
|
|
6
|
+
fill-rule="evenodd"
|
|
7
|
+
d="M12.057 1.25h-.114c-2.309 0-4.118 0-5.53.19c-1.444.194-2.584.6-3.479 1.494c-.895.895-1.3 2.035-1.494 3.48c-.19 1.411-.19 3.22-.19 5.529v.114c0 2.309 0 4.118.19 5.53c.194 1.444.6 2.584 1.494 3.479c.895.895 2.035 1.3 3.48 1.494c1.411.19 3.22.19 5.529.19h.114c2.309 0 4.118 0 5.53-.19c1.444-.194 2.584-.6 3.479-1.494c.895-.895 1.3-2.035 1.494-3.48c.19-1.411.19-3.22.19-5.529v-.114c0-2.309 0-4.118-.19-5.53c-.194-1.444-.6-2.584-1.494-3.479c-.895-.895-2.035-1.3-3.48-1.494c-1.411-.19-3.22-.19-5.529-.19M3.995 3.995c.57-.57 1.34-.897 2.619-1.069c1.3-.174 3.008-.176 5.386-.176s4.086.002 5.386.176c1.279.172 2.05.5 2.62 1.069c.569.57.896 1.34 1.068 2.619c.174 1.3.176 3.008.176 5.386s-.002 4.086-.176 5.386c-.172 1.279-.5 2.05-1.069 2.62c-.57.569-1.34.896-2.619 1.068c-1.3.174-3.008.176-5.386.176s-4.086-.002-5.386-.176c-1.279-.172-2.05-.5-2.62-1.069c-.569-.57-.896-1.34-1.068-2.619c-.174-1.3-.176-3.008-.176-5.386s.002-4.086.176-5.386c.172-1.279.5-2.05 1.069-2.62"
|
|
8
|
+
clip-rule="evenodd"
|
|
9
|
+
/></svg
|
|
10
|
+
>
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
<script lang="ts"></script>
|
|
2
|
-
|
|
3
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"
|
|
4
|
-
><path
|
|
5
|
-
fill="none"
|
|
6
|
-
stroke="currentColor"
|
|
7
|
-
stroke-linecap="round"
|
|
8
|
-
stroke-linejoin="round"
|
|
9
|
-
stroke-width="1.5"
|
|
10
|
-
d="m19.5 5.5l-.62 10.025c-.158 2.561-.237 3.842-.88 4.763a4 4 0 0 1-1.2 1.128c-.957.584-2.24.584-4.806.584c-2.57 0-3.855 0-4.814-.585a4 4 0 0 1-1.2-1.13c-.642-.922-.72-2.205-.874-4.77L4.5 5.5M3 5.5h18m-4.944 0l-.683-1.408c-.453-.936-.68-1.403-1.071-1.695a2 2 0 0 0-.275-.172C13.594 2 13.074 2 12.035 2c-1.066 0-1.599 0-2.04.234a2 2 0 0 0-.278.18c-.395.303-.616.788-1.058 1.757L8.053 5.5m1.447 11v-6m5 6v-6"
|
|
11
|
-
color="currentColor"
|
|
12
|
-
/></svg
|
|
13
|
-
>
|
|
1
|
+
<script lang="ts"></script>
|
|
2
|
+
|
|
3
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"
|
|
4
|
+
><path
|
|
5
|
+
fill="none"
|
|
6
|
+
stroke="currentColor"
|
|
7
|
+
stroke-linecap="round"
|
|
8
|
+
stroke-linejoin="round"
|
|
9
|
+
stroke-width="1.5"
|
|
10
|
+
d="m19.5 5.5l-.62 10.025c-.158 2.561-.237 3.842-.88 4.763a4 4 0 0 1-1.2 1.128c-.957.584-2.24.584-4.806.584c-2.57 0-3.855 0-4.814-.585a4 4 0 0 1-1.2-1.13c-.642-.922-.72-2.205-.874-4.77L4.5 5.5M3 5.5h18m-4.944 0l-.683-1.408c-.453-.936-.68-1.403-1.071-1.695a2 2 0 0 0-.275-.172C13.594 2 13.074 2 12.035 2c-1.066 0-1.599 0-2.04.234a2 2 0 0 0-.278.18c-.395.303-.616.788-1.058 1.757L8.053 5.5m1.447 11v-6m5 6v-6"
|
|
11
|
+
color="currentColor"
|
|
12
|
+
/></svg
|
|
13
|
+
>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
<script lang="ts"></script>
|
|
2
|
-
|
|
3
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="5em" height="5em" viewBox="0 0 24 24" class="opacity-70"
|
|
4
|
-
><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=".4" /><path
|
|
5
|
-
fill="currentColor"
|
|
6
|
-
d="M20 12h2A10 10 0 0 0 12 2V4A8 8 0 0 1 20 12Z"
|
|
7
|
-
><animateTransform attributeName="transform" dur="0.8s" from="0 12 12" repeatCount="indefinite" to="360 12 12" type="rotate" /></path
|
|
8
|
-
></svg
|
|
9
|
-
>
|
|
1
|
+
<script lang="ts"></script>
|
|
2
|
+
|
|
3
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="5em" height="5em" viewBox="0 0 24 24" class="opacity-70"
|
|
4
|
+
><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=".4" /><path
|
|
5
|
+
fill="currentColor"
|
|
6
|
+
d="M20 12h2A10 10 0 0 0 12 2V4A8 8 0 0 1 20 12Z"
|
|
7
|
+
><animateTransform attributeName="transform" dur="0.8s" from="0 12 12" repeatCount="indefinite" to="360 12 12" type="rotate" /></path
|
|
8
|
+
></svg
|
|
9
|
+
>
|
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,47 +1,48 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "poe-svelte-ui-lib",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"license": "MIT",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"dev": "vite dev",
|
|
8
|
-
"build": "vite build",
|
|
9
|
-
"
|
|
10
|
-
"prepack": "svelte-kit sync &&
|
|
11
|
-
"CheckUpdate": "npx npm-check-updates -u && npm install"
|
|
12
|
-
},
|
|
13
|
-
"svelte": "./dist/index.js",
|
|
14
|
-
"types": "./dist/index.d.ts",
|
|
15
|
-
"exports": {
|
|
16
|
-
".": {
|
|
17
|
-
"types": "./dist/index.d.ts",
|
|
18
|
-
"svelte": "./dist/index.js"
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
"files": [
|
|
22
|
-
"dist"
|
|
23
|
-
],
|
|
24
|
-
"keywords": [
|
|
25
|
-
"svelte",
|
|
26
|
-
"ui",
|
|
27
|
-
"components",
|
|
28
|
-
"runes"
|
|
29
|
-
],
|
|
30
|
-
"peerDependencies": {
|
|
31
|
-
"svelte": "^5.0.0"
|
|
32
|
-
},
|
|
33
|
-
"dependencies": {
|
|
34
|
-
"@sveltejs/adapter-
|
|
35
|
-
"@tailwindcss/vite": "^4.1.
|
|
36
|
-
"tailwindcss": "^4.1.
|
|
37
|
-
"typescript": "^5.9.
|
|
38
|
-
},
|
|
39
|
-
"devDependencies": {
|
|
40
|
-
"@sveltejs/kit": "^2.43.
|
|
41
|
-
"@sveltejs/package": "^2.5.4",
|
|
42
|
-
"@sveltejs/vite-plugin-svelte": "^6.2.1",
|
|
43
|
-
"
|
|
44
|
-
"svelte
|
|
45
|
-
"
|
|
46
|
-
|
|
47
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "poe-svelte-ui-lib",
|
|
3
|
+
"version": "1.0.4",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "vite dev",
|
|
8
|
+
"build": "vite build",
|
|
9
|
+
"preview": "vite preview",
|
|
10
|
+
"prepack": "svelte-kit sync && svelte-package && publint",
|
|
11
|
+
"CheckUpdate": "npx npm-check-updates -u && npm install"
|
|
12
|
+
},
|
|
13
|
+
"svelte": "./dist/index.js",
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
18
|
+
"svelte": "./dist/index.js"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"dist"
|
|
23
|
+
],
|
|
24
|
+
"keywords": [
|
|
25
|
+
"svelte",
|
|
26
|
+
"ui",
|
|
27
|
+
"components",
|
|
28
|
+
"runes"
|
|
29
|
+
],
|
|
30
|
+
"peerDependencies": {
|
|
31
|
+
"svelte": "^5.0.0"
|
|
32
|
+
},
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"@sveltejs/adapter-static": "^3.0.10",
|
|
35
|
+
"@tailwindcss/vite": "^4.1.14",
|
|
36
|
+
"tailwindcss": "^4.1.14",
|
|
37
|
+
"typescript": "^5.9.3"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@sveltejs/kit": "^2.43.7",
|
|
41
|
+
"@sveltejs/package": "^2.5.4",
|
|
42
|
+
"@sveltejs/vite-plugin-svelte": "^6.2.1",
|
|
43
|
+
"publint": "^0.3.13",
|
|
44
|
+
"svelte": "^5.39.8",
|
|
45
|
+
"svelte-preprocess": "^6.0.3",
|
|
46
|
+
"vite": "^7.1.9"
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
<!-- $lib/ElementsUI/AccordionProps.svelte -->
|
|
2
|
-
<script lang="ts">
|
|
3
|
-
import { t } from '../locales/i18n'
|
|
4
|
-
import type { IAccordionProps, UIComponent } from '../types'
|
|
5
|
-
import * as UI from '../index'
|
|
6
|
-
import { optionsStore } from '../options'
|
|
7
|
-
|
|
8
|
-
const { component, onPropertyChange } = $props<{
|
|
9
|
-
component: UIComponent & { properties: Partial<IAccordionProps> }
|
|
10
|
-
onPropertyChange: (value: string | object) => void
|
|
11
|
-
}>()
|
|
12
|
-
|
|
13
|
-
let currentType = $derived($optionsStore.ACCORDION_TYPE_OPTIONS.find((t) => t.value === component.properties.type))
|
|
14
|
-
|
|
15
|
-
/* Обновление свойства */
|
|
16
|
-
const updateProperty = (path: string, value: string | object) => {
|
|
17
|
-
const newProperties = JSON.parse(JSON.stringify(component.properties))
|
|
18
|
-
const parts = path.split('.')
|
|
19
|
-
let obj = newProperties
|
|
20
|
-
|
|
21
|
-
for (let i = 0; i < parts.length - 1; i++) {
|
|
22
|
-
const part = parts[i]
|
|
23
|
-
if (!obj[part]) obj[part] = {}
|
|
24
|
-
obj = obj[part]
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
obj[parts[parts.length - 1]] = value
|
|
28
|
-
onPropertyChange(newProperties)
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
const handleImageUpload = (event: Event) => {
|
|
32
|
-
const input = event.target as HTMLInputElement
|
|
33
|
-
if (!input.files || input.files.length === 0) return
|
|
34
|
-
|
|
35
|
-
const file = input.files[0]
|
|
36
|
-
const reader = new FileReader()
|
|
37
|
-
reader.onload = (e) => {
|
|
38
|
-
const base64String = e.target?.result as string
|
|
39
|
-
updateProperty('image', base64String)
|
|
40
|
-
}
|
|
41
|
-
reader.readAsDataURL(file)
|
|
42
|
-
}
|
|
43
|
-
</script>
|
|
44
|
-
|
|
45
|
-
{#if component && component.properties}
|
|
46
|
-
<div class="flex items-center justify-center gap-8">
|
|
47
|
-
<UI.Input
|
|
48
|
-
label={{ name: $t('service.constructor.props.label') }}
|
|
49
|
-
wrapperClass="!w-1/3"
|
|
50
|
-
value={component.properties.label.name}
|
|
51
|
-
onUpdate={(value) => updateProperty('label.name', value as string)}
|
|
52
|
-
type="text"
|
|
53
|
-
/>
|
|
54
|
-
<UI.Select
|
|
55
|
-
wrapperClass="!w-1/3"
|
|
56
|
-
label={{ name: $t('service.constructor.props.type') }}
|
|
57
|
-
type="buttons"
|
|
58
|
-
value={currentType}
|
|
59
|
-
options={$optionsStore.ACCORDION_TYPE_OPTIONS}
|
|
60
|
-
onUpdate={(item) => updateProperty('type', item.value as string)}
|
|
61
|
-
/>
|
|
62
|
-
<UI.FileAttach
|
|
63
|
-
type="image"
|
|
64
|
-
label={{ name: $t('service.constructor.props.image') }}
|
|
65
|
-
accept="image/png, image/jpeg, image/webp"
|
|
66
|
-
onChange={handleImageUpload}
|
|
67
|
-
/>
|
|
68
|
-
<UI.Button name={$t('service.constructor.props.removeimage')} wrapperClass="!w-auto" componentClass="px-4" onClick={() => updateProperty('image', '')} />
|
|
69
|
-
</div>
|
|
70
|
-
{/if}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { IAccordionProps, UIComponent } from '../types';
|
|
2
|
-
type $$ComponentProps = {
|
|
3
|
-
component: UIComponent & {
|
|
4
|
-
properties: Partial<IAccordionProps>;
|
|
5
|
-
};
|
|
6
|
-
onPropertyChange: (value: string | object) => void;
|
|
7
|
-
};
|
|
8
|
-
declare const AccordionProps: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
9
|
-
type AccordionProps = ReturnType<typeof AccordionProps>;
|
|
10
|
-
export default AccordionProps;
|