lizaui 9.0.11 → 9.0.13
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/button/index.es.js +1 -1
- package/dist/calendar/index.es.js +1 -1
- package/dist/checkbox/index.es.js +1 -1
- package/dist/chunks/{button-B0fpJrMg.js → button-CA3Y2GZ1.js} +2 -2
- package/dist/chunks/{button-B0fpJrMg.js.map → button-CA3Y2GZ1.js.map} +1 -1
- package/dist/chunks/{checkbox-C1Sssumg.js → checkbox-qzZKMLRN.js} +2 -2
- package/dist/chunks/{checkbox-C1Sssumg.js.map → checkbox-qzZKMLRN.js.map} +1 -1
- package/dist/chunks/{floating-ui.dom-DsMDyTcd.js → floating-ui.dom-N5ROFCJy.js} +1 -10
- package/dist/chunks/{floating-ui.dom-DsMDyTcd.js.map → floating-ui.dom-N5ROFCJy.js.map} +1 -1
- package/dist/chunks/{floating-ui.dom-Bd-QJw02.js → floating-ui.dom-NqZWWqNg.js} +4 -13
- package/dist/chunks/{floating-ui.dom-Bd-QJw02.js.map → floating-ui.dom-NqZWWqNg.js.map} +1 -1
- package/dist/chunks/index-CuySPbdY.js +559 -0
- package/dist/chunks/index-CuySPbdY.js.map +1 -0
- package/dist/chunks/index-DBDBh58Q.js +575 -0
- package/dist/chunks/index-DBDBh58Q.js.map +1 -0
- package/dist/chunks/index-DNSql2gU.js +662 -0
- package/dist/chunks/index-DNSql2gU.js.map +1 -0
- package/dist/chunks/{index-B4RTH1-D.js → index-DiC9dI6_.js} +4 -4
- package/dist/chunks/{index-B4RTH1-D.js.map → index-DiC9dI6_.js.map} +1 -1
- package/dist/chunks/index-DlZi5TkN.js +646 -0
- package/dist/chunks/index-DlZi5TkN.js.map +1 -0
- package/dist/chunks/{scroll-area-JgKF61tc.js → scroll-area-BcM0NCEM.js} +4 -4
- package/dist/chunks/{scroll-area-JgKF61tc.js.map → scroll-area-BcM0NCEM.js.map} +1 -1
- package/dist/chunks/{scroll-area-C0NhSIO2.js → scroll-area-CgJodNZ_.js} +27 -27
- package/dist/chunks/{scroll-area-C0NhSIO2.js.map → scroll-area-CgJodNZ_.js.map} +1 -1
- package/dist/chunks/{select-Dpyj5dUk.js → select-DaKy-WhC.js} +11 -367
- package/dist/chunks/select-DaKy-WhC.js.map +1 -0
- package/dist/chunks/{select-DGnc8VJi.js → select-DyihZY-4.js} +83 -439
- package/dist/chunks/select-DyihZY-4.js.map +1 -0
- package/dist/chunks/{textarea-D2_KC-J4.js → textarea-By2Vv44z.js} +36 -587
- package/dist/chunks/textarea-By2Vv44z.js.map +1 -0
- package/dist/chunks/{textarea-_HQpXiCX.js → textarea-ClJsk9Gp.js} +35 -586
- package/dist/chunks/textarea-ClJsk9Gp.js.map +1 -0
- package/dist/chunks/tooltip-D4UvkD2G.js +525 -0
- package/dist/chunks/tooltip-D4UvkD2G.js.map +1 -0
- package/dist/chunks/tooltip-WGeoFpGx.js +541 -0
- package/dist/chunks/tooltip-WGeoFpGx.js.map +1 -0
- package/dist/components/tooltip/tooltip.d.ts +1 -1
- package/dist/components/tooltip/tooltip.d.ts.map +1 -1
- package/dist/divider/index.es.js +1 -1
- package/dist/modal/index.es.js +1 -1
- package/dist/pagination/index.cjs.js +2 -2
- package/dist/pagination/index.es.js +3 -3
- package/dist/phone-input/index.cjs.js +2 -2
- package/dist/phone-input/index.es.js +3 -3
- package/dist/select-input/index.cjs.js +1 -1
- package/dist/select-input/index.es.js +2 -2
- package/dist/table/index.cjs.js +1 -1
- package/dist/table/index.es.js +2 -2
- package/dist/time-input/index.cjs.js +1 -1
- package/dist/time-input/index.es.js +2 -2
- package/dist/tooltip/index.cjs.js +1 -1
- package/dist/tooltip/index.es.js +1 -1
- package/dist/ui/index.cjs.js +292 -290
- package/dist/ui/index.cjs.js.map +1 -1
- package/dist/ui/index.es.js +192 -190
- package/dist/ui/index.es.js.map +1 -1
- package/package.json +10 -10
- package/dist/chunks/floating-ui.react-dom-CjlUwp8V.js +0 -294
- package/dist/chunks/floating-ui.react-dom-CjlUwp8V.js.map +0 -1
- package/dist/chunks/floating-ui.react-dom-D5BI9L2i.js +0 -310
- package/dist/chunks/floating-ui.react-dom-D5BI9L2i.js.map +0 -1
- package/dist/chunks/select-DGnc8VJi.js.map +0 -1
- package/dist/chunks/select-Dpyj5dUk.js.map +0 -1
- package/dist/chunks/textarea-D2_KC-J4.js.map +0 -1
- package/dist/chunks/textarea-_HQpXiCX.js.map +0 -1
- package/dist/chunks/tooltip-GGFk8ALK.js +0 -1402
- package/dist/chunks/tooltip-GGFk8ALK.js.map +0 -1
- package/dist/chunks/tooltip-JwIbppjO.js +0 -1387
- package/dist/chunks/tooltip-JwIbppjO.js.map +0 -1
|
@@ -3,10 +3,10 @@ import * as React from "react";
|
|
|
3
3
|
import React__default from "react";
|
|
4
4
|
import * as ReactDOM from "react-dom";
|
|
5
5
|
import { c as createLucideIcon, u as useDirection, b as clamp, a as Check, C as ChevronDown } from "./index-BAHiLt0S.js";
|
|
6
|
-
import { c as createContextScope,
|
|
7
|
-
import { u as useComposedRefs,
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
6
|
+
import { c as createContextScope, a as useControllableState, u as useId, e as Portal$1, g as useLayoutEffect2, P as Primitive, b as composeEventHandlers, D as DismissableLayer, f as useCallbackRef } from "./index-CuySPbdY.js";
|
|
7
|
+
import { u as useComposedRefs, a as createSlot } from "./index-DiC9dI6_.js";
|
|
8
|
+
import { h as hideOthers, u as useFocusGuards, R as ReactRemoveScroll, F as FocusScope } from "./textarea-ClJsk9Gp.js";
|
|
9
|
+
import { c as createPopperScope, R as Root2$1, A as Anchor, V as VISUALLY_HIDDEN_STYLES, C as Content, a as Arrow } from "./index-DlZi5TkN.js";
|
|
10
10
|
import { c as cn } from "./utils-H80jjgLf.js";
|
|
11
11
|
function createCollection(name) {
|
|
12
12
|
const PROVIDER_NAME = name + "CollectionProvider";
|
|
@@ -70,327 +70,6 @@ function createCollection(name) {
|
|
|
70
70
|
createCollectionScope2
|
|
71
71
|
];
|
|
72
72
|
}
|
|
73
|
-
var NAME$1 = "Arrow";
|
|
74
|
-
var Arrow$1 = React.forwardRef((props, forwardedRef) => {
|
|
75
|
-
const { children, width = 10, height = 5, ...arrowProps } = props;
|
|
76
|
-
return /* @__PURE__ */ jsx(
|
|
77
|
-
Primitive.svg,
|
|
78
|
-
{
|
|
79
|
-
...arrowProps,
|
|
80
|
-
ref: forwardedRef,
|
|
81
|
-
width,
|
|
82
|
-
height,
|
|
83
|
-
viewBox: "0 0 30 10",
|
|
84
|
-
preserveAspectRatio: "none",
|
|
85
|
-
children: props.asChild ? children : /* @__PURE__ */ jsx("polygon", { points: "0,0 30,0 15,10" })
|
|
86
|
-
}
|
|
87
|
-
);
|
|
88
|
-
});
|
|
89
|
-
Arrow$1.displayName = NAME$1;
|
|
90
|
-
var Root$1 = Arrow$1;
|
|
91
|
-
function useSize(element) {
|
|
92
|
-
const [size2, setSize] = React.useState(void 0);
|
|
93
|
-
useLayoutEffect2(() => {
|
|
94
|
-
if (element) {
|
|
95
|
-
setSize({ width: element.offsetWidth, height: element.offsetHeight });
|
|
96
|
-
const resizeObserver = new ResizeObserver((entries) => {
|
|
97
|
-
if (!Array.isArray(entries)) {
|
|
98
|
-
return;
|
|
99
|
-
}
|
|
100
|
-
if (!entries.length) {
|
|
101
|
-
return;
|
|
102
|
-
}
|
|
103
|
-
const entry = entries[0];
|
|
104
|
-
let width;
|
|
105
|
-
let height;
|
|
106
|
-
if ("borderBoxSize" in entry) {
|
|
107
|
-
const borderSizeEntry = entry["borderBoxSize"];
|
|
108
|
-
const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;
|
|
109
|
-
width = borderSize["inlineSize"];
|
|
110
|
-
height = borderSize["blockSize"];
|
|
111
|
-
} else {
|
|
112
|
-
width = element.offsetWidth;
|
|
113
|
-
height = element.offsetHeight;
|
|
114
|
-
}
|
|
115
|
-
setSize({ width, height });
|
|
116
|
-
});
|
|
117
|
-
resizeObserver.observe(element, { box: "border-box" });
|
|
118
|
-
return () => resizeObserver.unobserve(element);
|
|
119
|
-
} else {
|
|
120
|
-
setSize(void 0);
|
|
121
|
-
}
|
|
122
|
-
}, [element]);
|
|
123
|
-
return size2;
|
|
124
|
-
}
|
|
125
|
-
var POPPER_NAME = "Popper";
|
|
126
|
-
var [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);
|
|
127
|
-
var [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);
|
|
128
|
-
var Popper = (props) => {
|
|
129
|
-
const { __scopePopper, children } = props;
|
|
130
|
-
const [anchor, setAnchor] = React.useState(null);
|
|
131
|
-
return /* @__PURE__ */ jsx(PopperProvider, { scope: __scopePopper, anchor, onAnchorChange: setAnchor, children });
|
|
132
|
-
};
|
|
133
|
-
Popper.displayName = POPPER_NAME;
|
|
134
|
-
var ANCHOR_NAME = "PopperAnchor";
|
|
135
|
-
var PopperAnchor = React.forwardRef(
|
|
136
|
-
(props, forwardedRef) => {
|
|
137
|
-
const { __scopePopper, virtualRef, ...anchorProps } = props;
|
|
138
|
-
const context = usePopperContext(ANCHOR_NAME, __scopePopper);
|
|
139
|
-
const ref = React.useRef(null);
|
|
140
|
-
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
141
|
-
const anchorRef = React.useRef(null);
|
|
142
|
-
React.useEffect(() => {
|
|
143
|
-
const previousAnchor = anchorRef.current;
|
|
144
|
-
anchorRef.current = virtualRef?.current || ref.current;
|
|
145
|
-
if (previousAnchor !== anchorRef.current) {
|
|
146
|
-
context.onAnchorChange(anchorRef.current);
|
|
147
|
-
}
|
|
148
|
-
});
|
|
149
|
-
return virtualRef ? null : /* @__PURE__ */ jsx(Primitive.div, { ...anchorProps, ref: composedRefs });
|
|
150
|
-
}
|
|
151
|
-
);
|
|
152
|
-
PopperAnchor.displayName = ANCHOR_NAME;
|
|
153
|
-
var CONTENT_NAME$1 = "PopperContent";
|
|
154
|
-
var [PopperContentProvider, useContentContext] = createPopperContext(CONTENT_NAME$1);
|
|
155
|
-
var PopperContent = React.forwardRef(
|
|
156
|
-
(props, forwardedRef) => {
|
|
157
|
-
const {
|
|
158
|
-
__scopePopper,
|
|
159
|
-
side = "bottom",
|
|
160
|
-
sideOffset = 0,
|
|
161
|
-
align = "center",
|
|
162
|
-
alignOffset = 0,
|
|
163
|
-
arrowPadding = 0,
|
|
164
|
-
avoidCollisions = true,
|
|
165
|
-
collisionBoundary = [],
|
|
166
|
-
collisionPadding: collisionPaddingProp = 0,
|
|
167
|
-
sticky = "partial",
|
|
168
|
-
hideWhenDetached = false,
|
|
169
|
-
updatePositionStrategy = "optimized",
|
|
170
|
-
onPlaced,
|
|
171
|
-
...contentProps
|
|
172
|
-
} = props;
|
|
173
|
-
const context = usePopperContext(CONTENT_NAME$1, __scopePopper);
|
|
174
|
-
const [content, setContent] = React.useState(null);
|
|
175
|
-
const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));
|
|
176
|
-
const [arrow$1, setArrow] = React.useState(null);
|
|
177
|
-
const arrowSize = useSize(arrow$1);
|
|
178
|
-
const arrowWidth = arrowSize?.width ?? 0;
|
|
179
|
-
const arrowHeight = arrowSize?.height ?? 0;
|
|
180
|
-
const desiredPlacement = side + (align !== "center" ? "-" + align : "");
|
|
181
|
-
const collisionPadding = typeof collisionPaddingProp === "number" ? collisionPaddingProp : { top: 0, right: 0, bottom: 0, left: 0, ...collisionPaddingProp };
|
|
182
|
-
const boundary = Array.isArray(collisionBoundary) ? collisionBoundary : [collisionBoundary];
|
|
183
|
-
const hasExplicitBoundaries = boundary.length > 0;
|
|
184
|
-
const detectOverflowOptions = {
|
|
185
|
-
padding: collisionPadding,
|
|
186
|
-
boundary: boundary.filter(isNotNull),
|
|
187
|
-
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
188
|
-
altBoundary: hasExplicitBoundaries
|
|
189
|
-
};
|
|
190
|
-
const { refs, floatingStyles, placement, isPositioned, middlewareData } = useFloating({
|
|
191
|
-
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
192
|
-
strategy: "fixed",
|
|
193
|
-
placement: desiredPlacement,
|
|
194
|
-
whileElementsMounted: (...args) => {
|
|
195
|
-
const cleanup = autoUpdate(...args, {
|
|
196
|
-
animationFrame: updatePositionStrategy === "always"
|
|
197
|
-
});
|
|
198
|
-
return cleanup;
|
|
199
|
-
},
|
|
200
|
-
elements: {
|
|
201
|
-
reference: context.anchor
|
|
202
|
-
},
|
|
203
|
-
middleware: [
|
|
204
|
-
offset({ mainAxis: sideOffset + arrowHeight, alignmentAxis: alignOffset }),
|
|
205
|
-
avoidCollisions && shift({
|
|
206
|
-
mainAxis: true,
|
|
207
|
-
crossAxis: false,
|
|
208
|
-
limiter: sticky === "partial" ? limitShift() : void 0,
|
|
209
|
-
...detectOverflowOptions
|
|
210
|
-
}),
|
|
211
|
-
avoidCollisions && flip({ ...detectOverflowOptions }),
|
|
212
|
-
size({
|
|
213
|
-
...detectOverflowOptions,
|
|
214
|
-
apply: ({ elements, rects, availableWidth, availableHeight }) => {
|
|
215
|
-
const { width: anchorWidth, height: anchorHeight } = rects.reference;
|
|
216
|
-
const contentStyle = elements.floating.style;
|
|
217
|
-
contentStyle.setProperty("--radix-popper-available-width", `${availableWidth}px`);
|
|
218
|
-
contentStyle.setProperty("--radix-popper-available-height", `${availableHeight}px`);
|
|
219
|
-
contentStyle.setProperty("--radix-popper-anchor-width", `${anchorWidth}px`);
|
|
220
|
-
contentStyle.setProperty("--radix-popper-anchor-height", `${anchorHeight}px`);
|
|
221
|
-
}
|
|
222
|
-
}),
|
|
223
|
-
arrow$1 && arrow({ element: arrow$1, padding: arrowPadding }),
|
|
224
|
-
transformOrigin({ arrowWidth, arrowHeight }),
|
|
225
|
-
hideWhenDetached && hide({ strategy: "referenceHidden", ...detectOverflowOptions })
|
|
226
|
-
]
|
|
227
|
-
});
|
|
228
|
-
const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);
|
|
229
|
-
const handlePlaced = useCallbackRef(onPlaced);
|
|
230
|
-
useLayoutEffect2(() => {
|
|
231
|
-
if (isPositioned) {
|
|
232
|
-
handlePlaced?.();
|
|
233
|
-
}
|
|
234
|
-
}, [isPositioned, handlePlaced]);
|
|
235
|
-
const arrowX = middlewareData.arrow?.x;
|
|
236
|
-
const arrowY = middlewareData.arrow?.y;
|
|
237
|
-
const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;
|
|
238
|
-
const [contentZIndex, setContentZIndex] = React.useState();
|
|
239
|
-
useLayoutEffect2(() => {
|
|
240
|
-
if (content) setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
241
|
-
}, [content]);
|
|
242
|
-
return /* @__PURE__ */ jsx(
|
|
243
|
-
"div",
|
|
244
|
-
{
|
|
245
|
-
ref: refs.setFloating,
|
|
246
|
-
"data-radix-popper-content-wrapper": "",
|
|
247
|
-
style: {
|
|
248
|
-
...floatingStyles,
|
|
249
|
-
transform: isPositioned ? floatingStyles.transform : "translate(0, -200%)",
|
|
250
|
-
// keep off the page when measuring
|
|
251
|
-
minWidth: "max-content",
|
|
252
|
-
zIndex: contentZIndex,
|
|
253
|
-
["--radix-popper-transform-origin"]: [
|
|
254
|
-
middlewareData.transformOrigin?.x,
|
|
255
|
-
middlewareData.transformOrigin?.y
|
|
256
|
-
].join(" "),
|
|
257
|
-
// hide the content if using the hide middleware and should be hidden
|
|
258
|
-
// set visibility to hidden and disable pointer events so the UI behaves
|
|
259
|
-
// as if the PopperContent isn't there at all
|
|
260
|
-
...middlewareData.hide?.referenceHidden && {
|
|
261
|
-
visibility: "hidden",
|
|
262
|
-
pointerEvents: "none"
|
|
263
|
-
}
|
|
264
|
-
},
|
|
265
|
-
dir: props.dir,
|
|
266
|
-
children: /* @__PURE__ */ jsx(
|
|
267
|
-
PopperContentProvider,
|
|
268
|
-
{
|
|
269
|
-
scope: __scopePopper,
|
|
270
|
-
placedSide,
|
|
271
|
-
onArrowChange: setArrow,
|
|
272
|
-
arrowX,
|
|
273
|
-
arrowY,
|
|
274
|
-
shouldHideArrow: cannotCenterArrow,
|
|
275
|
-
children: /* @__PURE__ */ jsx(
|
|
276
|
-
Primitive.div,
|
|
277
|
-
{
|
|
278
|
-
"data-side": placedSide,
|
|
279
|
-
"data-align": placedAlign,
|
|
280
|
-
...contentProps,
|
|
281
|
-
ref: composedRefs,
|
|
282
|
-
style: {
|
|
283
|
-
...contentProps.style,
|
|
284
|
-
// if the PopperContent hasn't been placed yet (not all measurements done)
|
|
285
|
-
// we prevent animations so that users's animation don't kick in too early referring wrong sides
|
|
286
|
-
animation: !isPositioned ? "none" : void 0
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
)
|
|
290
|
-
}
|
|
291
|
-
)
|
|
292
|
-
}
|
|
293
|
-
);
|
|
294
|
-
}
|
|
295
|
-
);
|
|
296
|
-
PopperContent.displayName = CONTENT_NAME$1;
|
|
297
|
-
var ARROW_NAME$1 = "PopperArrow";
|
|
298
|
-
var OPPOSITE_SIDE = {
|
|
299
|
-
top: "bottom",
|
|
300
|
-
right: "left",
|
|
301
|
-
bottom: "top",
|
|
302
|
-
left: "right"
|
|
303
|
-
};
|
|
304
|
-
var PopperArrow = React.forwardRef(function PopperArrow2(props, forwardedRef) {
|
|
305
|
-
const { __scopePopper, ...arrowProps } = props;
|
|
306
|
-
const contentContext = useContentContext(ARROW_NAME$1, __scopePopper);
|
|
307
|
-
const baseSide = OPPOSITE_SIDE[contentContext.placedSide];
|
|
308
|
-
return (
|
|
309
|
-
// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
|
|
310
|
-
// doesn't report size as we'd expect on SVG elements.
|
|
311
|
-
// it reports their bounding box which is effectively the largest path inside the SVG.
|
|
312
|
-
/* @__PURE__ */ jsx(
|
|
313
|
-
"span",
|
|
314
|
-
{
|
|
315
|
-
ref: contentContext.onArrowChange,
|
|
316
|
-
style: {
|
|
317
|
-
position: "absolute",
|
|
318
|
-
left: contentContext.arrowX,
|
|
319
|
-
top: contentContext.arrowY,
|
|
320
|
-
[baseSide]: 0,
|
|
321
|
-
transformOrigin: {
|
|
322
|
-
top: "",
|
|
323
|
-
right: "0 0",
|
|
324
|
-
bottom: "center 0",
|
|
325
|
-
left: "100% 0"
|
|
326
|
-
}[contentContext.placedSide],
|
|
327
|
-
transform: {
|
|
328
|
-
top: "translateY(100%)",
|
|
329
|
-
right: "translateY(50%) rotate(90deg) translateX(-50%)",
|
|
330
|
-
bottom: `rotate(180deg)`,
|
|
331
|
-
left: "translateY(50%) rotate(-90deg) translateX(50%)"
|
|
332
|
-
}[contentContext.placedSide],
|
|
333
|
-
visibility: contentContext.shouldHideArrow ? "hidden" : void 0
|
|
334
|
-
},
|
|
335
|
-
children: /* @__PURE__ */ jsx(
|
|
336
|
-
Root$1,
|
|
337
|
-
{
|
|
338
|
-
...arrowProps,
|
|
339
|
-
ref: forwardedRef,
|
|
340
|
-
style: {
|
|
341
|
-
...arrowProps.style,
|
|
342
|
-
// ensures the element can be measured correctly (mostly for if SVG)
|
|
343
|
-
display: "block"
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
)
|
|
347
|
-
}
|
|
348
|
-
)
|
|
349
|
-
);
|
|
350
|
-
});
|
|
351
|
-
PopperArrow.displayName = ARROW_NAME$1;
|
|
352
|
-
function isNotNull(value) {
|
|
353
|
-
return value !== null;
|
|
354
|
-
}
|
|
355
|
-
var transformOrigin = (options) => ({
|
|
356
|
-
name: "transformOrigin",
|
|
357
|
-
options,
|
|
358
|
-
fn(data) {
|
|
359
|
-
const { placement, rects, middlewareData } = data;
|
|
360
|
-
const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;
|
|
361
|
-
const isArrowHidden = cannotCenterArrow;
|
|
362
|
-
const arrowWidth = isArrowHidden ? 0 : options.arrowWidth;
|
|
363
|
-
const arrowHeight = isArrowHidden ? 0 : options.arrowHeight;
|
|
364
|
-
const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);
|
|
365
|
-
const noArrowAlign = { start: "0%", center: "50%", end: "100%" }[placedAlign];
|
|
366
|
-
const arrowXCenter = (middlewareData.arrow?.x ?? 0) + arrowWidth / 2;
|
|
367
|
-
const arrowYCenter = (middlewareData.arrow?.y ?? 0) + arrowHeight / 2;
|
|
368
|
-
let x = "";
|
|
369
|
-
let y = "";
|
|
370
|
-
if (placedSide === "bottom") {
|
|
371
|
-
x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;
|
|
372
|
-
y = `${-arrowHeight}px`;
|
|
373
|
-
} else if (placedSide === "top") {
|
|
374
|
-
x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;
|
|
375
|
-
y = `${rects.floating.height + arrowHeight}px`;
|
|
376
|
-
} else if (placedSide === "right") {
|
|
377
|
-
x = `${-arrowHeight}px`;
|
|
378
|
-
y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;
|
|
379
|
-
} else if (placedSide === "left") {
|
|
380
|
-
x = `${rects.floating.width + arrowHeight}px`;
|
|
381
|
-
y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;
|
|
382
|
-
}
|
|
383
|
-
return { data: { x, y } };
|
|
384
|
-
}
|
|
385
|
-
});
|
|
386
|
-
function getSideAndAlignFromPlacement(placement) {
|
|
387
|
-
const [side, align = "center"] = placement.split("-");
|
|
388
|
-
return [side, align];
|
|
389
|
-
}
|
|
390
|
-
var Root2$1 = Popper;
|
|
391
|
-
var Anchor = PopperAnchor;
|
|
392
|
-
var Content = PopperContent;
|
|
393
|
-
var Arrow = PopperArrow;
|
|
394
73
|
const __iconNode = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]];
|
|
395
74
|
const ChevronUp = createLucideIcon("chevron-up", __iconNode);
|
|
396
75
|
function usePrevious(value) {
|
|
@@ -403,39 +82,11 @@ function usePrevious(value) {
|
|
|
403
82
|
return ref.current.previous;
|
|
404
83
|
}, [value]);
|
|
405
84
|
}
|
|
406
|
-
var VISUALLY_HIDDEN_STYLES = Object.freeze({
|
|
407
|
-
// See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
|
|
408
|
-
position: "absolute",
|
|
409
|
-
border: 0,
|
|
410
|
-
width: 1,
|
|
411
|
-
height: 1,
|
|
412
|
-
padding: 0,
|
|
413
|
-
margin: -1,
|
|
414
|
-
overflow: "hidden",
|
|
415
|
-
clip: "rect(0, 0, 0, 0)",
|
|
416
|
-
whiteSpace: "nowrap",
|
|
417
|
-
wordWrap: "normal"
|
|
418
|
-
});
|
|
419
|
-
var NAME = "VisuallyHidden";
|
|
420
|
-
var VisuallyHidden = React.forwardRef(
|
|
421
|
-
(props, forwardedRef) => {
|
|
422
|
-
return /* @__PURE__ */ jsx(
|
|
423
|
-
Primitive.span,
|
|
424
|
-
{
|
|
425
|
-
...props,
|
|
426
|
-
ref: forwardedRef,
|
|
427
|
-
style: { ...VISUALLY_HIDDEN_STYLES, ...props.style }
|
|
428
|
-
}
|
|
429
|
-
);
|
|
430
|
-
}
|
|
431
|
-
);
|
|
432
|
-
VisuallyHidden.displayName = NAME;
|
|
433
|
-
var Root = VisuallyHidden;
|
|
434
85
|
var OPEN_KEYS = [" ", "Enter", "ArrowUp", "ArrowDown"];
|
|
435
86
|
var SELECTION_KEYS = [" ", "Enter"];
|
|
436
87
|
var SELECT_NAME = "Select";
|
|
437
88
|
var [Collection, useCollection, createCollectionScope] = createCollection(SELECT_NAME);
|
|
438
|
-
var [createSelectContext
|
|
89
|
+
var [createSelectContext] = createContextScope(SELECT_NAME, [
|
|
439
90
|
createCollectionScope,
|
|
440
91
|
createPopperScope
|
|
441
92
|
]);
|
|
@@ -1571,7 +1222,7 @@ function SelectValue({ ...props }) {
|
|
|
1571
1222
|
}
|
|
1572
1223
|
function SelectTrigger({
|
|
1573
1224
|
className,
|
|
1574
|
-
size
|
|
1225
|
+
size = "default",
|
|
1575
1226
|
children,
|
|
1576
1227
|
...props
|
|
1577
1228
|
}) {
|
|
@@ -1579,7 +1230,7 @@ function SelectTrigger({
|
|
|
1579
1230
|
Trigger,
|
|
1580
1231
|
{
|
|
1581
1232
|
"data-slot": "select-trigger",
|
|
1582
|
-
"data-size":
|
|
1233
|
+
"data-size": size,
|
|
1583
1234
|
className: cn(
|
|
1584
1235
|
"border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
1585
1236
|
className
|
|
@@ -1674,9 +1325,6 @@ function SelectScrollDownButton({ className, ...props }) {
|
|
|
1674
1325
|
);
|
|
1675
1326
|
}
|
|
1676
1327
|
export {
|
|
1677
|
-
Anchor as A,
|
|
1678
|
-
Content as C,
|
|
1679
|
-
Root2$1 as R,
|
|
1680
1328
|
Select as S,
|
|
1681
1329
|
SelectTrigger as a,
|
|
1682
1330
|
SelectValue as b,
|
|
@@ -1685,13 +1333,9 @@ export {
|
|
|
1685
1333
|
SelectLabel as e,
|
|
1686
1334
|
SelectItem as f,
|
|
1687
1335
|
createCollection as g,
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
useSize as k,
|
|
1692
|
-
SelectScrollDownButton as l,
|
|
1693
|
-
SelectScrollUpButton as m,
|
|
1694
|
-
SelectSeparator as n,
|
|
1336
|
+
SelectScrollDownButton as h,
|
|
1337
|
+
SelectScrollUpButton as i,
|
|
1338
|
+
SelectSeparator as j,
|
|
1695
1339
|
usePrevious as u
|
|
1696
1340
|
};
|
|
1697
|
-
//# sourceMappingURL=select-
|
|
1341
|
+
//# sourceMappingURL=select-DaKy-WhC.js.map
|