@konstructio/ui 0.1.2-alpha.104 → 0.1.2-alpha.106
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AlertDialogTrigger-BGo_acd5.js → AlertDialogTrigger-BOrb536P.js} +39 -39
- package/dist/{Breadcrumb-Cp3abB2w.js → Breadcrumb-DVBxqgW_.js} +2 -2
- package/dist/Checkbox-B20uoUKD.js +249 -0
- package/dist/{CommandInput-BLq69pOT.js → CommandInput-BWt6-vUK.js} +3 -3
- package/dist/{Counter-BV680M5r.js → Counter-DiQb-he2.js} +2 -2
- package/dist/{DayPicker-kweJz134.js → DayPicker-C22j0Y-u.js} +539 -518
- package/dist/{DropdownButton-DfNojmCW.js → DropdownButton-hCVYZ1LA.js} +5 -5
- package/dist/{FlagSelectorList-CkTR3j6O.js → FlagSelectorList-CnJjnsp6.js} +11 -8
- package/dist/{HamburgerTrigger-DRylBL2d.js → HamburgerTrigger-BT2yUUJ-.js} +2 -2
- package/dist/{ImageUpload-DiwymQcU.js → ImageUpload-DgCBCa5X.js} +1 -1
- package/dist/{Input-Cf44DzfE.js → Input-wp-rsCmX.js} +2 -2
- package/dist/{Modal-Dyn088X7.js → Modal-CkAf9UY7.js} +3 -3
- package/dist/{Switch-aPhL5rNG.js → Switch-CyJXptgc.js} +80 -77
- package/dist/{Toast-3NEz7LLa.js → Toast-DLJDExxw.js} +7 -6
- package/dist/{Wrapper-DP6Sxngx.js → Wrapper-B8Ja3k4j.js} +63 -63
- package/dist/{Wrapper-CVJSuYWx.js → Wrapper-CvDRHgN4.js} +3 -3
- package/dist/Wrapper-R8fik3ah.js +182 -0
- package/dist/components/Alert/Alert.js +1 -1
- package/dist/components/AlertDialog/AlertDialog.js +1 -1
- package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
- package/dist/components/AlertDialog/components/index.js +1 -1
- package/dist/components/Autocomplete/hooks/useAutocomplete.js +27 -25
- package/dist/components/Autocomplete/hooks/useNavigationList.js +2 -3
- package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
- package/dist/components/Breadcrumb/components/BackButton/BackButton.js +1 -1
- package/dist/components/Breadcrumb/components/Item/Item.js +1 -1
- package/dist/components/Breadcrumb/hooks/useBreadcrumb.js +1 -1
- package/dist/components/ButtonGroup/ButtonGroup.js +1 -1
- package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.js +1 -1
- package/dist/components/Checkbox/Checkbox.js +1 -1
- package/dist/components/Command/Command.js +1 -1
- package/dist/components/Command/components/Command.js +1 -1
- package/dist/components/Command/components/CommandEmpty.js +1 -1
- package/dist/components/Command/components/CommandGroup.js +1 -1
- package/dist/components/Command/components/CommandInput.js +1 -1
- package/dist/components/Command/components/CommandItem.js +1 -1
- package/dist/components/Command/components/CommandList.js +1 -1
- package/dist/components/Command/components/CommandSeparator.js +1 -1
- package/dist/components/Command/components/DialogContent.js +2 -2
- package/dist/components/Command/components/DialogOverlay.js +1 -1
- package/dist/components/Command/components/index.js +1 -1
- package/dist/components/Counter/Counter.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarMonth/CalendarMonth.js +2 -2
- package/dist/components/DateRangePicker/components/CalendarPanel/components/IndependentModeCalendar/IndependentModeCalendar.js +2 -2
- package/dist/components/DateRangePicker/components/CalendarPanel/components/TogetherModeCalendar/TogetherModeCalendar.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/constants/dayPickerClassNames.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/constants/index.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/hooks/index.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useIndependentCarousel.js +30 -28
- package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useTogetherCarousel.js +23 -21
- package/dist/components/DateRangePicker/components/CalendarPanel/utils/index.js +1 -1
- package/dist/components/DateRangePicker/components/DateTimeInputs/components/EndInputFields/EndInputFields.js +1 -1
- package/dist/components/DateRangePicker/components/DateTimeInputs/components/StartInputFields/StartInputFields.js +1 -1
- package/dist/components/Datepicker/DatePicker.js +1 -1
- package/dist/components/Drawer/Drawer.js +27 -25
- package/dist/components/DropdownButton/DropdownButton.js +1 -1
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.hook.js +51 -36
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +40 -38
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.hook.js +1 -1
- package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.hook.js +1 -1
- package/dist/components/Filter/components/FilterDropdown/FilterDropdown.js +1 -1
- package/dist/components/Filter/components/TextMultiSelect/TextMultiSelect.js +42 -40
- package/dist/components/Filter/utils/index.js +1 -1
- package/dist/components/ImageUpload/ImageUpload.js +1 -1
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/LineChart/LineChart.js +1 -1
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/Modal/components/Wrapper/Wrapper.js +1 -1
- package/dist/components/Modal/components/index.js +1 -1
- package/dist/components/MultiSelectDropdown/MultiSelectDropdown.js +1 -1
- package/dist/components/MultiSelectDropdown/components/List/List.js +1 -1
- package/dist/components/MultiSelectDropdown/components/Wrapper/Wrapper.js +1 -1
- package/dist/components/MultiSelectDropdown/components/index.js +1 -1
- package/dist/components/MultiSelectDropdown/hooks/useMultiSelectDropdown.js +11 -11
- package/dist/components/PhoneNumberInput/PhoneNumberInput.js +2 -2
- package/dist/components/PhoneNumberInput/components/FlagSelectorList/FlagSelectorList.js +1 -1
- package/dist/components/PhoneNumberInput/components/FlagSelectorWrapper/FlagSelectorWrapper.js +2 -2
- package/dist/components/PhoneNumberInput/components/TruncateText/TruncateText.js +3 -3
- package/dist/components/PhoneNumberInput/components/Wrapper.js +1 -1
- package/dist/components/PhoneNumberInput/components/index.js +2 -2
- package/dist/components/PhoneNumberInput/contexts/index.js +1 -1
- package/dist/components/PhoneNumberInput/contexts/phone-number.provider.js +1 -1
- package/dist/components/PhoneNumberInput/utils/index.js +1 -1
- package/dist/components/PieChart/PieChart.js +30 -27
- package/dist/components/Range/Range.js +1 -1
- package/dist/components/Select/Select.js +36 -33
- package/dist/components/Select/components/List/List.js +31 -31
- package/dist/components/Select/components/Wrapper.js +1 -1
- package/dist/components/Select/components/index.js +1 -1
- package/dist/components/Select/hooks/useNavigationList.js +2 -3
- package/dist/components/Select/hooks/useSelect.js +29 -41
- package/dist/components/Sidebar/components/HamburgerTrigger/HamburgerTrigger.js +1 -1
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.js +1 -1
- package/dist/components/Sidebar/components/Wrapper/Wrapper.js +1 -1
- package/dist/components/Sidebar/components/index.js +1 -1
- package/dist/components/Slider/Slider.js +1 -1
- package/dist/components/Switch/Switch.js +1 -1
- package/dist/components/Switch/Switch.variants.js +15 -7
- package/dist/components/Table/components/Filter.js +1 -1
- package/dist/components/Tabs/Tabs.js +1 -1
- package/dist/components/Tabs/components/Content.js +1 -1
- package/dist/components/Tabs/components/List.js +1 -1
- package/dist/components/Tabs/components/Trigger.js +1 -1
- package/dist/components/TagSelect/TagSelect.js +1 -1
- package/dist/components/TagSelect/components/Wrapper/Wrapper.js +1 -1
- package/dist/components/TagSelect/components/index.js +1 -1
- package/dist/components/TagSelect/hooks/useTagSelect.js +11 -11
- package/dist/components/TimePicker/components/Wrapper/Wrapper.js +16 -16
- package/dist/components/Toast/Toast.js +1 -1
- package/dist/components/Tooltip/Tooltip.js +1 -1
- package/dist/components/Typography/Typography.js +19 -16
- package/dist/components/VirtualizedTable/VirtualizedTable.js +1 -1
- package/dist/components/VirtualizedTable/components/Body/Body.js +1 -1
- package/dist/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.js +1 -1
- package/dist/components/VirtualizedTable/components/Filter/Filter.js +3 -3
- package/dist/components/VirtualizedTable/components/FormPaginate/FormPaginate.js +1 -1
- package/dist/components/VirtualizedTable/components/Header/Header.js +1 -1
- package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.js +2 -2
- package/dist/components/VirtualizedTable/contexts/index.js +1 -1
- package/dist/components/VirtualizedTable/contexts/table.provider.js +1 -1
- package/dist/components/index.js +10 -10
- package/dist/{components-Cf345jTv.js → components-MnxnhLqM.js} +1 -1
- package/dist/{constants-CxJJRVK3.js → constants-CSsr7_YV.js} +1 -1
- package/dist/{debounce-C5Ycjilj.js → debounce-BdyZeJQk.js} +2 -2
- package/dist/{dist-BaPW7qXd2.js → dist-B6ExqXM_2.js} +1 -1
- package/dist/{dist-BZNE2Tnx.js → dist-BbX4Nrk2.js} +1 -1
- package/dist/{dist-BdobXn93.js → dist-C87gsBDM.js} +1 -1
- package/dist/{dist-DDck_2lb.js → dist-CqNOgbfR.js} +117 -116
- package/dist/{dist-C3YVLapk.js → dist-DO3apbIh.js} +24 -24
- package/dist/{dist-CzKqHuqJ2.js → dist-DwxO2RoR2.js} +38 -38
- package/dist/{dist-DFCz63oC2.js → dist-Z0F27ATp2.js} +157 -158
- package/dist/{dist-AihTpWdF.js → dist-iUAHw-3y.js} +272 -272
- package/dist/{dist-tGUUcv8n.js → dist-oJzmvhAb.js} +114 -115
- package/dist/{dist-BlPTJNIm.js → dist-ut_BEHii.js} +1 -1
- package/dist/es2015-B_07N-UL.js +796 -0
- package/dist/index.js +10 -10
- package/dist/{isObject-BeFFiVJK.js → isObject-pLoSfdr0.js} +1 -1
- package/dist/lib/components/Checkbox/Checkbox.d.ts +1 -1
- package/dist/lib/components/Checkbox/Checkbox.types.d.ts +2 -1
- package/dist/lib/components/Select/hooks/useSelect.d.ts +1 -3
- package/dist/lib/components/Switch/Switch.variants.d.ts +3 -1
- package/dist/{libphonenumber-hGupNnJu.js → libphonenumber-BMq3Thej.js} +356 -347
- package/dist/package.json +21 -21
- package/dist/{phone-number.provider-BxQCTxp8.js → phone-number.provider-Dkq_p1Gi.js} +2 -2
- package/dist/{prop-types-CfEYxTbR.js → prop-types-BCUW56rg.js} +1 -1
- package/dist/{react-CvUtBTMg.js → react-B6Nc0Fib.js} +835 -827
- package/dist/{rolldown-runtime-Ck3dxwZt.js → rolldown-runtime-Dw9YIBcH.js} +1 -1
- package/dist/styles.css +1 -1
- package/dist/{table.provider-B0BafHuU.js → table.provider-DfZ74xMZ.js} +95 -95
- package/dist/{useBreadcrumb-DYfZL_2p.js → useBreadcrumb-Ds_9BeFz.js} +7 -6
- package/dist/{utils-B-BTGYA5.js → utils-DVYdP0CJ.js} +2 -3
- package/dist/{x-BI9jmc7e.js → x-Ierxf0uI.js} +2 -2
- package/package.json +21 -21
- package/dist/Checkbox-B_ngk9Dj.js +0 -249
- package/dist/Wrapper-BhqUVI1G.js +0 -171
- package/dist/es2015-DigR3dar.js +0 -795
|
@@ -117,51 +117,51 @@ function ft(t) {
|
|
|
117
117
|
}
|
|
118
118
|
function kt(t, e, n) {
|
|
119
119
|
let { reference: r, floating: i } = t;
|
|
120
|
-
const o = N(e), s = Et(e), c = St(s), l = U(e), u = o === "y",
|
|
121
|
-
let
|
|
120
|
+
const o = N(e), s = Et(e), c = St(s), l = U(e), u = o === "y", f = r.x + r.width / 2 - i.width / 2, d = r.y + r.height / 2 - i.height / 2, p = r[c] / 2 - i[c] / 2;
|
|
121
|
+
let a;
|
|
122
122
|
switch (l) {
|
|
123
123
|
case "top":
|
|
124
|
-
|
|
125
|
-
x:
|
|
124
|
+
a = {
|
|
125
|
+
x: f,
|
|
126
126
|
y: r.y - i.height
|
|
127
127
|
};
|
|
128
128
|
break;
|
|
129
129
|
case "bottom":
|
|
130
|
-
|
|
131
|
-
x:
|
|
130
|
+
a = {
|
|
131
|
+
x: f,
|
|
132
132
|
y: r.y + r.height
|
|
133
133
|
};
|
|
134
134
|
break;
|
|
135
135
|
case "right":
|
|
136
|
-
|
|
136
|
+
a = {
|
|
137
137
|
x: r.x + r.width,
|
|
138
|
-
y:
|
|
138
|
+
y: d
|
|
139
139
|
};
|
|
140
140
|
break;
|
|
141
141
|
case "left":
|
|
142
|
-
|
|
142
|
+
a = {
|
|
143
143
|
x: r.x - i.width,
|
|
144
|
-
y:
|
|
144
|
+
y: d
|
|
145
145
|
};
|
|
146
146
|
break;
|
|
147
147
|
default:
|
|
148
|
-
|
|
148
|
+
a = {
|
|
149
149
|
x: r.x,
|
|
150
150
|
y: r.y
|
|
151
151
|
};
|
|
152
152
|
}
|
|
153
|
-
const
|
|
154
|
-
return
|
|
153
|
+
const m = et(e);
|
|
154
|
+
return m && (a[s] += p * (m === "end" ? 1 : -1) * (n && u ? -1 : 1)), a;
|
|
155
155
|
}
|
|
156
156
|
async function De(t, e) {
|
|
157
157
|
var n;
|
|
158
158
|
e === void 0 && (e = {});
|
|
159
|
-
const { x: r, y: i, platform: o, rects: s, elements: c, strategy: l } = t, { boundary: u = "clippingAncestors", rootBoundary:
|
|
159
|
+
const { x: r, y: i, platform: o, rects: s, elements: c, strategy: l } = t, { boundary: u = "clippingAncestors", rootBoundary: f = "viewport", elementContext: d = "floating", altBoundary: p = !1, padding: a = 0 } = Y(e, t), m = qt(a), h = c[p ? d === "floating" ? "reference" : "floating" : d], g = ft(await o.getClippingRect({
|
|
160
160
|
element: (n = await (o.isElement == null ? void 0 : o.isElement(h))) == null || n ? h : h.contextElement || await (o.getDocumentElement == null ? void 0 : o.getDocumentElement(c.floating)),
|
|
161
161
|
boundary: u,
|
|
162
|
-
rootBoundary:
|
|
162
|
+
rootBoundary: f,
|
|
163
163
|
strategy: l
|
|
164
|
-
})), w =
|
|
164
|
+
})), w = d === "floating" ? {
|
|
165
165
|
x: r,
|
|
166
166
|
y: i,
|
|
167
167
|
width: s.floating.width,
|
|
@@ -176,10 +176,10 @@ async function De(t, e) {
|
|
|
176
176
|
strategy: l
|
|
177
177
|
}) : w);
|
|
178
178
|
return {
|
|
179
|
-
top: (g.top - y.top +
|
|
180
|
-
bottom: (y.bottom - g.bottom +
|
|
181
|
-
left: (g.left - y.left +
|
|
182
|
-
right: (y.right - g.right +
|
|
179
|
+
top: (g.top - y.top + m.top) / b.y,
|
|
180
|
+
bottom: (y.bottom - g.bottom + m.bottom) / b.y,
|
|
181
|
+
left: (g.left - y.left + m.left) / b.x,
|
|
182
|
+
right: (y.right - g.right + m.right) / b.x
|
|
183
183
|
};
|
|
184
184
|
}
|
|
185
185
|
var Me = 50, _e = async (t, e, n) => {
|
|
@@ -191,18 +191,18 @@ var Me = 50, _e = async (t, e, n) => {
|
|
|
191
191
|
reference: t,
|
|
192
192
|
floating: e,
|
|
193
193
|
strategy: i
|
|
194
|
-
}), { x:
|
|
195
|
-
const
|
|
194
|
+
}), { x: f, y: d } = kt(u, r, l), p = r, a = 0;
|
|
195
|
+
const m = {};
|
|
196
196
|
for (let h = 0; h < o.length; h++) {
|
|
197
197
|
const g = o[h];
|
|
198
198
|
if (!g) continue;
|
|
199
199
|
const { name: w, fn: v } = g, { x: b, y, data: R, reset: x } = await v({
|
|
200
|
-
x:
|
|
201
|
-
y:
|
|
200
|
+
x: f,
|
|
201
|
+
y: d,
|
|
202
202
|
initialPlacement: r,
|
|
203
203
|
placement: p,
|
|
204
204
|
strategy: i,
|
|
205
|
-
middlewareData:
|
|
205
|
+
middlewareData: m,
|
|
206
206
|
rects: u,
|
|
207
207
|
platform: c,
|
|
208
208
|
elements: {
|
|
@@ -210,39 +210,39 @@ var Me = 50, _e = async (t, e, n) => {
|
|
|
210
210
|
floating: e
|
|
211
211
|
}
|
|
212
212
|
});
|
|
213
|
-
|
|
214
|
-
...
|
|
213
|
+
f = b ?? f, d = y ?? d, m[w] = {
|
|
214
|
+
...m[w],
|
|
215
215
|
...R
|
|
216
|
-
}, x &&
|
|
216
|
+
}, x && a < Me && (a++, typeof x == "object" && (x.placement && (p = x.placement), x.rects && (u = x.rects === !0 ? await s.getElementRects({
|
|
217
217
|
reference: t,
|
|
218
218
|
floating: e,
|
|
219
219
|
strategy: i
|
|
220
|
-
}) : x.rects), { x:
|
|
220
|
+
}) : x.rects), { x: f, y: d } = kt(u, p, l)), h = -1);
|
|
221
221
|
}
|
|
222
222
|
return {
|
|
223
|
-
x:
|
|
224
|
-
y:
|
|
223
|
+
x: f,
|
|
224
|
+
y: d,
|
|
225
225
|
placement: p,
|
|
226
226
|
strategy: i,
|
|
227
|
-
middlewareData:
|
|
227
|
+
middlewareData: m
|
|
228
228
|
};
|
|
229
229
|
}, Fe = (t) => ({
|
|
230
230
|
name: "arrow",
|
|
231
231
|
options: t,
|
|
232
232
|
async fn(e) {
|
|
233
|
-
const { x: n, y: r, placement: i, rects: o, platform: s, elements: c, middlewareData: l } = e, { element: u, padding:
|
|
233
|
+
const { x: n, y: r, placement: i, rects: o, platform: s, elements: c, middlewareData: l } = e, { element: u, padding: f = 0 } = Y(t, e) || {};
|
|
234
234
|
if (u == null) return {};
|
|
235
|
-
const
|
|
235
|
+
const d = qt(f), p = {
|
|
236
236
|
x: n,
|
|
237
237
|
y: r
|
|
238
|
-
},
|
|
238
|
+
}, a = Et(i), m = St(a), h = await s.getDimensions(u), g = a === "y", w = g ? "top" : "left", v = g ? "bottom" : "right", b = g ? "clientHeight" : "clientWidth", y = o.reference[m] + o.reference[a] - p[a] - o.floating[m], R = p[a] - o.reference[a], x = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(u));
|
|
239
239
|
let A = x ? x[b] : 0;
|
|
240
|
-
(!A || !await (s.isElement == null ? void 0 : s.isElement(x))) && (A = c.floating[b] || o.floating[
|
|
241
|
-
const C = y / 2 - R / 2, D = A / 2 - h[
|
|
240
|
+
(!A || !await (s.isElement == null ? void 0 : s.isElement(x))) && (A = c.floating[b] || o.floating[m]);
|
|
241
|
+
const C = y / 2 - R / 2, D = A / 2 - h[m] / 2 - 1, $ = K(d[w], D), k = K(d[v], D), H = A - h[m] - k, T = A / 2 - h[m] / 2 + C, S = Yt($, T, H), F = !l.arrow && et(i) != null && T !== S && o.reference[m] / 2 - (T < $ ? $ : k) - h[m] / 2 < 0, E = F ? T < $ ? T - $ : T - H : 0;
|
|
242
242
|
return {
|
|
243
|
-
[
|
|
243
|
+
[a]: p[a] + E,
|
|
244
244
|
data: {
|
|
245
|
-
[
|
|
245
|
+
[a]: S,
|
|
246
246
|
centerOffset: T - S - E,
|
|
247
247
|
...F && { alignmentOffset: E }
|
|
248
248
|
},
|
|
@@ -255,13 +255,13 @@ var Me = 50, _e = async (t, e, n) => {
|
|
|
255
255
|
options: t,
|
|
256
256
|
async fn(e) {
|
|
257
257
|
var n, r;
|
|
258
|
-
const { placement: i, middlewareData: o, rects: s, initialPlacement: c, platform: l, elements: u } = e, { mainAxis:
|
|
258
|
+
const { placement: i, middlewareData: o, rects: s, initialPlacement: c, platform: l, elements: u } = e, { mainAxis: f = !0, crossAxis: d = !0, fallbackPlacements: p, fallbackStrategy: a = "bestFit", fallbackAxisSideDirection: m = "none", flipAlignment: h = !0, ...g } = Y(t, e);
|
|
259
259
|
if ((n = o.arrow) != null && n.alignmentOffset) return {};
|
|
260
|
-
const w = U(i), v = N(c), b = U(c) === c, y = await (l.isRTL == null ? void 0 : l.isRTL(u.floating)), R = p || (b || !h ? [at(c)] : Ce(c)), x =
|
|
261
|
-
!p && x && R.push(...Te(c, h,
|
|
260
|
+
const w = U(i), v = N(c), b = U(c) === c, y = await (l.isRTL == null ? void 0 : l.isRTL(u.floating)), R = p || (b || !h ? [at(c)] : Ce(c)), x = m !== "none";
|
|
261
|
+
!p && x && R.push(...Te(c, h, m, y));
|
|
262
262
|
const A = [c, ...R], C = await l.detectOverflow(e, g), D = [];
|
|
263
263
|
let $ = ((r = o.flip) == null ? void 0 : r.overflows) || [];
|
|
264
|
-
if (
|
|
264
|
+
if (f && D.push(C[w]), d) {
|
|
265
265
|
const S = Oe(i, s, y);
|
|
266
266
|
D.push(C[S[0]], C[S[1]]);
|
|
267
267
|
}
|
|
@@ -271,7 +271,7 @@ var Me = 50, _e = async (t, e, n) => {
|
|
|
271
271
|
}], !D.every((S) => S <= 0)) {
|
|
272
272
|
var k, H;
|
|
273
273
|
const S = (((k = o.flip) == null ? void 0 : k.index) || 0) + 1, F = A[S];
|
|
274
|
-
if (F && (!(
|
|
274
|
+
if (F && (!(d === "alignment" && v !== N(F)) || $.every((M) => N(M.placement) === v ? M.overflows[0] > 0 : !0)))
|
|
275
275
|
return {
|
|
276
276
|
data: {
|
|
277
277
|
index: S,
|
|
@@ -280,7 +280,7 @@ var Me = 50, _e = async (t, e, n) => {
|
|
|
280
280
|
reset: { placement: F }
|
|
281
281
|
};
|
|
282
282
|
let E = (H = $.filter((M) => M.overflows[0] <= 0).sort((M, P) => M.overflows[1] - P.overflows[1])[0]) == null ? void 0 : H.placement;
|
|
283
|
-
if (!E) switch (
|
|
283
|
+
if (!E) switch (a) {
|
|
284
284
|
case "bestFit": {
|
|
285
285
|
var T;
|
|
286
286
|
const M = (T = $.filter((P) => {
|
|
@@ -295,7 +295,6 @@ var Me = 50, _e = async (t, e, n) => {
|
|
|
295
295
|
}
|
|
296
296
|
case "initialPlacement":
|
|
297
297
|
E = c;
|
|
298
|
-
break;
|
|
299
298
|
}
|
|
300
299
|
if (i !== E) return { reset: { placement: E } };
|
|
301
300
|
}
|
|
@@ -348,22 +347,22 @@ var ke = function(t) {
|
|
|
348
347
|
};
|
|
349
348
|
}, Kt = /* @__PURE__ */ new Set(["left", "top"]);
|
|
350
349
|
async function He(t, e) {
|
|
351
|
-
const { placement: n, platform: r, elements: i } = t, o = await (r.isRTL == null ? void 0 : r.isRTL(i.floating)), s = U(n), c = et(n), l = N(n) === "y", u = Kt.has(s) ? -1 : 1,
|
|
352
|
-
let { mainAxis: p, crossAxis:
|
|
353
|
-
mainAxis:
|
|
350
|
+
const { placement: n, platform: r, elements: i } = t, o = await (r.isRTL == null ? void 0 : r.isRTL(i.floating)), s = U(n), c = et(n), l = N(n) === "y", u = Kt.has(s) ? -1 : 1, f = o && l ? -1 : 1, d = Y(e, t);
|
|
351
|
+
let { mainAxis: p, crossAxis: a, alignmentAxis: m } = typeof d == "number" ? {
|
|
352
|
+
mainAxis: d,
|
|
354
353
|
crossAxis: 0,
|
|
355
354
|
alignmentAxis: null
|
|
356
355
|
} : {
|
|
357
|
-
mainAxis:
|
|
358
|
-
crossAxis:
|
|
359
|
-
alignmentAxis:
|
|
356
|
+
mainAxis: d.mainAxis || 0,
|
|
357
|
+
crossAxis: d.crossAxis || 0,
|
|
358
|
+
alignmentAxis: d.alignmentAxis
|
|
360
359
|
};
|
|
361
|
-
return c && typeof
|
|
362
|
-
x:
|
|
360
|
+
return c && typeof m == "number" && (a = c === "end" ? m * -1 : m), l ? {
|
|
361
|
+
x: a * f,
|
|
363
362
|
y: p * u
|
|
364
363
|
} : {
|
|
365
364
|
x: p * u,
|
|
366
|
-
y:
|
|
365
|
+
y: a * f
|
|
367
366
|
};
|
|
368
367
|
}
|
|
369
368
|
var Ne = function(t) {
|
|
@@ -394,16 +393,16 @@ var Ne = function(t) {
|
|
|
394
393
|
x: b,
|
|
395
394
|
y
|
|
396
395
|
};
|
|
397
|
-
} }, ...u } = Y(t, e),
|
|
396
|
+
} }, ...u } = Y(t, e), f = {
|
|
398
397
|
x: n,
|
|
399
398
|
y: r
|
|
400
|
-
},
|
|
401
|
-
let
|
|
402
|
-
const g = (v, b) => Yt(b +
|
|
403
|
-
s && (
|
|
399
|
+
}, d = await o.detectOverflow(e, u), p = N(i), a = Ct(p);
|
|
400
|
+
let m = f[a], h = f[p];
|
|
401
|
+
const g = (v, b) => Yt(b + d[v === "y" ? "top" : "left"], b, b - d[v === "y" ? "bottom" : "right"]);
|
|
402
|
+
s && (m = g(a, m)), c && (h = g(p, h));
|
|
404
403
|
const w = l.fn({
|
|
405
404
|
...e,
|
|
406
|
-
[
|
|
405
|
+
[a]: m,
|
|
407
406
|
[p]: h
|
|
408
407
|
});
|
|
409
408
|
return {
|
|
@@ -412,7 +411,7 @@ var Ne = function(t) {
|
|
|
412
411
|
x: w.x - n,
|
|
413
412
|
y: w.y - r,
|
|
414
413
|
enabled: {
|
|
415
|
-
[
|
|
414
|
+
[a]: s,
|
|
416
415
|
[p]: c
|
|
417
416
|
}
|
|
418
417
|
}
|
|
@@ -424,11 +423,11 @@ var Ne = function(t) {
|
|
|
424
423
|
options: t,
|
|
425
424
|
fn(e) {
|
|
426
425
|
var n, r;
|
|
427
|
-
const { x: i, y: o, placement: s, rects: c, middlewareData: l } = e, { offset: u = 0, mainAxis:
|
|
426
|
+
const { x: i, y: o, placement: s, rects: c, middlewareData: l } = e, { offset: u = 0, mainAxis: f = !0, crossAxis: d = !0 } = Y(t, e), p = {
|
|
428
427
|
x: i,
|
|
429
428
|
y: o
|
|
430
|
-
},
|
|
431
|
-
let h = p[
|
|
429
|
+
}, a = N(s), m = Ct(a);
|
|
430
|
+
let h = p[m], g = p[a];
|
|
432
431
|
const w = Y(u, e), v = typeof w == "number" ? {
|
|
433
432
|
mainAxis: w,
|
|
434
433
|
crossAxis: 0
|
|
@@ -436,18 +435,18 @@ var Ne = function(t) {
|
|
|
436
435
|
mainAxis: (n = w.mainAxis) != null ? n : 0,
|
|
437
436
|
crossAxis: (r = w.crossAxis) != null ? r : 0
|
|
438
437
|
};
|
|
439
|
-
if (
|
|
440
|
-
const R =
|
|
438
|
+
if (f) {
|
|
439
|
+
const R = m === "y" ? "height" : "width", x = c.reference[m] - c.floating[R] + v.mainAxis, A = c.reference[m] + c.reference[R] - v.mainAxis;
|
|
441
440
|
h < x ? h = x : h > A && (h = A);
|
|
442
441
|
}
|
|
443
|
-
if (
|
|
442
|
+
if (d) {
|
|
444
443
|
var b, y;
|
|
445
|
-
const R =
|
|
444
|
+
const R = m === "y" ? "width" : "height", x = Kt.has(U(s)), A = c.reference[a] - c.floating[R] + (x && ((b = l.offset) == null ? void 0 : b[a]) || 0) + (x ? 0 : v.crossAxis), C = c.reference[a] + c.reference[R] + (x ? 0 : ((y = l.offset) == null ? void 0 : y[a]) || 0) - (x ? v.crossAxis : 0);
|
|
446
445
|
g < A ? g = A : g > C && (g = C);
|
|
447
446
|
}
|
|
448
447
|
return {
|
|
449
|
-
[
|
|
450
|
-
[
|
|
448
|
+
[m]: h,
|
|
449
|
+
[a]: g
|
|
451
450
|
};
|
|
452
451
|
}
|
|
453
452
|
};
|
|
@@ -457,18 +456,18 @@ var Ne = function(t) {
|
|
|
457
456
|
options: t,
|
|
458
457
|
async fn(e) {
|
|
459
458
|
const { placement: n, rects: r, platform: i, elements: o } = e, { apply: s = () => {
|
|
460
|
-
}, ...c } = Y(t, e), l = await i.detectOverflow(e, c), u = U(n),
|
|
461
|
-
let
|
|
462
|
-
u === "top" || u === "bottom" ? (
|
|
463
|
-
const g =
|
|
459
|
+
}, ...c } = Y(t, e), l = await i.detectOverflow(e, c), u = U(n), f = et(n), d = N(n) === "y", { width: p, height: a } = r.floating;
|
|
460
|
+
let m, h;
|
|
461
|
+
u === "top" || u === "bottom" ? (m = u, h = f === (await (i.isRTL == null ? void 0 : i.isRTL(o.floating)) ? "start" : "end") ? "left" : "right") : (h = u, m = f === "end" ? "top" : "bottom");
|
|
462
|
+
const g = a - l.top - l.bottom, w = p - l.left - l.right, v = K(a - l[m], g), b = K(p - l[h], w), y = e.middlewareData.shift, R = !y;
|
|
464
463
|
let x = v, A = b;
|
|
465
|
-
y != null && y.enabled.x && (A = w), y != null && y.enabled.y && (x = g), R && !
|
|
464
|
+
y != null && y.enabled.x && (A = w), y != null && y.enabled.y && (x = g), R && !f && (d ? A = p - 2 * I(l.left, l.right) : x = a - 2 * I(l.top, l.bottom)), await s({
|
|
466
465
|
...e,
|
|
467
466
|
availableWidth: A,
|
|
468
467
|
availableHeight: x
|
|
469
468
|
});
|
|
470
469
|
const C = await i.getDimensions(o.floating);
|
|
471
|
-
return p !== C.width ||
|
|
470
|
+
return p !== C.width || a !== C.height ? { reset: { rects: !0 } } : {};
|
|
472
471
|
}
|
|
473
472
|
};
|
|
474
473
|
};
|
|
@@ -609,18 +608,18 @@ function Q(t, e, n, r) {
|
|
|
609
608
|
let s = j(1);
|
|
610
609
|
e && (r ? z(r) && (s = tt(r)) : s = tt(t));
|
|
611
610
|
const c = Ke(o, n, r) ? Jt(o) : j(0);
|
|
612
|
-
let l = (i.left + c.x) / s.x, u = (i.top + c.y) / s.y,
|
|
611
|
+
let l = (i.left + c.x) / s.x, u = (i.top + c.y) / s.y, f = i.width / s.x, d = i.height / s.y;
|
|
613
612
|
if (o && r) {
|
|
614
|
-
const p = _(o),
|
|
615
|
-
let
|
|
616
|
-
for (; h &&
|
|
613
|
+
const p = _(o), a = z(r) ? _(r) : r;
|
|
614
|
+
let m = p, h = Pt(m);
|
|
615
|
+
for (; h && a !== m; ) {
|
|
617
616
|
const g = tt(h), w = h.getBoundingClientRect(), v = B(h), b = w.left + (h.clientLeft + parseFloat(v.paddingLeft)) * g.x, y = w.top + (h.clientTop + parseFloat(v.paddingTop)) * g.y;
|
|
618
|
-
l *= g.x, u *= g.y,
|
|
617
|
+
l *= g.x, u *= g.y, f *= g.x, d *= g.y, l += b, u += y, m = _(h), h = Pt(m);
|
|
619
618
|
}
|
|
620
619
|
}
|
|
621
620
|
return ft({
|
|
622
|
-
width:
|
|
623
|
-
height:
|
|
621
|
+
width: f,
|
|
622
|
+
height: d,
|
|
624
623
|
x: l,
|
|
625
624
|
y: u
|
|
626
625
|
});
|
|
@@ -644,17 +643,17 @@ function Ue(t) {
|
|
|
644
643
|
scrollLeft: 0,
|
|
645
644
|
scrollTop: 0
|
|
646
645
|
}, u = j(1);
|
|
647
|
-
const
|
|
648
|
-
if ((
|
|
649
|
-
const
|
|
650
|
-
u = tt(r),
|
|
646
|
+
const f = j(0), d = Z(r);
|
|
647
|
+
if ((d || !o) && ((nt(r) !== "body" || mt(s)) && (l = ht(r)), d)) {
|
|
648
|
+
const a = Q(r);
|
|
649
|
+
u = tt(r), f.x = a.x + r.clientLeft, f.y = a.y + r.clientTop;
|
|
651
650
|
}
|
|
652
|
-
const p = s && !
|
|
651
|
+
const p = s && !d && !o ? Qt(s, l) : j(0);
|
|
653
652
|
return {
|
|
654
653
|
width: n.width * u.x,
|
|
655
654
|
height: n.height * u.y,
|
|
656
|
-
x: n.x * u.x - l.scrollLeft * u.x +
|
|
657
|
-
y: n.y * u.y - l.scrollTop * u.y +
|
|
655
|
+
x: n.x * u.x - l.scrollLeft * u.x + f.x + p.x,
|
|
656
|
+
y: n.y * u.y - l.scrollTop * u.y + f.y + p.y
|
|
658
657
|
};
|
|
659
658
|
}
|
|
660
659
|
function Ze(t) {
|
|
@@ -675,20 +674,20 @@ var Je = 25;
|
|
|
675
674
|
function Qe(t, e, n) {
|
|
676
675
|
n === void 0 && (n = "viewport");
|
|
677
676
|
const r = n === "layoutViewport", i = _(t), o = q(t), s = i.visualViewport;
|
|
678
|
-
let c = o.clientWidth, l = o.clientHeight, u = 0,
|
|
677
|
+
let c = o.clientWidth, l = o.clientHeight, u = 0, f = 0;
|
|
679
678
|
if (s) {
|
|
680
|
-
const
|
|
681
|
-
r ?
|
|
679
|
+
const d = !Tt() || e === "fixed";
|
|
680
|
+
r ? d || (u = -s.offsetLeft, f = -s.offsetTop) : (c = s.width, l = s.height, d && (u = s.offsetLeft, f = s.offsetTop));
|
|
682
681
|
}
|
|
683
682
|
if (gt(o) <= 0) {
|
|
684
|
-
const
|
|
683
|
+
const d = o.ownerDocument, p = d.body, a = getComputedStyle(p), m = d.compatMode === "CSS1Compat" && parseFloat(a.marginLeft) + parseFloat(a.marginRight) || 0, h = Math.abs(o.clientWidth - p.clientWidth - m), g = getComputedStyle(o).scrollbarGutter === "stable both-edges" ? h / 2 : h;
|
|
685
684
|
g <= Je && (c -= g);
|
|
686
685
|
}
|
|
687
686
|
return {
|
|
688
687
|
width: c,
|
|
689
688
|
height: l,
|
|
690
689
|
x: u,
|
|
691
|
-
y:
|
|
690
|
+
y: f
|
|
692
691
|
};
|
|
693
692
|
}
|
|
694
693
|
function tn(t, e) {
|
|
@@ -724,22 +723,22 @@ function en(t, e) {
|
|
|
724
723
|
let s = o ? J(t) : t;
|
|
725
724
|
for (; z(s) && !rt(s); ) {
|
|
726
725
|
const c = B(s), l = Lt(s), u = i ? i.position : o ? "fixed" : "";
|
|
727
|
-
!l && (u === "fixed" || u === "absolute" && c.position === "static") ? r = r.filter((
|
|
726
|
+
!l && (u === "fixed" || u === "absolute" && c.position === "static") ? r = r.filter((f) => f !== s) : i = c, s = J(s);
|
|
728
727
|
}
|
|
729
728
|
return e.set(t, r), r;
|
|
730
729
|
}
|
|
731
730
|
function nn(t) {
|
|
732
731
|
let { element: e, boundary: n, rootBoundary: r, strategy: i } = t;
|
|
733
732
|
const o = [...n === "clippingAncestors" ? pt(e) ? [] : en(e, this._c) : [].concat(n), r], s = Bt(e, o[0], i);
|
|
734
|
-
let c = s.top, l = s.right, u = s.bottom,
|
|
735
|
-
for (let
|
|
736
|
-
const p = Bt(e, o[
|
|
737
|
-
c = I(p.top, c), l = K(p.right, l), u = K(p.bottom, u),
|
|
733
|
+
let c = s.top, l = s.right, u = s.bottom, f = s.left;
|
|
734
|
+
for (let d = 1; d < o.length; d++) {
|
|
735
|
+
const p = Bt(e, o[d], i);
|
|
736
|
+
c = I(p.top, c), l = K(p.right, l), u = K(p.bottom, u), f = I(p.left, f);
|
|
738
737
|
}
|
|
739
738
|
return {
|
|
740
|
-
width: l -
|
|
739
|
+
width: l - f,
|
|
741
740
|
height: u - c,
|
|
742
|
-
x:
|
|
741
|
+
x: f,
|
|
743
742
|
y: c
|
|
744
743
|
};
|
|
745
744
|
}
|
|
@@ -758,8 +757,8 @@ function on(t, e, n) {
|
|
|
758
757
|
};
|
|
759
758
|
const l = j(0);
|
|
760
759
|
if ((r || !o) && ((nt(e) !== "body" || mt(i)) && (c = ht(e)), r)) {
|
|
761
|
-
const
|
|
762
|
-
l.x =
|
|
760
|
+
const f = Q(e, !0, o, e);
|
|
761
|
+
l.x = f.x + e.clientLeft, l.y = f.y + e.clientTop;
|
|
763
762
|
}
|
|
764
763
|
!r && i && (l.x = gt(i));
|
|
765
764
|
const u = i && !r && !o ? Qt(i, c) : j(0);
|
|
@@ -828,22 +827,22 @@ function an(t, e, n) {
|
|
|
828
827
|
let r = null, i;
|
|
829
828
|
const o = q(t);
|
|
830
829
|
function s() {
|
|
831
|
-
var
|
|
832
|
-
clearTimeout(i), (
|
|
830
|
+
var f;
|
|
831
|
+
clearTimeout(i), (f = r) == null || f.disconnect(), r = null;
|
|
833
832
|
}
|
|
834
|
-
function c(
|
|
835
|
-
|
|
836
|
-
const p = t.getBoundingClientRect(), { left:
|
|
837
|
-
if (
|
|
838
|
-
const w = st(
|
|
833
|
+
function c(f, d) {
|
|
834
|
+
f === void 0 && (f = !1), d === void 0 && (d = 1), s();
|
|
835
|
+
const p = t.getBoundingClientRect(), { left: a, top: m, width: h, height: g } = p;
|
|
836
|
+
if (f || e(), !h || !g) return;
|
|
837
|
+
const w = st(m), v = st(o.clientWidth - (a + h)), b = st(o.clientHeight - (m + g)), y = st(a), R = {
|
|
839
838
|
rootMargin: -w + "px " + -v + "px " + -b + "px " + -y + "px",
|
|
840
|
-
threshold: I(0, K(1,
|
|
839
|
+
threshold: I(0, K(1, d)) || 1
|
|
841
840
|
};
|
|
842
841
|
let x = !0;
|
|
843
842
|
function A(C) {
|
|
844
843
|
const D = C[0].intersectionRatio;
|
|
845
844
|
if (!ee(p, t.getBoundingClientRect())) return c();
|
|
846
|
-
if (D !==
|
|
845
|
+
if (D !== d) {
|
|
847
846
|
if (!x) return c();
|
|
848
847
|
D ? c(!1, D) : i = setTimeout(() => {
|
|
849
848
|
c(!1, 1e-7);
|
|
@@ -868,30 +867,30 @@ function an(t, e, n) {
|
|
|
868
867
|
}
|
|
869
868
|
function fn(t, e, n, r) {
|
|
870
869
|
r === void 0 && (r = {});
|
|
871
|
-
const { ancestorScroll: i = !0, ancestorResize: o = !0, elementResize: s = typeof ResizeObserver == "function", layoutShift: c = typeof IntersectionObserver == "function", animationFrame: l = !1 } = r, u = $t(t),
|
|
872
|
-
|
|
870
|
+
const { ancestorScroll: i = !0, ancestorResize: o = !0, elementResize: s = typeof ResizeObserver == "function", layoutShift: c = typeof IntersectionObserver == "function", animationFrame: l = !1 } = r, u = $t(t), f = i || o ? [...u ? ot(u) : [], ...e ? ot(e) : []] : [];
|
|
871
|
+
f.forEach((w) => {
|
|
873
872
|
i && w.addEventListener("scroll", n), o && w.addEventListener("resize", n);
|
|
874
873
|
});
|
|
875
|
-
const
|
|
876
|
-
let p = -1,
|
|
877
|
-
s && (
|
|
874
|
+
const d = u && c ? an(u, n, o) : null;
|
|
875
|
+
let p = -1, a = null;
|
|
876
|
+
s && (a = new ResizeObserver((w) => {
|
|
878
877
|
let [v] = w;
|
|
879
|
-
v && v.target === u &&
|
|
878
|
+
v && v.target === u && a && e && (a.unobserve(e), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
|
|
880
879
|
var b;
|
|
881
|
-
(b =
|
|
880
|
+
(b = a) == null || b.observe(e);
|
|
882
881
|
})), n();
|
|
883
|
-
}), u && !l &&
|
|
884
|
-
let
|
|
882
|
+
}), u && !l && a.observe(u), e && a.observe(e));
|
|
883
|
+
let m, h = l ? Q(t) : null;
|
|
885
884
|
l && g();
|
|
886
885
|
function g() {
|
|
887
886
|
const w = Q(t);
|
|
888
|
-
h && !ee(h, w) && n(), h = w,
|
|
887
|
+
h && !ee(h, w) && n(), h = w, m = requestAnimationFrame(g);
|
|
889
888
|
}
|
|
890
889
|
return n(), () => {
|
|
891
890
|
var w;
|
|
892
|
-
|
|
891
|
+
f.forEach((v) => {
|
|
893
892
|
i && v.removeEventListener("scroll", n), o && v.removeEventListener("resize", n);
|
|
894
|
-
}),
|
|
893
|
+
}), d?.(), (w = a) == null || w.disconnect(), a = null, l && cancelAnimationFrame(m);
|
|
895
894
|
};
|
|
896
895
|
}
|
|
897
896
|
var un = Ne, dn = ze, mn = We, pn = Ve, hn = ke, It = Fe, gn = Be, wn = (t, e, n) => {
|
|
@@ -943,20 +942,20 @@ function At(t) {
|
|
|
943
942
|
}
|
|
944
943
|
function vn(t) {
|
|
945
944
|
t === void 0 && (t = {});
|
|
946
|
-
const { placement: e = "bottom", strategy: n = "absolute", middleware: r = [], platform: i, elements: { reference: o, floating: s } = {}, transform: c = !0, whileElementsMounted: l, open: u } = t, [
|
|
945
|
+
const { placement: e = "bottom", strategy: n = "absolute", middleware: r = [], platform: i, elements: { reference: o, floating: s } = {}, transform: c = !0, whileElementsMounted: l, open: u } = t, [f, d] = O.useState({
|
|
947
946
|
x: 0,
|
|
948
947
|
y: 0,
|
|
949
948
|
strategy: n,
|
|
950
949
|
placement: e,
|
|
951
950
|
middlewareData: {},
|
|
952
951
|
isPositioned: !1
|
|
953
|
-
}), [p,
|
|
954
|
-
ut(p, r) ||
|
|
955
|
-
const [
|
|
952
|
+
}), [p, a] = O.useState(r);
|
|
953
|
+
ut(p, r) || a(r);
|
|
954
|
+
const [m, h] = O.useState(null), [g, w] = O.useState(null), v = O.useCallback((P) => {
|
|
956
955
|
P !== x.current && (x.current = P, h(P));
|
|
957
956
|
}, []), b = O.useCallback((P) => {
|
|
958
957
|
P !== A.current && (A.current = P, w(P));
|
|
959
|
-
}, []), y = o ||
|
|
958
|
+
}, []), y = o || m, R = s || g, x = O.useRef(null), A = O.useRef(null), C = O.useRef(f), D = l != null, $ = At(l), k = At(i), H = At(u), T = O.useCallback(() => {
|
|
960
959
|
if (!x.current || !A.current) return;
|
|
961
960
|
const P = {
|
|
962
961
|
placement: e,
|
|
@@ -969,7 +968,7 @@ function vn(t) {
|
|
|
969
968
|
isPositioned: H.current !== !1
|
|
970
969
|
};
|
|
971
970
|
S.current && !ut(C.current, W) && (C.current = W, Ae.flushSync(() => {
|
|
972
|
-
|
|
971
|
+
d(W);
|
|
973
972
|
}));
|
|
974
973
|
});
|
|
975
974
|
}, [
|
|
@@ -980,7 +979,7 @@ function vn(t) {
|
|
|
980
979
|
H
|
|
981
980
|
]);
|
|
982
981
|
ct(() => {
|
|
983
|
-
u === !1 && C.current.isPositioned && (C.current.isPositioned = !1,
|
|
982
|
+
u === !1 && C.current.isPositioned && (C.current.isPositioned = !1, d((P) => ({
|
|
984
983
|
...P,
|
|
985
984
|
isPositioned: !1
|
|
986
985
|
})));
|
|
@@ -1015,7 +1014,7 @@ function vn(t) {
|
|
|
1015
1014
|
top: 0
|
|
1016
1015
|
};
|
|
1017
1016
|
if (!E.floating) return P;
|
|
1018
|
-
const L = jt(E.floating,
|
|
1017
|
+
const L = jt(E.floating, f.x), W = jt(E.floating, f.y);
|
|
1019
1018
|
return c ? {
|
|
1020
1019
|
...P,
|
|
1021
1020
|
transform: "translate(" + L + "px, " + W + "px)",
|
|
@@ -1029,17 +1028,17 @@ function vn(t) {
|
|
|
1029
1028
|
n,
|
|
1030
1029
|
c,
|
|
1031
1030
|
E.floating,
|
|
1032
|
-
|
|
1033
|
-
|
|
1031
|
+
f.x,
|
|
1032
|
+
f.y
|
|
1034
1033
|
]);
|
|
1035
1034
|
return O.useMemo(() => ({
|
|
1036
|
-
...
|
|
1035
|
+
...f,
|
|
1037
1036
|
update: T,
|
|
1038
1037
|
refs: F,
|
|
1039
1038
|
elements: E,
|
|
1040
1039
|
floatingStyles: M
|
|
1041
1040
|
}), [
|
|
1042
|
-
|
|
1041
|
+
f,
|
|
1043
1042
|
T,
|
|
1044
1043
|
F,
|
|
1045
1044
|
E,
|
|
@@ -1137,36 +1136,36 @@ var xn = (t) => {
|
|
|
1137
1136
|
children: n
|
|
1138
1137
|
});
|
|
1139
1138
|
}, "Popper"), _n = "PopperAnchor", Fn = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ X(function(e, n) {
|
|
1140
|
-
const { __scopePopper: r, virtualRef: i, ...o } = e, s = ie(_n, r), c = O.useRef(null), l = s.onAnchorChange, u =
|
|
1141
|
-
c.current =
|
|
1142
|
-
}, [l])),
|
|
1139
|
+
const { __scopePopper: r, virtualRef: i, ...o } = e, s = ie(_n, r), c = O.useRef(null), l = s.onAnchorChange, u = O.useCallback((h) => {
|
|
1140
|
+
c.current = h, h && l(h);
|
|
1141
|
+
}, [l]), f = Xt(n, u), d = O.useRef(null);
|
|
1143
1142
|
O.useEffect(() => {
|
|
1144
1143
|
if (!i) return;
|
|
1145
|
-
const
|
|
1146
|
-
|
|
1144
|
+
const h = d.current;
|
|
1145
|
+
d.current = i.current, h !== d.current && l(d.current);
|
|
1147
1146
|
});
|
|
1148
|
-
const
|
|
1147
|
+
const p = s.placementState && wt(s.placementState), a = p?.[0], m = p?.[1];
|
|
1149
1148
|
return i ? null : /* @__PURE__ */ V(Ot.div, {
|
|
1150
|
-
"data-radix-popper-side":
|
|
1151
|
-
"data-radix-popper-align":
|
|
1149
|
+
"data-radix-popper-side": a,
|
|
1150
|
+
"data-radix-popper-align": m,
|
|
1152
1151
|
...o,
|
|
1153
|
-
ref:
|
|
1152
|
+
ref: f
|
|
1154
1153
|
});
|
|
1155
1154
|
}, "PopperAnchor")), se = "PopperContent", [Wn, kn] = oe(se), Hn = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ X(function(e, n) {
|
|
1156
|
-
const { __scopePopper: r, side: i = "bottom", sideOffset: o = 0, align: s = "center", alignOffset: c = 0, arrowPadding: l = 0, avoidCollisions: u = !0, collisionBoundary:
|
|
1155
|
+
const { __scopePopper: r, side: i = "bottom", sideOffset: o = 0, align: s = "center", alignOffset: c = 0, arrowPadding: l = 0, avoidCollisions: u = !0, collisionBoundary: f = [], collisionPadding: d = 0, sticky: p = "partial", hideWhenDetached: a = !1, updatePositionStrategy: m = "optimized", onPlaced: h, ...g } = e, w = ie(se, r), [v, b] = O.useState(null), y = Xt(n, b), [R, x] = O.useState(null), A = ye(R), C = A?.width ?? 0, D = A?.height ?? 0, $ = i + (s !== "center" ? "-" + s : ""), k = typeof d == "number" ? d : {
|
|
1157
1156
|
top: 0,
|
|
1158
1157
|
right: 0,
|
|
1159
1158
|
bottom: 0,
|
|
1160
1159
|
left: 0,
|
|
1161
|
-
...
|
|
1162
|
-
}, H = Array.isArray(
|
|
1160
|
+
...d
|
|
1161
|
+
}, H = Array.isArray(f) ? f : [f], T = H.length > 0, S = {
|
|
1163
1162
|
padding: k,
|
|
1164
1163
|
boundary: H.filter(ce),
|
|
1165
1164
|
altBoundary: T
|
|
1166
1165
|
}, { refs: F, floatingStyles: E, placement: M, isPositioned: P, middlewareData: L } = vn({
|
|
1167
1166
|
strategy: "fixed",
|
|
1168
1167
|
placement: $,
|
|
1169
|
-
whileElementsMounted: /* @__PURE__ */ X((...vt) => fn(...vt, { animationFrame:
|
|
1168
|
+
whileElementsMounted: /* @__PURE__ */ X((...vt) => fn(...vt, { animationFrame: m === "always" }), "whileElementsMounted"),
|
|
1170
1169
|
elements: { reference: w.anchor },
|
|
1171
1170
|
middleware: [
|
|
1172
1171
|
yn({
|
|
@@ -1195,7 +1194,7 @@ var xn = (t) => {
|
|
|
1195
1194
|
arrowWidth: C,
|
|
1196
1195
|
arrowHeight: D
|
|
1197
1196
|
}),
|
|
1198
|
-
|
|
1197
|
+
a && On({
|
|
1199
1198
|
strategy: "referenceHidden",
|
|
1200
1199
|
...S,
|
|
1201
1200
|
boundary: T ? S.boundary : void 0
|
|
@@ -1293,15 +1292,15 @@ var Vn = /* @__PURE__ */ X((t) => ({
|
|
|
1293
1292
|
name: "transformOrigin",
|
|
1294
1293
|
options: t,
|
|
1295
1294
|
fn(e) {
|
|
1296
|
-
const { placement: n, rects: r, middlewareData: i } = e, o = i.arrow?.centerOffset !== 0, s = o ? 0 : t.arrowWidth, c = o ? 0 : t.arrowHeight, [l, u] = wt(n),
|
|
1295
|
+
const { placement: n, rects: r, middlewareData: i } = e, o = i.arrow?.centerOffset !== 0, s = o ? 0 : t.arrowWidth, c = o ? 0 : t.arrowHeight, [l, u] = wt(n), f = {
|
|
1297
1296
|
start: "0%",
|
|
1298
1297
|
center: "50%",
|
|
1299
1298
|
end: "100%"
|
|
1300
|
-
}[u],
|
|
1301
|
-
let
|
|
1302
|
-
return l === "bottom" ? (
|
|
1303
|
-
x:
|
|
1304
|
-
y:
|
|
1299
|
+
}[u], d = (i.arrow?.x ?? 0) + s / 2, p = (i.arrow?.y ?? 0) + c / 2;
|
|
1300
|
+
let a = "", m = "";
|
|
1301
|
+
return l === "bottom" ? (a = o ? f : `${d}px`, m = `${-c}px`) : l === "top" ? (a = o ? f : `${d}px`, m = `${r.floating.height + c}px`) : l === "right" ? (a = `${-c}px`, m = o ? f : `${p}px`) : l === "left" && (a = `${r.floating.width + c}px`, m = o ? f : `${p}px`), { data: {
|
|
1302
|
+
x: a,
|
|
1303
|
+
y: m
|
|
1305
1304
|
} };
|
|
1306
1305
|
}
|
|
1307
1306
|
}), "transformOrigin");
|