@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.
Files changed (68) hide show
  1. package/dist/components/Alert.vue.d.ts +1 -0
  2. package/dist/components/Alert.vue.d.ts.map +1 -1
  3. package/dist/components/Btn.vue.d.ts.map +1 -1
  4. package/dist/components/Card.vue.d.ts +6 -2
  5. package/dist/components/Card.vue.d.ts.map +1 -1
  6. package/dist/components/Carousel.vue.d.ts +64 -0
  7. package/dist/components/Carousel.vue.d.ts.map +1 -0
  8. package/dist/components/ListView.vue.d.ts +2 -26
  9. package/dist/components/ListView.vue.d.ts.map +1 -1
  10. package/dist/components/Modal.vue.d.ts +0 -1
  11. package/dist/components/Modal.vue.d.ts.map +1 -1
  12. package/dist/components/ModalForm.vue.d.ts.map +1 -1
  13. package/dist/components/NavBar.vue.d.ts +1 -8
  14. package/dist/components/NavBar.vue.d.ts.map +1 -1
  15. package/dist/components/PageTitle.vue.d.ts.map +1 -1
  16. package/dist/components/Popover.vue.d.ts +10 -0
  17. package/dist/components/Popover.vue.d.ts.map +1 -0
  18. package/dist/components/TableSchema.vue.d.ts.map +1 -1
  19. package/dist/components/form/BglForm.vue.d.ts.map +1 -1
  20. package/dist/components/form/ItemRef.vue.d.ts +0 -1
  21. package/dist/components/form/ItemRef.vue.d.ts.map +1 -1
  22. package/dist/components/form/inputs/DateInput.vue.d.ts +0 -1
  23. package/dist/components/form/inputs/SelectField.vue.d.ts +4 -1
  24. package/dist/components/form/inputs/SelectField.vue.d.ts.map +1 -1
  25. package/dist/components/index.d.ts +1 -1
  26. package/dist/components/index.d.ts.map +1 -1
  27. package/dist/index.cjs +355 -211
  28. package/dist/index.d.ts +0 -1
  29. package/dist/index.mjs +356 -212
  30. package/dist/style.css +1166 -859
  31. package/dist/types/NavLink.d.ts +9 -0
  32. package/dist/types/NavLink.d.ts.map +1 -0
  33. package/dist/types/index.d.ts +1 -1
  34. package/dist/types/index.d.ts.map +1 -1
  35. package/dist/types/materialIcon.d.ts +2 -0
  36. package/dist/types/materialIcon.d.ts.map +1 -0
  37. package/package.json +1 -1
  38. package/src/components/Alert.vue +37 -16
  39. package/src/components/Avatar.vue +1 -1
  40. package/src/components/Badge.vue +50 -5
  41. package/src/components/Btn.vue +137 -135
  42. package/src/components/Card.vue +46 -3
  43. package/src/components/Carousel.vue +258 -0
  44. package/src/components/ListItem.vue +1 -1
  45. package/src/components/ListView.vue +47 -38
  46. package/src/components/Modal.vue +38 -2
  47. package/src/components/ModalForm.vue +4 -2
  48. package/src/components/NavBar.vue +42 -67
  49. package/src/components/PageTitle.vue +33 -11
  50. package/src/components/TabbedLayout.vue +1 -1
  51. package/src/components/TableSchema.vue +67 -77
  52. package/src/components/index.ts +1 -1
  53. package/src/components/whatsapp/form/MsgTemplate.vue +1 -1
  54. package/src/styles/bagel.css +11 -2
  55. package/src/styles/buttons.css +1 -0
  56. package/src/styles/inputs.css +91 -92
  57. package/src/styles/layout.css +337 -18
  58. package/src/styles/loginCard.css +48 -0
  59. package/src/styles/text.css +27 -11
  60. package/src/styles/theme.css +226 -515
  61. package/src/styles/transitions.css +18 -0
  62. package/src/types/NavLink.ts +9 -0
  63. package/src/types/index.ts +1 -1
  64. package/dist/components/Drop.vue.d.ts +0 -34
  65. package/dist/components/Drop.vue.d.ts.map +0 -1
  66. package/dist/components/FileUploader.vue.d.ts +0 -60
  67. package/dist/components/FileUploader.vue.d.ts.map +0 -1
  68. package/src/components/LangText.vue +0 -32
