@uniformdev/design-system 20.71.1 → 20.71.2-alpha.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/index.js +69 -25
- package/dist/index.js +69 -25
- package/package.json +4 -4
package/dist/esm/index.js
CHANGED
|
@@ -8322,6 +8322,11 @@ var FilterChip = css49`
|
|
|
8322
8322
|
&[aria-selected='true'] {
|
|
8323
8323
|
border-color: var(--accent-dark);
|
|
8324
8324
|
}
|
|
8325
|
+
|
|
8326
|
+
&:disabled {
|
|
8327
|
+
cursor: not-allowed;
|
|
8328
|
+
opacity: var(--opacity-50);
|
|
8329
|
+
}
|
|
8325
8330
|
`;
|
|
8326
8331
|
var FilterChipDropdown = css49`
|
|
8327
8332
|
padding: var(--input-padding);
|
|
@@ -8625,19 +8630,8 @@ var PopoverBtn = css53`
|
|
|
8625
8630
|
`;
|
|
8626
8631
|
var Popover = css53`
|
|
8627
8632
|
z-index: var(--z-menu);
|
|
8628
|
-
|
|
8629
|
-
|
|
8630
|
-
* Hide the popover when its anchor (trigger) has been scrolled out of view by a
|
|
8631
|
-
* clipping ancestor. Without this, the portaled popup keeps tracking the (now
|
|
8632
|
-
* hidden) trigger and Base UI's collision avoidance shifts it back into view
|
|
8633
|
-
* each scroll frame, producing a flashing/jumping effect (see UNI-9326).
|
|
8634
|
-
*
|
|
8635
|
-
* 'display: none' is used (rather than 'visibility: hidden') so the
|
|
8636
|
-
* positioner is removed from layout while the anchor is hidden; otherwise the
|
|
8637
|
-
* still-laid-out positioner causes scroll/layout shift as Floating UI keeps
|
|
8638
|
-
* repositioning it during scroll. This is also the pattern Base UI's docs
|
|
8639
|
-
* recommend for data-anchor-hidden.
|
|
8640
|
-
*/
|
|
8633
|
+
`;
|
|
8634
|
+
var PopoverHideWhenAnchorHidden = css53`
|
|
8641
8635
|
&[data-anchor-hidden] {
|
|
8642
8636
|
display: none;
|
|
8643
8637
|
}
|
|
@@ -8647,6 +8641,7 @@ var PopoverDefaulterTriggerBtn = css53`
|
|
|
8647
8641
|
background: none;
|
|
8648
8642
|
padding: var(--spacing-2xs);
|
|
8649
8643
|
border-radius: var(--rounded-full);
|
|
8644
|
+
flex-shrink: 0;
|
|
8650
8645
|
|
|
8651
8646
|
&:hover {
|
|
8652
8647
|
background-color: rgba(0, 0, 0, 0.05);
|
|
@@ -12448,14 +12443,32 @@ var Popover2 = ({
|
|
|
12448
12443
|
[open, setOpen, hide, show]
|
|
12449
12444
|
);
|
|
12450
12445
|
const [inlineContainer, setInlineContainer] = useState20(null);
|
|
12446
|
+
const [triggerElement, setTriggerElement] = useState20(null);
|
|
12451
12447
|
useEffect16(() => {
|
|
12452
12448
|
onInit == null ? void 0 : onInit({ store: shimStore });
|
|
12453
12449
|
}, [shimStore]);
|
|
12454
12450
|
const portalContainer = portal ? modalContainer != null ? modalContainer : void 0 : inlineContainer;
|
|
12451
|
+
const isInModal = Boolean(portal && modalContainer);
|
|
12452
|
+
const positionMethod = isInModal ? "fixed" : "absolute";
|
|
12453
|
+
useEffect16(() => {
|
|
12454
|
+
if (!open || !isInModal || !triggerElement || typeof IntersectionObserver === "undefined") {
|
|
12455
|
+
return;
|
|
12456
|
+
}
|
|
12457
|
+
const observer = new IntersectionObserver((entries) => {
|
|
12458
|
+
for (const entry of entries) {
|
|
12459
|
+
if (!entry.isIntersecting) {
|
|
12460
|
+
hide();
|
|
12461
|
+
}
|
|
12462
|
+
}
|
|
12463
|
+
});
|
|
12464
|
+
observer.observe(triggerElement);
|
|
12465
|
+
return () => observer.disconnect();
|
|
12466
|
+
}, [open, isInModal, triggerElement, hide]);
|
|
12455
12467
|
return /* @__PURE__ */ jsx102(PopoverComponentContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs68(BaseUIPopover2.Root, { open, onOpenChange: handleOpenChange, children: [
|
|
12456
12468
|
/* @__PURE__ */ jsx102(
|
|
12457
12469
|
BaseUIPopover2.Trigger,
|
|
12458
12470
|
{
|
|
12471
|
+
ref: setTriggerElement,
|
|
12459
12472
|
css: [PopoverBtn, trigger2 ? void 0 : PopoverDefaulterTriggerBtn],
|
|
12460
12473
|
title: buttonText,
|
|
12461
12474
|
"data-testid": testId,
|
|
@@ -12466,18 +12479,28 @@ var Popover2 = ({
|
|
|
12466
12479
|
] })
|
|
12467
12480
|
}
|
|
12468
12481
|
),
|
|
12469
|
-
/* @__PURE__ */ jsx102(BaseUIPopover2.Portal, { container: portalContainer, children: /* @__PURE__ */ jsx102(
|
|
12470
|
-
BaseUIPopover2.
|
|
12482
|
+
/* @__PURE__ */ jsx102(BaseUIPopover2.Portal, { container: portalContainer, children: /* @__PURE__ */ jsx102(
|
|
12483
|
+
BaseUIPopover2.Positioner,
|
|
12471
12484
|
{
|
|
12472
|
-
|
|
12473
|
-
|
|
12474
|
-
|
|
12475
|
-
|
|
12476
|
-
|
|
12477
|
-
|
|
12478
|
-
|
|
12485
|
+
side,
|
|
12486
|
+
align: alignment,
|
|
12487
|
+
sideOffset: gutter,
|
|
12488
|
+
positionMethod,
|
|
12489
|
+
css: [Popover, isInModal ? void 0 : PopoverHideWhenAnchorHidden],
|
|
12490
|
+
children: /* @__PURE__ */ jsx102(
|
|
12491
|
+
BaseUIPopover2.Popup,
|
|
12492
|
+
{
|
|
12493
|
+
...id !== void 0 && { id },
|
|
12494
|
+
"aria-label": ariaLabel,
|
|
12495
|
+
role: "dialog",
|
|
12496
|
+
className,
|
|
12497
|
+
style,
|
|
12498
|
+
tabIndex,
|
|
12499
|
+
children: /* @__PURE__ */ jsx102(PopoverBody2, { variant, maxWidth, children })
|
|
12500
|
+
}
|
|
12501
|
+
)
|
|
12479
12502
|
}
|
|
12480
|
-
) })
|
|
12503
|
+
) }),
|
|
12481
12504
|
!portal && /* @__PURE__ */ jsx102("span", { ref: setInlineContainer })
|
|
12482
12505
|
] }) });
|
|
12483
12506
|
};
|
|
@@ -13444,6 +13467,9 @@ var ObjectGridItemHeading = css87`
|
|
|
13444
13467
|
max-width: 100%;
|
|
13445
13468
|
font-size: var(--fs-sm);
|
|
13446
13469
|
`;
|
|
13470
|
+
var ObjectGridItemHeadingSlot = css87`
|
|
13471
|
+
flex-shrink: 0;
|
|
13472
|
+
`;
|
|
13447
13473
|
var PopoverContent = css87`
|
|
13448
13474
|
min-width: 50px;
|
|
13449
13475
|
`;
|
|
@@ -13480,9 +13506,27 @@ var ObjectGridItemHeading2 = ({
|
|
|
13480
13506
|
};
|
|
13481
13507
|
}, []);
|
|
13482
13508
|
return /* @__PURE__ */ jsxs79(HorizontalRhythm, { align: "center", gap: "xs", css: { minWidth: 0 }, children: [
|
|
13483
|
-
beforeHeadingSlot ? /* @__PURE__ */ jsx114(
|
|
13509
|
+
beforeHeadingSlot ? /* @__PURE__ */ jsx114(
|
|
13510
|
+
HorizontalRhythm,
|
|
13511
|
+
{
|
|
13512
|
+
gap: "xs",
|
|
13513
|
+
align: "center",
|
|
13514
|
+
css: ObjectGridItemHeadingSlot,
|
|
13515
|
+
onClick: onStopPropagation,
|
|
13516
|
+
children: beforeHeadingSlot
|
|
13517
|
+
}
|
|
13518
|
+
) : null,
|
|
13484
13519
|
/* @__PURE__ */ jsx114(Tooltip, { title: hasTruncation && tooltip ? tooltip : "", children: /* @__PURE__ */ jsx114("div", { role: "heading", css: ObjectGridItemHeading, ref: headingRef, ...props, children: heading }) }),
|
|
13485
|
-
afterHeadingSlot ? /* @__PURE__ */ jsx114(
|
|
13520
|
+
afterHeadingSlot ? /* @__PURE__ */ jsx114(
|
|
13521
|
+
HorizontalRhythm,
|
|
13522
|
+
{
|
|
13523
|
+
gap: "xs",
|
|
13524
|
+
align: "center",
|
|
13525
|
+
css: ObjectGridItemHeadingSlot,
|
|
13526
|
+
onClick: onStopPropagation,
|
|
13527
|
+
children: afterHeadingSlot
|
|
13528
|
+
}
|
|
13529
|
+
) : null
|
|
13486
13530
|
] });
|
|
13487
13531
|
};
|
|
13488
13532
|
|
package/dist/index.js
CHANGED
|
@@ -10188,6 +10188,11 @@ var FilterChip = import_react76.css`
|
|
|
10188
10188
|
&[aria-selected='true'] {
|
|
10189
10189
|
border-color: var(--accent-dark);
|
|
10190
10190
|
}
|
|
10191
|
+
|
|
10192
|
+
&:disabled {
|
|
10193
|
+
cursor: not-allowed;
|
|
10194
|
+
opacity: var(--opacity-50);
|
|
10195
|
+
}
|
|
10191
10196
|
`;
|
|
10192
10197
|
var FilterChipDropdown = import_react76.css`
|
|
10193
10198
|
padding: var(--input-padding);
|
|
@@ -10508,19 +10513,8 @@ var PopoverBtn = import_react81.css`
|
|
|
10508
10513
|
`;
|
|
10509
10514
|
var Popover = import_react81.css`
|
|
10510
10515
|
z-index: var(--z-menu);
|
|
10511
|
-
|
|
10512
|
-
|
|
10513
|
-
* Hide the popover when its anchor (trigger) has been scrolled out of view by a
|
|
10514
|
-
* clipping ancestor. Without this, the portaled popup keeps tracking the (now
|
|
10515
|
-
* hidden) trigger and Base UI's collision avoidance shifts it back into view
|
|
10516
|
-
* each scroll frame, producing a flashing/jumping effect (see UNI-9326).
|
|
10517
|
-
*
|
|
10518
|
-
* 'display: none' is used (rather than 'visibility: hidden') so the
|
|
10519
|
-
* positioner is removed from layout while the anchor is hidden; otherwise the
|
|
10520
|
-
* still-laid-out positioner causes scroll/layout shift as Floating UI keeps
|
|
10521
|
-
* repositioning it during scroll. This is also the pattern Base UI's docs
|
|
10522
|
-
* recommend for data-anchor-hidden.
|
|
10523
|
-
*/
|
|
10516
|
+
`;
|
|
10517
|
+
var PopoverHideWhenAnchorHidden = import_react81.css`
|
|
10524
10518
|
&[data-anchor-hidden] {
|
|
10525
10519
|
display: none;
|
|
10526
10520
|
}
|
|
@@ -10530,6 +10524,7 @@ var PopoverDefaulterTriggerBtn = import_react81.css`
|
|
|
10530
10524
|
background: none;
|
|
10531
10525
|
padding: var(--spacing-2xs);
|
|
10532
10526
|
border-radius: var(--rounded-full);
|
|
10527
|
+
flex-shrink: 0;
|
|
10533
10528
|
|
|
10534
10529
|
&:hover {
|
|
10535
10530
|
background-color: rgba(0, 0, 0, 0.05);
|
|
@@ -14393,14 +14388,32 @@ var Popover2 = ({
|
|
|
14393
14388
|
[open, setOpen, hide, show]
|
|
14394
14389
|
);
|
|
14395
14390
|
const [inlineContainer, setInlineContainer] = (0, import_react121.useState)(null);
|
|
14391
|
+
const [triggerElement, setTriggerElement] = (0, import_react121.useState)(null);
|
|
14396
14392
|
(0, import_react121.useEffect)(() => {
|
|
14397
14393
|
onInit == null ? void 0 : onInit({ store: shimStore });
|
|
14398
14394
|
}, [shimStore]);
|
|
14399
14395
|
const portalContainer = portal ? modalContainer != null ? modalContainer : void 0 : inlineContainer;
|
|
14396
|
+
const isInModal = Boolean(portal && modalContainer);
|
|
14397
|
+
const positionMethod = isInModal ? "fixed" : "absolute";
|
|
14398
|
+
(0, import_react121.useEffect)(() => {
|
|
14399
|
+
if (!open || !isInModal || !triggerElement || typeof IntersectionObserver === "undefined") {
|
|
14400
|
+
return;
|
|
14401
|
+
}
|
|
14402
|
+
const observer = new IntersectionObserver((entries) => {
|
|
14403
|
+
for (const entry of entries) {
|
|
14404
|
+
if (!entry.isIntersecting) {
|
|
14405
|
+
hide();
|
|
14406
|
+
}
|
|
14407
|
+
}
|
|
14408
|
+
});
|
|
14409
|
+
observer.observe(triggerElement);
|
|
14410
|
+
return () => observer.disconnect();
|
|
14411
|
+
}, [open, isInModal, triggerElement, hide]);
|
|
14400
14412
|
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(PopoverComponentContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(import_popover2.Popover.Root, { open, onOpenChange: handleOpenChange, children: [
|
|
14401
14413
|
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
14402
14414
|
import_popover2.Popover.Trigger,
|
|
14403
14415
|
{
|
|
14416
|
+
ref: setTriggerElement,
|
|
14404
14417
|
css: [PopoverBtn, trigger2 ? void 0 : PopoverDefaulterTriggerBtn],
|
|
14405
14418
|
title: buttonText,
|
|
14406
14419
|
"data-testid": testId,
|
|
@@ -14411,18 +14424,28 @@ var Popover2 = ({
|
|
|
14411
14424
|
] })
|
|
14412
14425
|
}
|
|
14413
14426
|
),
|
|
14414
|
-
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_popover2.Popover.Portal, { container: portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
14415
|
-
import_popover2.Popover.
|
|
14427
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_popover2.Popover.Portal, { container: portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
14428
|
+
import_popover2.Popover.Positioner,
|
|
14416
14429
|
{
|
|
14417
|
-
|
|
14418
|
-
|
|
14419
|
-
|
|
14420
|
-
|
|
14421
|
-
|
|
14422
|
-
|
|
14423
|
-
|
|
14430
|
+
side,
|
|
14431
|
+
align: alignment,
|
|
14432
|
+
sideOffset: gutter,
|
|
14433
|
+
positionMethod,
|
|
14434
|
+
css: [Popover, isInModal ? void 0 : PopoverHideWhenAnchorHidden],
|
|
14435
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
14436
|
+
import_popover2.Popover.Popup,
|
|
14437
|
+
{
|
|
14438
|
+
...id !== void 0 && { id },
|
|
14439
|
+
"aria-label": ariaLabel,
|
|
14440
|
+
role: "dialog",
|
|
14441
|
+
className,
|
|
14442
|
+
style,
|
|
14443
|
+
tabIndex,
|
|
14444
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(PopoverBody2, { variant, maxWidth, children })
|
|
14445
|
+
}
|
|
14446
|
+
)
|
|
14424
14447
|
}
|
|
14425
|
-
) })
|
|
14448
|
+
) }),
|
|
14426
14449
|
!portal && /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("span", { ref: setInlineContainer })
|
|
14427
14450
|
] }) });
|
|
14428
14451
|
};
|
|
@@ -15418,6 +15441,9 @@ var ObjectGridItemHeading = import_react135.css`
|
|
|
15418
15441
|
max-width: 100%;
|
|
15419
15442
|
font-size: var(--fs-sm);
|
|
15420
15443
|
`;
|
|
15444
|
+
var ObjectGridItemHeadingSlot = import_react135.css`
|
|
15445
|
+
flex-shrink: 0;
|
|
15446
|
+
`;
|
|
15421
15447
|
var PopoverContent = import_react135.css`
|
|
15422
15448
|
min-width: 50px;
|
|
15423
15449
|
`;
|
|
@@ -15454,9 +15480,27 @@ var ObjectGridItemHeading2 = ({
|
|
|
15454
15480
|
};
|
|
15455
15481
|
}, []);
|
|
15456
15482
|
return /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(HorizontalRhythm, { align: "center", gap: "xs", css: { minWidth: 0 }, children: [
|
|
15457
|
-
beforeHeadingSlot ? /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
15483
|
+
beforeHeadingSlot ? /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
15484
|
+
HorizontalRhythm,
|
|
15485
|
+
{
|
|
15486
|
+
gap: "xs",
|
|
15487
|
+
align: "center",
|
|
15488
|
+
css: ObjectGridItemHeadingSlot,
|
|
15489
|
+
onClick: onStopPropagation,
|
|
15490
|
+
children: beforeHeadingSlot
|
|
15491
|
+
}
|
|
15492
|
+
) : null,
|
|
15458
15493
|
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)(Tooltip, { title: hasTruncation && tooltip ? tooltip : "", children: /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("div", { role: "heading", css: ObjectGridItemHeading, ref: headingRef, ...props, children: heading }) }),
|
|
15459
|
-
afterHeadingSlot ? /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
15494
|
+
afterHeadingSlot ? /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
15495
|
+
HorizontalRhythm,
|
|
15496
|
+
{
|
|
15497
|
+
gap: "xs",
|
|
15498
|
+
align: "center",
|
|
15499
|
+
css: ObjectGridItemHeadingSlot,
|
|
15500
|
+
onClick: onStopPropagation,
|
|
15501
|
+
children: afterHeadingSlot
|
|
15502
|
+
}
|
|
15503
|
+
) : null
|
|
15460
15504
|
] });
|
|
15461
15505
|
};
|
|
15462
15506
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/design-system",
|
|
3
|
-
"version": "20.71.
|
|
3
|
+
"version": "20.71.2-alpha.13+1445ced748",
|
|
4
4
|
"description": "Uniform design system components",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"exports": {
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"@storybook/react-vite": "10.4.6",
|
|
35
35
|
"@types/react": "19.2.17",
|
|
36
36
|
"@types/react-dom": "19.2.3",
|
|
37
|
-
"@uniformdev/canvas": "^20.71.
|
|
38
|
-
"@uniformdev/richtext": "^20.71.
|
|
37
|
+
"@uniformdev/canvas": "^20.71.2-alpha.13+1445ced748",
|
|
38
|
+
"@uniformdev/richtext": "^20.71.2-alpha.13+1445ced748",
|
|
39
39
|
"autoprefixer": "10.5.0",
|
|
40
40
|
"hygen": "6.2.11",
|
|
41
41
|
"jsdom": "29.1.1",
|
|
@@ -82,5 +82,5 @@
|
|
|
82
82
|
"publishConfig": {
|
|
83
83
|
"access": "public"
|
|
84
84
|
},
|
|
85
|
-
"gitHead": "
|
|
85
|
+
"gitHead": "1445ced748266b10644d34f1addf52bbab2ef4bb"
|
|
86
86
|
}
|