@bagelink/vue 0.0.322 → 0.0.331
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/components/ComboBox.vue.d.ts.map +1 -1
- package/dist/components/Modal.vue.d.ts +0 -1
- package/dist/components/ModalBglForm.vue.d.ts.map +1 -1
- package/dist/components/Popover.vue.d.ts +10 -0
- package/dist/components/Popover.vue.d.ts.map +1 -0
- package/dist/components/form/BglForm.vue.d.ts +1 -9
- package/dist/components/form/BglForm.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/DateInput.vue.d.ts +0 -1
- package/dist/components/form/inputs/TextArea.vue.d.ts +3 -1
- package/dist/components/form/inputs/TextArea.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/TextInput.vue.d.ts.map +1 -1
- package/dist/components/formkit/index.d.ts +1 -14
- package/dist/components/formkit/index.d.ts.map +1 -1
- package/dist/index.cjs +16 -15
- package/dist/index.d.ts +0 -1
- package/dist/index.mjs +16 -15
- package/dist/style.css +1770 -252
- package/dist/types/materialIcon.d.ts +2 -0
- package/dist/types/materialIcon.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/components/ComboBox.vue +11 -5
- package/src/components/form/BglForm.vue +50 -53
- package/src/components/form/inputs/TextInput.vue +158 -112
- package/src/styles/appearance.css +39 -0
- package/src/styles/bagel.css +2 -0
- package/src/styles/layout.css +90 -7
- package/src/styles/mobilLayout.css +1416 -0
- package/src/utils/BagelFormUtils.ts +1 -1
|
@@ -1,65 +1,110 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
2
|
+
<div
|
|
3
|
+
class="bagel-input text-input"
|
|
4
|
+
:class="{
|
|
5
|
+
dense, small, shrink, toggleEdit, editMode, code,
|
|
6
|
+
textInputIconWrap: icon,
|
|
7
|
+
txtInputIconStart: iconStart,
|
|
8
|
+
}"
|
|
9
|
+
:title="title"
|
|
10
|
+
>
|
|
11
|
+
<label :for="id">
|
|
12
|
+
{{ label }}
|
|
13
|
+
<input
|
|
14
|
+
v-if="!multiline && !autoheight && !code"
|
|
15
|
+
:title="title"
|
|
16
|
+
:autocomplete="autocomplete"
|
|
17
|
+
:id="id"
|
|
18
|
+
v-model="inputVal"
|
|
19
|
+
:type="type"
|
|
20
|
+
:rows="1"
|
|
21
|
+
ref="input"
|
|
22
|
+
:placeholder="placeholder || label"
|
|
23
|
+
:disabled="!editMode"
|
|
24
|
+
:required="required"
|
|
25
|
+
:pattern="pattern"
|
|
26
|
+
v-bind="nativeInputAttrs"
|
|
27
|
+
@dblclick="toggleEditAction"
|
|
28
|
+
>
|
|
29
|
+
<textarea
|
|
30
|
+
v-else
|
|
31
|
+
:title="title"
|
|
32
|
+
:id="id"
|
|
33
|
+
v-model="inputVal"
|
|
34
|
+
:type="type"
|
|
35
|
+
:rows="rows"
|
|
36
|
+
ref="input"
|
|
37
|
+
:placeholder="placeholder || label"
|
|
38
|
+
:disabled="!editMode"
|
|
39
|
+
:required="required"
|
|
40
|
+
:pattern="pattern"
|
|
41
|
+
v-bind="nativeInputAttrs"
|
|
42
|
+
@dblclick="toggleEditAction"
|
|
43
|
+
/>
|
|
44
|
+
<p v-if="helptext">{{ helptext }}</p>
|
|
45
|
+
</label>
|
|
46
|
+
|
|
47
|
+
<MaterialIcon
|
|
48
|
+
class="iconStart"
|
|
49
|
+
v-if="iconStart"
|
|
50
|
+
:icon="iconStart"
|
|
51
|
+
/>
|
|
52
|
+
<MaterialIcon
|
|
53
|
+
v-if="icon"
|
|
54
|
+
:icon="icon"
|
|
55
|
+
/>
|
|
56
|
+
<Btn
|
|
57
|
+
class="toggleEditBtn"
|
|
58
|
+
v-if="toggleEdit"
|
|
59
|
+
thin
|
|
60
|
+
@click="toggleEditAction"
|
|
61
|
+
:icon="editMode ? 'check' : 'edit'"
|
|
62
|
+
flat
|
|
63
|
+
/>
|
|
64
|
+
</div>
|
|
23
65
|
</template>
|
|
24
66
|
|
|
25
|
-
<script
|
|
67
|
+
<script
|
|
68
|
+
setup
|
|
69
|
+
lang="ts"
|
|
70
|
+
>
|
|
26
71
|
import { onMounted, watch } from 'vue';
|
|
27
72
|
import {
|
|
28
|
-
|
|
73
|
+
debounce, Btn, type MaterialIcons, MaterialIcon,
|
|
29
74
|
} from '@bagelink/vue';
|
|
30
75
|
|
|
31
76
|
const emit = defineEmits(['update:modelValue', 'debounce']);
|
|
32
77
|
const props = withDefaults(
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
78
|
+
defineProps<{
|
|
79
|
+
id?: string;
|
|
80
|
+
title?: string;
|
|
81
|
+
helptext?: string;
|
|
82
|
+
placeholder?: string;
|
|
83
|
+
modelValue?: string | number;
|
|
84
|
+
label?: string;
|
|
85
|
+
small?: boolean;
|
|
86
|
+
dense?: boolean;
|
|
87
|
+
required?: boolean;
|
|
88
|
+
pattern?: string;
|
|
89
|
+
shrink?: boolean;
|
|
90
|
+
toggleEdit?: boolean;
|
|
91
|
+
type?: string;
|
|
92
|
+
nativeInputAttrs?: Record<string, any>;
|
|
93
|
+
icon?: MaterialIcons;
|
|
94
|
+
iconStart?: MaterialIcons;
|
|
95
|
+
multiline?: boolean;
|
|
96
|
+
autoheight?: boolean;
|
|
97
|
+
code?: boolean;
|
|
98
|
+
lines?: number;
|
|
99
|
+
autocomplete?: string;
|
|
100
|
+
autofocus?: boolean;
|
|
101
|
+
}>(),
|
|
102
|
+
{
|
|
103
|
+
type: 'text',
|
|
104
|
+
toggleEdit: false,
|
|
105
|
+
modelValue: '',
|
|
106
|
+
autocomplete: 'off',
|
|
107
|
+
},
|
|
63
108
|
);
|
|
64
109
|
let inputVal = $ref<string | number>();
|
|
65
110
|
let editMode = $ref<boolean>(!props.toggleEdit);
|
|
@@ -67,53 +112,54 @@ let editMode = $ref<boolean>(!props.toggleEdit);
|
|
|
67
112
|
const input = $ref<HTMLInputElement>();
|
|
68
113
|
|
|
69
114
|
const toggleEditAction = () => {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
115
|
+
if (!props.toggleEdit) return;
|
|
116
|
+
if (editMode) {
|
|
117
|
+
editMode = false;
|
|
118
|
+
emit('debounce', inputVal);
|
|
119
|
+
emit('update:modelValue', inputVal as string);
|
|
120
|
+
} else {
|
|
121
|
+
editMode = true;
|
|
122
|
+
setTimeout(() => input?.focus(), 10);
|
|
123
|
+
}
|
|
79
124
|
};
|
|
80
125
|
|
|
81
126
|
const rows = $computed(() => {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
127
|
+
if (props.lines) return props.lines;
|
|
128
|
+
if (props.autoheight) return `${inputVal}`?.split('\n').length || 1;
|
|
129
|
+
if (props.multiline || props.code) return 4;
|
|
130
|
+
return 1;
|
|
86
131
|
});
|
|
87
132
|
|
|
88
133
|
watch(
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
134
|
+
() => inputVal,
|
|
135
|
+
(newVal) => {
|
|
136
|
+
if (props.toggleEdit) return;
|
|
137
|
+
if (newVal === props.modelValue) return;
|
|
138
|
+
emit('update:modelValue', newVal as string);
|
|
139
|
+
debounce(() => emit('debounce', newVal));
|
|
140
|
+
},
|
|
96
141
|
);
|
|
97
142
|
|
|
98
143
|
watch(
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
144
|
+
() => props.modelValue,
|
|
145
|
+
(newVal) => {
|
|
146
|
+
if (newVal !== inputVal) inputVal = newVal;
|
|
147
|
+
},
|
|
148
|
+
{ immediate: true },
|
|
104
149
|
);
|
|
105
150
|
|
|
106
151
|
onMounted(() => {
|
|
107
|
-
|
|
152
|
+
if (props.autofocus) setTimeout(() => input?.focus(), 10);
|
|
108
153
|
});
|
|
109
154
|
</script>
|
|
110
155
|
|
|
111
156
|
<style>
|
|
112
157
|
.bagel-input.shrink,
|
|
113
158
|
.bagel-input.shrink input {
|
|
114
|
-
|
|
115
|
-
|
|
159
|
+
min-width: unset !important;
|
|
160
|
+
/* width: auto; */
|
|
116
161
|
}
|
|
162
|
+
|
|
117
163
|
.bagel-input label {
|
|
118
164
|
font-size: var(--label-font-size);
|
|
119
165
|
}
|
|
@@ -121,76 +167,76 @@ onMounted(() => {
|
|
|
121
167
|
|
|
122
168
|
<style scoped>
|
|
123
169
|
.bagel-input textarea {
|
|
124
|
-
|
|
125
|
-
|
|
170
|
+
min-height: unset;
|
|
171
|
+
font-size: var(--input-font-size);
|
|
126
172
|
}
|
|
127
173
|
|
|
128
174
|
.bagel-input.text-input textarea {
|
|
129
|
-
|
|
175
|
+
resize: none;
|
|
130
176
|
}
|
|
131
177
|
|
|
132
178
|
.code textarea {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
179
|
+
font-family: 'Inconsolata', monospace;
|
|
180
|
+
background: var(--bgl-black) !important;
|
|
181
|
+
color: var(--bgl-white) !important;
|
|
136
182
|
}
|
|
137
183
|
|
|
138
184
|
.bagel-input.toggleEdit:hover {
|
|
139
|
-
|
|
185
|
+
background-color: var(--input-bg);
|
|
140
186
|
}
|
|
141
187
|
|
|
142
188
|
.bagel-input.small {
|
|
143
|
-
|
|
144
|
-
|
|
189
|
+
margin-bottom: 0;
|
|
190
|
+
height: 30px;
|
|
145
191
|
}
|
|
146
192
|
|
|
147
193
|
.bagel-input.dense label {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
194
|
+
display: flex;
|
|
195
|
+
align-items: center;
|
|
196
|
+
gap: 0.5rem;
|
|
151
197
|
}
|
|
152
198
|
|
|
153
199
|
.bagel-input label {
|
|
154
|
-
|
|
200
|
+
font-size: var(--label-font-size);
|
|
155
201
|
}
|
|
156
202
|
|
|
157
203
|
.toggleEditBtn {
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
204
|
+
position: absolute;
|
|
205
|
+
right: -24px;
|
|
206
|
+
top: 4;
|
|
207
|
+
opacity: 0;
|
|
162
208
|
}
|
|
163
209
|
|
|
164
210
|
.textInputIconWrap {
|
|
165
|
-
|
|
211
|
+
position: relative;
|
|
166
212
|
}
|
|
167
213
|
|
|
168
214
|
.textInputIconWrap .bgl_icon-font {
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
215
|
+
position: absolute;
|
|
216
|
+
inset-inline-end: 0.7rem;
|
|
217
|
+
bottom: 50%;
|
|
218
|
+
line-height: 0;
|
|
219
|
+
color: var(--bgl-gray);
|
|
174
220
|
}
|
|
175
221
|
|
|
176
222
|
.txtInputIconStart .iconStart {
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
223
|
+
position: absolute;
|
|
224
|
+
inset-inline-start: 0.7rem;
|
|
225
|
+
top: 50%;
|
|
226
|
+
line-height: 0;
|
|
227
|
+
color: var(--bgl-gray);
|
|
182
228
|
}
|
|
183
229
|
|
|
184
230
|
.txtInputIconStart textarea {
|
|
185
|
-
|
|
231
|
+
padding-inline-start: 2rem;
|
|
186
232
|
}
|
|
187
233
|
|
|
188
234
|
.bagel-input:hover .toggleEditBtn,
|
|
189
235
|
.bagel-input.editMode .toggleEditBtn {
|
|
190
|
-
|
|
236
|
+
opacity: 1;
|
|
191
237
|
}
|
|
192
238
|
|
|
193
239
|
.bagel-input.small textarea {
|
|
194
|
-
|
|
240
|
+
height: 30px;
|
|
195
241
|
}
|
|
196
242
|
</style>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
.opacity-1 {
|
|
2
|
+
opacity: 0.1;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.opacity-2 {
|
|
6
|
+
opacity: 0.2;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.opacity-3 {
|
|
10
|
+
opacity: 0.3;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.opacity-4 {
|
|
14
|
+
opacity: 0.4;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.opacity-5 {
|
|
18
|
+
opacity: 0.5;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.opacity-6 {
|
|
22
|
+
opacity: 0.6;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.opacity-7 {
|
|
26
|
+
opacity: 0.7;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.opacity-8 {
|
|
30
|
+
opacity: 0.8;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.opacity-9 {
|
|
34
|
+
opacity: 0.9;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.opacity-10 {
|
|
38
|
+
opacity: 1;
|
|
39
|
+
}
|
package/src/styles/bagel.css
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
@import "layout.css";
|
|
2
|
+
@import "mobilLayout.css";
|
|
2
3
|
@import "inputs.css";
|
|
3
4
|
@import "buttons.css";
|
|
4
5
|
@import "text.css";
|
|
5
6
|
@import "scrollbar.css";
|
|
6
7
|
@import "transitions.css";
|
|
7
8
|
@import "loginCard.css";
|
|
9
|
+
@import "appearance.css";
|
|
8
10
|
@import "theme.css";
|
|
9
11
|
@import "dark.css";
|
|
10
12
|
@import "./fonts/Ploni.css";
|
package/src/styles/layout.css
CHANGED
|
@@ -127,8 +127,10 @@
|
|
|
127
127
|
}
|
|
128
128
|
|
|
129
129
|
.w-100,
|
|
130
|
-
.
|
|
130
|
+
.width-100 {
|
|
131
131
|
width: 100%;
|
|
132
|
+
max-width: 100px;
|
|
133
|
+
|
|
132
134
|
}
|
|
133
135
|
|
|
134
136
|
.w300,
|
|
@@ -140,11 +142,28 @@
|
|
|
140
142
|
.w600,
|
|
141
143
|
.w650,
|
|
142
144
|
.w700,
|
|
145
|
+
.w750,
|
|
143
146
|
.w770,
|
|
147
|
+
.w800,
|
|
148
|
+
.w850,
|
|
144
149
|
.w900,
|
|
150
|
+
.w950,
|
|
145
151
|
.w970,
|
|
152
|
+
.w1000,
|
|
146
153
|
.w1030,
|
|
147
|
-
.
|
|
154
|
+
.w1050,
|
|
155
|
+
.w1100,
|
|
156
|
+
.w1150,
|
|
157
|
+
.w1170,
|
|
158
|
+
.w1200,
|
|
159
|
+
.w1250,
|
|
160
|
+
.w1300,
|
|
161
|
+
.w1350,
|
|
162
|
+
.w1400,
|
|
163
|
+
.w1450,
|
|
164
|
+
.w1500,
|
|
165
|
+
.w1550,
|
|
166
|
+
.w1600 {
|
|
148
167
|
margin-inline-start: auto;
|
|
149
168
|
margin-inline-end: auto;
|
|
150
169
|
width: 98%;
|
|
@@ -190,30 +209,98 @@
|
|
|
190
209
|
max-width: 650px;
|
|
191
210
|
}
|
|
192
211
|
|
|
193
|
-
.
|
|
212
|
+
.w700 {
|
|
194
213
|
max-width: 700px;
|
|
195
214
|
}
|
|
196
215
|
|
|
216
|
+
.w750 {
|
|
217
|
+
max-width: 750px;
|
|
218
|
+
}
|
|
219
|
+
|
|
197
220
|
.w770 {
|
|
198
221
|
max-width: 770px;
|
|
199
222
|
}
|
|
200
223
|
|
|
224
|
+
.w800 {
|
|
225
|
+
max-width: 800px;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.w850 {
|
|
229
|
+
max-width: 850px;
|
|
230
|
+
}
|
|
231
|
+
|
|
201
232
|
.w900 {
|
|
202
233
|
max-width: 900px;
|
|
203
234
|
}
|
|
204
235
|
|
|
236
|
+
.w950 {
|
|
237
|
+
max-width: 950px;
|
|
238
|
+
}
|
|
239
|
+
|
|
205
240
|
.w970 {
|
|
206
241
|
max-width: 970px;
|
|
207
242
|
}
|
|
208
243
|
|
|
244
|
+
.w1000 {
|
|
245
|
+
max-width: 1000px;
|
|
246
|
+
}
|
|
247
|
+
|
|
209
248
|
.w1030 {
|
|
210
249
|
max-width: 1030px;
|
|
211
250
|
}
|
|
212
251
|
|
|
252
|
+
.w1050 {
|
|
253
|
+
max-width: 1050px;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.w1100 {
|
|
257
|
+
max-width: 1100px;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.w1150 {
|
|
261
|
+
max-width: 1150px;
|
|
262
|
+
}
|
|
263
|
+
|
|
213
264
|
.w1170 {
|
|
214
265
|
max-width: 1170px;
|
|
215
266
|
}
|
|
216
267
|
|
|
268
|
+
.w1200 {
|
|
269
|
+
max-width: 1200px;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.w1250 {
|
|
273
|
+
max-width: 1250px;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.w1300 {
|
|
277
|
+
max-width: 1300px;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.w1350 {
|
|
281
|
+
max-width: 1350px;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.w1400 {
|
|
285
|
+
max-width: 1400px;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.w1450 {
|
|
289
|
+
max-width: 1450px;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.w1500 {
|
|
293
|
+
max-width: 1500px;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
.w1550 {
|
|
297
|
+
max-width: 1550px;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
.w1600 {
|
|
301
|
+
max-width: 1600px;
|
|
302
|
+
}
|
|
303
|
+
|
|
217
304
|
.w-all,
|
|
218
305
|
.wall {
|
|
219
306
|
width: -webkit-fill-available;
|
|
@@ -1077,10 +1164,6 @@
|
|
|
1077
1164
|
display: inline-block;
|
|
1078
1165
|
}
|
|
1079
1166
|
|
|
1080
|
-
.flex-wrap {
|
|
1081
|
-
flex-wrap: wrap;
|
|
1082
|
-
}
|
|
1083
|
-
|
|
1084
1167
|
.flex-end {
|
|
1085
1168
|
justify-content: flex-end;
|
|
1086
1169
|
}
|