@bagelink/vue 1.2.15 → 1.2.18

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 (114) hide show
  1. package/dist/components/calendar/CalendarTypes.d.ts +13 -0
  2. package/dist/components/calendar/CalendarTypes.d.ts.map +1 -0
  3. package/dist/components/calendar/Index.vue.d.ts +39 -507
  4. package/dist/components/calendar/Index.vue.d.ts.map +1 -1
  5. package/dist/components/calendar/utils.d.ts +31 -0
  6. package/dist/components/calendar/utils.d.ts.map +1 -0
  7. package/dist/components/calendar/views/AgendaView.vue.d.ts +16 -0
  8. package/dist/components/calendar/views/AgendaView.vue.d.ts.map +1 -0
  9. package/dist/components/calendar/views/DayView.vue.d.ts +50 -0
  10. package/dist/components/calendar/views/DayView.vue.d.ts.map +1 -0
  11. package/dist/components/calendar/views/MonthView.vue.d.ts +20 -0
  12. package/dist/components/calendar/views/MonthView.vue.d.ts.map +1 -0
  13. package/dist/components/calendar/views/WeekView.vue.d.ts +33 -0
  14. package/dist/components/calendar/views/WeekView.vue.d.ts.map +1 -0
  15. package/dist/components/form/BglMultiStepForm.vue.d.ts +63 -0
  16. package/dist/components/form/BglMultiStepForm.vue.d.ts.map +1 -0
  17. package/dist/components/form/index.d.ts +1 -0
  18. package/dist/components/form/index.d.ts.map +1 -1
  19. package/dist/components/form/inputs/CodeEditor/Index.vue.d.ts.map +1 -1
  20. package/dist/components/form/inputs/DateInput.vue.d.ts +3 -3
  21. package/dist/components/form/inputs/DateInput.vue.d.ts.map +1 -1
  22. package/dist/components/form/inputs/DatePicker.vue.d.ts +3 -3
  23. package/dist/components/form/inputs/DatePicker.vue.d.ts.map +1 -1
  24. package/dist/components/form/inputs/SelectInput.vue.d.ts.map +1 -1
  25. package/dist/index.cjs +2166 -3870
  26. package/dist/index.d.ts +1 -1
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/index.mjs +2167 -3871
  29. package/dist/style.css +604 -628
  30. package/dist/utils/BagelFormUtils.d.ts +4 -2
  31. package/dist/utils/BagelFormUtils.d.ts.map +1 -1
  32. package/dist/utils/calendar/EDate.d.ts +2 -0
  33. package/dist/utils/calendar/EDate.d.ts.map +1 -0
  34. package/dist/utils/calendar/Helpers.d.ts +19 -0
  35. package/dist/utils/calendar/Helpers.d.ts.map +1 -0
  36. package/dist/utils/calendar/constants.d.ts +3 -0
  37. package/dist/utils/calendar/constants.d.ts.map +1 -0
  38. package/dist/utils/calendar/dateUtils.d.ts +30 -0
  39. package/dist/utils/calendar/dateUtils.d.ts.map +1 -0
  40. package/dist/utils/calendar/event.interface.d.ts +32 -0
  41. package/dist/utils/calendar/event.interface.d.ts.map +1 -0
  42. package/dist/utils/calendar/time.d.ts +117 -0
  43. package/dist/utils/calendar/time.d.ts.map +1 -0
  44. package/dist/utils/calendar/types.d.ts +27 -0
  45. package/dist/utils/calendar/types.d.ts.map +1 -0
  46. package/dist/utils/calendar/typings.d.ts +87 -0
  47. package/dist/utils/calendar/typings.d.ts.map +1 -0
  48. package/dist/utils/calendar/week.d.ts +117 -0
  49. package/dist/utils/calendar/week.d.ts.map +1 -0
  50. package/package.json +1 -1
  51. package/src/components/calendar/CalendarTypes.ts +13 -0
  52. package/src/components/calendar/Index.vue +124 -389
  53. package/src/components/calendar/utils.ts +70 -0
  54. package/src/components/calendar/views/AgendaView.vue +263 -0
  55. package/src/components/calendar/views/DayView.vue +417 -0
  56. package/src/components/calendar/views/MonthView.vue +313 -0
  57. package/src/components/calendar/views/WeekView.vue +432 -0
  58. package/src/components/form/BglMultiStepForm.vue +323 -70
  59. package/src/components/form/index.ts +1 -0
  60. package/src/components/form/inputs/CodeEditor/Index.vue +11 -0
  61. package/src/components/form/inputs/DateInput.vue +3 -3
  62. package/src/components/form/inputs/DatePicker.vue +3 -3
  63. package/src/components/form/inputs/SelectInput.vue +2 -0
  64. package/src/components/form/inputs/Upload/upload.types.d.ts +0 -1
  65. package/src/index.ts +2 -2
  66. package/src/styles/inputs.css +138 -137
  67. package/src/styles/layout.css +3 -2
  68. package/src/styles/mobilLayout.css +4 -2
  69. package/src/utils/BagelFormUtils.ts +6 -2
  70. package/src/utils/calendar/EDate.ts +0 -0
  71. package/src/{components/calendar/helpers → utils/calendar}/Helpers.ts +6 -6
  72. package/src/utils/calendar/constants.ts +2 -0
  73. package/src/utils/{timeAgo.ts → calendar/dateUtils.ts} +38 -1
  74. package/src/utils/calendar/event.interface.ts +33 -0
  75. package/src/{components/calendar/helpers/Time.ts → utils/calendar/time.ts} +15 -15
  76. package/src/utils/calendar/types.ts +27 -0
  77. package/src/{components/calendar/typings/config.interface.ts → utils/calendar/typings.ts} +13 -6
  78. package/src/utils/calendar/week.ts +588 -0
  79. package/src/components/calendar/assets/base.css +0 -60
  80. package/src/components/calendar/components/header/Header.vue +0 -153
  81. package/src/components/calendar/components/month/AgendaEventTile.vue +0 -135
  82. package/src/components/calendar/components/month/AgendaEvents.vue +0 -72
  83. package/src/components/calendar/components/month/Day.vue +0 -256
  84. package/src/components/calendar/components/month/Event.vue +0 -164
  85. package/src/components/calendar/components/month/Month.vue +0 -241
  86. package/src/components/calendar/components/month/WeekDay.vue +0 -15
  87. package/src/components/calendar/components/partials/EventFlyout.vue +0 -430
  88. package/src/components/calendar/components/week/Day.vue +0 -198
  89. package/src/components/calendar/components/week/DayEvent.vue +0 -584
  90. package/src/components/calendar/components/week/DayTimeline.vue +0 -80
  91. package/src/components/calendar/components/week/FullDayEvent.vue +0 -121
  92. package/src/components/calendar/components/week/Week.vue +0 -414
  93. package/src/components/calendar/components/week/WeekTimeline.vue +0 -101
  94. package/src/components/calendar/constants.ts +0 -13
  95. package/src/components/calendar/helpers/DayIntervals.ts +0 -48
  96. package/src/components/calendar/helpers/EDate.ts +0 -18
  97. package/src/components/calendar/helpers/Errors.ts +0 -69
  98. package/src/components/calendar/helpers/EventChange.ts +0 -88
  99. package/src/components/calendar/helpers/EventConcurrency.ts +0 -69
  100. package/src/components/calendar/helpers/EventFlyoutPosition.ts +0 -96
  101. package/src/components/calendar/helpers/EventPosition.ts +0 -154
  102. package/src/components/calendar/helpers/EventsFilter.ts +0 -50
  103. package/src/components/calendar/helpers/Week.ts +0 -37
  104. package/src/components/calendar/language/index.ts +0 -41
  105. package/src/components/calendar/language/keys.ts +0 -99
  106. package/src/components/calendar/models/Event.ts +0 -112
  107. package/src/components/calendar/styles/_mixins.css +0 -21
  108. package/src/components/calendar/styles/_variables.css +0 -47
  109. package/src/components/calendar/typings/interfaces/day.interface.ts +0 -10
  110. package/src/components/calendar/typings/interfaces/event.interface.ts +0 -32
  111. package/src/components/calendar/typings/interfaces/full-day-events-week.type.ts +0 -8
  112. package/src/components/calendar/typings/interfaces/period.interface.ts +0 -5
  113. package/src/components/calendar/typings/interfaces/time-modes.ts +0 -11
  114. package/src/components/calendar/typings/types.ts +0 -27
