@opendesign-plus-test/components 0.0.1-rc.163 → 0.0.1-rc.165

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.
Files changed (38) hide show
  1. package/dist/components/header/OHeader.vue.d.ts +4 -4
  2. package/dist/components/header/components/HeaderNav.vue.d.ts +9 -1
  3. package/dist/components/header/index.d.ts +2 -2
  4. package/dist/components/header-user/OHeaderUser.vue.d.ts +89 -1
  5. package/dist/components/header-user/index.d.ts +88 -1
  6. package/dist/components.cjs.js +40 -40
  7. package/dist/components.css +1 -1
  8. package/dist/components.es.js +11942 -11867
  9. package/dist/treeshaking/components/header/OHeader.css +17 -17
  10. package/dist/treeshaking/components/header/OHeader.vue.d.ts +4 -4
  11. package/dist/treeshaking/components/header/OHeader.vue.mjs +1 -1
  12. package/dist/treeshaking/components/header/OHeader.vue2.mjs +66 -18
  13. package/dist/treeshaking/components/header/components/HeaderContent.css +188 -186
  14. package/dist/treeshaking/components/header/components/HeaderContent.vue.mjs +1 -1
  15. package/dist/treeshaking/components/header/components/HeaderContent.vue2.mjs +8 -12
  16. package/dist/treeshaking/components/header/components/HeaderFlatten.css +56 -56
  17. package/dist/treeshaking/components/header/components/HeaderFlatten.vue.mjs +1 -1
  18. package/dist/treeshaking/components/header/components/HeaderFlatten.vue2.mjs +9 -9
  19. package/dist/treeshaking/components/header/components/HeaderNav.css +67 -54
  20. package/dist/treeshaking/components/header/components/HeaderNav.vue.d.ts +9 -1
  21. package/dist/treeshaking/components/header/components/HeaderNav.vue.mjs +1 -1
  22. package/dist/treeshaking/components/header/components/HeaderNav.vue2.mjs +81 -55
  23. package/dist/treeshaking/components/header/index.d.ts +2 -2
  24. package/dist/treeshaking/components/header-search/OHeaderSearch.css +42 -48
  25. package/dist/treeshaking/components/header-search/OHeaderSearch.vue.mjs +1 -1
  26. package/dist/treeshaking/components/header-search/OHeaderSearch.vue2.mjs +6 -4
  27. package/dist/treeshaking/components/header-user/OHeaderUser.css +40 -40
  28. package/dist/treeshaking/components/header-user/OHeaderUser.vue.d.ts +89 -1
  29. package/dist/treeshaking/components/header-user/OHeaderUser.vue.mjs +1 -1
  30. package/dist/treeshaking/components/header-user/OHeaderUser.vue2.mjs +49 -24
  31. package/dist/treeshaking/components/header-user/index.d.ts +88 -1
  32. package/dist/treeshaking/components/meeting/OMeetingMinutesCopyDetail.css +17 -17
  33. package/dist/treeshaking/components/meeting/OMeetingMinutesCopyDetail.vue.mjs +1 -1
  34. package/dist/treeshaking/components/meeting/OMeetingSendMinutesForm.css +42 -42
  35. package/dist/treeshaking/components/meeting/OMeetingSendMinutesForm.vue.mjs +1 -1
  36. package/dist/treeshaking/components/meeting/components/OMeetingSendMinutesDialog.css +3 -3
  37. package/dist/treeshaking/components/meeting/components/OMeetingSendMinutesDialog.vue.mjs +1 -1
  38. package/package.json +4 -4
