@bagelink/vue 0.0.736 → 0.0.740
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/AddressSaerch.vue.d.ts +7 -0
- package/dist/components/AddressSaerch.vue.d.ts.map +1 -0
- package/dist/components/AddressSearch.vue.d.ts +7 -0
- package/dist/components/AddressSearch.vue.d.ts.map +1 -0
- package/dist/components/Btn.vue.d.ts.map +1 -1
- package/dist/components/MapEmbed.vue.d.ts +55 -1
- package/dist/components/MapEmbed.vue.d.ts.map +1 -1
- package/dist/components/Modal.vue.d.ts.map +1 -1
- package/dist/components/ModalConfirm.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/FileUpload.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/PasswordInput.vue.d.ts +18 -43
- package/dist/components/form/inputs/PasswordInput.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/RichText2/index.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/SelectInput.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/index.d.ts +1 -0
- package/dist/components/form/inputs/index.d.ts.map +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/lightbox/Lightbox.vue.d.ts.map +1 -1
- package/dist/index.cjs +563 -338
- package/dist/index.mjs +563 -338
- package/dist/style.css +1157 -424
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/package.json +4 -3
- package/src/components/AddressSearch.vue +41 -0
- package/src/components/Badge.vue +1 -1
- package/src/components/Btn.vue +9 -7
- package/src/components/Card.vue +2 -2
- package/src/components/ListItem.vue +1 -1
- package/src/components/MapEmbed.vue +143 -104
- package/src/components/Modal.vue +5 -2
- package/src/components/ModalConfirm.vue +1 -1
- package/src/components/NavBar.vue +9 -9
- package/src/components/TableSchema.vue +3 -3
- package/src/components/form/inputs/Checkbox.vue +1 -1
- package/src/components/form/inputs/DatePicker.vue +5 -5
- package/src/components/form/inputs/FileUpload.vue +3 -3
- package/src/components/form/inputs/PasswordInput.vue +25 -0
- package/src/components/form/inputs/RadioGroup.vue +1 -1
- package/src/components/form/inputs/RadioPillsInput.vue +2 -2
- package/src/components/form/inputs/RichText.vue +3 -3
- package/src/components/form/inputs/RichText2/index.vue +8 -2
- package/src/components/form/inputs/SelectInput.vue +11 -4
- package/src/components/form/inputs/TableField.vue +3 -3
- package/src/components/form/inputs/TextInput.vue +3 -3
- package/src/components/form/inputs/ToggleInput.vue +1 -1
- package/src/components/form/inputs/index.ts +1 -0
- package/src/components/formkit/FileUploader.vue +1 -1
- package/src/components/formkit/MiscFields.vue +1 -1
- package/src/components/formkit/Toggle.vue +4 -4
- package/src/components/index.ts +1 -0
- package/src/components/layout/BottomMenu.vue +2 -2
- package/src/components/layout/SidebarMenu.vue +1 -1
- package/src/components/layout/TabsNav.vue +1 -1
- package/src/components/leaflet/leaflet.css +661 -0
- package/src/components/lightbox/Lightbox.vue +24 -18
- package/src/styles/appearance.css +16 -0
- package/src/styles/bagel.css +2 -1
- package/src/styles/inputs.css +3 -3
- package/src/styles/loginCard.css +1 -1
- package/src/styles/modal.css +2 -2
- package/src/styles/scrollbar.css +1 -1
- package/src/styles/text.css +8 -0
- package/src/styles/theme.css +68 -41
- package/src/utils/index.ts +16 -0
package/dist/utils/index.d.ts
CHANGED
|
@@ -13,4 +13,6 @@ export { formatString } from './strings';
|
|
|
13
13
|
export * as bagelFormUtils from './BagelFormUtils';
|
|
14
14
|
export { useLang } from './lang';
|
|
15
15
|
export declare function getFallbackSchema<T>(data?: any[], showFields?: string[]): BglFormSchemaT<T>;
|
|
16
|
+
export declare const sleep: (ms?: number) => Promise<unknown>;
|
|
17
|
+
export declare function appendScript(src: string): Promise<void>;
|
|
16
18
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA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OAAO,KAAK,cAAc,MAAM,kBAAkB,CAAA;AAElD,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA;AAEhC,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,GAAG,EAAE,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,GAAG,cAAc,CAAC,CAAC,CAAC,CAa3F;AAED,eAAO,MAAM,KAAK,QAAQ,MAAM,qBAA0D,CAAA;AAE1F,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAYvD"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bagelink/vue",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.740",
|
|
5
5
|
"description": "Bagel core sdk packages",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Neveh Allon",
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
"./vite.config.ts"
|
|
52
52
|
],
|
|
53
53
|
"devDependencies": {
|
|
54
|
+
"@types/leaflet": "^1.9.12",
|
|
54
55
|
"@types/signature_pad": "^2.3.6",
|
|
55
56
|
"@vue-macros/reactivity-transform": "^1.0.3",
|
|
56
57
|
"vue": "^3.4.38"
|
|
@@ -115,11 +116,11 @@
|
|
|
115
116
|
"@tiptap/vue-3": "^2.6.6",
|
|
116
117
|
"@vuepic/vue-datepicker": "^8.8.1",
|
|
117
118
|
"@vueuse/core": "^11.0.3",
|
|
118
|
-
"axios": "^1.7.
|
|
119
|
+
"axios": "^1.7.7",
|
|
119
120
|
"floating-vue": "^5.2.2",
|
|
120
121
|
"libphonenumber-js": "1.11.7",
|
|
121
122
|
"signature_pad": "^5.0.3",
|
|
122
|
-
"type-fest": "^4.
|
|
123
|
+
"type-fest": "^4.26.0"
|
|
123
124
|
},
|
|
124
125
|
"scripts": {
|
|
125
126
|
"dev": "tsx watch src/index.ts",
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { Dropdown, ListItem, ListView, TextInput } from '@bagelink/vue'
|
|
3
|
+
|
|
4
|
+
const emit = defineEmits(['addressSelected'])
|
|
5
|
+
let addressInput = $ref('')
|
|
6
|
+
let searchResults = $ref<any[]>([])
|
|
7
|
+
|
|
8
|
+
type MapMarker = {
|
|
9
|
+
lat: number
|
|
10
|
+
lon: number
|
|
11
|
+
} | [number, number]
|
|
12
|
+
|
|
13
|
+
const suggestion = $ref<typeof Dropdown>()
|
|
14
|
+
function emitAddress(address: MapMarker) {
|
|
15
|
+
emit('addressSelected', address)
|
|
16
|
+
searchResults = []
|
|
17
|
+
addressInput = ''
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
async function searchAddresses() {
|
|
21
|
+
const addressURL = addressInput.replace(/\s+/g, '+')
|
|
22
|
+
const geocodeUrl = `https://nominatim.openstreetmap.org/search?format=json&q=${encodeURI(addressURL)}`
|
|
23
|
+
const res = await fetch(geocodeUrl)
|
|
24
|
+
searchResults = await res.json() || []
|
|
25
|
+
console.log(suggestion)
|
|
26
|
+
suggestion?.show()
|
|
27
|
+
}
|
|
28
|
+
</script>
|
|
29
|
+
|
|
30
|
+
<template>
|
|
31
|
+
<div class="relative">
|
|
32
|
+
<Dropdown ref="suggestion" :noAutoFocus="true" placement="bottom-start">
|
|
33
|
+
<TextInput v-model="addressInput" placeholder="Enter address" @debounce="searchAddresses" />
|
|
34
|
+
<template #popper>
|
|
35
|
+
<ListView class="-mt-2 hm-300px">
|
|
36
|
+
<ListItem v-for="(result, index) in searchResults" :key="index" icon="location_on" :title="result.display_name" @click="emitAddress(result)" />
|
|
37
|
+
</listview>
|
|
38
|
+
</template>
|
|
39
|
+
</Dropdown>
|
|
40
|
+
</div>
|
|
41
|
+
</template>
|
package/src/components/Badge.vue
CHANGED
package/src/components/Btn.vue
CHANGED
|
@@ -56,7 +56,7 @@ const computedTheme = $computed(
|
|
|
56
56
|
const computedDefaultColors = $computed(
|
|
57
57
|
() => ({
|
|
58
58
|
backgroundColor: 'var(--bgl-primary)',
|
|
59
|
-
color: props.flat ? 'var(--bgl-
|
|
59
|
+
color: props.flat ? 'var(--bgl-text-color)' : 'var(--bgl-light-text)',
|
|
60
60
|
}),
|
|
61
61
|
)
|
|
62
62
|
|
|
@@ -121,8 +121,8 @@ a {
|
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
.loading {
|
|
124
|
-
border: 1px solid var(--bgl-
|
|
125
|
-
border-bottom: 2px solid var(--bgl-
|
|
124
|
+
border: 1px solid var(--bgl-light-text);
|
|
125
|
+
border-bottom: 2px solid var(--bgl-light-text);
|
|
126
126
|
animation: spin 1s linear infinite;
|
|
127
127
|
border-radius: 100px;
|
|
128
128
|
width: 1rem;
|
|
@@ -146,7 +146,7 @@ a {
|
|
|
146
146
|
border-radius: 100%;
|
|
147
147
|
font-size: 1rem;
|
|
148
148
|
background: var(--bgl-primary);
|
|
149
|
-
color: var(--bgl-
|
|
149
|
+
color: var(--bgl-light-text);
|
|
150
150
|
flex-shrink: 0;
|
|
151
151
|
transition: var(--bgl-transition);
|
|
152
152
|
}
|
|
@@ -205,12 +205,14 @@ a {
|
|
|
205
205
|
.bgl_btn-icon.bgl_flatBtn:hover {
|
|
206
206
|
filter: var(--bgl-hover-filter);
|
|
207
207
|
background: var(--bgl-gray-20);
|
|
208
|
+
color: var(--bgl-primary);
|
|
208
209
|
}
|
|
209
210
|
|
|
210
211
|
.bgl_btn.bgl_flatBtn:active,
|
|
211
212
|
.bgl_btn-icon.bgl_flatBtn:active {
|
|
212
213
|
background: var(--bgl-gray-40);
|
|
213
214
|
filter: var(--bgl-active-filter);
|
|
215
|
+
color: var(--bgl-primary);
|
|
214
216
|
}
|
|
215
217
|
|
|
216
218
|
.bgl_btn.bgl_flatBtn.red,
|
|
@@ -219,7 +221,7 @@ a {
|
|
|
219
221
|
}
|
|
220
222
|
.bgl_btn.bgl_flatBtn.white,
|
|
221
223
|
.bgl_btn-icon.bgl_flatBtn.white {
|
|
222
|
-
color: var(--bgl-
|
|
224
|
+
color: var(--bgl-light-text);
|
|
223
225
|
}
|
|
224
226
|
|
|
225
227
|
.bgl_btn.bgl_flatBtn.light,
|
|
@@ -229,7 +231,7 @@ a {
|
|
|
229
231
|
|
|
230
232
|
.bgl_btn.bgl_flatBtn.black,
|
|
231
233
|
.bgl_btn-icon.bgl_flatBtn.black {
|
|
232
|
-
color: var(--bgl-
|
|
234
|
+
color: var(--bgl-text-color);
|
|
233
235
|
}
|
|
234
236
|
|
|
235
237
|
.bgl_btn.bgl_flatBtn.gray,
|
|
@@ -267,7 +269,7 @@ a {
|
|
|
267
269
|
}
|
|
268
270
|
|
|
269
271
|
.bgl_btn-border:hover {
|
|
270
|
-
color: var(--bgl-
|
|
272
|
+
color: var(--bgl-light-text);
|
|
271
273
|
background: v-bind(computedBackgroundColor);
|
|
272
274
|
filter: brightness(100%);
|
|
273
275
|
}
|
package/src/components/Card.vue
CHANGED
|
@@ -59,7 +59,7 @@ const is = $computed(() => (props.to ? 'router-link' : 'div'))
|
|
|
59
59
|
.border .card_label {
|
|
60
60
|
font-size: 0.7rem;
|
|
61
61
|
font-weight: 300;
|
|
62
|
-
background:var(--bgl-
|
|
62
|
+
background:var(--bgl-box-bg);
|
|
63
63
|
padding: 0 0.75rem;
|
|
64
64
|
position: absolute;
|
|
65
65
|
top: -0.5rem;
|
|
@@ -72,7 +72,7 @@ const is = $computed(() => (props.to ? 'router-link' : 'div'))
|
|
|
72
72
|
|
|
73
73
|
.bgl_card {
|
|
74
74
|
border-radius: var(--card-border-radius);
|
|
75
|
-
background: var(--bgl-
|
|
75
|
+
background: var(--bgl-box-bg);
|
|
76
76
|
padding: 2rem 2rem;
|
|
77
77
|
position: relative;
|
|
78
78
|
}
|
|
@@ -1,126 +1,165 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
2
|
+
import './leaflet/leaflet.css'
|
|
3
|
+
import { onMounted, watch } from 'vue'
|
|
4
|
+
import type { LatLngExpression, Layer, Map, Marker } from 'leaflet'
|
|
5
|
+
import { appendScript, sleep } from '@bagelink/vue'
|
|
6
|
+
|
|
7
|
+
type MapMarker = {
|
|
8
|
+
lat: number
|
|
9
|
+
lon: number
|
|
10
|
+
} | [number, number]
|
|
11
|
+
|
|
12
|
+
const props = withDefaults(
|
|
13
|
+
defineProps<{
|
|
14
|
+
center?: LatLngExpression
|
|
15
|
+
zoom?: number
|
|
16
|
+
height?: number
|
|
17
|
+
zoomControl?: boolean
|
|
18
|
+
markers?: MapMarker[]
|
|
19
|
+
markerIcon?: string
|
|
20
|
+
}>(),
|
|
21
|
+
{
|
|
22
|
+
center: () => [31.7683, 35.2137],
|
|
23
|
+
zoom: 13,
|
|
24
|
+
height: 400,
|
|
25
|
+
zoomControl: true,
|
|
26
|
+
markerIcon: '',
|
|
27
|
+
}
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
let L = $ref<any>()
|
|
31
|
+
let map = $ref<Map>()
|
|
32
|
+
const _markers = $ref<Marker[]>([])
|
|
33
|
+
const id = $ref(Math.random().toString(36).substring(2, 10))
|
|
34
|
+
|
|
35
|
+
const defaultMarkerSVG = '<svg id="eCJDQPwuXje1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 36 36" shape-rendering="geometricPrecision" text-rendering="geometricPrecision" project-id="ac827abc0a8c4922b76bac4df7bd7646" export-id="2cc86932ccbc4825a31fd063b3e75478" cached="false"><style><![CDATA[#eCJDQPwuXje3_ts {animation: eCJDQPwuXje3_ts__ts 3000ms linear infinite normal forwards}@keyframes eCJDQPwuXje3_ts__ts { 0% {transform: translate(18px,18px) scale(1,1)} 3.333333% {transform: translate(18px,18px) scale(1,1);animation-timing-function: cubic-bezier(0.42,0,0.58,1)} 100% {transform: translate(18px,18px) scale(1.8,1.8)}} #eCJDQPwuXje3 {animation: eCJDQPwuXje3_c_o 3000ms linear infinite normal forwards}@keyframes eCJDQPwuXje3_c_o { 0% {opacity: 0} 3.333333% {opacity: 1;animation-timing-function: cubic-bezier(0.42,0,0.58,1)} 100% {opacity: 0}}]]></style><ellipse rx="10.049312" ry="10.049312" transform="translate(18 18)" fill="#2e5bff" stroke-width="0"/><g id="eCJDQPwuXje3_ts" transform="translate(18,18) scale(1,1)"><ellipse id="eCJDQPwuXje3" rx="10.049312" ry="10.049312" transform="translate(0,0)" opacity="0" fill="#2e5bff" stroke-width="0"/></g></svg>'
|
|
36
|
+
const leafletScriptUrl = 'https://unpkg.com/leaflet@1.9.4/dist/leaflet.js'
|
|
37
|
+
|
|
38
|
+
function loadGlobalL() {
|
|
39
|
+
return new Promise(async (resolve) => {
|
|
40
|
+
while (!window.L) await sleep(100)
|
|
41
|
+
resolve(window.L)
|
|
42
|
+
})
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
async function initializeMap() {
|
|
46
|
+
await appendScript(leafletScriptUrl)
|
|
47
|
+
L = await loadGlobalL()
|
|
48
|
+
if (!map) {
|
|
49
|
+
map = L.map(id, {
|
|
50
|
+
center: props.center,
|
|
51
|
+
zoom: props.zoom,
|
|
52
|
+
zoomControl: props.zoomControl,
|
|
53
|
+
})
|
|
54
|
+
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { maxZoom: 18 }).addTo(map)
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function addMarker(L: any, latlng: LatLngExpression) {
|
|
59
|
+
const iconSVG = props.markerIcon || defaultMarkerSVG
|
|
60
|
+
const customIcon = L.icon({
|
|
61
|
+
iconUrl: `data:image/svg+xml;utf8,${encodeURIComponent(iconSVG)}`,
|
|
62
|
+
iconSize: [32, 32],
|
|
63
|
+
})
|
|
64
|
+
|
|
65
|
+
const marker = L.marker(latlng, { icon: customIcon }).addTo(map as Map)
|
|
66
|
+
_markers.push(marker)
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
function fitMarkers(L: any) {
|
|
70
|
+
if (_markers.length > 0) {
|
|
71
|
+
map?.fitBounds(L.featureGroup(_markers as unknown as Layer[]).getBounds())
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
watch(
|
|
76
|
+
() => props.markers,
|
|
77
|
+
async (markers) => {
|
|
78
|
+
_markers.forEach(marker => marker.remove())
|
|
79
|
+
if (!markers) return
|
|
80
|
+
for (const marker of markers) {
|
|
81
|
+
const [lat, lon] = Array.isArray(marker) ? marker : [marker.lat, marker.lon]
|
|
82
|
+
if (!map) initializeMap()
|
|
83
|
+
addMarker(L, [lat, lon])
|
|
84
|
+
fitMarkers(L)
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
{ immediate: true }
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
onMounted(initializeMap)
|
|
66
91
|
</script>
|
|
67
92
|
|
|
68
93
|
<template>
|
|
69
|
-
<div class="map
|
|
70
|
-
<!-- <div :id class="map" :style="{ height: `${height || 400}px` }" /> -->
|
|
94
|
+
<div :id="id" class="leaflet-map" :style="{ height: `${props.height || 400}px` }" />
|
|
71
95
|
</template>
|
|
72
96
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
97
|
+
<style>
|
|
98
|
+
.leaflet-map {
|
|
99
|
+
height: 100%;
|
|
100
|
+
border-radius: var(--input-border-radius);
|
|
101
|
+
position: relative;
|
|
102
|
+
background: var(--bgl-bg)
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.leaflet-map::after {
|
|
106
|
+
content: "";
|
|
107
|
+
position: absolute;
|
|
108
|
+
inset: 0;
|
|
109
|
+
box-shadow: inset 0 0 10px #00000012;
|
|
110
|
+
z-index: 402;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.leaflet-map .leaflet-pane .leaflet-tile-pane {
|
|
114
|
+
filter: contrast(0.6) brightness(1.25) hue-rotate(12deg);
|
|
115
|
+
}
|
|
78
116
|
|
|
117
|
+
.leaflet-control-attribution {
|
|
118
|
+
display: none;
|
|
79
119
|
}
|
|
80
|
-
#map::after{
|
|
81
|
-
content: "";
|
|
82
|
-
position: absolute;
|
|
83
|
-
inset: 0;
|
|
84
|
-
box-shadow: inset 0 0 10px #00000012;
|
|
85
|
-
z-index: 402;
|
|
86
|
-
}
|
|
87
120
|
|
|
88
|
-
|
|
89
|
-
|
|
121
|
+
.leaflet-pane.leaflet-marker-pane img {
|
|
122
|
+
filter: drop-shadow(0px 8px 3px rgba(0, 0, 0, 0.2));
|
|
123
|
+
}
|
|
90
124
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
}
|
|
95
|
-
.leaflet-pane.leaflet-marker-pane img{
|
|
96
|
-
filter: drop-shadow(0px 8px 3px rgba(0, 0, 0, 0.2));
|
|
97
|
-
}
|
|
98
|
-
.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out {
|
|
99
|
-
font-size: var(--input-font-size);
|
|
125
|
+
.leaflet-touch .leaflet-control-zoom-in,
|
|
126
|
+
.leaflet-touch .leaflet-control-zoom-out {
|
|
127
|
+
font-size: var(--input-font-size);
|
|
100
128
|
}
|
|
101
|
-
|
|
102
|
-
|
|
129
|
+
|
|
130
|
+
.leaflet-bar {
|
|
131
|
+
border-radius: var(--input-border-radius) !important;
|
|
103
132
|
}
|
|
104
133
|
|
|
105
134
|
.leaflet-touch .leaflet-bar a:first-child {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
}
|
|
109
|
-
.leaflet-touch .leaflet-bar a:last-child{
|
|
110
|
-
border-bottom-left-radius:calc(var(--input-border-radius) - 2px) !important;
|
|
111
|
-
border-bottom-right-radius:calc(var(--input-border-radius) - 2px) !important;
|
|
135
|
+
border-top-left-radius: calc(var(--input-border-radius) - 2px) !important;
|
|
136
|
+
border-top-right-radius: calc(var(--input-border-radius) - 2px) !important;
|
|
112
137
|
}
|
|
113
138
|
|
|
114
|
-
.leaflet-bar a{
|
|
115
|
-
|
|
116
|
-
|
|
139
|
+
.leaflet-touch .leaflet-bar a:last-child {
|
|
140
|
+
border-bottom-left-radius: calc(var(--input-border-radius) - 2px) !important;
|
|
141
|
+
border-bottom-right-radius: calc(var(--input-border-radius) - 2px) !important;
|
|
142
|
+
}
|
|
117
143
|
|
|
144
|
+
.leaflet-bar a {
|
|
145
|
+
background: var(--bgl-box-bg) !important;
|
|
146
|
+
transition: var(--bgl-transition);
|
|
147
|
+
border-bottom: 1px solid var(--border-color) !important;
|
|
148
|
+
display: flex;
|
|
149
|
+
justify-content: center;
|
|
150
|
+
align-items: center;
|
|
151
|
+
line-height: 1 !important;
|
|
152
|
+
padding-bottom: 2px;
|
|
118
153
|
}
|
|
119
|
-
.leaflet-bar a:
|
|
120
|
-
|
|
154
|
+
.leaflet-bar a:last-child {
|
|
155
|
+
border-bottom: none !important;
|
|
121
156
|
}
|
|
122
|
-
.leaflet-bar a:focus {
|
|
123
|
-
filter: var(--bgl-active-filter);
|
|
124
157
|
|
|
158
|
+
.leaflet-bar a:hover {
|
|
159
|
+
filter: var(--bgl-hover-filter);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.leaflet-bar a:focus {
|
|
163
|
+
filter: var(--bgl-active-filter);
|
|
125
164
|
}
|
|
126
165
|
</style>
|
package/src/components/Modal.vue
CHANGED
|
@@ -85,9 +85,9 @@ onUnmounted(() => {
|
|
|
85
85
|
<Title v-if="title" class="modal-title" tag="h3" :label="title" />
|
|
86
86
|
</header>
|
|
87
87
|
|
|
88
|
-
<div v-else class="sticky bg-
|
|
88
|
+
<div v-else class="sticky bg-popup z-index-999 -mt-1 -ms-1 px-025 h-30px pt-025 modal-no-title">
|
|
89
89
|
<Btn
|
|
90
|
-
class="
|
|
90
|
+
class="position-start"
|
|
91
91
|
icon="close"
|
|
92
92
|
thin
|
|
93
93
|
color="white"
|
|
@@ -110,6 +110,9 @@ onUnmounted(() => {
|
|
|
110
110
|
</template>
|
|
111
111
|
|
|
112
112
|
<style>
|
|
113
|
+
.modal{
|
|
114
|
+
color: var(--bgl-popup-text);
|
|
115
|
+
}
|
|
113
116
|
.modal-title {
|
|
114
117
|
text-align: center;
|
|
115
118
|
font-weight: 600;
|
|
@@ -84,7 +84,7 @@ const isOpen = $ref(!isSmallScreen)
|
|
|
84
84
|
.nav-expend {
|
|
85
85
|
text-align: center;
|
|
86
86
|
cursor: pointer;
|
|
87
|
-
background: var(--bgl-
|
|
87
|
+
background: var(--bgl-popup-bg);
|
|
88
88
|
color: var(--bgl-primary);
|
|
89
89
|
display: flex;
|
|
90
90
|
border-radius: 100%;
|
|
@@ -109,7 +109,7 @@ const isOpen = $ref(!isSmallScreen)
|
|
|
109
109
|
*/
|
|
110
110
|
|
|
111
111
|
.nav-expend {
|
|
112
|
-
background: var(--bgl-
|
|
112
|
+
background: var(--bgl-popup-bg);
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
.nav-expend:hover {
|
|
@@ -122,7 +122,7 @@ const isOpen = $ref(!isSmallScreen)
|
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
.nav {
|
|
125
|
-
color: var(--bgl-
|
|
125
|
+
color: var(--bgl-light-text);
|
|
126
126
|
background: var(--bgl-primary);
|
|
127
127
|
z-index: 100;
|
|
128
128
|
width: 70px;
|
|
@@ -142,7 +142,7 @@ const isOpen = $ref(!isSmallScreen)
|
|
|
142
142
|
text-align: start;
|
|
143
143
|
align-items: center;
|
|
144
144
|
position: relative;
|
|
145
|
-
color: var(--bgl-
|
|
145
|
+
color: var(--bgl-light-text);
|
|
146
146
|
transition: all 0.2s ease;
|
|
147
147
|
pointer-events: none;
|
|
148
148
|
}
|
|
@@ -168,7 +168,7 @@ const isOpen = $ref(!isSmallScreen)
|
|
|
168
168
|
|
|
169
169
|
.nav-button:hover .bgl_icon-font,
|
|
170
170
|
.nav-button.router-link-active .bgl_icon-font {
|
|
171
|
-
background: var(--bgl-
|
|
171
|
+
background: var(--bgl-box-bg);
|
|
172
172
|
color: var(--bgl-primary);
|
|
173
173
|
}
|
|
174
174
|
|
|
@@ -178,7 +178,7 @@ const isOpen = $ref(!isSmallScreen)
|
|
|
178
178
|
}
|
|
179
179
|
|
|
180
180
|
.tooltip {
|
|
181
|
-
background-color: var(--bgl-
|
|
181
|
+
background-color: var(--bgl-popup-bg);
|
|
182
182
|
color: var(--bgl-primary);
|
|
183
183
|
line-height: 1;
|
|
184
184
|
padding: 0.5rem;
|
|
@@ -255,7 +255,7 @@ const isOpen = $ref(!isSmallScreen)
|
|
|
255
255
|
|
|
256
256
|
.nav.open .tooltip {
|
|
257
257
|
background-color: transparent;
|
|
258
|
-
color: var(--bgl-
|
|
258
|
+
color: var(--bgl-light-text);
|
|
259
259
|
padding: 0;
|
|
260
260
|
box-shadow: none;
|
|
261
261
|
pointer-events: all;
|
|
@@ -278,7 +278,7 @@ const isOpen = $ref(!isSmallScreen)
|
|
|
278
278
|
|
|
279
279
|
.nav.open .nav-button:hover,
|
|
280
280
|
.nav.open .nav-button.router-link-active {
|
|
281
|
-
background: var(--bgl-
|
|
281
|
+
background: var(--bgl-popup-bg);
|
|
282
282
|
color: var(--bgl-primary);
|
|
283
283
|
}
|
|
284
284
|
|
|
@@ -316,7 +316,7 @@ const isOpen = $ref(!isSmallScreen)
|
|
|
316
316
|
.tooltip {
|
|
317
317
|
opacity: 1;
|
|
318
318
|
background: transparent;
|
|
319
|
-
color: var(--bgl-
|
|
319
|
+
color: var(--bgl-light-text);
|
|
320
320
|
box-shadow: none;
|
|
321
321
|
font-size: 10px;
|
|
322
322
|
padding: 0;
|
|
@@ -333,7 +333,7 @@ th {
|
|
|
333
333
|
position: sticky;
|
|
334
334
|
top: 0;
|
|
335
335
|
z-index: 2;
|
|
336
|
-
background: var(--bgl-
|
|
336
|
+
background: var(--bgl-box-bg);
|
|
337
337
|
height: v-bind(computedItemHiehgt);
|
|
338
338
|
vertical-align: bottom;
|
|
339
339
|
font-weight: 400;
|
|
@@ -356,7 +356,7 @@ th {
|
|
|
356
356
|
position: sticky;
|
|
357
357
|
top: 0;
|
|
358
358
|
z-index: 2;
|
|
359
|
-
background: var(--bgl-
|
|
359
|
+
background: var(--bgl-box-bg);
|
|
360
360
|
vertical-align: bottom;
|
|
361
361
|
}
|
|
362
362
|
|
|
@@ -371,7 +371,7 @@ th {
|
|
|
371
371
|
|
|
372
372
|
.first-row .col {
|
|
373
373
|
cursor: pointer;
|
|
374
|
-
background: var(--bgl-
|
|
374
|
+
background: var(--bgl-box-bg);
|
|
375
375
|
}
|
|
376
376
|
|
|
377
377
|
.col {
|
|
@@ -97,7 +97,7 @@ const hours = Array.from({ length: 18 }, (_, index) => {
|
|
|
97
97
|
|
|
98
98
|
.time-wrap input[type='radio']:checked + label {
|
|
99
99
|
background: var(--bgl-primary);
|
|
100
|
-
color: var(--bgl-
|
|
100
|
+
color: var(--bgl-light-text);
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
.time-wrap label:hover {
|
|
@@ -109,14 +109,14 @@ const hours = Array.from({ length: 18 }, (_, index) => {
|
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
.dp__theme_light {
|
|
112
|
-
--dp-background-color: var(--bgl-
|
|
113
|
-
--dp-text-color: var(--bgl-
|
|
112
|
+
--dp-background-color: var(--bgl-popup-bg);
|
|
113
|
+
--dp-text-color: var(--bgl-text-color);
|
|
114
114
|
--dp-hover-color: var(--input-bg);
|
|
115
|
-
--dp-hover-text-color: var(--bgl-
|
|
115
|
+
--dp-hover-text-color: var(--bgl-text-color);
|
|
116
116
|
--dp-hover-icon-color: var(--bgl-primary);
|
|
117
117
|
--dp-primary-color: var(--bgl-primary);
|
|
118
118
|
--dp-primary-disabled-color: var(--bgl-primary);
|
|
119
|
-
--dp-primary-text-color: var(--bgl-
|
|
119
|
+
--dp-primary-text-color: var(--bgl-light-text);
|
|
120
120
|
--dp-secondary-color: var(--bgl-gray);
|
|
121
121
|
--dp-border-color: transparent;
|
|
122
122
|
--dp-menu-border-color: transparent;
|