@bagelink/vue 0.0.300 → 0.0.304

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 (51) 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/BglVideo.vue.d.ts.map +1 -1
  4. package/dist/components/Btn.vue.d.ts.map +1 -1
  5. package/dist/components/Card.vue.d.ts +6 -2
  6. package/dist/components/Card.vue.d.ts.map +1 -1
  7. package/dist/components/Carousel.vue.d.ts +64 -0
  8. package/dist/components/Carousel.vue.d.ts.map +1 -0
  9. package/dist/components/ListView.vue.d.ts +2 -26
  10. package/dist/components/ListView.vue.d.ts.map +1 -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 +0 -7
  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/TableSchema.vue.d.ts.map +1 -1
  17. package/dist/components/index.d.ts +1 -1
  18. package/dist/components/index.d.ts.map +1 -1
  19. package/dist/index.cjs +357 -212
  20. package/dist/index.mjs +358 -213
  21. package/dist/style.css +1191 -883
  22. package/dist/types/NavLink.d.ts +9 -0
  23. package/dist/types/NavLink.d.ts.map +1 -0
  24. package/package.json +3 -3
  25. package/src/components/Alert.vue +37 -16
  26. package/src/components/Avatar.vue +1 -1
  27. package/src/components/Badge.vue +50 -5
  28. package/src/components/BglVideo.vue +38 -22
  29. package/src/components/Btn.vue +137 -135
  30. package/src/components/Card.vue +46 -3
  31. package/src/components/Carousel.vue +258 -0
  32. package/src/components/ListItem.vue +1 -1
  33. package/src/components/ListView.vue +47 -38
  34. package/src/components/Modal.vue +38 -2
  35. package/src/components/ModalForm.vue +4 -2
  36. package/src/components/NavBar.vue +42 -67
  37. package/src/components/PageTitle.vue +33 -11
  38. package/src/components/TabbedLayout.vue +1 -1
  39. package/src/components/TableSchema.vue +67 -77
  40. package/src/components/index.ts +1 -1
  41. package/src/components/whatsapp/form/MsgTemplate.vue +1 -1
  42. package/src/styles/bagel.css +11 -2
  43. package/src/styles/buttons.css +1 -0
  44. package/src/styles/inputs.css +91 -92
  45. package/src/styles/layout.css +337 -18
  46. package/src/styles/loginCard.css +48 -0
  47. package/src/styles/text.css +27 -11
  48. package/src/styles/theme.css +226 -515
  49. package/src/styles/transitions.css +18 -0
  50. package/src/types/NavLink.ts +9 -0
  51. package/src/components/LangText.vue +0 -32
@@ -2,13 +2,9 @@
2
2
  <div class="table-list-wrap h-100">
3
3
  <table class="infinite-wrapper">
4
4
  <thead class="row first-row">
5
- <th
6
- class="col"
7
- v-for="field in computedSchema"
8
- :key="field.id" @click="sort(field?.id || '')"
9
- >
5
+ <th class="col" v-for="field in computedSchema" :key="field.id" @click="sort(field?.id || '')">
10
6
  <div class="flex">
11
- {{ field.id }}
7
+ {{ field.label || keyToLabel(field.id) }}
12
8
  <div class="list-arrows" :class="{ sorted: sortField === field.id }">
13
9
  <MaterialIcon :class="{ desc: sortDirection === 'DESC' }" icon="keyboard_arrow_up" />
14
10
  </div>
@@ -16,12 +12,7 @@
16
12
  </th>
17
13
  </thead>
18
14
  <tbody ref="infinite" class="rows infinite" :class="{ loading }">
19
- <tr
20
- v-for="row in data"
21
- :key="row.id"
22
- @click="selectElement(row)"
23
- class="row row-item position-relative"
24
- >
15
+ <tr v-for="row in data" :key="row.id" @click="selectElement(row)" class="row row-item position-relative">
25
16
  <td class="col" v-for="field in computedSchema" :key="`${field.id}-${row.id}`">
26
17
  <slot v-if="field.id && slots[field.id]" :name="field.id" :row="row" :field="field" />
27
18
  <div v-else>
@@ -40,14 +31,15 @@ import {
40
31
  type BglFormSchemaT,
41
32
  MaterialIcon,
42
33
  BglField,
34
+ keyToLabel,
43
35
  } from '@bagelink/vue';
44
36
 
45
37
  const slots = useSlots();
46
38
  const loading = $ref(true);
47
39
 
48
40
  const props = defineProps<{
49
- data: any[];
50
- schema: BglFormSchemaT | (() => BglFormSchemaT);
41
+ data: any[];
42
+ schema: BglFormSchemaT | (() => BglFormSchemaT);
51
43
  }>();
