@bagelink/vue 1.4.159 → 1.4.163
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/Modal.vue.d.ts.map +1 -1
- package/dist/components/calendar/CalendarPopover.vue.d.ts +2 -0
- package/dist/components/calendar/CalendarPopover.vue.d.ts.map +1 -1
- package/dist/components/calendar/CalendarTypes.d.ts +2 -0
- package/dist/components/calendar/CalendarTypes.d.ts.map +1 -1
- package/dist/components/calendar/Index.vue.d.ts +2 -0
- package/dist/components/calendar/Index.vue.d.ts.map +1 -1
- package/dist/components/calendar/views/WeekView.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/RadioGroup.vue.d.ts +6 -0
- package/dist/components/form/inputs/RadioGroup.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/RichText/index.vue.d.ts +1 -0
- package/dist/components/form/inputs/RichText/index.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/SelectInput.vue.d.ts.map +1 -1
- package/dist/components/layout/AppSidebar.vue.d.ts +1 -1
- package/dist/components/layout/AppSidebar.vue.d.ts.map +1 -1
- package/dist/index.cjs +22 -22
- package/dist/index.mjs +22 -22
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/Modal.vue +45 -23
- package/src/components/calendar/CalendarPopover.vue +20 -24
- package/src/components/calendar/CalendarTypes.ts +2 -0
- package/src/components/calendar/Index.vue +5 -5
- package/src/components/calendar/views/WeekView.vue +7 -1
- package/src/components/form/inputs/RadioGroup.vue +22 -6
- package/src/components/form/inputs/RichText/index.vue +275 -149
- package/src/components/form/inputs/SelectInput.vue +2 -2
- package/src/styles/appearance.css +10 -1
- package/src/styles/layout.css +2 -1
- package/src/styles/theme.css +1 -0
package/package.json
CHANGED
package/src/components/Modal.vue
CHANGED
|
@@ -92,49 +92,71 @@ onUnmounted(() => {
|
|
|
92
92
|
</script>
|
|
93
93
|
|
|
94
94
|
<template>
|
|
95
|
-
<div
|
|
96
|
-
|
|
95
|
+
<div
|
|
96
|
+
class="bg-dark" :style="{ zIndex }" :class="{ 'is-side': side, 'is-active': isVisible, 'bg-lignt': false }"
|
|
97
|
+
@click="() => (dismissable ? closeModal() : '')" @keydown.esc="closeModal"
|
|
98
|
+
>
|
|
97
99
|
<!-- Overlay close button -->
|
|
98
|
-
<Btn
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
100
|
+
<Btn
|
|
101
|
+
v-if="dismissable && isOverlay" icon="close" icon-mobile-size="1.4" class="fixed"
|
|
102
|
+
:class="overlayCloseClass" @click="closeModal"
|
|
103
|
+
/>
|
|
104
|
+
|
|
105
|
+
<Card
|
|
106
|
+
class="modal m_pt-0" :style="{ ...maxWidth, '--bgl-box-bg': 'var(--bgl-popup-bg)' }" :thin="thin"
|
|
107
|
+
:class="{ 'pt-0': thin, 'pt-1': !thin, 'm_mt-5': isOverlay, 'display-flex column': side }" @click.stop
|
|
108
|
+
>
|
|
103
109
|
<header v-if="slots.toolbar || title" class="tool-bar w-100p flex space-between sticky z-3 py-1">
|
|
104
110
|
<!-- Header close button -->
|
|
105
|
-
<Btn
|
|
106
|
-
|
|
111
|
+
<Btn
|
|
112
|
+
v-if="dismissable && isHeader && closePlacement === 'header'" :style="{ float: side ? '' : '' }"
|
|
113
|
+
flat icon="close" thin icon-mobile-size="1.4" @click="closeModal"
|
|
114
|
+
/>
|
|
107
115
|
<slot name="toolbar" />
|
|
108
|
-
<Title
|
|
116
|
+
<Title
|
|
117
|
+
v-if="title" class="modal-title txt-center txt20 medium my-0 w-100p ellipsis-1" tag="h3"
|
|
109
118
|
:label="title"
|
|
110
|
-
:class="{ 'me-1-5': isHeader && dismissable && closePlacement === 'header', 'ms-1-5': isHeader && dismissable && closePlacement === 'header-end' }"
|
|
119
|
+
:class="{ 'me-1-5': isHeader && dismissable && closePlacement === 'header', 'ms-1-5': isHeader && dismissable && closePlacement === 'header-end' }"
|
|
120
|
+
/>
|
|
111
121
|
<!-- Header-end close button -->
|
|
112
|
-
<Btn
|
|
122
|
+
<Btn
|
|
123
|
+
v-if="dismissable && isHeader && closePlacement === 'header-end'"
|
|
113
124
|
:style="{ float: side ? '' : '' }" flat icon="close" thin icon-mobile-size="1.4"
|
|
114
|
-
@click="closeModal"
|
|
125
|
+
@click="closeModal"
|
|
126
|
+
/>
|
|
115
127
|
</header>
|
|
116
128
|
|
|
117
|
-
<header
|
|
118
|
-
|
|
129
|
+
<header
|
|
130
|
+
v-else class="tool-bar w-100p flex space-between sticky z-3"
|
|
131
|
+
:class="{ 'py-1': !isOverlay, 'pt-1': isOverlay }"
|
|
132
|
+
>
|
|
119
133
|
<!-- Header close button (no title) -->
|
|
120
|
-
<Btn
|
|
121
|
-
|
|
134
|
+
<Btn
|
|
135
|
+
v-if="dismissable && isHeader && closePlacement === 'header'" :style="{ float: side ? '' : '' }"
|
|
136
|
+
flat icon="close" thin icon-mobile-size="1.4" @click="closeModal"
|
|
137
|
+
/>
|
|
122
138
|
<slot name="toolbar" />
|
|
123
139
|
<!-- Header-end close button (no title) -->
|
|
124
|
-
<Btn
|
|
140
|
+
<Btn
|
|
141
|
+
v-if="dismissable && isHeader && closePlacement === 'header-end'"
|
|
125
142
|
:style="{ float: side ? '' : '' }" flat icon="close" thin icon-mobile-size="1.4" class="ms-auto"
|
|
126
|
-
@click="closeModal"
|
|
143
|
+
@click="closeModal"
|
|
144
|
+
/>
|
|
127
145
|
</header>
|
|
128
146
|
|
|
129
147
|
<slot />
|
|
130
|
-
<footer
|
|
131
|
-
|
|
148
|
+
<footer
|
|
149
|
+
v-if="slots.footer || actions?.length" class="modal-footer gap-1 flex space-between"
|
|
150
|
+
:class="{ 'mt-1': !side, 'mt-auto': side }"
|
|
151
|
+
>
|
|
132
152
|
<Btn v-for="(action, i) in actions" :key="i" color="gray" v-bind="action" @click="closeModal" />
|
|
133
153
|
<slot name="footer" />
|
|
134
154
|
<!-- Footer close button -->
|
|
135
155
|
</footer>
|
|
136
|
-
<Btn
|
|
137
|
-
|
|
156
|
+
<Btn
|
|
157
|
+
v-if="dismissable && isFooter" icon="close" label="Close"
|
|
158
|
+
class="mx-auto absolute start-0 end-0 modalFooterBtn" @click="closeModal"
|
|
159
|
+
/>
|
|
138
160
|
</Card>
|
|
139
161
|
</div>
|
|
140
162
|
</template>
|
|
@@ -61,42 +61,38 @@ function closePopover() {
|
|
|
61
61
|
|
|
62
62
|
<template>
|
|
63
63
|
<Card
|
|
64
|
-
v-if="show && event"
|
|
65
|
-
ref="popoverRef"
|
|
66
|
-
v-click-outside="closePopover"
|
|
67
|
-
thin
|
|
68
|
-
class="custom-popover"
|
|
69
|
-
:style="{
|
|
64
|
+
v-if="show && event" ref="popoverRef" v-click-outside="closePopover" thin class="custom-popover" :style="{
|
|
70
65
|
top: `${popoverPosition.top}px`,
|
|
71
66
|
left: `${popoverPosition.left}px`,
|
|
72
67
|
maxWidth: `${popoverPosition.width}px`,
|
|
73
68
|
}"
|
|
74
69
|
>
|
|
75
|
-
<slot name="eventContent" :event="event" />
|
|
70
|
+
<slot name="eventContent" :event="event" :close="closePopover" />
|
|
76
71
|
</Card>
|
|
77
72
|
</template>
|
|
78
73
|
|
|
79
74
|
<style scoped>
|
|
80
75
|
.custom-popover {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
76
|
+
position: fixed;
|
|
77
|
+
z-index: 1000;
|
|
78
|
+
min-width: 250px;
|
|
79
|
+
max-width: 350px;
|
|
80
|
+
background-color: white;
|
|
81
|
+
border-radius: var(--btn-border-radius);
|
|
82
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
|
83
|
+
animation: fadeIn 0.2s ease;
|
|
84
|
+
transform-origin: center left;
|
|
90
85
|
}
|
|
91
86
|
|
|
92
87
|
@keyframes fadeIn {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
88
|
+
from {
|
|
89
|
+
opacity: 0;
|
|
90
|
+
transform: scale(0.95);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
to {
|
|
94
|
+
opacity: 1;
|
|
95
|
+
transform: scale(1);
|
|
96
|
+
}
|
|
101
97
|
}
|
|
102
98
|
</style>
|
|
@@ -2,11 +2,13 @@ export interface CalendarEvent {
|
|
|
2
2
|
id: string
|
|
3
3
|
title: string
|
|
4
4
|
description?: string
|
|
5
|
+
reference?: string
|
|
5
6
|
start_time: Date
|
|
6
7
|
end_time: Date
|
|
7
8
|
color?: string
|
|
8
9
|
category?: string
|
|
9
10
|
allDay?: boolean
|
|
11
|
+
meta?: Record<string, any>
|
|
10
12
|
}
|
|
11
13
|
export type CalendarView = 'Week' | 'Month' | 'Day' | 'Agenda'
|
|
12
14
|
|
|
@@ -123,7 +123,7 @@ onMounted(() => { emit('ready', state.value) })
|
|
|
123
123
|
<template>
|
|
124
124
|
<div class="calendar">
|
|
125
125
|
<div class="flex m_block m_pb-1">
|
|
126
|
-
<h3 class="txt-light my-0">
|
|
126
|
+
<h3 class="txt-light my-0 m_pb-1">
|
|
127
127
|
<b>{{ formatDate(currentDate, 'MMMM') }}</b>
|
|
128
128
|
{{ formatDate(currentDate, 'YYYY') }}
|
|
129
129
|
</h3>
|
|
@@ -147,8 +147,8 @@ onMounted(() => { emit('ready', state.value) })
|
|
|
147
147
|
@event-click="handleEventClick" @event-create="handleEventCreate" @event-update="handleEventUpdate"
|
|
148
148
|
@event-delete="handleEventDelete" @date-change="handleDateChange" @open-popover="openPopover"
|
|
149
149
|
>
|
|
150
|
-
<template #eventContent="{ event }">
|
|
151
|
-
<slot name="eventContent" :event="event" />
|
|
150
|
+
<template #eventContent="{ event, close }">
|
|
151
|
+
<slot name="eventContent" :event="event" :close="close" />
|
|
152
152
|
</template>
|
|
153
153
|
</component>
|
|
154
154
|
|
|
@@ -157,8 +157,8 @@ onMounted(() => { emit('ready', state.value) })
|
|
|
157
157
|
:event="activeEvent" :position="popoverPosition" :show="showPopover"
|
|
158
158
|
:has-event-content-slot="!!$slots.eventContent" @close="closePopover" @event-click="handleEventClick"
|
|
159
159
|
>
|
|
160
|
-
<template #eventContent="{ event }">
|
|
161
|
-
<slot name="eventContent" :event="event" />
|
|
160
|
+
<template #eventContent="{ event, close }">
|
|
161
|
+
<slot name="eventContent" :event="event" :close="close" />
|
|
162
162
|
</template>
|
|
163
163
|
</CalendarPopover>
|
|
164
164
|
</div>
|
|
@@ -421,7 +421,7 @@ onUnmounted(() => {
|
|
|
421
421
|
<div class="w-100p overflow-hidden m_overflow h-100p grid">
|
|
422
422
|
<div ref="calendarGrid" class="weekGrid border-bottom me-1">
|
|
423
423
|
<div />
|
|
424
|
-
<div v-for="day in weekDays" :key="day.toISOString()" class="day-header p-05 txt-center">
|
|
424
|
+
<div v-for="day in weekDays" :key="day.toISOString()" class="day-header p-05 txt-center m_txt12">
|
|
425
425
|
{{ formatDate(day, { fmt: 'DDD' }) }}
|
|
426
426
|
<span
|
|
427
427
|
class="txt-12 round p-025" :class="{
|
|
@@ -576,4 +576,10 @@ onUnmounted(() => {
|
|
|
576
576
|
flex-direction: column;
|
|
577
577
|
justify-content: center; */
|
|
578
578
|
}
|
|
579
|
+
@media (max-width: 910px) {
|
|
580
|
+
.weekGrid {
|
|
581
|
+
display: grid;
|
|
582
|
+
grid-template-columns: 3rem repeat(7, 100px);
|
|
583
|
+
}
|
|
584
|
+
}
|
|
579
585
|
</style>
|
|
@@ -27,6 +27,12 @@ const props = withDefaults(
|
|
|
27
27
|
flat?: boolean
|
|
28
28
|
invertedActive?: boolean
|
|
29
29
|
align?: 'start' | 'center' | 'end' | 'top' | 'bottom'
|
|
30
|
+
hideRadio?: boolean
|
|
31
|
+
bgColor?: string
|
|
32
|
+
activeBgColor?: string
|
|
33
|
+
borderColor?: string
|
|
34
|
+
textColor?: string
|
|
35
|
+
textAlign?: 'left' | 'center' | 'right'
|
|
30
36
|
}>(),
|
|
31
37
|
{
|
|
32
38
|
align: 'center'
|
|
@@ -89,7 +95,8 @@ function handleChange() {
|
|
|
89
95
|
v-for="(opt, index) in visibleOptions" :key="opt.id || `${name}-${index}`"
|
|
90
96
|
class="border rounded flex active-list-item hover"
|
|
91
97
|
:for="opt.id || `${name}-${index}`"
|
|
92
|
-
:class="{ 'p-05 gap-025': thin, '
|
|
98
|
+
:class="{ 'p-05 gap-025': thin, 'py-1 gap-075': !thin, 'ps-05': !hideRadio, 'bg-gray-light': !bgColor && !flat, 'align-items-start': align === 'start' || align === 'top', 'align-items-center': align === 'center', 'align-items-end': align === 'end' || align === 'bottom', invertedActive }"
|
|
99
|
+
:style="{ backgroundColor: bgColor, borderColor: borderColor }"
|
|
93
100
|
>
|
|
94
101
|
<input
|
|
95
102
|
:id="opt.id || `${name}-${index}`" v-model="selectedOption" :disabled class="radio-input-list"
|
|
@@ -97,16 +104,19 @@ function handleChange() {
|
|
|
97
104
|
@change="handleChange"
|
|
98
105
|
:class="{
|
|
99
106
|
'mt-025': align === 'start' || align === 'top',
|
|
100
|
-
'mb-025': align === 'end' || align === 'bottom'
|
|
107
|
+
'mb-025': align === 'end' || align === 'bottom',
|
|
108
|
+
'hideRadio': hideRadio
|
|
101
109
|
}"
|
|
102
110
|
>
|
|
103
|
-
<div class="flex w-100 gap-1 flex-wrap m_gap-05 m_gap-row-025"
|
|
111
|
+
<div class="flex w-100 gap-1 flex-wrap m_gap-05 m_gap-row-025"
|
|
112
|
+
:class="{ 'txt-center justify-content-center': textAlign === 'center', 'txt-end justify-content-end': textAlign === 'right', 'txt-start justify-content-start': textAlign === 'left' }"
|
|
113
|
+
:style="{ color: textColor }">
|
|
104
114
|
<img
|
|
105
115
|
v-if="opt.imgSrc" class="bg-popup shadow-light py-025 radius-05 m_w40" height="40" :src="opt.imgSrc"
|
|
106
116
|
:alt="opt.imgAlt"
|
|
107
117
|
>
|
|
108
118
|
<div class="">
|
|
109
|
-
<
|
|
119
|
+
<div v-if="opt.label" class="m-0 m_txt-14 line-height-14" v-html="opt.label"></div>
|
|
110
120
|
<p v-if="opt.subLabel" class="txt-gray txt-12 m-0 pt-025">{{ opt.subLabel }}</p>
|
|
111
121
|
</div>
|
|
112
122
|
<slot name="radioItem" v-bind="opt" />
|
|
@@ -117,24 +127,30 @@ function handleChange() {
|
|
|
117
127
|
</template>
|
|
118
128
|
|
|
119
129
|
<style scoped>
|
|
130
|
+
.hideRadio.radio-input-list {
|
|
131
|
+
display: none !important;
|
|
132
|
+
}
|
|
120
133
|
.radio-input-list {
|
|
121
134
|
width: auto;
|
|
122
135
|
transform: scale(1.4);
|
|
123
136
|
margin-inline-end: 0.6rem;
|
|
137
|
+
}
|
|
124
138
|
|
|
139
|
+
.radio-input-list.hidden {
|
|
140
|
+
display: none;
|
|
125
141
|
}
|
|
126
142
|
|
|
127
143
|
.active-list-item:has(:checked) {
|
|
128
|
-
background: var(--bgl-primary-light) !important;
|
|
144
|
+
background: v-bind('activeBgColor || "var(--bgl-primary-light)"') !important;
|
|
129
145
|
border-color: var(--bgl-primary) !important;
|
|
130
146
|
accent-color: var(--bgl-accent-color);
|
|
131
147
|
}
|
|
148
|
+
|
|
132
149
|
.invertedActive:has(:checked) {
|
|
133
150
|
background: var(--bgl-primary) !important;
|
|
134
151
|
border-color: var(--bgl-primary) !important;
|
|
135
152
|
color: var(--bgl-white);
|
|
136
153
|
accent-color: var(--bgl-white);
|
|
137
|
-
|
|
138
154
|
}
|
|
139
155
|
|
|
140
156
|
.has-error .active-list-item {
|