@@ -1,73 +1,77 @@
1
- .hover-icon-rotate .o-icon[data-v-00cffd0d] {
1
+ .hover-icon-rotate .o-icon[data-v-2c2c1736] {
2
2
  transition: all var(--o-duration-m1) var(--o-easing-standard-in);
3
3
  }
4
4
  @media (hover: hover) {
5
- .hover-icon-rotate:hover .o-icon[data-v-00cffd0d] {
5
+ .hover-icon-rotate:hover .o-icon[data-v-2c2c1736] {
6
6
  transform: rotate(-180deg);
7
7
  }
8
8
  }
9
- .header-nav-wrap[data-v-00cffd0d] {
9
+ .header-nav-wrap[data-v-2c2c1736] {
10
10
  height: 100%;
11
11
  --nav-right: 64px;
12
12
  }
13
13
  @media (min-width: 1201px) and (max-width: 1680px) {
14
- .header-nav-wrap[data-v-00cffd0d] {
14
+ .header-nav-wrap[data-v-2c2c1736] {
15
15
  --nav-right: 48px;
16
16
  }
17
17
  }
18
18
  @media (max-width: 1200px) {
19
- .header-nav-wrap[data-v-00cffd0d] {
19
+ .header-nav-wrap[data-v-2c2c1736] {
20
20
  --nav-right: 32px;
21
21
  }
22
22
  }
23
- .header-nav-wrap .header-nav[data-v-00cffd0d] {
23
+ .header-nav-wrap .header-nav[data-v-2c2c1736] {
24
+ position: relative;
24
25
  height: 100%;
25
26
  display: flex;
26
27
  justify-content: space-between;
27
28
  width: calc(100% - var(--nav-right));
28
29
  align-items: center;
29
30
  }
30
- .header-nav-wrap .header-nav-scroll[data-v-00cffd0d] {
31
- width: calc(100% - var(--nav-right) - 24px);
32
- }
33
- .o-nav[data-v-00cffd0d] {
31
+ .o-nav[data-v-2c2c1736] {
34
32
  height: 100%;
35
33
  position: relative;
36
34
  overflow-y: hidden;
37
35
  overflow-x: auto;
38
36
  z-index: 8;
39
37
  }
40
- .o-nav[data-v-00cffd0d]::-webkit-scrollbar {
38
+ .o-nav[data-v-2c2c1736]::-webkit-scrollbar {
41
39
  display: none;
42
40
  }
43
- .left-icon[data-v-00cffd0d],
44
- .right-icon[data-v-00cffd0d] {
41
+ .left-icon[data-v-2c2c1736],
42
+ .right-icon[data-v-2c2c1736] {
45
43
  display: flex;
44
+ background-color: var(--o-color-fill2);
46
45
  align-items: center;
47
46
  cursor: pointer;
48
- position: relative;
47
+ position: absolute;
48
+ top: 50%;
49
+ transform: translateY(-50%);
50
+ z-index: 10;
49
51
  width: 16px;
50
- height: 16px;
51
- border-radius: var(--o-radius-xs);
52
+ height: 100%;
52
53
  }
53
- .left-icon .o-icon[data-v-00cffd0d],
54
- .right-icon .o-icon[data-v-00cffd0d] {
54
+ .left-icon .o-icon[data-v-2c2c1736],
55
+ .right-icon .o-icon[data-v-2c2c1736] {
55
56
  --icon-size: 16px;
56
57
  position: relative;
57
58
  z-index: 11;
58
59
  }
59
60
  @media (hover: hover) {
60
- .left-icon[data-v-00cffd0d]:hover,
61
- .right-icon[data-v-00cffd0d]:hover {
61
+ .left-icon[data-v-2c2c1736]:hover,
62
+ .right-icon[data-v-2c2c1736]:hover {
62
63
  background-color: var(--o-color-control2-light);
63
64
  color: var(--o-color-link2);
64
65
  }
65
66
  }
66
- .left-icon[data-v-00cffd0d]:active,
67
- .right-icon[data-v-00cffd0d]:active {
67
+ .left-icon[data-v-2c2c1736]:active,
68
+ .right-icon[data-v-2c2c1736]:active {
68
69
  color: var(--o-color-link3);
69
70
  }
70
- .left-icon[data-v-00cffd0d]::before {
71
+ .left-icon[data-v-2c2c1736] {
72
+ left: 0;
73
+ }
74
+ .left-icon[data-v-2c2c1736]::before {
71
75
  content: "";
72
76
  position: absolute;
73
77
  width: 50px;
@@ -79,16 +83,19 @@
79
83
  cursor: default;
80
84
  }
81
85
  @media (min-width: 1201px) and (max-width: 1680px) {
82
- .left-icon[data-v-00cffd0d]::before {
86
+ .left-icon[data-v-2c2c1736]::before {
83
87
  top: -24px;
84
88
  }
85
89
  }
86
90
  @media (max-width: 1200px) {
87
- .left-icon[data-v-00cffd0d]::before {
91
+ .left-icon[data-v-2c2c1736]::before {
88
92
  top: -20px;
89
93
  }
90
94
  }
91
- .right-icon[data-v-00cffd0d]::before {
95
+ .right-icon[data-v-2c2c1736] {
96
+ right: 0;
97
+ }
98
+ .right-icon[data-v-2c2c1736]::before {
92
99
  content: "";
93
100
  position: absolute;
94
101
  width: 50px;
@@ -100,25 +107,25 @@
100
107
  cursor: default;
101
108
  }
102
109
  @media (min-width: 1201px) and (max-width: 1680px) {
103
- .right-icon[data-v-00cffd0d]::before {
110
+ .right-icon[data-v-2c2c1736]::before {
104
111
  top: -24px;
105
112
  }
106
113
  }
107
114
  @media (max-width: 1200px) {
108
- .right-icon[data-v-00cffd0d]::before {
115
+ .right-icon[data-v-2c2c1736]::before {
109
116
  top: -20px;
110
117
  }
111
118
  }
112
- [data-o-theme*=dark] .left-icon[data-v-00cffd0d]::before {
119
+ [data-o-theme*=dark] .left-icon[data-v-2c2c1736]::before {
113
120
  background-image: linear-gradient(90deg, rgba(var(--o-grey-4), 1) 0%, rgba(var(--o-grey-4), 0) 100%);
114
121
  }
115
- [data-o-theme*=dark] .right-icon[data-v-00cffd0d]::before {
122
+ [data-o-theme*=dark] .right-icon[data-v-2c2c1736]::before {
116
123
  background-image: linear-gradient(90deg, rgba(var(--o-grey-4), 0) 0%, rgba(var(--o-grey-4), 1) 100%);
117
124
  }
118
- .o-nav-scroll[data-v-00cffd0d]::after {
125
+ .o-nav-scroll[data-v-2c2c1736]::after {
119
126
  display: none;
120
127
  }
121
- .o-nav-list[data-v-00cffd0d] {
128
+ .o-nav-list[data-v-2c2c1736] {
122
129
  display: flex;
123
130
  height: 100%;
124
131
  width: fit-content;
@@ -127,7 +134,13 @@
127
134
  padding: 0;
128
135
  margin: 0;
129
136
  }
130
- .o-nav-list li[data-v-00cffd0d] {
137
+ .o-nav-list .nav-sentinel[data-v-2c2c1736] {
138
+ flex: 0 0 2px;
139
+ width: 2px;
140
+ padding: 0;
141
+ pointer-events: none;
142
+ }
143
+ .o-nav-list li[data-v-2c2c1736] {
131
144
  position: relative;
132
145
  display: flex;
133
146
  align-items: center;
@@ -135,10 +148,10 @@
135
148
  color: var(--o-color-info1);
136
149
  transition: all var(--o-duration-s) var(--o-easing-standard);
137
150
  }
138
- .o-nav-list li .nav-text[data-v-00cffd0d] {
151
+ .o-nav-list li .nav-text[data-v-2c2c1736] {
139
152
  position: relative;
140
153
  }
141
- .o-nav-list li .nav-text[data-v-00cffd0d]::after {
154
+ .o-nav-list li .nav-text[data-v-2c2c1736]::after {
142
155
  content: "";
143
156
  position: absolute;
144
157
  left: 0;
@@ -151,32 +164,32 @@
151
164
  transition: all var(--o-duration-s) var(--o-easing-standard);
152
165
  }
153
166
  @media (max-width: 1440px) {
154
- .o-nav-list li .nav-text[data-v-00cffd0d]::after {
167
+ .o-nav-list li .nav-text[data-v-2c2c1736]::after {
155
168
  bottom: -21px;
156
169
  }
157
170
  }
158
171
  @media (max-width: 1200px) {
159
- .o-nav-list li .nav-text[data-v-00cffd0d]::after {
172
+ .o-nav-list li .nav-text[data-v-2c2c1736]::after {
160
173
  bottom: -17px;
161
174
  }
162
175
  }
163
- .o-nav-list li.is-selected .nav-text[data-v-00cffd0d] {
176
+ .o-nav-list li.is-selected .nav-text[data-v-2c2c1736] {
164
177
  color: var(--o-color-primary2);
165
178
  }
166
- .o-nav-list li.is-active .nav-text[data-v-00cffd0d] {
179
+ .o-nav-list li.is-active .nav-text[data-v-2c2c1736] {
167
180
  color: var(--o-color-primary1);
168
181
  z-index: 99;
169
182
  font-weight: 600;
170
183
  }
171
- .o-nav-list li.is-active .nav-text[data-v-00cffd0d]::after {
184
+ .o-nav-list li.is-active .nav-text[data-v-2c2c1736]::after {
172
185
  content: "";
173
186
  opacity: 1;
174
187
  }
175
- .o-nav-list li.is-disabled[data-v-00cffd0d] {
188
+ .o-nav-list li.is-disabled[data-v-2c2c1736] {
176
189
  color: var(--o-color-info4);
177
190
  pointer-events: none;
178
191
  }
179
- .o-nav-list .nav-item[data-v-00cffd0d] {
192
+ .o-nav-list .nav-item[data-v-2c2c1736] {
180
193
  cursor: default;
181
194
  display: flex;
182
195
  align-items: center;
@@ -185,60 +198,60 @@
185
198
  line-height: 24px;
186
199
  }
187
200
  @media (min-width: 1201px) and (max-width: 1680px) {
188
- .o-nav-list .nav-item[data-v-00cffd0d] {
201
+ .o-nav-list .nav-item[data-v-2c2c1736] {
189
202
  font-size: 14px;
190
203
  line-height: 22px;
191
204
  }
192
205
  }
193
206
  @media (min-width: 841px) and (max-width: 1200px) {
194
- .o-nav-list .nav-item[data-v-00cffd0d] {
207
+ .o-nav-list .nav-item[data-v-2c2c1736] {
195
208
  font-size: 14px;
196
209
  line-height: 22px;
197
210
  }
198
211
  }
199
212
  @media (min-width: 601px) and (max-width: 840px) {
200
- .o-nav-list .nav-item[data-v-00cffd0d] {
213
+ .o-nav-list .nav-item[data-v-2c2c1736] {
201
214
  font-size: 14px;
202
215
  line-height: 22px;
203
216
  }
204
217
  }
205
218
  @media (max-width: 600px) {
206
- .o-nav-list .nav-item[data-v-00cffd0d] {
219
+ .o-nav-list .nav-item[data-v-2c2c1736] {
207
220
  font-size: 12px;
208
221
  line-height: 18px;
209
222
  }
210
223
  }
211
224
  @media (max-width: 1440px) {
212
- .o-nav-list .nav-item[data-v-00cffd0d] {
225
+ .o-nav-list .nav-item[data-v-2c2c1736] {
213
226
  padding: 18px 12px;
214
227
  }
215
228
  }
216
229
  @media (min-width: 841px) and (max-width: 1200px) {
217
- .o-nav-list .nav-item[data-v-00cffd0d] {
230
+ .o-nav-list .nav-item[data-v-2c2c1736] {
218
231
  padding: 14px 8px;
219
232
  }
220
233
  }
221
234
  @media (min-width: 841px) and (max-width: 1000px) {
222
- .o-nav-list .nav-item.en[data-v-00cffd0d] {
235
+ .o-nav-list .nav-item.en[data-v-2c2c1736] {
223
236
  padding: var(--o-gap-2);
224
237
  }
225
238
  }
226
- .o-nav-list .item-other[data-v-00cffd0d] {
239
+ .o-nav-list .item-other[data-v-2c2c1736] {
227
240
  cursor: pointer;
228
241
  }
229
- .o-nav-list .item-other .content-tag[data-v-00cffd0d] {
242
+ .o-nav-list .item-other .content-tag[data-v-2c2c1736] {
230
243
  margin-left: var(--o-gap-2);
231
244
  --layout-pkg-radius: var(--o-radius-xs);
232
245
  }
233
- .o-nav-list .item-other:active .nav-text[data-v-00cffd0d] {
246
+ .o-nav-list .item-other:active .nav-text[data-v-2c2c1736] {
234
247
  color: var(--o-color-primary1);
235
248
  z-index: 99;
236
249
  font-weight: 600;
237
250
  }
238
- .o-nav-list .item-other:active .nav-text[data-v-00cffd0d]::after {
251
+ .o-nav-list .item-other:active .nav-text[data-v-2c2c1736]::after {
239
252
  content: "";
240
253
  opacity: 1;
241
254
  }
242
- .mindspore .item-other .content-tag[data-v-00cffd0d] {
255
+ .mindspore .item-other .content-tag[data-v-2c2c1736] {
243
256
  --layout-pkg-radius: 100vh;
244
257
  }
@@ -3,20 +3,28 @@ export interface OHeaderEmitsT {
3
3
  (e: 'handle-mouseenter', val: any): void;
4
4
  (e: 'handle-mouseleave', val: any): void;
5
5
  (e: 'handle-click', val: any): void;
6
+ (e: 'nav-compress', val: boolean): void;
6
7
  (e: 'nav-layout', val: any): void;
8
+ (e: 'update:hoverId', val: NavLiT['hoverId']): void;
7
9
  }
8
10
  declare const _default: import('vue').DefineComponent<NavLiT, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
9
11
  "handle-mouseenter": (val: any) => any;
10
12
  "handle-mouseleave": (val: any) => any;
11
13
  "handle-click": (val: any) => any;
14
+ "nav-compress": (val: boolean) => any;
12
15
  "nav-layout": (val: any) => any;
16
+ "update:hoverId": (val: string | number) => any;
13
17
  }, string, import('vue').PublicProps, Readonly<NavLiT> & Readonly<{
14
18
  "onHandle-mouseenter"?: ((val: any) => any) | undefined;
15
19
  "onHandle-mouseleave"?: ((val: any) => any) | undefined;
16
20
  "onHandle-click"?: ((val: any) => any) | undefined;
21
+ "onNav-compress"?: ((val: boolean) => any) | undefined;
17
22
  "onNav-layout"?: ((val: any) => any) | undefined;
23
+ "onUpdate:hoverId"?: ((val: string | number) => any) | undefined;
18
24
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
19
- navRef: HTMLDivElement;
25
+ headerNavRef: HTMLDivElement;
20
26
  navListRef: HTMLUListElement;
27
+ navStartRef: HTMLLIElement;
28
+ navEndRef: HTMLLIElement;
21
29
  }, HTMLDivElement>;
22
30
  export default _default;
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./HeaderNav.vue2.mjs";
2
2
  import './HeaderNav.css';
3
3
  import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.mjs";
4
- const HeaderNav = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-00cffd0d"]]);
4
+ const HeaderNav = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-2c2c1736"]]);
5
5
  export {
6
6
  HeaderNav as default
7
7
  };
@@ -1,8 +1,8 @@
1
- import { defineComponent, ref, inject, onMounted, nextTick, onUnmounted, resolveDirective, openBlock, createElementBlock, createElementVNode, normalizeClass, createVNode, unref, withCtx, createCommentVNode, Fragment, renderList, withDirectives, toDisplayString, createBlock, createTextVNode } from "vue";
1
+ import { defineComponent, ref, inject, resolveDirective, openBlock, createElementBlock, createElementVNode, createVNode, unref, withCtx, createCommentVNode, normalizeClass, Fragment, renderList, withDirectives, toDisplayString, createBlock, createTextVNode } from "vue";
2
2
  import { OIcon, OTag } from "@opensig/opendesign";
3
3
  import IconCaretLeft from "../../../_virtual/icon-caret-left.mjs";
4
4
  import IconCaretRight from "../../../_virtual/icon-caret-right.mjs";
5
- import { useDebounceFn } from "@vueuse/core";
5
+ import { useVModel, useElementSize, watchDebounced, useIntersectionObserver } from "@vueuse/core";
6
6
  const _hoisted_1 = { class: "header-nav-wrap" };
7
7
  const _hoisted_2 = {
8
8
  key: 0,
@@ -25,36 +25,59 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
25
25
  activeIndex: {},
26
26
  hoverId: {}
27
27
  },
28
- emits: ["handle-mouseenter", "handle-mouseleave", "handle-click", "nav-layout"],
28
+ emits: ["handle-mouseenter", "handle-mouseleave", "handle-click", "nav-compress", "nav-layout", "update:hoverId"],
29
29
  setup(__props, { emit: __emit }) {
30
30
  const emit = __emit;
31
31
  const props = __props;
32
32
  const navRef = ref();
33
- const navListRef = ref();
34
- const resizeTimer = ref();
35
33
  const navVisibleRight = ref(false);
36
34
  const navVisibleLeft = ref(false);
37
- const hoverIndex = ref();
38
- const toggleDebounced = useDebounceFn((item, id) => {
39
- hoverIndex.value = item == null ? void 0 : item.id;
35
+ const hoverIdVModel = useVModel(props, "hoverId");
36
+ const toggle = (item, id) => {
37
+ hoverIdVModel.value = item.id;
40
38
  if (id === "mouseenter") {
41
39
  emit("handle-mouseenter", item);
42
40
  }
43
41
  if (id === "mouseleave") {
44
- hoverIndex.value = "";
42
+ hoverIdVModel.value = "";
45
43
  emit("handle-mouseleave", item);
46
44
  }
47
- }, 100);
45
+ };
48
46
  const handleClick = (item) => {
49
47
  emit("handle-click", item);
50
48
  };
49
+ const headerNavRef = ref();
50
+ const navListRef = ref();
51
+ const { width: headerNavWidth } = useElementSize(headerNavRef);
52
+ const { width: navListWidth } = useElementSize(navListRef);
53
+ const headerUserFullWidth = inject("headerUserFullWidth");
54
+ const isSearchHidden = inject("isSearchHidden");
55
+ const shrinkUserOrSearch = inject("shrinkUserOrSearch");
56
+ const expandUser = inject("expandUser");
57
+ const expandSearch = inject("expandSearch");
58
+ watchDebounced(
59
+ () => Math.floor(headerNavWidth.value - navListWidth.value),
60
+ (diffWidth) => {
61
+ if (diffWidth <= 0) {
62
+ shrinkUserOrSearch == null ? void 0 : shrinkUserOrSearch();
63
+ return;
64
+ }
65
+ if (diffWidth > 161 && (isSearchHidden == null ? void 0 : isSearchHidden.value)) {
66
+ expandSearch == null ? void 0 : expandSearch();
67
+ return;
68
+ }
69
+ if ((headerUserFullWidth == null ? void 0 : headerUserFullWidth.value) && diffWidth > headerUserFullWidth.value) {
70
+ expandUser == null ? void 0 : expandUser();
71
+ }
72
+ },
73
+ { debounce: 100, immediate: true }
74
+ );
75
+ const navStartRef = ref();
76
+ const navEndRef = ref();
51
77
  const scrollNavRight = () => {
52
- navVisibleLeft.value = true;
53
- nextTick(() => {
54
- navRef.value.scrollTo({
55
- left: navRef.value.clientWidth,
56
- behavior: "smooth"
57
- });
78
+ navRef.value.scrollTo({
79
+ left: navRef.value.clientWidth,
80
+ behavior: "smooth"
58
81
  });
59
82
  };
60
83
  const scrollNavLeft = () => {
@@ -62,26 +85,30 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
62
85
  left: 0,
63
86
  behavior: "smooth"
64
87
  });
65
- navVisibleLeft.value = false;
66
88
  };
67
- const calculateLayout = () => {
68
- var _a, _b;
69
- if (((_a = navRef.value) == null ? void 0 : _a.clientWidth) < ((_b = navListRef.value) == null ? void 0 : _b.clientWidth)) {
70
- if (!navVisibleRight.value) {
71
- emit("nav-layout", true);
72
- }
73
- setTimeout(() => {
74
- navVisibleRight.value = true;
75
- }, 200);
76
- } else {
77
- if (navVisibleRight.value) {
78
- emit("nav-layout", false);
89
+ let hasEmittedOverflow = false;
90
+ useIntersectionObserver(
91
+ [navStartRef, navEndRef],
92
+ (entries) => {
93
+ entries.forEach((entry) => {
94
+ if (entry.target === navStartRef.value) {
95
+ navVisibleLeft.value = !entry.isIntersecting;
96
+ }
97
+ if (entry.target === navEndRef.value) {
98
+ navVisibleRight.value = !entry.isIntersecting;
99
+ }
100
+ });
101
+ const hasOverflow = navVisibleLeft.value || navVisibleRight.value;
102
+ if (hasOverflow !== hasEmittedOverflow) {
103
+ hasEmittedOverflow = hasOverflow;
104
+ emit("nav-layout", hasOverflow);
79
105
  }
80
- setTimeout(() => {
81
- navVisibleRight.value = false;
82
- }, 200);
106
+ },
107
+ {
108
+ root: navRef,
109
+ threshold: 0
83
110
  }
84
- };
111
+ );
85
112
  const navFirstHoverTime = inject("navFirstHoverTime");
86
113
  const navStepCount = inject("navStepCount");
87
114
  const increNavStepCount = inject("increNavStepCount");
@@ -113,25 +140,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
113
140
  };
114
141
  return res;
115
142
  };
116
- onMounted(() => {
117
- window.addEventListener("resize", calculateLayout);
118
- nextTick(() => {
119
- calculateLayout();
120
- resizeTimer.value = setTimeout(() => {
121
- calculateLayout();
122
- }, 1e3);
123
- });
124
- });
125
- onUnmounted(() => {
126
- window.removeEventListener("resize", calculateLayout);
127
- clearTimeout(resizeTimer.value);
128
- });
129
143
  return (_ctx, _cache) => {
130
144
  var _a;
131
145
  const _directive_analytics = resolveDirective("analytics");
132
146
  return openBlock(), createElementBlock("div", _hoisted_1, [
133
147
  createElementVNode("div", {
134
- class: normalizeClass(["header-nav", { "header-nav-scroll": navVisibleLeft.value }])
148
+ ref_key: "headerNavRef",
149
+ ref: headerNavRef,
150
+ class: "header-nav"
135
151
  }, [
136
152
  navVisibleLeft.value ? (openBlock(), createElementBlock("div", _hoisted_2, [
137
153
  createVNode(unref(OIcon), { onClick: scrollNavLeft }, {
@@ -142,8 +158,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
142
158
  })
143
159
  ])) : createCommentVNode("", true),
144
160
  createElementVNode("div", {
145
- ref_key: "navRef",
146
- ref: navRef,
147
161
  class: normalizeClass(["o-nav", { "o-nav-scroll": navVisibleLeft.value || !navVisibleRight.value }])
148
162
  }, [
149
163
  createElementVNode("ul", {
@@ -152,17 +166,23 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
152
166
  class: normalizeClass(["o-nav-list", [(_a = props.community) == null ? void 0 : _a.toLowerCase()]]),
153
167
  onMouseenter: onHoverHeader
154
168
  }, [
169
+ createElementVNode("li", {
170
+ ref_key: "navStartRef",
171
+ ref: navStartRef,
172
+ class: "nav-sentinel",
173
+ "aria-hidden": "true"
174
+ }, null, 512),
155
175
  (openBlock(true), createElementBlock(Fragment, null, renderList(__props.navData, (item, idx) => {
156
176
  var _a2, _b;
157
177
  return withDirectives((openBlock(), createElementBlock("li", {
158
178
  key: item.id,
159
179
  class: normalizeClass({
160
- "is-selected": hoverIndex.value === item.id || props.hoverId === item.id,
180
+ "is-selected": unref(hoverIdVModel) === item.id,
161
181
  "is-active": props.activeIndex === idx || props.activeIndex === item.id,
162
182
  "is-disabled": item == null ? void 0 : item.disabled
163
183
  }),
164
- onMouseenter: ($event) => unref(toggleDebounced)(item, "mouseenter"),
165
- onMouseleave: ($event) => unref(toggleDebounced)(item, "mouseleave")
184
+ onMouseenter: ($event) => toggle(item, "mouseenter"),
185
+ onMouseleave: ($event) => toggle(item, "mouseleave")
166
186
  }, [
167
187
  ((_a2 = item == null ? void 0 : item.children) == null ? void 0 : _a2.length) ? (openBlock(), createElementBlock("div", {
168
188
  key: 0,
@@ -193,10 +213,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
193
213
  [_directive_analytics, () => onHoverNav(item.label), "mouseenter"],
194
214
  [_directive_analytics, () => onClickNavItem(item)]
195
215
  ]);
196
- }), 128))
216
+ }), 128)),
217
+ createElementVNode("li", {
218
+ ref_key: "navEndRef",
219
+ ref: navEndRef,
220
+ class: "nav-sentinel",
221
+ "aria-hidden": "true"
222
+ }, null, 512)
197
223
  ], 34)
198
224
  ], 2),
199
- navVisibleRight.value && !navVisibleLeft.value ? (openBlock(), createElementBlock("div", _hoisted_8, [
225
+ navVisibleRight.value ? (openBlock(), createElementBlock("div", _hoisted_8, [
200
226
  createVNode(unref(OIcon), { onClick: scrollNavRight }, {
201
227
  default: withCtx(() => [
202
228
  createVNode(unref(IconCaretRight))
@@ -204,7 +230,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
204
230
  _: 1
205
231
  })
206
232
  ])) : createCommentVNode("", true)
207
- ], 2)
233
+ ], 512)
208
234
  ]);
209
235
  };
210
236
  }
@@ -11,8 +11,8 @@ declare const OHeader: {
11
11
  }, import('vue').PublicProps, {
12
12
  isFlatten: boolean;
13
13
  }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
14
- contentRef: HTMLDivElement;
15
- }, HTMLDivElement, import('vue').ComponentProvideOptions, {
14
+ contentRef: HTMLElement;
15
+ }, HTMLElement, import('vue').ComponentProvideOptions, {
16
16
  P: {};
17
17
  B: {};
18
18
  D: {};