52
44
 
53
45
  const computedSchema = $computed(() => {
@@ -78,128 +70,126 @@ const sort = (fieldname: string) => {
78
70
 
79
71
  <style scoped>
80
72
  .list-arrows {
81
- opacity: 0;
73
+ opacity: 0;
82
74
  }
83
75
 
84
76
  .list-arrows .bgl_icon-font {
85
- transition: all ease-in-out 0.2s;
77
+ transition: all ease-in-out 0.2s;
86
78
  }
87
79
 
88
80
  .list-arrows.sorted {
89
- opacity: 1;
81
+ opacity: 1;
90
82
  }
91
83
 
92
84
  .col img {
93
- height: 35px;
94
- margin-top: -14px;
95
- margin-bottom: -14px;
96
- border-radius: 5px;
85
+ height: 35px;
86
+ margin-top: -14px;
87
+ margin-bottom: -14px;
88
+ border-radius: 5px;
97
89
  }
98
90
 
99
91
  .list-arrows.sorted .desc {
100
- transform: rotate(180deg);
92
+ transform: rotate(180deg);
101
93
  }
102
94
 
103
95
  table {
104
- border-collapse: separate;
105
- border-spacing: 0 15px;
106
- border-collapse: collapse;
96
+ border-collapse: separate;
97
+ border-spacing: 0 15px;
98
+ border-collapse: collapse;
107
99
  }
108
100
 
109
101
  th {
110
- font-weight: 400;
102
+ font-weight: 400;
111
103
  }
112
104
 
113
105
  .row {
114
- border-bottom: 1px solid var(--border-color);
115
- cursor: pointer;
106
+ border-bottom: 1px solid var(--border-color);
107
+ cursor: pointer;
116
108
  }
117
109
 
118
110
  .row.first-row {
119
- font-size: 0.8rem;
120
- color: var(--bgl-black-tint);
121
- position: sticky;
122
- top: 0;
123
- z-index: 2;
124
- background: var(--bgl-white);
125
- height: 50px;
126
- vertical-align: bottom;
111
+ font-size: 0.8rem;
112
+ color: var(--bgl-black-tint);
113
+ position: sticky;
114
+ top: 0;
115
+ z-index: 2;
116
+ background: var(--bgl-white);
117
+ height: 50px;
118
+ vertical-align: bottom;
127
119
  }
128
120
 
129
121
  .row.first-row::after {
130
- content: "";
131
- border-bottom: 1px solid var(--border-color);
132
- position: absolute;
133
- left: 0;
134
- right: 0;
135
- bottom: -1px;
122
+ content: "";
123
+ border-bottom: 1px solid var(--border-color);
124
+ position: absolute;
125
+ left: 0;
126
+ right: 0;
127
+ bottom: -1px;
136
128
  }
137
129
 
138
130
  .first-row .col {
139
- cursor: pointer;
140
- background: var(--bgl-white);
131
+ cursor: pointer;
132
+ background: var(--bgl-white);
141
133
  }
142
134
 
143
135
  .col {
144
- white-space: nowrap;
145
- padding: 14px;
146
- transition: var(--bgl-transition);
147
- line-height: 1;
148
- padding-left: 1rem;
149
- padding-right: 1rem;
150
- align-items: center;
136
+ white-space: nowrap;
137
+ padding: 0.75rem 0.5rem;
138
+ transition: var(--bgl-transition);
139
+ line-height: 1;
140
+ align-items: center;
151
141
  }
152
142
 
153
143
  .col>div {
154
- display: flex;
155
- gap: 0.5rem;
144
+ display: flex;
145
+ gap: 0.5rem;
156
146
  }
157
147
 
158
148
  .max-col-width {
159
- max-width: 30vw;
160
- overflow: hidden;
161
- text-overflow: ellipsis;
149
+ max-width: 30vw;
150
+ overflow: hidden;
151
+ text-overflow: ellipsis;
162
152
  }
163
153
 
164
154
  .col.check .bgl_icon-font {
165
- border-radius: 100%;
166
- background: var(--bgl-blue-20);
167
- color: var(--bgl-primary);
168
- width: 20px;
169
- height: 20px;
170
- display: flex;
171
- align-items: center;
172
- justify-content: center;
173
- margin-top: -2px;
155
+ border-radius: 100%;
156
+ background: var(--bgl-blue-20);
157
+ color: var(--bgl-primary);
158
+ width: 20px;
159
+ height: 20px;
160
+ display: flex;
161
+ align-items: center;
162
+ justify-content: center;
163
+ margin-top: -2px;
174
164
  }
175
165
 
176
166
  .rows {
177
- font-size: 0.8125em;
167
+ font-size: 0.8125em;
178
168
  }
179
169
 
180
170
  .table-list {
181
- height: 100%;
182
- position: relative;
183
- padding-left: 0 !important;
184
- padding-right: 0 !important;
185
- overflow: auto;
171
+ height: 100%;
172
+ position: relative;
173
+ padding-left: 0 !important;
174
+ padding-right: 0 !important;
175
+ overflow: auto;
186
176
  }
187
177
 
188
178
  .BagelTable .table-list {
189
- overflow: unset;
179
+ overflow: unset;
190
180
  }
191
181
 
192
182
  .row-item {
193
- height: 50px;
194
- transition: all 200ms ease;
183
+ height: 50px;
184
+ transition: all 200ms ease;
195
185
  }
196
186
 
197
187
  .row-item:hover {
198
- background: var(--bgl-gray-light);
188
+ background: var(--bgl-gray-light);
199
189
  }
200
190
 
201
191
  .infinite-wrapper {
202
- overflow-y: auto;
203
- width: 100%;
192
+ overflow-y: auto;
193
+ width: 100%;
204
194
  }
205
195
  </style>
@@ -1,4 +1,3 @@
1
- export { default as LangText } from './LangText.vue';
2
1
  export { default as RTXEditor } from './RTXEditor.vue';
3
2
  export { default as MaterialIcon } from './MaterialIcon.vue';
4
3
  export { default as Icon } from './MaterialIcon.vue';
@@ -24,6 +23,7 @@ export { default as ComboBox } from './ComboBox.vue';
24
23
  export { default as Alert } from './Alert.vue';
25
24
  export { default as Badge } from './Badge.vue';
26
25
  export { default as BglVideo } from './BglVideo.vue';
26
+ export { default as Carousel } from './Carousel.vue';
27
27
 
28
28
  export * from './form';
29
29
  export * from './dashboard';
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div class="main-content">
3
3
  <PageTitle>Whatsapp Template</PageTitle>
4
- <div class="view-wrapper card thin">
4
+ <div class="view-wrapper bgl_card thin">
5
5
  <div class="whatsapp-wrap">
6
6
  <div class="create-template-form">
7
7
  <BagelForm :schema="whatsappTemplateSchema" v-model="localWhatsappData" @submit="upsertTemplate" />
@@ -3,9 +3,10 @@
3
3
  @import "buttons.css";
4
4
  @import "text.css";
5
5
  @import "scrollbar.css";
6
+ @import "transitions.css";
7
+ @import "loginCard.css";
6
8
  @import "theme.css";
7
9
  @import "dark.css";
8
- @import "transitions.css";
9
10
  @import "./fonts/Ploni.css";
10
11
 
11
12
  :root {
@@ -14,12 +15,20 @@
14
15
  }
15
16
 
16
17
  body {
17
- width: 100vw;
18
+ max-width: 100vw;
18
19
  height: 100vh;
19
20
  padding: 0;
20
21
  margin: 0;
21
22
  }
22
23
 
24
+ .grid>* {
25
+ min-height: 0;
26
+ }
27
+
28
+ * {
29
+ box-sizing: border-box;
30
+ }
31
+
23
32
  @media (min-width: 992px) {}
24
33
 
25
34
  @media screen and (max-width: 910px) {
@@ -64,6 +64,7 @@
64
64
  .hover:active {
65
65
  filter: brightness(80%);
66
66
  }
67
+
67
68
  @media screen and (max-width: 910px) {
68
69
  .bgl_btn {
69
70
  padding: 0 20px;
@@ -1,212 +1,211 @@
1
1
  input,
2
2
  textarea,
3
3
  select {
4
- font-family: inherit;
5
- width: 100%;
4
+ font-family: inherit;
5
+ width: 100%;
6
6
  }
7
7
 
8
8
  .bagel-input {
9
- position: relative;
10
- display: flex;
11
- flex-direction: column;
12
- text-align: start;
13
- margin-bottom: 0.5rem;
14
- width: 100%;
15
- color: var(--bgl-black);
9
+ position: relative;
10
+ display: flex;
11
+ flex-direction: column;
12
+ text-align: start;
13
+ margin-bottom: 0.5rem;
14
+ width: 100%;
15
+ color: var(--bgl-black);
16
16
  }
17
17
 
18
18
  .bagel-input::placeholder .bagel-input label {
19
- display: block;
20
- font-size: var(--label-font-size);
21
- margin-bottom: 2px;
22
- line-height: 1.3;
19
+ display: block;
20
+ font-size: var(--label-font-size);
21
+ margin-bottom: 2px;
22
+ line-height: 1.3;
23
23
  }
24
24
 
25
25
  .bagel-input::placeholder {
26
- color: var(--placeholder-color);
26
+ color: var(--placeholder-color);
27
27
  }
28
28
 
29
29
  .bagel-input label {
30
- color: var(--label-color);
30
+ color: var(--label-color);
31
31
  }
32
32
 
33
33
  .bagel-input input,
34
34
  .bagel-input select,
35
35
  .custom-select .input {
36
- height: var(--input-height);
37
- font-size: var(--input-font-size);
36
+ height: var(--input-height);
37
+ font-size: var(--input-font-size);
38
38
  }
39
39
 
40
40
  .bagel-input input,
41
41
  .bagel-input textarea,
42
42
  .bagel-input select,
43
43
  .custom-select .input {
44
- background: var(--input-bg);
45
- border: none;
46
- padding: 0.7rem;
47
- border-radius: var(--input-border-radius);
48
- color: var(--input-color);
49
- min-width: calc(var(--input-height) * 3);
50
- width: 100%;
44
+ background: var(--input-bg);
45
+ border: none;
46
+ padding: 0.7rem;
47
+ border-radius: var(--input-border-radius);
48
+ color: var(--input-color);
49
+ min-width: calc(var(--input-height) * 3);
50
+ width: 100%;
51
51
  }
52
52
 
53
53
  .bagel-input input::placeholder,
54
54
  .bagel-input textarea::placeholder,
55
55
  .bagel-input select::placeholder,
56
56
  .custom-select .input::placeholder {
57
- color: var(--placeholder-color);
57
+ color: var(--placeholder-color);
58
58
  }
59
59
 
60
60
  .bagel-input.search-wrap {
61
- display: flex;
62
- flex-direction: row;
63
- align-items: center;
61
+ display: flex;
62
+ flex-direction: row;
63
+ align-items: center;
64
64
  }
65
65
 
66
66
  .bagel-input.search-wrap input {
67
- padding-inline-end: 2rem;
67
+ padding-inline-end: 2rem;
68
68
  }
69
69
 
70
70
  .bagel-input.search-wrap .bgl_icon-font {
71
- margin-inline-start: -1.75rem;
71
+ margin-inline-start: -1.75rem;
72
72
  }
73
73
 
74
74
  .bagel-input select {
75
- height: var(--input-height);
75
+ height: var(--input-height);
76
76
  }
77
77
 
78
78
  .bagel-input textarea {
79
- resize: vertical;
80
- min-height: calc(var(--input-height) * 3);
81
- line-height: 1.5;
79
+ resize: vertical;
80
+ min-height: calc(var(--input-height) * 3);
81
+ line-height: 1.5;
82
82
  }
83
83
 
84
84
  .bagel-input.wider input {
85
- min-width: 320px;
85
+ min-width: 320px;
86
86
  }
87
87
 
88
88
  .bagel-input input[type="radio"] {
89
- padding: 0;
90
- width: fit-content;
89
+ padding: 0;
90
+ width: fit-content;
91
91
  }
92
92
 
93
93
  .bagel-input:focus-within label {
94
- color: var(--bgl-primary);
94
+ color: var(--bgl-primary);
95
95
  }
96
96
 
97
97
  .bagel-input select.no-edit,
98
98
  .bagel-input input.no-edit,
99
99
  .bagel-input textarea.no-edit,
100
100
  .bagel-input .switch.no-edit {
101
- pointer-events: none;
102
- outline: none;
101
+ pointer-events: none;
102
+ outline: none;
103
103
  }
104
104
 
105
105
  .bagel-input label.active {
106
- color: var(--bgl-primary);
106
+ color: var(--bgl-primary);
107
107
  }
108
108
 
109
109
  .inline-80 {
110
- display: inline-block;
111
- width: 80%;
110
+ display: inline-block;
111
+ width: 80%;
112
112
  }
113
113
 
114
114
  .inline-20 {
115
- display: inline-block;
116
- width: 20%;
115
+ display: inline-block;
116
+ width: 20%;
117
117
  }
118
118
 
119
119
  .inline-10 {
120
- display: inline-block;
121
- width: 20%;
120
+ display: inline-block;
121
+ width: 20%;
122
122
  }
123
123
 
124
124
  .inline-50 {
125
- display: inline-block;
126
- width: 49%;
127
- margin: 0 0.5%;
125
+ display: inline-block;
126
+ width: 49%;
127
+ margin: 0 0.5%;
128
128
  }
129
129
 
130
130
  .custom-select .input {
131
- height: var(--input-height);
132
- font-size: var(--input-font-size);
131
+ height: var(--input-height);
132
+ font-size: var(--input-font-size);
133
133
  }
134
134
 
135
135
  .custom-select .input {
136
- background: var(--input-bg);
137
- border: none;
138
- padding: 0.7rem;
139
- border-radius: var(--input-border-radius);
140
- color: var(--input-color);
141
- min-width: calc(var(--input-height) * 3);
142
- width: 100%;
136
+ background: var(--input-bg);
137
+ border: none;
138
+ padding: 0.7rem;
139
+ border-radius: var(--input-border-radius);
140
+ color: var(--input-color);
141
+ min-width: calc(var(--input-height) * 3);
142
+ width: 100%;
143
143
  }
144
144
 
145
145
  .input.active,
146
146
  .bagel-input input:focus-visible,
147
147
  .bagel-input select:focus-visible,
148
148
  .bagel-input textarea:focus-visible {
149
- outline: none;
150
- box-shadow: inset 0 0 10px #00000012;
149
+ outline: none;
150
+ box-shadow: inset 0 0 10px #00000012;
151
151
  }
152
152
 
153
153
  .bagel-input input[type="number"]::-webkit-inner-spin-button,
154
154
  .bagel-input input[type="number"]::-webkit-outer-spin-button {
155
- -webkit-appearance: none;
155
+ -webkit-appearance: none;
156
156
  }
157
157
 
158
158
  .label-count-0 label {
159
- display: none;
159
+ display: none;
160
160
  }
161
161
 
162
162
  .label-count-0 button.bgl_btn.bgl_flatBtn {
163
- /* background: var(--bgl-blue-light); */
164
- margin-right: 5px;
163
+ margin-right: 5px;
165
164
  }
166
165
 
167
166
  .label-count-0 button.bgl_btn.bgl_flatBtn:hover {
168
- background: var(--bgl-hover-filter);
167
+ background: var(--bgl-hover-filter);
169
168
  }
170
169
 
171
170
  .bagel-input input[type="color"] {
172
- padding: 0.025rem 0.05rem;
173
- display: block;
174
- width: var(--input-height);
175
- height: var(--input-height);
176
- border: none;
177
- -webkit-appearance: none;
178
- -moz-appearance: none;
179
- appearance: none;
180
- cursor: pointer;
171
+ padding: 0.025rem 0.05rem;
172
+ display: block;
173
+ width: var(--input-height);
174
+ height: var(--input-height);
175
+ border: none;
176
+ -webkit-appearance: none;
177
+ -moz-appearance: none;
178
+ appearance: none;
179
+ cursor: pointer;
181
180
  }
182
181
 
183
182
  .bagel-input input[type="color"]::-webkit-color-swatch {
184
- border-radius: var(--input-border-radius);
185
- border: none;
186
- transition: box-shadow 200ms ease;
183
+ border-radius: var(--input-border-radius);
184
+ border: none;
185
+ transition: box-shadow 200ms ease;
187
186
  }
188
187
 
189
188
  .bagel-input input[type="color"]::-moz-color-swatch {
190
- border-radius: var(--input-border-radius);
191
- border: none;
192
- transition: box-shadow 200ms ease;
189
+ border-radius: var(--input-border-radius);
190
+ border: none;
191
+ transition: box-shadow 200ms ease;
193
192
  }
194
193
 
195
194
  .bagel-input input[type="color"]::-webkit-color-swatch:hover {
196
- box-shadow: inset 0 0 10px #00000050;
195
+ box-shadow: inset 0 0 10px #00000050;
197
196
  }
198
197
 
199
198
  .bagel-input input[type="color"]::-moz-color-swatch:hover {
200
- box-shadow: inset 0 0 10px #00000050;
199
+ box-shadow: inset 0 0 10px #00000050;
201
200
  }
202
201
 
203
202
  @media screen and (max-width: 910px) {
204
- .bagel-input.wider input {
205
- min-width: 120px;
206
- }
207
-
208
- .bagel-input label {
209
- font-size: calc(var(--input-font-size) / 1.1);
210
- line-height: 1.2;
211
- }
212
- }
203
+ .bagel-input.wider input {
204
+ min-width: 120px;
205
+ }
206
+
207
+ .bagel-input label {
208
+ font-size: calc(var(--input-font-size) / 1.1);
209
+ line-height: 1.2;
210
+ }
211
+ }