@iris-ui-kit/react 0.2.2 → 0.2.3
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/admin.cjs +10 -3
- package/dist/admin.cjs.map +1 -1
- package/dist/admin.js +2 -2
- package/dist/behaviors.cjs +45 -0
- package/dist/behaviors.cjs.map +1 -1
- package/dist/behaviors.d.cts +38 -1
- package/dist/behaviors.d.ts +38 -1
- package/dist/behaviors.js +1 -1
- package/dist/{chunk-AE2TTLTK.js → chunk-6S6MZC5G.js} +11 -4
- package/dist/chunk-6S6MZC5G.js.map +1 -0
- package/dist/{chunk-OD2O3BPM.js → chunk-KRFZ5KL4.js} +4 -4
- package/dist/chunk-KRFZ5KL4.js.map +1 -0
- package/dist/{chunk-53KFLVIZ.js → chunk-QZJXMCRR.js} +3 -2
- package/dist/chunk-QZJXMCRR.js.map +1 -0
- package/dist/{chunk-APA5KNCK.js → chunk-ZE4GH2GV.js} +49 -5
- package/dist/chunk-ZE4GH2GV.js.map +1 -0
- package/dist/data.cjs +1 -0
- package/dist/data.cjs.map +1 -1
- package/dist/data.d.cts +4 -2
- package/dist/data.d.ts +4 -2
- package/dist/data.js +1 -1
- package/dist/floating.cjs +9 -2
- package/dist/floating.cjs.map +1 -1
- package/dist/floating.js +1 -1
- package/dist/index.cjs +3537 -1802
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +494 -22
- package/dist/index.d.ts +494 -22
- package/dist/index.js +3279 -1597
- package/dist/index.js.map +1 -1
- package/package.json +15 -15
- package/dist/chunk-53KFLVIZ.js.map +0 -1
- package/dist/chunk-AE2TTLTK.js.map +0 -1
- package/dist/chunk-APA5KNCK.js.map +0 -1
- package/dist/chunk-OD2O3BPM.js.map +0 -1
package/dist/admin.cjs
CHANGED
|
@@ -312,7 +312,7 @@ function IrisNavMenu({
|
|
|
312
312
|
boxSizing: "border-box",
|
|
313
313
|
border: "none",
|
|
314
314
|
borderRadius: "var(--iris-radius-md, 6px)",
|
|
315
|
-
background: opts.active ? "var(--iris-primary)" : opts.hovered && !opts.disabled ? "var(--iris-surface-hover, var(--iris-surface))" : "transparent",
|
|
315
|
+
background: opts.active ? opts.hovered && !opts.disabled ? "var(--iris-nav-item-active-hover, color-mix(in srgb, var(--iris-primary) 88%, black))" : "var(--iris-primary)" : opts.hovered && !opts.disabled ? "var(--iris-surface-hover, var(--iris-surface))" : "transparent",
|
|
316
316
|
color: opts.active ? "var(--iris-primary-foreground, #fff)" : opts.trail ? "var(--iris-primary)" : "var(--iris-foreground)",
|
|
317
317
|
font: "inherit",
|
|
318
318
|
fontSize: "var(--iris-font-size-md, 14px)",
|
|
@@ -836,6 +836,7 @@ function useFloating(options) {
|
|
|
836
836
|
const [x, setX] = React13__namespace.useState(0);
|
|
837
837
|
const [y, setY] = React13__namespace.useState(0);
|
|
838
838
|
const [finalPlacement, setFinalPlacement] = React13__namespace.useState(placement);
|
|
839
|
+
const [positioned, setPositioned] = React13__namespace.useState(false);
|
|
839
840
|
const [arrowX, setArrowX] = React13__namespace.useState();
|
|
840
841
|
const [arrowY, setArrowY] = React13__namespace.useState();
|
|
841
842
|
const middleware = React13__namespace.useMemo(() => {
|
|
@@ -877,6 +878,7 @@ function useFloating(options) {
|
|
|
877
878
|
if (token !== epochRef.current) return;
|
|
878
879
|
setX(result.x);
|
|
879
880
|
setY(result.y);
|
|
881
|
+
setPositioned(true);
|
|
880
882
|
setFinalPlacement(result.placement);
|
|
881
883
|
const arrowData = result.middlewareData.arrow;
|
|
882
884
|
setArrowX(arrowData?.x);
|
|
@@ -887,6 +889,7 @@ function useFloating(options) {
|
|
|
887
889
|
const a = anchor.current;
|
|
888
890
|
const f = floating.current;
|
|
889
891
|
if (!a || !f) return;
|
|
892
|
+
setPositioned(false);
|
|
890
893
|
const cleanup = dom.autoUpdate(a, f, () => {
|
|
891
894
|
void update();
|
|
892
895
|
});
|
|
@@ -901,9 +904,13 @@ function useFloating(options) {
|
|
|
901
904
|
top: 0,
|
|
902
905
|
left: 0,
|
|
903
906
|
transform: `translate3d(${Math.round(x)}px, ${Math.round(y)}px, 0)`,
|
|
904
|
-
width: "max-content"
|
|
907
|
+
width: "max-content",
|
|
908
|
+
// Hidden until the first positioning cycle lands — prevents a flash at
|
|
909
|
+
// the viewport origin. `visibility` (not `display:none`) keeps the panel
|
|
910
|
+
// measurable so Floating UI can compute its real coordinates.
|
|
911
|
+
visibility: positioned ? void 0 : "hidden"
|
|
905
912
|
}),
|
|
906
|
-
[strategy, x, y]
|
|
913
|
+
[strategy, x, y, positioned]
|
|
907
914
|
);
|
|
908
915
|
const OPPOSITE = {
|
|
909
916
|
top: "bottom",
|