@bagelink/vue 1.4.159 → 1.4.161
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/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 +25 -37
- package/src/components/calendar/CalendarPopover.vue +20 -24
- package/src/components/calendar/CalendarTypes.ts +2 -0
- package/src/components/calendar/Index.vue +1 -1
- 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
|
@@ -61,6 +61,7 @@ const maxWidth = $computed(() => {
|
|
|
61
61
|
const isOverlay = $computed(() => props.closePlacement === 'overlay' || props.closePlacement === 'overlay-end')
|
|
62
62
|
const isHeader = $computed(() => props.closePlacement === 'header' || props.closePlacement === 'header-end')
|
|
63
63
|
const isFooter = $computed(() => props.closePlacement === 'footer')
|
|
64
|
+
const isNone = $computed(() => props.closePlacement === 'none')
|
|
64
65
|
|
|
65
66
|
const overlayCloseClass = $computed(() => {
|
|
66
67
|
if (props.closePlacement === 'overlay-end') return 'top-1 end-1'
|
|
@@ -74,7 +75,7 @@ function closeModal() {
|
|
|
74
75
|
|
|
75
76
|
defineExpose({ closeModal })
|
|
76
77
|
|
|
77
|
-
|
|
78
|
+
const escapeKeyClose = (e: KeyboardEvent) => {
|
|
78
79
|
if (props.dismissable && e.key === 'Escape') {
|
|
79
80
|
closeModal()
|
|
80
81
|
}
|
|
@@ -92,58 +93,45 @@ onUnmounted(() => {
|
|
|
92
93
|
</script>
|
|
93
94
|
|
|
94
95
|
<template>
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
<
|
|
102
|
-
|
|
103
|
-
<
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
:label="title"
|
|
110
|
-
:class="{ 'me-1-5': isHeader && dismissable && closePlacement === 'header', 'ms-1-5': isHeader && dismissable && closePlacement === 'header-end' }" />
|
|
111
|
-
<!-- Header-end close button -->
|
|
112
|
-
<Btn v-if="dismissable && isHeader && closePlacement === 'header-end'"
|
|
113
|
-
:style="{ float: side ? '' : '' }" flat icon="close" thin icon-mobile-size="1.4"
|
|
114
|
-
@click="closeModal" />
|
|
96
|
+
<div class="bg-dark" :style="{ zIndex }" :class="{ 'is-side': side, 'is-active': isVisible, 'bg-lignt': false }" @click="() => (dismissable ? closeModal() : '')" @keydown.esc="closeModal">
|
|
97
|
+
<!-- Overlay close button -->
|
|
98
|
+
<Btn v-if="dismissable && isOverlay" icon="close" icon-mobile-size="1.4" class="fixed" :class="overlayCloseClass" @click="closeModal" />
|
|
99
|
+
|
|
100
|
+
<Card class="modal m_pt-0" :style="{ ...maxWidth, '--bgl-box-bg': 'var(--bgl-popup-bg)' }" :thin="thin" @click.stop
|
|
101
|
+
:class="{ 'pt-0': thin, 'pt-1': !thin, 'm_mt-5': isOverlay, 'display-flex column': side }">
|
|
102
|
+
<header v-if="slots.toolbar || title" class="tool-bar w-100p flex space-between sticky z-3 py-1">
|
|
103
|
+
<!-- Header close button -->
|
|
104
|
+
<Btn v-if="dismissable && isHeader && closePlacement === 'header'" :style="{ float: side ? '' : '' }" flat icon="close" thin icon-mobile-size="1.4" @click="closeModal" />
|
|
105
|
+
<slot name="toolbar" />
|
|
106
|
+
<Title v-if="title" class="modal-title txt-center txt20 medium my-0 w-100p ellipsis-1" tag="h3" :label="title"
|
|
107
|
+
:class="{ 'me-1-5': isHeader && dismissable && closePlacement === 'header', 'ms-1-5': isHeader && dismissable && closePlacement === 'header-end' }" />
|
|
108
|
+
<!-- Header-end close button -->
|
|
109
|
+
<Btn v-if="dismissable && isHeader && closePlacement === 'header-end'" :style="{ float: side ? '' : '' }" flat icon="close" thin icon-mobile-size="1.4" @click="closeModal" />
|
|
115
110
|
</header>
|
|
116
|
-
|
|
117
|
-
<header v-else class="tool-bar w-100p flex space-between sticky z-3"
|
|
118
|
-
:class="{ 'py-1': !isOverlay, 'pt-1': isOverlay }">
|
|
111
|
+
|
|
112
|
+
<header v-else class="tool-bar w-100p flex space-between sticky z-3" :class="{ 'py-1': !isOverlay, 'pt-1': isOverlay }">
|
|
119
113
|
<!-- Header close button (no title) -->
|
|
120
|
-
<Btn v-if="dismissable && isHeader && closePlacement === 'header'" :style="{ float: side ? '' : '' }"
|
|
121
|
-
flat icon="close" thin icon-mobile-size="1.4" @click="closeModal" />
|
|
114
|
+
<Btn v-if="dismissable && isHeader && closePlacement === 'header'" :style="{ float: side ? '' : '' }" flat icon="close" thin icon-mobile-size="1.4" @click="closeModal" />
|
|
122
115
|
<slot name="toolbar" />
|
|
123
116
|
<!-- Header-end close button (no title) -->
|
|
124
|
-
<Btn v-if="dismissable && isHeader && closePlacement === 'header-end'"
|
|
125
|
-
:style="{ float: side ? '' : '' }" flat icon="close" thin icon-mobile-size="1.4" class="ms-auto"
|
|
126
|
-
@click="closeModal" />
|
|
117
|
+
<Btn v-if="dismissable && isHeader && closePlacement === 'header-end'" :style="{ float: side ? '' : '' }" flat icon="close" thin icon-mobile-size="1.4" class="ms-auto" @click="closeModal" />
|
|
127
118
|
</header>
|
|
128
|
-
|
|
119
|
+
|
|
129
120
|
<slot />
|
|
130
|
-
<footer v-if="slots.footer || actions?.length" class="modal-footer gap-1 flex space-between"
|
|
131
|
-
:class="{ 'mt-1': !side, 'mt-auto': side }">
|
|
121
|
+
<footer v-if="slots.footer || actions?.length" class="modal-footer gap-1 flex space-between" :class="{ 'mt-1': !side, 'mt-auto': side }">
|
|
132
122
|
<Btn v-for="(action, i) in actions" :key="i" color="gray" v-bind="action" @click="closeModal" />
|
|
133
123
|
<slot name="footer" />
|
|
134
124
|
<!-- Footer close button -->
|
|
135
125
|
</footer>
|
|
136
|
-
<Btn v-if="dismissable && isFooter" icon="close" label="Close"
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
</div>
|
|
126
|
+
<Btn v-if="dismissable && isFooter" icon="close" label="Close" class="mx-auto absolute start-0 end-0 modalFooterBtn" @click="closeModal" />
|
|
127
|
+
</Card>
|
|
128
|
+
</div>
|
|
140
129
|
</template>
|
|
141
130
|
|
|
142
131
|
<style>
|
|
143
132
|
.modal {
|
|
144
133
|
color: var(--bgl-popup-text);
|
|
145
134
|
}
|
|
146
|
-
|
|
147
135
|
.modal .bgl_btn.bgl_btn_flat {
|
|
148
136
|
color: var(--bgl-popup-text) !important;
|
|
149
137
|
}
|
|
@@ -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>
|
|
@@ -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 {
|