@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.
@@ -1,65 +1,110 @@
1
1
  <template>
2
- <div class="bagel-input text-input" :class="{
3
- dense, small, shrink, toggleEdit, editMode, code,
4
- textInputIconWrap: icon,
5
- txtInputIconStart: iconStart,
6
- }" :title="title">
7
- <label :for="id">
8
- {{ label }}
9
- <input v-if="!multiline && !autoheight && !code" :title="title" :autocomplete="autocomplete" :id="id"
10
- v-model="inputVal" :type="type" :rows="1" ref="input" :placeholder="placeholder || label" :disabled="!editMode"
11
- :required="required" :pattern="pattern" v-bind="nativeInputAttrs" @dblclick="toggleEditAction">
12
- <textarea v-else :title="title" :id="id" v-model="inputVal" :type="type" :rows="rows" ref="input"
13
- :placeholder="placeholder || label" :disabled="!editMode" :required="required" :pattern="pattern"
14
- v-bind="nativeInputAttrs" @dblclick="toggleEditAction" />
15
- <p v-if="helptext">{{ helptext }}</p>
16
- </label>
17
-
18
- <MaterialIcon class="iconStart" v-if="iconStart" :icon="iconStart" />
19
- <MaterialIcon v-if="icon" :icon="icon" />
20
- <Btn class="toggleEditBtn" v-if="toggleEdit" thin @click="toggleEditAction" :icon="editMode ? 'check'
21
- : 'edit'" flat />
22
- </div>
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 setup lang="ts">
67
+ <script
68
+ setup
69
+ lang="ts"
70
+ >
26
71
  import { onMounted, watch } from 'vue';
27
72
  import {
28
- debounce, Btn, type MaterialIcons, MaterialIcon,
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
- defineProps<{
34
- id?: string;
35
- title?: string;
36
- helptext?: string;
37
- placeholder?: string;
38
- modelValue?: string | number;
39
- label?: string;
40
- small?: boolean;
41
- dense?: boolean;
42
- required?: boolean;
43
- pattern?: string;
44
- shrink?: boolean;
45
- toggleEdit?: boolean;
46
- type?: string;
47
- nativeInputAttrs?: Record<string, any>;
48
- icon?: MaterialIcons;
49
- iconStart?: MaterialIcons;
50
- multiline?: boolean;
51
- autoheight?: boolean;
52
- code?: boolean;
53
- lines?: number;
54
- autocomplete?: string;
55
- autofocus?: boolean;
56
- }>(),
57
- {
58
- type: 'text',
59
- toggleEdit: false,
60
- modelValue: '',
61
- autocomplete: 'off',
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
- if (!props.toggleEdit) return;
71
- if (editMode) {
72
- editMode = false;
73
- emit('debounce', inputVal);
74
- emit('update:modelValue', inputVal as string);
75
- } else {
76
- editMode = true;
77
- setTimeout(() => input?.focus(), 10);
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
- if (props.lines) return props.lines;
83
- if (props.autoheight) return `${inputVal}`?.split('\n').length || 1;
84
- if (props.multiline || props.code) return 4;
85
- return 1;
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
- () => inputVal,
90
- (newVal) => {
91
- if (props.toggleEdit) return;
92
- if (newVal === props.modelValue) return;
93
- emit('update:modelValue', newVal as string);
94
- debounce(() => emit('debounce', newVal));
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
- () => props.modelValue,
100
- (newVal) => {
101
- if (newVal !== inputVal) inputVal = newVal;
102
- },
103
- { immediate: true },
144
+ () => props.modelValue,
145
+ (newVal) => {
146
+ if (newVal !== inputVal) inputVal = newVal;
147
+ },
148
+ { immediate: true },
104
149
  );
105
150
 
106
151
  onMounted(() => {
107
- if (props.autofocus) setTimeout(() => input?.focus(), 10);
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
- min-width: unset !important;
115
- /* width: auto; */
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
- min-height: unset;
125
- font-size: var(--input-font-size);
170
+ min-height: unset;
171
+ font-size: var(--input-font-size);
126
172
  }
127
173
 
128
174
  .bagel-input.text-input textarea {
129
- resize: none;
175
+ resize: none;
130
176
  }
131
177
 
132
178
  .code textarea {
133
- font-family: 'Inconsolata', monospace;
134
- background: var(--bgl-black) !important;
135
- color: var(--bgl-white) !important;
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
- background-color: var(--input-bg);
185
+ background-color: var(--input-bg);
140
186
  }
141
187
 
142
188
  .bagel-input.small {
143
- margin-bottom: 0;
144
- height: 30px;
189
+ margin-bottom: 0;
190
+ height: 30px;
145
191
  }
146
192
 
147
193
  .bagel-input.dense label {
148
- display: flex;
149
- align-items: center;
150
- gap: 0.5rem;
194
+ display: flex;
195
+ align-items: center;
196
+ gap: 0.5rem;
151
197
  }
152
198
 
153
199
  .bagel-input label {
154
- font-size: var(--label-font-size);
200
+ font-size: var(--label-font-size);
155
201
  }
156
202
 
157
203
  .toggleEditBtn {
158
- position: absolute;
159
- right: -24px;
160
- top: 4;
161
- opacity: 0;
204
+ position: absolute;
205
+ right: -24px;
206
+ top: 4;
207
+ opacity: 0;
162
208
  }
163
209
 
164
210
  .textInputIconWrap {
165
- position: relative;
211
+ position: relative;
166
212
  }
167
213
 
168
214
  .textInputIconWrap .bgl_icon-font {
169
- position: absolute;
170
- inset-inline-end: 0.7rem;
171
- bottom: 50%;
172
- line-height: 0;
173
- color: var(--bgl-gray);
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
- position: absolute;
178
- inset-inline-start: 0.7rem;
179
- top: 50%;
180
- line-height: 0;
181
- color: var(--bgl-gray);
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
- padding-inline-start: 2rem;
231
+ padding-inline-start: 2rem;
186
232
  }
187
233
 
188
234
  .bagel-input:hover .toggleEditBtn,
189
235
  .bagel-input.editMode .toggleEditBtn {
190
- opacity: 1;
236
+ opacity: 1;
191
237
  }
192
238
 
193
239
  .bagel-input.small textarea {
194
- height: 30px;
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
+ }
@@ -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";
@@ -127,8 +127,10 @@
127
127
  }
128
128
 
129
129
  .w-100,
130
- .w100 {
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
- .w1170 {
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
- .w650 {
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
  }