@bexis2/bexis2-core-ui 0.0.23 → 0.0.26
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 +3 -12
- package/dist/TableView.svelte +1 -1
- package/dist/components/ListView.svelte +5 -5
- package/dist/components/Table/Table.svelte +167 -0
- package/dist/components/Table/Table.svelte.d.ts +17 -0
- package/dist/components/Table/TableFilter.svelte +168 -0
- package/dist/components/Table/TableFilter.svelte.d.ts +21 -0
- package/dist/components/Table/TablePagination.svelte +60 -0
- package/dist/components/Table/TablePagination.svelte.d.ts +17 -0
- package/dist/components/Table/filter.d.ts +4 -0
- package/dist/components/Table/filter.js +83 -0
- package/dist/components/file/FileIcon.svelte +45 -49
- package/dist/components/file/FileInfo.svelte +13 -14
- package/dist/components/file/FileUploader.svelte +34 -37
- package/dist/components/form/Checkbox.svelte +13 -17
- package/dist/components/form/CheckboxKvPList.svelte +16 -12
- package/dist/components/form/CheckboxList.svelte +10 -10
- package/dist/components/form/DateInput.svelte +17 -18
- package/dist/components/form/DateInput.svelte.d.ts +4 -4
- package/dist/components/form/DropdownKvP.svelte +44 -52
- package/dist/components/form/DropdownKvP.svelte.d.ts +10 -10
- package/dist/components/form/InputContainer.svelte +18 -20
- package/dist/components/form/InputContainer.svelte.d.ts +1 -1
- package/dist/components/form/MultiSelect.svelte +91 -101
- package/dist/components/form/NumberInput.svelte +17 -18
- package/dist/components/form/NumberInput.svelte.d.ts +4 -4
- package/dist/components/form/TextArea.svelte +16 -18
- package/dist/components/form/TextArea.svelte.d.ts +4 -5
- package/dist/components/form/TextInput.svelte +17 -21
- package/dist/components/form/TextInput.svelte.d.ts +4 -4
- package/dist/components/spinner/Spinner.svelte +9 -8
- package/dist/css/core.ui.css +5 -2
- package/dist/css/themes/theme-bexis2.css +96 -100
- package/dist/css/themes/theme-crimson.css +3 -2
- package/dist/css/themes/theme-hamlindigo.css +3 -2
- package/dist/css/themes/theme-seafoam.css +3 -2
- package/dist/models/Models.d.ts +28 -0
- package/dist/services/Api.js +12 -11
- package/dist/stores/apistore.js +13 -13
- package/package.json +17 -4
- package/src/lib/TableView.svelte +1 -1
- package/src/lib/components/ListView.svelte +11 -13
- package/src/lib/components/Table/Table.svelte +184 -0
- package/src/lib/components/Table/TableFilter.svelte +176 -0
- package/src/lib/components/Table/TablePagination.svelte +61 -0
- package/src/lib/components/Table/filter.ts +94 -0
- package/src/lib/components/file/FileIcon.svelte +45 -49
- package/src/lib/components/file/FileInfo.svelte +13 -14
- package/src/lib/components/file/FileUploader.svelte +184 -217
- package/src/lib/components/form/Checkbox.svelte +24 -32
- package/src/lib/components/form/CheckboxKvPList.svelte +27 -24
- package/src/lib/components/form/CheckboxList.svelte +21 -22
- package/src/lib/components/form/DateInput.svelte +24 -30
- package/src/lib/components/form/DropdownKvP.svelte +44 -52
- package/src/lib/components/form/InputContainer.svelte +22 -27
- package/src/lib/components/form/MultiSelect.svelte +91 -101
- package/src/lib/components/form/NumberInput.svelte +24 -30
- package/src/lib/components/form/TextArea.svelte +23 -28
- package/src/lib/components/form/TextInput.svelte +24 -33
- package/src/lib/components/spinner/Spinner.svelte +9 -8
- package/src/lib/css/core.ui.css +5 -2
- package/src/lib/css/themes/theme-bexis2.css +96 -100
- package/src/lib/css/themes/theme-crimson.css +3 -2
- package/src/lib/css/themes/theme-hamlindigo.css +3 -2
- package/src/lib/css/themes/theme-seafoam.css +3 -2
- package/src/lib/index.ts +31 -23
- package/src/lib/models/Models.ts +70 -39
- package/src/lib/services/Api.ts +55 -58
- package/src/lib/stores/apistore.ts +28 -32
|
@@ -2,21 +2,20 @@
|
|
|
2
2
|
export let id = "";
|
|
3
3
|
export let label = "";
|
|
4
4
|
export let value = "";
|
|
5
|
-
export let valid;
|
|
6
|
-
export let invalid;
|
|
7
|
-
export let required;
|
|
8
|
-
export let feedback;
|
|
9
|
-
</script>
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
5
|
+
export let valid = false;
|
|
6
|
+
export let invalid = false;
|
|
7
|
+
export let required = false;
|
|
8
|
+
export let feedback = [""];
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<InputContainer {label} {feedback} {required}>
|
|
12
|
+
<input
|
|
13
|
+
{id}
|
|
14
|
+
class="input variant-form-material"
|
|
15
|
+
type="number"
|
|
16
|
+
class:input-success={valid}
|
|
17
|
+
class:input-error={invalid}
|
|
18
|
+
bind:value
|
|
19
|
+
on:input
|
|
20
|
+
/>
|
|
21
|
+
</InputContainer>
|
|
@@ -4,10 +4,10 @@ declare const __propDef: {
|
|
|
4
4
|
id?: string | undefined;
|
|
5
5
|
label?: string | undefined;
|
|
6
6
|
value?: string | undefined;
|
|
7
|
-
valid
|
|
8
|
-
invalid
|
|
9
|
-
required
|
|
10
|
-
feedback
|
|
7
|
+
valid?: boolean | undefined;
|
|
8
|
+
invalid?: boolean | undefined;
|
|
9
|
+
required?: boolean | undefined;
|
|
10
|
+
feedback?: string[] | undefined;
|
|
11
11
|
};
|
|
12
12
|
events: {
|
|
13
13
|
input: Event;
|
|
@@ -2,21 +2,19 @@
|
|
|
2
2
|
export let id = "";
|
|
3
3
|
export let label = "";
|
|
4
4
|
export let value = "";
|
|
5
|
-
export let
|
|
6
|
-
export let
|
|
7
|
-
export let
|
|
8
|
-
export let
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
</InputContainer>
|
|
21
|
-
|
|
22
|
-
|
|
5
|
+
export let valid = false;
|
|
6
|
+
export let invalid = false;
|
|
7
|
+
export let required = false;
|
|
8
|
+
export let feedback = [""];
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<InputContainer {label} {feedback} {required}>
|
|
12
|
+
<textarea
|
|
13
|
+
{id}
|
|
14
|
+
class="textarea variant-form-material"
|
|
15
|
+
class:input-success={valid}
|
|
16
|
+
class:input-error={invalid}
|
|
17
|
+
bind:value
|
|
18
|
+
on:input
|
|
19
|
+
/>
|
|
20
|
+
</InputContainer>
|
|
@@ -4,11 +4,10 @@ declare const __propDef: {
|
|
|
4
4
|
id?: string | undefined;
|
|
5
5
|
label?: string | undefined;
|
|
6
6
|
value?: string | undefined;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
feedback: [];
|
|
7
|
+
valid?: boolean | undefined;
|
|
8
|
+
invalid?: boolean | undefined;
|
|
9
|
+
required?: boolean | undefined;
|
|
10
|
+
feedback?: string[] | undefined;
|
|
12
11
|
};
|
|
13
12
|
events: {
|
|
14
13
|
input: Event;
|
|
@@ -2,24 +2,20 @@
|
|
|
2
2
|
export let id = "";
|
|
3
3
|
export let label = "";
|
|
4
4
|
export let value = "";
|
|
5
|
-
export let valid;
|
|
6
|
-
export let invalid;
|
|
7
|
-
export let required;
|
|
8
|
-
export let feedback;
|
|
9
|
-
</script>
|
|
10
|
-
|
|
11
|
-
<InputContainer {label} {feedback} {required}>
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
</InputContainer>
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
5
|
+
export let valid = false;
|
|
6
|
+
export let invalid = false;
|
|
7
|
+
export let required = false;
|
|
8
|
+
export let feedback = [""];
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<InputContainer {label} {feedback} {required}>
|
|
12
|
+
<input
|
|
13
|
+
{id}
|
|
14
|
+
class="input variant-form-material"
|
|
15
|
+
type="text"
|
|
16
|
+
class:input-success={valid}
|
|
17
|
+
class:input-error={invalid}
|
|
18
|
+
bind:value
|
|
19
|
+
on:input
|
|
20
|
+
/>
|
|
21
|
+
</InputContainer>
|
|
@@ -4,10 +4,10 @@ declare const __propDef: {
|
|
|
4
4
|
id?: string | undefined;
|
|
5
5
|
label?: string | undefined;
|
|
6
6
|
value?: string | undefined;
|
|
7
|
-
valid
|
|
8
|
-
invalid
|
|
9
|
-
required
|
|
10
|
-
feedback
|
|
7
|
+
valid?: boolean | undefined;
|
|
8
|
+
invalid?: boolean | undefined;
|
|
9
|
+
required?: boolean | undefined;
|
|
10
|
+
feedback?: string[] | undefined;
|
|
11
11
|
};
|
|
12
12
|
events: {
|
|
13
13
|
input: Event;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
<div
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
<div
|
|
2
|
+
class="inline-block h-8 w-8 animate-spin rounded-full border-4 border-solid border-current border-r-transparent align-[-0.125em] motion-reduce:animate-[spin_1.5s_linear_infinite] text-secundary-500"
|
|
3
|
+
role="status"
|
|
4
|
+
>
|
|
5
|
+
<span
|
|
6
|
+
class="!absolute !-m-px !h-px !w-px !overflow-hidden !whitespace-nowrap !border-0 !p-0 ![clip:rect(0,0,0,0)]"
|
|
7
|
+
>Loading...</span
|
|
8
|
+
>
|
|
9
|
+
</div>
|
package/dist/css/core.ui.css
CHANGED
|
@@ -1,100 +1,96 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
/* =~= Theme Properties =~= */
|
|
3
|
-
--theme-font-family-base: system-ui;
|
|
4
|
-
--theme-font-family-heading: system-ui;
|
|
5
|
-
--theme-font-color-base:
|
|
6
|
-
--theme-font-color-dark: 255 255 255;
|
|
7
|
-
--theme-rounded-base: 4px;
|
|
8
|
-
--theme-rounded-container: 4px;
|
|
9
|
-
--theme-border-base: 1px;
|
|
10
|
-
/* =~= Theme On-X Colors =~= */
|
|
11
|
-
--on-primary: 0 0 0;
|
|
12
|
-
--on-secondary: 0 0 0;
|
|
13
|
-
--on-tertiary: 0 0 0;
|
|
14
|
-
--on-success: 0 0 0;
|
|
15
|
-
--on-warning: 255 255 255;
|
|
16
|
-
--on-error: 255 255 255;
|
|
17
|
-
--on-surface: 0 0 0;
|
|
18
|
-
/* =~= Theme Colors =~= */
|
|
19
|
-
/* primary | #45b2a1 */
|
|
20
|
-
--color-primary-50: 227 243 241; /* ⬅ #e3f3f1 */
|
|
21
|
-
--color-primary-100: 218 240 236; /* ⬅ #daf0ec */
|
|
22
|
-
--color-primary-200: 209 236 232; /* ⬅ #d1ece8 */
|
|
23
|
-
--color-primary-300: 181 224 217; /* ⬅ #b5e0d9 */
|
|
24
|
-
--color-primary-400: 125 201 189; /* ⬅ #7dc9bd */
|
|
25
|
-
--color-primary-500: 69 178 161; /* ⬅ #45b2a1 */
|
|
26
|
-
--color-primary-600: 62 160 145; /* ⬅ #3ea091 */
|
|
27
|
-
--color-primary-700: 52 134 121; /* ⬅ #348679 */
|
|
28
|
-
--color-primary-800: 41 107 97; /* ⬅ #296b61 */
|
|
29
|
-
--color-primary-900: 34 87 79; /* ⬅ #22574f */
|
|
30
|
-
/* secondary | #ff9700 */
|
|
31
|
-
--color-secondary-50: 255 239 217; /* ⬅ #ffefd9 */
|
|
32
|
-
--color-secondary-100: 255 234 204; /* ⬅ #ffeacc */
|
|
33
|
-
--color-secondary-200: 255 229 191; /* ⬅ #ffe5bf */
|
|
34
|
-
--color-secondary-300: 255 213 153; /* ⬅ #ffd599 */
|
|
35
|
-
--color-secondary-400: 255 182 77; /* ⬅ #ffb64d */
|
|
36
|
-
--color-secondary-500: 255 151 0; /* ⬅ #ff9700 */
|
|
37
|
-
--color-secondary-600: 230 136 0; /* ⬅ #e68800 */
|
|
38
|
-
--color-secondary-700: 191 113 0; /* ⬅ #bf7100 */
|
|
39
|
-
--color-secondary-800: 153 91 0; /* ⬅ #995b00 */
|
|
40
|
-
--color-secondary-900: 125 74 0; /* ⬅ #7d4a00 */
|
|
41
|
-
/* tertiary | #bee1da */
|
|
42
|
-
--color-tertiary-50: 245 251 249; /* ⬅ #f5fbf9 */
|
|
43
|
-
--color-tertiary-100: 242 249 248; /* ⬅ #f2f9f8 */
|
|
44
|
-
--color-tertiary-200: 239 248 246; /* ⬅ #eff8f6 */
|
|
45
|
-
--color-tertiary-300: 229 243 240; /* ⬅ #e5f3f0 */
|
|
46
|
-
--color-tertiary-400: 210 234 229; /* ⬅ #d2eae5 */
|
|
47
|
-
--color-tertiary-500: 190 225 218; /* ⬅ #bee1da */
|
|
48
|
-
--color-tertiary-600: 171 203 196; /* ⬅ #abcbc4 */
|
|
49
|
-
--color-tertiary-700: 143 169 164; /* ⬅ #8fa9a4 */
|
|
50
|
-
--color-tertiary-800: 114 135 131; /* ⬅ #728783 */
|
|
51
|
-
--color-tertiary-900: 93 110 107; /* ⬅ #5d6e6b */
|
|
52
|
-
/* success | #4BB543 */
|
|
53
|
-
--color-success-50: 228 244 227; /* ⬅ #e4f4e3 */
|
|
54
|
-
--color-success-100: 219 240 217; /* ⬅ #dbf0d9 */
|
|
55
|
-
--color-success-200: 210 237 208; /* ⬅ #d2edd0 */
|
|
56
|
-
--color-success-300: 183 225 180; /* ⬅ #b7e1b4 */
|
|
57
|
-
--color-success-400: 129 203 123; /* ⬅ #81cb7b */
|
|
58
|
-
--color-success-500: 75 181 67; /* ⬅ #4BB543 */
|
|
59
|
-
--color-success-600: 68 163 60; /* ⬅ #44a33c */
|
|
60
|
-
--color-success-700: 56 136 50; /* ⬅ #388832 */
|
|
61
|
-
--color-success-800: 45 109 40; /* ⬅ #2d6d28 */
|
|
62
|
-
--color-success-900: 37 89 33; /* ⬅ #255921 */
|
|
63
|
-
/* warning | #ef4444 */
|
|
64
|
-
--color-warning-50: 253 227 227; /* ⬅ #fde3e3 */
|
|
65
|
-
--color-warning-100: 252 218 218; /* ⬅ #fcdada */
|
|
66
|
-
--color-warning-200: 251 208 208; /* ⬅ #fbd0d0 */
|
|
67
|
-
--color-warning-300: 249 180 180; /* ⬅ #f9b4b4 */
|
|
68
|
-
--color-warning-400: 244 124 124; /* ⬅ #f47c7c */
|
|
69
|
-
--color-warning-500: 239 68 68; /* ⬅ #ef4444 */
|
|
70
|
-
--color-warning-600: 215 61 61; /* ⬅ #d73d3d */
|
|
71
|
-
--color-warning-700: 179 51 51; /* ⬅ #b33333 */
|
|
72
|
-
--color-warning-800: 143 41 41; /* ⬅ #8f2929 */
|
|
73
|
-
--color-warning-900: 117 33 33; /* ⬅ #752121 */
|
|
74
|
-
/* error | #FF0000 */
|
|
75
|
-
--color-error-50: 255 217 217; /* ⬅ #ffd9d9 */
|
|
76
|
-
--color-error-100: 255 204 204; /* ⬅ #ffcccc */
|
|
77
|
-
--color-error-200: 255 191 191; /* ⬅ #ffbfbf */
|
|
78
|
-
--color-error-300: 255 153 153; /* ⬅ #ff9999 */
|
|
79
|
-
--color-error-400: 255 77 77; /* ⬅ #ff4d4d */
|
|
80
|
-
--color-error-500: 255 0 0; /* ⬅ #FF0000 */
|
|
81
|
-
--color-error-600: 230 0 0; /* ⬅ #e60000 */
|
|
82
|
-
--color-error-700: 191 0 0; /* ⬅ #bf0000 */
|
|
83
|
-
--color-error-800: 153 0 0; /* ⬅ #990000 */
|
|
84
|
-
--color-error-900: 125 0 0; /* ⬅ #7d0000 */
|
|
85
|
-
/* surface | #dddddd */
|
|
86
|
-
--color-surface-50: 250 250 250; /* ⬅ #fafafa */
|
|
87
|
-
--color-surface-100: 248 248 248; /* ⬅ #f8f8f8 */
|
|
88
|
-
--color-surface-200: 247 247 247; /* ⬅ #f7f7f7 */
|
|
89
|
-
--color-surface-300: 241 241 241; /* ⬅ #f1f1f1 */
|
|
90
|
-
--color-surface-400: 231 231 231; /* ⬅ #e7e7e7 */
|
|
91
|
-
--color-surface-500: 221 221 221; /* ⬅ #dddddd */
|
|
92
|
-
--color-surface-600: 199 199 199; /* ⬅ #c7c7c7 */
|
|
93
|
-
--color-surface-700: 166 166 166; /* ⬅ #a6a6a6 */
|
|
94
|
-
--color-surface-800: 133 133 133; /* ⬅ #858585 */
|
|
95
|
-
--color-surface-900: 108 108 108; /* ⬅ #6c6c6c */
|
|
96
|
-
|
|
97
|
-
--color-surface-800: 19 25 33; /* ⬅ #131921 */
|
|
98
|
-
--color-surface-900: 15 20 27; /* ⬅ #0f141b */
|
|
99
|
-
|
|
100
|
-
}
|
|
1
|
+
:root {
|
|
2
|
+
/* =~= Theme Properties =~= */
|
|
3
|
+
--theme-font-family-base: system-ui;
|
|
4
|
+
--theme-font-family-heading: system-ui;
|
|
5
|
+
--theme-font-color-base: var(--color-surface-900);
|
|
6
|
+
--theme-font-color-dark: 255 255 255;
|
|
7
|
+
--theme-rounded-base: 4px;
|
|
8
|
+
--theme-rounded-container: 4px;
|
|
9
|
+
--theme-border-base: 1px;
|
|
10
|
+
/* =~= Theme On-X Colors =~= */
|
|
11
|
+
--on-primary: 0 0 0;
|
|
12
|
+
--on-secondary: 0 0 0;
|
|
13
|
+
--on-tertiary: 0 0 0;
|
|
14
|
+
--on-success: 0 0 0;
|
|
15
|
+
--on-warning: 255 255 255;
|
|
16
|
+
--on-error: 255 255 255;
|
|
17
|
+
--on-surface: 0 0 0;
|
|
18
|
+
/* =~= Theme Colors =~= */
|
|
19
|
+
/* primary | #45b2a1 */
|
|
20
|
+
--color-primary-50: 227 243 241; /* ⬅ #e3f3f1 */
|
|
21
|
+
--color-primary-100: 218 240 236; /* ⬅ #daf0ec */
|
|
22
|
+
--color-primary-200: 209 236 232; /* ⬅ #d1ece8 */
|
|
23
|
+
--color-primary-300: 181 224 217; /* ⬅ #b5e0d9 */
|
|
24
|
+
--color-primary-400: 125 201 189; /* ⬅ #7dc9bd */
|
|
25
|
+
--color-primary-500: 69 178 161; /* ⬅ #45b2a1 */
|
|
26
|
+
--color-primary-600: 62 160 145; /* ⬅ #3ea091 */
|
|
27
|
+
--color-primary-700: 52 134 121; /* ⬅ #348679 */
|
|
28
|
+
--color-primary-800: 41 107 97; /* ⬅ #296b61 */
|
|
29
|
+
--color-primary-900: 34 87 79; /* ⬅ #22574f */
|
|
30
|
+
/* secondary | #ff9700 */
|
|
31
|
+
--color-secondary-50: 255 239 217; /* ⬅ #ffefd9 */
|
|
32
|
+
--color-secondary-100: 255 234 204; /* ⬅ #ffeacc */
|
|
33
|
+
--color-secondary-200: 255 229 191; /* ⬅ #ffe5bf */
|
|
34
|
+
--color-secondary-300: 255 213 153; /* ⬅ #ffd599 */
|
|
35
|
+
--color-secondary-400: 255 182 77; /* ⬅ #ffb64d */
|
|
36
|
+
--color-secondary-500: 255 151 0; /* ⬅ #ff9700 */
|
|
37
|
+
--color-secondary-600: 230 136 0; /* ⬅ #e68800 */
|
|
38
|
+
--color-secondary-700: 191 113 0; /* ⬅ #bf7100 */
|
|
39
|
+
--color-secondary-800: 153 91 0; /* ⬅ #995b00 */
|
|
40
|
+
--color-secondary-900: 125 74 0; /* ⬅ #7d4a00 */
|
|
41
|
+
/* tertiary | #bee1da */
|
|
42
|
+
--color-tertiary-50: 245 251 249; /* ⬅ #f5fbf9 */
|
|
43
|
+
--color-tertiary-100: 242 249 248; /* ⬅ #f2f9f8 */
|
|
44
|
+
--color-tertiary-200: 239 248 246; /* ⬅ #eff8f6 */
|
|
45
|
+
--color-tertiary-300: 229 243 240; /* ⬅ #e5f3f0 */
|
|
46
|
+
--color-tertiary-400: 210 234 229; /* ⬅ #d2eae5 */
|
|
47
|
+
--color-tertiary-500: 190 225 218; /* ⬅ #bee1da */
|
|
48
|
+
--color-tertiary-600: 171 203 196; /* ⬅ #abcbc4 */
|
|
49
|
+
--color-tertiary-700: 143 169 164; /* ⬅ #8fa9a4 */
|
|
50
|
+
--color-tertiary-800: 114 135 131; /* ⬅ #728783 */
|
|
51
|
+
--color-tertiary-900: 93 110 107; /* ⬅ #5d6e6b */
|
|
52
|
+
/* success | #4BB543 */
|
|
53
|
+
--color-success-50: 228 244 227; /* ⬅ #e4f4e3 */
|
|
54
|
+
--color-success-100: 219 240 217; /* ⬅ #dbf0d9 */
|
|
55
|
+
--color-success-200: 210 237 208; /* ⬅ #d2edd0 */
|
|
56
|
+
--color-success-300: 183 225 180; /* ⬅ #b7e1b4 */
|
|
57
|
+
--color-success-400: 129 203 123; /* ⬅ #81cb7b */
|
|
58
|
+
--color-success-500: 75 181 67; /* ⬅ #4BB543 */
|
|
59
|
+
--color-success-600: 68 163 60; /* ⬅ #44a33c */
|
|
60
|
+
--color-success-700: 56 136 50; /* ⬅ #388832 */
|
|
61
|
+
--color-success-800: 45 109 40; /* ⬅ #2d6d28 */
|
|
62
|
+
--color-success-900: 37 89 33; /* ⬅ #255921 */
|
|
63
|
+
/* warning | #ef4444 */
|
|
64
|
+
--color-warning-50: 253 227 227; /* ⬅ #fde3e3 */
|
|
65
|
+
--color-warning-100: 252 218 218; /* ⬅ #fcdada */
|
|
66
|
+
--color-warning-200: 251 208 208; /* ⬅ #fbd0d0 */
|
|
67
|
+
--color-warning-300: 249 180 180; /* ⬅ #f9b4b4 */
|
|
68
|
+
--color-warning-400: 244 124 124; /* ⬅ #f47c7c */
|
|
69
|
+
--color-warning-500: 239 68 68; /* ⬅ #ef4444 */
|
|
70
|
+
--color-warning-600: 215 61 61; /* ⬅ #d73d3d */
|
|
71
|
+
--color-warning-700: 179 51 51; /* ⬅ #b33333 */
|
|
72
|
+
--color-warning-800: 143 41 41; /* ⬅ #8f2929 */
|
|
73
|
+
--color-warning-900: 117 33 33; /* ⬅ #752121 */
|
|
74
|
+
/* error | #FF0000 */
|
|
75
|
+
--color-error-50: 255 217 217; /* ⬅ #ffd9d9 */
|
|
76
|
+
--color-error-100: 255 204 204; /* ⬅ #ffcccc */
|
|
77
|
+
--color-error-200: 255 191 191; /* ⬅ #ffbfbf */
|
|
78
|
+
--color-error-300: 255 153 153; /* ⬅ #ff9999 */
|
|
79
|
+
--color-error-400: 255 77 77; /* ⬅ #ff4d4d */
|
|
80
|
+
--color-error-500: 255 0 0; /* ⬅ #FF0000 */
|
|
81
|
+
--color-error-600: 230 0 0; /* ⬅ #e60000 */
|
|
82
|
+
--color-error-700: 191 0 0; /* ⬅ #bf0000 */
|
|
83
|
+
--color-error-800: 153 0 0; /* ⬅ #990000 */
|
|
84
|
+
--color-error-900: 125 0 0; /* ⬅ #7d0000 */
|
|
85
|
+
/* surface | #dddddd */
|
|
86
|
+
--color-surface-50: 250 250 250; /* ⬅ #fafafa */
|
|
87
|
+
--color-surface-100: 248 248 248; /* ⬅ #f8f8f8 */
|
|
88
|
+
--color-surface-200: 247 247 247; /* ⬅ #f7f7f7 */
|
|
89
|
+
--color-surface-300: 241 241 241; /* ⬅ #f1f1f1 */
|
|
90
|
+
--color-surface-400: 231 231 231; /* ⬅ #e7e7e7 */
|
|
91
|
+
--color-surface-500: 221 221 221; /* ⬅ #dddddd */
|
|
92
|
+
--color-surface-600: 199 199 199; /* ⬅ #c7c7c7 */
|
|
93
|
+
--color-surface-700: 166 166 166; /* ⬅ #a6a6a6 */
|
|
94
|
+
--color-surface-800: 133 133 133; /* ⬅ #858585 */
|
|
95
|
+
--color-surface-900: 108 108 108; /* ⬅ #6c6c6c */
|
|
96
|
+
}
|
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
|
|
4
4
|
:root {
|
|
5
5
|
/* =~= Theme Styles =~= */
|
|
6
|
-
--theme-font-family-base: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
|
|
7
|
-
'
|
|
6
|
+
--theme-font-family-base: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
|
|
7
|
+
'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji',
|
|
8
|
+
'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
|
|
8
9
|
--theme-font-family-heading: system-ui;
|
|
9
10
|
--theme-font-color-base: var(--color-surface-900);
|
|
10
11
|
--theme-font-color-dark: var(--color-surface-50);
|
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
|
|
6
6
|
:root {
|
|
7
7
|
/* =~= Hamlindigo Theme | Custom =~= */
|
|
8
|
-
--theme-font-family-base: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
|
|
9
|
-
'
|
|
8
|
+
--theme-font-family-base: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
|
|
9
|
+
'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji',
|
|
10
|
+
'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
|
|
10
11
|
--theme-font-family-heading: 'Playfair Display', serif;
|
|
11
12
|
--theme-font-color-base: 0 0 0;
|
|
12
13
|
--theme-font-color-dark: 255 255 255;
|
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
|
|
4
4
|
:root {
|
|
5
5
|
/* =~= Theme Styles =~= */
|
|
6
|
-
--theme-font-family-base: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
|
|
7
|
-
'
|
|
6
|
+
--theme-font-family-base: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
|
|
7
|
+
'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji',
|
|
8
|
+
'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
|
|
8
9
|
--theme-font-family-heading: 'Playfair Display', serif;
|
|
9
10
|
--theme-font-color-base: var(--color-surface-900);
|
|
10
11
|
--theme-font-color-dark: var(--color-secondary-100);
|
package/dist/models/Models.d.ts
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
import type { SvelteComponent } from 'svelte';
|
|
2
|
+
import type { ColumnFilterFn } from 'svelte-headless-table/lib/plugins';
|
|
3
|
+
import type { Writable } from 'svelte/store';
|
|
4
|
+
export interface Input {
|
|
5
|
+
id: string;
|
|
6
|
+
label: string;
|
|
7
|
+
feedback: string[];
|
|
8
|
+
invalid: boolean;
|
|
9
|
+
valid: boolean;
|
|
10
|
+
required: boolean;
|
|
11
|
+
}
|
|
1
12
|
export interface FileInfo {
|
|
2
13
|
name: string;
|
|
3
14
|
type: string;
|
|
@@ -29,3 +40,20 @@ export interface FileObj {
|
|
|
29
40
|
type: string;
|
|
30
41
|
webkitRelativePath: string;
|
|
31
42
|
}
|
|
43
|
+
export interface Column {
|
|
44
|
+
header?: string;
|
|
45
|
+
exclude?: boolean;
|
|
46
|
+
colFilterFn?: ColumnFilterFn;
|
|
47
|
+
colFilterComponent?: typeof SvelteComponent;
|
|
48
|
+
}
|
|
49
|
+
export interface Columns {
|
|
50
|
+
[key: string]: Column;
|
|
51
|
+
}
|
|
52
|
+
export interface TableConfig<T> {
|
|
53
|
+
id: string;
|
|
54
|
+
data: Writable<T[]>;
|
|
55
|
+
columns?: Columns;
|
|
56
|
+
pageSizes?: number[];
|
|
57
|
+
defaultPageSize?: number;
|
|
58
|
+
optionsComponent?: typeof SvelteComponent;
|
|
59
|
+
}
|
package/dist/services/Api.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Api.js
|
|
2
|
-
import axios from
|
|
3
|
-
import { host, username, password } from
|
|
4
|
-
console.log(
|
|
2
|
+
import axios from 'axios';
|
|
3
|
+
import { host, username, password } from '../stores/apistore';
|
|
4
|
+
console.log('setup axios');
|
|
5
5
|
// implement a method to execute all the request from here.
|
|
6
6
|
const apiRequest = (method, url, request) => {
|
|
7
7
|
// Create a instance of axios to use the same base url.
|
|
@@ -9,7 +9,7 @@ const apiRequest = (method, url, request) => {
|
|
|
9
9
|
baseURL: host
|
|
10
10
|
});
|
|
11
11
|
const headers = {
|
|
12
|
-
authorization: 'Basic ' + btoa(username +
|
|
12
|
+
authorization: 'Basic ' + btoa(username + ':' + password)
|
|
13
13
|
};
|
|
14
14
|
//using the axios instance to perform the request that received from each http method
|
|
15
15
|
return axiosAPI({
|
|
@@ -17,23 +17,24 @@ const apiRequest = (method, url, request) => {
|
|
|
17
17
|
url,
|
|
18
18
|
data: request,
|
|
19
19
|
headers
|
|
20
|
-
})
|
|
20
|
+
})
|
|
21
|
+
.then((res) => {
|
|
21
22
|
return Promise.resolve(res);
|
|
22
23
|
})
|
|
23
|
-
.catch(err => {
|
|
24
|
+
.catch((err) => {
|
|
24
25
|
return Promise.reject(err);
|
|
25
26
|
});
|
|
26
27
|
};
|
|
27
28
|
// function to execute the http get request
|
|
28
|
-
const get = (url, request =
|
|
29
|
+
const get = (url, request = '') => apiRequest('get', url, request);
|
|
29
30
|
// function to execute the http delete request
|
|
30
|
-
const deleteRequest = (url, request) => apiRequest(
|
|
31
|
+
const deleteRequest = (url, request) => apiRequest('delete', url, request);
|
|
31
32
|
// function to execute the http post request
|
|
32
|
-
const post = (url, request) => apiRequest(
|
|
33
|
+
const post = (url, request) => apiRequest('post', url, request);
|
|
33
34
|
// function to execute the http put request
|
|
34
|
-
const put = (url, request) => apiRequest(
|
|
35
|
+
const put = (url, request) => apiRequest('put', url, request);
|
|
35
36
|
// function to execute the http path request
|
|
36
|
-
const patch = (url, request) => apiRequest(
|
|
37
|
+
const patch = (url, request) => apiRequest('patch', url, request);
|
|
37
38
|
// expose your method to other services or actions
|
|
38
39
|
export const Api = {
|
|
39
40
|
get,
|
package/dist/stores/apistore.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { writable } from 'svelte/store';
|
|
2
|
-
export let host =
|
|
3
|
-
export let username =
|
|
4
|
-
export let password =
|
|
5
|
-
const hostStore = writable(
|
|
6
|
-
const usernameStore = writable(
|
|
7
|
-
const passwordStore = writable(
|
|
8
|
-
hostStore.subscribe(value => {
|
|
2
|
+
export let host = 'window.location.origin';
|
|
3
|
+
export let username = '';
|
|
4
|
+
export let password = '';
|
|
5
|
+
const hostStore = writable(''); //writable(window.location.origin);
|
|
6
|
+
const usernameStore = writable('');
|
|
7
|
+
const passwordStore = writable('');
|
|
8
|
+
hostStore.subscribe((value) => {
|
|
9
9
|
host = value;
|
|
10
10
|
});
|
|
11
|
-
usernameStore.subscribe(value => {
|
|
11
|
+
usernameStore.subscribe((value) => {
|
|
12
12
|
username = value;
|
|
13
13
|
});
|
|
14
|
-
passwordStore.subscribe(value => {
|
|
14
|
+
passwordStore.subscribe((value) => {
|
|
15
15
|
password = value;
|
|
16
16
|
});
|
|
17
17
|
export function setApiConfig(_host, _user, _pw) {
|
|
18
|
-
console.log(
|
|
19
|
-
hostStore.update(h => h = _host);
|
|
20
|
-
usernameStore.update(u => u = _user);
|
|
21
|
-
passwordStore.update(p => p = _pw);
|
|
18
|
+
console.log('overwrite settings');
|
|
19
|
+
hostStore.update((h) => (h = _host));
|
|
20
|
+
usernameStore.update((u) => (u = _user));
|
|
21
|
+
passwordStore.update((p) => (p = _pw));
|
|
22
22
|
}
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bexis2/bexis2-core-ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.26",
|
|
4
4
|
"private": false,
|
|
5
5
|
"scripts": {
|
|
6
|
-
"dev": "vite dev",
|
|
7
|
-
"package": "svelte-package",
|
|
6
|
+
"dev": "vite dev --host",
|
|
7
|
+
"package": "svelte-package --watch",
|
|
8
8
|
"build": "vite build",
|
|
9
9
|
"build package": "svelte-kit sync && svelte-package --watch",
|
|
10
10
|
"preview": "vite preview",
|
|
@@ -25,6 +25,9 @@
|
|
|
25
25
|
"@sveltejs/adapter-static": "^2.0.2",
|
|
26
26
|
"@sveltejs/kit": "^1.5.0",
|
|
27
27
|
"@sveltejs/package": "^2.0.2",
|
|
28
|
+
"@tailwindcss/forms": "^0.5.3",
|
|
29
|
+
"@tailwindcss/line-clamp": "^0.4.2",
|
|
30
|
+
"@tailwindcss/typography": "^0.5.9",
|
|
28
31
|
"@typescript-eslint/eslint-plugin": "^5.45.0",
|
|
29
32
|
"@typescript-eslint/parser": "^5.45.0",
|
|
30
33
|
"autoprefixer": "^10.4.14",
|
|
@@ -34,9 +37,11 @@
|
|
|
34
37
|
"postcss": "^8.4.23",
|
|
35
38
|
"prettier": "^2.8.0",
|
|
36
39
|
"prettier-plugin-svelte": "^2.8.1",
|
|
40
|
+
"raw-loader": "^4.0.2",
|
|
37
41
|
"svelte": "^3.54.0",
|
|
38
42
|
"svelte-check": "^3.0.1",
|
|
39
43
|
"svelte-fa": "^3.0.3",
|
|
44
|
+
"svelte-headless-table": "^0.17.3",
|
|
40
45
|
"tailwindcss": "^3.3.2",
|
|
41
46
|
"tslib": "^2.4.1",
|
|
42
47
|
"typescript": "^5.0.0",
|
|
@@ -56,14 +61,18 @@
|
|
|
56
61
|
"src/lib"
|
|
57
62
|
],
|
|
58
63
|
"dependencies": {
|
|
64
|
+
"@floating-ui/dom": "^1.2.7",
|
|
59
65
|
"@fortawesome/fontawesome-free": "^6.2.1",
|
|
60
66
|
"@fortawesome/fontawesome-svg-core": "^6.2.1",
|
|
61
67
|
"@fortawesome/free-regular-svg-icons": "^6.2.1",
|
|
62
68
|
"@fortawesome/free-solid-svg-icons": "^6.2.1",
|
|
63
69
|
"axios": "^1.2.1",
|
|
70
|
+
"highlight.js": "^11.8.0",
|
|
71
|
+
"highlightjs-svelte": "^1.0.6",
|
|
64
72
|
"svelte": "^3.54.0",
|
|
65
73
|
"svelte-file-dropzone": "^2.0.1",
|
|
66
|
-
"svelte-select": "^5.6.0"
|
|
74
|
+
"svelte-select": "^5.6.0",
|
|
75
|
+
"vest": "^4.6.11"
|
|
67
76
|
},
|
|
68
77
|
"author": "David Schöne",
|
|
69
78
|
"license": "ISC",
|
|
@@ -83,6 +92,10 @@
|
|
|
83
92
|
".": {
|
|
84
93
|
"types": "./dist/index.d.ts",
|
|
85
94
|
"svelte": "./dist/index.js"
|
|
95
|
+
},
|
|
96
|
+
"./dist/index.css": {
|
|
97
|
+
"import": "./dist/index.css",
|
|
98
|
+
"require": "./dist/index.css"
|
|
86
99
|
}
|
|
87
100
|
}
|
|
88
101
|
}
|
package/src/lib/TableView.svelte
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<h1>table</h1>
|
|
1
|
+
<h1>table</h1>
|