@iris-ui-kit/react 0.2.1 → 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 +34 -27
- 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-6BMFMCMQ.js → chunk-6S6MZC5G.js} +11 -4
- package/dist/chunk-6S6MZC5G.js.map +1 -0
- package/dist/{chunk-SJO74IB3.js → chunk-7ILMMLK6.js} +2 -2
- package/dist/chunk-7ILMMLK6.js.map +1 -0
- package/dist/{chunk-INEPOSCN.js → chunk-CYQO33XH.js} +3 -6
- package/dist/chunk-CYQO33XH.js.map +1 -0
- package/dist/{chunk-LXMTXHAS.js → chunk-KRFZ5KL4.js} +28 -28
- 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-B4RS5WKC.js → chunk-V3KHE2WB.js} +137 -75
- package/dist/chunk-V3KHE2WB.js.map +1 -0
- package/dist/{chunk-BCL32KSE.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 +4351 -2142
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +508 -23
- package/dist/index.d.ts +508 -23
- package/dist/index.js +3957 -1860
- package/dist/index.js.map +1 -1
- package/dist/layouts.cjs.map +1 -1
- package/dist/layouts.js +1 -1
- package/dist/skeletons.cjs +135 -73
- package/dist/skeletons.cjs.map +1 -1
- package/dist/skeletons.js +1 -1
- package/dist/undo.cjs +1 -4
- package/dist/undo.cjs.map +1 -1
- package/dist/undo.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-53KFLVIZ.js.map +0 -1
- package/dist/chunk-6BMFMCMQ.js.map +0 -1
- package/dist/chunk-B4RS5WKC.js.map +0 -1
- package/dist/chunk-BCL32KSE.js.map +0 -1
- package/dist/chunk-INEPOSCN.js.map +0 -1
- package/dist/chunk-LXMTXHAS.js.map +0 -1
- package/dist/chunk-SJO74IB3.js.map +0 -1
package/dist/admin.cjs
CHANGED
|
@@ -307,20 +307,20 @@ function IrisNavMenu({
|
|
|
307
307
|
const itemStyle = (opts) => ({
|
|
308
308
|
display: "flex",
|
|
309
309
|
alignItems: "center",
|
|
310
|
-
gap:
|
|
310
|
+
gap: "var(--iris-space-sm, 12px)",
|
|
311
311
|
width: horizontal && opts.depth === 0 ? "auto" : "100%",
|
|
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
|
-
fontSize:
|
|
318
|
+
fontSize: "var(--iris-font-size-md, 14px)",
|
|
319
319
|
fontWeight: opts.active || opts.trail ? 600 : 400,
|
|
320
320
|
textAlign: "start",
|
|
321
321
|
cursor: opts.disabled ? "not-allowed" : "pointer",
|
|
322
322
|
opacity: opts.disabled ? 0.5 : 1,
|
|
323
|
-
padding: collapsed ? 10 : "8px
|
|
323
|
+
padding: collapsed ? 10 : "var(--iris-space-xs, 8px) var(--iris-space-sm, 12px)",
|
|
324
324
|
paddingInlineStart: collapsed ? 10 : 12 + opts.depth * 16,
|
|
325
325
|
justifyContent: collapsed ? "center" : "flex-start"
|
|
326
326
|
});
|
|
@@ -331,12 +331,12 @@ function IrisNavMenu({
|
|
|
331
331
|
"data-iris-nav-badge": "",
|
|
332
332
|
style: {
|
|
333
333
|
marginInlineStart: "auto",
|
|
334
|
-
fontSize:
|
|
334
|
+
fontSize: "var(--iris-font-size-xs, 12px)",
|
|
335
335
|
lineHeight: 1,
|
|
336
|
-
padding: "
|
|
336
|
+
padding: "var(--iris-space-xxs, 4px) var(--iris-padding-sm, 6px)",
|
|
337
337
|
borderRadius: 999,
|
|
338
|
-
background: "var(--iris-danger, #
|
|
339
|
-
color: "#fff"
|
|
338
|
+
background: "var(--iris-danger, #ef4444)",
|
|
339
|
+
color: "var(--iris-primary-foreground, #fff)"
|
|
340
340
|
},
|
|
341
341
|
children: String(node.badge)
|
|
342
342
|
}
|
|
@@ -457,7 +457,7 @@ function IrisNavMenu({
|
|
|
457
457
|
insetInlineStart: 0,
|
|
458
458
|
zIndex: 60,
|
|
459
459
|
minWidth: 220,
|
|
460
|
-
padding:
|
|
460
|
+
padding: "var(--iris-space-xs, 8px)",
|
|
461
461
|
border: "1px solid var(--iris-border)",
|
|
462
462
|
borderRadius: "var(--iris-radius-md, 6px)",
|
|
463
463
|
background: "var(--iris-surface)",
|
|
@@ -524,7 +524,7 @@ function IrisNavMenu({
|
|
|
524
524
|
display: "flex",
|
|
525
525
|
flexDirection: horizontal ? "row" : "column",
|
|
526
526
|
alignItems: horizontal ? "center" : void 0,
|
|
527
|
-
gap:
|
|
527
|
+
gap: "var(--iris-space-xxs, 4px)"
|
|
528
528
|
},
|
|
529
529
|
children: collapsed ? tree.map((node) => renderCollapsed(node)) : tree.map((node) => renderItem(node, 0))
|
|
530
530
|
}
|
|
@@ -550,11 +550,11 @@ var IrisBreadcrumb = React13__namespace.forwardRef(
|
|
|
550
550
|
style: {
|
|
551
551
|
display: "inline-flex",
|
|
552
552
|
alignItems: "center",
|
|
553
|
-
gap:
|
|
553
|
+
gap: "var(--iris-space-xs, 8px)",
|
|
554
554
|
margin: 0,
|
|
555
555
|
padding: 0,
|
|
556
556
|
listStyle: "none",
|
|
557
|
-
fontSize:
|
|
557
|
+
fontSize: "var(--iris-font-size-md, 14px)"
|
|
558
558
|
},
|
|
559
559
|
children: flat.map((child, i) => {
|
|
560
560
|
const isLast = i === total - 1;
|
|
@@ -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",
|
|
@@ -1059,15 +1066,15 @@ var IrisDropdownMenu = React13__namespace.forwardRef(
|
|
|
1059
1066
|
onKeyDown: handleKeyDown,
|
|
1060
1067
|
style: {
|
|
1061
1068
|
...floatingStyles,
|
|
1062
|
-
background: "var(--iris-surface)",
|
|
1069
|
+
background: "var(--iris-surface-floating)",
|
|
1063
1070
|
color: "var(--iris-foreground)",
|
|
1064
1071
|
border: "1px solid var(--iris-border)",
|
|
1065
1072
|
borderRadius: "var(--iris-radius-md, 6px)",
|
|
1066
1073
|
padding: "var(--iris-padding-sm, 4px)",
|
|
1067
|
-
boxShadow: "
|
|
1074
|
+
boxShadow: "var(--iris-shadow-lg)",
|
|
1068
1075
|
minWidth: 160,
|
|
1069
1076
|
outline: "none",
|
|
1070
|
-
zIndex:
|
|
1077
|
+
zIndex: "var(--iris-z-popover, 1000)",
|
|
1071
1078
|
...style
|
|
1072
1079
|
},
|
|
1073
1080
|
children
|
|
@@ -1120,14 +1127,14 @@ var IrisDropdownItem = React13__namespace.forwardRef(
|
|
|
1120
1127
|
display: "flex",
|
|
1121
1128
|
alignItems: "center",
|
|
1122
1129
|
gap: "var(--iris-gap-sm, 6px)",
|
|
1123
|
-
padding: "6px var(--iris-padding-md, 12px)",
|
|
1130
|
+
padding: "var(--iris-padding-sm, 6px) var(--iris-padding-md, 12px)",
|
|
1124
1131
|
borderRadius: "var(--iris-radius-sm, 4px)",
|
|
1125
1132
|
cursor: disabled ? "not-allowed" : "pointer",
|
|
1126
1133
|
opacity: disabled ? 0.5 : 1,
|
|
1127
1134
|
background: hovered && !disabled ? "var(--iris-surface-hover)" : "transparent",
|
|
1128
1135
|
color: "inherit",
|
|
1129
1136
|
outline: "none",
|
|
1130
|
-
fontSize:
|
|
1137
|
+
fontSize: "var(--iris-font-size-md, 14px)",
|
|
1131
1138
|
transition: "background-color 80ms ease",
|
|
1132
1139
|
...style
|
|
1133
1140
|
},
|
|
@@ -1329,12 +1336,12 @@ function IrisAdminTabs({
|
|
|
1329
1336
|
style: {
|
|
1330
1337
|
display: "inline-flex",
|
|
1331
1338
|
alignItems: "center",
|
|
1332
|
-
gap:
|
|
1339
|
+
gap: "var(--iris-space-xs, 8px)",
|
|
1333
1340
|
border: "none",
|
|
1334
1341
|
background: "transparent",
|
|
1335
1342
|
color: "inherit",
|
|
1336
1343
|
font: "inherit",
|
|
1337
|
-
fontSize:
|
|
1344
|
+
fontSize: "var(--iris-font-size-sm, 13px)",
|
|
1338
1345
|
cursor: "pointer",
|
|
1339
1346
|
padding: 0
|
|
1340
1347
|
},
|
|
@@ -1382,7 +1389,7 @@ function IrisAdminTabs({
|
|
|
1382
1389
|
display: "inline-flex",
|
|
1383
1390
|
alignItems: "center",
|
|
1384
1391
|
gap: 4,
|
|
1385
|
-
padding: "
|
|
1392
|
+
padding: "var(--iris-padding-sm, 6px) var(--iris-space-xs, 8px) var(--iris-padding-sm, 6px) var(--iris-padding-md, 12px)",
|
|
1386
1393
|
borderRadius: "var(--iris-radius-md, 6px)",
|
|
1387
1394
|
border: `1px solid ${active ? "var(--iris-primary)" : "var(--iris-border)"}`,
|
|
1388
1395
|
background: active ? "var(--iris-primary)" : "var(--iris-surface)",
|
|
@@ -1405,8 +1412,8 @@ function IrisAdminTabs({
|
|
|
1405
1412
|
style: {
|
|
1406
1413
|
display: "flex",
|
|
1407
1414
|
alignItems: "center",
|
|
1408
|
-
gap:
|
|
1409
|
-
padding: "6px
|
|
1415
|
+
gap: "var(--iris-space-xs, 8px)",
|
|
1416
|
+
padding: "var(--iris-padding-sm, 6px) var(--iris-padding-md, 12px)",
|
|
1410
1417
|
borderBottom: "1px solid var(--iris-border)",
|
|
1411
1418
|
background: "var(--iris-background)"
|
|
1412
1419
|
},
|
|
@@ -1428,7 +1435,7 @@ function IrisAdminTabs({
|
|
|
1428
1435
|
onReorder: reorder,
|
|
1429
1436
|
disabled: !reorderable,
|
|
1430
1437
|
orientation: "horizontal",
|
|
1431
|
-
style: { alignItems: "center", gap:
|
|
1438
|
+
style: { alignItems: "center", gap: "var(--iris-space-xs, 8px)", width: "max-content" },
|
|
1432
1439
|
children: t.tabs.map((tab) => chip(tab))
|
|
1433
1440
|
}
|
|
1434
1441
|
)
|
|
@@ -1569,12 +1576,12 @@ function IrisAdminLayout({
|
|
|
1569
1576
|
style: {
|
|
1570
1577
|
display: "flex",
|
|
1571
1578
|
alignItems: "center",
|
|
1572
|
-
gap:
|
|
1579
|
+
gap: "var(--iris-space-sm, 12px)",
|
|
1573
1580
|
height: 52,
|
|
1574
1581
|
padding: "0 16px",
|
|
1575
1582
|
color: "var(--iris-foreground)",
|
|
1576
1583
|
fontWeight: 700,
|
|
1577
|
-
fontSize:
|
|
1584
|
+
fontSize: "var(--iris-font-size-lg, 16px)",
|
|
1578
1585
|
whiteSpace: "nowrap",
|
|
1579
1586
|
overflow: "hidden",
|
|
1580
1587
|
flexShrink: 0
|