@@ -3,7 +3,7 @@ import type { BglFormSchemaFnT } from '@bagelink/vue'
3
3
 
4
4
  import type { ComponentExposed, ComponentProps } from 'vue-component-type-helpers'
5
5
  import { BagelForm, Btn, useBglSchema } from '@bagelink/vue'
6
- import { watch } from 'vue'
6
+ import { ref, watch, computed } from 'vue'
7
7
 
8
8
  const props = withDefaults(
9
9
  defineProps<{
@@ -14,56 +14,123 @@ const props = withDefaults(
14
14
  )
15
15
  >
16
16
  schema: BglFormSchemaFnT<T>
17
+ showProgress?: boolean
18
+ rtl?: boolean
19
+ stepLabels?: string[]
20
+ allowStepNavigation?: boolean
21
+ validateOnSteps?: boolean
22
+ /** Animation direction - auto detects based on step change or can be forced */
23
+ direction?: 'auto' | 'left' | 'right'
17
24
  }>(),
18
25
  {
19
- bagelFormProps: () => ({})
26
+ bagelFormProps: () => ({}),
27
+ showProgress: false,
28
+ rtl: false,
29
+ allowStepNavigation: false,
30
+ validateOnSteps: true,
31
+ direction: 'auto'
20
32
  }
21
33
  )
