@flux-ui/internals 3.0.0-next.6 → 3.0.0-next.61
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/README.md +36 -0
- package/dist/composable/index.d.ts +2 -17
- package/dist/composable/index.js +1 -0
- package/dist/composable-Cp0PgZry.js +2 -0
- package/dist/composable-Cp0PgZry.js.map +1 -0
- package/dist/data/index.d.ts +246 -1
- package/dist/data/index.d.ts.map +1 -0
- package/dist/data/index.js +2 -0
- package/dist/data/index.js.map +1 -0
- package/dist/directive/index.d.ts +2 -3
- package/dist/directive/index.js +1 -0
- package/dist/directive-Dprka-AO.js +2 -0
- package/dist/directive-Dprka-AO.js.map +1 -0
- package/dist/index-4qwf2pQQ.d.ts +136 -0
- package/dist/index-4qwf2pQQ.d.ts.map +1 -0
- package/dist/index-B79OP5Th.d.ts +70 -0
- package/dist/index-B79OP5Th.d.ts.map +1 -0
- package/dist/index-BRS2s2tX.d.ts +14 -0
- package/dist/index-BRS2s2tX.d.ts.map +1 -0
- package/dist/index.d.ts +5 -4
- package/dist/index.js +1 -0
- package/dist/util/index.d.ts +2 -13
- package/dist/util/index.js +1 -0
- package/dist/util-CwaOsSvo.js +2 -0
- package/dist/util-CwaOsSvo.js.map +1 -0
- package/package.json +33 -18
- package/src/composable/index.ts +3 -5
- package/src/composable/useCalendar.ts +1 -1
- package/src/composable/useCalendarMonthSwitcher.ts +1 -2
- package/src/composable/useCalendarTimeGrid.ts +103 -0
- package/src/composable/useCalendarYearSwitcher.ts +1 -2
- package/src/composable/useFocusTrap.ts +3 -5
- package/src/composable/useFocusTrapLock.ts +1 -2
- package/src/composable/useFocusTrapReturn.ts +11 -7
- package/src/composable/useFocusTrapSubscription.ts +1 -2
- package/src/composable/useFocusZone.ts +10 -9
- package/src/composable/useInView.ts +2 -4
- package/src/composable/useKeyboardGrab.ts +152 -0
- package/src/composable/useRemembered.ts +1 -2
- package/src/composable/useScrollEdges.ts +68 -0
- package/src/composable/useScrollPosition.ts +1 -2
- package/src/directive/focusTrap.ts +4 -0
- package/src/directive/heightTransition.ts +6 -2
- package/src/directive/index.ts +1 -1
- package/src/util/animationFrameDebounce.ts +15 -0
- package/src/util/flattenVNodeTree.ts +1 -2
- package/src/util/focusTrap.ts +2 -1
- package/src/util/index.ts +2 -1
- package/src/util/unrefTemplateElement.ts +1 -1
- package/dist/composable/useCalendar.d.ts +0 -20
- package/dist/composable/useCalendarMonthSwitcher.d.ts +0 -10
- package/dist/composable/useCalendarYearSwitcher.d.ts +0 -8
- package/dist/composable/useClickOutside.d.ts +0 -4
- package/dist/composable/useComponentId.d.ts +0 -2
- package/dist/composable/useDebouncedRef.d.ts +0 -2
- package/dist/composable/useEventListener.d.ts +0 -2
- package/dist/composable/useFocusTrap.d.ts +0 -8
- package/dist/composable/useFocusTrapLock.d.ts +0 -2
- package/dist/composable/useFocusTrapReturn.d.ts +0 -2
- package/dist/composable/useFocusTrapSubscription.d.ts +0 -2
- package/dist/composable/useFocusZone.d.ts +0 -6
- package/dist/composable/useInView.d.ts +0 -6
- package/dist/composable/useInterval.d.ts +0 -2
- package/dist/composable/useMutationObserver.d.ts +0 -2
- package/dist/composable/useRemembered.d.ts +0 -2
- package/dist/composable/useScrollPosition.d.ts +0 -7
- package/dist/data/color.d.ts +0 -242
- package/dist/directive/focusTrap.d.ts +0 -5
- package/dist/directive/heightTransition.d.ts +0 -5
- package/dist/flux-internals.js +0 -4
- package/dist/flux-internals.js.map +0 -42
- package/dist/util/flattenVNodeTree.d.ts +0 -2
- package/dist/util/focusTrap.d.ts +0 -8
- package/dist/util/getBidirectionalFocusElement.d.ts +0 -1
- package/dist/util/getComponentName.d.ts +0 -7
- package/dist/util/getComponentProps.d.ts +0 -1
- package/dist/util/getExposedRef.d.ts +0 -2
- package/dist/util/getFocusableElement.d.ts +0 -1
- package/dist/util/getFocusableElements.d.ts +0 -1
- package/dist/util/getKeyboardFocusableElements.d.ts +0 -1
- package/dist/util/unrefTemplateElement.d.ts +0 -4
- package/dist/util/warn.d.ts +0 -1
- package/dist/util/wrapFocus.d.ts +0 -1
- package/src/composable/useClickOutside.ts +0 -38
- package/src/composable/useComponentId.ts +0 -8
- package/src/composable/useDebouncedRef.ts +0 -38
- package/src/composable/useInterval.ts +0 -23
- package/src/composable/useMutationObserver.ts +0 -38
package/dist/data/color.d.ts
DELETED
|
@@ -1,242 +0,0 @@
|
|
|
1
|
-
export declare const slate50 = "#f8fafc";
|
|
2
|
-
export declare const slate100 = "#f1f5f9";
|
|
3
|
-
export declare const slate200 = "#e2e8f0";
|
|
4
|
-
export declare const slate300 = "#cbd5e1";
|
|
5
|
-
export declare const slate400 = "#94a3b8";
|
|
6
|
-
export declare const slate500 = "#64748b";
|
|
7
|
-
export declare const slate600 = "#475569";
|
|
8
|
-
export declare const slate700 = "#334155";
|
|
9
|
-
export declare const slate800 = "#1e293b";
|
|
10
|
-
export declare const slate900 = "#0f172a";
|
|
11
|
-
export declare const slate950 = "#020617";
|
|
12
|
-
export declare const gray50 = "#f9fafb";
|
|
13
|
-
export declare const gray100 = "#f3f4f6";
|
|
14
|
-
export declare const gray200 = "#e5e7eb";
|
|
15
|
-
export declare const gray300 = "#d1d5db";
|
|
16
|
-
export declare const gray400 = "#9ca3af";
|
|
17
|
-
export declare const gray500 = "#6b7280";
|
|
18
|
-
export declare const gray600 = "#4b5563";
|
|
19
|
-
export declare const gray700 = "#374151";
|
|
20
|
-
export declare const gray800 = "#1f2937";
|
|
21
|
-
export declare const gray900 = "#111827";
|
|
22
|
-
export declare const gray950 = "#030712";
|
|
23
|
-
export declare const zinc50 = "#fafafa";
|
|
24
|
-
export declare const zinc100 = "#f4f4f5";
|
|
25
|
-
export declare const zinc200 = "#e4e4e7";
|
|
26
|
-
export declare const zinc300 = "#d4d4d8";
|
|
27
|
-
export declare const zinc400 = "#a1a1aa";
|
|
28
|
-
export declare const zinc500 = "#71717a";
|
|
29
|
-
export declare const zinc600 = "#52525b";
|
|
30
|
-
export declare const zinc700 = "#3f3f46";
|
|
31
|
-
export declare const zinc800 = "#27272a";
|
|
32
|
-
export declare const zinc900 = "#18181b";
|
|
33
|
-
export declare const zinc950 = "#09090b";
|
|
34
|
-
export declare const neutral50 = "#fafafa";
|
|
35
|
-
export declare const neutral100 = "#f5f5f5";
|
|
36
|
-
export declare const neutral200 = "#e5e5e5";
|
|
37
|
-
export declare const neutral300 = "#d4d4d4";
|
|
38
|
-
export declare const neutral400 = "#a3a3a3";
|
|
39
|
-
export declare const neutral500 = "#737373";
|
|
40
|
-
export declare const neutral600 = "#525252";
|
|
41
|
-
export declare const neutral700 = "#404040";
|
|
42
|
-
export declare const neutral800 = "#262626";
|
|
43
|
-
export declare const neutral900 = "#171717";
|
|
44
|
-
export declare const neutral950 = "#0a0a0a";
|
|
45
|
-
export declare const stone50 = "#fafaf9";
|
|
46
|
-
export declare const stone100 = "#f5f5f4";
|
|
47
|
-
export declare const stone200 = "#e7e5e4";
|
|
48
|
-
export declare const stone300 = "#d6d3d1";
|
|
49
|
-
export declare const stone400 = "#a8a29e";
|
|
50
|
-
export declare const stone500 = "#78716c";
|
|
51
|
-
export declare const stone600 = "#57534e";
|
|
52
|
-
export declare const stone700 = "#44403c";
|
|
53
|
-
export declare const stone800 = "#292524";
|
|
54
|
-
export declare const stone900 = "#1c1917";
|
|
55
|
-
export declare const stone950 = "#0c0a09";
|
|
56
|
-
export declare const red50 = "#fef2f2";
|
|
57
|
-
export declare const red100 = "#fee2e2";
|
|
58
|
-
export declare const red200 = "#fecaca";
|
|
59
|
-
export declare const red300 = "#fca5a5";
|
|
60
|
-
export declare const red400 = "#f87171";
|
|
61
|
-
export declare const red500 = "#ef4444";
|
|
62
|
-
export declare const red600 = "#dc2626";
|
|
63
|
-
export declare const red700 = "#b91c1c";
|
|
64
|
-
export declare const red800 = "#991b1b";
|
|
65
|
-
export declare const red900 = "#7f1d1d";
|
|
66
|
-
export declare const red950 = "#450a0a";
|
|
67
|
-
export declare const orange50 = "#fff7ed";
|
|
68
|
-
export declare const orange100 = "#ffedd5";
|
|
69
|
-
export declare const orange200 = "#fed7aa";
|
|
70
|
-
export declare const orange300 = "#fdba74";
|
|
71
|
-
export declare const orange400 = "#fb923c";
|
|
72
|
-
export declare const orange500 = "#f97316";
|
|
73
|
-
export declare const orange600 = "#ea580c";
|
|
74
|
-
export declare const orange700 = "#c2410c";
|
|
75
|
-
export declare const orange800 = "#9a3412";
|
|
76
|
-
export declare const orange900 = "#7c2d12";
|
|
77
|
-
export declare const orange950 = "#431407";
|
|
78
|
-
export declare const amber50 = "#fffbeb";
|
|
79
|
-
export declare const amber100 = "#fef3c7";
|
|
80
|
-
export declare const amber200 = "#fde68a";
|
|
81
|
-
export declare const amber300 = "#fcd34d";
|
|
82
|
-
export declare const amber400 = "#fbbf24";
|
|
83
|
-
export declare const amber500 = "#f59e0b";
|
|
84
|
-
export declare const amber600 = "#d97706";
|
|
85
|
-
export declare const amber700 = "#b45309";
|
|
86
|
-
export declare const amber800 = "#92400e";
|
|
87
|
-
export declare const amber900 = "#78350f";
|
|
88
|
-
export declare const amber950 = "#451a03";
|
|
89
|
-
export declare const yellow50 = "#fefce8";
|
|
90
|
-
export declare const yellow100 = "#fef9c3";
|
|
91
|
-
export declare const yellow200 = "#fef08a";
|
|
92
|
-
export declare const yellow300 = "#fde047";
|
|
93
|
-
export declare const yellow400 = "#facc15";
|
|
94
|
-
export declare const yellow500 = "#eab308";
|
|
95
|
-
export declare const yellow600 = "#ca8a04";
|
|
96
|
-
export declare const yellow700 = "#a16207";
|
|
97
|
-
export declare const yellow800 = "#854d0e";
|
|
98
|
-
export declare const yellow900 = "#713f12";
|
|
99
|
-
export declare const yellow950 = "#422006";
|
|
100
|
-
export declare const lime50 = "#f7fee7";
|
|
101
|
-
export declare const lime100 = "#ecfccb";
|
|
102
|
-
export declare const lime200 = "#d9f99d";
|
|
103
|
-
export declare const lime300 = "#bef264";
|
|
104
|
-
export declare const lime400 = "#a3e635";
|
|
105
|
-
export declare const lime500 = "#84cc16";
|
|
106
|
-
export declare const lime600 = "#65a30d";
|
|
107
|
-
export declare const lime700 = "#4d7c0f";
|
|
108
|
-
export declare const lime800 = "#3f6212";
|
|
109
|
-
export declare const lime900 = "#365314";
|
|
110
|
-
export declare const lime950 = "#1a2e05";
|
|
111
|
-
export declare const green50 = "#f0fdf4";
|
|
112
|
-
export declare const green100 = "#dcfce7";
|
|
113
|
-
export declare const green200 = "#bbf7d0";
|
|
114
|
-
export declare const green300 = "#86efac";
|
|
115
|
-
export declare const green400 = "#4ade80";
|
|
116
|
-
export declare const green500 = "#22c55e";
|
|
117
|
-
export declare const green600 = "#16a34a";
|
|
118
|
-
export declare const green700 = "#15803d";
|
|
119
|
-
export declare const green800 = "#166534";
|
|
120
|
-
export declare const green900 = "#14532d";
|
|
121
|
-
export declare const green950 = "#052e16";
|
|
122
|
-
export declare const emerald50 = "#ecfdf5";
|
|
123
|
-
export declare const emerald100 = "#d1fae5";
|
|
124
|
-
export declare const emerald200 = "#a7f3d0";
|
|
125
|
-
export declare const emerald300 = "#6ee7b7";
|
|
126
|
-
export declare const emerald400 = "#34d399";
|
|
127
|
-
export declare const emerald500 = "#10b981";
|
|
128
|
-
export declare const emerald600 = "#059669";
|
|
129
|
-
export declare const emerald700 = "#047857";
|
|
130
|
-
export declare const emerald800 = "#065f46";
|
|
131
|
-
export declare const emerald900 = "#064e3b";
|
|
132
|
-
export declare const emerald950 = "#022c22";
|
|
133
|
-
export declare const teal50 = "#f0fdfa";
|
|
134
|
-
export declare const teal100 = "#ccfbf1";
|
|
135
|
-
export declare const teal200 = "#99f6e4";
|
|
136
|
-
export declare const teal300 = "#5eead4";
|
|
137
|
-
export declare const teal400 = "#2dd4bf";
|
|
138
|
-
export declare const teal500 = "#14b8a6";
|
|
139
|
-
export declare const teal600 = "#0d9488";
|
|
140
|
-
export declare const teal700 = "#0f766e";
|
|
141
|
-
export declare const teal800 = "#115e59";
|
|
142
|
-
export declare const teal900 = "#134e4a";
|
|
143
|
-
export declare const teal950 = "#042f2e";
|
|
144
|
-
export declare const cyan50 = "#ecfeff";
|
|
145
|
-
export declare const cyan100 = "#cffafe";
|
|
146
|
-
export declare const cyan200 = "#a5f3fc";
|
|
147
|
-
export declare const cyan300 = "#67e8f9";
|
|
148
|
-
export declare const cyan400 = "#22d3ee";
|
|
149
|
-
export declare const cyan500 = "#06b6d4";
|
|
150
|
-
export declare const cyan600 = "#0891b2";
|
|
151
|
-
export declare const cyan700 = "#0e7490";
|
|
152
|
-
export declare const cyan800 = "#155e75";
|
|
153
|
-
export declare const cyan900 = "#164e63";
|
|
154
|
-
export declare const cyan950 = "#083344";
|
|
155
|
-
export declare const sky50 = "#f0f9ff";
|
|
156
|
-
export declare const sky100 = "#e0f2fe";
|
|
157
|
-
export declare const sky200 = "#bae6fd";
|
|
158
|
-
export declare const sky300 = "#7dd3fc";
|
|
159
|
-
export declare const sky400 = "#38bdf8";
|
|
160
|
-
export declare const sky500 = "#0ea5e9";
|
|
161
|
-
export declare const sky600 = "#0284c7";
|
|
162
|
-
export declare const sky700 = "#0369a1";
|
|
163
|
-
export declare const sky800 = "#075985";
|
|
164
|
-
export declare const sky900 = "#0c4a6e";
|
|
165
|
-
export declare const sky950 = "#082f49";
|
|
166
|
-
export declare const blue50 = "#eff6ff";
|
|
167
|
-
export declare const blue100 = "#dbeafe";
|
|
168
|
-
export declare const blue200 = "#bfdbfe";
|
|
169
|
-
export declare const blue300 = "#93c5fd";
|
|
170
|
-
export declare const blue400 = "#60a5fa";
|
|
171
|
-
export declare const blue500 = "#3b82f6";
|
|
172
|
-
export declare const blue600 = "#2563eb";
|
|
173
|
-
export declare const blue700 = "#1d4ed8";
|
|
174
|
-
export declare const blue800 = "#1e40af";
|
|
175
|
-
export declare const blue900 = "#1e3a8a";
|
|
176
|
-
export declare const blue950 = "#172554";
|
|
177
|
-
export declare const indigo50 = "#eef2ff";
|
|
178
|
-
export declare const indigo100 = "#e0e7ff";
|
|
179
|
-
export declare const indigo200 = "#c7d2fe";
|
|
180
|
-
export declare const indigo300 = "#a5b4fc";
|
|
181
|
-
export declare const indigo400 = "#818cf8";
|
|
182
|
-
export declare const indigo500 = "#6366f1";
|
|
183
|
-
export declare const indigo600 = "#4f46e5";
|
|
184
|
-
export declare const indigo700 = "#4338ca";
|
|
185
|
-
export declare const indigo800 = "#3730a3";
|
|
186
|
-
export declare const indigo900 = "#312e81";
|
|
187
|
-
export declare const indigo950 = "#1e1b4b";
|
|
188
|
-
export declare const violet50 = "#f5f3ff";
|
|
189
|
-
export declare const violet100 = "#ede9fe";
|
|
190
|
-
export declare const violet200 = "#ddd6fe";
|
|
191
|
-
export declare const violet300 = "#c4b5fd";
|
|
192
|
-
export declare const violet400 = "#a78bfa";
|
|
193
|
-
export declare const violet500 = "#8b5cf6";
|
|
194
|
-
export declare const violet600 = "#7c3aed";
|
|
195
|
-
export declare const violet700 = "#6d28d9";
|
|
196
|
-
export declare const violet800 = "#5b21b6";
|
|
197
|
-
export declare const violet900 = "#4c1d95";
|
|
198
|
-
export declare const violet950 = "#2e1065";
|
|
199
|
-
export declare const purple50 = "#faf5ff";
|
|
200
|
-
export declare const purple100 = "#f3e8ff";
|
|
201
|
-
export declare const purple200 = "#e9d5ff";
|
|
202
|
-
export declare const purple300 = "#d8b4fe";
|
|
203
|
-
export declare const purple400 = "#c084fc";
|
|
204
|
-
export declare const purple500 = "#a855f7";
|
|
205
|
-
export declare const purple600 = "#9333ea";
|
|
206
|
-
export declare const purple700 = "#7e22ce";
|
|
207
|
-
export declare const purple800 = "#6b21a8";
|
|
208
|
-
export declare const purple900 = "#581c87";
|
|
209
|
-
export declare const purple950 = "#3b0764";
|
|
210
|
-
export declare const fuchsia50 = "#fdf4ff";
|
|
211
|
-
export declare const fuchsia100 = "#fae8ff";
|
|
212
|
-
export declare const fuchsia200 = "#f5d0fe";
|
|
213
|
-
export declare const fuchsia300 = "#f0abfc";
|
|
214
|
-
export declare const fuchsia400 = "#e879f9";
|
|
215
|
-
export declare const fuchsia500 = "#d946ef";
|
|
216
|
-
export declare const fuchsia600 = "#c026d3";
|
|
217
|
-
export declare const fuchsia700 = "#a21caf";
|
|
218
|
-
export declare const fuchsia800 = "#86198f";
|
|
219
|
-
export declare const fuchsia900 = "#701a75";
|
|
220
|
-
export declare const fuchsia950 = "#4a044e";
|
|
221
|
-
export declare const pink50 = "#fdf2f8";
|
|
222
|
-
export declare const pink100 = "#fce7f3";
|
|
223
|
-
export declare const pink200 = "#fbcfe8";
|
|
224
|
-
export declare const pink300 = "#f9a8d4";
|
|
225
|
-
export declare const pink400 = "#f472b6";
|
|
226
|
-
export declare const pink500 = "#ec4899";
|
|
227
|
-
export declare const pink600 = "#db2777";
|
|
228
|
-
export declare const pink700 = "#be185d";
|
|
229
|
-
export declare const pink800 = "#9d174d";
|
|
230
|
-
export declare const pink900 = "#831843";
|
|
231
|
-
export declare const pink950 = "#500724";
|
|
232
|
-
export declare const rose50 = "#fff1f2";
|
|
233
|
-
export declare const rose100 = "#ffe4e6";
|
|
234
|
-
export declare const rose200 = "#fecdd3";
|
|
235
|
-
export declare const rose300 = "#fda4af";
|
|
236
|
-
export declare const rose400 = "#fb7185";
|
|
237
|
-
export declare const rose500 = "#f43f5e";
|
|
238
|
-
export declare const rose600 = "#e11d48";
|
|
239
|
-
export declare const rose700 = "#be123c";
|
|
240
|
-
export declare const rose800 = "#9f1239";
|
|
241
|
-
export declare const rose900 = "#881337";
|
|
242
|
-
export declare const rose950 = "#4c0519";
|
package/dist/flux-internals.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{computed as E,ref as _,unref as b}from"vue";function N(e,t){let o=_(!1),n=_(e),s=E(()=>{let c=[],m=b(n).month,h=b(n).startOf("month");do c.push(h),h=h.plus({day:1});while(h.month===m);let y=c[0],T=c[c.length-1];for(let x=1;x<y.weekday;++x)c.unshift(y.minus({day:x}));for(let x=T.weekday+1;x<=7;++x)c.push(T.plus({day:x-T.weekday}));while(c.length/7<6){let x=c[c.length-1];for(let S=1;S<=7;++S)c.push(x.plus({day:S}))}return c}),r=E(()=>b(s).slice(0,7).map((c)=>c.toLocaleString({weekday:t?.weekDayLength??"short"}))),i=E(()=>b(n).plus({month:1})),a=E(()=>b(n).minus({month:1})),f=E(()=>b(n).toLocaleString({month:t?.monthLength??"long"})),l=E(()=>b(n).year.toString());function u(c){o.value=n.value>c,n.value=c}function v(){u(b(n).plus({month:1}))}function L(){u(b(n).minus({month:1}))}return{isTransitioningToPast:o,viewDate:n,viewDateNext:i,viewDatePrevious:a,viewMonth:f,viewYear:l,dates:s,days:r,setViewDate:u,nextMonth:v,previousMonth:L}}import{computed as me,unref as xe}from"vue";function U(e,t){return{months:me(()=>{let n=[],s=xe(e),r=s.startOf("year");while(r.month<=12&&r.year===s.year)n.push({date:r,label:r.toLocaleString({month:t})}),r=r.plus({months:1});return n})}}import{computed as be,ref as he,unref as P,watch as ye}from"vue";function K(e,t=10){let o=he(0),n=be(()=>{let i=P(e).year,a=[],f=i-i%t+P(o)*t;for(let l=0;l<t;++l)a.push(f+l);return a});function s(){++o.value}function r(){--o.value}return ye(e,()=>o.value=0),{years:n,next:s,previous:r}}import{onMounted as De,onUnmounted as Ae,ref as Se,unref as Y,watchEffect as Ie}from"vue";import{Fragment as Te}from"vue";function z(e){let t=[];for(let o of e){if(o.type===Te&&Array.isArray(o.children)){t.push(...o.children);continue}t.push(o)}return t}import{isHtmlElement as ve}from"@basmilius/utils";var Ee=["a:not([disabled])","button:not([disabled])","input[type=checkbox]:not([disabled])","input[type=radio]:not([disabled])","input[type=text]:not([disabled])",'[tabindex]:not([disabled]):not([tabindex="-1"])'].join(",");function d(e){return Array.from(e.querySelectorAll(Ee)).filter(ve).filter((t)=>t.offsetWidth>0||t.offsetHeight>0||t===document.activeElement)}function M(e,t,o){let n=d(e),s=n.indexOf(t);if(s===-1)return null;let r=Le(n);ge(r,s,o);let i=we(s,o,r,n);if(!i){if(o==="up"||o==="left")i=n[s-1];if(o==="down"||o==="right")i=n[s+1]}return i}function ge(e,t,o){let n=e[t];e.forEach((s)=>{let r=s.center;switch(o){case"up":r={x:r.x,y:s.top+s.height};break;case"down":r={x:r.x,y:s.top};break;case"left":r={x:s.left+s.width,y:r.y};break;case"right":r={x:s.left,y:r.y};break}s.distance=Math.sqrt(Math.pow(n.center.x-r.x,2)+Math.pow(n.center.y-r.y,2))})}function we(e,t,o,n){let s=o[e],r=[];switch(t){case"up":r=o.map((a,f)=>f===e||a.top+a.height>s.top?Number.MAX_SAFE_INTEGER:a.distance);break;case"down":r=o.map((a,f)=>f===e||a.top<s.top+s.height?Number.MAX_SAFE_INTEGER:a.distance);break;case"left":r=o.map((a,f)=>f===e||a.left+a.width>s.left?Number.MAX_SAFE_INTEGER:a.distance);break;case"right":r=o.map((a,f)=>f===e||a.left<s.left+s.width?Number.MAX_SAFE_INTEGER:a.distance);break}let i=r.indexOf(Math.min(...r));if(r[i]!==Number.MAX_SAFE_INTEGER)return n[i];return null}function Le(e){return e.map((t)=>t.getBoundingClientRect()).map((t)=>({height:t.height,width:t.width,top:t.top,left:t.left,right:t.right,bottom:t.bottom,center:{x:t.left+t.width/2,y:t.top+t.height/2},distance:0}))}function B(e){let t="UnknownComponent";if(e.type&&e.type.__name)t=e.type.__name;return t}import{camelCase as Me}from"lodash-es";function V(e){return Object.fromEntries(Object.entries(e.props??{}).map(([t,o])=>[Me(t),o]))}function q(e,t){if(!e.exposed||!(t in e.exposed))throw new Error(`'${t}' was not exposed by the component.`);return e.exposed[t]}import{isHtmlElement as Re}from"@basmilius/utils";function R(e,t,o=void 0){let n=d(e),s=o||document.activeElement;if(!s||!Re(s))return n[0]||void 0;let r=n.indexOf(s);return n[r+t]||void 0}function F(e){return Array.from(e.querySelectorAll('a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])')).filter((t)=>!t.hasAttribute("disabled")||t.getAttribute("disabled")!=="true").filter((t)=>!t.hasAttribute("aria-disabled")||t.getAttribute("aria-disabled")!=="true")}import{isHtmlElement as Fe}from"@basmilius/utils";import{unref as ke}from"vue";function p(e){let t=ke(e);if(Fe(t))return t;return t?.$el}function W(...e){console.warn("[Flux]",...e)}function g(e,t,o=!1){let n=He(e),s=t.compareDocumentPosition(e),r;if(s&&Node.DOCUMENT_POSITION_PRECEDING||o)r=n.firstChild();else r=n.lastChild();(r!==null?r:e).focus()}function He(e){return document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:(t)=>t.tabIndex>=0&&!t.disabled?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP})}class G{get active(){return this.current?.isEnabled??!1}get current(){return this.#e[this.#e.length-1]??null}#t=[];#e=[];add(e,t,o=!0){let n={id:e,setEnabled:t,isEnabled:!0};if(this.current&&this.toggle(this.current,!1),this.#e.push(n),o)this.toggle(n,!0),this.emit()}remove(e){let t=this.#e.find((s)=>s.id===e);t&&this.toggle(t,!1);let n=this.current?.id===e;this.#e=this.#e.filter((s)=>s.id!==e),n&&this.current&&this.toggle(this.current,!0),this.emit()}emit(){this.#t.forEach((e)=>e(this.active,this.#e))}subscribe(e){return this.#t.push(e),e(this.active,this.#e),()=>this.#t=this.#t.filter((t)=>t!==e)}toggle(e,t){e.setEnabled(t),e.isEnabled=t}}var w=new G;var X=!globalThis.document;function j(e,t,o){let n=Se([]);De(()=>{document.addEventListener("pointerdown",s)}),Ae(()=>{document.removeEventListener("pointerdown",s)});function s(r){if(!Y(t))return;!Y(n).some((a)=>a.contains(r.target))&&o(r)}Ie(()=>{let r=[];(Array.isArray(e)?e:[e]).forEach((i)=>{let a=p(i);a&&r.push(a)}),n.value=r})}import{computed as Oe,getCurrentInstance as Ce}from"vue";function Z(){let e=Ce();return Oe(()=>e?.uid??(e?.proxy)._uid??0)}import{customRef as _e,isRef as $,ref as Ne,watch as Ue}from"vue";function J(e,t,o=!1){let n=Ne($(e)?e.value:e),s=_e((r,i)=>({get(){return r(),n.value},set:Pe((a)=>{n.value=a,i()},t,o)}));if($(e))Ue(e,(r)=>s.value=r);return s}function Pe(e,t,o=!1){let n;return(...s)=>{if(o&&!n)e(...s);clearTimeout(n),n=setTimeout(()=>requestAnimationFrame(()=>e(...s)),t)}}import{watch as Ke}from"vue";function k(e,t,o,n={passive:!0}){Ke(e,(s,r,i)=>{if(!s)return;s.addEventListener(t,o,n),i(()=>s.removeEventListener(t,o))},{immediate:!0})}import{onMounted as ze,onUnmounted as Be,ref as Ve,unref as qe}from"vue";function Q(e,t){let o=Ve();ze(()=>{s()}),Be(()=>{clearTimeout(o.value)});function n(){o.value=setTimeout(()=>requestAnimationFrame(s),qe(e))}function s(){n(),t()}}import{ref as We,watch as Ge}from"vue";function ee(e,t={}){let o=We(t.initial??!1);return Ge(e,(n,s,r)=>{let i=p(e);if(!i)return;let a=new IntersectionObserver((f)=>o.value=f[0]?.isIntersecting??!1,t);a.observe(i),r(()=>a.disconnect())},{immediate:!0}),o}import{onScopeDispose as Xe,watch as Ye}from"vue";function H(e,t,o){o??={attributes:!0};let n,s=Ye(()=>p(e),(a)=>{if(r(),!a)return;n=new MutationObserver(t),n.observe(a,o)},{immediate:!0});function r(){if(!n)return;n.disconnect(),n=void 0}function i(){r(),s()}Xe(i)}import{DateTime as te}from"luxon";import{ref as je,watch as Ze}from"vue";function oe(e,t){let o=`flux/${e}`,n=je(s()??t);function s(){if(o in localStorage){let r=JSON.parse(localStorage.getItem(o));if(Array.isArray(r)&&r[0]==="DateTime")r=te.fromISO(r[1]);return r}return null}return Ze(n,(r)=>{let i=r;if(te.isDateTime(r))i=["DateTime",r.toISO({includeOffset:!0,extendedZone:!0})];localStorage.setItem(o,JSON.stringify(i))}),n}import{ref as I,unref as $e}from"vue";function ne(e){let t=I(0),o=I(0);if(!e)e=I(document);return k(e,"scroll",()=>{let n=$e(e);if(n instanceof Document)n=n.scrollingElement;t.value=n?.scrollLeft??0,o.value=n?.scrollTop??0}),{x:t,y:o}}import{ref as ie,watch as ce}from"vue";import{onMounted as Je,onUnmounted as Qe,ref as re,unref as se}from"vue";var et=0;function D(e=!1){let t=re(`focus-trap-${++et}`),o=re(!1);return Je(()=>w.add(se(t),(n)=>o.value=n,e)),Qe(()=>w.remove(se(t))),o}import{onUnmounted as tt,ref as ot,unref as ae}from"vue";function A(e){let t=ot(document.activeElement);tt(()=>{if(ae(e))return;requestAnimationFrame(()=>ae(t)?.focus())})}function le(e,t={}){if(X)return;let{disable:o=ie(!1),disableReturn:n=ie(!1),attachTo:s=null}=t,r=D(!o);A(n),ce(e,(i,a,f)=>{let l=p(e),u=s||document;if(r.value&&l&&document.activeElement&&!l.contains(document.activeElement)&&!l.querySelector("[autofocus]"))g(l,document.activeElement,!0);function v(c){if(!r.value||!l)return;let m=c.target||document.body;if(l.contains(m))return;c.preventDefault(),c.stopImmediatePropagation(),g(l,m)}function L(c){if(!r.value||!l)return;if(!c.relatedTarget||c.relatedTarget===document.body)c.preventDefault(),l.focus();let m=c.target||document.body;if(l.contains(m))return;g(l,m)}if(u.addEventListener("focusin",v,{capture:!0}),u.addEventListener("focusout",L,{capture:!0}),l){let c=d(l),m=c.findIndex((T)=>T.classList.contains("is-active")),h=c.findIndex((T)=>!T.hasAttribute("aria-disabled")),y=c[0];if(m>-1)y=c[m];if(h>-1)y=c[h];if(y)y.focus()}f(()=>{u.removeEventListener("focusin",v),u.removeEventListener("focusout",L)})},{immediate:!0}),ce(()=>o,()=>{let i=p(e);if(r.value=!o,o||!i)return;let a=d(i);if(a.includes(document.activeElement))return;a[0]?.focus()},{immediate:!0})}import{onMounted as nt,onUnmounted as rt,ref as st}from"vue";function fe(e){let t=st(null);nt(()=>t.value=w.subscribe(e)),rt(()=>t.value?.())}import{watch as at}from"vue";function pe(e,{cycle:t=!0,direction:o="bidirectional"}={}){H(e,()=>s(n(),!1));function n(){let i=p(e),a=d(i),f=a.findIndex((u)=>u.classList.contains("is-active")),l=a.findIndex((u)=>!u.hasAttribute("aria-disabled"));if(f>-1)return f;if(l>-1)return l;return 0}function s(i,a=!0){let f=p(e),l=d(f);l.forEach((u,v)=>u.tabIndex=v===i?0:-1),a&&l[i]?.focus()}function r(i){let a=p(e),f=d(a);if(["Enter"," "].includes(i.key))return;switch(o){case"bidirectional":it(i,a,f,s);break;case"horizontal":case"vertical":ct(i,a,t,o,f,s);break}}at(e,(i,a,f)=>{let l=p(e);if(!l)return;l.addEventListener("keydown",r),s(n(),!1),f(()=>l.removeEventListener("keydown",r))},{immediate:!0})}function it(e,t,o,n){let s;switch(e.key){case"ArrowUp":s="up";break;case"ArrowDown":s="down";break;case"ArrowLeft":s="left";break;case"ArrowRight":s="right";break;default:return}let r=M(t,document.activeElement,s);if(r)n(o.indexOf(r));e.preventDefault()}function ct(e,t,o,n,s,r){let i;if(e.key===(n==="horizontal"?"ArrowLeft":"ArrowUp"))i=-1;else if(e.key===(n==="horizontal"?"ArrowRight":"ArrowDown"))i=1;else return;let a=R(t,i);if(a)r(s.indexOf(a));else if(o)r(i===1?0:s.length-1);e.preventDefault()}var nn="#f8fafc",rn="#f1f5f9",sn="#e2e8f0",an="#cbd5e1",cn="#94a3b8",ln="#64748b",fn="#475569",pn="#334155",un="#1e293b",dn="#0f172a",mn="#020617",xn="#f9fafb",bn="#f3f4f6",hn="#e5e7eb",yn="#d1d5db",Tn="#9ca3af",vn="#6b7280",En="#4b5563",gn="#374151",wn="#1f2937",Ln="#111827",Mn="#030712",Rn="#fafafa",Fn="#f4f4f5",kn="#e4e4e7",Hn="#d4d4d8",Dn="#a1a1aa",An="#71717a",Sn="#52525b",In="#3f3f46",On="#27272a",Cn="#18181b",_n="#09090b",Nn="#fafafa",Un="#f5f5f5",Pn="#e5e5e5",Kn="#d4d4d4",zn="#a3a3a3",Bn="#737373",Vn="#525252",qn="#404040",Wn="#262626",Gn="#171717",Xn="#0a0a0a",Yn="#fafaf9",jn="#f5f5f4",Zn="#e7e5e4",$n="#d6d3d1",Jn="#a8a29e",Qn="#78716c",er="#57534e",tr="#44403c",or="#292524",nr="#1c1917",rr="#0c0a09",sr="#fef2f2",ar="#fee2e2",ir="#fecaca",cr="#fca5a5",lr="#f87171",fr="#ef4444",pr="#dc2626",ur="#b91c1c",dr="#991b1b",mr="#7f1d1d",xr="#450a0a",br="#fff7ed",hr="#ffedd5",yr="#fed7aa",Tr="#fdba74",vr="#fb923c",Er="#f97316",gr="#ea580c",wr="#c2410c",Lr="#9a3412",Mr="#7c2d12",Rr="#431407",Fr="#fffbeb",kr="#fef3c7",Hr="#fde68a",Dr="#fcd34d",Ar="#fbbf24",Sr="#f59e0b",Ir="#d97706",Or="#b45309",Cr="#92400e",_r="#78350f",Nr="#451a03",Ur="#fefce8",Pr="#fef9c3",Kr="#fef08a",zr="#fde047",Br="#facc15",Vr="#eab308",qr="#ca8a04",Wr="#a16207",Gr="#854d0e",Xr="#713f12",Yr="#422006",jr="#f7fee7",Zr="#ecfccb",$r="#d9f99d",Jr="#bef264",Qr="#a3e635",es="#84cc16",ts="#65a30d",os="#4d7c0f",ns="#3f6212",rs="#365314",ss="#1a2e05",as="#f0fdf4",is="#dcfce7",cs="#bbf7d0",ls="#86efac",fs="#4ade80",ps="#22c55e",us="#16a34a",ds="#15803d",ms="#166534",xs="#14532d",bs="#052e16",hs="#ecfdf5",ys="#d1fae5",Ts="#a7f3d0",vs="#6ee7b7",Es="#34d399",gs="#10b981",ws="#059669",Ls="#047857",Ms="#065f46",Rs="#064e3b",Fs="#022c22",ks="#f0fdfa",Hs="#ccfbf1",Ds="#99f6e4",As="#5eead4",Ss="#2dd4bf",Is="#14b8a6",Os="#0d9488",Cs="#0f766e",_s="#115e59",Ns="#134e4a",Us="#042f2e",Ps="#ecfeff",Ks="#cffafe",zs="#a5f3fc",Bs="#67e8f9",Vs="#22d3ee",qs="#06b6d4",Ws="#0891b2",Gs="#0e7490",Xs="#155e75",Ys="#164e63",js="#083344",Zs="#f0f9ff",$s="#e0f2fe",Js="#bae6fd",Qs="#7dd3fc",ea="#38bdf8",ta="#0ea5e9",oa="#0284c7",na="#0369a1",ra="#075985",sa="#0c4a6e",aa="#082f49",ia="#eff6ff",ca="#dbeafe",la="#bfdbfe",fa="#93c5fd",pa="#60a5fa",ua="#3b82f6",da="#2563eb",ma="#1d4ed8",xa="#1e40af",ba="#1e3a8a",ha="#172554",ya="#eef2ff",Ta="#e0e7ff",va="#c7d2fe",Ea="#a5b4fc",ga="#818cf8",wa="#6366f1",La="#4f46e5",Ma="#4338ca",Ra="#3730a3",Fa="#312e81",ka="#1e1b4b",Ha="#f5f3ff",Da="#ede9fe",Aa="#ddd6fe",Sa="#c4b5fd",Ia="#a78bfa",Oa="#8b5cf6",Ca="#7c3aed",_a="#6d28d9",Na="#5b21b6",Ua="#4c1d95",Pa="#2e1065",Ka="#faf5ff",za="#f3e8ff",Ba="#e9d5ff",Va="#d8b4fe",qa="#c084fc",Wa="#a855f7",Ga="#9333ea",Xa="#7e22ce",Ya="#6b21a8",ja="#581c87",Za="#3b0764",$a="#fdf4ff",Ja="#fae8ff",Qa="#f5d0fe",ei="#f0abfc",ti="#e879f9",oi="#d946ef",ni="#c026d3",ri="#a21caf",si="#86198f",ai="#701a75",ii="#4a044e",ci="#fdf2f8",li="#fce7f3",fi="#fbcfe8",pi="#f9a8d4",ui="#f472b6",di="#ec4899",mi="#db2777",xi="#be185d",bi="#9d174d",hi="#831843",yi="#500724",Ti="#fff1f2",vi="#ffe4e6",Ei="#fecdd3",gi="#fda4af",wi="#fb7185",Li="#f43f5e",Mi="#e11d48",Ri="#be123c",Fi="#9f1239",ki="#881337",Hi="#4c0519";class ue{#t;#e;constructor(e){this.#e=[],this.#t=e,this.onKeyDown=this.onKeyDown.bind(this)}focusElement(e,t=!0){if(!this.#e[e])return;for(let o=0;o<this.#e.length;++o)this.#e[o].tabIndex=o===e?0:-1;if(t)this.#e[e]?.focus()}register(){this.#e=F(this.#t),this.#t.addEventListener("keydown",this.onKeyDown),this.focusElement(0,!1)}unregister(){this.#t.removeEventListener("keydown",this.onKeyDown)}onKeyDown(e){let t=this.#t.querySelector('[tabindex="0"]'),o=this.#e.findIndex((n)=>n===t)??0;switch(e.key){case"ArrowUp":case"ArrowLeft":this.focusElement(o-1);break;case"ArrowDown":case"ArrowRight":this.focusElement(o+1);break;default:return}e.preventDefault(),e.stopPropagation()}}var lt={beforeUnmount(e){O.get(e)?.unregister(),O.delete(e)},mounted(e){let t=new ue(e);t.register(),O.set(e,t)}},O=new WeakMap;class de{#t;#e;constructor(e){this.#t=e,this.#e=new MutationObserver(this.onMutation.bind(this))}register(){this.#e.observe(this.#t,{childList:!0,subtree:!0}),requestAnimationFrame(this.onMutation.bind(this))}unregister(){this.#e.disconnect()}onMutation(){let{height:e}=getComputedStyle(this.#t);this.#t.style.height="auto";let{height:t}=getComputedStyle(this.#t);if(this.#t.style.height=e,t===e)return;getComputedStyle(this.#t),requestAnimationFrame(()=>requestAnimationFrame(()=>this.#t.style.height=t))}}var ft={beforeUnmount(e){C.get(e)?.unregister(),C.delete(e)},mounted(e){let t=new de(e);t.register(),C.set(e,t)}},C=new WeakMap;export{_n as zinc950,Cn as zinc900,On as zinc800,In as zinc700,Sn as zinc600,An as zinc500,Rn as zinc50,Dn as zinc400,Hn as zinc300,kn as zinc200,Fn as zinc100,Yr as yellow950,Xr as yellow900,Gr as yellow800,Wr as yellow700,qr as yellow600,Vr as yellow500,Ur as yellow50,Br as yellow400,zr as yellow300,Kr as yellow200,Pr as yellow100,g as wrapFocus,W as warn,Pa as violet950,Ua as violet900,Na as violet800,_a as violet700,Ca as violet600,Oa as violet500,Ha as violet50,Ia as violet400,Sa as violet300,Aa as violet200,Da as violet100,ft as vHeightTransition,lt as vFocusTrap,ne as useScrollPosition,oe as useRemembered,H as useMutationObserver,Q as useInterval,ee as useInView,pe as useFocusZone,fe as useFocusTrapSubscription,A as useFocusTrapReturn,D as useFocusTrapLock,le as useFocusTrap,k as useEventListener,J as useDebouncedRef,Z as useComponentId,j as useClickOutside,K as useCalendarYearSwitcher,U as useCalendarMonthSwitcher,N as useCalendar,p as unrefTemplateElement,Us as teal950,Ns as teal900,_s as teal800,Cs as teal700,Os as teal600,Is as teal500,ks as teal50,Ss as teal400,As as teal300,Ds as teal200,Hs as teal100,rr as stone950,nr as stone900,or as stone800,tr as stone700,er as stone600,Qn as stone500,Yn as stone50,Jn as stone400,$n as stone300,Zn as stone200,jn as stone100,mn as slate950,dn as slate900,un as slate800,pn as slate700,fn as slate600,ln as slate500,nn as slate50,cn as slate400,an as slate300,sn as slate200,rn as slate100,aa as sky950,sa as sky900,ra as sky800,na as sky700,oa as sky600,ta as sky500,Zs as sky50,ea as sky400,Qs as sky300,Js as sky200,$s as sky100,Hi as rose950,ki as rose900,Fi as rose800,Ri as rose700,Mi as rose600,Li as rose500,Ti as rose50,wi as rose400,gi as rose300,Ei as rose200,vi as rose100,xr as red950,mr as red900,dr as red800,ur as red700,pr as red600,fr as red500,sr as red50,lr as red400,cr as red300,ir as red200,ar as red100,Za as purple950,ja as purple900,Ya as purple800,Xa as purple700,Ga as purple600,Wa as purple500,Ka as purple50,qa as purple400,Va as purple300,Ba as purple200,za as purple100,yi as pink950,hi as pink900,bi as pink800,xi as pink700,mi as pink600,di as pink500,ci as pink50,ui as pink400,pi as pink300,fi as pink200,li as pink100,Rr as orange950,Mr as orange900,Lr as orange800,wr as orange700,gr as orange600,Er as orange500,br as orange50,vr as orange400,Tr as orange300,yr as orange200,hr as orange100,Xn as neutral950,Gn as neutral900,Wn as neutral800,qn as neutral700,Vn as neutral600,Bn as neutral500,Nn as neutral50,zn as neutral400,Kn as neutral300,Pn as neutral200,Un as neutral100,ss as lime950,rs as lime900,ns as lime800,os as lime700,ts as lime600,es as lime500,jr as lime50,Qr as lime400,Jr as lime300,$r as lime200,Zr as lime100,X as isSSR,ka as indigo950,Fa as indigo900,Ra as indigo800,Ma as indigo700,La as indigo600,wa as indigo500,ya as indigo50,ga as indigo400,Ea as indigo300,va as indigo200,Ta as indigo100,bs as green950,xs as green900,ms as green800,ds as green700,us as green600,ps as green500,as as green50,fs as green400,ls as green300,cs as green200,is as green100,Mn as gray950,Ln as gray900,wn as gray800,gn as gray700,En as gray600,vn as gray500,xn as gray50,Tn as gray400,yn as gray300,hn as gray200,bn as gray100,F as getKeyboardFocusableElements,d as getFocusableElements,R as getFocusableElement,q as getExposedRef,V as getComponentProps,B as getComponentName,M as getBidirectionalFocusElement,ii as fuchsia950,ai as fuchsia900,si as fuchsia800,ri as fuchsia700,ni as fuchsia600,oi as fuchsia500,$a as fuchsia50,ti as fuchsia400,ei as fuchsia300,Qa as fuchsia200,Ja as fuchsia100,z as flattenVNodeTree,Fs as emerald950,Rs as emerald900,Ms as emerald800,Ls as emerald700,ws as emerald600,gs as emerald500,hs as emerald50,Es as emerald400,vs as emerald300,Ts as emerald200,ys as emerald100,js as cyan950,Ys as cyan900,Xs as cyan800,Gs as cyan700,Ws as cyan600,qs as cyan500,Ps as cyan50,Vs as cyan400,Bs as cyan300,zs as cyan200,Ks as cyan100,ha as blue950,ba as blue900,xa as blue800,ma as blue700,da as blue600,ua as blue500,ia as blue50,pa as blue400,fa as blue300,la as blue200,ca as blue100,Nr as amber950,_r as amber900,Cr as amber800,Or as amber700,Ir as amber600,Sr as amber500,Fr as amber50,Ar as amber400,Dr as amber300,Hr as amber200,kr as amber100,w as FOCUS_TRAP_LOCKS};
|
|
2
|
-
|
|
3
|
-
//# debugId=07CE9B4444A7CBFE64756E2164756E21
|
|
4
|
-
//# sourceMappingURL=flux-internals.js.map
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/composable/useCalendar.ts", "../src/composable/useCalendarMonthSwitcher.ts", "../src/composable/useCalendarYearSwitcher.ts", "../src/composable/useClickOutside.ts", "../src/util/flattenVNodeTree.ts", "../src/util/getFocusableElements.ts", "../src/util/getBidirectionalFocusElement.ts", "../src/util/getComponentName.ts", "../src/util/getComponentProps.ts", "../src/util/getExposedRef.ts", "../src/util/getFocusableElement.ts", "../src/util/getKeyboardFocusableElements.ts", "../src/util/unrefTemplateElement.ts", "../src/util/warn.ts", "../src/util/wrapFocus.ts", "../src/util/focusTrap.ts", "../src/util/index.ts", "../src/composable/useComponentId.ts", "../src/composable/useDebouncedRef.ts", "../src/composable/useEventListener.ts", "../src/composable/useInterval.ts", "../src/composable/useInView.ts", "../src/composable/useMutationObserver.ts", "../src/composable/useRemembered.ts", "../src/composable/useScrollPosition.ts", "../src/composable/useFocusTrap.ts", "../src/composable/useFocusTrapLock.ts", "../src/composable/useFocusTrapReturn.ts", "../src/composable/useFocusTrapSubscription.ts", "../src/composable/useFocusZone.ts", "../src/data/color.ts", "../src/directive/focusTrap.ts", "../src/directive/heightTransition.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import type { DateTime } from 'luxon';\nimport { computed, type Ref, ref, unref } from 'vue';\n\nexport default function (initialDate: DateTime, options?: UseCalendarOptions): UseCalendarReturn {\n const isTransitioningToPast = ref(false);\n const viewDate = ref(initialDate);\n\n const dates = computed<DateTime[]>(() => {\n const dates: DateTime[] = [];\n const month = unref(viewDate).month;\n let current = unref(viewDate).startOf('month');\n\n do {\n dates.push(current);\n current = current.plus({day: 1});\n } while (current.month === month);\n\n const first = dates[0];\n const last = dates[dates.length - 1];\n\n for (let i = 1; i < first.weekday; ++i) {\n dates.unshift(first.minus({day: i}));\n }\n\n for (let i = last.weekday + 1; i <= 7; ++i) {\n dates.push(last.plus({day: i - last.weekday}));\n }\n\n while (dates.length / 7 < 6) {\n const last = dates[dates.length - 1];\n\n for (let i = 1; i <= 7; ++i) {\n dates.push(last.plus({day: i}));\n }\n }\n\n return dates;\n });\n\n const days = computed(() => unref(dates)\n .slice(0, 7)\n .map(d => d.toLocaleString({weekday: options?.weekDayLength ?? 'short'})));\n\n const viewDateNext = computed(() => unref(viewDate).plus({month: 1}));\n const viewDatePrevious = computed(() => unref(viewDate).minus({month: 1}));\n const viewMonth = computed(() => unref(viewDate).toLocaleString({month: options?.monthLength ?? 'long'}));\n const viewYear = computed(() => unref(viewDate).year.toString());\n\n function setViewDate(date: DateTime): void {\n isTransitioningToPast.value = viewDate.value > date;\n viewDate.value = date;\n }\n\n function nextMonth(): void {\n setViewDate(unref(viewDate).plus({month: 1}));\n }\n\n function previousMonth(): void {\n setViewDate(unref(viewDate).minus({month: 1}));\n }\n\n return {\n isTransitioningToPast,\n viewDate,\n viewDateNext,\n viewDatePrevious,\n viewMonth,\n viewYear,\n dates,\n days,\n setViewDate,\n nextMonth,\n previousMonth\n };\n}\n\ntype UseCalendarOptions = {\n readonly monthLength?: 'short' | 'long';\n readonly weekDayLength?: 'short' | 'long';\n};\n\ntype UseCalendarReturn = {\n readonly isTransitioningToPast: Ref<boolean>;\n readonly viewDate: Ref<DateTime>;\n readonly viewDateNext: Ref<DateTime>;\n readonly viewDatePrevious: Ref<DateTime>;\n readonly viewMonth: Ref<string>;\n readonly viewYear: Ref<string>;\n readonly dates: Ref<DateTime[]>;\n readonly days: Ref<string[]>;\n\n setViewDate(date: DateTime): void;\n nextMonth(): void;\n previousMonth(): void;\n};\n",
|
|
6
|
-
"import type { DateTime } from 'luxon';\nimport type { Ref } from 'vue';\nimport { computed, unref } from 'vue';\n\nexport default function (currentDate: Ref<DateTime>, displayLength: 'short' | 'long'): UseCalendarMonthSwitcherReturn {\n const months = computed(() => {\n const months: MonthEntry[] = [];\n const now = unref(currentDate);\n let current = now.startOf('year');\n\n while (current.month <= 12 && current.year === now.year) {\n months.push({\n date: current,\n label: current.toLocaleString({month: displayLength})\n });\n current = current.plus({months: 1});\n }\n\n return months;\n });\n\n return {\n months\n };\n}\n\ntype MonthEntry = {\n readonly date: DateTime;\n readonly label: string;\n};\n\ntype UseCalendarMonthSwitcherReturn = {\n readonly months: Ref<MonthEntry[]>;\n};\n",
|
|
7
|
-
"import type { DateTime } from 'luxon';\nimport type { Ref } from 'vue';\nimport { computed, ref, unref, watch } from 'vue';\n\nexport default function (currentDate: Ref<DateTime>, limit: number = 10): UseCalendarYearSwitcherReturn {\n const index = ref(0);\n\n const years = computed(() => {\n const year = unref(currentDate).year;\n const years: number[] = [];\n const start = year - (year % limit) + unref(index) * limit;\n\n for (let i = 0; i < limit; ++i) {\n years.push(start + i);\n }\n\n return years;\n });\n\n function next(): void {\n ++index.value;\n }\n\n function previous(): void {\n --index.value;\n }\n\n watch(currentDate, () => index.value = 0);\n\n return {\n years,\n\n next,\n previous\n };\n}\n\ntype UseCalendarYearSwitcherReturn = {\n readonly years: Ref<number[]>;\n\n next(): void;\n previous(): void;\n};\n",
|
|
8
|
-
"import type { Ref } from 'vue';\nimport { onMounted, onUnmounted, ref, unref, watchEffect } from 'vue';\nimport type { TemplateRef } from '../util';\nimport { unrefTemplateElement } from '../util';\n\ntype Handler = ((evt: PointerEvent) => void) | ((evt: PointerEvent) => Promise<void>);\n\nexport default function <TElement extends HTMLElement>(elementRefs: TemplateRef<TElement> | TemplateRef<TElement>[], enabled: boolean | Ref<boolean>, onOutsideClick: Handler): void {\n const elements = ref<HTMLElement[]>([]);\n\n onMounted(() => {\n document.addEventListener('pointerdown', onBodyClick);\n });\n\n onUnmounted(() => {\n document.removeEventListener('pointerdown', onBodyClick);\n });\n\n function onBodyClick(evt: PointerEvent): void {\n if (!unref(enabled)) {\n return;\n }\n\n const isInside = unref(elements).some(element => element.contains(evt.target as Node));\n !isInside && onOutsideClick(evt);\n }\n\n watchEffect(() => {\n const newElements: HTMLElement[] = [];\n\n (Array.isArray(elementRefs) ? elementRefs : [elementRefs]).forEach(elementRef => {\n const element = unrefTemplateElement(elementRef);\n element && newElements.push(element);\n });\n\n elements.value = newElements;\n });\n}\n",
|
|
9
|
-
"import type { VNode } from 'vue';\nimport { Fragment } from 'vue';\n\nexport default function (vnodes: VNode[]): VNode[] {\n const flattened: VNode[] = [];\n\n for (const vnode of vnodes) {\n if (vnode.type === Fragment && Array.isArray(vnode.children)) {\n flattened.push(...(vnode.children as VNode[]));\n continue;\n }\n\n flattened.push(vnode);\n }\n\n return flattened;\n}\n",
|
|
10
|
-
"import { isHtmlElement } from '@basmilius/utils';\n\nconst FOCUSABLE_ELEMENTS = [\n 'a:not([disabled])',\n 'button:not([disabled])',\n 'input[type=checkbox]:not([disabled])',\n 'input[type=radio]:not([disabled])',\n 'input[type=text]:not([disabled])',\n '[tabindex]:not([disabled]):not([tabindex=\"-1\"])'\n].join(',');\n\nexport default function (container: HTMLElement): HTMLElement[] {\n return Array.from(container.querySelectorAll(FOCUSABLE_ELEMENTS))\n .filter(isHtmlElement)\n .filter(elm => elm.offsetWidth > 0 || elm.offsetHeight > 0 || elm === document.activeElement);\n}\n",
|
|
11
|
-
"import getFocusableElements from './getFocusableElements';\n\nexport default function (container: HTMLElement, currentElement: HTMLElement, direction: 'up' | 'down' | 'left' | 'right'): HTMLElement | null {\n const elements = getFocusableElements(container);\n const currentIndex = elements.indexOf(currentElement);\n\n if (currentIndex === -1) {\n return null;\n }\n\n const elementInfos = getBidirectionalInfoForElements(elements);\n\n calculateBidirectionalDistances(elementInfos, currentIndex, direction);\n\n let candidate = determineBidirectionalCandidate(currentIndex, direction, elementInfos, elements);\n\n if (!candidate) {\n if (direction === 'up' || direction === 'left') {\n candidate = elements[currentIndex - 1];\n }\n\n if (direction === 'down' || direction === 'right') {\n candidate = elements[currentIndex + 1];\n }\n }\n\n return candidate;\n}\n\nfunction calculateBidirectionalDistances(elementInfos: BidirectionalInfo[], currentIndex: number, direction: 'up' | 'down' | 'left' | 'right'): void {\n const current = elementInfos[currentIndex];\n\n elementInfos.forEach(r => {\n let point = r.center;\n\n switch (direction) {\n case 'up':\n point = {x: point.x, y: r.top + r.height};\n break;\n\n case 'down':\n point = {x: point.x, y: r.top};\n break;\n\n case 'left':\n point = {x: r.left + r.width, y: point.y};\n break;\n\n case 'right':\n point = {x: r.left, y: point.y};\n break;\n }\n\n r.distance = Math.sqrt(Math.pow(current.center.x - point.x, 2) + Math.pow(current.center.y - point.y, 2));\n });\n}\n\nfunction determineBidirectionalCandidate(currentIndex: number, direction: 'up' | 'down' | 'left' | 'right', elementInfos: BidirectionalInfo[], elements: HTMLElement[]): HTMLElement | null {\n const current = elementInfos[currentIndex];\n let distances: number[] = [];\n\n switch (direction) {\n case 'up':\n distances = elementInfos.map((r, index) => index === currentIndex || r.top + r.height > current.top ? Number.MAX_SAFE_INTEGER : r.distance);\n break;\n\n case 'down':\n distances = elementInfos.map((r, index) => index === currentIndex || r.top < current.top + current.height ? Number.MAX_SAFE_INTEGER : r.distance);\n break;\n\n case 'left':\n distances = elementInfos.map((r, index) => index === currentIndex || r.left + r.width > current.left ? Number.MAX_SAFE_INTEGER : r.distance);\n break;\n\n case 'right':\n distances = elementInfos.map((r, index) => index === currentIndex || r.left < current.left + current.width ? Number.MAX_SAFE_INTEGER : r.distance);\n break;\n }\n\n const candidateIndex = distances.indexOf(Math.min(...distances));\n\n if (distances[candidateIndex] !== Number.MAX_SAFE_INTEGER) {\n return elements[candidateIndex];\n }\n\n return null;\n}\n\nfunction getBidirectionalInfoForElements(elements: HTMLElement[]): BidirectionalInfo[] {\n return elements\n .map(elm => elm.getBoundingClientRect())\n .map(rect => ({\n height: rect.height,\n width: rect.width,\n top: rect.top,\n left: rect.left,\n right: rect.right,\n bottom: rect.bottom,\n center: {\n x: rect.left + rect.width / 2,\n y: rect.top + rect.height / 2\n },\n distance: 0\n }));\n}\n\ntype BidirectionalInfo = Omit<DOMRect, 'x' | 'y' | 'toJSON'> & {\n center: { x: number; y: number; };\n distance: number;\n}\n",
|
|
12
|
-
"import type { VNode } from 'vue';\n\nexport default function (component: ExtendedVNode): string {\n let name = 'UnknownComponent';\n\n if (component.type && component.type.__name) {\n name = component.type.__name;\n }\n\n return name;\n}\n\ntype ExtendedVNode = {\n readonly type: VNode['type'] & {\n readonly __name?: string;\n };\n}\n",
|
|
13
|
-
"import { camelCase } from 'lodash-es';\n\nexport default function <T extends object>(component: any): T {\n return Object.fromEntries(\n Object.entries(component.props ?? {})\n .map(([key, value]) => [camelCase(key), value])\n ) as T;\n}\n",
|
|
14
|
-
"import type { ComponentInternalInstance, Ref } from 'vue';\n\nexport default function <T>(instance: ComponentInternalInstance, key: string): Ref<T> {\n if (!instance.exposed || !(key in instance.exposed)) {\n throw new Error(`'${key}' was not exposed by the component.`);\n }\n\n return instance.exposed[key];\n}\n",
|
|
15
|
-
"import { isHtmlElement } from '@basmilius/utils';\nimport getFocusableElements from './getFocusableElements';\n\nexport default function (container: HTMLElement, direction: number, activeElement: HTMLElement | undefined = undefined): HTMLElement | undefined {\n const elements = getFocusableElements(container);\n const focusedElement = activeElement || document.activeElement;\n\n if (!focusedElement || !isHtmlElement(focusedElement))\n return elements[0] || undefined;\n\n const currentIndex = elements.indexOf(focusedElement);\n\n return elements[currentIndex + direction] || undefined;\n}\n",
|
|
16
|
-
"export default function (root: HTMLElement): HTMLElement[] {\n return Array.from<HTMLElement>(root.querySelectorAll('a[href], button, input, textarea, select, details, [tabindex]:not([tabindex=\"-1\"])'))\n .filter(elm => !elm.hasAttribute('disabled') || elm.getAttribute('disabled') !== 'true')\n .filter(elm => !elm.hasAttribute('aria-disabled') || elm.getAttribute('aria-disabled') !== 'true');\n}\n",
|
|
17
|
-
"import { isHtmlElement } from '@basmilius/utils';\nimport { ComponentPublicInstance, ShallowRef, unref } from 'vue';\n\nexport type TemplateElement<TElement extends HTMLElement> = ComponentPublicInstance<any, any, any, any, any, any, any, any, any, any, any, any, any, any, TElement> | TElement | null;\nexport type TemplateRef<TElement extends HTMLElement> = Readonly<ShallowRef<TemplateElement<TElement>>>;\n\nexport default function <T extends HTMLElement>(ref: TemplateRef<T>): T | null {\n const value = unref(ref);\n\n if (isHtmlElement(value)) {\n return value as T;\n }\n\n return value?.$el;\n}\n",
|
|
18
|
-
"export default function (...data: any): void {\n console.warn('[Flux]', ...data);\n}\n",
|
|
19
|
-
"export default function (elm: HTMLElement, targetElm: Element, forceFirst: boolean = false): void {\n const walker = createFocusWalker(elm);\n const position = targetElm.compareDocumentPosition(elm);\n let wrappedTarget: HTMLElement | null;\n\n if (position && Node.DOCUMENT_POSITION_PRECEDING || forceFirst) {\n wrappedTarget = walker.firstChild() as HTMLElement | null;\n } else {\n wrappedTarget = walker.lastChild() as HTMLElement | null;\n }\n\n const newFocus = wrappedTarget !== null ? wrappedTarget : elm;\n newFocus.focus();\n}\n\nfunction createFocusWalker(elm: HTMLElement): TreeWalker {\n return document.createTreeWalker(elm, NodeFilter.SHOW_ELEMENT, {\n acceptNode: (node: HTMLButtonElement) => node.tabIndex >= 0 && !node.disabled ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP\n });\n}\n",
|
|
20
|
-
"class FocusTrapLockStack {\n get active(): boolean {\n return this.current?.isEnabled ?? false;\n }\n\n get current(): FocusTrap | null {\n return this.#traps[this.#traps.length - 1] ?? null;\n }\n\n #listeners: FocusTrapListener[] = [];\n #traps: FocusTrap[] = [];\n\n add(id: FocusTrap['id'], setEnabled: FocusTrap['setEnabled'], autoFocus: boolean = true): void {\n const trap: FocusTrap = {id, setEnabled, isEnabled: true};\n this.current && this.toggle(this.current, false);\n this.#traps.push(trap);\n\n if (autoFocus) {\n this.toggle(trap, true);\n this.emit();\n }\n }\n\n remove(id: FocusTrap['id']): void {\n const trap = this.#traps.find(t => t.id === id);\n trap && this.toggle(trap, false);\n\n const current = this.current;\n const wasCurrent = current?.id === id;\n this.#traps = this.#traps.filter(t => t.id !== id);\n\n wasCurrent && this.current && this.toggle(this.current, true);\n this.emit();\n }\n\n emit(): void {\n this.#listeners.forEach(listener => listener(this.active, this.#traps));\n }\n\n subscribe(listener: FocusTrapListener): () => void {\n this.#listeners.push(listener);\n listener(this.active, this.#traps);\n\n return () => this.#listeners = this.#listeners.filter(l => l !== listener);\n }\n\n toggle(trap: FocusTrap, isEnabled: boolean): void {\n trap.setEnabled(isEnabled);\n trap.isEnabled = isEnabled;\n }\n}\n\ninterface FocusTrap {\n id: string;\n isEnabled: boolean;\n\n setEnabled(isEnabled: boolean): void;\n}\n\nexport type FocusTrapListener = (isEnabled: boolean, focusTraps: FocusTrap[]) => void;\n\nexport default new FocusTrapLockStack();\n",
|
|
21
|
-
"export { default as flattenVNodeTree } from './flattenVNodeTree';\nexport { default as getBidirectionalFocusElement } from './getBidirectionalFocusElement';\nexport { default as getComponentName } from './getComponentName';\nexport { default as getComponentProps } from './getComponentProps';\nexport { default as getExposedRef } from './getExposedRef';\nexport { default as getFocusableElement } from './getFocusableElement';\nexport { default as getFocusableElements } from './getFocusableElements';\nexport { default as getKeyboardFocusableElements } from './getKeyboardFocusableElements';\nexport { default as unrefTemplateElement, type TemplateElement, type TemplateRef } from './unrefTemplateElement';\nexport { default as warn } from './warn';\nexport { default as wrapFocus } from './wrapFocus';\n\nexport { default as FOCUS_TRAP_LOCKS, type FocusTrapListener } from './focusTrap';\n\nexport const isSSR = !globalThis.document;\n",
|
|
22
|
-
"import type { ComputedRef } from 'vue';\nimport { computed, getCurrentInstance } from 'vue';\n\nexport default function (): ComputedRef<number> {\n const instance = getCurrentInstance();\n\n return computed(() => instance?.uid ?? (instance?.proxy as any)._uid ?? 0);\n}\n",
|
|
23
|
-
"import type { Ref } from 'vue';\nimport { customRef, isRef, ref, watch } from 'vue';\n\nexport default function <T>(initialValue: Ref<T> | T, delay: number, immediate: boolean = false): Ref<T> {\n const state = ref(isRef(initialValue) ? initialValue.value : initialValue);\n\n const debounced = customRef((track, trigger) => ({\n get() {\n track();\n return state.value;\n },\n\n set: debounce(value => {\n state.value = value;\n trigger();\n }, delay, immediate)\n })) as Ref<T>;\n\n if (isRef(initialValue)) {\n watch(initialValue, value => debounced.value = value);\n }\n\n return debounced;\n}\n\nfunction debounce<TFunc extends (...args: any[]) => any>(fn: TFunc, delay: number, immediate: boolean = false): VoidFunction {\n let timeout: any;\n\n return (...args: any[]) => {\n if (immediate && !timeout) {\n fn(...args);\n }\n\n clearTimeout(timeout);\n\n timeout = setTimeout(() => requestAnimationFrame(() => fn(...args)), delay);\n };\n}\n",
|
|
24
|
-
"import { watch } from 'vue';\nimport type { TemplateRef } from '../util';\n\nexport default function <K extends keyof HTMLElementEventMap>(elementRef: TemplateRef<HTMLElement>, eventName: K, listener: (evt: HTMLElementEventMap[K]) => any, options: AddEventListenerOptions = {passive: true}): void {\n watch(elementRef, (element: HTMLElement, _, onCleanup) => {\n if (!element) {\n return;\n }\n\n element.addEventListener(eventName, listener, options);\n\n onCleanup(() => element.removeEventListener(eventName, listener));\n }, {immediate: true});\n}\n",
|
|
25
|
-
"import type { Ref } from 'vue';\nimport { onMounted, onUnmounted, ref, unref } from 'vue';\n\nexport default function (interval: Ref<number> | number, fn: Function): void {\n const intervalRef = ref<any>();\n\n onMounted(() => {\n tick();\n });\n\n onUnmounted(() => {\n clearTimeout(intervalRef.value);\n });\n\n function schedule(): void {\n intervalRef.value = setTimeout(() => requestAnimationFrame(tick), unref(interval));\n }\n\n function tick(): void {\n schedule();\n fn();\n }\n}\n",
|
|
26
|
-
"import type { Ref } from 'vue';\nimport { ref, watch } from 'vue';\nimport type { TemplateRef } from '../util';\nimport { unrefTemplateElement } from '../util';\n\nexport default function <TElement extends HTMLElement>(containerRef: TemplateRef<TElement>, options: UseInViewOptions = {}): Ref<boolean> {\n const inView = ref(options.initial ?? false);\n\n watch(containerRef, (_, __, onCleanup) => {\n const container = unrefTemplateElement(containerRef);\n\n if (!container) {\n return;\n }\n\n const observer = new IntersectionObserver(entries => inView.value = entries[0]?.isIntersecting ?? false, options);\n observer.observe(container);\n\n onCleanup(() => observer.disconnect());\n }, {immediate: true});\n\n return inView;\n}\n\ntype UseInViewOptions = IntersectionObserverInit & {\n readonly initial?: boolean;\n};\n",
|
|
27
|
-
"import { onScopeDispose, watch } from 'vue';\nimport type { TemplateRef } from '../util';\nimport { unrefTemplateElement } from '../util';\n\nexport default function <TElement extends HTMLElement>(elementRef: TemplateRef<TElement>, callback: MutationCallback, options?: MutationObserverInit): void {\n options ??= {\n attributes: true\n };\n\n let observer: MutationObserver | undefined;\n\n const stop = watch(() => unrefTemplateElement(elementRef), element => {\n cleanup();\n\n if (!element) {\n return;\n }\n\n observer = new MutationObserver(callback);\n observer.observe(element, options);\n }, {immediate: true});\n\n function cleanup(): void {\n if (!observer) {\n return;\n }\n\n observer.disconnect();\n observer = undefined;\n }\n\n function dispose(): void {\n cleanup();\n stop();\n }\n\n onScopeDispose(dispose);\n}\n",
|
|
28
|
-
"import { DateTime } from 'luxon';\nimport type { Ref } from 'vue';\nimport { ref, watch } from 'vue';\n\nexport default function <T>(key: string, initialValue: T): Ref<T> {\n const realKey = `flux/${key}`;\n const value = ref<T>(get() ?? initialValue);\n\n function get(): T | null {\n if (realKey in localStorage) {\n let storageValue = JSON.parse(localStorage.getItem(realKey)!);\n\n if (Array.isArray(storageValue) && storageValue[0] === 'DateTime') {\n storageValue = DateTime.fromISO(storageValue[1]);\n }\n\n return storageValue;\n }\n\n return null;\n }\n\n watch(value, value => {\n let _value: T = value as T;\n\n if (DateTime.isDateTime(value)) {\n _value = ['DateTime', value.toISO({\n includeOffset: true,\n extendedZone: true\n })] as unknown as T;\n }\n\n localStorage.setItem(realKey, JSON.stringify(_value));\n });\n\n return value as Ref<T>;\n}\n",
|
|
29
|
-
"import type { Ref } from 'vue';\nimport { ref, unref } from 'vue';\nimport type { TemplateRef } from '../util';\nimport useEventListener from './useEventListener';\n\nexport default function <TElement extends HTMLElement>(elementRef?: TemplateRef<TElement>): UseScrollPositionReturn {\n const x = ref(0);\n const y = ref(0);\n\n if (!elementRef) {\n elementRef = ref(document);\n }\n\n useEventListener(elementRef, 'scroll', () => {\n let element = unref(elementRef);\n\n if (element instanceof Document) {\n element = element.scrollingElement;\n }\n\n x.value = element?.scrollLeft ?? 0;\n y.value = element?.scrollTop ?? 0;\n });\n\n return {\n x,\n y\n };\n}\n\nexport type UseScrollPositionReturn = {\n readonly x: Ref<number>;\n readonly y: Ref<number>;\n};\n",
|
|
30
|
-
"import type { Ref } from 'vue';\nimport { ref, watch } from 'vue';\nimport type { TemplateRef } from '../util';\nimport { getFocusableElements, isSSR, unrefTemplateElement, wrapFocus } from '../util';\nimport useFocusTrapLock from './useFocusTrapLock';\nimport useFocusTrapReturn from './useFocusTrapReturn';\n\nexport default function (containerRef: TemplateRef<HTMLElement>, options: UseFocusTrapOptions = {}): void {\n if (isSSR) {\n return;\n }\n\n const {disable = ref(false), disableReturn = ref(false), attachTo = null} = options;\n const enabled = useFocusTrapLock(!disable);\n\n useFocusTrapReturn(disableReturn);\n\n watch(containerRef, (_, __, onCleanup) => {\n const container = unrefTemplateElement(containerRef);\n const attach = attachTo || document;\n\n if (enabled.value && container && document.activeElement && !container.contains(document.activeElement) && !container.querySelector('[autofocus]')) {\n wrapFocus(container, document.activeElement, true);\n }\n\n function onFocusIn(evt: FocusEvent): void {\n if (!enabled.value || !container) {\n return;\n }\n\n const newFocusElement = (evt.target as HTMLElement | null) || document.body;\n\n if (container.contains(newFocusElement)) {\n return;\n }\n\n evt.preventDefault();\n evt.stopImmediatePropagation();\n\n wrapFocus(container, newFocusElement);\n }\n\n function onFocusOut(evt: FocusEvent): void {\n if (!enabled.value || !container) {\n return;\n }\n\n if (!evt.relatedTarget || evt.relatedTarget === document.body) {\n evt.preventDefault();\n container.focus();\n }\n\n const newFocusElement = (evt.target as HTMLElement | null) || document.body;\n\n if (container.contains(newFocusElement)) {\n return;\n }\n\n wrapFocus(container, newFocusElement);\n }\n\n attach.addEventListener('focusin', onFocusIn as EventListener, {capture: true});\n attach.addEventListener('focusout', onFocusOut as EventListener, {capture: true});\n\n if (container) {\n const elements = getFocusableElements(container);\n const isActiveIndex = elements.findIndex(e => e.classList.contains('is-active'));\n const notDisabledIndex = elements.findIndex(e => !e.hasAttribute('aria-disabled'));\n let element = elements[0];\n\n if (isActiveIndex > -1) {\n element = elements[isActiveIndex];\n }\n\n if (notDisabledIndex > -1) {\n element = elements[notDisabledIndex];\n }\n\n if (element) {\n element.focus();\n }\n }\n\n onCleanup(() => {\n attach.removeEventListener('focusin', onFocusIn as EventListener);\n attach.removeEventListener('focusout', onFocusOut as EventListener);\n });\n }, {immediate: true});\n\n watch(() => disable, () => {\n const container = unrefTemplateElement(containerRef);\n enabled.value = !disable;\n\n if (disable || !container) {\n return;\n }\n\n const elements = getFocusableElements(container as HTMLElement);\n\n if (elements.includes(document.activeElement as HTMLElement)) {\n return;\n }\n\n elements[0]?.focus();\n }, {immediate: true});\n}\n\ntype UseFocusTrapOptions = {\n attachTo?: HTMLElement | Document;\n disable?: Ref<boolean>;\n disableReturn?: Ref<boolean>;\n};\n",
|
|
31
|
-
"import type { Ref } from 'vue';\nimport { onMounted, onUnmounted, ref, unref } from 'vue';\nimport { FOCUS_TRAP_LOCKS } from '../util';\n\nlet lockId = 0;\n\nexport default function (autoFocus: boolean = false): Ref<boolean> {\n const id = ref(`focus-trap-${++lockId}`);\n const enabled = ref(false);\n\n onMounted(() => FOCUS_TRAP_LOCKS.add(unref(id), isEnabled => enabled.value = isEnabled, autoFocus));\n onUnmounted(() => FOCUS_TRAP_LOCKS.remove(unref(id)));\n\n return enabled;\n}\n",
|
|
32
|
-
"import type { Ref } from 'vue';\nimport { onUnmounted, ref, unref } from 'vue';\n\nexport default function (disabled: Ref<boolean>): void {\n const target = ref<HTMLElement | null>(document.activeElement as HTMLElement | null);\n\n onUnmounted(() => {\n if (unref(disabled)) {\n return;\n }\n\n requestAnimationFrame(() => unref(target)?.focus());\n });\n}\n",
|
|
33
|
-
"import { onMounted, onUnmounted, ref } from 'vue';\nimport type { FocusTrapListener } from '../util';\nimport { FOCUS_TRAP_LOCKS } from '../util';\n\nexport default function (listener: FocusTrapListener): void {\n const unsubscribe = ref<Function | null>(null);\n\n onMounted(() => unsubscribe.value = FOCUS_TRAP_LOCKS.subscribe(listener));\n onUnmounted(() => unsubscribe.value?.());\n}\n",
|
|
34
|
-
"import { watch } from 'vue';\nimport type { TemplateRef } from '../util';\nimport { getBidirectionalFocusElement, getFocusableElement, getFocusableElements, unrefTemplateElement } from '../util';\nimport useMutationObserver from './useMutationObserver';\n\nexport default function <TElement extends HTMLElement>(containerRef: TemplateRef<TElement>, {cycle = true, direction = 'bidirectional'}: UseFocusZoneOptions = {}): void {\n useMutationObserver(containerRef, () => updateFocus(findInitialIndex(), false));\n\n function findInitialIndex(): number {\n const container = unrefTemplateElement(containerRef)!;\n const elements = getFocusableElements(container);\n const isActiveIndex = elements.findIndex(e => e.classList.contains('is-active'));\n const notDisabledIndex = elements.findIndex(e => !e.hasAttribute('aria-disabled'));\n\n if (isActiveIndex > -1) {\n return isActiveIndex;\n }\n\n if (notDisabledIndex > -1) {\n return notDisabledIndex;\n }\n\n return 0;\n }\n\n function updateFocus(elementIndex: number, doFocus: boolean = true): void {\n const container = unrefTemplateElement(containerRef)!;\n const elements = getFocusableElements(container);\n elements.forEach((elm, index) => elm.tabIndex = index === elementIndex ? 0 : -1);\n\n doFocus && elements[elementIndex]?.focus();\n }\n\n function onKeyDown(evt: KeyboardEvent): void {\n const container = unrefTemplateElement(containerRef)!;\n const elements = getFocusableElements(container);\n\n if (['Enter', ' '].includes(evt.key)) {\n return;\n }\n\n switch (direction) {\n case 'bidirectional':\n handleBidirectionalFocus(evt, container, elements, updateFocus);\n break;\n\n case 'horizontal':\n case 'vertical':\n handleDirectionalFocus(evt, container, cycle, direction, elements, updateFocus);\n break;\n }\n }\n\n watch(containerRef, (_, __, onCleanup) => {\n const container = unrefTemplateElement(containerRef);\n\n if (!container) {\n return;\n }\n\n container.addEventListener('keydown', onKeyDown);\n\n updateFocus(findInitialIndex(), false);\n\n onCleanup(() => container.removeEventListener('keydown', onKeyDown));\n }, {immediate: true});\n}\n\nfunction handleBidirectionalFocus(evt: KeyboardEvent, container: HTMLElement, elements: HTMLElement[], updateFocus: (index: number) => void): void {\n let dir: 'up' | 'down' | 'left' | 'right';\n\n switch (evt.key) {\n case 'ArrowUp':\n dir = 'up';\n break;\n\n case 'ArrowDown':\n dir = 'down';\n break;\n\n case 'ArrowLeft':\n dir = 'left';\n break;\n\n case 'ArrowRight':\n dir = 'right';\n break;\n\n default:\n return;\n }\n\n const element = getBidirectionalFocusElement(container, document.activeElement as HTMLElement, dir);\n\n if (element) {\n updateFocus(elements.indexOf(element));\n }\n\n evt.preventDefault();\n}\n\nfunction handleDirectionalFocus(evt: KeyboardEvent, container: HTMLElement, cycle: boolean, direction: 'horizontal' | 'vertical', elements: HTMLElement[], updateFocus: (index: number) => void): void {\n let dir: number;\n\n if (evt.key === (direction === 'horizontal' ? 'ArrowLeft' : 'ArrowUp')) {\n dir = -1;\n } else if (evt.key === (direction === 'horizontal' ? 'ArrowRight' : 'ArrowDown')) {\n dir = 1;\n } else {\n return;\n }\n\n const element = getFocusableElement(container, dir);\n\n if (element) {\n updateFocus(elements.indexOf(element));\n } else if (cycle) {\n updateFocus(dir === 1 ? 0 : elements.length - 1);\n }\n\n evt.preventDefault();\n}\n\ntype UseFocusZoneOptions = {\n readonly cycle?: boolean;\n readonly direction?: 'bidirectional' | 'horizontal' | 'vertical';\n};\n",
|
|
35
|
-
"export const slate50 = '#f8fafc';\nexport const slate100 = '#f1f5f9';\nexport const slate200 = '#e2e8f0';\nexport const slate300 = '#cbd5e1';\nexport const slate400 = '#94a3b8';\nexport const slate500 = '#64748b';\nexport const slate600 = '#475569';\nexport const slate700 = '#334155';\nexport const slate800 = '#1e293b';\nexport const slate900 = '#0f172a';\nexport const slate950 = '#020617';\n\nexport const gray50 = '#f9fafb';\nexport const gray100 = '#f3f4f6';\nexport const gray200 = '#e5e7eb';\nexport const gray300 = '#d1d5db';\nexport const gray400 = '#9ca3af';\nexport const gray500 = '#6b7280';\nexport const gray600 = '#4b5563';\nexport const gray700 = '#374151';\nexport const gray800 = '#1f2937';\nexport const gray900 = '#111827';\nexport const gray950 = '#030712';\n\nexport const zinc50 = '#fafafa';\nexport const zinc100 = '#f4f4f5';\nexport const zinc200 = '#e4e4e7';\nexport const zinc300 = '#d4d4d8';\nexport const zinc400 = '#a1a1aa';\nexport const zinc500 = '#71717a';\nexport const zinc600 = '#52525b';\nexport const zinc700 = '#3f3f46';\nexport const zinc800 = '#27272a';\nexport const zinc900 = '#18181b';\nexport const zinc950 = '#09090b';\n\nexport const neutral50 = '#fafafa';\nexport const neutral100 = '#f5f5f5';\nexport const neutral200 = '#e5e5e5';\nexport const neutral300 = '#d4d4d4';\nexport const neutral400 = '#a3a3a3';\nexport const neutral500 = '#737373';\nexport const neutral600 = '#525252';\nexport const neutral700 = '#404040';\nexport const neutral800 = '#262626';\nexport const neutral900 = '#171717';\nexport const neutral950 = '#0a0a0a';\n\nexport const stone50 = '#fafaf9';\nexport const stone100 = '#f5f5f4';\nexport const stone200 = '#e7e5e4';\nexport const stone300 = '#d6d3d1';\nexport const stone400 = '#a8a29e';\nexport const stone500 = '#78716c';\nexport const stone600 = '#57534e';\nexport const stone700 = '#44403c';\nexport const stone800 = '#292524';\nexport const stone900 = '#1c1917';\nexport const stone950 = '#0c0a09';\n\nexport const red50 = '#fef2f2';\nexport const red100 = '#fee2e2';\nexport const red200 = '#fecaca';\nexport const red300 = '#fca5a5';\nexport const red400 = '#f87171';\nexport const red500 = '#ef4444';\nexport const red600 = '#dc2626';\nexport const red700 = '#b91c1c';\nexport const red800 = '#991b1b';\nexport const red900 = '#7f1d1d';\nexport const red950 = '#450a0a';\n\nexport const orange50 = '#fff7ed';\nexport const orange100 = '#ffedd5';\nexport const orange200 = '#fed7aa';\nexport const orange300 = '#fdba74';\nexport const orange400 = '#fb923c';\nexport const orange500 = '#f97316';\nexport const orange600 = '#ea580c';\nexport const orange700 = '#c2410c';\nexport const orange800 = '#9a3412';\nexport const orange900 = '#7c2d12';\nexport const orange950 = '#431407';\n\nexport const amber50 = '#fffbeb';\nexport const amber100 = '#fef3c7';\nexport const amber200 = '#fde68a';\nexport const amber300 = '#fcd34d';\nexport const amber400 = '#fbbf24';\nexport const amber500 = '#f59e0b';\nexport const amber600 = '#d97706';\nexport const amber700 = '#b45309';\nexport const amber800 = '#92400e';\nexport const amber900 = '#78350f';\nexport const amber950 = '#451a03';\n\nexport const yellow50 = '#fefce8';\nexport const yellow100 = '#fef9c3';\nexport const yellow200 = '#fef08a';\nexport const yellow300 = '#fde047';\nexport const yellow400 = '#facc15';\nexport const yellow500 = '#eab308';\nexport const yellow600 = '#ca8a04';\nexport const yellow700 = '#a16207';\nexport const yellow800 = '#854d0e';\nexport const yellow900 = '#713f12';\nexport const yellow950 = '#422006';\n\nexport const lime50 = '#f7fee7';\nexport const lime100 = '#ecfccb';\nexport const lime200 = '#d9f99d';\nexport const lime300 = '#bef264';\nexport const lime400 = '#a3e635';\nexport const lime500 = '#84cc16';\nexport const lime600 = '#65a30d';\nexport const lime700 = '#4d7c0f';\nexport const lime800 = '#3f6212';\nexport const lime900 = '#365314';\nexport const lime950 = '#1a2e05';\n\nexport const green50 = '#f0fdf4';\nexport const green100 = '#dcfce7';\nexport const green200 = '#bbf7d0';\nexport const green300 = '#86efac';\nexport const green400 = '#4ade80';\nexport const green500 = '#22c55e';\nexport const green600 = '#16a34a';\nexport const green700 = '#15803d';\nexport const green800 = '#166534';\nexport const green900 = '#14532d';\nexport const green950 = '#052e16';\n\nexport const emerald50 = '#ecfdf5';\nexport const emerald100 = '#d1fae5';\nexport const emerald200 = '#a7f3d0';\nexport const emerald300 = '#6ee7b7';\nexport const emerald400 = '#34d399';\nexport const emerald500 = '#10b981';\nexport const emerald600 = '#059669';\nexport const emerald700 = '#047857';\nexport const emerald800 = '#065f46';\nexport const emerald900 = '#064e3b';\nexport const emerald950 = '#022c22';\n\nexport const teal50 = '#f0fdfa';\nexport const teal100 = '#ccfbf1';\nexport const teal200 = '#99f6e4';\nexport const teal300 = '#5eead4';\nexport const teal400 = '#2dd4bf';\nexport const teal500 = '#14b8a6';\nexport const teal600 = '#0d9488';\nexport const teal700 = '#0f766e';\nexport const teal800 = '#115e59';\nexport const teal900 = '#134e4a';\nexport const teal950 = '#042f2e';\n\nexport const cyan50 = '#ecfeff';\nexport const cyan100 = '#cffafe';\nexport const cyan200 = '#a5f3fc';\nexport const cyan300 = '#67e8f9';\nexport const cyan400 = '#22d3ee';\nexport const cyan500 = '#06b6d4';\nexport const cyan600 = '#0891b2';\nexport const cyan700 = '#0e7490';\nexport const cyan800 = '#155e75';\nexport const cyan900 = '#164e63';\nexport const cyan950 = '#083344';\n\nexport const sky50 = '#f0f9ff';\nexport const sky100 = '#e0f2fe';\nexport const sky200 = '#bae6fd';\nexport const sky300 = '#7dd3fc';\nexport const sky400 = '#38bdf8';\nexport const sky500 = '#0ea5e9';\nexport const sky600 = '#0284c7';\nexport const sky700 = '#0369a1';\nexport const sky800 = '#075985';\nexport const sky900 = '#0c4a6e';\nexport const sky950 = '#082f49';\n\nexport const blue50 = '#eff6ff';\nexport const blue100 = '#dbeafe';\nexport const blue200 = '#bfdbfe';\nexport const blue300 = '#93c5fd';\nexport const blue400 = '#60a5fa';\nexport const blue500 = '#3b82f6';\nexport const blue600 = '#2563eb';\nexport const blue700 = '#1d4ed8';\nexport const blue800 = '#1e40af';\nexport const blue900 = '#1e3a8a';\nexport const blue950 = '#172554';\n\nexport const indigo50 = '#eef2ff';\nexport const indigo100 = '#e0e7ff';\nexport const indigo200 = '#c7d2fe';\nexport const indigo300 = '#a5b4fc';\nexport const indigo400 = '#818cf8';\nexport const indigo500 = '#6366f1';\nexport const indigo600 = '#4f46e5';\nexport const indigo700 = '#4338ca';\nexport const indigo800 = '#3730a3';\nexport const indigo900 = '#312e81';\nexport const indigo950 = '#1e1b4b';\n\nexport const violet50 = '#f5f3ff';\nexport const violet100 = '#ede9fe';\nexport const violet200 = '#ddd6fe';\nexport const violet300 = '#c4b5fd';\nexport const violet400 = '#a78bfa';\nexport const violet500 = '#8b5cf6';\nexport const violet600 = '#7c3aed';\nexport const violet700 = '#6d28d9';\nexport const violet800 = '#5b21b6';\nexport const violet900 = '#4c1d95';\nexport const violet950 = '#2e1065';\n\nexport const purple50 = '#faf5ff';\nexport const purple100 = '#f3e8ff';\nexport const purple200 = '#e9d5ff';\nexport const purple300 = '#d8b4fe';\nexport const purple400 = '#c084fc';\nexport const purple500 = '#a855f7';\nexport const purple600 = '#9333ea';\nexport const purple700 = '#7e22ce';\nexport const purple800 = '#6b21a8';\nexport const purple900 = '#581c87';\nexport const purple950 = '#3b0764';\n\nexport const fuchsia50 = '#fdf4ff';\nexport const fuchsia100 = '#fae8ff';\nexport const fuchsia200 = '#f5d0fe';\nexport const fuchsia300 = '#f0abfc';\nexport const fuchsia400 = '#e879f9';\nexport const fuchsia500 = '#d946ef';\nexport const fuchsia600 = '#c026d3';\nexport const fuchsia700 = '#a21caf';\nexport const fuchsia800 = '#86198f';\nexport const fuchsia900 = '#701a75';\nexport const fuchsia950 = '#4a044e';\n\nexport const pink50 = '#fdf2f8';\nexport const pink100 = '#fce7f3';\nexport const pink200 = '#fbcfe8';\nexport const pink300 = '#f9a8d4';\nexport const pink400 = '#f472b6';\nexport const pink500 = '#ec4899';\nexport const pink600 = '#db2777';\nexport const pink700 = '#be185d';\nexport const pink800 = '#9d174d';\nexport const pink900 = '#831843';\nexport const pink950 = '#500724';\n\nexport const rose50 = '#fff1f2';\nexport const rose100 = '#ffe4e6';\nexport const rose200 = '#fecdd3';\nexport const rose300 = '#fda4af';\nexport const rose400 = '#fb7185';\nexport const rose500 = '#f43f5e';\nexport const rose600 = '#e11d48';\nexport const rose700 = '#be123c';\nexport const rose800 = '#9f1239';\nexport const rose900 = '#881337';\nexport const rose950 = '#4c0519';\n",
|
|
36
|
-
"import type { Directive } from 'vue';\nimport { getKeyboardFocusableElements } from '../util';\n\nclass FocusTrap {\n readonly #root: HTMLElement;\n #elements: HTMLElement[];\n\n constructor(root: HTMLElement) {\n this.#elements = [];\n this.#root = root;\n\n this.onKeyDown = this.onKeyDown.bind(this);\n }\n\n focusElement(index: number, focus: boolean = true): void {\n if (!this.#elements[index]) {\n return;\n }\n\n for (let i = 0; i < this.#elements.length; ++i) {\n this.#elements[i].tabIndex = i === index ? 0 : -1;\n }\n\n if (focus) {\n this.#elements[index]?.focus();\n }\n }\n\n register(): void {\n this.#elements = getKeyboardFocusableElements(this.#root);\n this.#root.addEventListener('keydown', this.onKeyDown);\n this.focusElement(0, false);\n }\n\n unregister(): void {\n this.#root.removeEventListener('keydown', this.onKeyDown);\n }\n\n onKeyDown(evt: KeyboardEvent): void {\n const currentElement = this.#root.querySelector('[tabindex=\"0\"]');\n const currentIndex = this.#elements.findIndex(elm => elm === currentElement) ?? 0;\n\n switch (evt.key) {\n case 'ArrowUp':\n case 'ArrowLeft':\n this.focusElement(currentIndex - 1);\n break;\n\n case 'ArrowDown':\n case 'ArrowRight':\n this.focusElement(currentIndex + 1);\n break;\n\n default:\n return;\n }\n\n evt.preventDefault();\n evt.stopPropagation();\n }\n}\n\nexport default {\n beforeUnmount(elm: HTMLElement): void {\n const focusTrap = focusTraps.get(elm);\n focusTrap?.unregister();\n focusTraps.delete(elm);\n },\n\n mounted(elm: HTMLElement): void {\n const focusTrap = new FocusTrap(elm);\n focusTrap.register();\n focusTraps.set(elm, focusTrap);\n }\n} satisfies Directive;\n\nconst focusTraps: WeakMap<HTMLElement, FocusTrap> = new WeakMap();\n",
|
|
37
|
-
"import type { Directive } from 'vue';\n\nclass HeightTransition {\n readonly #root: HTMLElement;\n readonly #observer: MutationObserver;\n\n constructor(root: HTMLElement) {\n this.#root = root;\n this.#observer = new MutationObserver(this.onMutation.bind(this));\n }\n\n register(): void {\n this.#observer.observe(this.#root, {\n childList: true,\n subtree: true\n });\n\n requestAnimationFrame(this.onMutation.bind(this));\n }\n\n unregister(): void {\n this.#observer.disconnect();\n }\n\n onMutation(): void {\n const {height: currentHeight} = getComputedStyle(this.#root);\n this.#root.style.height = 'auto';\n\n const {height} = getComputedStyle(this.#root);\n this.#root.style.height = currentHeight;\n\n if (height === currentHeight) {\n return;\n }\n\n getComputedStyle(this.#root);\n requestAnimationFrame(() => requestAnimationFrame(() => this.#root.style.height = height));\n }\n}\n\nexport default {\n beforeUnmount(elm: HTMLElement): void {\n const heightTransition = heightTransitions.get(elm);\n heightTransition?.unregister();\n heightTransitions.delete(elm);\n },\n\n mounted(elm: HTMLElement): void {\n const heightTransition = new HeightTransition(elm);\n heightTransition.register();\n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CACb,KAAK,GAAU,QAAQ,KAAK,GAAO,CAC/B,UAAW,GACX,QAAS,EACb,CAAC,EAED,sBAAsB,KAAK,WAAW,KAAK,IAAI,CAAC,EAGpD,UAAU,EAAS,CACf,KAAK,GAAU,WAAW,EAG9B,UAAU,EAAS,CACf,IAAO,OAAQ,GAAiB,iBAAiB,KAAK,EAAK,EAC3D,KAAK,GAAM,MAAM,OAAS,OAE1B,IAAO,UAAU,iBAAiB,KAAK,EAAK,EAG5C,GAFA,KAAK,GAAM,MAAM,OAAS,EAEtB,IAAW,EACX,OAGJ,iBAAiB,KAAK,EAAK,EAC3B,sBAAsB,IAAM,sBAAsB,IAAM,KAAK,GAAM,MAAM,OAAS,CAAM,CAAC,EAEjG,CAEA,IAAe,IACX,aAAa,CAAC,EAAwB,CACT,EAAkB,IAAI,CAAG,GAChC,WAAW,EAC7B,EAAkB,OAAO,CAAG,GAGhC,OAAO,CAAC,EAAwB,CAC5B,IAAM,EAAmB,IAAI,GAAiB,CAAG,EACjD,EAAiB,SAAS,EAC1B,EAAkB,IAAI,EAAK,CAAgB,EAEnD,EAEM,EAA4D,IAAI",
|
|
40
|
-
"debugId": "07CE9B4444A7CBFE64756E2164756E21",
|
|
41
|
-
"names": []
|
|
42
|
-
}
|
package/dist/util/focusTrap.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function(container: HTMLElement, currentElement: HTMLElement, direction: "up" | "down" | "left" | "right"): HTMLElement | null;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function<T extends object>(component: any): T;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function(container: HTMLElement, direction: number, activeElement?: HTMLElement | undefined): HTMLElement | undefined;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function(container: HTMLElement): HTMLElement[];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function(root: HTMLElement): HTMLElement[];
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { ComponentPublicInstance, ShallowRef } from "vue";
|
|
2
|
-
export type TemplateElement<TElement extends HTMLElement> = ComponentPublicInstance<any, any, any, any, any, any, any, any, any, any, any, any, any, any, TElement> | TElement | null;
|
|
3
|
-
export type TemplateRef<TElement extends HTMLElement> = Readonly<ShallowRef<TemplateElement<TElement>>>;
|
|
4
|
-
export default function<T extends HTMLElement>(ref: TemplateRef<T>): T | null;
|
package/dist/util/warn.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function(...data: any): void;
|
package/dist/util/wrapFocus.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function(elm: HTMLElement, targetElm: Element, forceFirst?: boolean): void;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import type { Ref } from 'vue';
|
|
2
|
-
import { onMounted, onUnmounted, ref, unref, watchEffect } from 'vue';
|
|
3
|
-
import type { TemplateRef } from '../util';
|
|
4
|
-
import { unrefTemplateElement } from '../util';
|
|
5
|
-
|
|
6
|
-
type Handler = ((evt: PointerEvent) => void) | ((evt: PointerEvent) => Promise<void>);
|
|
7
|
-
|
|
8
|
-
export default function <TElement extends HTMLElement>(elementRefs: TemplateRef<TElement> | TemplateRef<TElement>[], enabled: boolean | Ref<boolean>, onOutsideClick: Handler): void {
|
|
9
|
-
const elements = ref<HTMLElement[]>([]);
|
|
10
|
-
|
|
11
|
-
onMounted(() => {
|
|
12
|
-
document.addEventListener('pointerdown', onBodyClick);
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
onUnmounted(() => {
|
|
16
|
-
document.removeEventListener('pointerdown', onBodyClick);
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
function onBodyClick(evt: PointerEvent): void {
|
|
20
|
-
if (!unref(enabled)) {
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
const isInside = unref(elements).some(element => element.contains(evt.target as Node));
|
|
25
|
-
!isInside && onOutsideClick(evt);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
watchEffect(() => {
|
|
29
|
-
const newElements: HTMLElement[] = [];
|
|
30
|
-
|
|
31
|
-
(Array.isArray(elementRefs) ? elementRefs : [elementRefs]).forEach(elementRef => {
|
|
32
|
-
const element = unrefTemplateElement(elementRef);
|
|
33
|
-
element && newElements.push(element);
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
elements.value = newElements;
|
|
37
|
-
});
|
|
38
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { ComputedRef } from 'vue';
|
|
2
|
-
import { computed, getCurrentInstance } from 'vue';
|
|
3
|
-
|
|
4
|
-
export default function (): ComputedRef<number> {
|
|
5
|
-
const instance = getCurrentInstance();
|
|
6
|
-
|
|
7
|
-
return computed(() => instance?.uid ?? (instance?.proxy as any)._uid ?? 0);
|
|
8
|
-
}
|