@@ -1,25 +1,23 @@
1
1
  <template>
2
- <component
3
- :is="to ? 'router-link' : is" :to="to" @click.stop="onClick" :type="type" :role="role" :disabled="disabled"
4
- :class="{
5
- 'bgl_btn-icon': icon && !slots['default'] && !value,
6
- bgl_btn: !icon || slots['default'] || value,
7
- thin,
8
- round,
9
- 'bgl_flatBtn': flat,
10
- 'bgl_btn-border': border
11
- }"
12
- >
13
- <div class="loading" v-if="loading" />
14
- <div v-else class="bgl_btn-flex">
15
- <MaterialIcon v-if="icon" :icon="icon" />
16
- <slot />
17
- <template v-if="!slots['default'] && value">
18
- {{ value }}
19
- </template>
20
- <MaterialIcon v-if="props['icon.end']" :icon="props['icon.end']" />
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
- defineProps<{
34
- disabled?: boolean;
35
- icon?: MaterialIcons;
36
- 'icon.end'?: MaterialIcons;
37
- color?: ThemeType;
38
- theme?: ThemeType;
39
- flat?: boolean;
40
- border?: boolean;
41
- thin?: boolean;
42
- type?: 'button' | 'submit' | 'reset';
43
- loading?: boolean;
44
- role?: string;
45
- value?: string;
46
- to?: string;
47
- round?: boolean;
48
- is?: string;
49
- onClick?: (e: MouseEvent) => void;
50
- }>(),
51
- {
52
- onClick: () => '',
53
- loading: false,
54
- round: false,
55
- disabled: false,
56
- type: 'button',
57
- role: 'button',
58
- is: 'button',
59
- border: false,
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
- if (props.disabled) return 'gray-light';
66
- return (props?.color || props?.theme);
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
- backgroundColor: 'var(--bgl-primary)',
73
- color: props.flat ? 'var(--bgl-black)' : 'var(--bgl-white)',
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
- return ({
79
- ...computedDefaultColors,
80
- ...theme,
81
- color: props.flat
82
- ? theme.backgroundColor as string
83
- : theme.color as string,
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
- red: getThemeColors({ backgroundColor: 'var(--bgl-red)' }),
89
- black: getThemeColors({ backgroundColor: 'var(--bgl-black)' }),
90
- green: getThemeColors({ backgroundColor: 'var(--bgl-green)', color: 'var(--bgl-white)' }),
91
- primary: getThemeColors({ backgroundColor: 'var(--bgl-primary)', color: 'var(--bgl-white)' }),
92
- gray: getThemeColors({ backgroundColor: 'var(--bgl-gray-light)', color: 'var(--bgl-black)' }),
93
- light: getThemeColors({ backgroundColor: 'var(--bgl-primary-light)', color: 'var(--bgl-primary)' }),
94
- 'gray-light': getThemeColors({ backgroundColor: 'var(--bgl-gray-light)', color: 'var(--bgl-gray)' }),
95
- blue: getThemeColors({}),
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
- () => (themes?.[computedTheme as ThemeType]?.color || computedDefaultColors.color),
97
+ () => (themes?.[computedTheme as ThemeType]?.color || computedDefaultColors.color),
100
98
  );
101
99
 
102
100
  const computedBackgroundColor = $computed(
103
- () => (themes?.[computedTheme as ThemeType]?.backgroundColor || computedDefaultColors.backgroundColor),
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
- border: 1px solid var(--bgl-white);
110
- border-bottom: 2px solid var(--bgl-white);
111
- animation: spin 1s linear infinite;
112
- border-radius: 100px;
113
- width: 1rem;
114
- height: 1rem;
115
- margin: auto;
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
- 0% {
120
- transform: rotate(0deg);
121
- }
121
+ 0% {
122
+ transform: rotate(0deg);
123
+ }
122
124
 
123
- 100% {
124
- transform: rotate(360deg);
125
- }
125
+ 100% {
126
+ transform: rotate(360deg);
127
+ }
126
128
  }
127
129
 
128
130
  .bgl_btn-icon {
129
- height: var(--btn-height);
130
- width: var(--btn-height);
131
- border-radius: 100%;
132
- font-size: 1rem;
133
- background: var(--bgl-primary);
134
- color: var(--bgl-white);
135
- flex-shrink: 0;
136
- transition: var(--bgl-transition);
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
- padding-left: var(--btn-padding);
141
- padding-right: var(--btn-padding);
142
- transition: var(--bgl-transition);
143
- text-decoration: none;
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
- opacity: 0.5;
148
- cursor: not-allowed;
149
+ opacity: 0.5;
150
+ cursor: not-allowed;
149
151
  }
150
152
 
151
153
  .bgl_btn-flex {
152
- display: flex;
153
- align-items: center;
154
- gap: 0.5rem;
155
- justify-content: center;
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
- font-size: calc(var(--input-font-size) * 1.3);
161
+ font-size: calc(var(--input-font-size) * 1.3);
160
162
  }
161
163
 
162
164
  .bgl_btn,
163
165
  .bgl_btn-icon {
164
- background-color: v-bind(computedBackgroundColor);
165
- color: v-bind(cumputedTextColor);
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
- filter: var(--bgl-hover-filter);
172
+ filter: var(--bgl-hover-filter);
171
173
  }
172
174
 
173
175
  .bgl_btn:active,
174
176
  .bgl_btn-icon:active {
175
- filter: var(--bgl-active-filter);
177
+ filter: var(--bgl-active-filter);
176
178
  }
177
179
 
178
180
  .bgl_btn.bgl_flatBtn {
179
- padding-left: var(--btn-padding);
180
- padding-right: var(--btn-padding);
181
- background: transparent;
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
- background: transparent;
187
+ background: transparent;
186
188
  }
187
189
 
188
190
  .bgl_btn.bgl_flatBtn:hover,
189
191
  .bgl_btn-icon.bgl_flatBtn:hover {
190
- filter: var(--bgl-active-filter);
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
- background: var(--bgl-white);
196
- filter: var(--bgl-hover-filter);
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
- color: var(--bgl-red);
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
- color: var(--bgl-primary-tint);
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
- color: var(--bgl-black);
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
- color: var(--bgl-gray);
218
+ color: var(--bgl-gray);
217
219
  }
218
220
 
219
221
  .bgl_btn.thin {
220
- padding-left: calc(var(--btn-padding) / 2);
221
- padding-right: calc(var(--btn-padding) / 2);
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
- border-radius: calc(var(--btn-border-radius) * 2);
227
+ border-radius: calc(var(--btn-border-radius) * 2);
226
228
  }
227
229
 
228
230
  .bgl_btn-icon.thin {
229
- height: calc(var(--btn-height) / 1.5);
230
- width: calc(var(--btn-height) / 1.5);
231
- line-height: 1;
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
- transform: rotateY(180deg);
237
+ transform: rotateY(180deg);
236
238
  }
237
239
 
238
240
  .bgl_btn-border {
239
- outline: 1px solid v-bind(computedBackgroundColor);
240
- color: v-bind(computedBackgroundColor);
241
- background: transparent;
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
- color: var(--bgl-white);
246
- background: v-bind(computedBackgroundColor);
247
- filter: brightness(100%);
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
- filter: brightness(80%);
253
+ filter: brightness(80%);
252
254
  }
253
255
  </style>
@@ -1,14 +1,57 @@
1
1
  <template>
2
- <div class="card" :class="{thin, border, 'h-100':h100, [bg||'']: bg}">
3
- <slot/>
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
- border?: boolean;
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>