22
34
 
23
- const emits = defineEmits(['submit'])
35
+ const emits = defineEmits(['submit', 'stepChange'])
24
36
 
25
37
  type BagelFormT = ComponentExposed<typeof BagelForm<T, P>>
26
38
 
27
- const formRef = $ref<BagelFormT>()
39
+ const formRef = ref<BagelFormT>()
28
40
 
29
- const formData = defineModel<T>(
30
- 'modelValue',
31
- { default: () => {}, required: true }
32
- )
41
+ const formData = defineModel<T>('modelValue', {
42
+ default: () => ({}),
43
+ required: true
44
+ })
45
+
46
+ const currentStep = ref(0)
47
+ const previousStep = ref(0)
48
+ const validatedSteps = ref<number[]>([])
33
49
 
34
50
  function reportValidity() {
35
- if (!formRef) return false
36
- return formRef.validateForm()
51
+ if (!formRef.value) return false
52
+ const isValid = formRef.value.validateForm()
53
+
54
+ if (isValid && !validatedSteps.value.includes(currentStep.value)) {
55
+ validatedSteps.value.push(currentStep.value)
56
+ }
57
+
58
+ return isValid
37
59
  }
38
60
 
39
- const computedSchema = $computed(
61
+ const computedSchema = computed(
40
62
  () => useBglSchema({ schema: props.schema })
41
63
  )
42
64
 
43
- const numberOfSteps = $ref(computedSchema.length)
44
-
45
- let currentStep = $ref(0)
65
+ const numberOfSteps = computed(() => computedSchema.value.length)
46
66
 
47
- const currentStepSchema = $computed(() => [computedSchema[currentStep]])
67
+ const currentStepSchema = computed(() => [computedSchema.value[currentStep.value]])
48
68
 
49
- let isStepping = $ref(false)
69
+ const isStepping = ref(false)
50
70
  let isSteppingTO: NodeJS.Timeout
71
+
72
+ // Tracks which way we're sliding (left or right)
73
+ const slideDirection = ref(props.rtl ? 'right' : 'left')
74
+
51
75
  watch(
52
- () => currentStep,
53
- () => {
76
+ () => currentStep.value,
77
+ (newStep, oldStep) => {
78
+ // Set direction based on step change
79
+ if (props.direction === 'auto') {
80
+ slideDirection.value = props.rtl
81
+ ? (newStep > oldStep ? 'right' : 'left')
82
+ : (newStep > oldStep ? 'left' : 'right')
83
+ } else {
84
+ slideDirection.value = props.direction
85
+ }
86
+
87
+ previousStep.value = oldStep
54
88
  clearTimeout(isSteppingTO)
55
- isStepping = true
56
- isSteppingTO = setTimeout(() => (isStepping = false), 600)
89
+ isStepping.value = true
90
+ isSteppingTO = setTimeout(() => (isStepping.value = false), 200)
91
+ emits('stepChange', {
92
+ newStep,
93
+ oldStep,
94
+ totalSteps: numberOfSteps.value,
95
+ direction: slideDirection.value
96
+ })
57
97
  }
58
98
  )
59
99
 
60
- const canDoNext = $computed(() => currentStep < numberOfSteps - 1)
100
+ const canDoNext = computed(() => currentStep.value < numberOfSteps.value - 1)
101
+
102
+ const isStepValidated = computed(() => (stepIndex: number) => validatedSteps.value.includes(stepIndex))
61
103
 
62
- function prevStep() { if (currentStep > 0) currentStep-- }
104
+ function prevStep() {
105
+ if (currentStep.value > 0) currentStep.value--
106
+ }
107
+
108
+ const formContainer = ref<HTMLElement>()
63
109
 
64
110
  function nextStep() {
65
- if (reportValidity() === false) return
66
- if (canDoNext) currentStep++
111
+ if (props.validateOnSteps && reportValidity() === false) return
112
+ if (canDoNext.value) currentStep.value++
113
+ }
114
+
115
+ function goToStep(stepIndex: number) {
116
+ // Can always go back, or to already validated steps
117
+ if (stepIndex < currentStep.value || validatedSteps.value.includes(stepIndex)) {
118
+ currentStep.value = stepIndex
119
+ return true
120
+ }
121
+
122
+ // For forward navigation to non-validated steps, validate current step first if needed
123
+ if (props.validateOnSteps && reportValidity() === false) {
124
+ return false
125
+ }
126
+
127
+ // Can only move one step forward at a time (prevent skipping)
128
+ if (stepIndex === currentStep.value + 1) {
129
+ currentStep.value = stepIndex
130
+ return true
131
+ }
132
+
133
+ return false
67
134
  }
68
135
 
69
136
  function handleSubmit() {
@@ -71,56 +138,242 @@ function handleSubmit() {
71
138
  emits('submit', formData.value)
72
139
  }
73
140
 
141
+ function reset() {
142
+ validatedSteps.value = []
143
+ currentStep.value = 0
144
+ // Clear form if BagelForm supports it
145
+ // if (formRef.value && typeof formRef.value.clearForm === 'function') {
146
+ // formRef.value.clearForm()
147
+ // }
148
+ }
149
+
74
150
  defineExpose({
75
151
  submit: handleSubmit,
76
- validateForm: formRef?.validateForm,
77
- // deleteItem: formRef?.deleteItem, // ! TODO: if (does not exist) remove!()
78
- isDirty: formRef?.isDirty,
79
- // clearForm: formRef?.clearForm, // ! TODO: if (does not exist) remove!()
152
+ validateForm: reportValidity,
153
+ isDirty: computed(() => formRef.value?.isDirty),
154
+ reset,
155
+ goToStep,
156
+ currentStep: computed(() => currentStep.value),
157
+ totalSteps: computed(() => numberOfSteps.value),
158
+ nextStep,
159
+ prevStep,
80
160
  })
81
161
  </script>
82
162
 
83
163
  <template>
84
- <transition
85
- :duration="600"
86
- name="fade"
87
- mode="out-in"
88
- >
89
- <template v-if="!isStepping">
90
- <div>
91
- <BagelForm
92
- ref="formRef"
93
- v-model=" formData"
94
- :schema="currentStepSchema"
95
- v-bind="bagelFormProps"
96
- >
97
- <template #success>
98
- <slot name="success" />
99
- </template>
100
- <template #error>
101
- <slot name="error" />
102
- </template>
103
- </BagelForm>
104
- </div>
105
- </template>
106
- </transition>
107
-
108
- <slot name="steppers" v-bind="{ prevStep, nextStep, submit: handleSubmit }">
109
- <Btn
110
- :disabled="currentStep === 0"
111
- value="Back"
112
- @click="prevStep"
113
- />
114
-
115
- <Btn
116
- v-if="canDoNext"
117
- value="Next"
118
- @click="nextStep"
119
- />
120
- <Btn
121
- v-else
122
- value="Submit"
123
- @click="handleSubmit"
124
- />
125
- </slot>
164
+ <div class="bgl-multi-step-form">
165
+ <!-- Progress indicator -->
166
+ <div v-if="showProgress" class="bgl-step-progress">
167
+ <slot
168
+ name="progress" v-bind="{
169
+ currentStep,
170
+ totalSteps: numberOfSteps,
171
+ goToStep,
172
+ stepLabels: props.stepLabels,
173
+ allowStepNavigation: props.allowStepNavigation,
174
+ isStepValidated,
175
+ }"
176
+ >
177
+ <div class="bgl-steps-indicator">
178
+ <div
179
+ v-for="(_, index) in numberOfSteps"
180
+ :key="index"
181
+ class="bgl-step-indicator" :class="[
182
+ { active: index === currentStep },
183
+ { completed: index < currentStep || isStepValidated(index) },
184
+ { clickable: props.allowStepNavigation },
185
+ ]"
186
+ @click="props.allowStepNavigation && goToStep(index)"
187
+ >
188
+ <span>{{ index + 1 }}</span>
189
+ <span v-if="props.stepLabels && props.stepLabels[index]" class="bgl-step-label">
190
+ {{ props.stepLabels[index] }}
191
+ </span>
192
+ </div>
193
+ </div>
194
+ </slot>
195
+ </div>
196
+
197
+ <div class="bgl-form-wrapper">
198
+ <transition
199
+ :name="slideDirection === 'right' ? 'slide-right' : 'slide-left'"
200
+ mode="out-in"
201
+ >
202
+ <div v-if="!isStepping" :key="currentStep" ref="formContainer" class="bgl-form-container">
203
+ <BagelForm
204
+ ref="formRef"
205
+ v-model="formData"
206
+ :schema="currentStepSchema"
207
+ v-bind="bagelFormProps"
208
+ >
209
+ <template v-if="$slots.success" #success>
210
+ <slot name="success" />
211
+ </template>
212
+ <template v-if="$slots.error" #error>
213
+ <slot name="error" />
214
+ </template>
215
+ </BagelForm>
216
+
217
+ <!-- Navigation buttons inside the form container to animate together -->
218
+ <div class="bgl-step-controls">
219
+ <slot
220
+ name="steppers" v-bind="{
221
+ prevStep,
222
+ nextStep,
223
+ submit: handleSubmit,
224
+ currentStep,
225
+ totalSteps: numberOfSteps,
226
+ canDoNext,
227
+ }"
228
+ >
229
+ <Btn :disabled="currentStep === 0" flat value="Back" class="px-3" @click="prevStep" />
230
+ <Btn v-if="canDoNext" value="Next" class="px-3" @click="nextStep" />
231
+ <Btn v-else value="Submit" @click="handleSubmit" />
232
+ </slot>
233
+ </div>
234
+ </div>
235
+ </transition>
236
+ </div>
237
+ </div>
126
238
  </template>
