@bagelink/vue 0.0.511 → 0.0.522
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/Btn.vue.d.ts +2 -0
- package/dist/components/Btn.vue.d.ts.map +1 -1
- package/dist/components/Carousel.vue.d.ts +29 -2
- package/dist/components/Carousel.vue.d.ts.map +1 -1
- package/dist/components/MapEmbed.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/CheckInput.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/DateInput.vue.d.ts +8 -0
- package/dist/components/form/inputs/DateInput.vue.d.ts.map +1 -1
- package/dist/components/layout/TabsNav.vue.d.ts +3 -1
- package/dist/components/layout/TabsNav.vue.d.ts.map +1 -1
- package/dist/index.cjs +262 -357
- package/dist/index.mjs +262 -357
- package/dist/style.css +247 -187
- package/dist/utils/BagelFormUtils.d.ts +2 -0
- package/dist/utils/BagelFormUtils.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/Btn.vue +8 -1
- package/src/components/Card.vue +0 -1
- package/src/components/Carousel.vue +134 -117
- package/src/components/ListItem.vue +2 -2
- package/src/components/ListView.vue +1 -1
- package/src/components/MapEmbed.vue +6 -4
- package/src/components/Modal.vue +1 -2
- package/src/components/TableSchema.vue +4 -4
- package/src/components/form/inputs/CheckInput.vue +46 -70
- package/src/components/form/inputs/DateInput.vue +9 -0
- package/src/components/layout/TabsNav.vue +2 -2
- package/src/styles/appearance.css +66 -0
- package/src/styles/bagel.css +1 -1
- package/src/styles/layout.css +14 -0
- package/src/styles/mobilLayout.css +14 -0
- package/src/styles/scrollbar.css +2 -4
- package/src/utils/BagelFormUtils.ts +23 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
defineProps<{
|
|
2
|
+
const props = defineProps<{
|
|
3
3
|
label?: string
|
|
4
4
|
id?: string
|
|
5
5
|
title?: string
|
|
@@ -7,18 +7,25 @@ defineProps<{
|
|
|
7
7
|
required?: boolean
|
|
8
8
|
}>()
|
|
9
9
|
|
|
10
|
+
const inputId = $ref(props.id || Math.random().toString(36).substring(7))
|
|
11
|
+
|
|
10
12
|
const checked = defineModel<boolean>('modelValue', { default: false })
|
|
11
13
|
</script>
|
|
12
14
|
|
|
13
15
|
<template>
|
|
14
|
-
<div
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
<div
|
|
17
|
+
class="bagel-input bgl-checkbox align-items-center ps-025"
|
|
18
|
+
:title="title"
|
|
19
|
+
:class="{ small }"
|
|
20
|
+
>
|
|
21
|
+
<input
|
|
22
|
+
:id="inputId"
|
|
23
|
+
v-model="checked"
|
|
24
|
+
:required="required"
|
|
25
|
+
type="checkbox"
|
|
26
|
+
class="me-05"
|
|
27
|
+
>
|
|
28
|
+
<label :for="inputId">
|
|
22
29
|
<slot name="label">
|
|
23
30
|
{{ label }}
|
|
24
31
|
</slot>
|
|
@@ -26,75 +33,44 @@ const checked = defineModel<boolean>('modelValue', { default: false })
|
|
|
26
33
|
</div>
|
|
27
34
|
</template>
|
|
28
35
|
|
|
29
|
-
<style>
|
|
30
|
-
:root {
|
|
31
|
-
--bgl-white: #fff;
|
|
32
|
-
--input-height: 40px;
|
|
33
|
-
--input-border-radius: 7px;
|
|
34
|
-
--bgl-transition: all 200ms ease;
|
|
35
|
-
--bgl-primary: #19b8ea;
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
</style>
|
|
39
|
-
|
|
40
36
|
<style scoped>
|
|
41
37
|
.bgl-checkbox {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
flex-direction: row;
|
|
45
|
-
align-items: center;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.bgl-checkbox input[type=checkbox] {
|
|
49
|
-
position: absolute;
|
|
50
|
-
opacity: 0;
|
|
51
|
-
z-index: -1;
|
|
38
|
+
flex-direction: row;
|
|
39
|
+
cursor: pointer;
|
|
52
40
|
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
user-select: none;
|
|
59
|
-
font-size: var(--input-font-size);
|
|
41
|
+
.bgl-checkbox input[type='checkbox'] {
|
|
42
|
+
accent-color: var(--bgl-primary);
|
|
43
|
+
height: calc(var(--input-height) / 2.75);
|
|
44
|
+
width: calc(var(--input-height) / 2.75);
|
|
45
|
+
min-width: 0;
|
|
60
46
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
47
|
+
.bgl-checkbox input[type='checkbox']::before {
|
|
48
|
+
content: '';
|
|
49
|
+
height: calc(var(--input-height) / 2.75);
|
|
50
|
+
width: calc(var(--input-height) / 2.75);
|
|
51
|
+
background: var(--bgl-primary);
|
|
52
|
+
border-radius: 100%;
|
|
53
|
+
opacity: 0;
|
|
54
|
+
transition: all 200ms ease;
|
|
55
|
+
position: absolute;
|
|
64
56
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
57
|
+
.bgl-checkbox input[type='checkbox']:hover::before {
|
|
58
|
+
opacity: 0.2;
|
|
59
|
+
transform: scale(2);
|
|
68
60
|
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
border-radius: calc(var(--input-border-radius) / 2);
|
|
75
|
-
border: var(--bgl-primary) 1px solid;
|
|
76
|
-
position: relative;
|
|
77
|
-
display: flex;
|
|
78
|
-
align-items: center;
|
|
79
|
-
justify-content: center;
|
|
61
|
+
.bgl-checkbox label {
|
|
62
|
+
cursor: pointer;
|
|
63
|
+
user-select: none;
|
|
64
|
+
font-size: var(--input-font-size);
|
|
65
|
+
transition: var(--bgl-transition-400);
|
|
80
66
|
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
background: var(--bgl-primary);
|
|
67
|
+
.bgl-checkbox:hover label {
|
|
68
|
+
color: var(--bgl-primary) !important;
|
|
84
69
|
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
width: calc(var(--input-height) / 2.5);
|
|
88
|
-
height: calc(var(--input-height) / 2.5);
|
|
89
|
-
position: absolute;
|
|
90
|
-
z-index: 2;
|
|
91
|
-
fill: var(--bgl-white);
|
|
92
|
-
pointer-events: none;
|
|
93
|
-
transform: scale(0);
|
|
94
|
-
transition: var(--bgl-transition);
|
|
70
|
+
.bgl-checkbox input:checked + label{
|
|
71
|
+
color: var(--bgl-primary) !important;
|
|
95
72
|
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
transform: scale(1);
|
|
73
|
+
.bagel-input:focus-within.bgl-checkbox:not(:checked) label {
|
|
74
|
+
color: var(--label-color) !important;
|
|
99
75
|
}
|
|
100
76
|
</style>
|
|
@@ -12,6 +12,10 @@ const props = withDefaults(
|
|
|
12
12
|
modelValue?: string | Date
|
|
13
13
|
defaultValue?: string | Date
|
|
14
14
|
extraProps?: VueDatePickerProps
|
|
15
|
+
allowedDates?: string[] | Date[]
|
|
16
|
+
timePickerInline?: boolean
|
|
17
|
+
minutesIncrement?: string | number
|
|
18
|
+
minutesGridIncrement?: string | number
|
|
15
19
|
}>(),
|
|
16
20
|
{
|
|
17
21
|
enableTime: false,
|
|
@@ -59,7 +63,12 @@ onMounted(() => {
|
|
|
59
63
|
v-model="date"
|
|
60
64
|
:auto-apply="true"
|
|
61
65
|
:enable-time-picker="enableTime"
|
|
66
|
+
:allowed-dates="allowedDates"
|
|
62
67
|
v-bind="extraProps"
|
|
68
|
+
:time-picker-inline="timePickerInline"
|
|
69
|
+
:minutes-increment="minutesIncrement"
|
|
70
|
+
:minutes-grid-increment="minutesGridIncrement"
|
|
71
|
+
:start-time="{ hours: 8, minutes: 0 }"
|
|
63
72
|
/>
|
|
64
73
|
</div>
|
|
65
74
|
</template>
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { Icon } from '@bagelink/vue'
|
|
2
|
+
import { Icon, type MaterialIcons } from '@bagelink/vue'
|
|
3
3
|
import { nextTick, onBeforeUnmount, onMounted, ref, watch } from 'vue'
|
|
4
4
|
import { useTabs } from './tabsManager'
|
|
5
5
|
|
|
6
6
|
interface TabType {
|
|
7
7
|
id?: string
|
|
8
8
|
label?: string
|
|
9
|
-
icon?:
|
|
9
|
+
icon?: MaterialIcons
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
const props = defineProps<{
|
|
@@ -431,6 +431,39 @@
|
|
|
431
431
|
box-shadow: 0 1px 5px 0 rgba(0, 0, 0, .1), 0 1px 2px -1px rgba(0, 0, 0, .1) !important;
|
|
432
432
|
}
|
|
433
433
|
|
|
434
|
+
.border-bottom {
|
|
435
|
+
border-bottom: 1px solid var(--border-color)
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
.border-top {
|
|
439
|
+
border-top: 1px solid var(--border-color)
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
.border-start {
|
|
443
|
+
border-inline-start: 1px solid var(--border-color)
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
.border-end {
|
|
447
|
+
border-inline-end: 1px solid var(--border-color)
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
.border-inner-bottom>* {
|
|
451
|
+
border-bottom: 1px solid var(--border-color)
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
.border-inner-top>* {
|
|
455
|
+
border-top: 1px solid var(--border-color)
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
.border-inner-start>* {
|
|
459
|
+
border-inline-start: 1px solid var(--border-color)
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
.border-inner-end>* {
|
|
463
|
+
border-inline-end: 1px solid var(--border-color)
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
|
|
434
467
|
|
|
435
468
|
@media screen and (max-width: 910px) {
|
|
436
469
|
.m_opacity-0 {
|
|
@@ -862,4 +895,37 @@
|
|
|
862
895
|
box-shadow: 0 1px 5px 0 rgba(0, 0, 0, .1), 0 1px 2px -1px rgba(0, 0, 0, .1) !important;
|
|
863
896
|
}
|
|
864
897
|
|
|
898
|
+
.m_border-bottom {
|
|
899
|
+
border-bottom: 1px solid var(--border-color)
|
|
900
|
+
}
|
|
901
|
+
|
|
902
|
+
.m_border-top {
|
|
903
|
+
border-top: 1px solid var(--border-color)
|
|
904
|
+
}
|
|
905
|
+
|
|
906
|
+
.m_border-start {
|
|
907
|
+
border-inline-start: 1px solid var(--border-color)
|
|
908
|
+
}
|
|
909
|
+
|
|
910
|
+
.m_border-end {
|
|
911
|
+
border-inline-end: 1px solid var(--border-color)
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
.m_border-inner-bottom>* {
|
|
915
|
+
border-bottom: 1px solid var(--border-color)
|
|
916
|
+
}
|
|
917
|
+
|
|
918
|
+
.m_border-inner-top>* {
|
|
919
|
+
border-top: 1px solid var(--border-color)
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
.m_border-inner-start>* {
|
|
923
|
+
border-inline-start: 1px solid var(--border-color)
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
.m_border-inner-end>* {
|
|
927
|
+
border-inline-end: 1px solid var(--border-color)
|
|
928
|
+
}
|
|
929
|
+
|
|
930
|
+
|
|
865
931
|
}
|
package/src/styles/bagel.css
CHANGED
package/src/styles/layout.css
CHANGED
|
@@ -127,6 +127,20 @@
|
|
|
127
127
|
inset-inline-end: 0px;
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
+
.position-bottom-center {
|
|
131
|
+
position: absolute;
|
|
132
|
+
bottom: 0px;
|
|
133
|
+
inset-inline-start: 0px;
|
|
134
|
+
inset-inline-end: 0px;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.position-center {
|
|
138
|
+
position: absolute;
|
|
139
|
+
top: 0px;
|
|
140
|
+
inset-inline-start: 0px;
|
|
141
|
+
inset-inline-end: 0px;
|
|
142
|
+
}
|
|
143
|
+
|
|
130
144
|
.positioned-full,
|
|
131
145
|
.p-all {
|
|
132
146
|
top: 0;
|
|
@@ -146,6 +146,20 @@
|
|
|
146
146
|
inset-inline-end: 0px;
|
|
147
147
|
}
|
|
148
148
|
|
|
149
|
+
.m_position-bottom-center {
|
|
150
|
+
position: absolute;
|
|
151
|
+
bottom: 0px;
|
|
152
|
+
inset-inline-start: 0px;
|
|
153
|
+
inset-inline-end: 0px;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.m_position-center {
|
|
157
|
+
position: absolute;
|
|
158
|
+
top: 0px;
|
|
159
|
+
inset-inline-start: 0px;
|
|
160
|
+
inset-inline-end: 0px;
|
|
161
|
+
}
|
|
162
|
+
|
|
149
163
|
.m_positioned-full {
|
|
150
164
|
top: 0;
|
|
151
165
|
bottom: 0;
|
package/src/styles/scrollbar.css
CHANGED
|
@@ -3,13 +3,11 @@
|
|
|
3
3
|
height: 0.5rem;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
::-webkit-scrollbar-track {
|
|
7
|
-
/* -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3); */
|
|
8
|
-
}
|
|
6
|
+
::-webkit-scrollbar-track {}
|
|
9
7
|
|
|
10
8
|
::-webkit-scrollbar-thumb {
|
|
11
9
|
background-color: var(--bgl-gray);
|
|
12
|
-
border-radius:
|
|
10
|
+
border-radius: 1rem;
|
|
13
11
|
}
|
|
14
12
|
|
|
15
13
|
::-webkit-scrollbar-corner {
|
|
@@ -15,6 +15,8 @@ interface InputOptions {
|
|
|
15
15
|
helptext?: string
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
type DateOptions = InputOptions
|
|
19
|
+
|
|
18
20
|
interface TextInputOptions extends InputOptions {
|
|
19
21
|
type?: 'text' | 'tel' | 'email'
|
|
20
22
|
pattern?: string
|
|
@@ -61,6 +63,7 @@ export function txtField(
|
|
|
61
63
|
required: options?.required,
|
|
62
64
|
id,
|
|
63
65
|
label,
|
|
66
|
+
disabled: options?.disabled,
|
|
64
67
|
placeholder: options?.placeholder,
|
|
65
68
|
defaultValue: options?.defaultValue,
|
|
66
69
|
attrs: {
|
|
@@ -108,6 +111,25 @@ export function checkField(
|
|
|
108
111
|
}
|
|
109
112
|
}
|
|
110
113
|
|
|
114
|
+
export function dateField(
|
|
115
|
+
id: string,
|
|
116
|
+
label?: string,
|
|
117
|
+
options?: DateOptions,
|
|
118
|
+
): Field {
|
|
119
|
+
return {
|
|
120
|
+
$el: 'date',
|
|
121
|
+
class: options?.class,
|
|
122
|
+
required: options?.required,
|
|
123
|
+
id,
|
|
124
|
+
disabled: options?.disabled,
|
|
125
|
+
label,
|
|
126
|
+
defaultValue: options?.defaultValue,
|
|
127
|
+
attrs: {
|
|
128
|
+
disabled: options?.disabled,
|
|
129
|
+
},
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
111
133
|
export function numField(
|
|
112
134
|
id: string,
|
|
113
135
|
label?: string,
|
|
@@ -120,6 +142,7 @@ export function numField(
|
|
|
120
142
|
defaultValue: options?.defaultValue,
|
|
121
143
|
id,
|
|
122
144
|
label,
|
|
145
|
+
disabled: options?.disabled,
|
|
123
146
|
placeholder: options?.placeholder,
|
|
124
147
|
helptext: options?.helptext,
|
|
125
148
|
attrs: {
|