@bagelink/vue 0.0.986 → 0.0.992

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 (75) hide show
  1. package/dist/components/Btn.vue.d.ts.map +1 -1
  2. package/dist/components/Loading.vue.d.ts +16 -0
  3. package/dist/components/Loading.vue.d.ts.map +1 -0
  4. package/dist/components/form/BglField.vue.d.ts.map +1 -1
  5. package/dist/components/form/inputs/CodeEditor/CodeTypes.d.ts +197 -0
  6. package/dist/components/form/inputs/CodeEditor/CodeTypes.d.ts.map +1 -0
  7. package/dist/components/form/inputs/CodeEditor/Index.vue.d.ts +15 -0
  8. package/dist/components/form/inputs/CodeEditor/Index.vue.d.ts.map +1 -0
  9. package/dist/components/form/inputs/CodeEditor/format.d.ts +2 -0
  10. package/dist/components/form/inputs/CodeEditor/format.d.ts.map +1 -0
  11. package/dist/components/form/inputs/FileUpload.vue.d.ts.map +1 -1
  12. package/dist/components/form/inputs/RichText/Toolbar.vue.d.ts +5 -3
  13. package/dist/components/form/inputs/RichText/Toolbar.vue.d.ts.map +1 -1
  14. package/dist/components/form/inputs/RichText/components/Toolbar.vue.d.ts +14 -0
  15. package/dist/components/form/inputs/RichText/components/Toolbar.vue.d.ts.map +1 -0
  16. package/dist/components/form/inputs/RichText/components/gridBox.vue.d.ts +7 -0
  17. package/dist/components/form/inputs/RichText/components/gridBox.vue.d.ts.map +1 -0
  18. package/dist/components/form/inputs/RichText/composables/useEditor.d.ts +86 -0
  19. package/dist/components/form/inputs/RichText/composables/useEditor.d.ts.map +1 -0
  20. package/dist/components/form/inputs/RichText/composables/useEditorKeyboard.d.ts +2 -0
  21. package/dist/components/form/inputs/RichText/composables/useEditorKeyboard.d.ts.map +1 -0
  22. package/dist/components/form/inputs/RichText/config.d.ts +5 -0
  23. package/dist/components/form/inputs/RichText/config.d.ts.map +1 -0
  24. package/dist/components/form/inputs/RichText/index.vue.d.ts +1 -1
  25. package/dist/components/form/inputs/RichText/index.vue.d.ts.map +1 -1
  26. package/dist/components/form/inputs/RichText/utils/formatting.d.ts +7 -0
  27. package/dist/components/form/inputs/RichText/utils/formatting.d.ts.map +1 -0
  28. package/dist/components/form/inputs/RichText/utils/media.d.ts +4 -0
  29. package/dist/components/form/inputs/RichText/utils/media.d.ts.map +1 -0
  30. package/dist/components/form/inputs/RichText/utils/selection.d.ts +4 -0
  31. package/dist/components/form/inputs/RichText/utils/selection.d.ts.map +1 -0
  32. package/dist/components/form/inputs/RichText/utils/table.d.ts +7 -0
  33. package/dist/components/form/inputs/RichText/utils/table.d.ts.map +1 -0
  34. package/dist/components/form/inputs/index.d.ts +1 -0
  35. package/dist/components/form/inputs/index.d.ts.map +1 -1
  36. package/dist/components/index.d.ts +1 -0
  37. package/dist/components/index.d.ts.map +1 -1
  38. package/dist/components/layout/TabsNav.vue.d.ts.map +1 -1
  39. package/dist/editor-CUDRLdmS.js +4 -0
  40. package/dist/editor-Cu374vEW.cjs +4 -0
  41. package/dist/editor-a8DSbb6P.js +4 -0
  42. package/dist/editor-xBt_vIha.cjs +4 -0
  43. package/dist/index.cjs +15594 -1103
  44. package/dist/index.mjs +15595 -1104
  45. package/dist/style.css +790 -511
  46. package/package.json +6 -33
  47. package/src/components/Btn.vue +113 -136
  48. package/src/components/Loading.vue +177 -0
  49. package/src/components/form/BglField.vue +2 -0
  50. package/src/components/form/inputs/CodeEditor/CodeTypes.ts +446 -0
  51. package/src/components/form/inputs/CodeEditor/Index.vue +117 -0
  52. package/src/components/form/inputs/CodeEditor/format.ts +98 -0
  53. package/src/components/form/inputs/FileUpload.vue +2 -1
  54. package/src/components/form/inputs/RichText/components/Toolbar.vue +51 -0
  55. package/src/components/form/inputs/RichText/components/gridBox.vue +51 -0
  56. package/src/components/form/inputs/RichText/composables/useEditor.ts +215 -0
  57. package/src/components/form/inputs/RichText/composables/useEditorKeyboard.ts +21 -0
  58. package/src/components/form/inputs/RichText/config.ts +73 -0
  59. package/src/components/form/inputs/RichText/editor.css +25 -0
  60. package/src/components/form/inputs/RichText/index.vue +84 -195
  61. package/src/components/form/inputs/RichText/richTextTypes.d.ts +77 -0
  62. package/src/components/form/inputs/RichText/utils/formatting.ts +98 -0
  63. package/src/components/form/inputs/RichText/utils/media.ts +42 -0
  64. package/src/components/form/inputs/RichText/utils/selection.ts +48 -0
  65. package/src/components/form/inputs/RichText/utils/table.ts +81 -0
  66. package/src/components/form/inputs/index.ts +1 -0
  67. package/src/components/index.ts +2 -2
  68. package/src/components/layout/TabsNav.vue +1 -0
  69. package/src/styles/theme.css +256 -256
  70. package/src/components/form/inputs/RichText/Toolbar.vue +0 -87
  71. package/src/components/form/inputs/RichText/formatting.ts +0 -246
  72. package/src/components/form/inputs/RichText/richtext-types.ts +0 -29
  73. package/src/components/formkit/FileUploader.vue +0 -406
  74. package/src/components/formkit/MiscFields.vue +0 -74
  75. package/src/components/formkit/Toggle.vue +0 -149
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bagelink/vue",
3
3
  "type": "module",