239
+
240
+ <style scoped>
241
+ .bgl-multi-step-form {
242
+ display: flex;
243
+ flex-direction: column;
244
+ gap: 1rem;
245
+ /* Default transition duration */
246
+ --transition-duration: 200ms;
247
+ --move-distance: 35%;
248
+ --ease-in: ease-in-out;
249
+ --ease-out: ease-in-out;
250
+ /* --ease-in: cubic-bezier(0.42, 0, 0.58, 1); */
251
+ /* --ease-out: cubic-bezier(0.5, 0, 0.75, 0); */
252
+ }
253
+
254
+ .bgl-steps-indicator {
255
+ display: flex;
256
+ justify-content: space-between;
257
+ align-items: center;
258
+ margin-bottom: 1rem;
259
+ }
260
+
261
+ .bgl-step-indicator {
262
+ display: flex;
263
+ flex-direction: column;
264
+ align-items: center;
265
+ position: relative;
266
+ }
267
+
268
+ .bgl-step-indicator::before {
269
+ content: '';
270
+ position: absolute;
271
+ top: 50%;
272
+ right: 50%;
273
+ height: 2px;
274
+ width: 100%;
275
+ background: #e0e0e0;
276
+ z-index: -1;
277
+ }
278
+
279
+ .bgl-step-indicator:first-child::before {
280
+ display: none;
281
+ }
282
+
283
+ .bgl-step-indicator > span:first-child {
284
+ width: 30px;
285
+ height: 30px;
286
+ border-radius: 50%;
287
+ background: #e0e0e0;
288
+ color: #555;
289
+ display: flex;
290
+ align-items: center;
291
+ justify-content: center;
292
+ margin-bottom: 0.5rem;
293
+ }
294
+
295
+ .bgl-step-indicator.active > span:first-child {
296
+ background: var(--primary-color, #4CAF50);
297
+ color: white;
298
+ }
299
+
300
+ .bgl-step-indicator.completed > span:first-child {
301
+ background: var(--success-color, #8BC34A);
302
+ color: white;
303
+ }
304
+
305
+ .bgl-step-indicator.clickable {
306
+ cursor: pointer;
307
+ }
308
+
309
+ .bgl-step-label {
310
+ font-size: 0.8rem;
311
+ max-width: 100px;
312
+ text-align: center;
313
+ }
314
+
315
+ .bgl-form-wrapper {
316
+ display: grid;
317
+ overflow: clip;
318
+ height: auto;
319
+ min-height: 300px;
320
+ transition: height var(--transition-duration) ease;
321
+ interpolate-size: allow-keywords;
322
+ }
323
+
324
+ .bgl-form-wrapper > div {
325
+ grid-area: 1 / 1;
326
+ }
327
+
328
+ .bgl-form-container {
329
+ width: 100%;
330
+ display: flex;
331
+ flex-direction: column;
332
+ }
333
+
334
+ .bgl-step-controls {
335
+ display: flex;
336
+ justify-content: center;
337
+ gap: 1rem;
338
+ margin-top: 1.5rem;
339
+ }
340
+
341
+ /* Slide Left Animation (going forward) */
342
+ .slide-left-enter-active {
343
+ transition: opacity, transform calc(var(--transition-duration) * 1.2) var(--ease-in);
344
+ }
345
+
346
+ .slide-left-leave-active {
347
+ transition: opacity, transform var(--transition-duration) var(--ease-out);
348
+ }
349
+
350
+ .slide-left-enter-from {
351
+ opacity: 0;
352
+ transform: translateX(var(--move-distance));
353
+ }
354
+
355
+ .slide-left-leave-to {
356
+ opacity: 0;
357
+ transform: translateX(-30%);
358
+ }
359
+
360
+ /* Slide Right Animation (going back) */
361
+ .slide-right-enter-active {
362
+ transition: all calc(var(--transition-duration) * 1.2) var(--ease-in);
363
+ }
364
+
365
+ .slide-right-leave-active {
366
+ transition: all var(--transition-duration) var(--ease-out);
367
+ transition-property: opacity, transform;
368
+ }
369
+
370
+ .slide-right-enter-from {
371
+ opacity: 0;
372
+ transform: translateX(-30%);
373
+ }
374
+
375
+ .slide-right-leave-to {
376
+ opacity: 0;
377
+ transform: translateX(var(--move-distance));
378
+ }
379
+ </style>
@@ -1,4 +1,5 @@
1
1
  export { default as BglForm } from './BagelForm.vue'
2
2
  export { default as BagelForm } from './BagelForm.vue'
3
+ export { default as BagelMultiStepForm } from './BglMultiStepForm.vue'
3
4
  export { default as FieldArray } from './FieldArray.vue'
4
5
  export * from './inputs'
@@ -151,6 +151,17 @@ pre code.hljs{
151
151
  background: #282c34;
152
152
  height: max-content;
153
153
  }
154
+ .code-editor-wrap:focus-within, .code-editor-wrap:focus-visible, .code-editor-wrap:focus {
155
+ box-shadow: inset 0 0 10px #00000021;
156
+ outline: solid 1px var(--border-color);
157
+ /* outline: -webkit-focus-ring-color auto 1px; */
158
+
159
+ }
160
+
161
+ .code-editor-wrap:focus-within:has(textarea:focus) + .label,
162
+ .label:has(+ .code-editor-wrap:focus-within) {
163
+ color: var(--bgl-primary) !important;
164
+ }
154
165
 
155
166
  .code-editor {
156
167
  color: transparent;
@@ -1,9 +1,9 @@
1
1
  <script setup lang="ts">
2
- import type { ModeType } from '../../calendar/typings/types'
2
+ import type { ModeType } from '../../../utils/calendar/typings'
3
3
  import { TextInput, Dropdown, formatDate } from '@bagelink/vue'
4
4
  import { onClickOutside } from '@vueuse/core'
5
5
  import { ref, onMounted } from 'vue'
6
- import { WEEK_START_DAY } from '../../calendar/helpers/Time'
6
+ import { WEEK_START_DAY } from '../../../utils/calendar/time'
7
7
  import DatePicker from './DatePicker.vue'
8
8
 
9
9
  const props = withDefaults(
@@ -30,7 +30,7 @@ const props = withDefaults(
30
30
  enableTime: false,
31
31
  editMode: true,
32
32
  small: false,
33
- mode: 'day',
33
+ mode: () => ({ mode: 'day' }),
34
34
  firstDayOfWeek: WEEK_START_DAY.SUNDAY,
35
35
  locale: ''
36
36
  },
@@ -1,8 +1,8 @@
1
1
  <script setup lang="ts">
2
- import type { DateViewMode, ModeType } from '../../calendar/typings/types'
2
+ import type { DateViewMode, ModeType } from '../../../utils/calendar/typings'
3
3
  import { Btn, NumberInput } from '@bagelink/vue'
4
4
  import { computed, ref } from 'vue'
5
- import Time, { WEEK_START_DAY } from '../../calendar/helpers/Time'
5
+ import Time, { WEEK_START_DAY } from '../../../utils/calendar/time'
6
6
 
7
7
  const props = withDefaults(
8
8
  defineProps<{
@@ -15,7 +15,7 @@ const props = withDefaults(
15
15
  enableTime?: boolean
16
16
  }>(),
17
17
  {
18
- mode: 'day',
18
+ mode: () => ({ mode: 'day' }),
19
19
  firstDayOfWeek: WEEK_START_DAY.SUNDAY,
20
20
  locale: '',
21
21
  enableTime: false
@@ -237,6 +237,7 @@ onMounted(() => {
237
237
  :placement="placement"
238
238
  class="bagel-input selectinput"
239
239
  no-auto-focus
240
+ @click.stop
240
241
  >
241
242
  <template #trigger>
242
243
  <label>
@@ -298,6 +299,7 @@ onMounted(() => {
298
299
  <Card
299
300
  class="p-05"
300
301
  :style="{ width: fullWidth ? '100%' : 'auto' }"
302
+ @click.stop
301
303
  >
302
304
  <div ref="selectOptions" class="selectinput-options" :class="{ multiselect }">
303
305
  <div
@@ -42,7 +42,6 @@ export interface QueueFile {
42
42
  uploaded?: boolean
43
43
  }
44
44
 
45
-
46
45
  export interface UploadInputProps {
47
46
  label?: string
48
47
  multiple?: boolean
package/src/index.ts CHANGED
@@ -13,7 +13,7 @@ export { ModalPlugin, useModal } from './plugins/modal'
13
13
  export * from './types'
14
14
  export * from './utils'
15
15
  export * from './utils/allCountries'
16
- export * from './utils/constants'
16
+ export * from './utils/calendar/dateUtils'
17
17
  import './styles/bagel.css'
18
18
 
19
- export * from './utils/timeAgo'
19
+ export * from './utils/constants'