@uniformdev/design-system 19.207.1-alpha.20 → 19.208.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 +55 -48
- package/dist/index.d.mts +15 -3
- package/dist/index.d.ts +15 -3
- package/dist/index.js +11 -6
- package/package.json +4 -4
package/dist/esm/index.js
CHANGED
|
@@ -11789,6 +11789,9 @@ var AnimationFile = ({
|
|
|
11789
11789
|
);
|
|
11790
11790
|
};
|
|
11791
11791
|
|
|
11792
|
+
// src/components/Avatar/Avatar.tsx
|
|
11793
|
+
import { CgProfile } from "@react-icons/all-files/cg/CgProfile";
|
|
11794
|
+
|
|
11792
11795
|
// src/components/Avatar/Avatar.styles.ts
|
|
11793
11796
|
import { css as css18 } from "@emotion/react";
|
|
11794
11797
|
var avatarStyles = css18`
|
|
@@ -11833,7 +11836,7 @@ var avatarSize2xlStyles = css18`
|
|
|
11833
11836
|
`;
|
|
11834
11837
|
|
|
11835
11838
|
// src/components/Avatar/Avatar.tsx
|
|
11836
|
-
import { jsx as jsx20, jsxs as jsxs7 } from "@emotion/react/jsx-runtime";
|
|
11839
|
+
import { Fragment as Fragment4, jsx as jsx20, jsxs as jsxs7 } from "@emotion/react/jsx-runtime";
|
|
11837
11840
|
var avatarSizeStylesMap = {
|
|
11838
11841
|
"2xs": avatarSize2xsStyles,
|
|
11839
11842
|
xs: avatarSizeXsStyles,
|
|
@@ -11845,10 +11848,11 @@ var avatarSizeStylesMap = {
|
|
|
11845
11848
|
};
|
|
11846
11849
|
var Avatar = ({ src, label = "", children, size = "md", as = "div", ...props }) => {
|
|
11847
11850
|
const Element = as;
|
|
11848
|
-
|
|
11849
|
-
|
|
11851
|
+
const body = /* @__PURE__ */ jsx20(Fragment4, { children: /* @__PURE__ */ jsxs7(Element, { css: [avatarStyles, avatarSizeStylesMap[size]], ...props, children: [
|
|
11852
|
+
src ? /* @__PURE__ */ jsx20("img", { role: "presentation", src, css: avatarImageStyles }) : children ? null : /* @__PURE__ */ jsx20(CgProfile, { css: avatarImageStyles }),
|
|
11850
11853
|
children
|
|
11851
11854
|
] }) });
|
|
11855
|
+
return src || children ? /* @__PURE__ */ jsx20(Tooltip, { title: label, children: body }) : body;
|
|
11852
11856
|
};
|
|
11853
11857
|
|
|
11854
11858
|
// src/components/Avatar/AvatarGroup.styles.ts
|
|
@@ -11882,10 +11886,13 @@ var AvatarGroup = ({
|
|
|
11882
11886
|
getTruncatedLabel = defaultGetTruncatedLabel,
|
|
11883
11887
|
...props
|
|
11884
11888
|
}) => {
|
|
11889
|
+
if (max < 2) {
|
|
11890
|
+
throw new Error("max must be 2 or more");
|
|
11891
|
+
}
|
|
11885
11892
|
const numberOfChildren = children.length;
|
|
11886
|
-
const
|
|
11887
|
-
const
|
|
11888
|
-
const
|
|
11893
|
+
const numberOfTruncatedItems = numberOfChildren <= max ? 0 : numberOfChildren - max + 1;
|
|
11894
|
+
const numberOfItemsToRender = numberOfTruncatedItems ? Math.min(numberOfChildren, max - 1) : void 0;
|
|
11895
|
+
const childrenToRender = children.slice(0, numberOfItemsToRender);
|
|
11889
11896
|
return /* @__PURE__ */ jsxs8(
|
|
11890
11897
|
"div",
|
|
11891
11898
|
{
|
|
@@ -11895,7 +11902,7 @@ var AvatarGroup = ({
|
|
|
11895
11902
|
],
|
|
11896
11903
|
...props,
|
|
11897
11904
|
children: [
|
|
11898
|
-
|
|
11905
|
+
childrenToRender,
|
|
11899
11906
|
!numberOfTruncatedItems ? null : /* @__PURE__ */ jsxs8(Avatar, { label: getTruncatedLabel(numberOfTruncatedItems), style: { display: "flex" }, children: [
|
|
11900
11907
|
"+",
|
|
11901
11908
|
numberOfTruncatedItems
|
|
@@ -13512,7 +13519,7 @@ var DebouncedInputKeywordSearch = forwardRef8(
|
|
|
13512
13519
|
|
|
13513
13520
|
// src/components/Input/InputSelect.tsx
|
|
13514
13521
|
import { forwardRef as forwardRef9 } from "react";
|
|
13515
|
-
import { Fragment as
|
|
13522
|
+
import { Fragment as Fragment5, jsx as jsx44, jsxs as jsxs23 } from "@emotion/react/jsx-runtime";
|
|
13516
13523
|
var InputSelect = forwardRef9(
|
|
13517
13524
|
({
|
|
13518
13525
|
label,
|
|
@@ -13535,7 +13542,7 @@ var InputSelect = forwardRef9(
|
|
|
13535
13542
|
css: [inputContainer, typeof classNameContainer === "object" ? classNameContainer : void 0],
|
|
13536
13543
|
className: typeof classNameContainer === "string" ? classNameContainer : "",
|
|
13537
13544
|
children: [
|
|
13538
|
-
showLabel ? /* @__PURE__ */ jsx44(
|
|
13545
|
+
showLabel ? /* @__PURE__ */ jsx44(Fragment5, { children: /* @__PURE__ */ jsxs23(
|
|
13539
13546
|
Label,
|
|
13540
13547
|
{
|
|
13541
13548
|
htmlFor: props.id,
|
|
@@ -13814,10 +13821,10 @@ var SuccessMessage = ({ message, testId, ...props }) => {
|
|
|
13814
13821
|
|
|
13815
13822
|
// src/components/Input/Textarea.tsx
|
|
13816
13823
|
import { forwardRef as forwardRef12 } from "react";
|
|
13817
|
-
import { Fragment as
|
|
13824
|
+
import { Fragment as Fragment6, jsx as jsx49, jsxs as jsxs27 } from "@emotion/react/jsx-runtime";
|
|
13818
13825
|
var Textarea = forwardRef12(
|
|
13819
13826
|
({ label, icon, id, caption, showLabel = true, errorMessage, warningMessage, ...props }, ref) => {
|
|
13820
|
-
return /* @__PURE__ */ jsxs27(
|
|
13827
|
+
return /* @__PURE__ */ jsxs27(Fragment6, { children: [
|
|
13821
13828
|
showLabel ? /* @__PURE__ */ jsx49("label", { htmlFor: id, css: [labelText], children: label }) : null,
|
|
13822
13829
|
/* @__PURE__ */ jsxs27("div", { css: [inputContainer], children: [
|
|
13823
13830
|
/* @__PURE__ */ jsx49(
|
|
@@ -14070,7 +14077,7 @@ var wholeButtonWithMenuIconOffset = css38`
|
|
|
14070
14077
|
`;
|
|
14071
14078
|
|
|
14072
14079
|
// src/components/ButtonWithMenu/ButtonWithMenu.tsx
|
|
14073
|
-
import { Fragment as
|
|
14080
|
+
import { Fragment as Fragment7, jsx as jsx52, jsxs as jsxs30 } from "@emotion/react/jsx-runtime";
|
|
14074
14081
|
var buttonTheme = {
|
|
14075
14082
|
primary: buttonPrimary2,
|
|
14076
14083
|
secondary: buttonSecondary2,
|
|
@@ -14155,7 +14162,7 @@ var ButtonWithMenu = ({
|
|
|
14155
14162
|
],
|
|
14156
14163
|
"data-testid": "multioptions-button",
|
|
14157
14164
|
children: [
|
|
14158
|
-
/* @__PURE__ */ jsx52(Tooltip, { visible: tip ? void 0 : false, title: /* @__PURE__ */ jsx52(
|
|
14165
|
+
/* @__PURE__ */ jsx52(Tooltip, { visible: tip ? void 0 : false, title: /* @__PURE__ */ jsx52(Fragment7, { children: tip }), children: /* @__PURE__ */ jsx52("span", { children: primaryButton }) }),
|
|
14159
14166
|
disabledValue ? menuButton2 : /* @__PURE__ */ jsx52(
|
|
14160
14167
|
Menu,
|
|
14161
14168
|
{
|
|
@@ -14499,7 +14506,7 @@ var paragraph = css42`
|
|
|
14499
14506
|
`;
|
|
14500
14507
|
|
|
14501
14508
|
// src/components/Typography/Paragraph.tsx
|
|
14502
|
-
import { Fragment as
|
|
14509
|
+
import { Fragment as Fragment8, jsx as jsx56 } from "@emotion/react/jsx-runtime";
|
|
14503
14510
|
import { createElement } from "@emotion/react";
|
|
14504
14511
|
var Paragraph = ({ className, htmlContent, children, ...pAttributes }) => {
|
|
14505
14512
|
if (htmlContent && Array.isArray(htmlContent)) {
|
|
@@ -14513,7 +14520,7 @@ var Paragraph = ({ className, htmlContent, children, ...pAttributes }) => {
|
|
|
14513
14520
|
dangerouslySetInnerHTML: { __html: html }
|
|
14514
14521
|
}
|
|
14515
14522
|
));
|
|
14516
|
-
return /* @__PURE__ */ jsx56(
|
|
14523
|
+
return /* @__PURE__ */ jsx56(Fragment8, { children: paragraphContent });
|
|
14517
14524
|
}
|
|
14518
14525
|
return htmlContent ? /* @__PURE__ */ jsx56(
|
|
14519
14526
|
"p",
|
|
@@ -14582,7 +14589,7 @@ var IntegrationHeaderSectionDocsLink = css43`
|
|
|
14582
14589
|
`;
|
|
14583
14590
|
|
|
14584
14591
|
// src/components/Typography/IntegrationHeaderSection.tsx
|
|
14585
|
-
import { Fragment as
|
|
14592
|
+
import { Fragment as Fragment9, jsx as jsx57, jsxs as jsxs33 } from "@emotion/react/jsx-runtime";
|
|
14586
14593
|
var IntegrationHeaderSectionHexImage = ({ ...props }) => {
|
|
14587
14594
|
return /* @__PURE__ */ jsxs33("svg", { viewBox: "0 0 100 116", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: [
|
|
14588
14595
|
/* @__PURE__ */ jsx57(
|
|
@@ -14622,7 +14629,7 @@ var IntegrationHeaderSection = ({
|
|
|
14622
14629
|
...props
|
|
14623
14630
|
}) => {
|
|
14624
14631
|
const CompIcon = icon && typeof icon !== "string" ? icon : null;
|
|
14625
|
-
return /* @__PURE__ */ jsxs33(
|
|
14632
|
+
return /* @__PURE__ */ jsxs33(Fragment9, { children: [
|
|
14626
14633
|
/* @__PURE__ */ jsxs33("div", { css: IntegrationHeaderSectionContainer, ...props, children: [
|
|
14627
14634
|
/* @__PURE__ */ jsxs33("div", { css: IntegrationHeaderSectionTitleContainer, children: [
|
|
14628
14635
|
icon ? /* @__PURE__ */ jsxs33("div", { css: IntegrationHeaderSectionIconContainer, children: [
|
|
@@ -15144,7 +15151,7 @@ var ChipDisabled = css48`
|
|
|
15144
15151
|
`;
|
|
15145
15152
|
|
|
15146
15153
|
// src/components/Chip/Chip.tsx
|
|
15147
|
-
import { Fragment as
|
|
15154
|
+
import { Fragment as Fragment10, jsx as jsx62, jsxs as jsxs37 } from "@emotion/react/jsx-runtime";
|
|
15148
15155
|
var chipTheme = {
|
|
15149
15156
|
"accent-light": ChipThemeAccentLight,
|
|
15150
15157
|
"accent-dark": ChipThemeAccentDark,
|
|
@@ -15183,7 +15190,7 @@ var Chip = ({
|
|
|
15183
15190
|
],
|
|
15184
15191
|
...props,
|
|
15185
15192
|
children: [
|
|
15186
|
-
icon ? /* @__PURE__ */ jsxs37(
|
|
15193
|
+
icon ? /* @__PURE__ */ jsxs37(Fragment10, { children: [
|
|
15187
15194
|
/* @__PURE__ */ jsx62("span", { role: "presentation", css: [ChipIcon], children: /* @__PURE__ */ jsx62(Icon, { icon, iconColor, size: "1rem" }) }),
|
|
15188
15195
|
/* @__PURE__ */ jsx62("span", { role: "separator", css: ChipSeparator })
|
|
15189
15196
|
] }) : null,
|
|
@@ -16433,7 +16440,7 @@ var DrawerContent2 = ({ children, buttonGroup, noPadding = false, ...props }) =>
|
|
|
16433
16440
|
|
|
16434
16441
|
// src/components/Drawer/DrawerRenderer.tsx
|
|
16435
16442
|
import { useEffect as useEffect7, useMemo as useMemo3 } from "react";
|
|
16436
|
-
import { Fragment as
|
|
16443
|
+
import { Fragment as Fragment11, jsx as jsx74, jsxs as jsxs45 } from "@emotion/react/jsx-runtime";
|
|
16437
16444
|
var drawerWidth = {
|
|
16438
16445
|
narrow: "29rem",
|
|
16439
16446
|
medium: "43rem",
|
|
@@ -16522,7 +16529,7 @@ var DrawerWrapper = ({
|
|
|
16522
16529
|
offsetInPx = Math.round(maxLayeringInPx * relativeLevel);
|
|
16523
16530
|
}
|
|
16524
16531
|
const calculatedWidth = `calc(${width} - ${offsetInPx}px)`;
|
|
16525
|
-
return /* @__PURE__ */ jsxs45(
|
|
16532
|
+
return /* @__PURE__ */ jsxs45(Fragment11, { children: [
|
|
16526
16533
|
/* @__PURE__ */ jsx74("div", { css: drawerWrapperOverlayStyles, onClick: onOverlayClick }),
|
|
16527
16534
|
/* @__PURE__ */ jsx74(
|
|
16528
16535
|
"div",
|
|
@@ -17164,10 +17171,10 @@ var IntegrationLoadingFrame = css64`
|
|
|
17164
17171
|
`;
|
|
17165
17172
|
|
|
17166
17173
|
// src/components/Tiles/IntegrationLoadingTile.tsx
|
|
17167
|
-
import { Fragment as
|
|
17174
|
+
import { Fragment as Fragment12, jsx as jsx84, jsxs as jsxs52 } from "@emotion/react/jsx-runtime";
|
|
17168
17175
|
var IntegrationLoadingTile = ({ count = 1 }) => {
|
|
17169
17176
|
const componentCount = Array.from(Array(count).keys());
|
|
17170
|
-
return /* @__PURE__ */ jsx84(
|
|
17177
|
+
return /* @__PURE__ */ jsx84(Fragment12, { children: componentCount.map((i) => /* @__PURE__ */ jsxs52("div", { css: IntegrationLoadingTileContainer, children: [
|
|
17171
17178
|
/* @__PURE__ */ jsx84("div", { css: [IntegrationLoadingTileImg, IntegrationLoadingFrame], role: "presentation" }),
|
|
17172
17179
|
/* @__PURE__ */ jsx84("div", { css: [IntegrationLoadingTileText, IntegrationLoadingFrame] })
|
|
17173
17180
|
] }, i)) });
|
|
@@ -17409,7 +17416,7 @@ var IntegrationModalHeaderContentWrapper = css69`
|
|
|
17409
17416
|
`;
|
|
17410
17417
|
|
|
17411
17418
|
// src/components/IntegrationModalHeader/IntegrationModalHeader.tsx
|
|
17412
|
-
import { Fragment as
|
|
17419
|
+
import { Fragment as Fragment13, jsx as jsx90, jsxs as jsxs55 } from "@emotion/react/jsx-runtime";
|
|
17413
17420
|
var HexModalBackground = ({ ...props }) => {
|
|
17414
17421
|
return /* @__PURE__ */ jsxs55(
|
|
17415
17422
|
"svg",
|
|
@@ -17450,7 +17457,7 @@ var HexModalBackground = ({ ...props }) => {
|
|
|
17450
17457
|
);
|
|
17451
17458
|
};
|
|
17452
17459
|
var IntegrationModalHeader = ({ icon, name, menu, children }) => {
|
|
17453
|
-
return /* @__PURE__ */ jsxs55(
|
|
17460
|
+
return /* @__PURE__ */ jsxs55(Fragment13, { children: [
|
|
17454
17461
|
/* @__PURE__ */ jsx90(HexModalBackground, { css: IntegrationModalHeaderSVGBackground, role: "presentation" }),
|
|
17455
17462
|
/* @__PURE__ */ jsx90("div", { css: IntegrationModalHeaderGroup, children: /* @__PURE__ */ jsxs55("div", { css: IntegrationModalHeaderTitleGroup, children: [
|
|
17456
17463
|
icon ? /* @__PURE__ */ jsx90(IntegrationModalIcon, { icon, name: name || "" }) : null,
|
|
@@ -18358,7 +18365,7 @@ import {
|
|
|
18358
18365
|
usePopoverStore
|
|
18359
18366
|
} from "@ariakit/react";
|
|
18360
18367
|
import { useEffect as useEffect14 } from "react";
|
|
18361
|
-
import { Fragment as
|
|
18368
|
+
import { Fragment as Fragment14, jsx as jsx100, jsxs as jsxs64 } from "@emotion/react/jsx-runtime";
|
|
18362
18369
|
var Popover3 = ({
|
|
18363
18370
|
iconColor = "action",
|
|
18364
18371
|
icon = "info",
|
|
@@ -18385,7 +18392,7 @@ var Popover3 = ({
|
|
|
18385
18392
|
css: [PopoverBtn, trigger2 ? void 0 : PopoverDefaulterTriggerBtn],
|
|
18386
18393
|
title: buttonText,
|
|
18387
18394
|
"data-testid": testId,
|
|
18388
|
-
children: trigger2 ? trigger2 : /* @__PURE__ */ jsxs64(
|
|
18395
|
+
children: trigger2 ? trigger2 : /* @__PURE__ */ jsxs64(Fragment14, { children: [
|
|
18389
18396
|
/* @__PURE__ */ jsx100(Icon, { icon, iconColor, size: iconSize }),
|
|
18390
18397
|
/* @__PURE__ */ jsx100("span", { hidden: true, children: buttonText })
|
|
18391
18398
|
] })
|
|
@@ -19033,7 +19040,7 @@ var CoverSelectedChip = css82`
|
|
|
19033
19040
|
`;
|
|
19034
19041
|
|
|
19035
19042
|
// src/components/Objects/ObjectGridItemCardCover.tsx
|
|
19036
|
-
import { Fragment as
|
|
19043
|
+
import { Fragment as Fragment15, jsx as jsx106, jsxs as jsxs69 } from "@emotion/react/jsx-runtime";
|
|
19037
19044
|
var ObjectGridItemCardCover = (props) => {
|
|
19038
19045
|
if ("imageUrl" in props && props.imageUrl) {
|
|
19039
19046
|
const { imageUrl, srcSet } = props;
|
|
@@ -19066,7 +19073,7 @@ var ObjectGridItemCover = ({
|
|
|
19066
19073
|
coverSlotBottomRight,
|
|
19067
19074
|
...props
|
|
19068
19075
|
}) => {
|
|
19069
|
-
return /* @__PURE__ */ jsxs69(
|
|
19076
|
+
return /* @__PURE__ */ jsxs69(Fragment15, { children: [
|
|
19070
19077
|
coverSlotLeft ? /* @__PURE__ */ jsx106("div", { css: [CoverSlot, CoverSlotLeft], children: coverSlotLeft }) : null,
|
|
19071
19078
|
/* @__PURE__ */ jsx106(ObjectGridItemCardCover, { ...props }),
|
|
19072
19079
|
coverSlotRight ? /* @__PURE__ */ jsx106("div", { css: [CoverSlot, CoverSlotRight], children: coverSlotRight }) : null,
|
|
@@ -20038,7 +20045,7 @@ var previewModalImage = css92`
|
|
|
20038
20045
|
`;
|
|
20039
20046
|
|
|
20040
20047
|
// src/components/ParameterInputs/ParameterImagePreview.tsx
|
|
20041
|
-
import { Fragment as
|
|
20048
|
+
import { Fragment as Fragment16, jsx as jsx120, jsxs as jsxs79 } from "@emotion/react/jsx-runtime";
|
|
20042
20049
|
function ParameterImagePreview({ imageSrc }) {
|
|
20043
20050
|
const [showModal, setShowModal] = useState14(false);
|
|
20044
20051
|
return imageSrc ? /* @__PURE__ */ jsxs79("div", { css: previewWrapper, children: [
|
|
@@ -20056,7 +20063,7 @@ function ParameterImagePreview({ imageSrc }) {
|
|
|
20056
20063
|
] }) : null;
|
|
20057
20064
|
}
|
|
20058
20065
|
var PreviewImageModal = ({ open, onRequestClose, imageSrc }) => {
|
|
20059
|
-
return open ? /* @__PURE__ */ jsx120(
|
|
20066
|
+
return open ? /* @__PURE__ */ jsx120(Fragment16, { children: createPortal2(
|
|
20060
20067
|
/* @__PURE__ */ jsx120(
|
|
20061
20068
|
Modal,
|
|
20062
20069
|
{
|
|
@@ -20258,7 +20265,7 @@ var ParameterShellPlaceholder = ({ children }) => {
|
|
|
20258
20265
|
var ParameterOverrideMarker = (props) => /* @__PURE__ */ jsx123(Tooltip, { title: "The default value has been overridden", children: /* @__PURE__ */ jsx123("button", { type: "button", css: overrideMarker, ...props, children: /* @__PURE__ */ jsx123("span", { hidden: true, children: "reset overridden value to default" }) }) });
|
|
20259
20266
|
|
|
20260
20267
|
// src/components/ParameterInputs/ParameterImage.tsx
|
|
20261
|
-
import { Fragment as
|
|
20268
|
+
import { Fragment as Fragment17, jsx as jsx124, jsxs as jsxs81 } from "@emotion/react/jsx-runtime";
|
|
20262
20269
|
var ParameterImage = forwardRef20(
|
|
20263
20270
|
({ children, ...props }, ref) => {
|
|
20264
20271
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
@@ -20272,7 +20279,7 @@ var ParameterImageInner = forwardRef20((props, ref) => {
|
|
|
20272
20279
|
const { value } = props;
|
|
20273
20280
|
const { id, label, hiddenLabel, errorMessage } = useParameterShell();
|
|
20274
20281
|
const deferredValue = useDeferredValue(value);
|
|
20275
|
-
return /* @__PURE__ */ jsxs81(
|
|
20282
|
+
return /* @__PURE__ */ jsxs81(Fragment17, { children: [
|
|
20276
20283
|
/* @__PURE__ */ jsx124(
|
|
20277
20284
|
"input",
|
|
20278
20285
|
{
|
|
@@ -20446,7 +20453,7 @@ var ParameterMultiSelectInner = (props) => {
|
|
|
20446
20453
|
};
|
|
20447
20454
|
|
|
20448
20455
|
// src/components/ParameterInputs/ParameterNameAndPublicIdInput.tsx
|
|
20449
|
-
import { Fragment as
|
|
20456
|
+
import { Fragment as Fragment18, jsx as jsx128, jsxs as jsxs83 } from "@emotion/react/jsx-runtime";
|
|
20450
20457
|
var ParameterNameAndPublicIdInput = ({
|
|
20451
20458
|
id,
|
|
20452
20459
|
onBlur,
|
|
@@ -20472,7 +20479,7 @@ var ParameterNameAndPublicIdInput = ({
|
|
|
20472
20479
|
navigator.clipboard.writeText(values[publicIdFieldName]);
|
|
20473
20480
|
};
|
|
20474
20481
|
autoFocus == null ? void 0 : autoFocus();
|
|
20475
|
-
return /* @__PURE__ */ jsxs83(
|
|
20482
|
+
return /* @__PURE__ */ jsxs83(Fragment18, { children: [
|
|
20476
20483
|
/* @__PURE__ */ jsx128(
|
|
20477
20484
|
ParameterInput,
|
|
20478
20485
|
{
|
|
@@ -21047,7 +21054,7 @@ var getSelectedNode = (selection) => {
|
|
|
21047
21054
|
};
|
|
21048
21055
|
|
|
21049
21056
|
// src/components/ParameterInputs/rich-text/LinkNodePlugin.tsx
|
|
21050
|
-
import { Fragment as
|
|
21057
|
+
import { Fragment as Fragment19, jsx as jsx129, jsxs as jsxs84 } from "@emotion/react/jsx-runtime";
|
|
21051
21058
|
var isProjectMapLinkValue = (value) => {
|
|
21052
21059
|
return (value == null ? void 0 : value.type) === "projectMapNode" && Boolean(
|
|
21053
21060
|
value.nodeId && value.path && value.projectMapId
|
|
@@ -21533,7 +21540,7 @@ function LinkNodePlugin({
|
|
|
21533
21540
|
});
|
|
21534
21541
|
});
|
|
21535
21542
|
};
|
|
21536
|
-
return /* @__PURE__ */ jsxs84(
|
|
21543
|
+
return /* @__PURE__ */ jsxs84(Fragment19, { children: [
|
|
21537
21544
|
/* @__PURE__ */ jsx129(
|
|
21538
21545
|
NodeEventPlugin,
|
|
21539
21546
|
{
|
|
@@ -22079,7 +22086,7 @@ import { calculateZoomLevel } from "@lexical/utils";
|
|
|
22079
22086
|
import { $getNearestNodeFromDOMNode } from "lexical";
|
|
22080
22087
|
import { useCallback as useCallback12, useEffect as useEffect22, useMemo as useMemo6, useRef as useRef13, useState as useState18 } from "react";
|
|
22081
22088
|
import { createPortal as createPortal3 } from "react-dom";
|
|
22082
|
-
import { Fragment as
|
|
22089
|
+
import { Fragment as Fragment20, jsx as jsx131, jsxs as jsxs86 } from "@emotion/react/jsx-runtime";
|
|
22083
22090
|
var MIN_ROW_HEIGHT = 33;
|
|
22084
22091
|
var MIN_COLUMN_WIDTH = 50;
|
|
22085
22092
|
var tableResizer = css98`
|
|
@@ -22380,7 +22387,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
22380
22387
|
};
|
|
22381
22388
|
}, [activeCell, draggingDirection, mouseCurrentPos, positioningAnchorEl]);
|
|
22382
22389
|
const resizerStyles = getResizers();
|
|
22383
|
-
return /* @__PURE__ */ jsx131("div", { ref: resizerRef, children: activeCell != null && !isMouseDown && /* @__PURE__ */ jsxs86(
|
|
22390
|
+
return /* @__PURE__ */ jsx131("div", { ref: resizerRef, children: activeCell != null && !isMouseDown && /* @__PURE__ */ jsxs86(Fragment20, { children: [
|
|
22384
22391
|
/* @__PURE__ */ jsx131(
|
|
22385
22392
|
"div",
|
|
22386
22393
|
{
|
|
@@ -22640,7 +22647,7 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
22640
22647
|
};
|
|
22641
22648
|
|
|
22642
22649
|
// src/components/ParameterInputs/rich-text/toolbar/RichTextToolbar.tsx
|
|
22643
|
-
import { Fragment as
|
|
22650
|
+
import { Fragment as Fragment21, jsx as jsx132, jsxs as jsxs87 } from "@emotion/react/jsx-runtime";
|
|
22644
22651
|
var toolbar = css99`
|
|
22645
22652
|
${scrollbarStyles}
|
|
22646
22653
|
background: var(--gray-50);
|
|
@@ -22893,7 +22900,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
22893
22900
|
children: /* @__PURE__ */ jsx132(RichTextToolbarIcon, { icon: "link" })
|
|
22894
22901
|
}
|
|
22895
22902
|
) }) : null,
|
|
22896
|
-
visibleLists.size > 0 ? /* @__PURE__ */ jsxs87(
|
|
22903
|
+
visibleLists.size > 0 ? /* @__PURE__ */ jsxs87(Fragment21, { children: [
|
|
22897
22904
|
visibleLists.has("unorderedList") ? /* @__PURE__ */ jsx132(Tooltip, { title: "Bullet List", placement: "top", children: /* @__PURE__ */ jsx132(
|
|
22898
22905
|
"button",
|
|
22899
22906
|
{
|
|
@@ -22988,7 +22995,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
22988
22995
|
var RichTextToolbar_default = RichTextToolbar;
|
|
22989
22996
|
|
|
22990
22997
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
22991
|
-
import { Fragment as
|
|
22998
|
+
import { Fragment as Fragment22, jsx as jsx133, jsxs as jsxs88 } from "@emotion/react/jsx-runtime";
|
|
22992
22999
|
var ParameterRichText = ({
|
|
22993
23000
|
label,
|
|
22994
23001
|
labelLeadingIcon,
|
|
@@ -23053,7 +23060,7 @@ var ParameterRichText = ({
|
|
|
23053
23060
|
children
|
|
23054
23061
|
}
|
|
23055
23062
|
),
|
|
23056
|
-
menuItems ? /* @__PURE__ */ jsx133(ParameterMenuButton, { label: `${label} menu`, children: /* @__PURE__ */ jsx133(
|
|
23063
|
+
menuItems ? /* @__PURE__ */ jsx133(ParameterMenuButton, { label: `${label} menu`, children: /* @__PURE__ */ jsx133(Fragment22, { children: menuItems }) }) : null
|
|
23057
23064
|
]
|
|
23058
23065
|
}
|
|
23059
23066
|
);
|
|
@@ -23214,7 +23221,7 @@ var ParameterRichTextInner = ({
|
|
|
23214
23221
|
},
|
|
23215
23222
|
editable: !readOnly
|
|
23216
23223
|
};
|
|
23217
|
-
return /* @__PURE__ */ jsxs88(
|
|
23224
|
+
return /* @__PURE__ */ jsxs88(Fragment22, { children: [
|
|
23218
23225
|
/* @__PURE__ */ jsx133("div", { css: [editorWrapper], className: editorWrapperClassName, children: /* @__PURE__ */ jsx133(LexicalComposer, { initialConfig: lexicalConfig, children: /* @__PURE__ */ jsx133(
|
|
23219
23226
|
RichText,
|
|
23220
23227
|
{
|
|
@@ -23293,7 +23300,7 @@ var RichText = ({
|
|
|
23293
23300
|
setPortalContainerRef(_portalContainerRef);
|
|
23294
23301
|
}
|
|
23295
23302
|
};
|
|
23296
|
-
return /* @__PURE__ */ jsxs88(
|
|
23303
|
+
return /* @__PURE__ */ jsxs88(Fragment22, { children: [
|
|
23297
23304
|
readOnly || minimalInteractivity ? null : /* @__PURE__ */ jsx133(
|
|
23298
23305
|
RichTextToolbar_default,
|
|
23299
23306
|
{
|
|
@@ -23337,7 +23344,7 @@ var RichText = ({
|
|
|
23337
23344
|
]
|
|
23338
23345
|
}
|
|
23339
23346
|
),
|
|
23340
|
-
/* @__PURE__ */ jsx133(
|
|
23347
|
+
/* @__PURE__ */ jsx133(Fragment22, { children }),
|
|
23341
23348
|
editorContainerRef ? /* @__PURE__ */ jsx133(
|
|
23342
23349
|
LinkNodePlugin,
|
|
23343
23350
|
{
|
|
@@ -24061,14 +24068,14 @@ var SwitchText = (size) => css107`
|
|
|
24061
24068
|
`;
|
|
24062
24069
|
|
|
24063
24070
|
// src/components/Switch/Switch.tsx
|
|
24064
|
-
import { Fragment as
|
|
24071
|
+
import { Fragment as Fragment23, jsx as jsx141, jsxs as jsxs93 } from "@emotion/react/jsx-runtime";
|
|
24065
24072
|
var Switch = forwardRef27(
|
|
24066
24073
|
({ label, infoText, toggleText, children, switchSize = "base", ...inputProps }, ref) => {
|
|
24067
24074
|
let additionalText = infoText;
|
|
24068
24075
|
if (infoText && toggleText) {
|
|
24069
24076
|
additionalText = inputProps.checked ? toggleText : infoText;
|
|
24070
24077
|
}
|
|
24071
|
-
return /* @__PURE__ */ jsxs93(
|
|
24078
|
+
return /* @__PURE__ */ jsxs93(Fragment23, { children: [
|
|
24072
24079
|
/* @__PURE__ */ jsxs93(
|
|
24073
24080
|
"label",
|
|
24074
24081
|
{
|
package/dist/index.d.mts
CHANGED
|
@@ -20213,7 +20213,13 @@ declare const AnimationFile: ({ label, loop, autoplay, width, height, ...props }
|
|
|
20213
20213
|
|
|
20214
20214
|
type AvatarSizeProp = '2xs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
20215
20215
|
type AvatarProps = {
|
|
20216
|
+
/**
|
|
20217
|
+
* The src of the avatar.
|
|
20218
|
+
* When this is undefined, the label will not be rendered,
|
|
20219
|
+
* and a generic user icon will be shown (unless children are provided).
|
|
20220
|
+
*/
|
|
20216
20221
|
src?: string;
|
|
20222
|
+
/** Renders a tooltip over the avatar. Not used if there is no `src` */
|
|
20217
20223
|
label?: string;
|
|
20218
20224
|
size?: AvatarSizeProp;
|
|
20219
20225
|
/**
|
|
@@ -20228,10 +20234,12 @@ type AvatarProps = {
|
|
|
20228
20234
|
*/
|
|
20229
20235
|
declare const Avatar: ({ src, label, children, size, as, ...props }: AvatarProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
20230
20236
|
|
|
20231
|
-
|
|
20237
|
+
interface AvatarGroupProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
20232
20238
|
/**
|
|
20233
|
-
* The maximum number of avatars to show.
|
|
20239
|
+
* The maximum number of avatars to show. This must be 2 or more.
|
|
20234
20240
|
* If this value is smaller than the number of children, the other avatars will be truncated and shows as "+N"
|
|
20241
|
+
* Note that when truncation occurs, the truncation "+N" avatar _counts as one_ towards the max.
|
|
20242
|
+
* For example with avatars A B C D, and max 3, the rendered avatars will be (A) (B) (+2).
|
|
20235
20243
|
* @default 5
|
|
20236
20244
|
* */
|
|
20237
20245
|
max?: number;
|
|
@@ -20240,7 +20248,11 @@ type AvatarGroupProps = {
|
|
|
20240
20248
|
* @default (n) => `and ${n} others`
|
|
20241
20249
|
* */
|
|
20242
20250
|
getTruncatedLabel?: (numberOfTruncatedItems: number) => string;
|
|
20243
|
-
|
|
20251
|
+
/**
|
|
20252
|
+
* The children to render. This component works best when the <Avatar> component are direct children.
|
|
20253
|
+
* **/
|
|
20254
|
+
children: React.ReactNode;
|
|
20255
|
+
}
|
|
20244
20256
|
/**
|
|
20245
20257
|
* @description Renders avatars in a group with the ability to truncate the list. This component works best when the <Avatar> component are direct children.
|
|
20246
20258
|
* @example <AvatarGroup max={2}><Avatar>AB</Avatar><Avatar>CD</Avatar><Avatar>EF</Avatar><AvatarGroup>
|
package/dist/index.d.ts
CHANGED
|
@@ -20213,7 +20213,13 @@ declare const AnimationFile: ({ label, loop, autoplay, width, height, ...props }
|
|
|
20213
20213
|
|
|
20214
20214
|
type AvatarSizeProp = '2xs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
20215
20215
|
type AvatarProps = {
|
|
20216
|
+
/**
|
|
20217
|
+
* The src of the avatar.
|
|
20218
|
+
* When this is undefined, the label will not be rendered,
|
|
20219
|
+
* and a generic user icon will be shown (unless children are provided).
|
|
20220
|
+
*/
|
|
20216
20221
|
src?: string;
|
|
20222
|
+
/** Renders a tooltip over the avatar. Not used if there is no `src` */
|
|
20217
20223
|
label?: string;
|
|
20218
20224
|
size?: AvatarSizeProp;
|
|
20219
20225
|
/**
|
|
@@ -20228,10 +20234,12 @@ type AvatarProps = {
|
|
|
20228
20234
|
*/
|
|
20229
20235
|
declare const Avatar: ({ src, label, children, size, as, ...props }: AvatarProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
20230
20236
|
|
|
20231
|
-
|
|
20237
|
+
interface AvatarGroupProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
20232
20238
|
/**
|
|
20233
|
-
* The maximum number of avatars to show.
|
|
20239
|
+
* The maximum number of avatars to show. This must be 2 or more.
|
|
20234
20240
|
* If this value is smaller than the number of children, the other avatars will be truncated and shows as "+N"
|
|
20241
|
+
* Note that when truncation occurs, the truncation "+N" avatar _counts as one_ towards the max.
|
|
20242
|
+
* For example with avatars A B C D, and max 3, the rendered avatars will be (A) (B) (+2).
|
|
20235
20243
|
* @default 5
|
|
20236
20244
|
* */
|
|
20237
20245
|
max?: number;
|
|
@@ -20240,7 +20248,11 @@ type AvatarGroupProps = {
|
|
|
20240
20248
|
* @default (n) => `and ${n} others`
|
|
20241
20249
|
* */
|
|
20242
20250
|
getTruncatedLabel?: (numberOfTruncatedItems: number) => string;
|
|
20243
|
-
|
|
20251
|
+
/**
|
|
20252
|
+
* The children to render. This component works best when the <Avatar> component are direct children.
|
|
20253
|
+
* **/
|
|
20254
|
+
children: React.ReactNode;
|
|
20255
|
+
}
|
|
20244
20256
|
/**
|
|
20245
20257
|
* @description Renders avatars in a group with the ability to truncate the list. This component works best when the <Avatar> component are direct children.
|
|
20246
20258
|
* @example <AvatarGroup max={2}><Avatar>AB</Avatar><Avatar>CD</Avatar><Avatar>EF</Avatar><AvatarGroup>
|
package/dist/index.js
CHANGED
|
@@ -13485,6 +13485,7 @@ var AnimationFile = ({
|
|
|
13485
13485
|
|
|
13486
13486
|
// src/components/Avatar/Avatar.tsx
|
|
13487
13487
|
init_emotion_jsx_shim();
|
|
13488
|
+
var import_CgProfile2 = require("@react-icons/all-files/cg/CgProfile");
|
|
13488
13489
|
|
|
13489
13490
|
// src/components/Avatar/Avatar.styles.ts
|
|
13490
13491
|
init_emotion_jsx_shim();
|
|
@@ -13543,10 +13544,11 @@ var avatarSizeStylesMap = {
|
|
|
13543
13544
|
};
|
|
13544
13545
|
var Avatar = ({ src, label = "", children, size = "md", as = "div", ...props }) => {
|
|
13545
13546
|
const Element = as;
|
|
13546
|
-
|
|
13547
|
-
|
|
13547
|
+
const body = /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_jsx_runtime19.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Element, { css: [avatarStyles, avatarSizeStylesMap[size]], ...props, children: [
|
|
13548
|
+
src ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("img", { role: "presentation", src, css: avatarImageStyles }) : children ? null : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_CgProfile2.CgProfile, { css: avatarImageStyles }),
|
|
13548
13549
|
children
|
|
13549
13550
|
] }) });
|
|
13551
|
+
return src || children ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Tooltip, { title: label, children: body }) : body;
|
|
13550
13552
|
};
|
|
13551
13553
|
|
|
13552
13554
|
// src/components/Avatar/AvatarGroup.tsx
|
|
@@ -13584,10 +13586,13 @@ var AvatarGroup = ({
|
|
|
13584
13586
|
getTruncatedLabel = defaultGetTruncatedLabel,
|
|
13585
13587
|
...props
|
|
13586
13588
|
}) => {
|
|
13589
|
+
if (max < 2) {
|
|
13590
|
+
throw new Error("max must be 2 or more");
|
|
13591
|
+
}
|
|
13587
13592
|
const numberOfChildren = children.length;
|
|
13588
|
-
const
|
|
13589
|
-
const
|
|
13590
|
-
const
|
|
13593
|
+
const numberOfTruncatedItems = numberOfChildren <= max ? 0 : numberOfChildren - max + 1;
|
|
13594
|
+
const numberOfItemsToRender = numberOfTruncatedItems ? Math.min(numberOfChildren, max - 1) : void 0;
|
|
13595
|
+
const childrenToRender = children.slice(0, numberOfItemsToRender);
|
|
13591
13596
|
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
13592
13597
|
"div",
|
|
13593
13598
|
{
|
|
@@ -13597,7 +13602,7 @@ var AvatarGroup = ({
|
|
|
13597
13602
|
],
|
|
13598
13603
|
...props,
|
|
13599
13604
|
children: [
|
|
13600
|
-
|
|
13605
|
+
childrenToRender,
|
|
13601
13606
|
!numberOfTruncatedItems ? null : /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Avatar, { label: getTruncatedLabel(numberOfTruncatedItems), style: { display: "flex" }, children: [
|
|
13602
13607
|
"+",
|
|
13603
13608
|
numberOfTruncatedItems
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/design-system",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.208.0",
|
|
4
4
|
"description": "Uniform design system components",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"@storybook/theming": "^8.3.3",
|
|
27
27
|
"@types/react": "18.3.11",
|
|
28
28
|
"@types/react-dom": "18.3.1",
|
|
29
|
-
"@uniformdev/canvas": "^19.
|
|
30
|
-
"@uniformdev/richtext": "^19.
|
|
29
|
+
"@uniformdev/canvas": "^19.208.0",
|
|
30
|
+
"@uniformdev/richtext": "^19.208.0",
|
|
31
31
|
"autoprefixer": "10.4.16",
|
|
32
32
|
"hygen": "6.2.11",
|
|
33
33
|
"postcss": "8.4.47",
|
|
@@ -79,5 +79,5 @@
|
|
|
79
79
|
"publishConfig": {
|
|
80
80
|
"access": "public"
|
|
81
81
|
},
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "9b96344a84cc37c1c54f9164b89ca7697611a2c0"
|
|
83
83
|
}
|