@marianmeres/stuic 1.58.0 → 1.60.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.
|
@@ -21,7 +21,8 @@ const _emptyClasses = () => ({
|
|
|
21
21
|
asterix: ""
|
|
22
22
|
});
|
|
23
23
|
const _PRESET = {
|
|
24
|
-
box: "mb-4 grid
|
|
24
|
+
box: "mb-4 grid",
|
|
25
|
+
// gap-4
|
|
25
26
|
wrap: `
|
|
26
27
|
rounded-md border border-gray-300
|
|
27
28
|
bg-gray-100
|
|
@@ -30,7 +31,8 @@ const _PRESET = {
|
|
|
30
31
|
focus-within:ring-stuic-primary
|
|
31
32
|
focus-within:ring-opacity-20
|
|
32
33
|
`,
|
|
33
|
-
label: `block flex-1`,
|
|
34
|
+
label: `block flex-1 px-2 mb-1`,
|
|
35
|
+
//
|
|
34
36
|
input: `
|
|
35
37
|
rounded-md border-0 w-full flex-1
|
|
36
38
|
bg-transparent
|
|
@@ -59,12 +61,18 @@ const _PRESET_BY_SIZE = {
|
|
|
59
61
|
}
|
|
60
62
|
};
|
|
61
63
|
export class FieldConfig {
|
|
64
|
+
//
|
|
62
65
|
static class = _emptyClasses();
|
|
63
66
|
static classBySize = {
|
|
64
67
|
sm: _emptyClasses(),
|
|
65
68
|
md: _emptyClasses(),
|
|
66
69
|
lg: _emptyClasses()
|
|
67
70
|
};
|
|
71
|
+
static labelLeft = false;
|
|
72
|
+
static labelLeftWidth = "normal";
|
|
73
|
+
//
|
|
74
|
+
static _preset = _PRESET;
|
|
75
|
+
static _presetBySize = _PRESET_BY_SIZE;
|
|
68
76
|
}
|
|
69
77
|
</script>
|
|
70
78
|
|
|
@@ -96,8 +104,8 @@ export let pattern = void 0;
|
|
|
96
104
|
export let step = void 0;
|
|
97
105
|
export let useTrim = true;
|
|
98
106
|
export let textareaAutoEnlarge = true;
|
|
99
|
-
export let labelLeft =
|
|
100
|
-
export let labelLeftWidth =
|
|
107
|
+
export let labelLeft = FieldConfig.labelLeft;
|
|
108
|
+
export let labelLeftWidth = FieldConfig.labelLeftWidth;
|
|
101
109
|
export let validate = void 0;
|
|
102
110
|
export let showAsterixOnRequired = true;
|
|
103
111
|
let validation;
|
|
@@ -150,7 +158,7 @@ $:
|
|
|
150
158
|
class:grid-cols-3={labelLeft && labelLeftWidth === 'wide'}
|
|
151
159
|
>
|
|
152
160
|
<div
|
|
153
|
-
class="flex
|
|
161
|
+
class="flex"
|
|
154
162
|
class:items-end={!labelLeft}
|
|
155
163
|
class:items-start={labelLeft}
|
|
156
164
|
class:mt-1={labelLeft}
|
|
@@ -19,6 +19,10 @@ export interface FieldConfigClassesBySize {
|
|
|
19
19
|
export declare class FieldConfig {
|
|
20
20
|
static class: FieldConfigClasses;
|
|
21
21
|
static classBySize: FieldConfigClassesBySize;
|
|
22
|
+
static labelLeft: boolean;
|
|
23
|
+
static labelLeftWidth: 'normal' | 'wide';
|
|
24
|
+
static readonly _preset: FieldConfigClasses;
|
|
25
|
+
static readonly _presetBySize: FieldConfigClassesBySize;
|
|
22
26
|
}
|
|
23
27
|
declare const __propDef: {
|
|
24
28
|
props: {
|
|
@@ -18,7 +18,8 @@ const _emptyClasses = () => ({
|
|
|
18
18
|
asterix: ""
|
|
19
19
|
});
|
|
20
20
|
const _PRESET = {
|
|
21
|
-
box: "mb-4 grid
|
|
21
|
+
box: "mb-4 grid",
|
|
22
|
+
// gap-4
|
|
22
23
|
wrap: `
|
|
23
24
|
flex items-center
|
|
24
25
|
rounded-md border border-gray-300
|
|
@@ -28,6 +29,7 @@ const _PRESET = {
|
|
|
28
29
|
focus-within:ring-stuic-primary
|
|
29
30
|
focus-within:ring-opacity-20
|
|
30
31
|
`,
|
|
32
|
+
label: `block flex-1 px-2 mb-1`,
|
|
31
33
|
input: `
|
|
32
34
|
rounded-md border-0 block w-full flex-1
|
|
33
35
|
bg-transparent
|
|
@@ -56,12 +58,18 @@ const _PRESET_BY_SIZE = {
|
|
|
56
58
|
}
|
|
57
59
|
};
|
|
58
60
|
export class FieldSelectConfig {
|
|
61
|
+
//
|
|
59
62
|
static class = _emptyClasses();
|
|
60
63
|
static classBySize = {
|
|
61
64
|
sm: _emptyClasses(),
|
|
62
65
|
md: _emptyClasses(),
|
|
63
66
|
lg: _emptyClasses()
|
|
64
67
|
};
|
|
68
|
+
static labelLeft = false;
|
|
69
|
+
static labelLeftWidth = "normal";
|
|
70
|
+
//
|
|
71
|
+
static _preset = _PRESET;
|
|
72
|
+
static _presetBySize = _PRESET_BY_SIZE;
|
|
65
73
|
}
|
|
66
74
|
</script>
|
|
67
75
|
|
|
@@ -82,8 +90,8 @@ export let required = false;
|
|
|
82
90
|
export let autofocus = void 0;
|
|
83
91
|
export let validate = void 0;
|
|
84
92
|
export let showAsterixOnRequired = true;
|
|
85
|
-
export let labelLeft =
|
|
86
|
-
export let labelLeftWidth =
|
|
93
|
+
export let labelLeft = FieldSelectConfig.labelLeft;
|
|
94
|
+
export let labelLeftWidth = FieldSelectConfig.labelLeftWidth;
|
|
87
95
|
let validation;
|
|
88
96
|
const setValidationResult = (res) => validation = res;
|
|
89
97
|
let _options = [];
|
|
@@ -142,7 +150,7 @@ $:
|
|
|
142
150
|
class:grid-cols-3={labelLeft && labelLeftWidth === 'wide'}
|
|
143
151
|
>
|
|
144
152
|
<div
|
|
145
|
-
class="flex
|
|
153
|
+
class="flex"
|
|
146
154
|
class:items-end={!labelLeft}
|
|
147
155
|
class:items-start={labelLeft}
|
|
148
156
|
class:mt-1={labelLeft}
|
|
@@ -19,6 +19,10 @@ export interface FieldSelectConfigClassesBySize {
|
|
|
19
19
|
export declare class FieldSelectConfig {
|
|
20
20
|
static class: FieldSelectConfigClasses;
|
|
21
21
|
static classBySize: FieldSelectConfigClassesBySize;
|
|
22
|
+
static labelLeft: boolean;
|
|
23
|
+
static labelLeftWidth: 'normal' | 'wide';
|
|
24
|
+
static readonly _preset: FieldSelectConfigClasses;
|
|
25
|
+
static readonly _presetBySize: FieldSelectConfigClassesBySize;
|
|
22
26
|
}
|
|
23
27
|
declare const __propDef: {
|
|
24
28
|
props: {
|