@tekkare/romulus 0.1.32 → 0.1.33
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/module.json
CHANGED
|
@@ -75,6 +75,26 @@ function toggle(which: RmFilterBarPanel) {
|
|
|
75
75
|
panel.value = panel.value === which ? null : which
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
+
/**
|
|
79
|
+
* Le lien de recherche avancee est pose DANS le champ, a son bout : le champ
|
|
80
|
+
* doit donc lui reserver sa place, sinon le texte saisi et la croix passent
|
|
81
|
+
* dessous. La largeur se mesure — « Recherche avancee » et « Advanced search »
|
|
82
|
+
* ne font pas la meme longueur.
|
|
83
|
+
*/
|
|
84
|
+
const advancedLink = ref<HTMLElement | null>(null)
|
|
85
|
+
const advancedWidth = ref(0)
|
|
86
|
+
let advancedSize: ResizeObserver | null = null
|
|
87
|
+
|
|
88
|
+
function watchAdvanced() {
|
|
89
|
+
if (!advancedLink.value) return
|
|
90
|
+
advancedSize?.disconnect()
|
|
91
|
+
advancedSize = new ResizeObserver(() => {
|
|
92
|
+
advancedWidth.value = advancedLink.value?.offsetWidth ?? 0
|
|
93
|
+
})
|
|
94
|
+
advancedSize.observe(advancedLink.value)
|
|
95
|
+
advancedWidth.value = advancedLink.value.offsetWidth
|
|
96
|
+
}
|
|
97
|
+
|
|
78
98
|
/** Onglets de vue publies par la page. */
|
|
79
99
|
const { view } = useRmFilterBarView()
|
|
80
100
|
|
|
@@ -100,11 +120,16 @@ function watchHeader() {
|
|
|
100
120
|
stickyTop.value = header.offsetHeight
|
|
101
121
|
}
|
|
102
122
|
|
|
103
|
-
onMounted(() =>
|
|
123
|
+
onMounted(() => {
|
|
124
|
+
watchHeader()
|
|
125
|
+
watchAdvanced()
|
|
126
|
+
})
|
|
104
127
|
|
|
105
128
|
onBeforeUnmount(() => {
|
|
106
129
|
headerSize?.disconnect()
|
|
107
130
|
headerSize = null
|
|
131
|
+
advancedSize?.disconnect()
|
|
132
|
+
advancedSize = null
|
|
108
133
|
})
|
|
109
134
|
</script>
|
|
110
135
|
|
|
@@ -113,7 +138,7 @@ onBeforeUnmount(() => {
|
|
|
113
138
|
id="rm_filter_bar"
|
|
114
139
|
class="rm-fbar"
|
|
115
140
|
:class="panel ? 'rm-fbar--open' : 'rm-fbar--closed'"
|
|
116
|
-
:style="{ top: `${stickyTop}px` }"
|
|
141
|
+
:style="{ top: `${stickyTop}px`, '--rm-fbar-advanced-w': `${advancedWidth}px` }"
|
|
117
142
|
>
|
|
118
143
|
<div class="rm-fbar__row">
|
|
119
144
|
<div v-if="view" class="rm-fbar__view">
|
|
@@ -134,20 +159,21 @@ onBeforeUnmount(() => {
|
|
|
134
159
|
|
|
135
160
|
<div class="rm-fbar__search">
|
|
136
161
|
<slot name="Search" />
|
|
137
|
-
</div>
|
|
138
162
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
163
|
+
<!-- La recherche avancee s'ouvre par un lien pose dans le champ, a son
|
|
164
|
+
bout : elle prolonge la recherche, elle n'est pas un troisieme
|
|
165
|
+
reglage a cote de « Filtres » et « Personnaliser ». -->
|
|
166
|
+
<button
|
|
167
|
+
v-if="hasAdvanced"
|
|
168
|
+
ref="advancedLink"
|
|
169
|
+
type="button"
|
|
170
|
+
class="rm-fbar__advanced"
|
|
171
|
+
:class="{ 'is-active': advancedOpen }"
|
|
172
|
+
@click="toggle('advanced')"
|
|
173
|
+
>
|
|
174
|
+
{{ t.advanced }}
|
|
175
|
+
</button>
|
|
176
|
+
</div>
|
|
151
177
|
|
|
152
178
|
<button
|
|
153
179
|
v-if="hasCustomize"
|
|
@@ -207,5 +233,5 @@ onBeforeUnmount(() => {
|
|
|
207
233
|
</template>
|
|
208
234
|
|
|
209
235
|
<style scoped>
|
|
210
|
-
.rm-fbar{margin-inline:calc((min(var(--oip-content-max, 100%), 100%) - var(--oip-main-w, 100%))/2);position:sticky;width:var(--oip-main-w,100%);z-index:91;--rm-fbar-field-h:32px;backdrop-filter:blur(12px);background:rgba(245,245,249,.8);border-bottom:1px solid var(--border-default);display:flex;flex-direction:column;font-family:var(--font-sans)}.rm-fbar__row{align-items:flex-start;display:flex;gap:12px;padding-block:8px;padding-inline:max(32px,(100% - var(--oip-content-max,100%))/2 + 32px)}.rm-fbar--open .rm-fbar__row{border-bottom:1px solid var(--border-default)}.rm-fbar__toggle :deep(p),.rm-fbar__toggle :deep(span){font-size:inherit;font-weight:inherit;line-height:inherit;margin:0}.rm-fbar__toggle{align-items:center;background:var(--bg-surface);border:1px solid var(--border-default);border-radius:var(--radius-pill);color:var(--text-primary);cursor:pointer;display:flex;flex:0 0 auto;font-family:inherit;font-size:var(--font-14);font-weight:var(--weight-medium);gap:6px;height:var(--rm-fbar-field-h);justify-content:center;padding:0 14px}.rm-fbar__toggle:hover{background:var(--bg-surface-3)}.rm-fbar__toggle.is-active,.rm-fbar__toggle.is-active:hover{background:var(--color-primary);border-color:var(--color-primary);color:var(--color-text-inverse)}.rm-fbar__toggle.is-active .rm-fbar__badge{background:var(--color-text-inverse);color:var(--color-primary)}.rm-fbar__badge{align-items:center;background:var(--color-primary);border-radius:16px;color:var(--color-text-inverse);display:inline-flex;font-size:var(--font-11);font-weight:var(--weight-bold);justify-content:center;min-width:18px;padding:0 5px}.rm-fbar__view{align-items:center;display:flex;flex:0 0 auto}.rm-fbar__advanced{align-items:center;background:none;border:none;color:var(--color-primary);cursor:pointer;display:inline-flex;
|
|
236
|
+
.rm-fbar{margin-inline:calc((min(var(--oip-content-max, 100%), 100%) - var(--oip-main-w, 100%))/2);position:sticky;width:var(--oip-main-w,100%);z-index:91;--rm-fbar-field-h:32px;backdrop-filter:blur(12px);background:rgba(245,245,249,.8);border-bottom:1px solid var(--border-default);display:flex;flex-direction:column;font-family:var(--font-sans)}.rm-fbar__row{align-items:flex-start;display:flex;gap:12px;padding-block:8px;padding-inline:max(32px,(100% - var(--oip-content-max,100%))/2 + 32px)}.rm-fbar--open .rm-fbar__row{border-bottom:1px solid var(--border-default)}.rm-fbar__toggle :deep(p),.rm-fbar__toggle :deep(span){font-size:inherit;font-weight:inherit;line-height:inherit;margin:0}.rm-fbar__toggle{align-items:center;background:var(--bg-surface);border:1px solid var(--border-default);border-radius:var(--radius-pill);color:var(--text-primary);cursor:pointer;display:flex;flex:0 0 auto;font-family:inherit;font-size:var(--font-14);font-weight:var(--weight-medium);gap:6px;height:var(--rm-fbar-field-h);justify-content:center;padding:0 14px}.rm-fbar__toggle:hover{background:var(--bg-surface-3)}.rm-fbar__toggle.is-active,.rm-fbar__toggle.is-active:hover{background:var(--color-primary);border-color:var(--color-primary);color:var(--color-text-inverse)}.rm-fbar__toggle.is-active .rm-fbar__badge{background:var(--color-text-inverse);color:var(--color-primary)}.rm-fbar__badge{align-items:center;background:var(--color-primary);border-radius:16px;color:var(--color-text-inverse);display:inline-flex;font-size:var(--font-11);font-weight:var(--weight-bold);justify-content:center;min-width:18px;padding:0 5px}.rm-fbar__view{align-items:center;display:flex;flex:0 0 auto}.rm-fbar__advanced{align-items:center;background:none;border:none;border-left:1px solid var(--border-default);color:var(--color-primary);cursor:pointer;display:inline-flex;font-family:inherit;font-size:var(--font-13);font-weight:var(--weight-medium);height:var(--rm-fbar-field-h);padding:0 0 0 12px;position:absolute;right:14px;text-decoration-line:underline;top:0;white-space:nowrap;z-index:2}.rm-fbar__advanced.is-active,.rm-fbar__advanced:hover{color:var(--color-primary-hover,var(--color-primary));text-decoration-thickness:2px}.rm-fbar__search{align-items:center;display:flex;flex:1 1 auto;gap:8px;min-width:0;position:relative}.rm-fbar__search:empty{display:none}.rm-fbar__search :deep(.filters_input_search){border-radius:var(--radius-pill);box-sizing:border-box;height:auto;min-height:var(--rm-fbar-field-h);padding-right:calc(var(--rm-fbar-advanced-w, 0px) + 12px);width:100%}.rm-fbar__search :deep(.research_tags:not(:has(*))){display:none}.rm-fbar__search :deep(.select_shortcut){box-sizing:border-box;font-size:var(--font-11);height:24px;padding-block:0}.rm-fbar__search :deep(.select_shortcut:hover){background:var(--bg-surface-3)!important;border-color:var(--border-default)!important;color:inherit!important}.rm-fbar__search :deep(.select_shortcut:hover svg){color:inherit!important}.rm-fbar__search :deep(.remove_search_section){border-left:none;border-radius:0 var(--radius-pill) var(--radius-pill) 0}.rm-fbar__search :deep(.remove_search_section:hover){background:transparent!important}.rm-fbar__search :deep(.remove_search_section:hover svg){color:var(--text-primary)!important}.rm-fbar__search :deep(.filters_input_search.no_bottom){border-bottom:1.5px solid var(--color-primary)!important;border-radius:var(--radius-pill)}.rm-fbar__search :deep(.search_suggestions){border:1px solid var(--border-default);border-radius:var(--radius-2xl);box-shadow:var(--shadow-lg);left:0;padding:6px;right:0;top:calc(100% + 6px);width:auto}.rm-fbar__search :deep(.sugg_container>*){border-radius:var(--radius-lg)}.rm-fbar__search :deep(.sugg_container>.selected){background:color-mix(in srgb,var(--color-primary) 6%,transparent)!important}.rm-fbar__panel{--rm-filter-col:224px;align-items:end;display:grid;gap:16px;grid-template-columns:repeat(auto-fit,minmax(0,var(--rm-filter-col)));justify-content:center;padding-block:16px 20px;padding-inline:56px}.rm-fbar__panel--wide{align-items:stretch;display:flex;flex-direction:column;gap:12px}.rm-fbar__filters{display:contents}.rm-fbar__panel-head{align-items:baseline;display:flex;gap:16px;grid-column:1/-1;width:100%}.rm-fbar__customize{grid-column:1/-1}.rm-fbar__panel :deep(.filters_row_break){grid-column:1/-1}.rm-fbar__panel-title{font-size:var(--font-18);font-weight:800;margin:0}.rm-fbar__action{background:none;border:none;cursor:pointer;font-family:inherit;font-size:var(--font-14);font-weight:var(--weight-medium);padding:0;text-decoration-line:underline}.rm-fbar__action--save{color:var(--color-primary)}.rm-fbar__action--clear{color:var(--text-secondary)}
|
|
211
237
|
</style>
|