4
- "version": "0.0.986",
4
+ "version": "0.0.992",
5
5
  "description": "Bagel core sdk packages",
6
6
  "author": {
7
7
  "name": "Neveh Allon",
@@ -62,7 +62,8 @@
62
62
  "vue": "*",
63
63
  "vue-draggable-next": "^2.2.1",
64
64
  "vue-router": "*",
65
- "vue3-charts": "^1.1.33"
65
+ "vue3-charts": "^1.1.33",
66
+ "@vuepic/vue-datepicker": "^8.8.1"
66
67
  },
67
68
  "peerDependenciesMeta": {
68
69
  "@vuepic/vue-datepicker": {
@@ -71,49 +72,21 @@
71
72
  "vue3-charts": {
72
73
  "optional": true
73
74
  },
74
- "@formkit/vue": {
75
- "optional": true
76
- },
77
- "@formkit/core": {
78
- "optional": true
79
- },
80
75
  "vue-draggable-next": {
81
76
  "optional": true
82
- },
83
- "prosemirror-commands": {
84
- "optional": true
85
- },
86
- "prosemirror-history": {
87
- "optional": true
88
- },
89
- "prosemirror-keymap": {
90
- "optional": true
91
- },
92
- "prosemirror-model": {
93
- "optional": true
94
- },
95
- "prosemirror-schema-basic": {
96
- "optional": true
97
- },
98
- "prosemirror-state": {
99
- "optional": true
100
- },
101
- "prosemirror-view": {
102
- "optional": true
103
77
  }
104
78
  },
105
79
  "publishConfig": {
106
80
  "access": "public"
107
81
  },
108
82
  "dependencies": {
109
- "@vuepic/vue-datepicker": "^8.8.1",
83
+ "@highlightjs/vue-plugin": "^2.1.0",
84
+ "heic2any": "^0.0.4",
110
85
  "@vueuse/core": "^12.0.0",
111
86
  "axios": "^1.7.9",
112
- "heic2any": "^0.0.4",
113
87
  "floating-vue": "^5.2.2",
114
88
  "libphonenumber-js": "1.11.16",
115
- "signature_pad": "^5.0.4",
116
- "type-fest": "^4.30.0"
89
+ "signature_pad": "^5.0.4"
117
90
  },
118
91
  "scripts": {
119
92
  "dev": "tsx watch src/index.ts",
@@ -1,7 +1,8 @@
1
1
  <script setup lang="ts">
2
2
  import type { MaterialIcons, ThemeType } from '@bagelink/vue'
3
- import { MaterialIcon } from '@bagelink/vue'
3
+ import { MaterialIcon, Loading } from '@bagelink/vue'
4
4
  import { useSlots } from 'vue'
5
+ import { RouterLink } from 'vue-router'
5
6
 
6
7
  const props = withDefaults(
7
8
  defineProps<{
@@ -38,74 +39,44 @@ const props = withDefaults(
38
39
  )
39
40
 
40
41
  const isComponent = $computed(() => {
41
- if (props.to) return 'router-link'
42
+ if (props.to) return RouterLink
42
43
  if (props.href) return 'a'
43
44
  return props.is
44
45
  })
45
46
 
47
+ const bind = $computed(() => {
48
+ const obj: Record<string, any> = {}
49
+ if (props.to) obj.to = props.to
50
+ else if (props.href) obj.href = props.href
51
+ if (!props.to && !props.href) {
52
+ obj.role = props.role
53
+ obj.type = props.type
54
+ }
55
+ return obj
56
+ })
46
57
  const slots = useSlots()
47
-
48
- const computedTheme = $computed(
49
- () => {
50
- if (props.disabled) return 'gray-light'
51
- return (props.color || props.theme)
52
- },
53
- )
54
-
55
- const computedDefaultColors = $computed(
56
- () => ({
57
- backgroundColor: 'var(--bgl-primary)',
58
- color: props.flat ? 'var(--bgl-text-color)' : 'var(--bgl-light-text)',
59
- }),
60
- )
61
-
62
- function getThemeColors(theme: Partial<typeof computedDefaultColors>): typeof computedDefaultColors {
63
- return ({
64
- ...computedDefaultColors,
65
- ...theme,
66
- color: props.flat
67
- ? theme.backgroundColor as string
68
- : theme.color as string,
69
- })
70
- }
71
-
72
- const themes: Partial<Record<ThemeType, typeof computedDefaultColors>> = {
73
- 'red': getThemeColors({ backgroundColor: 'var(--bgl-red)' }),
74
- 'white': getThemeColors({ backgroundColor: 'var(--bgl-white)', color: 'var(--bgl-black)' }),
75
- 'black': getThemeColors({ backgroundColor: 'var(--bgl-black)', color: 'var(--bgl-white)' }),
76
- 'green': getThemeColors({ backgroundColor: 'var(--bgl-green)', color: 'var(--bgl-white)' }),
77
- 'primary': getThemeColors({ backgroundColor: 'var(--bgl-primary)', color: 'var(--bgl-white)' }),
78
- 'yellow': getThemeColors({ backgroundColor: 'var(--bgl-yellow)', color: 'var(--bgl-black)' }),
79
- 'gray': getThemeColors({ backgroundColor: 'var(--bgl-gray-light)', color: 'var(--bgl-black)' }),
80
- 'light': getThemeColors({ backgroundColor: 'var(--bgl-primary-light)', color: 'var(--bgl-primary)' }),
81
- 'gray-light': getThemeColors({ backgroundColor: 'var(--bgl-gray-light)', color: 'var(--bgl-gray)' }),
82
- 'blue': getThemeColors({}),
83
- }
84
-
85
- const cumputedTextColor = $computed(
86
- () => (themes[computedTheme as ThemeType]?.color ?? computedDefaultColors.color),
87
- )
88
-
89
- const computedBackgroundColor = $computed(
90
- () => (themes[computedTheme as ThemeType]?.backgroundColor ?? computedDefaultColors.backgroundColor),
91
- )
92
58
  </script>
93
59
 
94
60
  <template>
95
61
  <component
96
62
  :is="isComponent"
97
- v-ripple :href="href" :to="to" :type="type" :role="role" :disabled="disabled"
63
+ v-ripple v-bind="bind" :disabled="disabled"
64
+ class="bgl_btn"
98
65
  :class="{
99
66
  'bgl_btn-icon': icon && !slots.default && !value,
100
- 'bgl_btn': !icon || slots.default || value,
101
67
  thin,
102
68
  round,
103
- 'bgl_flatBtn': flat,
69
+ 'bgl_btn_flat': flat,
104
70
  'bgl_btn-border': border || outline,
71
+ [`bgl_btn-${color}`]: color,
72
+ [`bgl_btn-${theme}`]: theme,
105
73
  }"
74
+ :tabindex="disabled ? -1 : 0"
106
75
  @click.stop="onClick"
76
+ @keydown.enter="onClick"
77
+ @keydown.space="onClick"
107
78
  >
108
- <div v-if="loading" class="loading" />
79
+ <Loading v-if="loading" size="15" />
109
80
  <div v-else class="bgl_btn-flex">
110
81
  <MaterialIcon v-if="icon" :icon="icon" />
111
82
  <slot />
@@ -118,51 +89,93 @@ const computedBackgroundColor = $computed(
118
89
  </template>
119
90
 
120
91
  <style scoped>
121
- a {
122
- text-decoration: none;
92
+ .bgl_btn {
93
+ --btn-bg: var(--bgl-primary);
94
+ --btn-color: var(--bgl-light-text);
95
+ --btn-flat-color: var(--bgl-text-color);
123
96
  }
124
97
 
125
- .loading {
126
- border: 1px solid var(--bgl-light-text);
127
- border-bottom: 2px solid var(--bgl-light-text);
128
- animation: spin 1s linear infinite;
129
- border-radius: 100px;
130
- width: 1rem;
131
- height: 1rem;
132
- margin: auto;
98
+ .bgl_btn-green {
99
+ --btn-bg: var(--bgl-green);
100
+ --btn-color: var(--bgl-light-text);
101
+ --btn-flat-color: var(--bgl-green);
133
102
  }
134
103
 
135
- @keyframes spin {
136
- 0% {
137
- transform: rotate(0deg);
138
- }
104
+ .bgl_btn-yellow {
105
+ --btn-bg: var(--bgl-yellow);
106
+ --btn-color: var(--bgl-black);
107
+ --btn-flat-color: var(--bgl-yellow);
108
+ }
139
109
 
140
- 100% {
141
- transform: rotate(360deg);
142
- }
110
+ .bgl_btn-blue {
111
+ --btn-bg: var(--bgl-blue);
112
+ --btn-color: var(--bgl-light-text);
113
+ --btn-flat-color: var(--bgl-blue);
143
114
  }
144
115
 
145
- .bgl_btn-icon {
146
- height: var(--btn-height);
147
- width: var(--btn-height);
148
- border-radius: 100%;
149
- font-size: 1rem;
150
- background: var(--bgl-primary);
151
- color: var(--bgl-light-text);
152
- flex-shrink: 0;
153
- transition: var(--bgl-transition);
116
+ .bgl_btn-primary {
117
+ --btn-bg: var(--bgl-primary);
118
+ --btn-color: var(--bgl-light-text);
119
+ --btn-flat-color: var(--bgl-primary);
120
+ }
121
+
122
+ .bgl_btn-red {
123
+ --btn-bg: var(--bgl-red);
124
+ --btn-color: var(--bgl-light-text);
125
+ --btn-flat-color: var(--bgl-red);
126
+ }
127
+
128
+ .bgl_btn-white {
129
+ --btn-bg: var(--bgl-white);
130
+ --btn-color: var(--bgl-black);
131
+ --btn-flat-color: var(--bgl-white);
132
+ }
133
+
134
+ .bgl_btn-black {
135
+ --btn-bg: var(--bgl-black);
136
+ --btn-color: var(--bgl-light-text);
137
+ --btn-flat-color: var(--bgl-black);
138
+ }
139
+
140
+ .bgl_btn-gray {
141
+ --btn-bg: var(--bgl-gray-light);
142
+ --btn-color: var(--bgl-black);
143
+ --btn-flat-color: var(--bgl-gray);
144
+ }
145
+
146
+ .bgl_btn-light {
147
+ --btn-bg: var(--bgl-primary-light);
148
+ --btn-color: var(--bgl-primary);
149
+ --btn-flat-color: var(--bgl-primary-light);
150
+ }
151
+
152
+ .bgl_btn-gray-light {
153
+ --btn-bg: var(--bgl-gray-light);
154
+ --btn-color: var(--bgl-gray);
155
+ --btn-flat-color: var(--bgl-gray-light);
154
156
  }
155
157
 
156
158
  .bgl_btn {
157
159
  padding-left: var(--btn-padding);
158
160
  padding-right: var(--btn-padding);
159
161
  transition: var(--bgl-transition);
162
+ background: var(--btn-bg);
163
+ color: var(--btn-color);
160
164
  text-decoration: none;
161
165
  }
162
166
 
163
- .bgl_btn[disabled="true"] {
164
- opacity: 0.5;
165
- cursor: not-allowed;
167
+ .bgl_btn.bgl_btn-icon {
168
+ padding-left: 0;
169
+ padding-right: 0;
170
+ height: var(--btn-height);
171
+ width: var(--btn-height);
172
+ border-radius: 100%;
173
+ font-size: 1rem;
174
+ flex-shrink: 0;
175
+ }
176
+
177
+ a {
178
+ text-decoration: none;
166
179
  }
167
180
 
168
181
  .bgl_btn-flex {
@@ -177,74 +190,34 @@ a {
177
190
  font-size: calc(var(--input-font-size) * 1.3);
178
191
  }
179
192
 
180
- .bgl_btn,
181
- .bgl_btn-icon {
182
- background-color: v-bind(computedBackgroundColor);
183
- color: v-bind(cumputedTextColor);
184
- }
185
-
186
193
  .bgl_btn:hover,
187
194
  .bgl_btn-icon:hover {
188
195
  filter: var(--bgl-hover-filter);
189
196
  }
190
197
 
191
- .bgl_btn:active,
192
- .bgl_btn-icon:active {
198
+ .bgl_btn:active:not(:disabled),
199
+ .bgl_btn-icon:active:not(:disabled) {
193
200
  filter: var(--bgl-active-filter);
194
201
  }
195
202
 
196
- .bgl_btn.bgl_flatBtn {
197
- padding-left: var(--btn-padding);
198
- padding-right: var(--btn-padding);
199
- background: transparent;
200
- }
201
-
202
- .bgl_btn-icon.bgl_flatBtn {
203
+ .bgl_btn.bgl_btn_flat {
203
204
  background: transparent;
205
+ color: var(--btn-flat-color);
204
206
  }
205
207
 
206
- .bgl_btn.bgl_flatBtn:hover,
207
- .bgl_btn-icon.bgl_flatBtn:hover {
208
- filter: var(--bgl-hover-filter);
208
+ .bgl_btn_flat:hover:not(:disabled),
209
+ .bgl_btn-icon.bgl_btn_flat:hover:not(:disabled) {
209
210
  background: var(--bgl-gray-20);
210
- color: var(--bgl-primary);
211
211
  }
212
212
 
213
- .bgl_btn.bgl_flatBtn:active,
214
- .bgl_btn-icon.bgl_flatBtn:active {
213
+ .bgl_btn.bgl_btn_flat:active:not(:disabled),
214
+ .bgl_btn-icon.bgl_btn_flat:active:not(:disabled) {
215
215
  background: var(--bgl-gray-40);
216
- filter: var(--bgl-active-filter);
217
- color: var(--bgl-primary);
218
- }
219
-
220
- .bgl_btn.bgl_flatBtn.red,
221
- .bgl_btn-icon.bgl_flatBtn.red {
222
- color: var(--bgl-red);
223
- }
224
- .bgl_btn.bgl_flatBtn.white,
225
- .bgl_btn-icon.bgl_flatBtn.white {
226
- color: var(--bgl-light-text);
227
- }
228
-
229
- .bgl_btn.bgl_flatBtn.light,
230
- .bgl_btn-icon.bgl_flatBtn.light {
231
- color: var(--bgl-primary-tint);
232
- }
233
-
234
- .bgl_btn.bgl_flatBtn.black,
235
- .bgl_btn-icon.bgl_flatBtn.black {
236
- color: var(--bgl-text-color);
237
- }
238
-
239
- .bgl_btn.bgl_flatBtn.gray,
240
- .bgl_btn-icon.bgl_flatBtn.gray {
241
- color: var(--bgl-gray);
242
216
  }
243
217
 
244
218
  .bgl_btn.thin {
245
219
  padding-inline: calc(var(--btn-padding) / 3);
246
220
  border-radius: calc(var(--btn-border-radius) / 1.5);
247
-
248
221
  }
249
222
 
250
223
  .bgl_btn.round {
@@ -264,19 +237,23 @@ a {
264
237
  transform: rotateY(180deg);
265
238
  }
266
239
 
267
- .bgl_btn-border {
268
- outline: 1px solid v-bind(computedBackgroundColor);
269
- color: v-bind(computedBackgroundColor);
270
- background: transparent;
240
+ .bgl_btn-border, .bgl_btn-icon.bgl_btn_flat.bgl_btn-border {
241
+ border: 1px solid var(--btn-flat-color);
242
+ background: transparent;
243
+ color: var(--btn-flat-color);
271
244
  }
272
245
 
273
246
  .bgl_btn-border:hover {
274
- color: var(--bgl-light-text);
275
- background: v-bind(computedBackgroundColor);
276
- filter: brightness(100%);
247
+ color: var(--btn-flat-color);
277
248
  }
278
249
 
279
- .bgl_btn-border:active {
250
+ .bgl_btn-border:active:not(:disabled) {
280
251
  filter: brightness(80%);
281
252
  }
253
+
254
+ .bgl_btn:disabled {
255
+ opacity: 0.6;
256
+ filter: grayscale(0.3);
257
+ cursor: not-allowed;
258
+ }
282
259
  </style>
@@ -0,0 +1,177 @@
1
+ <script setup lang="ts">
2
+ type LoadingType = 'ring' | 'ellipsis' | 'bar'
3
+
4
+ const { type: theme = 'ring', size = 64, thickness, duration = 1.2, color } = defineProps<{
5
+ size?: number | string
6
+ thickness?: number | string
7
+ duration?: number | string
8
+ type?: LoadingType
9
+ color?: string
10
+ }>()
11
+
12
+ // Ensure size and units are correctly formatted
13
+ function standardSize(value: number | string | undefined, unit = 'px') {
14
+ if (!value) return `${size}${unit}`
15
+ return typeof value === 'number' ? `${value}${unit}` : value.endsWith(unit) ? value : `${value}${unit}`
16
+ }
17
+
18
+ // Computed Values
19
+ const computedSize = $computed(() => standardSize(size))
20
+ const animationDuration = $computed(() => `${duration}s`)
21
+
22
+ // Border size for ring theme (defaults to 1/8th of the size)
23
+ const computedBorder = $computed(() => {
24
+ const borderValue = thickness ?? Number.parseInt(computedSize) / 7
25
+ return standardSize(borderValue)
26
+ })
27
+ </script>
28
+
29
+ <template>
30
+ <div class="flex-center">
31
+ <!-- Bar Theme -->
32
+ <div v-if="theme === 'bar'" class="lds-bar" :style="{ animationDuration, color }" />
33
+
34
+ <!-- Ellipsis Theme -->
35
+ <div v-if="theme === 'ellipsis'" class="lds-ellipsis" :style="{ '--size': computedSize }">
36
+ <div v-for="n in 4" :key="n" :style="{ color, '--size': computedSize }" />
37
+ </div>
38
+
39
+ <!-- Ring Theme -->
40
+ <div v-if="theme === 'ring'" class="lds-ring" :style="{ '--size': computedSize, '--thickness': computedBorder }">
41
+ <div
42
+ v-for="n in 4" :key="n"
43
+ :style="{
44
+ color,
45
+ 'width':
46
+ computedSize,
47
+ 'height': computedSize,
48
+ 'borderWidth': computedBorder,
49
+ '--animation-duration': animationDuration,
50
+ '--size': computedSize,
51
+ '--thickness': computedBorder,
52
+ }"
53
+ />
54
+ </div>
55
+ </div>
56
+ </template>
57
+
58
+ <style scoped>
59
+ /* Bar Theme */
60
+ .lds-bar {
61
+ height: 4px;
62
+ width: 100%;
63
+ max-width: 130px;
64
+ --c: no-repeat linear-gradient(currentColor 0 0);
65
+ background: var(--c), var(--c), #ddd;
66
+ background-size: 60% 100%;
67
+ animation: bar-animation 3s infinite ease-in-out;
68
+ }
69
+
70
+ @keyframes bar-animation {
71
+ 0% { background-position: -150% 0, -150% 0 }
72
+ 66% { background-position: 250% 0, -150% 0 }
73
+ 100% { background-position: 250% 0, 250% 0 }
74
+ }
75
+
76
+ .lds-ring,
77
+ .lds-ring div {
78
+ box-sizing: border-box;
79
+ }
80
+ .lds-ring {
81
+ position: relative;
82
+ width: var(--size);
83
+ height: var(--size);
84
+ transform: translate(calc(var(--thickness) * -1), calc(var(--thickness) * -1));
85
+ }
86
+ .lds-ring div {
87
+ box-sizing: border-box;
88
+ display: block;
89
+ position: absolute;
90
+ width: calc(var(--size) / 1.25);
91
+ height: calc(var(--size) / 1.25);
92
+ margin: var(--thickness);
93
+ border: var(--thickness) solid currentColor;
94
+ border-radius: 50%;
95
+ animation: lds-ring var(--animation-duration) cubic-bezier(0.5, 0, 0.5, 1) infinite;
96
+ border-color: currentColor transparent transparent transparent;
97
+ }
98
+
99
+ .lds-ring div:nth-child(1) {
100
+ animation-delay: calc(var(--animation-duration) * -0.38);
101
+ }
102
+ .lds-ring div:nth-child(2) {
103
+ animation-delay: calc(var(--animation-duration) / -4);
104
+ }
105
+ .lds-ring div:nth-child(3) {
106
+ animation-delay: calc(var(--animation-duration) / -8);
107
+ }
108
+
109
+ @keyframes lds-ring {
110
+ 0% {
111
+ transform: rotate(0deg);
112
+ }
113
+ 100% {
114
+ transform: rotate(360deg);
115
+ }
116
+ }
117
+
118
+ .lds-ellipsis,
119
+ .lds-ellipsis div {
120
+ box-sizing: border-box;
121
+ }
122
+ .lds-ellipsis {
123
+ display: inline-block;
124
+ position: relative;
125
+ width: var(--size);
126
+ height: var(--size);
127
+ }
128
+ .lds-ellipsis div {
129
+ position: absolute;
130
+ top: calc(var(--size) - 40%);
131
+ width: calc(var(--size) / 5);
132
+ height:calc(var(--size) / 5);
133
+ border-radius: 50%;
134
+ background: currentColor;
135
+ animation-timing-function: cubic-bezier(0, 1, 1, 0);
136
+ }
137
+ .lds-ellipsis div:nth-child(1) {
138
+ left: calc(var(--size) / 10);
139
+ animation: lds-ellipsis1 0.6s infinite;
140
+ }
141
+ .lds-ellipsis div:nth-child(2) {
142
+ left: calc(var(--size) / 10);
143
+ animation: lds-ellipsis2 0.6s infinite;
144
+ }
145
+ .lds-ellipsis div:nth-child(3) {
146
+ left: calc(var(--size) / 2.5);
147
+ animation: lds-ellipsis2 0.6s infinite;
148
+ }
149
+ .lds-ellipsis div:nth-child(4) {
150
+ left: calc(var(--size) / 1.42);
151
+ animation: lds-ellipsis3 0.6s infinite;
152
+ }
153
+ @keyframes lds-ellipsis1 {
154
+ 0% {
155
+ transform: scale(0);
156
+ }
157
+ 100% {
158
+ transform: scale(1);
159
+ }
160
+ }
161
+ @keyframes lds-ellipsis3 {
162
+ 0% {
163
+ transform: scale(1);
164
+ }
165
+ 100% {
166
+ transform: scale(0);
167
+ }
168
+ }
169
+ @keyframes lds-ellipsis2 {
170
+ 0% {
171
+ transform: translate(0, 0);
172
+ }
173
+ 100% {
174
+ transform: translate(calc(var(--size) / 3.33), 0);
175
+ }
176
+ }
177
+ </style>
@@ -11,6 +11,7 @@ import {
11
11
  bindAttrs,
12
12
  classify,
13
13
  } from '@bagelink/vue'
14
+ import TabsNav from '../layout/TabsNav.vue'
14
15
 
15
16
  const props = withDefaults(
16
17
  defineProps<{
@@ -38,6 +39,7 @@ const is = $computed(() => {
38
39
  if (props.field.$el === 'richtext') return RichText
39
40
  if (props.field.$el === 'file') return FileUpload
40
41
  if (props.field.$el === 'date') return DateInput
42
+ if (props.field.$el === 'tabs') return TabsNav
41
43
  return props.field.$el ?? 'div'
42
44
  })
43
45