@bagelink/vue 0.0.302 → 0.0.308
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/Alert.vue.d.ts +1 -0
- package/dist/components/Alert.vue.d.ts.map +1 -1
- package/dist/components/Btn.vue.d.ts.map +1 -1
- package/dist/components/Card.vue.d.ts +6 -2
- package/dist/components/Card.vue.d.ts.map +1 -1
- package/dist/components/Carousel.vue.d.ts +64 -0
- package/dist/components/Carousel.vue.d.ts.map +1 -0
- package/dist/components/ListView.vue.d.ts +2 -26
- package/dist/components/ListView.vue.d.ts.map +1 -1
- package/dist/components/Modal.vue.d.ts +0 -1
- package/dist/components/Modal.vue.d.ts.map +1 -1
- package/dist/components/ModalForm.vue.d.ts.map +1 -1
- package/dist/components/NavBar.vue.d.ts +1 -8
- package/dist/components/NavBar.vue.d.ts.map +1 -1
- package/dist/components/PageTitle.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/TableSchema.vue.d.ts.map +1 -1
- package/dist/components/form/BglForm.vue.d.ts.map +1 -1
- package/dist/components/form/ItemRef.vue.d.ts +0 -1
- package/dist/components/form/ItemRef.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/DateInput.vue.d.ts +0 -1
- package/dist/components/form/inputs/SelectField.vue.d.ts +4 -1
- package/dist/components/form/inputs/SelectField.vue.d.ts.map +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/index.cjs +355 -211
- package/dist/index.d.ts +0 -1
- package/dist/index.mjs +356 -212
- package/dist/style.css +1166 -859
- package/dist/types/NavLink.d.ts +9 -0
- package/dist/types/NavLink.d.ts.map +1 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- 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/Alert.vue +37 -16
- package/src/components/Avatar.vue +1 -1
- package/src/components/Badge.vue +50 -5
- package/src/components/Btn.vue +137 -135
- package/src/components/Card.vue +46 -3
- package/src/components/Carousel.vue +258 -0
- package/src/components/ListItem.vue +1 -1
- package/src/components/ListView.vue +47 -38
- package/src/components/Modal.vue +38 -2
- package/src/components/ModalForm.vue +4 -2
- package/src/components/NavBar.vue +42 -67
- package/src/components/PageTitle.vue +33 -11
- package/src/components/TabbedLayout.vue +1 -1
- package/src/components/TableSchema.vue +67 -77
- package/src/components/index.ts +1 -1
- package/src/components/whatsapp/form/MsgTemplate.vue +1 -1
- package/src/styles/bagel.css +11 -2
- package/src/styles/buttons.css +1 -0
- package/src/styles/inputs.css +91 -92
- package/src/styles/layout.css +337 -18
- package/src/styles/loginCard.css +48 -0
- package/src/styles/text.css +27 -11
- package/src/styles/theme.css +226 -515
- package/src/styles/transitions.css +18 -0
- package/src/types/NavLink.ts +9 -0
- package/src/types/index.ts +1 -1
- package/dist/components/Drop.vue.d.ts +0 -34
- package/dist/components/Drop.vue.d.ts.map +0 -1
- package/dist/components/FileUploader.vue.d.ts +0 -60
- package/dist/components/FileUploader.vue.d.ts.map +0 -1
- package/src/components/LangText.vue +0 -32
package/src/components/Btn.vue
CHANGED
|
@@ -1,25 +1,23 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
</div>
|
|
22
|
-
</component>
|
|
2
|
+
<component :is="to ? 'router-link' : is" :to="to" @click.stop="onClick" :type="type" :role="role" :disabled="disabled"
|
|
3
|
+
:class="{
|
|
4
|
+
'bgl_btn-icon': icon && !slots['default'] && !value,
|
|
5
|
+
bgl_btn: !icon || slots['default'] || value,
|
|
6
|
+
thin,
|
|
7
|
+
round,
|
|
8
|
+
'bgl_flatBtn': flat,
|
|
9
|
+
'bgl_btn-border': border
|
|
10
|
+
}">
|
|
11
|
+
<div class="loading" v-if="loading" />
|
|
12
|
+
<div v-else class="bgl_btn-flex">
|
|
13
|
+
<MaterialIcon v-if="icon" :icon="icon" />
|
|
14
|
+
<slot />
|
|
15
|
+
<template v-if="!slots['default'] && value">
|
|
16
|
+
{{ value }}
|
|
17
|
+
</template>
|
|
18
|
+
<MaterialIcon v-if="props['icon.end']" :icon="props['icon.end']" />
|
|
19
|
+
</div>
|
|
20
|
+
</component>
|
|
23
21
|
</template>
|
|
24
22
|
|
|
25
23
|
<script setup lang="ts">
|
|
@@ -30,224 +28,228 @@ import type { MaterialIcons, ThemeType } from '@bagelink/vue';
|
|
|
30
28
|
import { MaterialIcon } from '@bagelink/vue';
|
|
31
29
|
|
|
32
30
|
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
|
-
|
|
31
|
+
defineProps<{
|
|
32
|
+
disabled?: boolean;
|
|
33
|
+
icon?: MaterialIcons;
|
|
34
|
+
'icon.end'?: MaterialIcons;
|
|
35
|
+
color?: ThemeType;
|
|
36
|
+
theme?: ThemeType;
|
|
37
|
+
flat?: boolean;
|
|
38
|
+
border?: boolean;
|
|
39
|
+
thin?: boolean;
|
|
40
|
+
type?: 'button' | 'submit' | 'reset';
|
|
41
|
+
loading?: boolean;
|
|
42
|
+
role?: string;
|
|
43
|
+
value?: string;
|
|
44
|
+
to?: string;
|
|
45
|
+
round?: boolean;
|
|
46
|
+
is?: string;
|
|
47
|
+
onClick?: (e: MouseEvent) => void;
|
|
48
|
+
}>(),
|
|
49
|
+
{
|
|
50
|
+
onClick: () => '',
|
|
51
|
+
loading: false,
|
|
52
|
+
round: false,
|
|
53
|
+
disabled: false,
|
|
54
|
+
type: 'button',
|
|
55
|
+
role: 'button',
|
|
56
|
+
is: 'button',
|
|
57
|
+
border: false,
|
|
58
|
+
},
|
|
61
59
|
);
|
|
62
60
|
|
|
63
61
|
const computedTheme = $computed(
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
62
|
+
() => {
|
|
63
|
+
if (props.disabled) return 'gray-light';
|
|
64
|
+
return (props?.color || props?.theme);
|
|
65
|
+
},
|
|
68
66
|
);
|
|
69
67
|
|
|
70
68
|
const computedDefaultColors = $computed(
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
69
|
+
() => ({
|
|
70
|
+
backgroundColor: 'var(--bgl-primary)',
|
|
71
|
+
color: props.flat ? 'var(--bgl-black)' : 'var(--bgl-white)',
|
|
72
|
+
}),
|
|
75
73
|
);
|
|
76
74
|
|
|
77
75
|
function getThemeColors(theme: Partial<typeof computedDefaultColors>): typeof computedDefaultColors {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
76
|
+
return ({
|
|
77
|
+
...computedDefaultColors,
|
|
78
|
+
...theme,
|
|
79
|
+
color: props.flat
|
|
80
|
+
? theme.backgroundColor as string
|
|
81
|
+
: theme.color as string,
|
|
82
|
+
});
|
|
85
83
|
}
|
|
86
84
|
|
|
87
85
|
const themes: { [key in ThemeType]: typeof computedDefaultColors } = {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
86
|
+
red: getThemeColors({ backgroundColor: 'var(--bgl-red)' }),
|
|
87
|
+
black: getThemeColors({ backgroundColor: 'var(--bgl-black)' }),
|
|
88
|
+
green: getThemeColors({ backgroundColor: 'var(--bgl-green)', color: 'var(--bgl-white)' }),
|
|
89
|
+
primary: getThemeColors({ backgroundColor: 'var(--bgl-primary)', color: 'var(--bgl-white)' }),
|
|
90
|
+
gray: getThemeColors({ backgroundColor: 'var(--bgl-gray-light)', color: 'var(--bgl-black)' }),
|
|
91
|
+
light: getThemeColors({ backgroundColor: 'var(--bgl-primary-light)', color: 'var(--bgl-primary)' }),
|
|
92
|
+
'gray-light': getThemeColors({ backgroundColor: 'var(--bgl-gray-light)', color: 'var(--bgl-gray)' }),
|
|
93
|
+
blue: getThemeColors({}),
|
|
96
94
|
};
|
|
97
95
|
|
|
98
96
|
const cumputedTextColor = $computed(
|
|
99
|
-
|
|
97
|
+
() => (themes?.[computedTheme as ThemeType]?.color || computedDefaultColors.color),
|
|
100
98
|
);
|
|
101
99
|
|
|
102
100
|
const computedBackgroundColor = $computed(
|
|
103
|
-
|
|
101
|
+
() => (themes?.[computedTheme as ThemeType]?.backgroundColor || computedDefaultColors.backgroundColor),
|
|
104
102
|
);
|
|
105
103
|
</script>
|
|
106
104
|
|
|
107
105
|
<style scoped>
|
|
106
|
+
a {
|
|
107
|
+
text-decoration: none;
|
|
108
|
+
}
|
|
109
|
+
|
|
108
110
|
.loading {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
111
|
+
border: 1px solid var(--bgl-white);
|
|
112
|
+
border-bottom: 2px solid var(--bgl-white);
|
|
113
|
+
animation: spin 1s linear infinite;
|
|
114
|
+
border-radius: 100px;
|
|
115
|
+
width: 1rem;
|
|
116
|
+
height: 1rem;
|
|
117
|
+
margin: auto;
|
|
116
118
|
}
|
|
117
119
|
|
|
118
120
|
@keyframes spin {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
121
|
+
0% {
|
|
122
|
+
transform: rotate(0deg);
|
|
123
|
+
}
|
|
122
124
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
125
|
+
100% {
|
|
126
|
+
transform: rotate(360deg);
|
|
127
|
+
}
|
|
126
128
|
}
|
|
127
129
|
|
|
128
130
|
.bgl_btn-icon {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
131
|
+
height: var(--btn-height);
|
|
132
|
+
width: var(--btn-height);
|
|
133
|
+
border-radius: 100%;
|
|
134
|
+
font-size: 1rem;
|
|
135
|
+
background: var(--bgl-primary);
|
|
136
|
+
color: var(--bgl-white);
|
|
137
|
+
flex-shrink: 0;
|
|
138
|
+
transition: var(--bgl-transition);
|
|
137
139
|
}
|
|
138
140
|
|
|
139
141
|
.bgl_btn {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
142
|
+
padding-left: var(--btn-padding);
|
|
143
|
+
padding-right: var(--btn-padding);
|
|
144
|
+
transition: var(--bgl-transition);
|
|
145
|
+
text-decoration: none;
|
|
144
146
|
}
|
|
145
147
|
|
|
146
148
|
.bgl_btn[disabled="true"] {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
+
opacity: 0.5;
|
|
150
|
+
cursor: not-allowed;
|
|
149
151
|
}
|
|
150
152
|
|
|
151
153
|
.bgl_btn-flex {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
154
|
+
display: flex;
|
|
155
|
+
align-items: center;
|
|
156
|
+
gap: 0.5rem;
|
|
157
|
+
justify-content: center;
|
|
156
158
|
}
|
|
157
159
|
|
|
158
160
|
.bgl_btn .bgl_.bgl_icon-font {
|
|
159
|
-
|
|
161
|
+
font-size: calc(var(--input-font-size) * 1.3);
|
|
160
162
|
}
|
|
161
163
|
|
|
162
164
|
.bgl_btn,
|
|
163
165
|
.bgl_btn-icon {
|
|
164
|
-
|
|
165
|
-
|
|
166
|
+
background-color: v-bind(computedBackgroundColor);
|
|
167
|
+
color: v-bind(cumputedTextColor);
|
|
166
168
|
}
|
|
167
169
|
|
|
168
170
|
.bgl_btn:hover,
|
|
169
171
|
.bgl_btn-icon:hover {
|
|
170
|
-
|
|
172
|
+
filter: var(--bgl-hover-filter);
|
|
171
173
|
}
|
|
172
174
|
|
|
173
175
|
.bgl_btn:active,
|
|
174
176
|
.bgl_btn-icon:active {
|
|
175
|
-
|
|
177
|
+
filter: var(--bgl-active-filter);
|
|
176
178
|
}
|
|
177
179
|
|
|
178
180
|
.bgl_btn.bgl_flatBtn {
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
181
|
+
padding-left: var(--btn-padding);
|
|
182
|
+
padding-right: var(--btn-padding);
|
|
183
|
+
background: transparent;
|
|
182
184
|
}
|
|
183
185
|
|
|
184
186
|
.bgl_btn-icon.bgl_flatBtn {
|
|
185
|
-
|
|
187
|
+
background: transparent;
|
|
186
188
|
}
|
|
187
189
|
|
|
188
190
|
.bgl_btn.bgl_flatBtn:hover,
|
|
189
191
|
.bgl_btn-icon.bgl_flatBtn:hover {
|
|
190
|
-
|
|
192
|
+
filter: var(--bgl-active-filter);
|
|
191
193
|
}
|
|
192
194
|
|
|
193
195
|
.bgl_btn.bgl_flatBtn:active,
|
|
194
196
|
.bgl_btn-icon.bgl_flatBtn:active {
|
|
195
|
-
|
|
196
|
-
|
|
197
|
+
background: var(--bgl-white);
|
|
198
|
+
filter: var(--bgl-hover-filter);
|
|
197
199
|
}
|
|
198
200
|
|
|
199
201
|
.bgl_btn.bgl_flatBtn.red,
|
|
200
202
|
.bgl_btn-icon.bgl_flatBtn.red {
|
|
201
|
-
|
|
203
|
+
color: var(--bgl-red);
|
|
202
204
|
}
|
|
203
205
|
|
|
204
206
|
.bgl_btn.bgl_flatBtn.light,
|
|
205
207
|
.bgl_btn-icon.bgl_flatBtn.light {
|
|
206
|
-
|
|
208
|
+
color: var(--bgl-primary-tint);
|
|
207
209
|
}
|
|
208
210
|
|
|
209
211
|
.bgl_btn.bgl_flatBtn.black,
|
|
210
212
|
.bgl_btn-icon.bgl_flatBtn.black {
|
|
211
|
-
|
|
213
|
+
color: var(--bgl-black);
|
|
212
214
|
}
|
|
213
215
|
|
|
214
216
|
.bgl_btn.bgl_flatBtn.gray,
|
|
215
217
|
.bgl_btn-icon.bgl_flatBtn.gray {
|
|
216
|
-
|
|
218
|
+
color: var(--bgl-gray);
|
|
217
219
|
}
|
|
218
220
|
|
|
219
221
|
.bgl_btn.thin {
|
|
220
|
-
|
|
221
|
-
|
|
222
|
+
padding-left: calc(var(--btn-padding) / 2);
|
|
223
|
+
padding-right: calc(var(--btn-padding) / 2);
|
|
222
224
|
}
|
|
223
225
|
|
|
224
226
|
.bgl_btn.round {
|
|
225
|
-
|
|
227
|
+
border-radius: calc(var(--btn-border-radius) * 2);
|
|
226
228
|
}
|
|
227
229
|
|
|
228
230
|
.bgl_btn-icon.thin {
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
231
|
+
height: calc(var(--btn-height) / 1.5);
|
|
232
|
+
width: calc(var(--btn-height) / 1.5);
|
|
233
|
+
line-height: 1;
|
|
232
234
|
}
|
|
233
235
|
|
|
234
236
|
[dir="rtl"] .bgl_.bgl_icon-font {
|
|
235
|
-
|
|
237
|
+
transform: rotateY(180deg);
|
|
236
238
|
}
|
|
237
239
|
|
|
238
240
|
.bgl_btn-border {
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
241
|
+
outline: 1px solid v-bind(computedBackgroundColor);
|
|
242
|
+
color: v-bind(computedBackgroundColor);
|
|
243
|
+
background: transparent;
|
|
242
244
|
}
|
|
243
245
|
|
|
244
246
|
.bgl_btn-border:hover {
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
247
|
+
color: var(--bgl-white);
|
|
248
|
+
background: v-bind(computedBackgroundColor);
|
|
249
|
+
filter: brightness(100%);
|
|
248
250
|
}
|
|
249
251
|
|
|
250
252
|
.bgl_btn-border:active {
|
|
251
|
-
|
|
253
|
+
filter: brightness(80%);
|
|
252
254
|
}
|
|
253
255
|
</style>
|
package/src/components/Card.vue
CHANGED
|
@@ -1,14 +1,57 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
|
|
2
|
+
<div
|
|
3
|
+
class="bgl_card" :class="{
|
|
4
|
+
thin, border: outline,
|
|
5
|
+
'h-100': h100,
|
|
6
|
+
[bg || '']: bg,
|
|
7
|
+
'overflow-x': overflowX,
|
|
8
|
+
'overflow-y': overflowY
|
|
9
|
+
}"
|
|
10
|
+
>
|
|
11
|
+
<slot />
|
|
4
12
|
</div>
|
|
5
13
|
</template>
|
|
6
14
|
|
|
7
15
|
<script setup lang="ts">
|
|
8
16
|
defineProps<{
|
|
9
17
|
thin?: boolean;
|
|
10
|
-
|
|
18
|
+
outline?: boolean;
|
|
11
19
|
h100?: boolean;
|
|
20
|
+
overflowX?: boolean;
|
|
21
|
+
overflowY?: boolean;
|
|
12
22
|
bg?: 'gray' | 'light' | 'dark' | 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'white' | 'transparent';
|
|
13
23
|
}>();
|
|
14
24
|
</script>
|
|
25
|
+
|
|
26
|
+
<style>
|
|
27
|
+
.bgl_card {
|
|
28
|
+
border-radius: var(--card-border-radius);
|
|
29
|
+
background: var(--bgl-white);
|
|
30
|
+
padding: 2rem 2rem;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.bgl_card.gray {
|
|
34
|
+
background: var(--bgl-gray-20);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.bgl_card.border {
|
|
38
|
+
border: 1px solid var(--border-color);
|
|
39
|
+
background-color: transparent;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.bgl_card.thin {
|
|
43
|
+
padding: 1rem 1rem;
|
|
44
|
+
}
|
|
45
|
+
.bgl_card.BagelTable {
|
|
46
|
+
height: 100%;
|
|
47
|
+
overflow: auto;
|
|
48
|
+
padding-top: 0;
|
|
49
|
+
}
|
|
50
|
+
.bgl_card.thin .tabs {
|
|
51
|
+
margin-bottom: 1rem;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.bgl_card .bgl_card.tabs-top {
|
|
55
|
+
padding: 0;
|
|
56
|
+
}
|
|
57
|
+
</style>
|