@uniformdev/design-system 20.64.1-alpha.3 → 20.66.0
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 +370 -196
- package/dist/index.d.mts +20 -7
- package/dist/index.d.ts +20 -7
- package/dist/index.js +680 -502
- package/package.json +4 -4
package/dist/esm/index.js
CHANGED
|
@@ -3346,18 +3346,11 @@ var linkButtonDisabled = css14`
|
|
|
3346
3346
|
pointer-events: none;
|
|
3347
3347
|
`;
|
|
3348
3348
|
var linkButtonTruncated = css14`
|
|
3349
|
-
|
|
3349
|
+
display: block;
|
|
3350
|
+
width: 100%;
|
|
3350
3351
|
overflow: hidden;
|
|
3351
3352
|
text-overflow: ellipsis;
|
|
3352
|
-
|
|
3353
|
-
display: inline-block;
|
|
3354
|
-
vertical-align: bottom;
|
|
3355
|
-
|
|
3356
|
-
/* Truncate over two lines */
|
|
3357
|
-
display: -webkit-box;
|
|
3358
|
-
-webkit-line-clamp: 1;
|
|
3359
|
-
-webkit-box-orient: vertical;
|
|
3360
|
-
white-space: normal;
|
|
3353
|
+
white-space: nowrap;
|
|
3361
3354
|
`;
|
|
3362
3355
|
|
|
3363
3356
|
// src/components/Button/LinkButton.tsx
|
|
@@ -5082,9 +5075,17 @@ var menuSelectSizeStyles = {
|
|
|
5082
5075
|
`
|
|
5083
5076
|
};
|
|
5084
5077
|
|
|
5078
|
+
// src/components/Menu/resolveMenuPlacement.ts
|
|
5079
|
+
var legacyPlacements = ["auto", "auto-start", "auto-end"];
|
|
5080
|
+
function resolveMenuPlacement(placement, isNested) {
|
|
5081
|
+
const placementOverride = legacyPlacements.includes(placement) ? void 0 : placement;
|
|
5082
|
+
const defaultSide = isNested ? "right" : "bottom";
|
|
5083
|
+
const defaultAlignment = isNested ? "start" : "end";
|
|
5084
|
+
return placementOverride ? parsePlacement(placementOverride) : { side: defaultSide, alignment: defaultAlignment };
|
|
5085
|
+
}
|
|
5086
|
+
|
|
5085
5087
|
// src/components/Menu/Menu.tsx
|
|
5086
5088
|
import { jsx as jsx28, jsxs as jsxs17 } from "@emotion/react/jsx-runtime";
|
|
5087
|
-
var legacyPlacements = ["auto", "auto-start", "auto-end"];
|
|
5088
5089
|
var MenuNestingContext = createContext3({ isNested: false });
|
|
5089
5090
|
var SubmenuTriggerModeContext = createContext3(false);
|
|
5090
5091
|
function useIsSubmenuTriggerMode() {
|
|
@@ -5116,10 +5117,7 @@ var Menu = React8.forwardRef(function Menu2({
|
|
|
5116
5117
|
const { isNested } = useContext3(MenuNestingContext);
|
|
5117
5118
|
const modalContainer = useModalPortalContainer();
|
|
5118
5119
|
const [inlineContainer, setInlineContainer] = useState5(null);
|
|
5119
|
-
const
|
|
5120
|
-
const defaultSide = isNested ? "right" : "bottom";
|
|
5121
|
-
const defaultAlignment = isNested ? "start" : "center";
|
|
5122
|
-
const { side, alignment } = placementOverride ? parsePlacement(placementOverride) : { side: defaultSide, alignment: defaultAlignment };
|
|
5120
|
+
const { side, alignment } = resolveMenuPlacement(placement, isNested);
|
|
5123
5121
|
const anchor = getAnchorRect ? {
|
|
5124
5122
|
getBoundingClientRect: () => {
|
|
5125
5123
|
var _a, _b, _c, _d;
|
|
@@ -9762,14 +9760,14 @@ var img = css63`
|
|
|
9762
9760
|
max-width: 100%;
|
|
9763
9761
|
max-height: 100%;
|
|
9764
9762
|
height: auto;
|
|
9765
|
-
opacity:
|
|
9763
|
+
opacity: 1;
|
|
9764
|
+
transition: opacity var(--duration-fast) var(--timing-ease-out);
|
|
9766
9765
|
margin: 0 auto;
|
|
9767
9766
|
`;
|
|
9768
9767
|
var imgLoading = css63`
|
|
9769
9768
|
opacity: 0;
|
|
9770
9769
|
`;
|
|
9771
9770
|
var imgLoaded = css63`
|
|
9772
|
-
animation: ${fadeIn} var(--duration-fast) var(--timing-ease-out) forwards;
|
|
9773
9771
|
opacity: 1;
|
|
9774
9772
|
`;
|
|
9775
9773
|
var brokenImage = css63`
|
|
@@ -9880,23 +9878,27 @@ function Image({
|
|
|
9880
9878
|
useEffect11(() => {
|
|
9881
9879
|
currentUpdateImageSrcRef.current();
|
|
9882
9880
|
}, [currentSrc]);
|
|
9883
|
-
const handleLoadEvent = () => {
|
|
9881
|
+
const handleLoadEvent = (event) => {
|
|
9884
9882
|
setLoadErrorText("");
|
|
9885
9883
|
if (currentSrc) {
|
|
9886
9884
|
setLoading(true);
|
|
9887
9885
|
}
|
|
9888
9886
|
const timer = setTimeout(() => {
|
|
9887
|
+
var _a;
|
|
9889
9888
|
setLoading(false);
|
|
9889
|
+
(_a = imgAttribs.onLoad) == null ? void 0 : _a.call(imgAttribs, event);
|
|
9890
9890
|
}, MIN_LOADING_MS);
|
|
9891
9891
|
return () => clearTimeout(timer);
|
|
9892
9892
|
};
|
|
9893
|
-
const handleErrorEvent = () => {
|
|
9893
|
+
const handleErrorEvent = (event) => {
|
|
9894
|
+
var _a;
|
|
9894
9895
|
if (tryFallback()) {
|
|
9895
9896
|
setLoading(true);
|
|
9896
9897
|
return;
|
|
9897
9898
|
}
|
|
9898
9899
|
setLoadErrorText("Image failed to load");
|
|
9899
9900
|
setLoading(false);
|
|
9901
|
+
(_a = imgAttribs.onError) == null ? void 0 : _a.call(imgAttribs, event);
|
|
9900
9902
|
};
|
|
9901
9903
|
return /* @__PURE__ */ jsxs53(
|
|
9902
9904
|
"span",
|
|
@@ -12914,6 +12916,9 @@ var ObjectGridItemMediaInner = css85`
|
|
|
12914
12916
|
height: 100%;
|
|
12915
12917
|
z-index: 0;
|
|
12916
12918
|
`;
|
|
12919
|
+
var ObjectGridItemMediaOnlyInner = css85`
|
|
12920
|
+
border-radius: var(--rounded-base);
|
|
12921
|
+
`;
|
|
12917
12922
|
var ObjectGridItemContentWrapper = css85`
|
|
12918
12923
|
display: grid;
|
|
12919
12924
|
grid-template-columns: 1fr auto;
|
|
@@ -12955,6 +12960,7 @@ var ObjectGridItem2 = ({
|
|
|
12955
12960
|
const onStopPropagation = (e) => {
|
|
12956
12961
|
e.stopPropagation();
|
|
12957
12962
|
};
|
|
12963
|
+
const mediaOnly = !(header2 || children || rightSlot || menuItems);
|
|
12958
12964
|
return /* @__PURE__ */ jsxs76(
|
|
12959
12965
|
"div",
|
|
12960
12966
|
{
|
|
@@ -12962,13 +12968,19 @@ var ObjectGridItem2 = ({
|
|
|
12962
12968
|
"aria-selected": isSelected,
|
|
12963
12969
|
...props,
|
|
12964
12970
|
children: [
|
|
12965
|
-
/* @__PURE__ */ jsx111("div", { css: ObjectGridItemMediaWrapper, children: /* @__PURE__ */ jsx111(
|
|
12966
|
-
|
|
12967
|
-
|
|
12968
|
-
|
|
12969
|
-
|
|
12970
|
-
|
|
12971
|
-
|
|
12971
|
+
/* @__PURE__ */ jsx111("div", { css: ObjectGridItemMediaWrapper, children: /* @__PURE__ */ jsx111(
|
|
12972
|
+
"div",
|
|
12973
|
+
{
|
|
12974
|
+
css: [ObjectGridItemMediaInner, mediaOnly ? ObjectGridItemMediaOnlyInner : void 0],
|
|
12975
|
+
children: cover
|
|
12976
|
+
}
|
|
12977
|
+
) }),
|
|
12978
|
+
header2 || children || rightSlot || menuItems ? /* @__PURE__ */ jsxs76("div", { css: ObjectGridItemContentWrapper, children: [
|
|
12979
|
+
header2 || children ? /* @__PURE__ */ jsxs76(VerticalRhythm, { gap: "0", css: ObjectGridItemInnerWrapper, children: [
|
|
12980
|
+
header2 ? /* @__PURE__ */ jsx111(HorizontalRhythm, { gap: "xs", align: "center", children: header2 }) : null,
|
|
12981
|
+
children ? /* @__PURE__ */ jsx111("div", { css: ObjectGridItemSubtitle, children }) : null
|
|
12982
|
+
] }) : null,
|
|
12983
|
+
rightSlot || menuItems ? /* @__PURE__ */ jsxs76(
|
|
12972
12984
|
HorizontalRhythm,
|
|
12973
12985
|
{
|
|
12974
12986
|
gap: "xs",
|
|
@@ -12987,8 +12999,8 @@ var ObjectGridItem2 = ({
|
|
|
12987
12999
|
) : null
|
|
12988
13000
|
]
|
|
12989
13001
|
}
|
|
12990
|
-
)
|
|
12991
|
-
] })
|
|
13002
|
+
) : null
|
|
13003
|
+
] }) : null
|
|
12992
13004
|
]
|
|
12993
13005
|
}
|
|
12994
13006
|
);
|
|
@@ -13126,6 +13138,7 @@ var ObjectGridItemCoverButton = ({
|
|
|
13126
13138
|
isSelected,
|
|
13127
13139
|
onSelection,
|
|
13128
13140
|
selectedText = "selected",
|
|
13141
|
+
coverSlotBottomRight,
|
|
13129
13142
|
...props
|
|
13130
13143
|
}) => {
|
|
13131
13144
|
return /* @__PURE__ */ jsx112(
|
|
@@ -13142,7 +13155,7 @@ var ObjectGridItemCoverButton = ({
|
|
|
13142
13155
|
ObjectGridItemCover,
|
|
13143
13156
|
{
|
|
13144
13157
|
...props,
|
|
13145
|
-
coverSlotBottomRight: isSelected ? /* @__PURE__ */ jsx112("div", { css: CoverSelectedChip, children: /* @__PURE__ */ jsx112(Chip, { text: selectedText, size: "xs", theme: "accent-dark" }) }) :
|
|
13158
|
+
coverSlotBottomRight: isSelected ? /* @__PURE__ */ jsx112("div", { css: CoverSelectedChip, children: /* @__PURE__ */ jsx112(Chip, { text: selectedText, size: "xs", theme: "accent-dark" }) }) : coverSlotBottomRight
|
|
13146
13159
|
}
|
|
13147
13160
|
)
|
|
13148
13161
|
}
|
|
@@ -13296,7 +13309,7 @@ var ObjectListItem = css89`
|
|
|
13296
13309
|
padding: var(--spacing-sm);
|
|
13297
13310
|
transition: background-color var(--duration-fast) var(--timing-ease-out);
|
|
13298
13311
|
container-type: inline-size;
|
|
13299
|
-
grid-template-columns: minmax(0, auto) 1fr auto;
|
|
13312
|
+
grid-template-columns: minmax(0, auto) minmax(0, 1fr) auto;
|
|
13300
13313
|
|
|
13301
13314
|
&[aria-selected='true'] {
|
|
13302
13315
|
background: var(--gray-50);
|
|
@@ -13320,6 +13333,21 @@ var ObjectListItemContentWrapper = css89`
|
|
|
13320
13333
|
gap: var(--spacing-sm);
|
|
13321
13334
|
justify-content: space-between;
|
|
13322
13335
|
flex-grow: 1;
|
|
13336
|
+
min-width: 0;
|
|
13337
|
+
`;
|
|
13338
|
+
var ObjectListItemTitleArea = css89`
|
|
13339
|
+
min-width: 0;
|
|
13340
|
+
overflow: hidden;
|
|
13341
|
+
`;
|
|
13342
|
+
var ObjectListItemTitleColumnContent = css89`
|
|
13343
|
+
flex: 1;
|
|
13344
|
+
min-width: 0;
|
|
13345
|
+
overflow: hidden;
|
|
13346
|
+
`;
|
|
13347
|
+
var objectListItemContentWrapperColumns = (minContainerQueryWidth, hasCover) => css89`
|
|
13348
|
+
${cq(minContainerQueryWidth)} {
|
|
13349
|
+
grid-template-columns: ${hasCover ? "minmax(0, auto) " : ""}minmax(0, 1fr) minmax(0, auto);
|
|
13350
|
+
}
|
|
13323
13351
|
`;
|
|
13324
13352
|
var ObjectListItemRightSlot = css89`
|
|
13325
13353
|
display: flex;
|
|
@@ -13462,36 +13490,44 @@ var ObjectListItem2 = ({ minContainerQueryWidth = "34rem", ...props }) => {
|
|
|
13462
13490
|
{
|
|
13463
13491
|
css: [
|
|
13464
13492
|
ObjectListItemContentWrapper,
|
|
13465
|
-
|
|
13466
|
-
grid-template-columns: ${cover ? "minmax(0, auto)" : ""} minmax(0, 1fr) minmax(0, auto);
|
|
13467
|
-
}`,
|
|
13493
|
+
objectListItemContentWrapperColumns(minContainerQueryWidth, Boolean(cover)),
|
|
13468
13494
|
renderAs === "single" ? ObjectListItemSingle : null
|
|
13469
13495
|
],
|
|
13470
13496
|
children: [
|
|
13471
13497
|
cover ? /* @__PURE__ */ jsx117(HorizontalRhythm, { gap: "sm", align: "center", children: cover }) : null,
|
|
13472
|
-
/* @__PURE__ */ jsxs81(
|
|
13473
|
-
|
|
13474
|
-
|
|
13475
|
-
|
|
13476
|
-
|
|
13477
|
-
|
|
13478
|
-
|
|
13479
|
-
"
|
|
13480
|
-
|
|
13481
|
-
|
|
13482
|
-
|
|
13483
|
-
|
|
13484
|
-
|
|
13485
|
-
|
|
13486
|
-
|
|
13487
|
-
|
|
13488
|
-
|
|
13489
|
-
|
|
13490
|
-
|
|
13491
|
-
|
|
13492
|
-
|
|
13493
|
-
|
|
13494
|
-
|
|
13498
|
+
/* @__PURE__ */ jsxs81(
|
|
13499
|
+
HorizontalRhythm,
|
|
13500
|
+
{
|
|
13501
|
+
gap: "xs",
|
|
13502
|
+
align: renderAs === "multi" ? "flex-start" : "center",
|
|
13503
|
+
css: ObjectListItemTitleArea,
|
|
13504
|
+
children: [
|
|
13505
|
+
leftSlot ? /* @__PURE__ */ jsx117(HorizontalRhythm, { gap: "xs", align: "baseline", children: leftSlot }) : null,
|
|
13506
|
+
/* @__PURE__ */ jsxs81(
|
|
13507
|
+
VerticalRhythm,
|
|
13508
|
+
{
|
|
13509
|
+
gap: "0",
|
|
13510
|
+
justify: renderAs === "multi" ? "flex-start" : "center",
|
|
13511
|
+
"data-testid": "title-container",
|
|
13512
|
+
css: ObjectListItemTitleColumnContent,
|
|
13513
|
+
children: [
|
|
13514
|
+
/* @__PURE__ */ jsx117(
|
|
13515
|
+
HorizontalRhythm,
|
|
13516
|
+
{
|
|
13517
|
+
gap: "xs",
|
|
13518
|
+
align: renderAs === "multi" ? "flex-start" : "center",
|
|
13519
|
+
"data-testid": "title",
|
|
13520
|
+
css: ObjectListItemTitleArea,
|
|
13521
|
+
children: header2
|
|
13522
|
+
}
|
|
13523
|
+
),
|
|
13524
|
+
renderAs === "multi" ? props.children : null
|
|
13525
|
+
]
|
|
13526
|
+
}
|
|
13527
|
+
)
|
|
13528
|
+
]
|
|
13529
|
+
}
|
|
13530
|
+
),
|
|
13495
13531
|
/* @__PURE__ */ jsx117(HorizontalRhythm, { gap: "xs", align: renderAs === "multi" ? "flex-start" : "center", children: rightSlot })
|
|
13496
13532
|
]
|
|
13497
13533
|
}
|
|
@@ -13551,6 +13587,10 @@ var ObjectListItemHeading = css90`
|
|
|
13551
13587
|
display: flex;
|
|
13552
13588
|
flex-direction: column;
|
|
13553
13589
|
gap: var(--spacing-xs);
|
|
13590
|
+
width: 100%;
|
|
13591
|
+
min-width: 0;
|
|
13592
|
+
max-width: 100%;
|
|
13593
|
+
overflow: hidden;
|
|
13554
13594
|
|
|
13555
13595
|
${cq("34rem")} {
|
|
13556
13596
|
align-items: center;
|
|
@@ -13559,6 +13599,20 @@ var ObjectListItemHeading = css90`
|
|
|
13559
13599
|
`;
|
|
13560
13600
|
var ObjectListItemHeadingAfterWrapper = css90`
|
|
13561
13601
|
line-height: 1.25;
|
|
13602
|
+
min-width: 0;
|
|
13603
|
+
flex: 1;
|
|
13604
|
+
width: 100%;
|
|
13605
|
+
overflow: hidden;
|
|
13606
|
+
`;
|
|
13607
|
+
var ObjectListItemHeadingText = css90`
|
|
13608
|
+
flex: 1;
|
|
13609
|
+
min-width: 0;
|
|
13610
|
+
overflow: hidden;
|
|
13611
|
+
text-overflow: ellipsis;
|
|
13612
|
+
white-space: nowrap;
|
|
13613
|
+
`;
|
|
13614
|
+
var ObjectListItemHeadingAfterSlot = css90`
|
|
13615
|
+
flex-shrink: 0;
|
|
13562
13616
|
`;
|
|
13563
13617
|
|
|
13564
13618
|
// src/components/Objects/ObjectListItemHeading.tsx
|
|
@@ -13573,8 +13627,8 @@ var ObjectListItemHeading2 = ({
|
|
|
13573
13627
|
return /* @__PURE__ */ jsxs83("div", { css: ObjectListItemHeading, ...props, children: [
|
|
13574
13628
|
beforeHeadingSlot ? /* @__PURE__ */ jsx120(HorizontalRhythm, { gap: "xs", align: "center", children: beforeHeadingSlot }) : null,
|
|
13575
13629
|
/* @__PURE__ */ jsxs83(HorizontalRhythm, { css: ObjectListItemHeadingAfterWrapper, gap: "xs", align: "flex-start", children: [
|
|
13576
|
-
/* @__PURE__ */ jsx120("div", { role: "heading", "data-testid": headingTestId, children: heading }),
|
|
13577
|
-
afterHeadingSlot
|
|
13630
|
+
/* @__PURE__ */ jsx120("div", { role: "heading", "data-testid": headingTestId, css: ObjectListItemHeadingText, children: heading }),
|
|
13631
|
+
afterHeadingSlot ? /* @__PURE__ */ jsx120("div", { css: ObjectListItemHeadingAfterSlot, children: afterHeadingSlot }) : null
|
|
13578
13632
|
] })
|
|
13579
13633
|
] });
|
|
13580
13634
|
};
|
|
@@ -13584,6 +13638,11 @@ import { css as css91 } from "@emotion/react";
|
|
|
13584
13638
|
var ObjectListSubText = css91`
|
|
13585
13639
|
color: var(--gray-500);
|
|
13586
13640
|
font-size: var(--fs-sm);
|
|
13641
|
+
min-width: 0;
|
|
13642
|
+
max-width: 100%;
|
|
13643
|
+
overflow: hidden;
|
|
13644
|
+
text-overflow: ellipsis;
|
|
13645
|
+
white-space: nowrap;
|
|
13587
13646
|
`;
|
|
13588
13647
|
|
|
13589
13648
|
// src/components/Objects/ObjectListSubText.tsx
|
|
@@ -13593,10 +13652,16 @@ var ObjectListSubText2 = ({ children, ...props }) => {
|
|
|
13593
13652
|
};
|
|
13594
13653
|
|
|
13595
13654
|
// src/components/Pagination/Pagination.tsx
|
|
13655
|
+
import * as React20 from "react";
|
|
13596
13656
|
import Paginate from "react-paginate";
|
|
13597
13657
|
|
|
13598
13658
|
// src/components/Pagination/Pagniation.styles.ts
|
|
13599
13659
|
import { css as css92 } from "@emotion/css";
|
|
13660
|
+
var wrapper = css92`
|
|
13661
|
+
display: inline-flex;
|
|
13662
|
+
max-width: 100%;
|
|
13663
|
+
overflow-x: auto;
|
|
13664
|
+
`;
|
|
13600
13665
|
var container2 = css92`
|
|
13601
13666
|
align-items: center;
|
|
13602
13667
|
display: flex;
|
|
@@ -13623,6 +13688,90 @@ var page = css92`
|
|
|
13623
13688
|
margin-right: var(--spacing-xs);
|
|
13624
13689
|
`;
|
|
13625
13690
|
|
|
13691
|
+
// src/components/Pagination/usePaginationDisplayRange.ts
|
|
13692
|
+
import { useEffect as useEffect19, useState as useState23 } from "react";
|
|
13693
|
+
var DEFAULT_PAGINATION_DISPLAY_RANGE = {
|
|
13694
|
+
marginPagesDisplayed: 2,
|
|
13695
|
+
pageRangeDisplayed: 5
|
|
13696
|
+
};
|
|
13697
|
+
var PREV_NEXT_WIDTH = 64;
|
|
13698
|
+
var BREAK_WIDTH = 28;
|
|
13699
|
+
var PAGE_PADDING = 32;
|
|
13700
|
+
var PAGE_MARGIN = 8;
|
|
13701
|
+
var DIGIT_WIDTH = 10;
|
|
13702
|
+
var WIDE_DISPLAY_RANGE = {
|
|
13703
|
+
marginPagesDisplayed: 2,
|
|
13704
|
+
pageRangeDisplayed: 5
|
|
13705
|
+
};
|
|
13706
|
+
var MEDIUM_DISPLAY_RANGE = {
|
|
13707
|
+
marginPagesDisplayed: 1,
|
|
13708
|
+
pageRangeDisplayed: 3
|
|
13709
|
+
};
|
|
13710
|
+
var COMPACT_DISPLAY_RANGE = {
|
|
13711
|
+
marginPagesDisplayed: 0,
|
|
13712
|
+
pageRangeDisplayed: 3
|
|
13713
|
+
};
|
|
13714
|
+
var MINIMAL_DISPLAY_RANGE = {
|
|
13715
|
+
marginPagesDisplayed: 0,
|
|
13716
|
+
pageRangeDisplayed: 1
|
|
13717
|
+
};
|
|
13718
|
+
function estimatePageButtonWidth(pageCount) {
|
|
13719
|
+
const digits = Math.max(1, String(pageCount).length);
|
|
13720
|
+
return PAGE_PADDING + PAGE_MARGIN + digits * DIGIT_WIDTH;
|
|
13721
|
+
}
|
|
13722
|
+
function getMinimumWidthForDisplayRange(pageCount, displayRange) {
|
|
13723
|
+
const pageButtonWidth = estimatePageButtonWidth(pageCount);
|
|
13724
|
+
const pageButtons = displayRange.marginPagesDisplayed * 2 + displayRange.pageRangeDisplayed;
|
|
13725
|
+
return pageButtons * pageButtonWidth + PREV_NEXT_WIDTH + BREAK_WIDTH * 2;
|
|
13726
|
+
}
|
|
13727
|
+
function getPaginationDisplayRange(containerWidth, pageCount) {
|
|
13728
|
+
if (containerWidth <= 0) {
|
|
13729
|
+
return MINIMAL_DISPLAY_RANGE;
|
|
13730
|
+
}
|
|
13731
|
+
if (containerWidth >= getMinimumWidthForDisplayRange(pageCount, WIDE_DISPLAY_RANGE)) {
|
|
13732
|
+
return WIDE_DISPLAY_RANGE;
|
|
13733
|
+
}
|
|
13734
|
+
if (containerWidth >= getMinimumWidthForDisplayRange(pageCount, MEDIUM_DISPLAY_RANGE)) {
|
|
13735
|
+
return MEDIUM_DISPLAY_RANGE;
|
|
13736
|
+
}
|
|
13737
|
+
if (containerWidth >= getMinimumWidthForDisplayRange(pageCount, COMPACT_DISPLAY_RANGE)) {
|
|
13738
|
+
return COMPACT_DISPLAY_RANGE;
|
|
13739
|
+
}
|
|
13740
|
+
return MINIMAL_DISPLAY_RANGE;
|
|
13741
|
+
}
|
|
13742
|
+
function getAvailablePaginationWidth(container5) {
|
|
13743
|
+
var _a;
|
|
13744
|
+
const measurementElement = (_a = container5.parentElement) != null ? _a : container5;
|
|
13745
|
+
return measurementElement.getBoundingClientRect().width;
|
|
13746
|
+
}
|
|
13747
|
+
function usePaginationDisplayRange(containerRef, pageCount) {
|
|
13748
|
+
const [displayRange, setDisplayRange] = useState23(DEFAULT_PAGINATION_DISPLAY_RANGE);
|
|
13749
|
+
useEffect19(() => {
|
|
13750
|
+
var _a;
|
|
13751
|
+
const container5 = containerRef.current;
|
|
13752
|
+
if (!container5) {
|
|
13753
|
+
return;
|
|
13754
|
+
}
|
|
13755
|
+
const measurementElement = (_a = container5.parentElement) != null ? _a : container5;
|
|
13756
|
+
const updateDisplayRange = () => {
|
|
13757
|
+
const currentContainer = containerRef.current;
|
|
13758
|
+
if (!currentContainer) {
|
|
13759
|
+
return;
|
|
13760
|
+
}
|
|
13761
|
+
setDisplayRange(getPaginationDisplayRange(getAvailablePaginationWidth(currentContainer), pageCount));
|
|
13762
|
+
};
|
|
13763
|
+
updateDisplayRange();
|
|
13764
|
+
const observer = new ResizeObserver(() => {
|
|
13765
|
+
updateDisplayRange();
|
|
13766
|
+
});
|
|
13767
|
+
observer.observe(measurementElement);
|
|
13768
|
+
return () => {
|
|
13769
|
+
observer.disconnect();
|
|
13770
|
+
};
|
|
13771
|
+
}, [containerRef, pageCount]);
|
|
13772
|
+
return displayRange;
|
|
13773
|
+
}
|
|
13774
|
+
|
|
13626
13775
|
// src/components/Pagination/Pagination.tsx
|
|
13627
13776
|
import { jsx as jsx122 } from "@emotion/react/jsx-runtime";
|
|
13628
13777
|
function Pagination({
|
|
@@ -13631,15 +13780,14 @@ function Pagination({
|
|
|
13631
13780
|
total,
|
|
13632
13781
|
onPageChange
|
|
13633
13782
|
}) {
|
|
13634
|
-
|
|
13635
|
-
|
|
13636
|
-
|
|
13637
|
-
const
|
|
13638
|
-
|
|
13639
|
-
if (pageCount <= 1) {
|
|
13783
|
+
const containerRef = React20.useRef(null);
|
|
13784
|
+
const pageCount = limit >= 1 ? Math.ceil(total / limit) : 0;
|
|
13785
|
+
const currentPage = limit >= 1 ? Math.ceil(offset / limit) : 0;
|
|
13786
|
+
const { marginPagesDisplayed, pageRangeDisplayed } = usePaginationDisplayRange(containerRef, pageCount);
|
|
13787
|
+
if (limit < 1 || pageCount <= 1) {
|
|
13640
13788
|
return null;
|
|
13641
13789
|
}
|
|
13642
|
-
return /* @__PURE__ */ jsx122(
|
|
13790
|
+
return /* @__PURE__ */ jsx122("div", { ref: containerRef, className: wrapper, children: /* @__PURE__ */ jsx122(
|
|
13643
13791
|
Paginate,
|
|
13644
13792
|
{
|
|
13645
13793
|
forcePage: currentPage,
|
|
@@ -13647,8 +13795,8 @@ function Pagination({
|
|
|
13647
13795
|
nextLabel: /* @__PURE__ */ jsx122("div", { className: prevNextControls, children: ">" }),
|
|
13648
13796
|
breakLabel: "...",
|
|
13649
13797
|
pageCount,
|
|
13650
|
-
marginPagesDisplayed
|
|
13651
|
-
pageRangeDisplayed
|
|
13798
|
+
marginPagesDisplayed,
|
|
13799
|
+
pageRangeDisplayed,
|
|
13652
13800
|
onPageChange: ({ selected }) => {
|
|
13653
13801
|
onPageChange(limit, selected * limit);
|
|
13654
13802
|
},
|
|
@@ -13659,7 +13807,7 @@ function Pagination({
|
|
|
13659
13807
|
activeClassName: active,
|
|
13660
13808
|
pageClassName: page
|
|
13661
13809
|
}
|
|
13662
|
-
);
|
|
13810
|
+
) });
|
|
13663
13811
|
}
|
|
13664
13812
|
|
|
13665
13813
|
// src/components/ParameterInputs/hooks/ParameterShellContext.tsx
|
|
@@ -13749,7 +13897,7 @@ var LabelLeadingIcon = ({
|
|
|
13749
13897
|
};
|
|
13750
13898
|
|
|
13751
13899
|
// src/components/ParameterInputs/ParameterActionButton.tsx
|
|
13752
|
-
import
|
|
13900
|
+
import React21 from "react";
|
|
13753
13901
|
|
|
13754
13902
|
// src/components/ParameterInputs/styles/ParameterActionButton.styles.ts
|
|
13755
13903
|
import { css as css94 } from "@emotion/react";
|
|
@@ -13853,7 +14001,7 @@ var ParameterActionButton = ({
|
|
|
13853
14001
|
children
|
|
13854
14002
|
}
|
|
13855
14003
|
);
|
|
13856
|
-
if (tooltip && (typeof tooltip === "string" ||
|
|
14004
|
+
if (tooltip && (typeof tooltip === "string" || React21.isValidElement(tooltip))) {
|
|
13857
14005
|
return /* @__PURE__ */ jsx124(Tooltip, { title: tooltip, ...tooltipProps, children: buttonElement });
|
|
13858
14006
|
}
|
|
13859
14007
|
return buttonElement;
|
|
@@ -13934,7 +14082,7 @@ var ParameterGroup = forwardRef23(
|
|
|
13934
14082
|
import { forwardRef as forwardRef25, useDeferredValue } from "react";
|
|
13935
14083
|
|
|
13936
14084
|
// src/components/ParameterInputs/ParameterImagePreview.tsx
|
|
13937
|
-
import { useState as
|
|
14085
|
+
import { useState as useState24 } from "react";
|
|
13938
14086
|
import { createPortal as createPortal2 } from "react-dom";
|
|
13939
14087
|
|
|
13940
14088
|
// src/components/ParameterInputs/styles/ParameterImage.styles.ts
|
|
@@ -13977,7 +14125,7 @@ var previewModalImage = css97`
|
|
|
13977
14125
|
// src/components/ParameterInputs/ParameterImagePreview.tsx
|
|
13978
14126
|
import { Fragment as Fragment15, jsx as jsx127, jsxs as jsxs87 } from "@emotion/react/jsx-runtime";
|
|
13979
14127
|
function ParameterImagePreview({ imageSrc }) {
|
|
13980
|
-
const [showModal, setShowModal] =
|
|
14128
|
+
const [showModal, setShowModal] = useState24(false);
|
|
13981
14129
|
return imageSrc ? /* @__PURE__ */ jsxs87("div", { css: previewWrapper, children: [
|
|
13982
14130
|
/* @__PURE__ */ jsx127(PreviewImageModal, { open: showModal, imageSrc, onRequestClose: () => setShowModal(false) }),
|
|
13983
14131
|
/* @__PURE__ */ jsx127(
|
|
@@ -14010,7 +14158,7 @@ var PreviewImageModal = ({ open, onRequestClose, imageSrc }) => {
|
|
|
14010
14158
|
|
|
14011
14159
|
// src/components/ParameterInputs/ParameterShell.tsx
|
|
14012
14160
|
import { css as css100 } from "@emotion/react";
|
|
14013
|
-
import { useState as
|
|
14161
|
+
import { useState as useState25 } from "react";
|
|
14014
14162
|
|
|
14015
14163
|
// src/components/ParameterInputs/styles/ParameterInput.styles.ts
|
|
14016
14164
|
import { css as css98 } from "@emotion/react";
|
|
@@ -14464,7 +14612,7 @@ var ParameterShell = ({
|
|
|
14464
14612
|
menuWithoutPortal,
|
|
14465
14613
|
...props
|
|
14466
14614
|
}) => {
|
|
14467
|
-
const [manualErrorMessage, setManualErrorMessage] =
|
|
14615
|
+
const [manualErrorMessage, setManualErrorMessage] = useState25(void 0);
|
|
14468
14616
|
const setErrorMessage = (message) => setManualErrorMessage(message);
|
|
14469
14617
|
const errorMessaging = errorMessage || manualErrorMessage;
|
|
14470
14618
|
return /* @__PURE__ */ jsxs88("div", { css: inputContainer2, ...props, id, children: [
|
|
@@ -14601,7 +14749,7 @@ var ParameterInputInner = forwardRef26(({ enableMouseWheel = false, ...props },
|
|
|
14601
14749
|
});
|
|
14602
14750
|
|
|
14603
14751
|
// src/components/ParameterInputs/ParameterLabels.tsx
|
|
14604
|
-
import { useMemo as useMemo8, useRef as
|
|
14752
|
+
import { useMemo as useMemo8, useRef as useRef14 } from "react";
|
|
14605
14753
|
import { jsx as jsx133 } from "@emotion/react/jsx-runtime";
|
|
14606
14754
|
var ParameterLabels = ({ disabled: disabled2 = false, ...props }) => {
|
|
14607
14755
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
@@ -14663,8 +14811,8 @@ var ParameterLabelsInner = (props) => {
|
|
|
14663
14811
|
var _a;
|
|
14664
14812
|
const { label: label2 } = useParameterShell();
|
|
14665
14813
|
const { onChange } = props;
|
|
14666
|
-
const containerRef =
|
|
14667
|
-
const hasPositionedRef =
|
|
14814
|
+
const containerRef = useRef14(null);
|
|
14815
|
+
const hasPositionedRef = useRef14(false);
|
|
14668
14816
|
const selectedValues = useMemo8(
|
|
14669
14817
|
() => {
|
|
14670
14818
|
var _a2, _b;
|
|
@@ -14980,7 +15128,7 @@ import { forwardRef as forwardRef29 } from "react";
|
|
|
14980
15128
|
import { forwardRef as forwardRef28, useCallback as useCallback12, useMemo as useMemo9 } from "react";
|
|
14981
15129
|
|
|
14982
15130
|
// src/components/Slider/SliderLabels.tsx
|
|
14983
|
-
import { useEffect as
|
|
15131
|
+
import { useEffect as useEffect20, useRef as useRef15, useState as useState26 } from "react";
|
|
14984
15132
|
|
|
14985
15133
|
// src/components/Slider/styles/Slider.styles.ts
|
|
14986
15134
|
import { css as css101 } from "@emotion/react";
|
|
@@ -15405,9 +15553,9 @@ function calculateLabelVisibility(ticks, currentValue, containerWidth) {
|
|
|
15405
15553
|
}));
|
|
15406
15554
|
}
|
|
15407
15555
|
function SliderLabels({ ticks, currentValue, containerWidth = 300 }) {
|
|
15408
|
-
const containerRef =
|
|
15409
|
-
const [measuredWidth, setMeasuredWidth] =
|
|
15410
|
-
|
|
15556
|
+
const containerRef = useRef15(null);
|
|
15557
|
+
const [measuredWidth, setMeasuredWidth] = useState26(containerWidth);
|
|
15558
|
+
useEffect20(() => {
|
|
15411
15559
|
if (containerRef.current) {
|
|
15412
15560
|
const resizeObserver = new ResizeObserver((entries) => {
|
|
15413
15561
|
for (const entry of entries) {
|
|
@@ -15785,7 +15933,7 @@ var defaultParameterConfiguration = {
|
|
|
15785
15933
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
15786
15934
|
import { deepEqual as deepEqual2 } from "fast-equals";
|
|
15787
15935
|
import { ParagraphNode as ParagraphNode2 } from "lexical";
|
|
15788
|
-
import { useEffect as
|
|
15936
|
+
import { useEffect as useEffect29, useState as useState32 } from "react";
|
|
15789
15937
|
|
|
15790
15938
|
// src/components/ParameterInputs/rich-text/CustomCodeNode.ts
|
|
15791
15939
|
import { CodeNode } from "@lexical/code";
|
|
@@ -15806,10 +15954,10 @@ CustomCodeNode.importDOM = function() {
|
|
|
15806
15954
|
import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
|
|
15807
15955
|
import { mergeRegister } from "@lexical/utils";
|
|
15808
15956
|
import { ParagraphNode } from "lexical";
|
|
15809
|
-
import { useEffect as
|
|
15957
|
+
import { useEffect as useEffect21 } from "react";
|
|
15810
15958
|
function DisableStylesPlugin() {
|
|
15811
15959
|
const [editor] = useLexicalComposerContext();
|
|
15812
|
-
|
|
15960
|
+
useEffect21(() => {
|
|
15813
15961
|
return mergeRegister(
|
|
15814
15962
|
// Disable text alignment on paragraph nodes
|
|
15815
15963
|
editor.registerNodeTransform(ParagraphNode, (node) => {
|
|
@@ -16068,10 +16216,10 @@ var tableHeaderElement = css102`
|
|
|
16068
16216
|
import { useLexicalComposerContext as useLexicalComposerContext2 } from "@lexical/react/LexicalComposerContext";
|
|
16069
16217
|
import { $insertFirst } from "@lexical/utils";
|
|
16070
16218
|
import { $createParagraphNode, $getRoot, $insertNodes } from "lexical";
|
|
16071
|
-
import { useEffect as
|
|
16219
|
+
import { useEffect as useEffect22 } from "react";
|
|
16072
16220
|
var ImprovedAssetSelectionPlugin = () => {
|
|
16073
16221
|
const [editor] = useLexicalComposerContext2();
|
|
16074
|
-
|
|
16222
|
+
useEffect22(() => {
|
|
16075
16223
|
editor.getRootElement();
|
|
16076
16224
|
const onRootClick = (event) => {
|
|
16077
16225
|
if (event.target !== editor.getRootElement()) {
|
|
@@ -16142,7 +16290,7 @@ import {
|
|
|
16142
16290
|
FOCUS_COMMAND,
|
|
16143
16291
|
PASTE_COMMAND
|
|
16144
16292
|
} from "lexical";
|
|
16145
|
-
import { useCallback as useCallback13, useEffect as
|
|
16293
|
+
import { useCallback as useCallback13, useEffect as useEffect23, useRef as useRef16, useState as useState27 } from "react";
|
|
16146
16294
|
|
|
16147
16295
|
// src/components/ParameterInputs/rich-text/utils.ts
|
|
16148
16296
|
import { $isAtNodeEnd } from "@lexical/selection";
|
|
@@ -16515,17 +16663,17 @@ function LinkNodePlugin({
|
|
|
16515
16663
|
return path;
|
|
16516
16664
|
};
|
|
16517
16665
|
const [editor] = useLexicalComposerContext3();
|
|
16518
|
-
const [linkPopoverState, setLinkPopoverState] =
|
|
16519
|
-
const linkPopoverElRef =
|
|
16520
|
-
const [isEditorFocused, setIsEditorFocused] =
|
|
16521
|
-
const [isLinkPopoverFocused, setIsLinkPopoverFocused] =
|
|
16522
|
-
|
|
16666
|
+
const [linkPopoverState, setLinkPopoverState] = useState27();
|
|
16667
|
+
const linkPopoverElRef = useRef16(null);
|
|
16668
|
+
const [isEditorFocused, setIsEditorFocused] = useState27(false);
|
|
16669
|
+
const [isLinkPopoverFocused, setIsLinkPopoverFocused] = useState27(false);
|
|
16670
|
+
useEffect23(() => {
|
|
16523
16671
|
if (!isEditorFocused && !isLinkPopoverFocused) {
|
|
16524
16672
|
setLinkPopoverState(void 0);
|
|
16525
16673
|
return;
|
|
16526
16674
|
}
|
|
16527
16675
|
}, [isEditorFocused, isLinkPopoverFocused]);
|
|
16528
|
-
|
|
16676
|
+
useEffect23(() => {
|
|
16529
16677
|
if (!editor.hasNodes([LinkNode])) {
|
|
16530
16678
|
throw new Error("LinkNode not registered on editor");
|
|
16531
16679
|
}
|
|
@@ -16663,7 +16811,7 @@ function LinkNodePlugin({
|
|
|
16663
16811
|
}
|
|
16664
16812
|
});
|
|
16665
16813
|
}, [editor, positioningAnchorEl]);
|
|
16666
|
-
|
|
16814
|
+
useEffect23(() => {
|
|
16667
16815
|
return editor.registerUpdateListener(({ editorState }) => {
|
|
16668
16816
|
requestAnimationFrame(() => {
|
|
16669
16817
|
editorState.read(() => {
|
|
@@ -16767,7 +16915,7 @@ import {
|
|
|
16767
16915
|
OUTDENT_CONTENT_COMMAND,
|
|
16768
16916
|
SELECTION_CHANGE_COMMAND
|
|
16769
16917
|
} from "lexical";
|
|
16770
|
-
import { useEffect as
|
|
16918
|
+
import { useEffect as useEffect24, useRef as useRef17 } from "react";
|
|
16771
16919
|
function isIndentPermitted(maxDepth) {
|
|
16772
16920
|
const selection = $getSelection2();
|
|
16773
16921
|
if (!$isRangeSelection2(selection)) {
|
|
@@ -16822,8 +16970,8 @@ function $indentOverTab(selection) {
|
|
|
16822
16970
|
}
|
|
16823
16971
|
function ListIndentPlugin({ maxDepth }) {
|
|
16824
16972
|
const [editor] = useLexicalComposerContext4();
|
|
16825
|
-
const isInListItemNode =
|
|
16826
|
-
|
|
16973
|
+
const isInListItemNode = useRef17(false);
|
|
16974
|
+
useEffect24(() => {
|
|
16827
16975
|
return editor.registerCommand(
|
|
16828
16976
|
SELECTION_CHANGE_COMMAND,
|
|
16829
16977
|
() => {
|
|
@@ -16840,7 +16988,7 @@ function ListIndentPlugin({ maxDepth }) {
|
|
|
16840
16988
|
COMMAND_PRIORITY_NORMAL
|
|
16841
16989
|
);
|
|
16842
16990
|
}, [editor]);
|
|
16843
|
-
|
|
16991
|
+
useEffect24(() => {
|
|
16844
16992
|
return mergeRegister3(
|
|
16845
16993
|
editor.registerCommand(
|
|
16846
16994
|
INDENT_CONTENT_COMMAND,
|
|
@@ -16889,7 +17037,7 @@ import {
|
|
|
16889
17037
|
TableCellNode
|
|
16890
17038
|
} from "@lexical/table";
|
|
16891
17039
|
import { $getSelection as $getSelection3, $isRangeSelection as $isRangeSelection3, $setSelection } from "lexical";
|
|
16892
|
-
import { forwardRef as forwardRef30, useCallback as useCallback14, useEffect as
|
|
17040
|
+
import { forwardRef as forwardRef30, useCallback as useCallback14, useEffect as useEffect25, useLayoutEffect, useState as useState28 } from "react";
|
|
16893
17041
|
import { jsx as jsx141, jsxs as jsxs94 } from "@emotion/react/jsx-runtime";
|
|
16894
17042
|
function computeSelectionCount(selection) {
|
|
16895
17043
|
const selectionShape = selection.getShape();
|
|
@@ -16904,7 +17052,7 @@ var tableActionMenuTrigger = css104`
|
|
|
16904
17052
|
`;
|
|
16905
17053
|
var TableActionMenuTrigger = forwardRef30((props, ref) => {
|
|
16906
17054
|
const { tableCellEl, positioningAnchorEl, ...rest } = props;
|
|
16907
|
-
const [coordinates, setCoordinates] =
|
|
17055
|
+
const [coordinates, setCoordinates] = useState28({ x: 0, y: 0 });
|
|
16908
17056
|
useLayoutEffect(() => {
|
|
16909
17057
|
const rect = tableCellEl.getBoundingClientRect();
|
|
16910
17058
|
const parentRect = positioningAnchorEl.getBoundingClientRect();
|
|
@@ -16938,16 +17086,16 @@ function TableActionMenu({
|
|
|
16938
17086
|
positioningAnchorEl
|
|
16939
17087
|
}) {
|
|
16940
17088
|
const [editor] = useLexicalComposerContext5();
|
|
16941
|
-
const [tableCellNode, updateTableCellNode] =
|
|
16942
|
-
const [selectionCounts, updateSelectionCounts] =
|
|
17089
|
+
const [tableCellNode, updateTableCellNode] = useState28(_tableCellNode);
|
|
17090
|
+
const [selectionCounts, updateSelectionCounts] = useState28({
|
|
16943
17091
|
columns: 1,
|
|
16944
17092
|
rows: 1
|
|
16945
17093
|
});
|
|
16946
|
-
const [menuTriggerKey, setMenuTriggerKey] =
|
|
17094
|
+
const [menuTriggerKey, setMenuTriggerKey] = useState28(0);
|
|
16947
17095
|
const incrementMenuTriggerKey = () => {
|
|
16948
17096
|
setMenuTriggerKey((key) => key += 1);
|
|
16949
17097
|
};
|
|
16950
|
-
|
|
17098
|
+
useEffect25(() => {
|
|
16951
17099
|
return editor.registerMutationListener(
|
|
16952
17100
|
TableCellNode,
|
|
16953
17101
|
(nodeMutations) => {
|
|
@@ -16961,7 +17109,7 @@ function TableActionMenu({
|
|
|
16961
17109
|
{ skipInitialization: true }
|
|
16962
17110
|
);
|
|
16963
17111
|
}, [editor, tableCellNode]);
|
|
16964
|
-
|
|
17112
|
+
useEffect25(() => {
|
|
16965
17113
|
editor.getEditorState().read(() => {
|
|
16966
17114
|
const selection = $getSelection3();
|
|
16967
17115
|
if ($isTableSelection(selection)) {
|
|
@@ -17136,10 +17284,10 @@ function TableCellActionMenuContainer({
|
|
|
17136
17284
|
positioningAnchorEl
|
|
17137
17285
|
}) {
|
|
17138
17286
|
const [editor] = useLexicalComposerContext5();
|
|
17139
|
-
const [tableCellNode, setTableMenuCellNode] =
|
|
17140
|
-
const [tableCellNodeEl, _setTableMenuCellNodeEl] =
|
|
17141
|
-
const [tableCellMenuPortalEl, setTableMenuCellMenuPortalEl] =
|
|
17142
|
-
|
|
17287
|
+
const [tableCellNode, setTableMenuCellNode] = useState28(null);
|
|
17288
|
+
const [tableCellNodeEl, _setTableMenuCellNodeEl] = useState28(null);
|
|
17289
|
+
const [tableCellMenuPortalEl, setTableMenuCellMenuPortalEl] = useState28(null);
|
|
17290
|
+
useEffect25(() => {
|
|
17143
17291
|
const newPortalEl = document.createElement("div");
|
|
17144
17292
|
setTableMenuCellMenuPortalEl(newPortalEl);
|
|
17145
17293
|
menuPortalEl.appendChild(newPortalEl);
|
|
@@ -17183,7 +17331,7 @@ function TableCellActionMenuContainer({
|
|
|
17183
17331
|
setTableMenuCellNodeElem(null);
|
|
17184
17332
|
}
|
|
17185
17333
|
}, [editor, setTableMenuCellNodeElem]);
|
|
17186
|
-
|
|
17334
|
+
useEffect25(() => {
|
|
17187
17335
|
return editor.registerUpdateListener(() => {
|
|
17188
17336
|
editor.getEditorState().read(() => {
|
|
17189
17337
|
$moveMenu();
|
|
@@ -17222,7 +17370,7 @@ import {
|
|
|
17222
17370
|
} from "@lexical/table";
|
|
17223
17371
|
import { calculateZoomLevel } from "@lexical/utils";
|
|
17224
17372
|
import { $getNearestNodeFromDOMNode } from "lexical";
|
|
17225
|
-
import { useCallback as useCallback15, useEffect as
|
|
17373
|
+
import { useCallback as useCallback15, useEffect as useEffect26, useMemo as useMemo10, useRef as useRef18, useState as useState29 } from "react";
|
|
17226
17374
|
import { createPortal as createPortal3 } from "react-dom";
|
|
17227
17375
|
import { Fragment as Fragment19, jsx as jsx142, jsxs as jsxs95 } from "@emotion/react/jsx-runtime";
|
|
17228
17376
|
var MIN_ROW_HEIGHT = 33;
|
|
@@ -17249,14 +17397,14 @@ var fixedGetDOMCellFromTarget = (node) => {
|
|
|
17249
17397
|
return null;
|
|
17250
17398
|
};
|
|
17251
17399
|
function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
17252
|
-
const targetRef =
|
|
17253
|
-
const resizerRef =
|
|
17254
|
-
const tableRectRef =
|
|
17255
|
-
const mouseStartPosRef =
|
|
17256
|
-
const [mouseCurrentPos, updateMouseCurrentPos] =
|
|
17257
|
-
const [activeCell, updateActiveCell] =
|
|
17258
|
-
const [isMouseDown, updateIsMouseDown] =
|
|
17259
|
-
const [draggingDirection, updateDraggingDirection] =
|
|
17400
|
+
const targetRef = useRef18(null);
|
|
17401
|
+
const resizerRef = useRef18(null);
|
|
17402
|
+
const tableRectRef = useRef18(null);
|
|
17403
|
+
const mouseStartPosRef = useRef18(null);
|
|
17404
|
+
const [mouseCurrentPos, updateMouseCurrentPos] = useState29(null);
|
|
17405
|
+
const [activeCell, updateActiveCell] = useState29(null);
|
|
17406
|
+
const [isMouseDown, updateIsMouseDown] = useState29(false);
|
|
17407
|
+
const [draggingDirection, updateDraggingDirection] = useState29(null);
|
|
17260
17408
|
const resetState = useCallback15(() => {
|
|
17261
17409
|
updateActiveCell(null);
|
|
17262
17410
|
targetRef.current = null;
|
|
@@ -17267,7 +17415,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
17267
17415
|
const isMouseDownOnEvent = (event) => {
|
|
17268
17416
|
return (event.buttons & 1) === 1;
|
|
17269
17417
|
};
|
|
17270
|
-
|
|
17418
|
+
useEffect26(() => {
|
|
17271
17419
|
const onMouseMove = (event) => {
|
|
17272
17420
|
setTimeout(() => {
|
|
17273
17421
|
const target = event.target;
|
|
@@ -17566,11 +17714,11 @@ import {
|
|
|
17566
17714
|
COMMAND_PRIORITY_NORMAL as COMMAND_PRIORITY_NORMAL2,
|
|
17567
17715
|
SELECTION_CHANGE_COMMAND as SELECTION_CHANGE_COMMAND2
|
|
17568
17716
|
} from "lexical";
|
|
17569
|
-
import { useEffect as
|
|
17717
|
+
import { useEffect as useEffect27, useState as useState30 } from "react";
|
|
17570
17718
|
var TableSelectionPlugin = () => {
|
|
17571
17719
|
const [editor] = useLexicalComposerContext7();
|
|
17572
|
-
const [closestTableCellNode, setClosestTableCellNode] =
|
|
17573
|
-
|
|
17720
|
+
const [closestTableCellNode, setClosestTableCellNode] = useState30(null);
|
|
17721
|
+
useEffect27(() => {
|
|
17574
17722
|
return editor.registerCommand(
|
|
17575
17723
|
SELECTION_CHANGE_COMMAND2,
|
|
17576
17724
|
() => {
|
|
@@ -17592,7 +17740,7 @@ var TableSelectionPlugin = () => {
|
|
|
17592
17740
|
COMMAND_PRIORITY_NORMAL2
|
|
17593
17741
|
);
|
|
17594
17742
|
}, [editor]);
|
|
17595
|
-
|
|
17743
|
+
useEffect27(() => {
|
|
17596
17744
|
const onControlA = (event) => {
|
|
17597
17745
|
if (event.key === "a" && (event.ctrlKey || event.metaKey)) {
|
|
17598
17746
|
if (!closestTableCellNode) {
|
|
@@ -17639,7 +17787,7 @@ import {
|
|
|
17639
17787
|
FORMAT_TEXT_COMMAND,
|
|
17640
17788
|
SELECTION_CHANGE_COMMAND as SELECTION_CHANGE_COMMAND3
|
|
17641
17789
|
} from "lexical";
|
|
17642
|
-
import { useCallback as useCallback16, useEffect as
|
|
17790
|
+
import { useCallback as useCallback16, useEffect as useEffect28 } from "react";
|
|
17643
17791
|
|
|
17644
17792
|
// src/components/ParameterInputs/rich-text/toolbar/constants.ts
|
|
17645
17793
|
var FORMATS_WITH_ICON = /* @__PURE__ */ new Map([
|
|
@@ -17655,7 +17803,7 @@ var HEADING_ELEMENTS = ["h1", "h2", "h3", "h4", "h5", "h6"];
|
|
|
17655
17803
|
var TEXTUAL_ELEMENTS = HEADING_ELEMENTS;
|
|
17656
17804
|
|
|
17657
17805
|
// src/components/ParameterInputs/rich-text/toolbar/useRichTextToolbarState.ts
|
|
17658
|
-
import { useMemo as useMemo11, useState as
|
|
17806
|
+
import { useMemo as useMemo11, useState as useState31 } from "react";
|
|
17659
17807
|
var useRichTextToolbarState = ({ config }) => {
|
|
17660
17808
|
var _a;
|
|
17661
17809
|
const enabledBuiltInFormats = useMemo11(() => {
|
|
@@ -17676,7 +17824,7 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
17676
17824
|
const enabledBuiltInFormatsWithoutIcon = enabledBuiltInFormats.filter(
|
|
17677
17825
|
(format) => !FORMATS_WITH_ICON.has(format.type)
|
|
17678
17826
|
);
|
|
17679
|
-
const [activeFormats, setActiveFormats] =
|
|
17827
|
+
const [activeFormats, setActiveFormats] = useState31([]);
|
|
17680
17828
|
const visibleFormatsWithIcon = useMemo11(() => {
|
|
17681
17829
|
const visibleFormats = /* @__PURE__ */ new Set();
|
|
17682
17830
|
activeFormats.filter((type) => FORMATS_WITH_ICON.has(type)).forEach((type) => {
|
|
@@ -17697,7 +17845,7 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
17697
17845
|
});
|
|
17698
17846
|
return richTextBuiltInFormats.filter((format) => visibleFormats.has(format.type));
|
|
17699
17847
|
}, [activeFormats, enabledBuiltInFormatsWithoutIcon]);
|
|
17700
|
-
const [activeElement, setActiveElement] =
|
|
17848
|
+
const [activeElement, setActiveElement] = useState31("paragraph");
|
|
17701
17849
|
const enabledTextualElements = enabledBuiltInElements.filter(
|
|
17702
17850
|
(element) => TEXTUAL_ELEMENTS.includes(element.type)
|
|
17703
17851
|
);
|
|
@@ -17712,7 +17860,7 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
17712
17860
|
}
|
|
17713
17861
|
);
|
|
17714
17862
|
}, [activeElement, (_a = config == null ? void 0 : config.elements) == null ? void 0 : _a.builtIn, enabledTextualElements]);
|
|
17715
|
-
const [isLink, setIsLink] =
|
|
17863
|
+
const [isLink, setIsLink] = useState31(false);
|
|
17716
17864
|
const linkElementVisible = useMemo11(() => {
|
|
17717
17865
|
return enabledBuiltInElements.some((element) => element.type === "link") || isLink;
|
|
17718
17866
|
}, [isLink, enabledBuiltInElements]);
|
|
@@ -17940,7 +18088,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
17940
18088
|
setIsLink(false);
|
|
17941
18089
|
}
|
|
17942
18090
|
}, [editor, setActiveElement, setActiveFormats, setIsLink]);
|
|
17943
|
-
|
|
18091
|
+
useEffect28(() => {
|
|
17944
18092
|
return editor.registerCommand(
|
|
17945
18093
|
SELECTION_CHANGE_COMMAND3,
|
|
17946
18094
|
(_payload) => {
|
|
@@ -17950,7 +18098,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
17950
18098
|
COMMAND_PRIORITY_CRITICAL2
|
|
17951
18099
|
);
|
|
17952
18100
|
}, [editor, updateToolbar]);
|
|
17953
|
-
|
|
18101
|
+
useEffect28(() => {
|
|
17954
18102
|
return editor.registerUpdateListener(({ editorState }) => {
|
|
17955
18103
|
requestAnimationFrame(() => {
|
|
17956
18104
|
editorState.read(() => {
|
|
@@ -18351,12 +18499,12 @@ var RichText = ({
|
|
|
18351
18499
|
placeholder
|
|
18352
18500
|
}) => {
|
|
18353
18501
|
const [editor] = useLexicalComposerContext9();
|
|
18354
|
-
|
|
18502
|
+
useEffect29(() => {
|
|
18355
18503
|
if (onRichTextInit) {
|
|
18356
18504
|
onRichTextInit(editor);
|
|
18357
18505
|
}
|
|
18358
18506
|
}, [editor, onRichTextInit]);
|
|
18359
|
-
|
|
18507
|
+
useEffect29(() => {
|
|
18360
18508
|
const removeUpdateListener = editor.registerUpdateListener(({ editorState, prevEditorState, tags }) => {
|
|
18361
18509
|
requestAnimationFrame(() => {
|
|
18362
18510
|
const previousEditorState = prevEditorState.toJSON();
|
|
@@ -18373,16 +18521,16 @@ var RichText = ({
|
|
|
18373
18521
|
removeUpdateListener();
|
|
18374
18522
|
};
|
|
18375
18523
|
}, [editor, onChange]);
|
|
18376
|
-
|
|
18524
|
+
useEffect29(() => {
|
|
18377
18525
|
editor.setEditable(!readOnly);
|
|
18378
18526
|
}, [editor, readOnly]);
|
|
18379
|
-
const [editorContainerRef, setEditorContainerRef] =
|
|
18527
|
+
const [editorContainerRef, setEditorContainerRef] = useState32(null);
|
|
18380
18528
|
const onEditorContainerRef = (_editorContainerRef) => {
|
|
18381
18529
|
if (_editorContainerRef !== null) {
|
|
18382
18530
|
setEditorContainerRef(_editorContainerRef);
|
|
18383
18531
|
}
|
|
18384
18532
|
};
|
|
18385
|
-
const [portalContainerRef, setPortalContainerRef] =
|
|
18533
|
+
const [portalContainerRef, setPortalContainerRef] = useState32(null);
|
|
18386
18534
|
const onPortalContainerRef = (_portalContainerRef) => {
|
|
18387
18535
|
if (_portalContainerRef !== null) {
|
|
18388
18536
|
setPortalContainerRef(_portalContainerRef);
|
|
@@ -18790,7 +18938,7 @@ var ProgressListItem = ({
|
|
|
18790
18938
|
|
|
18791
18939
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
18792
18940
|
import { css as css112 } from "@emotion/react";
|
|
18793
|
-
import { useCallback as useCallback18, useEffect as
|
|
18941
|
+
import { useCallback as useCallback18, useEffect as useEffect30, useMemo as useMemo14, useRef as useRef19, useState as useState33 } from "react";
|
|
18794
18942
|
|
|
18795
18943
|
// src/components/SegmentedControl/SegmentedControl.styles.ts
|
|
18796
18944
|
import { css as css111 } from "@emotion/react";
|
|
@@ -18969,9 +19117,9 @@ var SegmentedControl = ({
|
|
|
18969
19117
|
// deprecated, destructured to prevent spreading to DOM
|
|
18970
19118
|
...props
|
|
18971
19119
|
}) => {
|
|
18972
|
-
const wrapperRef =
|
|
18973
|
-
const [isOverflowStartShadowVisible, setIsOverflowStartShadowVisible] =
|
|
18974
|
-
const [isOverflowEndShadowVisible, setIsOverflowEndShadowVisible] =
|
|
19120
|
+
const wrapperRef = useRef19(null);
|
|
19121
|
+
const [isOverflowStartShadowVisible, setIsOverflowStartShadowVisible] = useState33(false);
|
|
19122
|
+
const [isOverflowEndShadowVisible, setIsOverflowEndShadowVisible] = useState33(false);
|
|
18975
19123
|
const onOptionChange = useCallback18(
|
|
18976
19124
|
(event) => {
|
|
18977
19125
|
if (event.target.checked) {
|
|
@@ -18992,7 +19140,7 @@ var SegmentedControl = ({
|
|
|
18992
19140
|
const isIconOnly = useMemo14(() => {
|
|
18993
19141
|
return options.every((option) => option && option.icon && !option.label);
|
|
18994
19142
|
}, [options]);
|
|
18995
|
-
|
|
19143
|
+
useEffect30(() => {
|
|
18996
19144
|
const wrapperElement = wrapperRef.current;
|
|
18997
19145
|
const onScroll = () => {
|
|
18998
19146
|
if (!wrapperElement) {
|
|
@@ -19122,7 +19270,7 @@ var Skeleton = ({
|
|
|
19122
19270
|
);
|
|
19123
19271
|
|
|
19124
19272
|
// src/components/Spinner/Spinner.tsx
|
|
19125
|
-
import { useEffect as
|
|
19273
|
+
import { useEffect as useEffect31, useRef as useRef20 } from "react";
|
|
19126
19274
|
|
|
19127
19275
|
// src/components/Spinner/Spinner.styles.ts
|
|
19128
19276
|
import { css as css114 } from "@emotion/react";
|
|
@@ -19562,8 +19710,8 @@ var Spinner = ({
|
|
|
19562
19710
|
label: label2,
|
|
19563
19711
|
isPaused
|
|
19564
19712
|
}) => {
|
|
19565
|
-
const ref =
|
|
19566
|
-
|
|
19713
|
+
const ref = useRef20(null);
|
|
19714
|
+
useEffect31(() => {
|
|
19567
19715
|
var _a, _b, _c;
|
|
19568
19716
|
(_c = ref.current) == null ? void 0 : _c.style.setProperty("--pyramid-size", ((_b = (_a = ref.current) == null ? void 0 : _a.clientWidth) != null ? _b : 200) / 6 + "px");
|
|
19569
19717
|
}, [width]);
|
|
@@ -19631,7 +19779,7 @@ var Spinner = ({
|
|
|
19631
19779
|
};
|
|
19632
19780
|
|
|
19633
19781
|
// src/components/StackedModal/hooks/StackedModalProvider.tsx
|
|
19634
|
-
import { createContext as createContext9, useCallback as useCallback19, useContext as useContext9, useMemo as useMemo15, useRef as
|
|
19782
|
+
import { createContext as createContext9, useCallback as useCallback19, useContext as useContext9, useMemo as useMemo15, useRef as useRef21, useState as useState34 } from "react";
|
|
19635
19783
|
import { jsx as jsx154 } from "@emotion/react/jsx-runtime";
|
|
19636
19784
|
var StackedModalContext = createContext9(null);
|
|
19637
19785
|
function useStackedModal() {
|
|
@@ -19651,9 +19799,9 @@ function useStepTransition(index) {
|
|
|
19651
19799
|
};
|
|
19652
19800
|
}
|
|
19653
19801
|
function StackedModalProvider({ children, totalSteps, initialStep }) {
|
|
19654
|
-
const [currentStep, setCurrentStep] =
|
|
19655
|
-
const [direction, setDirection] =
|
|
19656
|
-
const previousStepRef =
|
|
19802
|
+
const [currentStep, setCurrentStep] = useState34(initialStep);
|
|
19803
|
+
const [direction, setDirection] = useState34("forward");
|
|
19804
|
+
const previousStepRef = useRef21(initialStep);
|
|
19657
19805
|
const nextStep = useCallback19(() => {
|
|
19658
19806
|
setCurrentStep((prev) => {
|
|
19659
19807
|
if (prev >= totalSteps - 1) {
|
|
@@ -19703,13 +19851,13 @@ function StackedModalProvider({ children, totalSteps, initialStep }) {
|
|
|
19703
19851
|
}
|
|
19704
19852
|
|
|
19705
19853
|
// src/components/StackedModal/StackedModal.tsx
|
|
19706
|
-
import
|
|
19854
|
+
import React25 from "react";
|
|
19707
19855
|
|
|
19708
19856
|
// src/components/StackedModal/styles/StackedModal.styles.ts
|
|
19709
19857
|
import { css as css115, keyframes as keyframes7 } from "@emotion/react";
|
|
19710
19858
|
var stackedModalRootStyles = css115`
|
|
19711
|
-
dialog > div {
|
|
19712
|
-
background: var(--
|
|
19859
|
+
& > dialog > div {
|
|
19860
|
+
background: var(--gray-50);
|
|
19713
19861
|
}
|
|
19714
19862
|
`;
|
|
19715
19863
|
var slideInFromRight = keyframes7`
|
|
@@ -19755,7 +19903,8 @@ var slideOutToRight = keyframes7`
|
|
|
19755
19903
|
var stepContainerStyles = css115`
|
|
19756
19904
|
position: relative;
|
|
19757
19905
|
flex: 1;
|
|
19758
|
-
overflow:
|
|
19906
|
+
overflow: clip;
|
|
19907
|
+
min-width: 0;
|
|
19759
19908
|
height: 100%;
|
|
19760
19909
|
`;
|
|
19761
19910
|
var stepBaseStyles = css115`
|
|
@@ -19808,14 +19957,16 @@ var headerItemStyles = (isActive) => css115`
|
|
|
19808
19957
|
position: ${isActive ? "relative" : "absolute"};
|
|
19809
19958
|
inset: 0;
|
|
19810
19959
|
white-space: nowrap;
|
|
19960
|
+
overflow: hidden;
|
|
19961
|
+
text-overflow: ellipsis;
|
|
19811
19962
|
`;
|
|
19812
19963
|
var stepContentStyles = css115`
|
|
19813
19964
|
position: relative;
|
|
19814
19965
|
flex: 1;
|
|
19815
19966
|
overflow: auto;
|
|
19816
|
-
padding: var(--spacing-md);
|
|
19817
19967
|
border-radius: var(--rounded-sm);
|
|
19818
19968
|
${scrollbarStyles}
|
|
19969
|
+
background: var(--white);
|
|
19819
19970
|
`;
|
|
19820
19971
|
|
|
19821
19972
|
// src/components/StackedModal/styles/getStepAnimationStyles.ts
|
|
@@ -19864,30 +20015,42 @@ import { Fragment as Fragment22, jsx as jsx156, jsxs as jsxs103 } from "@emotion
|
|
|
19864
20015
|
function StackedModalStep({ children, buttonGroup }) {
|
|
19865
20016
|
return /* @__PURE__ */ jsxs103(Fragment22, { children: [
|
|
19866
20017
|
/* @__PURE__ */ jsx156("div", { css: stepContentStyles, children }),
|
|
19867
|
-
buttonGroup ? /* @__PURE__ */ jsx156(
|
|
20018
|
+
buttonGroup ? /* @__PURE__ */ jsx156(
|
|
20019
|
+
HorizontalRhythm,
|
|
20020
|
+
{
|
|
20021
|
+
gap: "sm",
|
|
20022
|
+
align: "center",
|
|
20023
|
+
css: {
|
|
20024
|
+
// Some buttons rely on an outline for their border which gets cut by overflow: hidden;
|
|
20025
|
+
padding: "1px"
|
|
20026
|
+
},
|
|
20027
|
+
children: buttonGroup
|
|
20028
|
+
}
|
|
20029
|
+
) : null
|
|
19868
20030
|
] });
|
|
19869
20031
|
}
|
|
19870
20032
|
|
|
19871
20033
|
// src/components/StackedModal/StackedModal.tsx
|
|
19872
20034
|
import { jsx as jsx157 } from "@emotion/react/jsx-runtime";
|
|
19873
20035
|
function filterSteps(children) {
|
|
19874
|
-
return
|
|
19875
|
-
(child) =>
|
|
20036
|
+
return React25.Children.toArray(children).filter(
|
|
20037
|
+
(child) => React25.isValidElement(child) && child.type === StackedModalStep
|
|
19876
20038
|
);
|
|
19877
20039
|
}
|
|
19878
|
-
var StackedModal =
|
|
20040
|
+
var StackedModal = React25.forwardRef(
|
|
19879
20041
|
({ children, initialStep = 0, ...rest }, ref) => {
|
|
19880
20042
|
const steps = filterSteps(children);
|
|
19881
20043
|
return /* @__PURE__ */ jsx157(StackedModalProvider, { totalSteps: steps.length, initialStep, children: /* @__PURE__ */ jsx157(StackedModalInner, { ref, steps, ...rest }) });
|
|
19882
20044
|
}
|
|
19883
20045
|
);
|
|
19884
20046
|
StackedModal.displayName = "StackedModal";
|
|
19885
|
-
var StackedModalInner =
|
|
19886
|
-
({ steps, onRequestClose, modalSize = "lg", width, height }, ref) => {
|
|
20047
|
+
var StackedModalInner = React25.forwardRef(
|
|
20048
|
+
({ steps, onRequestClose, modalSize = "lg", width, height, "data-testid": dataTestId }, ref) => {
|
|
19887
20049
|
return /* @__PURE__ */ jsx157("div", { css: stackedModalRootStyles, children: /* @__PURE__ */ jsx157(
|
|
19888
20050
|
Modal,
|
|
19889
20051
|
{
|
|
19890
20052
|
ref,
|
|
20053
|
+
...dataTestId ? { "data-testid": dataTestId } : {},
|
|
19891
20054
|
header: /* @__PURE__ */ jsx157(AnimatedStepHeader, { steps }),
|
|
19892
20055
|
onRequestClose,
|
|
19893
20056
|
modalSize,
|
|
@@ -19910,6 +20073,16 @@ function StackedModalStepWrapper({ index, children }) {
|
|
|
19910
20073
|
return /* @__PURE__ */ jsx157("div", { css: [stepBaseStyles, getStepAnimationStyles(transition)], "aria-hidden": !transition.isActive, children });
|
|
19911
20074
|
}
|
|
19912
20075
|
|
|
20076
|
+
// src/components/StackedModal/StackedModalHeader.tsx
|
|
20077
|
+
import { CgChevronLeft as CgChevronLeft2 } from "@react-icons/all-files/cg/CgChevronLeft";
|
|
20078
|
+
import { jsx as jsx158, jsxs as jsxs104 } from "@emotion/react/jsx-runtime";
|
|
20079
|
+
var StackedModalHeader = ({ children, onBack, icon = CgChevronLeft2 }) => {
|
|
20080
|
+
return /* @__PURE__ */ jsxs104(HorizontalRhythm, { gap: "sm", align: "center", children: [
|
|
20081
|
+
onBack ? /* @__PURE__ */ jsx158(IconButton, { onClick: onBack, buttonType: "unimportant", size: "xs", children: /* @__PURE__ */ jsx158(Icon, { icon, size: "1rem" }) }) : null,
|
|
20082
|
+
children
|
|
20083
|
+
] });
|
|
20084
|
+
};
|
|
20085
|
+
|
|
19913
20086
|
// src/components/Switch/Switch.tsx
|
|
19914
20087
|
import { forwardRef as forwardRef35, useMemo as useMemo16 } from "react";
|
|
19915
20088
|
|
|
@@ -20046,7 +20219,7 @@ var SwitchInputContainerAlignmentRight = css116`
|
|
|
20046
20219
|
`;
|
|
20047
20220
|
|
|
20048
20221
|
// src/components/Switch/Switch.tsx
|
|
20049
|
-
import { Fragment as Fragment23, jsx as
|
|
20222
|
+
import { Fragment as Fragment23, jsx as jsx159, jsxs as jsxs105 } from "@emotion/react/jsx-runtime";
|
|
20050
20223
|
var Switch = forwardRef35(
|
|
20051
20224
|
({
|
|
20052
20225
|
label: label2,
|
|
@@ -20075,8 +20248,8 @@ var Switch = forwardRef35(
|
|
|
20075
20248
|
if (infoText && toggleText) {
|
|
20076
20249
|
additionalText = inputProps.checked ? toggleText : infoText;
|
|
20077
20250
|
}
|
|
20078
|
-
return /* @__PURE__ */
|
|
20079
|
-
/* @__PURE__ */
|
|
20251
|
+
return /* @__PURE__ */ jsxs105(Fragment23, { children: [
|
|
20252
|
+
/* @__PURE__ */ jsxs105(
|
|
20080
20253
|
"label",
|
|
20081
20254
|
{
|
|
20082
20255
|
css: [
|
|
@@ -20086,7 +20259,7 @@ var Switch = forwardRef35(
|
|
|
20086
20259
|
inputProps.disabled ? SwitchInputDisabled : void 0
|
|
20087
20260
|
],
|
|
20088
20261
|
children: [
|
|
20089
|
-
/* @__PURE__ */
|
|
20262
|
+
/* @__PURE__ */ jsx159(
|
|
20090
20263
|
"input",
|
|
20091
20264
|
{
|
|
20092
20265
|
type: "checkbox",
|
|
@@ -20095,11 +20268,11 @@ var Switch = forwardRef35(
|
|
|
20095
20268
|
ref
|
|
20096
20269
|
}
|
|
20097
20270
|
),
|
|
20098
|
-
/* @__PURE__ */
|
|
20271
|
+
/* @__PURE__ */ jsx159("span", { css: [SwitchInputLabel(switchSize), SwitchInputLabelAlignment], children: label2 })
|
|
20099
20272
|
]
|
|
20100
20273
|
}
|
|
20101
20274
|
),
|
|
20102
|
-
additionalText ? /* @__PURE__ */
|
|
20275
|
+
additionalText ? /* @__PURE__ */ jsx159(
|
|
20103
20276
|
"p",
|
|
20104
20277
|
{
|
|
20105
20278
|
css: [
|
|
@@ -20169,53 +20342,53 @@ var responsiveTableContainer = css117`
|
|
|
20169
20342
|
`;
|
|
20170
20343
|
|
|
20171
20344
|
// src/components/Table/ResponsiveTableContainer.tsx
|
|
20172
|
-
import { jsx as
|
|
20345
|
+
import { jsx as jsx160 } from "@emotion/react/jsx-runtime";
|
|
20173
20346
|
var ResponsiveTableContainer = ({ children }) => {
|
|
20174
|
-
return /* @__PURE__ */
|
|
20347
|
+
return /* @__PURE__ */ jsx160("div", { css: responsiveTableContainer, children });
|
|
20175
20348
|
};
|
|
20176
20349
|
|
|
20177
20350
|
// src/components/Table/Table.tsx
|
|
20178
|
-
import * as
|
|
20179
|
-
import { jsx as
|
|
20180
|
-
var Table =
|
|
20351
|
+
import * as React26 from "react";
|
|
20352
|
+
import { jsx as jsx161 } from "@emotion/react/jsx-runtime";
|
|
20353
|
+
var Table = React26.forwardRef(
|
|
20181
20354
|
({ children, cellPadding, ...otherProps }, ref) => {
|
|
20182
|
-
return /* @__PURE__ */
|
|
20355
|
+
return /* @__PURE__ */ jsx161("table", { ref, css: table({ cellPadding }), ...otherProps, children });
|
|
20183
20356
|
}
|
|
20184
20357
|
);
|
|
20185
|
-
var TableHead =
|
|
20358
|
+
var TableHead = React26.forwardRef(
|
|
20186
20359
|
({ children, ...otherProps }, ref) => {
|
|
20187
|
-
return /* @__PURE__ */
|
|
20360
|
+
return /* @__PURE__ */ jsx161("thead", { ref, css: tableHead, ...otherProps, children });
|
|
20188
20361
|
}
|
|
20189
20362
|
);
|
|
20190
|
-
var TableBody =
|
|
20363
|
+
var TableBody = React26.forwardRef(
|
|
20191
20364
|
({ children, ...otherProps }, ref) => {
|
|
20192
|
-
return /* @__PURE__ */
|
|
20365
|
+
return /* @__PURE__ */ jsx161("tbody", { ref, ...otherProps, children });
|
|
20193
20366
|
}
|
|
20194
20367
|
);
|
|
20195
|
-
var TableFoot =
|
|
20368
|
+
var TableFoot = React26.forwardRef(
|
|
20196
20369
|
({ children, ...otherProps }, ref) => {
|
|
20197
|
-
return /* @__PURE__ */
|
|
20370
|
+
return /* @__PURE__ */ jsx161("tfoot", { ref, ...otherProps, children });
|
|
20198
20371
|
}
|
|
20199
20372
|
);
|
|
20200
|
-
var TableRow =
|
|
20373
|
+
var TableRow = React26.forwardRef(
|
|
20201
20374
|
({ children, ...otherProps }, ref) => {
|
|
20202
|
-
return /* @__PURE__ */
|
|
20375
|
+
return /* @__PURE__ */ jsx161("tr", { ref, css: tableRow, ...otherProps, children });
|
|
20203
20376
|
}
|
|
20204
20377
|
);
|
|
20205
|
-
var TableCellHead =
|
|
20378
|
+
var TableCellHead = React26.forwardRef(
|
|
20206
20379
|
({ children, ...otherProps }, ref) => {
|
|
20207
|
-
return /* @__PURE__ */
|
|
20380
|
+
return /* @__PURE__ */ jsx161("th", { ref, css: tableCellHead, ...otherProps, children });
|
|
20208
20381
|
}
|
|
20209
20382
|
);
|
|
20210
|
-
var TableCellData =
|
|
20383
|
+
var TableCellData = React26.forwardRef(
|
|
20211
20384
|
({ children, ...otherProps }, ref) => {
|
|
20212
|
-
return /* @__PURE__ */
|
|
20385
|
+
return /* @__PURE__ */ jsx161("td", { ref, ...otherProps, children });
|
|
20213
20386
|
}
|
|
20214
20387
|
);
|
|
20215
20388
|
|
|
20216
20389
|
// src/components/Tabs/Tabs.tsx
|
|
20217
20390
|
import { Tabs as BaseUITabs } from "@base-ui/react/tabs";
|
|
20218
|
-
import { createContext as createContext10, useCallback as useCallback20, useContext as useContext10, useEffect as
|
|
20391
|
+
import { createContext as createContext10, useCallback as useCallback20, useContext as useContext10, useEffect as useEffect32, useMemo as useMemo17, useRef as useRef22, useState as useState35 } from "react";
|
|
20219
20392
|
|
|
20220
20393
|
// src/components/Tabs/Tabs.styles.ts
|
|
20221
20394
|
import { css as css118 } from "@emotion/react";
|
|
@@ -20243,7 +20416,7 @@ var tabButtonGroupStyles = css118`
|
|
|
20243
20416
|
`;
|
|
20244
20417
|
|
|
20245
20418
|
// src/components/Tabs/Tabs.tsx
|
|
20246
|
-
import { jsx as
|
|
20419
|
+
import { jsx as jsx162 } from "@emotion/react/jsx-runtime";
|
|
20247
20420
|
var TabsContext = createContext10(null);
|
|
20248
20421
|
var useCurrentTab = () => {
|
|
20249
20422
|
const context = useContext10(TabsContext);
|
|
@@ -20269,8 +20442,8 @@ var Tabs = ({
|
|
|
20269
20442
|
return useHashForState && typeof window !== "undefined" && window.location.hash ? window.location.hash.substring(1) : void 0;
|
|
20270
20443
|
}, [selectedId, useHashForState]);
|
|
20271
20444
|
const isControlled = selected !== void 0;
|
|
20272
|
-
const [uncontrolledValue, setUncontrolledValue] =
|
|
20273
|
-
const firstTabRegistered =
|
|
20445
|
+
const [uncontrolledValue, setUncontrolledValue] = useState35(void 0);
|
|
20446
|
+
const firstTabRegistered = useRef22(false);
|
|
20274
20447
|
const registerTab = useCallback20(
|
|
20275
20448
|
(value) => {
|
|
20276
20449
|
if (!firstTabRegistered.current) {
|
|
@@ -20304,7 +20477,7 @@ var Tabs = ({
|
|
|
20304
20477
|
}),
|
|
20305
20478
|
[currentValue, onTabSelect]
|
|
20306
20479
|
);
|
|
20307
|
-
return /* @__PURE__ */
|
|
20480
|
+
return /* @__PURE__ */ jsx162(TabsContext.Provider, { value: tabsContextValue, children: /* @__PURE__ */ jsx162(TabRegistrationContext.Provider, { value: { registerTab }, children: /* @__PURE__ */ jsx162(ManualContext.Provider, { value: !!manual, children: /* @__PURE__ */ jsx162(
|
|
20308
20481
|
BaseUITabs.Root,
|
|
20309
20482
|
{
|
|
20310
20483
|
value: currentValue != null ? currentValue : null,
|
|
@@ -20318,7 +20491,7 @@ var Tabs = ({
|
|
|
20318
20491
|
};
|
|
20319
20492
|
var TabButtonGroup = ({ children, ...props }) => {
|
|
20320
20493
|
const manual = useContext10(ManualContext);
|
|
20321
|
-
return /* @__PURE__ */
|
|
20494
|
+
return /* @__PURE__ */ jsx162(BaseUITabs.List, { activateOnFocus: !manual, ...props, css: tabButtonGroupStyles, children });
|
|
20322
20495
|
};
|
|
20323
20496
|
var TabButton = ({
|
|
20324
20497
|
children,
|
|
@@ -20326,10 +20499,10 @@ var TabButton = ({
|
|
|
20326
20499
|
...props
|
|
20327
20500
|
}) => {
|
|
20328
20501
|
const registration = useContext10(TabRegistrationContext);
|
|
20329
|
-
|
|
20502
|
+
useEffect32(() => {
|
|
20330
20503
|
registration == null ? void 0 : registration.registerTab(id);
|
|
20331
20504
|
}, []);
|
|
20332
|
-
return /* @__PURE__ */
|
|
20505
|
+
return /* @__PURE__ */ jsx162(BaseUITabs.Tab, { type: "button", value: id, "data-tab-id": id, ...props, css: tabButtonStyles, children });
|
|
20333
20506
|
};
|
|
20334
20507
|
var TabContent = ({
|
|
20335
20508
|
children,
|
|
@@ -20340,7 +20513,7 @@ var TabContent = ({
|
|
|
20340
20513
|
}) => {
|
|
20341
20514
|
const panelValue = tabId != null ? tabId : id;
|
|
20342
20515
|
const htmlId = id;
|
|
20343
|
-
return /* @__PURE__ */
|
|
20516
|
+
return /* @__PURE__ */ jsx162(BaseUITabs.Panel, { value: panelValue, id: htmlId, keepMounted, ...props, children });
|
|
20344
20517
|
};
|
|
20345
20518
|
|
|
20346
20519
|
// src/components/Validation/StatusBullet.styles.ts
|
|
@@ -20422,7 +20595,7 @@ var StatusDeleted = css119`
|
|
|
20422
20595
|
`;
|
|
20423
20596
|
|
|
20424
20597
|
// src/components/Validation/StatusBullet.tsx
|
|
20425
|
-
import { jsx as
|
|
20598
|
+
import { jsx as jsx163 } from "@emotion/react/jsx-runtime";
|
|
20426
20599
|
var currentStateStyles = {
|
|
20427
20600
|
Error: StatusError,
|
|
20428
20601
|
Modified: StatusModified,
|
|
@@ -20446,7 +20619,7 @@ var StatusBullet = ({
|
|
|
20446
20619
|
compact = false,
|
|
20447
20620
|
...props
|
|
20448
20621
|
}) => {
|
|
20449
|
-
const StatusComponent = () => /* @__PURE__ */
|
|
20622
|
+
const StatusComponent = () => /* @__PURE__ */ jsx163(
|
|
20450
20623
|
"span",
|
|
20451
20624
|
{
|
|
20452
20625
|
role: "status",
|
|
@@ -20457,9 +20630,9 @@ var StatusBullet = ({
|
|
|
20457
20630
|
}
|
|
20458
20631
|
);
|
|
20459
20632
|
if (compact) {
|
|
20460
|
-
return /* @__PURE__ */
|
|
20633
|
+
return /* @__PURE__ */ jsx163(StatusComponent, {});
|
|
20461
20634
|
}
|
|
20462
|
-
return /* @__PURE__ */
|
|
20635
|
+
return /* @__PURE__ */ jsx163(Tooltip, { title: message != null ? message : status, children: /* @__PURE__ */ jsx163("div", { children: /* @__PURE__ */ jsx163(StatusComponent, {}) }) });
|
|
20463
20636
|
};
|
|
20464
20637
|
export {
|
|
20465
20638
|
AVATAR_SIZE_2XL,
|
|
@@ -20635,6 +20808,7 @@ export {
|
|
|
20635
20808
|
SliderLabels,
|
|
20636
20809
|
Spinner,
|
|
20637
20810
|
StackedModal,
|
|
20811
|
+
StackedModalHeader,
|
|
20638
20812
|
StackedModalStep,
|
|
20639
20813
|
StatusBullet,
|
|
20640
20814
|
SuccessMessage,
|