@refineui/react 0.0.2 → 0.0.4
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/index.cjs +515 -305
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3482 -29
- package/dist/index.d.ts +3482 -29
- package/dist/index.js +394 -185
- package/dist/index.js.map +1 -1
- package/dist/spec/contract-index.json +1 -1
- package/dist/spec/token-graph.json +377 -73
- package/dist/spec/token-trace-v2.json +264 -24
- package/package.json +1 -1
- package/refineui.css +19 -16
package/dist/index.cjs
CHANGED
|
@@ -280,9 +280,10 @@ __export(index_exports, {
|
|
|
280
280
|
WebIcon: () => WebIcon,
|
|
281
281
|
breadcrumbLinkClassName: () => breadcrumbLinkClassName,
|
|
282
282
|
componentColorTokens: () => componentColorTokens,
|
|
283
|
-
componentSizeFoundationKeys: () =>
|
|
284
|
-
componentSizes: () =>
|
|
283
|
+
componentSizeFoundationKeys: () => import_tokens3.componentSizeFoundationKeys,
|
|
284
|
+
componentSizes: () => import_tokens3.componentSizes,
|
|
285
285
|
componentTextClass: () => componentTextClass,
|
|
286
|
+
componentTokens: () => componentTokens,
|
|
286
287
|
componentTypographyTokens: () => componentTypographyTokens,
|
|
287
288
|
defaultCommandFilter: () => defaultCommandFilter,
|
|
288
289
|
dismissToast: () => dismissToast,
|
|
@@ -290,7 +291,7 @@ __export(index_exports, {
|
|
|
290
291
|
footerLocaleLinkClassName: () => footerLocaleLinkClassName,
|
|
291
292
|
footerLocaleTriggerClassName: () => footerLocaleTriggerClassName,
|
|
292
293
|
footerSocialLinkClassName: () => footerSocialLinkClassName,
|
|
293
|
-
foundationSizes: () =>
|
|
294
|
+
foundationSizes: () => import_tokens3.foundationSizes,
|
|
294
295
|
semanticTextClass: () => semanticTextClass,
|
|
295
296
|
sizedComponentTextClass: () => sizedComponentTextClass,
|
|
296
297
|
toast: () => toast,
|
|
@@ -437,13 +438,16 @@ var componentColorTokens = {
|
|
|
437
438
|
},
|
|
438
439
|
tooltip: {
|
|
439
440
|
default: {
|
|
440
|
-
|
|
441
|
-
|
|
441
|
+
/** Menu / Select floating panel semantic */
|
|
442
|
+
background: semanticToken("backgroundPrimary"),
|
|
443
|
+
foreground: semanticToken("foregroundPrimary"),
|
|
444
|
+
border: semanticToken("borderDefault")
|
|
442
445
|
}
|
|
443
446
|
},
|
|
444
447
|
popover: {
|
|
445
448
|
default: {
|
|
446
|
-
|
|
449
|
+
/** Menu / Select floating panel semantic */
|
|
450
|
+
background: semanticToken("backgroundPrimary"),
|
|
447
451
|
foreground: semanticToken("foregroundPrimary"),
|
|
448
452
|
border: semanticToken("borderDefault")
|
|
449
453
|
},
|
|
@@ -587,20 +591,20 @@ var componentColorTokens = {
|
|
|
587
591
|
border: semanticToken("borderDefault"),
|
|
588
592
|
title: semanticToken("foregroundPrimary"),
|
|
589
593
|
description: {
|
|
590
|
-
default: semanticToken("
|
|
591
|
-
info:
|
|
592
|
-
success:
|
|
593
|
-
warning:
|
|
594
|
-
danger:
|
|
595
|
-
custom:
|
|
594
|
+
default: semanticToken("foregroundSecondary"),
|
|
595
|
+
info: semanticToken("foregroundInfo"),
|
|
596
|
+
success: semanticToken("foregroundSuccess"),
|
|
597
|
+
warning: semanticToken("foregroundWarning"),
|
|
598
|
+
danger: semanticToken("foregroundError"),
|
|
599
|
+
custom: semanticToken("foregroundDiscovery")
|
|
596
600
|
},
|
|
597
601
|
accent: {
|
|
598
602
|
default: semanticToken("foregroundPrimary"),
|
|
599
|
-
info:
|
|
600
|
-
success:
|
|
601
|
-
warning:
|
|
602
|
-
danger:
|
|
603
|
-
custom:
|
|
603
|
+
info: semanticToken("foregroundInfo"),
|
|
604
|
+
success: semanticToken("foregroundSuccess"),
|
|
605
|
+
warning: semanticToken("foregroundWarning"),
|
|
606
|
+
danger: semanticToken("foregroundError"),
|
|
607
|
+
custom: semanticToken("foregroundDiscovery")
|
|
604
608
|
}
|
|
605
609
|
},
|
|
606
610
|
badge: {
|
|
@@ -622,8 +626,8 @@ var componentColorTokens = {
|
|
|
622
626
|
foreground: semanticToken("foregroundOnSuccess")
|
|
623
627
|
},
|
|
624
628
|
warning: {
|
|
625
|
-
background:
|
|
626
|
-
foreground:
|
|
629
|
+
background: semanticToken("backgroundWarning"),
|
|
630
|
+
foreground: semanticToken("foregroundOnWarning")
|
|
627
631
|
},
|
|
628
632
|
danger: {
|
|
629
633
|
background: semanticToken("backgroundError"),
|
|
@@ -692,7 +696,7 @@ var componentColorTokens = {
|
|
|
692
696
|
pointStroke: semanticToken("backgroundPrimary"),
|
|
693
697
|
cursor: semanticToken("backgroundSurfaceHover"),
|
|
694
698
|
tooltip: {
|
|
695
|
-
background: semanticToken("
|
|
699
|
+
background: semanticToken("backgroundPrimary"),
|
|
696
700
|
foreground: semanticToken("foregroundPrimary"),
|
|
697
701
|
muted: semanticToken("foregroundSecondary"),
|
|
698
702
|
border: semanticToken("borderDefault")
|
|
@@ -745,8 +749,10 @@ var componentColorTokens = {
|
|
|
745
749
|
}
|
|
746
750
|
},
|
|
747
751
|
toast: {
|
|
748
|
-
|
|
752
|
+
/** Menu / Select panel semantic — solid, not frosted */
|
|
753
|
+
background: semanticToken("backgroundPrimary"),
|
|
749
754
|
message: semanticToken("foregroundPrimary"),
|
|
755
|
+
border: semanticToken("borderDefault"),
|
|
750
756
|
accent: {
|
|
751
757
|
default: semanticToken("foregroundPrimary"),
|
|
752
758
|
success: semanticToken("foregroundSuccess"),
|
|
@@ -814,14 +820,15 @@ var componentColorTokens = {
|
|
|
814
820
|
},
|
|
815
821
|
menu: {
|
|
816
822
|
panel: {
|
|
817
|
-
|
|
823
|
+
/** Matches Menu.style panel classes */
|
|
824
|
+
background: semanticToken("backgroundPrimary"),
|
|
818
825
|
border: semanticToken("borderDefault")
|
|
819
826
|
},
|
|
820
827
|
popover: {
|
|
821
828
|
background: "transparent"
|
|
822
829
|
},
|
|
823
830
|
list: {
|
|
824
|
-
background: semanticToken("
|
|
831
|
+
background: semanticToken("backgroundPrimary"),
|
|
825
832
|
border: semanticToken("borderDefault")
|
|
826
833
|
},
|
|
827
834
|
section: semanticToken("foregroundPrimary"),
|
|
@@ -925,8 +932,8 @@ var componentColorTokens = {
|
|
|
925
932
|
},
|
|
926
933
|
divider: {
|
|
927
934
|
line: semanticToken("borderDefault"),
|
|
928
|
-
label:
|
|
929
|
-
icon:
|
|
935
|
+
label: semanticToken("foregroundPrimary"),
|
|
936
|
+
icon: semanticToken("foregroundPrimary")
|
|
930
937
|
},
|
|
931
938
|
avatar: {
|
|
932
939
|
image: {
|
|
@@ -1210,11 +1217,134 @@ var componentTypographyTokens = {
|
|
|
1210
1217
|
}
|
|
1211
1218
|
};
|
|
1212
1219
|
|
|
1213
|
-
// src/
|
|
1220
|
+
// src/tokens/componentTokens.ts
|
|
1214
1221
|
var import_tokens = require("@refineui/tokens");
|
|
1222
|
+
var motion = {
|
|
1223
|
+
fast: {
|
|
1224
|
+
duration: import_tokens.semanticInteraction.duration.fast,
|
|
1225
|
+
easing: import_tokens.semanticInteraction.easing.easeOut
|
|
1226
|
+
},
|
|
1227
|
+
indicator: {
|
|
1228
|
+
duration: import_tokens.semanticInteraction.duration.medium,
|
|
1229
|
+
easing: import_tokens.semanticInteraction.easing.emphasized
|
|
1230
|
+
},
|
|
1231
|
+
panel: {
|
|
1232
|
+
duration: import_tokens.semanticInteraction.duration.panel,
|
|
1233
|
+
easing: import_tokens.semanticInteraction.easing.panel
|
|
1234
|
+
}
|
|
1235
|
+
};
|
|
1236
|
+
var componentTokens = {
|
|
1237
|
+
color: componentColorTokens,
|
|
1238
|
+
typography: componentTypographyTokens,
|
|
1239
|
+
motion,
|
|
1240
|
+
elevation: import_tokens.semanticElevations,
|
|
1241
|
+
toast: {
|
|
1242
|
+
color: componentColorTokens.toast,
|
|
1243
|
+
typography: componentTypographyTokens.toast,
|
|
1244
|
+
size: {
|
|
1245
|
+
minWidth: import_tokens.componentSizes.toastMinWidth,
|
|
1246
|
+
maxWidth: import_tokens.componentSizes.toastMaxWidth
|
|
1247
|
+
},
|
|
1248
|
+
elevation: {
|
|
1249
|
+
role: "toast",
|
|
1250
|
+
foundation: import_tokens.semanticElevations.toast
|
|
1251
|
+
},
|
|
1252
|
+
motion: {
|
|
1253
|
+
enter: import_tokens.semanticInteraction.duration.toastEnter,
|
|
1254
|
+
leave: import_tokens.semanticInteraction.duration.toastLeave,
|
|
1255
|
+
easing: import_tokens.semanticInteraction.easing.emphasized
|
|
1256
|
+
}
|
|
1257
|
+
},
|
|
1258
|
+
segmentedControl: {
|
|
1259
|
+
color: componentColorTokens.segmentedControl,
|
|
1260
|
+
typography: componentTypographyTokens.segmentedControl,
|
|
1261
|
+
elevation: {
|
|
1262
|
+
/** Selected thumb — recipe `shadow-refineui-2` / surface */
|
|
1263
|
+
role: "surface",
|
|
1264
|
+
foundation: import_tokens.semanticElevations.surface
|
|
1265
|
+
},
|
|
1266
|
+
motion: {
|
|
1267
|
+
/** Indicator slide after first layout */
|
|
1268
|
+
indicator: motion.indicator,
|
|
1269
|
+
/** Item label color fade */
|
|
1270
|
+
itemColor: motion.fast
|
|
1271
|
+
}
|
|
1272
|
+
},
|
|
1273
|
+
button: {
|
|
1274
|
+
color: componentColorTokens.button,
|
|
1275
|
+
typography: componentTypographyTokens.button,
|
|
1276
|
+
motion: {
|
|
1277
|
+
pressScale: import_tokens.semanticInteraction.scale.press,
|
|
1278
|
+
color: motion.fast
|
|
1279
|
+
}
|
|
1280
|
+
},
|
|
1281
|
+
chip: {
|
|
1282
|
+
color: componentColorTokens.chip,
|
|
1283
|
+
typography: componentTypographyTokens.chip
|
|
1284
|
+
},
|
|
1285
|
+
badge: {
|
|
1286
|
+
color: componentColorTokens.badge
|
|
1287
|
+
},
|
|
1288
|
+
alert: {
|
|
1289
|
+
color: componentColorTokens.alert,
|
|
1290
|
+
typography: componentTypographyTokens.alert
|
|
1291
|
+
},
|
|
1292
|
+
dialog: {
|
|
1293
|
+
color: componentColorTokens.dialog,
|
|
1294
|
+
typography: componentTypographyTokens.dialog,
|
|
1295
|
+
elevation: {
|
|
1296
|
+
role: "modal",
|
|
1297
|
+
foundation: import_tokens.semanticElevations.modal
|
|
1298
|
+
},
|
|
1299
|
+
motion: {
|
|
1300
|
+
enterScale: import_tokens.semanticInteraction.scale.dialogEnter,
|
|
1301
|
+
panel: motion.panel
|
|
1302
|
+
}
|
|
1303
|
+
},
|
|
1304
|
+
drawer: {
|
|
1305
|
+
color: componentColorTokens.drawer,
|
|
1306
|
+
typography: componentTypographyTokens.drawer,
|
|
1307
|
+
motion: {
|
|
1308
|
+
panel: motion.panel
|
|
1309
|
+
}
|
|
1310
|
+
},
|
|
1311
|
+
accordion: {
|
|
1312
|
+
color: componentColorTokens.accordion,
|
|
1313
|
+
typography: componentTypographyTokens.accordion,
|
|
1314
|
+
motion: {
|
|
1315
|
+
panel: import_tokens.semanticInteraction.duration.accordionPanel,
|
|
1316
|
+
content: import_tokens.semanticInteraction.duration.accordionContent
|
|
1317
|
+
}
|
|
1318
|
+
},
|
|
1319
|
+
tabs: {
|
|
1320
|
+
// underline indicator shares the same mount/slide motion contract
|
|
1321
|
+
motion: {
|
|
1322
|
+
indicator: motion.indicator
|
|
1323
|
+
}
|
|
1324
|
+
},
|
|
1325
|
+
input: {
|
|
1326
|
+
color: componentColorTokens.input,
|
|
1327
|
+
typography: componentTypographyTokens.formControl
|
|
1328
|
+
},
|
|
1329
|
+
checkbox: {
|
|
1330
|
+
color: componentColorTokens.checkbox
|
|
1331
|
+
},
|
|
1332
|
+
radio: {
|
|
1333
|
+
color: componentColorTokens.radio
|
|
1334
|
+
},
|
|
1335
|
+
switch: {
|
|
1336
|
+
color: componentColorTokens.switch
|
|
1337
|
+
},
|
|
1338
|
+
toggle: {
|
|
1339
|
+
color: componentColorTokens.toggle
|
|
1340
|
+
}
|
|
1341
|
+
};
|
|
1342
|
+
|
|
1343
|
+
// src/typography.ts
|
|
1344
|
+
var import_tokens2 = require("@refineui/tokens");
|
|
1215
1345
|
var import_utilities2 = require("@refineui/utilities");
|
|
1216
1346
|
function semanticTextClass(name) {
|
|
1217
|
-
return (0, import_utilities2.foundationTypographyUtilityClass)(
|
|
1347
|
+
return (0, import_utilities2.foundationTypographyUtilityClass)(import_tokens2.SEMANTIC_TEXT[name]);
|
|
1218
1348
|
}
|
|
1219
1349
|
function componentTextClass(ref) {
|
|
1220
1350
|
if (!(0, import_utilities2.isSemanticTextTokenRef)(ref)) {
|
|
@@ -1238,16 +1368,16 @@ function buildSemanticTextClassMap(map) {
|
|
|
1238
1368
|
var import_tokens36 = require("@refineui/tokens");
|
|
1239
1369
|
|
|
1240
1370
|
// src/componentSizes.ts
|
|
1241
|
-
var
|
|
1371
|
+
var import_tokens3 = require("@refineui/tokens");
|
|
1242
1372
|
|
|
1243
1373
|
// src/WebIcon.tsx
|
|
1244
1374
|
var import_clsx = require("clsx");
|
|
1245
|
-
var
|
|
1375
|
+
var import_tokens4 = require("@refineui/tokens");
|
|
1246
1376
|
var import_web_icons = require("@refineui/web-icons");
|
|
1247
1377
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
1248
1378
|
function WebIcon({
|
|
1249
1379
|
name,
|
|
1250
|
-
size =
|
|
1380
|
+
size = import_tokens4.iconSizes.medium,
|
|
1251
1381
|
color,
|
|
1252
1382
|
iconStyle = "regular",
|
|
1253
1383
|
className,
|
|
@@ -1850,9 +1980,9 @@ var import_clsx6 = require("clsx");
|
|
|
1850
1980
|
var import_react4 = require("react");
|
|
1851
1981
|
|
|
1852
1982
|
// src/components/SearchField/style.ts
|
|
1853
|
-
var
|
|
1854
|
-
var searchFieldLeadingIconSize =
|
|
1855
|
-
var searchFieldClearIconSize =
|
|
1983
|
+
var import_tokens5 = require("@refineui/tokens");
|
|
1984
|
+
var searchFieldLeadingIconSize = import_tokens5.iconSizes.medium;
|
|
1985
|
+
var searchFieldClearIconSize = import_tokens5.iconSizes.small;
|
|
1856
1986
|
var searchFieldStyles = {
|
|
1857
1987
|
root: [
|
|
1858
1988
|
"box-border flex w-full min-w-0 items-center gap-refineui-size-x-small overflow-hidden outline-none",
|
|
@@ -2321,7 +2451,7 @@ function CardFooter({ className, ...props }) {
|
|
|
2321
2451
|
// src/components/Checkbox/Checkbox.tsx
|
|
2322
2452
|
var import_clsx21 = require("clsx");
|
|
2323
2453
|
var import_react5 = require("react");
|
|
2324
|
-
var
|
|
2454
|
+
var import_tokens6 = require("@refineui/tokens");
|
|
2325
2455
|
var import_color2 = require("@refineui/utilities/color");
|
|
2326
2456
|
|
|
2327
2457
|
// src/components/Label/style.ts
|
|
@@ -2437,7 +2567,7 @@ function Checkbox({
|
|
|
2437
2567
|
WebIcon,
|
|
2438
2568
|
{
|
|
2439
2569
|
name: "checkmark",
|
|
2440
|
-
size:
|
|
2570
|
+
size: import_tokens6.iconSizes.small,
|
|
2441
2571
|
color: checkColor,
|
|
2442
2572
|
iconStyle: "filled"
|
|
2443
2573
|
}
|
|
@@ -2598,7 +2728,7 @@ function Radio({
|
|
|
2598
2728
|
var import_clsx28 = require("clsx");
|
|
2599
2729
|
var import_react11 = require("react");
|
|
2600
2730
|
var import_react_dom = require("react-dom");
|
|
2601
|
-
var
|
|
2731
|
+
var import_tokens8 = require("@refineui/tokens");
|
|
2602
2732
|
var import_react12 = require("@refineui/utilities/react");
|
|
2603
2733
|
|
|
2604
2734
|
// src/components/ScrollArea/ScrollAreaRegion.tsx
|
|
@@ -2612,8 +2742,8 @@ var import_react9 = require("@refineui/utilities/react");
|
|
|
2612
2742
|
|
|
2613
2743
|
// src/components/ScrollArea/style.ts
|
|
2614
2744
|
var import_clsx24 = require("clsx");
|
|
2615
|
-
var
|
|
2616
|
-
var SCROLL_AREA_THUMB_MIN_PX = Number.parseFloat(
|
|
2745
|
+
var import_tokens7 = require("@refineui/tokens");
|
|
2746
|
+
var SCROLL_AREA_THUMB_MIN_PX = Number.parseFloat(import_tokens7.spacings.sizeXLarge);
|
|
2617
2747
|
var scrollAreaStyles = {
|
|
2618
2748
|
root: "box-border min-h-0 min-w-0 overflow-hidden outline-none",
|
|
2619
2749
|
/**
|
|
@@ -3110,8 +3240,8 @@ function parsePx(px, fallback) {
|
|
|
3110
3240
|
const n = Number.parseFloat(px);
|
|
3111
3241
|
return Number.isFinite(n) ? n : fallback;
|
|
3112
3242
|
}
|
|
3113
|
-
var SIDE_OFFSET = parsePx(
|
|
3114
|
-
var CONTENT_MARGIN = parsePx(
|
|
3243
|
+
var SIDE_OFFSET = parsePx(import_tokens3.foundationSizes.foundationSize40, 4);
|
|
3244
|
+
var CONTENT_MARGIN = parsePx(import_tokens3.foundationSizes.foundationSize100, 10);
|
|
3115
3245
|
function clampNumber(value, [minB, maxB]) {
|
|
3116
3246
|
return Math.min(Math.max(value, minB), maxB);
|
|
3117
3247
|
}
|
|
@@ -3384,7 +3514,7 @@ var SelectTrigger = (0, import_react11.forwardRef)(function SelectTrigger2(props
|
|
|
3384
3514
|
WebIcon,
|
|
3385
3515
|
{
|
|
3386
3516
|
name: "chevron-down",
|
|
3387
|
-
size:
|
|
3517
|
+
size: import_tokens8.iconSizes.xsmall,
|
|
3388
3518
|
color: "currentColor",
|
|
3389
3519
|
className: (0, import_clsx28.clsx)(selectStyles.chevron, open && selectStyles.chevronOpen),
|
|
3390
3520
|
"aria-hidden": true
|
|
@@ -3401,7 +3531,7 @@ function SelectValue({ placeholder, className, ...props }) {
|
|
|
3401
3531
|
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { "data-refineui-select-value": "", className: (0, import_clsx28.clsx)(selectStyles.value, !label && "text-refineui-alias-foreground-placeholder", className), ...props, children: label || placeholder || rootPlaceholder || "Select..." });
|
|
3402
3532
|
}
|
|
3403
3533
|
function SelectIcon({ children, className, ...props }) {
|
|
3404
|
-
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: (0, import_clsx28.clsx)(selectStyles.iconWrap, className), ...props, children: children ?? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(WebIcon, { name: "chevron-down", size:
|
|
3534
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: (0, import_clsx28.clsx)(selectStyles.iconWrap, className), ...props, children: children ?? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(WebIcon, { name: "chevron-down", size: import_tokens8.iconSizes.xsmall }) });
|
|
3405
3535
|
}
|
|
3406
3536
|
function SelectPortal({ children, container }) {
|
|
3407
3537
|
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(PortalContainerContext.Provider, { value: container ?? void 0, children });
|
|
@@ -3525,7 +3655,7 @@ var SelectContent = (0, import_react11.forwardRef)(function SelectContent2(props
|
|
|
3525
3655
|
const triggerRect = triggerRef.current.getBoundingClientRect();
|
|
3526
3656
|
const vw = window.innerWidth;
|
|
3527
3657
|
const vh = window.innerHeight;
|
|
3528
|
-
const minW = parsePx(
|
|
3658
|
+
const minW = parsePx(import_tokens3.componentSizes.dropdownMenuWidth, 180);
|
|
3529
3659
|
const width = Math.min(Math.max(triggerRect.width, minW), vw - 2 * CONTENT_MARGIN);
|
|
3530
3660
|
const left = clampNumber(triggerRect.left, [CONTENT_MARGIN, Math.max(CONTENT_MARGIN, vw - width - CONTENT_MARGIN)]);
|
|
3531
3661
|
const gap2 = SIDE_OFFSET;
|
|
@@ -3843,7 +3973,7 @@ function SelectItem({
|
|
|
3843
3973
|
{
|
|
3844
3974
|
className: (0, import_clsx28.clsx)(selectStyles.itemIndicator, disabled && "text-refineui-alias-foreground-disabled"),
|
|
3845
3975
|
"aria-hidden": true,
|
|
3846
|
-
children: isSelected ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(WebIcon, { name: "checkmark", size:
|
|
3976
|
+
children: isSelected ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(WebIcon, { name: "checkmark", size: import_tokens8.iconSizes.xsmall }) : null
|
|
3847
3977
|
}
|
|
3848
3978
|
),
|
|
3849
3979
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { "data-refineui-select-item-text": true, className: selectStyles.itemText, children })
|
|
@@ -3925,7 +4055,7 @@ function Toggle({
|
|
|
3925
4055
|
var import_clsx30 = require("clsx");
|
|
3926
4056
|
|
|
3927
4057
|
// src/recipes/chip.recipe.ts
|
|
3928
|
-
var
|
|
4058
|
+
var import_tokens9 = require("@refineui/tokens");
|
|
3929
4059
|
var chipVariantClass = {
|
|
3930
4060
|
default: "border-none bg-refineui-alias-background-surface text-refineui-alias-foreground-brand",
|
|
3931
4061
|
outline: "border-refineui-thin border-refineui-alias-border-default box-border bg-transparent text-refineui-alias-foreground-brand",
|
|
@@ -3943,9 +4073,9 @@ var chipSizeClass = {
|
|
|
3943
4073
|
};
|
|
3944
4074
|
var chipSizeTypo = buildSemanticTextClassMap(componentTypographyTokens.chip);
|
|
3945
4075
|
var chipSizeIcon = {
|
|
3946
|
-
sm:
|
|
3947
|
-
md:
|
|
3948
|
-
lg:
|
|
4076
|
+
sm: import_tokens9.iconSizes.xxsmall,
|
|
4077
|
+
md: import_tokens9.iconSizes.xsmall,
|
|
4078
|
+
lg: import_tokens9.iconSizes.small
|
|
3949
4079
|
};
|
|
3950
4080
|
var chipRecipe = defineRecipe({
|
|
3951
4081
|
name: "chip",
|
|
@@ -4026,13 +4156,13 @@ function Chip({
|
|
|
4026
4156
|
// src/components/Command/Command.tsx
|
|
4027
4157
|
var import_clsx34 = require("clsx");
|
|
4028
4158
|
var import_react15 = require("react");
|
|
4029
|
-
var
|
|
4159
|
+
var import_tokens12 = require("@refineui/tokens");
|
|
4030
4160
|
|
|
4031
4161
|
// src/components/Dialog/Dialog.tsx
|
|
4032
4162
|
var import_clsx32 = require("clsx");
|
|
4033
4163
|
var import_react14 = require("react");
|
|
4034
4164
|
var import_react_dom2 = require("react-dom");
|
|
4035
|
-
var
|
|
4165
|
+
var import_tokens10 = require("@refineui/tokens");
|
|
4036
4166
|
var import_animation = require("@refineui/utilities/animation");
|
|
4037
4167
|
var import_color3 = require("@refineui/utilities/color");
|
|
4038
4168
|
|
|
@@ -4130,9 +4260,9 @@ var dialogStyles = {
|
|
|
4130
4260
|
|
|
4131
4261
|
// src/components/Dialog/Dialog.tsx
|
|
4132
4262
|
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
4133
|
-
var PANEL_MS = (0, import_animation.motionMsToNumber)(
|
|
4134
|
-
var SCRIM_MS = (0, import_animation.motionMsToNumber)(
|
|
4135
|
-
var EASING =
|
|
4263
|
+
var PANEL_MS = (0, import_animation.motionMsToNumber)(import_tokens10.semanticInteraction.duration.panel);
|
|
4264
|
+
var SCRIM_MS = (0, import_animation.motionMsToNumber)(import_tokens10.semanticInteraction.duration.overlay);
|
|
4265
|
+
var EASING = import_tokens10.semanticInteraction.easing.panel;
|
|
4136
4266
|
var DialogContext = (0, import_react14.createContext)(null);
|
|
4137
4267
|
function useDialogContext(component) {
|
|
4138
4268
|
const ctx = (0, import_react14.useContext)(DialogContext);
|
|
@@ -4225,7 +4355,7 @@ function DialogContent({ className, style, container, scrollable = true, childre
|
|
|
4225
4355
|
transform: entered ? "scale(1) translateY(0)" : "scale(var(--refineui-motion-scale-enter)) translateY(var(--refineui-spacing-size-small))",
|
|
4226
4356
|
transition: `opacity ${PANEL_MS}ms ${EASING}, transform ${PANEL_MS}ms ${EASING}`,
|
|
4227
4357
|
willChange: "opacity, transform",
|
|
4228
|
-
maxWidth: size === "lg" ?
|
|
4358
|
+
maxWidth: size === "lg" ? import_tokens3.componentSizes.dialogMaxWidth : import_tokens3.componentSizes.dialogWidthSm
|
|
4229
4359
|
};
|
|
4230
4360
|
const panelBody = scrollable ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4231
4361
|
ScrollAreaRegion,
|
|
@@ -4343,15 +4473,15 @@ function DialogClose({ className, onClick, type = "button", ...props }) {
|
|
|
4343
4473
|
onClick?.(e);
|
|
4344
4474
|
if (!e.defaultPrevented) setOpen(false);
|
|
4345
4475
|
},
|
|
4346
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(WebIcon, { name: "dismiss", size:
|
|
4476
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(WebIcon, { name: "dismiss", size: import_tokens10.iconSizes.small, color: "currentColor", iconStyle: "regular", "aria-hidden": true })
|
|
4347
4477
|
}
|
|
4348
4478
|
);
|
|
4349
4479
|
}
|
|
4350
4480
|
|
|
4351
4481
|
// src/components/Command/style.ts
|
|
4352
4482
|
var import_clsx33 = require("clsx");
|
|
4353
|
-
var
|
|
4354
|
-
var COMMAND_LIST_MAX_HEIGHT = `min(60vh, ${
|
|
4483
|
+
var import_tokens11 = require("@refineui/tokens");
|
|
4484
|
+
var COMMAND_LIST_MAX_HEIGHT = `min(60vh, ${import_tokens11.foundationSizes.foundationSize3200})`;
|
|
4355
4485
|
var commandStyles = {
|
|
4356
4486
|
root: (0, import_clsx33.clsx)(
|
|
4357
4487
|
"flex w-full flex-col overflow-hidden outline-none",
|
|
@@ -4900,9 +5030,9 @@ var CommandItem = (0, import_react15.forwardRef)(function CommandItem2({
|
|
|
4900
5030
|
{
|
|
4901
5031
|
className: commandStyles.iconWrap,
|
|
4902
5032
|
style: {
|
|
4903
|
-
width:
|
|
4904
|
-
minWidth:
|
|
4905
|
-
height:
|
|
5033
|
+
width: import_tokens12.iconSizes.small,
|
|
5034
|
+
minWidth: import_tokens12.iconSizes.small,
|
|
5035
|
+
height: import_tokens12.iconSizes.small
|
|
4906
5036
|
},
|
|
4907
5037
|
children: startIcon
|
|
4908
5038
|
}
|
|
@@ -4916,9 +5046,9 @@ var CommandItem = (0, import_react15.forwardRef)(function CommandItem2({
|
|
|
4916
5046
|
{
|
|
4917
5047
|
className: commandStyles.iconWrap,
|
|
4918
5048
|
style: {
|
|
4919
|
-
width:
|
|
4920
|
-
minWidth:
|
|
4921
|
-
height:
|
|
5049
|
+
width: import_tokens12.iconSizes.small,
|
|
5050
|
+
minWidth: import_tokens12.iconSizes.small,
|
|
5051
|
+
height: import_tokens12.iconSizes.small
|
|
4922
5052
|
},
|
|
4923
5053
|
children: endIcon
|
|
4924
5054
|
}
|
|
@@ -4938,7 +5068,7 @@ var import_react17 = require("react");
|
|
|
4938
5068
|
var import_color6 = require("@refineui/utilities/color");
|
|
4939
5069
|
|
|
4940
5070
|
// src/components/Avatar/avatarStyles.ts
|
|
4941
|
-
var
|
|
5071
|
+
var import_tokens13 = require("@refineui/tokens");
|
|
4942
5072
|
var import_color4 = require("@refineui/utilities/color");
|
|
4943
5073
|
var avatarSizeAliasMap = {
|
|
4944
5074
|
"3xs": "xxxsmall",
|
|
@@ -5003,15 +5133,15 @@ var avatarTypoNeutral = buildSemanticTextClassMap(
|
|
|
5003
5133
|
componentTypographyTokens.avatar.initialsNeutral
|
|
5004
5134
|
);
|
|
5005
5135
|
var avatarIconSlotSize = {
|
|
5006
|
-
xxxsmall:
|
|
5007
|
-
xxsmall:
|
|
5008
|
-
xsmall:
|
|
5009
|
-
small:
|
|
5010
|
-
medium:
|
|
5011
|
-
large:
|
|
5012
|
-
xlarge:
|
|
5013
|
-
xxlarge:
|
|
5014
|
-
xxxlarge:
|
|
5136
|
+
xxxsmall: import_tokens13.iconSizes.xxsmall,
|
|
5137
|
+
xxsmall: import_tokens13.iconSizes.xsmall,
|
|
5138
|
+
xsmall: import_tokens13.iconSizes.small,
|
|
5139
|
+
small: import_tokens13.iconSizes.small,
|
|
5140
|
+
medium: import_tokens13.iconSizes.medium,
|
|
5141
|
+
large: import_tokens13.iconSizes.medium,
|
|
5142
|
+
xlarge: import_tokens13.iconSizes.large,
|
|
5143
|
+
xxlarge: import_tokens13.iconSizes.xlarge,
|
|
5144
|
+
xxxlarge: import_tokens13.iconSizes.xxlarge
|
|
5015
5145
|
};
|
|
5016
5146
|
var AVATAR_INNER_MASK = "relative flex size-full min-h-0 min-w-0 items-center justify-center overflow-hidden rounded-refineui-circle";
|
|
5017
5147
|
function initialsAccentTypo(size) {
|
|
@@ -5076,15 +5206,15 @@ var defaultPersonIconColor = {
|
|
|
5076
5206
|
yellow: (0, import_color4.resolveColorTokenValue)(componentColorTokens.avatar.icon.yellow)
|
|
5077
5207
|
};
|
|
5078
5208
|
var avatarOverflowIconSize = {
|
|
5079
|
-
xxxsmall:
|
|
5080
|
-
xxsmall:
|
|
5081
|
-
xsmall:
|
|
5082
|
-
small:
|
|
5083
|
-
medium:
|
|
5084
|
-
large:
|
|
5085
|
-
xlarge:
|
|
5086
|
-
xxlarge:
|
|
5087
|
-
xxxlarge:
|
|
5209
|
+
xxxsmall: import_tokens13.iconSizes.xsmall,
|
|
5210
|
+
xxsmall: import_tokens13.iconSizes.xsmall,
|
|
5211
|
+
xsmall: import_tokens13.iconSizes.small,
|
|
5212
|
+
small: import_tokens13.iconSizes.small,
|
|
5213
|
+
medium: import_tokens13.iconSizes.medium,
|
|
5214
|
+
large: import_tokens13.iconSizes.medium,
|
|
5215
|
+
xlarge: import_tokens13.iconSizes.large,
|
|
5216
|
+
xxlarge: import_tokens13.iconSizes.xlarge,
|
|
5217
|
+
xxxlarge: import_tokens13.iconSizes.xxlarge
|
|
5088
5218
|
};
|
|
5089
5219
|
var avatarSpreadGap = {
|
|
5090
5220
|
xxxsmall: "gap-refineui-size-xx-small",
|
|
@@ -5489,7 +5619,7 @@ function Avatars({
|
|
|
5489
5619
|
|
|
5490
5620
|
// src/components/Alert/Alert.tsx
|
|
5491
5621
|
var import_clsx38 = require("clsx");
|
|
5492
|
-
var
|
|
5622
|
+
var import_tokens14 = require("@refineui/tokens");
|
|
5493
5623
|
|
|
5494
5624
|
// src/components/Alert/context.ts
|
|
5495
5625
|
var import_react18 = require("react");
|
|
@@ -5512,31 +5642,31 @@ var variantSlotClasses = {
|
|
|
5512
5642
|
root: "bg-refineui-alias-background-primary",
|
|
5513
5643
|
icon: "text-refineui-alias-foreground-info",
|
|
5514
5644
|
title: "text-refineui-alias-foreground-info",
|
|
5515
|
-
description: "text-refineui-alias-
|
|
5645
|
+
description: "text-refineui-alias-foreground-info"
|
|
5516
5646
|
},
|
|
5517
5647
|
success: {
|
|
5518
5648
|
root: "bg-refineui-alias-background-primary",
|
|
5519
5649
|
icon: "text-refineui-alias-foreground-success",
|
|
5520
5650
|
title: "text-refineui-alias-foreground-success",
|
|
5521
|
-
description: "text-refineui-alias-
|
|
5651
|
+
description: "text-refineui-alias-foreground-success"
|
|
5522
5652
|
},
|
|
5523
5653
|
warning: {
|
|
5524
5654
|
root: "bg-refineui-alias-background-primary",
|
|
5525
5655
|
icon: "text-refineui-alias-foreground-warning",
|
|
5526
5656
|
title: "text-refineui-alias-foreground-warning",
|
|
5527
|
-
description: "text-refineui-alias-
|
|
5657
|
+
description: "text-refineui-alias-foreground-warning"
|
|
5528
5658
|
},
|
|
5529
5659
|
danger: {
|
|
5530
|
-
root: "bg-refineui-alias-background-
|
|
5660
|
+
root: "bg-refineui-alias-background-primary",
|
|
5531
5661
|
icon: "text-refineui-alias-foreground-error",
|
|
5532
5662
|
title: "text-refineui-alias-foreground-error",
|
|
5533
|
-
description: "text-refineui-alias-
|
|
5663
|
+
description: "text-refineui-alias-foreground-error"
|
|
5534
5664
|
},
|
|
5535
5665
|
custom: {
|
|
5536
5666
|
root: "bg-refineui-alias-background-primary",
|
|
5537
5667
|
icon: "text-refineui-alias-foreground-discovery",
|
|
5538
5668
|
title: "text-refineui-alias-foreground-discovery",
|
|
5539
|
-
description: "text-refineui-alias-
|
|
5669
|
+
description: "text-refineui-alias-foreground-discovery"
|
|
5540
5670
|
}
|
|
5541
5671
|
};
|
|
5542
5672
|
var alertRecipe = defineSlotRecipe({
|
|
@@ -5614,7 +5744,7 @@ function AlertIcon({ className, name, children, ...props }) {
|
|
|
5614
5744
|
"data-refineui": "alert-icon",
|
|
5615
5745
|
className: (0, import_clsx38.clsx)(resolveAlertSlotClasses("icon", variant), className),
|
|
5616
5746
|
...props,
|
|
5617
|
-
children: children ?? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(WebIcon, { name: iconName, size:
|
|
5747
|
+
children: children ?? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(WebIcon, { name: iconName, size: import_tokens14.iconSizes.medium, color: "currentColor", fallback: "\u25CF", "aria-hidden": true })
|
|
5618
5748
|
}
|
|
5619
5749
|
);
|
|
5620
5750
|
}
|
|
@@ -5691,7 +5821,7 @@ function AlertClose({ className, type = "button", children, ...props }) {
|
|
|
5691
5821
|
WebIcon,
|
|
5692
5822
|
{
|
|
5693
5823
|
name: "dismiss",
|
|
5694
|
-
size:
|
|
5824
|
+
size: import_tokens14.iconSizes.small,
|
|
5695
5825
|
color: "currentColor",
|
|
5696
5826
|
iconStyle: "regular",
|
|
5697
5827
|
fallback: "\xD7",
|
|
@@ -6242,11 +6372,15 @@ function TabsList({ className, children, ...props }) {
|
|
|
6242
6372
|
width: 0,
|
|
6243
6373
|
ready: false
|
|
6244
6374
|
});
|
|
6375
|
+
const [animate, setAnimate] = (0, import_react20.useState)(false);
|
|
6376
|
+
const hasMeasuredRef = (0, import_react20.useRef)(false);
|
|
6245
6377
|
const updateIndicator = (0, import_react20.useCallback)(() => {
|
|
6246
6378
|
const list = tabListRef.current;
|
|
6247
6379
|
if (!list) return;
|
|
6248
6380
|
const selected = list.querySelector(`${TRIGGER_SELECTOR}[data-selected="true"]`);
|
|
6249
6381
|
if (!selected) {
|
|
6382
|
+
hasMeasuredRef.current = false;
|
|
6383
|
+
setAnimate(false);
|
|
6250
6384
|
setIndicator((prev) => ({ ...prev, width: 0, ready: false }));
|
|
6251
6385
|
return;
|
|
6252
6386
|
}
|
|
@@ -6259,6 +6393,18 @@ function TabsList({ className, children, ...props }) {
|
|
|
6259
6393
|
(0, import_react20.useLayoutEffect)(() => {
|
|
6260
6394
|
updateIndicator();
|
|
6261
6395
|
}, [updateIndicator, selectedValue, children]);
|
|
6396
|
+
(0, import_react20.useEffect)(() => {
|
|
6397
|
+
if (!indicator.ready || hasMeasuredRef.current) return;
|
|
6398
|
+
hasMeasuredRef.current = true;
|
|
6399
|
+
let raf2 = 0;
|
|
6400
|
+
const raf1 = requestAnimationFrame(() => {
|
|
6401
|
+
raf2 = requestAnimationFrame(() => setAnimate(true));
|
|
6402
|
+
});
|
|
6403
|
+
return () => {
|
|
6404
|
+
cancelAnimationFrame(raf1);
|
|
6405
|
+
cancelAnimationFrame(raf2);
|
|
6406
|
+
};
|
|
6407
|
+
}, [indicator.ready]);
|
|
6262
6408
|
(0, import_react20.useEffect)(() => {
|
|
6263
6409
|
const list = tabListRef.current;
|
|
6264
6410
|
if (!list) return;
|
|
@@ -6294,6 +6440,7 @@ function TabsList({ className, children, ...props }) {
|
|
|
6294
6440
|
{
|
|
6295
6441
|
"data-refineui": "tabs-indicator",
|
|
6296
6442
|
"data-ready": indicator.ready ? "true" : void 0,
|
|
6443
|
+
"data-animate": animate ? "true" : void 0,
|
|
6297
6444
|
"aria-hidden": true,
|
|
6298
6445
|
className: tabsStyles.indicator,
|
|
6299
6446
|
style: indicatorStyle
|
|
@@ -6501,6 +6648,8 @@ function SegmentedControl({
|
|
|
6501
6648
|
width: 0,
|
|
6502
6649
|
ready: false
|
|
6503
6650
|
});
|
|
6651
|
+
const [animate, setAnimate] = (0, import_react21.useState)(false);
|
|
6652
|
+
const hasMeasuredRef = (0, import_react21.useRef)(false);
|
|
6504
6653
|
const updateIndicator = (0, import_react21.useCallback)(() => {
|
|
6505
6654
|
const group = groupRef.current;
|
|
6506
6655
|
if (!group) return;
|
|
@@ -6508,6 +6657,8 @@ function SegmentedControl({
|
|
|
6508
6657
|
`${ITEM_SELECTOR}[data-selected="true"]`
|
|
6509
6658
|
);
|
|
6510
6659
|
if (!selected) {
|
|
6660
|
+
hasMeasuredRef.current = false;
|
|
6661
|
+
setAnimate(false);
|
|
6511
6662
|
setIndicator((prev) => ({ ...prev, width: 0, ready: false }));
|
|
6512
6663
|
return;
|
|
6513
6664
|
}
|
|
@@ -6520,6 +6671,18 @@ function SegmentedControl({
|
|
|
6520
6671
|
(0, import_react21.useLayoutEffect)(() => {
|
|
6521
6672
|
updateIndicator();
|
|
6522
6673
|
}, [updateIndicator, selectedValue, children]);
|
|
6674
|
+
(0, import_react21.useEffect)(() => {
|
|
6675
|
+
if (!indicator.ready || hasMeasuredRef.current) return;
|
|
6676
|
+
hasMeasuredRef.current = true;
|
|
6677
|
+
let raf2 = 0;
|
|
6678
|
+
const raf1 = requestAnimationFrame(() => {
|
|
6679
|
+
raf2 = requestAnimationFrame(() => setAnimate(true));
|
|
6680
|
+
});
|
|
6681
|
+
return () => {
|
|
6682
|
+
cancelAnimationFrame(raf1);
|
|
6683
|
+
cancelAnimationFrame(raf2);
|
|
6684
|
+
};
|
|
6685
|
+
}, [indicator.ready]);
|
|
6523
6686
|
(0, import_react21.useEffect)(() => {
|
|
6524
6687
|
const group = groupRef.current;
|
|
6525
6688
|
if (!group) return;
|
|
@@ -6555,6 +6718,7 @@ function SegmentedControl({
|
|
|
6555
6718
|
{
|
|
6556
6719
|
"data-refineui": "segmented-control-indicator",
|
|
6557
6720
|
"data-ready": indicator.ready ? "true" : void 0,
|
|
6721
|
+
"data-animate": animate ? "true" : void 0,
|
|
6558
6722
|
"aria-hidden": true,
|
|
6559
6723
|
className: segmentedControlStyles.indicator,
|
|
6560
6724
|
style: indicatorStyle
|
|
@@ -6726,14 +6890,14 @@ var import_clsx51 = require("clsx");
|
|
|
6726
6890
|
|
|
6727
6891
|
// src/components/Accordion/context.ts
|
|
6728
6892
|
var import_react23 = require("react");
|
|
6729
|
-
var
|
|
6893
|
+
var import_tokens15 = require("@refineui/tokens");
|
|
6730
6894
|
var import_animation2 = require("@refineui/utilities/animation");
|
|
6731
6895
|
var AccordionContext = (0, import_react23.createContext)(null);
|
|
6732
6896
|
var AccordionItemContext = (0, import_react23.createContext)(null);
|
|
6733
|
-
var PANEL_HEIGHT_MS = Number.parseFloat(
|
|
6734
|
-
var PANEL_CONTENT_MS = Number.parseFloat(
|
|
6735
|
-
var PANEL_HEIGHT_EASE =
|
|
6736
|
-
var PANEL_CONTENT_EASE =
|
|
6897
|
+
var PANEL_HEIGHT_MS = Number.parseFloat(import_tokens15.semanticInteraction.duration.accordionPanel) / 1e3;
|
|
6898
|
+
var PANEL_CONTENT_MS = Number.parseFloat(import_tokens15.semanticInteraction.duration.accordionContent) / 1e3;
|
|
6899
|
+
var PANEL_HEIGHT_EASE = import_tokens15.semanticInteraction.easing.panel;
|
|
6900
|
+
var PANEL_CONTENT_EASE = import_tokens15.semanticInteraction.easing.content;
|
|
6737
6901
|
function usePrefersReducedMotion() {
|
|
6738
6902
|
const [reduce, setReduce] = (0, import_react23.useState)(false);
|
|
6739
6903
|
(0, import_react23.useEffect)(() => {
|
|
@@ -6752,7 +6916,7 @@ function toSet(value, type) {
|
|
|
6752
6916
|
}
|
|
6753
6917
|
|
|
6754
6918
|
// src/recipes/accordion.recipe.ts
|
|
6755
|
-
var
|
|
6919
|
+
var import_tokens16 = require("@refineui/tokens");
|
|
6756
6920
|
var accordionRecipe = defineSlotRecipe({
|
|
6757
6921
|
name: "accordion",
|
|
6758
6922
|
slots: ["root", "item", "trigger", "triggerRow", "chevron", "panel", "panelPad", "content"],
|
|
@@ -6791,9 +6955,9 @@ var accordionStyles = {
|
|
|
6791
6955
|
panelBody: accordionRecipe.base.content
|
|
6792
6956
|
};
|
|
6793
6957
|
var accordionIconSize = {
|
|
6794
|
-
sm:
|
|
6795
|
-
md:
|
|
6796
|
-
lg:
|
|
6958
|
+
sm: import_tokens16.iconSizes.xsmall,
|
|
6959
|
+
md: import_tokens16.iconSizes.small,
|
|
6960
|
+
lg: import_tokens16.iconSizes.medium
|
|
6797
6961
|
};
|
|
6798
6962
|
var triggerTypo = {
|
|
6799
6963
|
sm: sizedComponentTextClass(componentTypographyTokens.accordion.trigger, "sm"),
|
|
@@ -7027,7 +7191,7 @@ function AccordionContent({ className, children, ...props }) {
|
|
|
7027
7191
|
// src/components/Breadcrumb/Breadcrumb.tsx
|
|
7028
7192
|
var import_clsx55 = require("clsx");
|
|
7029
7193
|
var import_react28 = require("react");
|
|
7030
|
-
var
|
|
7194
|
+
var import_tokens17 = require("@refineui/tokens");
|
|
7031
7195
|
|
|
7032
7196
|
// src/components/Breadcrumb/style.ts
|
|
7033
7197
|
var breadcrumbStyles = {
|
|
@@ -7127,7 +7291,7 @@ function BreadcrumbEllipsis({ className, ...props }) {
|
|
|
7127
7291
|
WebIcon,
|
|
7128
7292
|
{
|
|
7129
7293
|
name: "more-horizontal",
|
|
7130
|
-
size:
|
|
7294
|
+
size: import_tokens17.iconSizes.small,
|
|
7131
7295
|
color: "currentColor",
|
|
7132
7296
|
fallback: "\u22EF",
|
|
7133
7297
|
className: "items-center justify-center"
|
|
@@ -7153,7 +7317,7 @@ var BreadcrumbEllipsisTrigger = (0, import_react28.forwardRef)(
|
|
|
7153
7317
|
WebIcon,
|
|
7154
7318
|
{
|
|
7155
7319
|
name: "more-horizontal",
|
|
7156
|
-
size:
|
|
7320
|
+
size: import_tokens17.iconSizes.small,
|
|
7157
7321
|
color: "currentColor",
|
|
7158
7322
|
fallback: "\u22EF",
|
|
7159
7323
|
className: "items-center justify-center"
|
|
@@ -7413,7 +7577,7 @@ function FooterSocial({ className, ...props }) {
|
|
|
7413
7577
|
// src/components/Calendar/Calendar.tsx
|
|
7414
7578
|
var import_clsx59 = require("clsx");
|
|
7415
7579
|
var import_react30 = require("react");
|
|
7416
|
-
var
|
|
7580
|
+
var import_tokens18 = require("@refineui/tokens");
|
|
7417
7581
|
|
|
7418
7582
|
// src/components/Calendar/style.ts
|
|
7419
7583
|
var import_clsx58 = require("clsx");
|
|
@@ -7742,7 +7906,7 @@ function Calendar({
|
|
|
7742
7906
|
"aria-label": "Previous month",
|
|
7743
7907
|
className: calendarStyles.navButton,
|
|
7744
7908
|
onClick: () => setView(new Date(year, month - 1)),
|
|
7745
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(WebIcon, { name: "chevron-left", size:
|
|
7909
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(WebIcon, { name: "chevron-left", size: import_tokens18.iconSizes.small, color: "currentColor", fallback: "\u2039" })
|
|
7746
7910
|
}
|
|
7747
7911
|
),
|
|
7748
7912
|
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
@@ -7782,7 +7946,7 @@ function Calendar({
|
|
|
7782
7946
|
"aria-label": "Next month",
|
|
7783
7947
|
className: calendarStyles.navButton,
|
|
7784
7948
|
onClick: () => setView(new Date(year, month + 1)),
|
|
7785
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(WebIcon, { name: "chevron-right", size:
|
|
7949
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(WebIcon, { name: "chevron-right", size: import_tokens18.iconSizes.small, color: "currentColor", fallback: "\u203A" })
|
|
7786
7950
|
}
|
|
7787
7951
|
)
|
|
7788
7952
|
] }),
|
|
@@ -7842,8 +8006,8 @@ function DividerCircleGlyph() {
|
|
|
7842
8006
|
"aria-hidden": true,
|
|
7843
8007
|
className: dividerStyles.iconCircle,
|
|
7844
8008
|
style: {
|
|
7845
|
-
width:
|
|
7846
|
-
height:
|
|
8009
|
+
width: import_tokens3.componentSizes.dividerIconCircleDiameter,
|
|
8010
|
+
height: import_tokens3.componentSizes.dividerIconCircleDiameter
|
|
7847
8011
|
}
|
|
7848
8012
|
}
|
|
7849
8013
|
);
|
|
@@ -8216,7 +8380,7 @@ function Spacer({ className, ...props }) {
|
|
|
8216
8380
|
var import_clsx68 = require("clsx");
|
|
8217
8381
|
var import_react31 = require("react");
|
|
8218
8382
|
var import_react_dom3 = require("react-dom");
|
|
8219
|
-
var
|
|
8383
|
+
var import_tokens19 = require("@refineui/tokens");
|
|
8220
8384
|
var import_animation3 = require("@refineui/utilities/animation");
|
|
8221
8385
|
var import_color7 = require("@refineui/utilities/color");
|
|
8222
8386
|
var import_react32 = require("@refineui/utilities/react");
|
|
@@ -8257,9 +8421,9 @@ var drawerStyles = {
|
|
|
8257
8421
|
|
|
8258
8422
|
// src/components/Drawer/Drawer.tsx
|
|
8259
8423
|
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
8260
|
-
var PANEL_MS2 = (0, import_animation3.motionMsToNumber)(
|
|
8261
|
-
var SCRIM_MS2 = (0, import_animation3.motionMsToNumber)(
|
|
8262
|
-
var EASING2 =
|
|
8424
|
+
var PANEL_MS2 = (0, import_animation3.motionMsToNumber)(import_tokens19.semanticInteraction.duration.panel);
|
|
8425
|
+
var SCRIM_MS2 = (0, import_animation3.motionMsToNumber)(import_tokens19.semanticInteraction.duration.overlay);
|
|
8426
|
+
var EASING2 = import_tokens19.semanticInteraction.easing.panel;
|
|
8263
8427
|
var DrawerContext = (0, import_react31.createContext)(null);
|
|
8264
8428
|
function useDrawerContext(component) {
|
|
8265
8429
|
const ctx = (0, import_react31.useContext)(DrawerContext);
|
|
@@ -8282,11 +8446,11 @@ function useDrawerOpenState(openProp, defaultOpen, onOpenChange) {
|
|
|
8282
8446
|
function widthToken(s) {
|
|
8283
8447
|
switch (s) {
|
|
8284
8448
|
case "md":
|
|
8285
|
-
return
|
|
8449
|
+
return import_tokens3.componentSizes.drawerWidthMd;
|
|
8286
8450
|
case "lg":
|
|
8287
|
-
return
|
|
8451
|
+
return import_tokens3.componentSizes.drawerWidthLg;
|
|
8288
8452
|
default:
|
|
8289
|
-
return
|
|
8453
|
+
return import_tokens3.componentSizes.drawerWidthSm;
|
|
8290
8454
|
}
|
|
8291
8455
|
}
|
|
8292
8456
|
function Drawer({
|
|
@@ -8592,7 +8756,7 @@ function DrawerClose({
|
|
|
8592
8756
|
onClick?.(e);
|
|
8593
8757
|
if (!e.defaultPrevented) setOpen(false);
|
|
8594
8758
|
},
|
|
8595
|
-
children: iconOnly ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(WebIcon, { name: "dismiss", size:
|
|
8759
|
+
children: iconOnly ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(WebIcon, { name: "dismiss", size: import_tokens19.iconSizes.xlarge, color: "currentColor", iconStyle: "regular", "aria-hidden": true }) : children
|
|
8596
8760
|
}
|
|
8597
8761
|
);
|
|
8598
8762
|
}
|
|
@@ -8601,7 +8765,7 @@ function DrawerClose({
|
|
|
8601
8765
|
var import_clsx70 = require("clsx");
|
|
8602
8766
|
var import_react34 = require("react");
|
|
8603
8767
|
var import_react_dom4 = require("react-dom");
|
|
8604
|
-
var
|
|
8768
|
+
var import_tokens20 = require("@refineui/tokens");
|
|
8605
8769
|
var import_color8 = require("@refineui/utilities/color");
|
|
8606
8770
|
|
|
8607
8771
|
// src/components/Dropdown/style.ts
|
|
@@ -8870,9 +9034,9 @@ function DropdownContent({
|
|
|
8870
9034
|
const { open, setOpen, close, triggerRef, menuRef, menuId } = useDropdownRoot("DropdownContent");
|
|
8871
9035
|
const [fixedStyle, setFixedStyle] = (0, import_react34.useState)(null);
|
|
8872
9036
|
const [menuSide, setMenuSide] = (0, import_react34.useState)("bottom");
|
|
8873
|
-
const gapPx = sideOffset ?? parseCssPxLen(
|
|
8874
|
-
const defaultMenuW = parseCssPxLen(
|
|
8875
|
-
const z = Number.parseInt(String(
|
|
9037
|
+
const gapPx = sideOffset ?? parseCssPxLen(import_tokens20.spacings.sizeXXSmall, 4);
|
|
9038
|
+
const defaultMenuW = parseCssPxLen(import_tokens3.componentSizes.dropdownMenuWidth, 180);
|
|
9039
|
+
const z = Number.parseInt(String(import_tokens20.zIndex.zIndexMessages), 10) || 1e4;
|
|
8876
9040
|
useIsomorphicLayoutEffect3(() => {
|
|
8877
9041
|
if (!open) {
|
|
8878
9042
|
setFixedStyle(null);
|
|
@@ -8899,7 +9063,7 @@ function DropdownContent({
|
|
|
8899
9063
|
position: "fixed",
|
|
8900
9064
|
top: pos.top,
|
|
8901
9065
|
left: pos.left,
|
|
8902
|
-
minWidth:
|
|
9066
|
+
minWidth: import_tokens3.componentSizes.dropdownMenuWidth,
|
|
8903
9067
|
zIndex: z,
|
|
8904
9068
|
maxHeight: "min(60vh, 20rem)"
|
|
8905
9069
|
};
|
|
@@ -9220,7 +9384,7 @@ function DropdownSubTrigger({
|
|
|
9220
9384
|
WebIcon,
|
|
9221
9385
|
{
|
|
9222
9386
|
name: "chevron-right",
|
|
9223
|
-
size:
|
|
9387
|
+
size: import_tokens20.iconSizes.small,
|
|
9224
9388
|
color: "currentColor",
|
|
9225
9389
|
"aria-hidden": true,
|
|
9226
9390
|
className: "ms-auto shrink-0"
|
|
@@ -9236,8 +9400,8 @@ function DropdownSubContent({ className, children, style, ...props }) {
|
|
|
9236
9400
|
const panelRef = (0, import_react34.useRef)(null);
|
|
9237
9401
|
const [fixedStyle, setFixedStyle] = (0, import_react34.useState)(null);
|
|
9238
9402
|
const [side, setSide] = (0, import_react34.useState)("right");
|
|
9239
|
-
const defaultMenuW = parseCssPxLen(
|
|
9240
|
-
const gapPx = parseCssPxLen(
|
|
9403
|
+
const defaultMenuW = parseCssPxLen(import_tokens3.componentSizes.dropdownMenuWidth, 180);
|
|
9404
|
+
const gapPx = parseCssPxLen(import_tokens20.spacings.sizeXXXSmall, 2);
|
|
9241
9405
|
const setPanelEl = (0, import_react34.useCallback)(
|
|
9242
9406
|
(el) => {
|
|
9243
9407
|
panelRef.current = el;
|
|
@@ -9274,8 +9438,8 @@ function DropdownSubContent({ className, children, style, ...props }) {
|
|
|
9274
9438
|
position: "fixed",
|
|
9275
9439
|
top: pos.top,
|
|
9276
9440
|
left: pos.left,
|
|
9277
|
-
minWidth:
|
|
9278
|
-
zIndex: (Number.parseInt(String(
|
|
9441
|
+
minWidth: import_tokens3.componentSizes.dropdownMenuWidth,
|
|
9442
|
+
zIndex: (Number.parseInt(String(import_tokens20.zIndex.zIndexMessages), 10) || 1e4) + 100,
|
|
9279
9443
|
maxHeight: "min(60vh, 20rem)"
|
|
9280
9444
|
});
|
|
9281
9445
|
};
|
|
@@ -9428,7 +9592,7 @@ function FieldError({ className, ...props }) {
|
|
|
9428
9592
|
|
|
9429
9593
|
// src/components/Link/Link.tsx
|
|
9430
9594
|
var import_clsx74 = require("clsx");
|
|
9431
|
-
var
|
|
9595
|
+
var import_tokens21 = require("@refineui/tokens");
|
|
9432
9596
|
|
|
9433
9597
|
// src/components/Link/style.ts
|
|
9434
9598
|
var linkStyles = {
|
|
@@ -9466,7 +9630,7 @@ function Link({
|
|
|
9466
9630
|
...props,
|
|
9467
9631
|
children: [
|
|
9468
9632
|
children,
|
|
9469
|
-
showOpen && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(WebIcon, { name: "open", size:
|
|
9633
|
+
showOpen && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(WebIcon, { name: "open", size: import_tokens21.iconSizes.large, color: "currentColor" })
|
|
9470
9634
|
]
|
|
9471
9635
|
}
|
|
9472
9636
|
);
|
|
@@ -9476,7 +9640,7 @@ function Link({
|
|
|
9476
9640
|
var import_clsx76 = require("clsx");
|
|
9477
9641
|
var import_react36 = require("react");
|
|
9478
9642
|
var import_react_dom5 = require("react-dom");
|
|
9479
|
-
var
|
|
9643
|
+
var import_tokens22 = require("@refineui/tokens");
|
|
9480
9644
|
var import_animation4 = require("@refineui/utilities/animation");
|
|
9481
9645
|
var import_react37 = require("@refineui/utilities/react");
|
|
9482
9646
|
|
|
@@ -9605,8 +9769,8 @@ function MenuPopover({ className, children, style, ...props }) {
|
|
|
9605
9769
|
const [shouldRender, setShouldRender] = (0, import_react36.useState)(open);
|
|
9606
9770
|
const [isClosing, setIsClosing] = (0, import_react36.useState)(false);
|
|
9607
9771
|
const [fixedStyle, setFixedStyle] = (0, import_react36.useState)(null);
|
|
9608
|
-
const gapPx = parseCssPx(
|
|
9609
|
-
const z = Number.parseInt(String(
|
|
9772
|
+
const gapPx = parseCssPx(import_tokens22.spacings.sizeXXSmall, 4);
|
|
9773
|
+
const z = Number.parseInt(String(import_tokens22.zIndex.zIndexMessages), 10) || 1e4;
|
|
9610
9774
|
(0, import_react36.useEffect)(() => {
|
|
9611
9775
|
if (open) {
|
|
9612
9776
|
setShouldRender(true);
|
|
@@ -9621,7 +9785,7 @@ function MenuPopover({ className, children, style, ...props }) {
|
|
|
9621
9785
|
setShouldRender(false);
|
|
9622
9786
|
setIsClosing(false);
|
|
9623
9787
|
setFixedStyle(null);
|
|
9624
|
-
}, (0, import_animation4.motionMsToNumber)(
|
|
9788
|
+
}, (0, import_animation4.motionMsToNumber)(import_tokens22.semanticInteraction.duration.normal));
|
|
9625
9789
|
return () => window.clearTimeout(timeout);
|
|
9626
9790
|
}, [open, shouldRender]);
|
|
9627
9791
|
useIsomorphicLayoutEffect4(() => {
|
|
@@ -9636,7 +9800,7 @@ function MenuPopover({ className, children, style, ...props }) {
|
|
|
9636
9800
|
position: "fixed",
|
|
9637
9801
|
top: rect.bottom + gapPx,
|
|
9638
9802
|
left: rect.left,
|
|
9639
|
-
minWidth:
|
|
9803
|
+
minWidth: import_tokens3.componentSizes.menuPanelWidth,
|
|
9640
9804
|
width: positioning?.autoSize ? "max-content" : void 0,
|
|
9641
9805
|
maxWidth: "min(100vw - 16px, 24rem)",
|
|
9642
9806
|
zIndex: z
|
|
@@ -9761,9 +9925,9 @@ function MenuItem({
|
|
|
9761
9925
|
{
|
|
9762
9926
|
className: menuStyles.iconWrap,
|
|
9763
9927
|
style: {
|
|
9764
|
-
width:
|
|
9765
|
-
minWidth:
|
|
9766
|
-
height:
|
|
9928
|
+
width: import_tokens22.iconSizes.small,
|
|
9929
|
+
minWidth: import_tokens22.iconSizes.small,
|
|
9930
|
+
height: import_tokens22.iconSizes.small
|
|
9767
9931
|
},
|
|
9768
9932
|
children: startIcon
|
|
9769
9933
|
}
|
|
@@ -9788,9 +9952,9 @@ function MenuItem({
|
|
|
9788
9952
|
{
|
|
9789
9953
|
className: menuStyles.iconWrap,
|
|
9790
9954
|
style: {
|
|
9791
|
-
width:
|
|
9792
|
-
minWidth:
|
|
9793
|
-
height:
|
|
9955
|
+
width: import_tokens22.iconSizes.small,
|
|
9956
|
+
minWidth: import_tokens22.iconSizes.small,
|
|
9957
|
+
height: import_tokens22.iconSizes.small
|
|
9794
9958
|
},
|
|
9795
9959
|
children: endIcon
|
|
9796
9960
|
}
|
|
@@ -9942,9 +10106,9 @@ function MenuSubTrigger({
|
|
|
9942
10106
|
{
|
|
9943
10107
|
className: menuStyles.iconWrap,
|
|
9944
10108
|
style: {
|
|
9945
|
-
width:
|
|
9946
|
-
minWidth:
|
|
9947
|
-
height:
|
|
10109
|
+
width: import_tokens22.iconSizes.small,
|
|
10110
|
+
minWidth: import_tokens22.iconSizes.small,
|
|
10111
|
+
height: import_tokens22.iconSizes.small
|
|
9948
10112
|
},
|
|
9949
10113
|
children: startIcon
|
|
9950
10114
|
}
|
|
@@ -9967,11 +10131,11 @@ function MenuSubTrigger({
|
|
|
9967
10131
|
{
|
|
9968
10132
|
className: menuStyles.iconWrap,
|
|
9969
10133
|
style: {
|
|
9970
|
-
width:
|
|
9971
|
-
minWidth:
|
|
9972
|
-
height:
|
|
10134
|
+
width: import_tokens22.iconSizes.small,
|
|
10135
|
+
minWidth: import_tokens22.iconSizes.small,
|
|
10136
|
+
height: import_tokens22.iconSizes.small
|
|
9973
10137
|
},
|
|
9974
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(WebIcon, { name: "chevron-right", size:
|
|
10138
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(WebIcon, { name: "chevron-right", size: import_tokens22.iconSizes.small, color: "currentColor", "aria-hidden": true })
|
|
9975
10139
|
}
|
|
9976
10140
|
) })
|
|
9977
10141
|
] })
|
|
@@ -9984,9 +10148,9 @@ function MenuSubContent({ className, children, style, ...props }) {
|
|
|
9984
10148
|
const panelRef = (0, import_react36.useRef)(null);
|
|
9985
10149
|
const [fixedStyle, setFixedStyle] = (0, import_react36.useState)(null);
|
|
9986
10150
|
const [side, setSide] = (0, import_react36.useState)("right");
|
|
9987
|
-
const gapPx = parseCssPx(
|
|
9988
|
-
const z = (Number.parseInt(String(
|
|
9989
|
-
const defaultW = parseCssPx(
|
|
10151
|
+
const gapPx = parseCssPx(import_tokens22.spacings.sizeXXXSmall, 2);
|
|
10152
|
+
const z = (Number.parseInt(String(import_tokens22.zIndex.zIndexMessages), 10) || 1e4) + 100;
|
|
10153
|
+
const defaultW = parseCssPx(import_tokens3.componentSizes.menuPanelWidth, 244);
|
|
9990
10154
|
const setPanelEl = (0, import_react36.useCallback)(
|
|
9991
10155
|
(el) => {
|
|
9992
10156
|
panelRef.current = el;
|
|
@@ -10025,7 +10189,7 @@ function MenuSubContent({ className, children, style, ...props }) {
|
|
|
10025
10189
|
position: "fixed",
|
|
10026
10190
|
top: pos.top,
|
|
10027
10191
|
left: pos.left,
|
|
10028
|
-
minWidth:
|
|
10192
|
+
minWidth: import_tokens3.componentSizes.menuPanelWidth,
|
|
10029
10193
|
zIndex: z,
|
|
10030
10194
|
maxHeight: "min(60vh, 20rem)"
|
|
10031
10195
|
});
|
|
@@ -10084,14 +10248,14 @@ function MenuSubContent({ className, children, style, ...props }) {
|
|
|
10084
10248
|
// src/components/NavigationMenu/NavigationMenu.tsx
|
|
10085
10249
|
var import_clsx78 = require("clsx");
|
|
10086
10250
|
var import_react38 = require("react");
|
|
10087
|
-
var
|
|
10251
|
+
var import_tokens23 = require("@refineui/tokens");
|
|
10088
10252
|
var import_animation5 = require("@refineui/utilities/animation");
|
|
10089
10253
|
|
|
10090
10254
|
// src/components/NavigationMenu/style.ts
|
|
10091
10255
|
var import_clsx77 = require("clsx");
|
|
10092
10256
|
var topLevelItem = (0, import_clsx77.clsx)(
|
|
10093
10257
|
componentTextClass(componentTypographyTokens.navigationMenu.trigger),
|
|
10094
|
-
"box-border inline-flex cursor-pointer items-center justify-center gap-refineui-size-x-small",
|
|
10258
|
+
"box-border inline-flex h-refineui-button-min-height-md min-w-refineui-navigation-menu-item-min-width cursor-pointer items-center justify-center gap-refineui-size-x-small",
|
|
10095
10259
|
"rounded-refineui-large border-none bg-transparent px-refineui-size-medium py-refineui-size-x-small",
|
|
10096
10260
|
"text-refineui-alias-foreground-tertiary outline-none leading-none",
|
|
10097
10261
|
"transition-[color,background-color] duration-[var(--refineui-motion-duration-fast)]"
|
|
@@ -10108,8 +10272,6 @@ var navigationMenuStyles = {
|
|
|
10108
10272
|
triggerDisabled: "cursor-not-allowed text-refineui-alias-foreground-disabled",
|
|
10109
10273
|
chevron,
|
|
10110
10274
|
chevronOpen: "rotate-180",
|
|
10111
|
-
/** Matches trigger chevron box so direct top-level links align with dropdown triggers. */
|
|
10112
|
-
linkChevronSpacer: (0, import_clsx77.clsx)(chevron, "inline-block size-refineui-icon-xsmall shrink-0 pointer-events-none invisible"),
|
|
10113
10275
|
content: (0, import_clsx77.clsx)(
|
|
10114
10276
|
/** Flush under trigger so pointer does not leave the item while moving into the panel. */
|
|
10115
10277
|
"absolute start-0 top-full z-refineui-messages pt-refineui-size-xx-small",
|
|
@@ -10184,8 +10346,8 @@ function NavigationMenu({
|
|
|
10184
10346
|
const openTimerRef = (0, import_react38.useRef)(null);
|
|
10185
10347
|
const closeTimerRef = (0, import_react38.useRef)(null);
|
|
10186
10348
|
const rootRef = (0, import_react38.useRef)(null);
|
|
10187
|
-
const delayDuration = delayDurationProp ?? (0, import_animation5.motionMsToNumber)(
|
|
10188
|
-
const skipDelayDuration = skipDelayDurationProp ?? (0, import_animation5.motionMsToNumber)(
|
|
10349
|
+
const delayDuration = delayDurationProp ?? (0, import_animation5.motionMsToNumber)(import_tokens23.semanticInteraction.duration.normal);
|
|
10350
|
+
const skipDelayDuration = skipDelayDurationProp ?? (0, import_animation5.motionMsToNumber)(import_tokens23.semanticInteraction.duration.fast);
|
|
10189
10351
|
const clearTimers = (0, import_react38.useCallback)(() => {
|
|
10190
10352
|
if (openTimerRef.current != null) {
|
|
10191
10353
|
window.clearTimeout(openTimerRef.current);
|
|
@@ -10350,10 +10512,12 @@ function NavigationMenuItem({
|
|
|
10350
10512
|
onPointerEnter: (event) => {
|
|
10351
10513
|
onPointerEnter?.(event);
|
|
10352
10514
|
if (event.defaultPrevented) return;
|
|
10353
|
-
const
|
|
10354
|
-
event.currentTarget.querySelector(
|
|
10515
|
+
const hasEnabledTrigger = Boolean(
|
|
10516
|
+
event.currentTarget.querySelector(
|
|
10517
|
+
'[data-refineui="navigation-menu-trigger"]:not(:disabled)'
|
|
10518
|
+
)
|
|
10355
10519
|
);
|
|
10356
|
-
if (
|
|
10520
|
+
if (hasEnabledTrigger) {
|
|
10357
10521
|
menu.openItem(value);
|
|
10358
10522
|
}
|
|
10359
10523
|
},
|
|
@@ -10432,7 +10596,7 @@ function NavigationMenuTrigger({
|
|
|
10432
10596
|
WebIcon,
|
|
10433
10597
|
{
|
|
10434
10598
|
name: "chevron-down",
|
|
10435
|
-
size:
|
|
10599
|
+
size: import_tokens23.iconSizes.xsmall,
|
|
10436
10600
|
color: "currentColor",
|
|
10437
10601
|
className: (0, import_clsx78.clsx)(
|
|
10438
10602
|
navigationMenuStyles.chevron,
|
|
@@ -10465,7 +10629,7 @@ function NavigationMenuContent({
|
|
|
10465
10629
|
const timeout = window.setTimeout(() => {
|
|
10466
10630
|
setShouldRender(false);
|
|
10467
10631
|
setIsClosing(false);
|
|
10468
|
-
}, (0, import_animation5.motionMsToNumber)(
|
|
10632
|
+
}, (0, import_animation5.motionMsToNumber)(import_tokens23.semanticInteraction.duration.fast));
|
|
10469
10633
|
return () => window.clearTimeout(timeout);
|
|
10470
10634
|
}, [item.open, shouldRender]);
|
|
10471
10635
|
const contentCtx = (0, import_react38.useMemo)(
|
|
@@ -10507,7 +10671,7 @@ function NavigationMenuLink({
|
|
|
10507
10671
|
const menu = (0, import_react38.useContext)(NavigationMenuContext);
|
|
10508
10672
|
const inContent = menu?.isInsideContent ?? false;
|
|
10509
10673
|
const disabled = ariaDisabled === true || ariaDisabled === "true";
|
|
10510
|
-
return /* @__PURE__ */ (0, import_jsx_runtime59.
|
|
10674
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
10511
10675
|
"a",
|
|
10512
10676
|
{
|
|
10513
10677
|
"data-refineui": "navigation-menu-link",
|
|
@@ -10523,7 +10687,11 @@ function NavigationMenuLink({
|
|
|
10523
10687
|
),
|
|
10524
10688
|
onClick: (event) => {
|
|
10525
10689
|
onClick?.(event);
|
|
10526
|
-
if (event.defaultPrevented
|
|
10690
|
+
if (event.defaultPrevented) return;
|
|
10691
|
+
if (disabled) {
|
|
10692
|
+
event.preventDefault();
|
|
10693
|
+
return;
|
|
10694
|
+
}
|
|
10527
10695
|
menu?.setValue("");
|
|
10528
10696
|
},
|
|
10529
10697
|
onFocus: (event) => {
|
|
@@ -10533,10 +10701,7 @@ function NavigationMenuLink({
|
|
|
10533
10701
|
}
|
|
10534
10702
|
},
|
|
10535
10703
|
...props,
|
|
10536
|
-
children
|
|
10537
|
-
children,
|
|
10538
|
-
!inContent ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { "aria-hidden": true, className: navigationMenuStyles.linkChevronSpacer }) : null
|
|
10539
|
-
]
|
|
10704
|
+
children
|
|
10540
10705
|
}
|
|
10541
10706
|
);
|
|
10542
10707
|
}
|
|
@@ -10741,7 +10906,7 @@ function SidebarFooter({ className, ...props }) {
|
|
|
10741
10906
|
// src/components/Sidebar/SidebarPeek.tsx
|
|
10742
10907
|
var import_clsx82 = require("clsx");
|
|
10743
10908
|
var import_react39 = require("react");
|
|
10744
|
-
var
|
|
10909
|
+
var import_tokens24 = require("@refineui/tokens");
|
|
10745
10910
|
var import_animation6 = require("@refineui/utilities/animation");
|
|
10746
10911
|
|
|
10747
10912
|
// src/components/Sidebar/peekStyle.ts
|
|
@@ -10767,9 +10932,9 @@ var sidebarPeekStyles = {
|
|
|
10767
10932
|
|
|
10768
10933
|
// src/components/Sidebar/SidebarPeek.tsx
|
|
10769
10934
|
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
10770
|
-
var PEEK_OPEN_DELAY_MS = (0, import_animation6.motionMsToNumber)(
|
|
10771
|
-
var PEEK_CLOSE_DELAY_MS = (0, import_animation6.motionMsToNumber)(
|
|
10772
|
-
var PEEK_BRIDGE_DELAY_MS = (0, import_animation6.motionMsToNumber)(
|
|
10935
|
+
var PEEK_OPEN_DELAY_MS = (0, import_animation6.motionMsToNumber)(import_tokens24.semanticInteraction.duration.medium);
|
|
10936
|
+
var PEEK_CLOSE_DELAY_MS = (0, import_animation6.motionMsToNumber)(import_tokens24.semanticInteraction.duration.medium);
|
|
10937
|
+
var PEEK_BRIDGE_DELAY_MS = (0, import_animation6.motionMsToNumber)(import_tokens24.semanticInteraction.duration.slow);
|
|
10773
10938
|
var SidebarPeekContext = (0, import_react39.createContext)(null);
|
|
10774
10939
|
function useSidebarPeekContext(component) {
|
|
10775
10940
|
const ctx = (0, import_react39.useContext)(SidebarPeekContext);
|
|
@@ -11021,7 +11186,7 @@ function useSidebarPeek() {
|
|
|
11021
11186
|
|
|
11022
11187
|
// src/components/Pagination/Pagination.tsx
|
|
11023
11188
|
var import_clsx84 = require("clsx");
|
|
11024
|
-
var
|
|
11189
|
+
var import_tokens25 = require("@refineui/tokens");
|
|
11025
11190
|
var import_color10 = require("@refineui/utilities/color");
|
|
11026
11191
|
|
|
11027
11192
|
// src/components/Pagination/style.ts
|
|
@@ -11084,7 +11249,7 @@ function PaginationNavButton({
|
|
|
11084
11249
|
WebIcon,
|
|
11085
11250
|
{
|
|
11086
11251
|
name: isPrev ? "chevron-left" : "chevron-right",
|
|
11087
|
-
size:
|
|
11252
|
+
size: import_tokens25.iconSizes.medium,
|
|
11088
11253
|
color: iconColor,
|
|
11089
11254
|
fallback: isPrev ? "\u2039" : "\u203A"
|
|
11090
11255
|
}
|
|
@@ -11111,7 +11276,7 @@ function PaginationEllipsis({ className, ...props }) {
|
|
|
11111
11276
|
WebIcon,
|
|
11112
11277
|
{
|
|
11113
11278
|
name: "more-horizontal",
|
|
11114
|
-
size:
|
|
11279
|
+
size: import_tokens25.iconSizes.medium,
|
|
11115
11280
|
color: (0, import_color10.resolveColorTokenValue)(componentColorTokens.pagination.navIcon.default),
|
|
11116
11281
|
fallback: "\u2026"
|
|
11117
11282
|
}
|
|
@@ -11126,7 +11291,7 @@ function Pagination(props) {
|
|
|
11126
11291
|
// src/components/PopOver/PopOver.tsx
|
|
11127
11292
|
var import_clsx85 = require("clsx");
|
|
11128
11293
|
var import_react40 = require("react");
|
|
11129
|
-
var
|
|
11294
|
+
var import_tokens26 = require("@refineui/tokens");
|
|
11130
11295
|
var import_color11 = require("@refineui/utilities/color");
|
|
11131
11296
|
var import_react41 = require("@refineui/utilities/react");
|
|
11132
11297
|
|
|
@@ -11169,15 +11334,15 @@ function usePopoverContext(component) {
|
|
|
11169
11334
|
if (!ctx) throw new Error(`${component} must be used within <Popover>`);
|
|
11170
11335
|
return ctx;
|
|
11171
11336
|
}
|
|
11172
|
-
var BEAK_W =
|
|
11173
|
-
var BEAK_H =
|
|
11174
|
-
var BEAK_OFFSET =
|
|
11175
|
-
var BEAK_BORDER_OVERLAP =
|
|
11176
|
-
var POPOVER_GAP =
|
|
11337
|
+
var BEAK_W = import_tokens3.foundationSizes.foundationSize160;
|
|
11338
|
+
var BEAK_H = import_tokens3.foundationSizes.foundationSize80;
|
|
11339
|
+
var BEAK_OFFSET = import_tokens3.foundationSizes.foundationSize80;
|
|
11340
|
+
var BEAK_BORDER_OVERLAP = import_tokens26.strokeWidths.strokeWidthThin;
|
|
11341
|
+
var POPOVER_GAP = import_tokens26.spacings.sizeMedium;
|
|
11177
11342
|
function beakWrapperStyle(placement, align) {
|
|
11178
|
-
const insetStart =
|
|
11179
|
-
const insetEnd =
|
|
11180
|
-
const edge =
|
|
11343
|
+
const insetStart = import_tokens3.componentSizes.popoverBeakInsetFromStartEdge;
|
|
11344
|
+
const insetEnd = import_tokens3.componentSizes.popoverBeakInsetFromEndEdge;
|
|
11345
|
+
const edge = import_tokens26.spacings.sizeMedium;
|
|
11181
11346
|
const overlapOffset = `calc(-1 * ${BEAK_OFFSET} + ${BEAK_BORDER_OVERLAP})`;
|
|
11182
11347
|
switch (placement) {
|
|
11183
11348
|
case "bottom":
|
|
@@ -11405,8 +11570,8 @@ function PopoverContent({
|
|
|
11405
11570
|
),
|
|
11406
11571
|
style: {
|
|
11407
11572
|
...styleProp && typeof styleProp === "object" ? styleProp : {},
|
|
11408
|
-
minWidth:
|
|
11409
|
-
padding:
|
|
11573
|
+
minWidth: import_tokens3.componentSizes.popoverPanelWidth,
|
|
11574
|
+
padding: import_tokens26.spacings.sizeLarge,
|
|
11410
11575
|
backgroundColor: bg,
|
|
11411
11576
|
color: (0, import_color11.resolveColorTokenValue)(palette.foreground),
|
|
11412
11577
|
borderColor: borderCol
|
|
@@ -11562,7 +11727,7 @@ function Slider({
|
|
|
11562
11727
|
|
|
11563
11728
|
// src/components/Carousel/Carousel.tsx
|
|
11564
11729
|
var import_clsx89 = require("clsx");
|
|
11565
|
-
var
|
|
11730
|
+
var import_tokens27 = require("@refineui/tokens");
|
|
11566
11731
|
var import_react43 = require("react");
|
|
11567
11732
|
|
|
11568
11733
|
// src/components/Carousel/style.ts
|
|
@@ -11913,7 +12078,7 @@ function CarouselPrevious({ className, disabled, onClick, ...props }) {
|
|
|
11913
12078
|
WebIcon,
|
|
11914
12079
|
{
|
|
11915
12080
|
name: "chevron-left",
|
|
11916
|
-
size:
|
|
12081
|
+
size: import_tokens27.iconSizes.small,
|
|
11917
12082
|
color: "currentColor",
|
|
11918
12083
|
iconStyle: "filled",
|
|
11919
12084
|
fallback: "\u2039"
|
|
@@ -11945,7 +12110,7 @@ function CarouselNext({ className, disabled, onClick, ...props }) {
|
|
|
11945
12110
|
WebIcon,
|
|
11946
12111
|
{
|
|
11947
12112
|
name: "chevron-right",
|
|
11948
|
-
size:
|
|
12113
|
+
size: import_tokens27.iconSizes.small,
|
|
11949
12114
|
color: "currentColor",
|
|
11950
12115
|
iconStyle: "filled",
|
|
11951
12116
|
fallback: "\u203A"
|
|
@@ -12210,7 +12375,7 @@ function BubbleReactions({
|
|
|
12210
12375
|
|
|
12211
12376
|
// src/components/Stepper/Stepper.tsx
|
|
12212
12377
|
var import_clsx93 = require("clsx");
|
|
12213
|
-
var
|
|
12378
|
+
var import_tokens28 = require("@refineui/tokens");
|
|
12214
12379
|
var import_react45 = require("react");
|
|
12215
12380
|
|
|
12216
12381
|
// src/components/Stepper/style.ts
|
|
@@ -12472,7 +12637,7 @@ function StepperIndicator({ className, children, ...props }) {
|
|
|
12472
12637
|
WebIcon,
|
|
12473
12638
|
{
|
|
12474
12639
|
name: "checkmark",
|
|
12475
|
-
size:
|
|
12640
|
+
size: import_tokens28.iconSizes.xsmall,
|
|
12476
12641
|
color: "currentColor",
|
|
12477
12642
|
iconStyle: "filled",
|
|
12478
12643
|
fallback: "\u2713",
|
|
@@ -13083,7 +13248,7 @@ function ResizableHandle({
|
|
|
13083
13248
|
// src/components/SpinButton/SpinButton.tsx
|
|
13084
13249
|
var import_clsx96 = require("clsx");
|
|
13085
13250
|
var import_react47 = require("react");
|
|
13086
|
-
var
|
|
13251
|
+
var import_tokens29 = require("@refineui/tokens");
|
|
13087
13252
|
|
|
13088
13253
|
// src/components/SpinButton/style.ts
|
|
13089
13254
|
var spinButtonStyles = {
|
|
@@ -13292,7 +13457,7 @@ function SpinButton({
|
|
|
13292
13457
|
WebIcon,
|
|
13293
13458
|
{
|
|
13294
13459
|
name: "chevron-up",
|
|
13295
|
-
size:
|
|
13460
|
+
size: import_tokens29.iconSizes.xsmall,
|
|
13296
13461
|
color: "currentColor",
|
|
13297
13462
|
iconStyle: "filled",
|
|
13298
13463
|
fallback: "\u25B2"
|
|
@@ -13316,7 +13481,7 @@ function SpinButton({
|
|
|
13316
13481
|
WebIcon,
|
|
13317
13482
|
{
|
|
13318
13483
|
name: "chevron-down",
|
|
13319
|
-
size:
|
|
13484
|
+
size: import_tokens29.iconSizes.xsmall,
|
|
13320
13485
|
color: "currentColor",
|
|
13321
13486
|
iconStyle: "filled",
|
|
13322
13487
|
fallback: "\u25BC"
|
|
@@ -13336,14 +13501,15 @@ function SpinButton({
|
|
|
13336
13501
|
var import_clsx98 = require("clsx");
|
|
13337
13502
|
var import_react48 = require("react");
|
|
13338
13503
|
var import_react_dom6 = require("react-dom");
|
|
13339
|
-
var
|
|
13504
|
+
var import_tokens30 = require("@refineui/tokens");
|
|
13340
13505
|
var import_animation7 = require("@refineui/utilities/animation");
|
|
13506
|
+
var import_color12 = require("@refineui/utilities/color");
|
|
13341
13507
|
|
|
13342
13508
|
// src/recipes/toast.recipe.ts
|
|
13343
13509
|
var import_clsx97 = require("clsx");
|
|
13344
13510
|
var toastRecipe = defineRecipe({
|
|
13345
13511
|
name: "toast",
|
|
13346
|
-
base: "relative isolate box-border flex w-fit max-w-refineui-toast-max-width cursor-grab items-center gap-refineui-size-small rounded-refineui-
|
|
13512
|
+
base: "relative isolate box-border flex w-fit min-w-refineui-toast-min-width max-w-refineui-toast-max-width cursor-grab items-center gap-refineui-size-small rounded-refineui-x-large border-refineui-hairline border-refineui-alias-border-default bg-refineui-alias-background-primary py-refineui-size-medium ps-refineui-size-medium pe-refineui-size-large select-none",
|
|
13347
13513
|
variants: {
|
|
13348
13514
|
variant: {
|
|
13349
13515
|
default: "",
|
|
@@ -13373,7 +13539,7 @@ var toastStyles = {
|
|
|
13373
13539
|
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
13374
13540
|
var useIsomorphicLayoutEffect6 = typeof document !== "undefined" ? import_react48.useLayoutEffect : import_react48.useEffect;
|
|
13375
13541
|
var ENTER_MS = 20;
|
|
13376
|
-
var LEAVE_MS = (0, import_animation7.motionMsToNumber)(
|
|
13542
|
+
var LEAVE_MS = (0, import_animation7.motionMsToNumber)(componentTokens.toast.motion.leave) + 60;
|
|
13377
13543
|
var DEFAULT_DURATION = 4200;
|
|
13378
13544
|
var DEFAULT_MAX_TOASTS = 1;
|
|
13379
13545
|
var STACK_Z_BASE = 100;
|
|
@@ -13394,10 +13560,10 @@ function gapPxFromSpacingToken(token) {
|
|
|
13394
13560
|
var TOAST_NARROW_STACK_MQ = "(max-width: 480px), (hover: none)";
|
|
13395
13561
|
function readToastStackGapPx() {
|
|
13396
13562
|
if (typeof globalThis.matchMedia === "undefined") {
|
|
13397
|
-
return gapPxFromSpacingToken(String(
|
|
13563
|
+
return gapPxFromSpacingToken(String(import_tokens30.spacings.sizeLarge));
|
|
13398
13564
|
}
|
|
13399
13565
|
const mq = globalThis.matchMedia(TOAST_NARROW_STACK_MQ);
|
|
13400
|
-
return gapPxFromSpacingToken(mq.matches ? String(
|
|
13566
|
+
return gapPxFromSpacingToken(mq.matches ? String(import_tokens30.spacings.sizeMedium) : String(import_tokens30.spacings.sizeLarge));
|
|
13401
13567
|
}
|
|
13402
13568
|
function subscribeToastStackGap(onChange) {
|
|
13403
13569
|
if (typeof globalThis.matchMedia === "undefined") return () => {
|
|
@@ -13410,7 +13576,7 @@ function useToastStackGapPx() {
|
|
|
13410
13576
|
return (0, import_react48.useSyncExternalStore)(
|
|
13411
13577
|
subscribeToastStackGap,
|
|
13412
13578
|
readToastStackGapPx,
|
|
13413
|
-
() => gapPxFromSpacingToken(String(
|
|
13579
|
+
() => gapPxFromSpacingToken(String(import_tokens30.spacings.sizeLarge))
|
|
13414
13580
|
);
|
|
13415
13581
|
}
|
|
13416
13582
|
function readToastNaturalHeight(li) {
|
|
@@ -13562,7 +13728,7 @@ var Toast = (0, import_react48.forwardRef)(function Toast2(props, ref) {
|
|
|
13562
13728
|
WebIcon,
|
|
13563
13729
|
{
|
|
13564
13730
|
name: resolvedIconName,
|
|
13565
|
-
size:
|
|
13731
|
+
size: import_tokens30.iconSizes.medium,
|
|
13566
13732
|
color: "currentColor",
|
|
13567
13733
|
iconStyle: "filled"
|
|
13568
13734
|
}
|
|
@@ -13578,6 +13744,12 @@ var Toast = (0, import_react48.forwardRef)(function Toast2(props, ref) {
|
|
|
13578
13744
|
children: action.label
|
|
13579
13745
|
}
|
|
13580
13746
|
) : action;
|
|
13747
|
+
const color = componentColorTokens.toast;
|
|
13748
|
+
const tokenStyle = {
|
|
13749
|
+
backgroundColor: (0, import_color12.resolveColorTokenValue)(color.background),
|
|
13750
|
+
borderColor: (0, import_color12.resolveColorTokenValue)(color.border),
|
|
13751
|
+
color: (0, import_color12.resolveColorTokenValue)(color.message)
|
|
13752
|
+
};
|
|
13581
13753
|
return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(
|
|
13582
13754
|
"div",
|
|
13583
13755
|
{
|
|
@@ -13588,7 +13760,7 @@ var Toast = (0, import_react48.forwardRef)(function Toast2(props, ref) {
|
|
|
13588
13760
|
role: liveRole,
|
|
13589
13761
|
"aria-live": ariaLive,
|
|
13590
13762
|
...domProps,
|
|
13591
|
-
style,
|
|
13763
|
+
style: { ...tokenStyle, ...style },
|
|
13592
13764
|
className: (0, import_clsx98.clsx)(toastStyles.card, className),
|
|
13593
13765
|
children: [
|
|
13594
13766
|
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { "data-refineui": "toast-icon", className: toastStyles.iconWrap, children: iconContent }),
|
|
@@ -13871,12 +14043,12 @@ var import_react50 = require("react");
|
|
|
13871
14043
|
|
|
13872
14044
|
// src/components/Tree/context.ts
|
|
13873
14045
|
var import_react49 = require("react");
|
|
13874
|
-
var
|
|
14046
|
+
var import_tokens31 = require("@refineui/tokens");
|
|
13875
14047
|
var import_animation8 = require("@refineui/utilities/animation");
|
|
13876
|
-
var TREE_PANEL_MS = Number.parseFloat(
|
|
13877
|
-
var TREE_CONTENT_MS = Number.parseFloat(
|
|
13878
|
-
var TREE_PANEL_EASE =
|
|
13879
|
-
var TREE_CONTENT_EASE =
|
|
14048
|
+
var TREE_PANEL_MS = Number.parseFloat(import_tokens31.semanticInteraction.duration.accordionPanel) / 1e3;
|
|
14049
|
+
var TREE_CONTENT_MS = Number.parseFloat(import_tokens31.semanticInteraction.duration.accordionContent) / 1e3;
|
|
14050
|
+
var TREE_PANEL_EASE = import_tokens31.semanticInteraction.easing.panel;
|
|
14051
|
+
var TREE_CONTENT_EASE = import_tokens31.semanticInteraction.easing.content;
|
|
13880
14052
|
var TreeContext = (0, import_react49.createContext)(null);
|
|
13881
14053
|
var TreeItemContext = (0, import_react49.createContext)(null);
|
|
13882
14054
|
function usePrefersReducedMotion2() {
|
|
@@ -13897,7 +14069,7 @@ function toExpandedSet(value) {
|
|
|
13897
14069
|
|
|
13898
14070
|
// src/components/Tree/style.ts
|
|
13899
14071
|
var import_clsx99 = require("clsx");
|
|
13900
|
-
var
|
|
14072
|
+
var import_tokens32 = require("@refineui/tokens");
|
|
13901
14073
|
var treeStyles = {
|
|
13902
14074
|
root: "m-0 flex list-none flex-col gap-px p-0",
|
|
13903
14075
|
item: "m-0 list-none p-0",
|
|
@@ -13925,9 +14097,9 @@ var treeStyles = {
|
|
|
13925
14097
|
label: "min-w-0 flex-1 truncate text-start"
|
|
13926
14098
|
};
|
|
13927
14099
|
var treeIconSize = {
|
|
13928
|
-
sm:
|
|
13929
|
-
md:
|
|
13930
|
-
lg:
|
|
14100
|
+
sm: import_tokens32.iconSizes.xxsmall,
|
|
14101
|
+
md: import_tokens32.iconSizes.xsmall,
|
|
14102
|
+
lg: import_tokens32.iconSizes.xsmall
|
|
13931
14103
|
};
|
|
13932
14104
|
var treeItemTypo = {
|
|
13933
14105
|
sm: sizedComponentTextClass(componentTypographyTokens.tree.item, "sm"),
|
|
@@ -14336,36 +14508,49 @@ function TreeItemContent({ className, children, ...props }) {
|
|
|
14336
14508
|
// src/components/Tooltip/Tooltip.tsx
|
|
14337
14509
|
var import_clsx105 = require("clsx");
|
|
14338
14510
|
var import_react54 = require("react");
|
|
14339
|
-
var
|
|
14340
|
-
var import_color12 = require("@refineui/utilities/color");
|
|
14511
|
+
var import_color13 = require("@refineui/utilities/color");
|
|
14341
14512
|
var import_react55 = require("@refineui/utilities/react");
|
|
14342
14513
|
|
|
14343
14514
|
// src/components/Tooltip/style.ts
|
|
14344
|
-
var
|
|
14515
|
+
var import_tokens33 = require("@refineui/tokens");
|
|
14345
14516
|
var import_clsx104 = require("clsx");
|
|
14517
|
+
var TOOLTIP_BEAK_W = import_tokens3.foundationSizes.foundationSize160;
|
|
14518
|
+
var TOOLTIP_BEAK_H = import_tokens3.foundationSizes.foundationSize80;
|
|
14519
|
+
var TOOLTIP_BEAK_OFFSET = import_tokens3.foundationSizes.foundationSize80;
|
|
14520
|
+
var BEAK_BORDER_OVERLAP2 = import_tokens33.strokeWidths.strokeWidthThin;
|
|
14521
|
+
var gap = import_tokens33.spacings.sizeXSmall;
|
|
14522
|
+
var edgeInset = import_tokens33.spacings.sizeMedium;
|
|
14346
14523
|
var tooltipStyles = {
|
|
14347
14524
|
root: "relative inline-block",
|
|
14348
14525
|
fallbackTrigger: "inline-flex outline-none",
|
|
14526
|
+
/** Positions the floating stack (beak + panel), like PopOver `floatingRoot`. */
|
|
14527
|
+
floating: "pointer-events-none absolute z-refineui-popup",
|
|
14528
|
+
panelWrap: "relative inline-block max-w-refineui-tooltip-max-width",
|
|
14529
|
+
beakWrap: "pointer-events-none absolute z-[1]",
|
|
14349
14530
|
panel: (0, import_clsx104.clsx)(
|
|
14350
14531
|
componentTextClass(componentTypographyTokens.tooltip),
|
|
14351
|
-
"
|
|
14532
|
+
"relative z-0 box-border max-w-refineui-tooltip-max-width whitespace-nowrap rounded-refineui-medium border-refineui-thin px-refineui-size-medium py-refineui-size-small shadow-refineui-8"
|
|
14352
14533
|
)
|
|
14353
14534
|
};
|
|
14354
|
-
|
|
14355
|
-
|
|
14356
|
-
|
|
14357
|
-
|
|
14358
|
-
|
|
14359
|
-
|
|
14360
|
-
|
|
14361
|
-
|
|
14362
|
-
|
|
14535
|
+
function tooltipPlacement(position) {
|
|
14536
|
+
switch (position) {
|
|
14537
|
+
case "Top":
|
|
14538
|
+
return "top";
|
|
14539
|
+
case "Left":
|
|
14540
|
+
return "left";
|
|
14541
|
+
case "Right":
|
|
14542
|
+
return "right";
|
|
14543
|
+
case "Bottom":
|
|
14544
|
+
default:
|
|
14545
|
+
return "bottom";
|
|
14546
|
+
}
|
|
14363
14547
|
}
|
|
14364
|
-
function
|
|
14365
|
-
|
|
14548
|
+
function tooltipAlignKey(align) {
|
|
14549
|
+
if (align === "Start") return "start";
|
|
14550
|
+
if (align === "End") return "end";
|
|
14551
|
+
return "center";
|
|
14366
14552
|
}
|
|
14367
|
-
|
|
14368
|
-
function tooltipPanelStyle(position, align) {
|
|
14553
|
+
function tooltipFloatingStyle(position, align) {
|
|
14369
14554
|
switch (position) {
|
|
14370
14555
|
case "Top":
|
|
14371
14556
|
if (align === "Start") return { bottom: "100%", left: 0, marginBottom: gap };
|
|
@@ -14387,55 +14572,44 @@ function tooltipPanelStyle(position, align) {
|
|
|
14387
14572
|
return {};
|
|
14388
14573
|
}
|
|
14389
14574
|
}
|
|
14390
|
-
function
|
|
14391
|
-
const
|
|
14392
|
-
const
|
|
14393
|
-
|
|
14394
|
-
|
|
14395
|
-
|
|
14396
|
-
|
|
14397
|
-
|
|
14398
|
-
|
|
14399
|
-
|
|
14400
|
-
|
|
14401
|
-
|
|
14402
|
-
|
|
14403
|
-
|
|
14404
|
-
|
|
14405
|
-
|
|
14406
|
-
|
|
14407
|
-
|
|
14408
|
-
top:
|
|
14409
|
-
|
|
14410
|
-
|
|
14411
|
-
|
|
14412
|
-
|
|
14413
|
-
if (align === "Start") return { ...tri2, left: edgeInset, marginLeft: 0 };
|
|
14414
|
-
if (align === "End") return { ...tri2, right: edgeInset, left: "auto", marginLeft: 0 };
|
|
14415
|
-
return { ...tri2, left: "50%", marginLeft: -b };
|
|
14575
|
+
function tooltipBeakWrapperStyle(position, align) {
|
|
14576
|
+
const overlapOffset = `calc(-1 * ${TOOLTIP_BEAK_OFFSET} + ${BEAK_BORDER_OVERLAP2})`;
|
|
14577
|
+
const placement = tooltipPlacement(position);
|
|
14578
|
+
const a = tooltipAlignKey(align);
|
|
14579
|
+
switch (placement) {
|
|
14580
|
+
case "bottom":
|
|
14581
|
+
if (a === "center") return { top: overlapOffset, left: `calc(50% - ${TOOLTIP_BEAK_W} / 2)` };
|
|
14582
|
+
if (a === "start") return { top: overlapOffset, left: edgeInset };
|
|
14583
|
+
return { top: overlapOffset, right: edgeInset };
|
|
14584
|
+
case "top":
|
|
14585
|
+
if (a === "center") return { bottom: overlapOffset, left: `calc(50% - ${TOOLTIP_BEAK_W} / 2)` };
|
|
14586
|
+
if (a === "start") return { bottom: overlapOffset, left: edgeInset };
|
|
14587
|
+
return { bottom: overlapOffset, right: edgeInset };
|
|
14588
|
+
case "left":
|
|
14589
|
+
if (a === "center") return { right: overlapOffset, top: `calc(50% - ${TOOLTIP_BEAK_W} / 2)` };
|
|
14590
|
+
if (a === "start") return { right: overlapOffset, top: edgeInset };
|
|
14591
|
+
return { right: overlapOffset, bottom: edgeInset };
|
|
14592
|
+
case "right":
|
|
14593
|
+
if (a === "center") return { left: overlapOffset, top: `calc(50% - ${TOOLTIP_BEAK_W} / 2)` };
|
|
14594
|
+
if (a === "start") return { left: overlapOffset, top: edgeInset };
|
|
14595
|
+
return { left: overlapOffset, bottom: edgeInset };
|
|
14596
|
+
default:
|
|
14597
|
+
return {};
|
|
14416
14598
|
}
|
|
14417
|
-
|
|
14418
|
-
|
|
14419
|
-
|
|
14420
|
-
|
|
14421
|
-
|
|
14422
|
-
|
|
14423
|
-
|
|
14424
|
-
|
|
14425
|
-
|
|
14426
|
-
|
|
14427
|
-
|
|
14599
|
+
}
|
|
14600
|
+
function tooltipBeakRotateDeg(position) {
|
|
14601
|
+
switch (tooltipPlacement(position)) {
|
|
14602
|
+
case "bottom":
|
|
14603
|
+
return 0;
|
|
14604
|
+
case "top":
|
|
14605
|
+
return 180;
|
|
14606
|
+
case "left":
|
|
14607
|
+
return -90;
|
|
14608
|
+
case "right":
|
|
14609
|
+
return 90;
|
|
14610
|
+
default:
|
|
14611
|
+
return 0;
|
|
14428
14612
|
}
|
|
14429
|
-
const tri = {
|
|
14430
|
-
...baseBox,
|
|
14431
|
-
left: outset,
|
|
14432
|
-
borderTop: `${b}px solid transparent`,
|
|
14433
|
-
borderBottom: `${b}px solid transparent`,
|
|
14434
|
-
borderRight: `${b}px solid ${bg}`
|
|
14435
|
-
};
|
|
14436
|
-
if (align === "Start") return { ...tri, top: edgeInset, marginTop: 0 };
|
|
14437
|
-
if (align === "End") return { ...tri, bottom: edgeInset, top: "auto", marginTop: 0 };
|
|
14438
|
-
return { ...tri, top: "50%", marginTop: -b };
|
|
14439
14613
|
}
|
|
14440
14614
|
|
|
14441
14615
|
// src/components/Tooltip/Tooltip.tsx
|
|
@@ -14460,8 +14634,10 @@ function Tooltip({
|
|
|
14460
14634
|
if (ctrlOpen === void 0) setInnerOpen(next);
|
|
14461
14635
|
onOpenChange?.(next);
|
|
14462
14636
|
};
|
|
14463
|
-
const
|
|
14464
|
-
const
|
|
14637
|
+
const tipColor = componentColorTokens.tooltip.default;
|
|
14638
|
+
const bg = (0, import_color13.resolveColorTokenValue)(tipColor.background);
|
|
14639
|
+
const fg = (0, import_color13.resolveColorTokenValue)(tipColor.foreground);
|
|
14640
|
+
const borderCol = (0, import_color13.resolveColorTokenValue)(tipColor.border);
|
|
14465
14641
|
const clearTimer = () => {
|
|
14466
14642
|
if (showTimer.current != null) {
|
|
14467
14643
|
clearTimeout(showTimer.current);
|
|
@@ -14476,9 +14652,9 @@ function Tooltip({
|
|
|
14476
14652
|
clearTimer();
|
|
14477
14653
|
setOpen(false);
|
|
14478
14654
|
};
|
|
14479
|
-
const
|
|
14480
|
-
const
|
|
14481
|
-
const
|
|
14655
|
+
const floatingStyle = tooltipFloatingStyle(position, align);
|
|
14656
|
+
const beakWrapStyle = tooltipBeakWrapperStyle(position, align);
|
|
14657
|
+
const beakRot = tooltipBeakRotateDeg(position);
|
|
14482
14658
|
const describedBy = open ? tooltipId : void 0;
|
|
14483
14659
|
const mergeEl = (0, import_react55.getMergeableTriggerChild)(trigger);
|
|
14484
14660
|
let triggerNode;
|
|
@@ -14528,26 +14704,59 @@ function Tooltip({
|
|
|
14528
14704
|
}
|
|
14529
14705
|
return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { "data-refineui": "tooltip", className: (0, import_clsx105.clsx)(tooltipStyles.root, className), ...props, children: [
|
|
14530
14706
|
triggerNode,
|
|
14531
|
-
open && /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
|
|
14532
|
-
|
|
14533
|
-
|
|
14534
|
-
|
|
14535
|
-
|
|
14536
|
-
|
|
14537
|
-
|
|
14538
|
-
|
|
14539
|
-
|
|
14540
|
-
|
|
14541
|
-
|
|
14542
|
-
|
|
14543
|
-
|
|
14544
|
-
|
|
14545
|
-
|
|
14546
|
-
|
|
14547
|
-
|
|
14548
|
-
|
|
14549
|
-
|
|
14550
|
-
|
|
14707
|
+
open && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: tooltipStyles.floating, style: floatingStyle, children: /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: tooltipStyles.panelWrap, children: [
|
|
14708
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
14709
|
+
"div",
|
|
14710
|
+
{
|
|
14711
|
+
className: tooltipStyles.beakWrap,
|
|
14712
|
+
style: { ...beakWrapStyle, width: TOOLTIP_BEAK_W, height: TOOLTIP_BEAK_H },
|
|
14713
|
+
"aria-hidden": true,
|
|
14714
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
14715
|
+
"div",
|
|
14716
|
+
{
|
|
14717
|
+
style: {
|
|
14718
|
+
width: TOOLTIP_BEAK_W,
|
|
14719
|
+
height: TOOLTIP_BEAK_H,
|
|
14720
|
+
transform: `rotate(${beakRot}deg)`,
|
|
14721
|
+
transformOrigin: "center center"
|
|
14722
|
+
},
|
|
14723
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
|
|
14724
|
+
"svg",
|
|
14725
|
+
{
|
|
14726
|
+
width: TOOLTIP_BEAK_W,
|
|
14727
|
+
height: TOOLTIP_BEAK_H,
|
|
14728
|
+
viewBox: "0 0 16 8",
|
|
14729
|
+
fill: "none",
|
|
14730
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
14731
|
+
style: { display: "block" },
|
|
14732
|
+
children: [
|
|
14733
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("polygon", { points: "8,0 0,8 16,8", fill: borderCol }),
|
|
14734
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("polygon", { points: "8,2 2,8 14,8", fill: bg })
|
|
14735
|
+
]
|
|
14736
|
+
}
|
|
14737
|
+
)
|
|
14738
|
+
}
|
|
14739
|
+
)
|
|
14740
|
+
}
|
|
14741
|
+
),
|
|
14742
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
14743
|
+
"div",
|
|
14744
|
+
{
|
|
14745
|
+
id: tooltipId,
|
|
14746
|
+
role: "tooltip",
|
|
14747
|
+
"data-refineui": "tooltip-panel",
|
|
14748
|
+
"data-position": position,
|
|
14749
|
+
"data-align": align,
|
|
14750
|
+
className: tooltipStyles.panel,
|
|
14751
|
+
style: {
|
|
14752
|
+
backgroundColor: bg,
|
|
14753
|
+
color: fg,
|
|
14754
|
+
borderColor: borderCol
|
|
14755
|
+
},
|
|
14756
|
+
children: content
|
|
14757
|
+
}
|
|
14758
|
+
)
|
|
14759
|
+
] }) })
|
|
14551
14760
|
] });
|
|
14552
14761
|
}
|
|
14553
14762
|
|
|
@@ -14555,7 +14764,7 @@ function Tooltip({
|
|
|
14555
14764
|
var import_clsx107 = require("clsx");
|
|
14556
14765
|
var import_react56 = require("react");
|
|
14557
14766
|
var import_tokens35 = require("@refineui/tokens");
|
|
14558
|
-
var
|
|
14767
|
+
var import_color14 = require("@refineui/utilities/color");
|
|
14559
14768
|
|
|
14560
14769
|
// src/components/Chart/style.ts
|
|
14561
14770
|
var import_clsx106 = require("clsx");
|
|
@@ -14788,19 +14997,19 @@ function useChartContext(component) {
|
|
|
14788
14997
|
return value;
|
|
14789
14998
|
}
|
|
14790
14999
|
function seriesColorToken(color) {
|
|
14791
|
-
return (0,
|
|
15000
|
+
return (0, import_color14.resolveColorTokenValue)(componentColorTokens.chart.series[color]);
|
|
14792
15001
|
}
|
|
14793
15002
|
function seriesSubtleToken(color) {
|
|
14794
|
-
return (0,
|
|
15003
|
+
return (0, import_color14.resolveColorTokenValue)(componentColorTokens.chart.seriesSubtle[color]);
|
|
14795
15004
|
}
|
|
14796
15005
|
function gridStroke() {
|
|
14797
|
-
return (0,
|
|
15006
|
+
return (0, import_color14.resolveColorTokenValue)(componentColorTokens.chart.grid);
|
|
14798
15007
|
}
|
|
14799
15008
|
function gridBaselineStroke() {
|
|
14800
|
-
return (0,
|
|
15009
|
+
return (0, import_color14.resolveColorTokenValue)(componentColorTokens.chart.gridBaseline);
|
|
14801
15010
|
}
|
|
14802
15011
|
function pointStrokeColor() {
|
|
14803
|
-
return (0,
|
|
15012
|
+
return (0, import_color14.resolveColorTokenValue)(componentColorTokens.chart.pointStroke);
|
|
14804
15013
|
}
|
|
14805
15014
|
function resolveScale(values, max, fallbackMax = 100) {
|
|
14806
15015
|
if (max !== void 0 && max > 0) return max;
|
|
@@ -15514,6 +15723,7 @@ function ChartLegendItem({
|
|
|
15514
15723
|
componentSizeFoundationKeys,
|
|
15515
15724
|
componentSizes,
|
|
15516
15725
|
componentTextClass,
|
|
15726
|
+
componentTokens,
|
|
15517
15727
|
componentTypographyTokens,
|
|
15518
15728
|
defaultCommandFilter,
|
|
15519
15729
|
dismissToast,
|