@uniformdev/design-system 19.75.0 → 19.75.1-alpha.30
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 +187 -110
- package/dist/index.d.mts +30 -5
- package/dist/index.d.ts +30 -5
- package/dist/index.js +142 -65
- package/package.json +4 -4
package/dist/esm/index.js
CHANGED
|
@@ -27,7 +27,7 @@ var Theme = ({ disableReset = false, disableGlobalReset = false }) => {
|
|
|
27
27
|
{
|
|
28
28
|
dangerouslySetInnerHTML: {
|
|
29
29
|
__html: `
|
|
30
|
-
:root, :host {
|
|
30
|
+
:root, :host, ::backdrop {
|
|
31
31
|
--brand-primary-1: #438fd5; /* bright blue */
|
|
32
32
|
--brand-primary-2: #f4220b; /* red */
|
|
33
33
|
--brand-primary-3: #83c6e1; /* slate blue */
|
|
@@ -13093,6 +13093,13 @@ var detailsContent = css41`
|
|
|
13093
13093
|
animation: ${fadeInRtl} var(--duration-fast) var(--timing-ease-out) forwards;
|
|
13094
13094
|
will-change: height;
|
|
13095
13095
|
`;
|
|
13096
|
+
var detailsContentIndented = css41`
|
|
13097
|
+
margin-left: calc(1.25rem / 2);
|
|
13098
|
+
border-left: 1px solid var(--gray-300);
|
|
13099
|
+
padding-top: calc(var(--spacing-md) / 2);
|
|
13100
|
+
padding-left: var(--spacing-base);
|
|
13101
|
+
padding-bottom: var(--spacing-sm);
|
|
13102
|
+
`;
|
|
13096
13103
|
var summary = css41`
|
|
13097
13104
|
align-items: center;
|
|
13098
13105
|
cursor: pointer;
|
|
@@ -13107,6 +13114,9 @@ var summary = css41`
|
|
|
13107
13114
|
display: none;
|
|
13108
13115
|
}
|
|
13109
13116
|
`;
|
|
13117
|
+
var summaryCompact = css41`
|
|
13118
|
+
padding: 0;
|
|
13119
|
+
`;
|
|
13110
13120
|
var summaryIcon = css41`
|
|
13111
13121
|
transition: rotate var(--duration-fast) var(--timing-ease-out);
|
|
13112
13122
|
rotate: -90deg;
|
|
@@ -13122,6 +13132,8 @@ var Details = ({
|
|
|
13122
13132
|
children,
|
|
13123
13133
|
isOpenByDefault = false,
|
|
13124
13134
|
isOpen,
|
|
13135
|
+
isIndented = false,
|
|
13136
|
+
isCompact = false,
|
|
13125
13137
|
onChange,
|
|
13126
13138
|
...props
|
|
13127
13139
|
}) => {
|
|
@@ -13143,7 +13155,7 @@ var Details = ({
|
|
|
13143
13155
|
ref: detailsRef,
|
|
13144
13156
|
...props,
|
|
13145
13157
|
children: [
|
|
13146
|
-
/* @__PURE__ */ jsxs25("summary", { "data-testid": "summary", css: summary, children: [
|
|
13158
|
+
/* @__PURE__ */ jsxs25("summary", { "data-testid": "summary", css: [summary, isCompact ? summaryCompact : null], children: [
|
|
13147
13159
|
/* @__PURE__ */ jsx42(
|
|
13148
13160
|
Icon,
|
|
13149
13161
|
{
|
|
@@ -13155,7 +13167,14 @@ var Details = ({
|
|
|
13155
13167
|
),
|
|
13156
13168
|
summary2
|
|
13157
13169
|
] }),
|
|
13158
|
-
memoizedIsOpen ? /* @__PURE__ */ jsx42(
|
|
13170
|
+
memoizedIsOpen ? /* @__PURE__ */ jsx42(
|
|
13171
|
+
"div",
|
|
13172
|
+
{
|
|
13173
|
+
"data-testid": "details-content",
|
|
13174
|
+
css: [detailsContent, isIndented ? detailsContentIndented : null],
|
|
13175
|
+
children
|
|
13176
|
+
}
|
|
13177
|
+
) : null
|
|
13159
13178
|
]
|
|
13160
13179
|
}
|
|
13161
13180
|
);
|
|
@@ -13410,10 +13429,12 @@ var useCurrentDrawer = () => {
|
|
|
13410
13429
|
};
|
|
13411
13430
|
var Drawer = React13.forwardRef(
|
|
13412
13431
|
({ minWidth, maxWidth, position, leftAligned, ...drawerProps }, ref) => {
|
|
13432
|
+
var _a;
|
|
13413
13433
|
const { stackId: inheritedStackId } = useCurrentDrawer();
|
|
13414
13434
|
const { drawerTakeoverStackId } = useDrawer();
|
|
13415
13435
|
const drawerRendererProps = { width: drawerProps.width, minWidth, maxWidth, position, leftAligned };
|
|
13416
|
-
|
|
13436
|
+
const resolvedStickyStackIdRef = useRef3((_a = drawerTakeoverStackId != null ? drawerTakeoverStackId : drawerProps.stackId) != null ? _a : inheritedStackId);
|
|
13437
|
+
return resolvedStickyStackIdRef.current ? /* @__PURE__ */ jsx44(DrawerInner, { ref, ...drawerProps, stackId: resolvedStickyStackIdRef.current }) : /* @__PURE__ */ jsxs26(DrawerProvider, { children: [
|
|
13417
13438
|
/* @__PURE__ */ jsx44(DrawerInner, { ref, ...drawerProps }),
|
|
13418
13439
|
/* @__PURE__ */ jsx44(DrawerRenderer, { stackId: defaultSackId, ...drawerRendererProps })
|
|
13419
13440
|
] });
|
|
@@ -13825,19 +13846,29 @@ import { MdWarning } from "@react-icons/all-files/md/MdWarning";
|
|
|
13825
13846
|
|
|
13826
13847
|
// src/components/Input/styles/ErrorMessage.styles.ts
|
|
13827
13848
|
import { css as css47 } from "@emotion/react";
|
|
13828
|
-
var
|
|
13849
|
+
var errorMessageStyles = css47`
|
|
13829
13850
|
align-items: center;
|
|
13830
13851
|
color: var(--brand-secondary-5);
|
|
13831
13852
|
display: flex;
|
|
13832
13853
|
gap: var(--spacing-sm);
|
|
13833
13854
|
`;
|
|
13855
|
+
var errorMessageTextStyles = css47`
|
|
13856
|
+
/* We hide the text at width 5rem or below */
|
|
13857
|
+
max-width: max(0px, calc((100% - 5rem) * 9999));
|
|
13858
|
+
overflow: hidden;
|
|
13859
|
+
`;
|
|
13860
|
+
var errorMessageTextTruncatedStyles = css47`
|
|
13861
|
+
overflow: hidden;
|
|
13862
|
+
text-overflow: ellipsis;
|
|
13863
|
+
white-space: nowrap;
|
|
13864
|
+
`;
|
|
13834
13865
|
|
|
13835
13866
|
// src/components/Input/ErrorMessage.tsx
|
|
13836
13867
|
import { jsx as jsx51, jsxs as jsxs30 } from "@emotion/react/jsx-runtime";
|
|
13837
|
-
var ErrorMessage = ({ message, testId, ...otherProps }) => {
|
|
13838
|
-
return message ? /* @__PURE__ */ jsxs30("span", { role: "alert", css:
|
|
13868
|
+
var ErrorMessage = ({ message, testId, truncated = false, ...otherProps }) => {
|
|
13869
|
+
return message ? /* @__PURE__ */ jsxs30("span", { role: "alert", css: errorMessageStyles, "data-testid": testId, ...otherProps, title: message, children: [
|
|
13839
13870
|
/* @__PURE__ */ jsx51("span", { children: /* @__PURE__ */ jsx51(Icon, { icon: MdWarning, size: "1rem", iconColor: "currentColor" }) }),
|
|
13840
|
-
message
|
|
13871
|
+
/* @__PURE__ */ jsx51("span", { css: [errorMessageTextStyles, truncated ? errorMessageTextTruncatedStyles : null], children: message })
|
|
13841
13872
|
] }) : null;
|
|
13842
13873
|
};
|
|
13843
13874
|
|
|
@@ -14571,6 +14602,15 @@ var imgLoaded = css54`
|
|
|
14571
14602
|
var brokenImage = css54`
|
|
14572
14603
|
height: 160px;
|
|
14573
14604
|
`;
|
|
14605
|
+
var brokenImageMessage = css54`
|
|
14606
|
+
position: absolute;
|
|
14607
|
+
bottom: var(--spacing-xs);
|
|
14608
|
+
left: var(--spacing-xs);
|
|
14609
|
+
width: 100%;
|
|
14610
|
+
justify-content: center;
|
|
14611
|
+
padding-inline: var(--spacing-xs);
|
|
14612
|
+
font-size: var(--fs-sm);
|
|
14613
|
+
`;
|
|
14574
14614
|
var variantFillImageWrapper = css54`
|
|
14575
14615
|
display: flex;
|
|
14576
14616
|
justify-content: center;
|
|
@@ -14579,6 +14619,7 @@ var variantFillImageWrapper = css54`
|
|
|
14579
14619
|
`;
|
|
14580
14620
|
var variantFillImageImg = css54`
|
|
14581
14621
|
height: inherit;
|
|
14622
|
+
width: inherit;
|
|
14582
14623
|
`;
|
|
14583
14624
|
|
|
14584
14625
|
// src/components/Image/ImageBroken.tsx
|
|
@@ -14617,7 +14658,7 @@ var ImageBroken = ({ width, height, ...props }) => {
|
|
|
14617
14658
|
};
|
|
14618
14659
|
|
|
14619
14660
|
// src/components/Image/Image.tsx
|
|
14620
|
-
import {
|
|
14661
|
+
import { jsx as jsx66, jsxs as jsxs41 } from "@emotion/react/jsx-runtime";
|
|
14621
14662
|
var MIN_LOADING_MS = 100;
|
|
14622
14663
|
function Image({
|
|
14623
14664
|
alt,
|
|
@@ -14696,18 +14737,26 @@ function Image({
|
|
|
14696
14737
|
onError: handleErrorEvent
|
|
14697
14738
|
}
|
|
14698
14739
|
) : null,
|
|
14699
|
-
src && loadErrorText ? /* @__PURE__ */ jsxs41(
|
|
14700
|
-
|
|
14701
|
-
|
|
14702
|
-
{
|
|
14703
|
-
|
|
14704
|
-
|
|
14705
|
-
height
|
|
14706
|
-
|
|
14707
|
-
|
|
14708
|
-
|
|
14709
|
-
|
|
14710
|
-
|
|
14740
|
+
src && loadErrorText ? /* @__PURE__ */ jsxs41(
|
|
14741
|
+
"span",
|
|
14742
|
+
{
|
|
14743
|
+
style: {
|
|
14744
|
+
display: "inline-flex",
|
|
14745
|
+
position: "relative",
|
|
14746
|
+
...variant === "fill-container" ? {} : { width, height }
|
|
14747
|
+
},
|
|
14748
|
+
children: [
|
|
14749
|
+
/* @__PURE__ */ jsx66(
|
|
14750
|
+
ImageBroken,
|
|
14751
|
+
{
|
|
14752
|
+
css: [brokenImage, img, imgLoaded],
|
|
14753
|
+
"data-testid": "broken-image"
|
|
14754
|
+
}
|
|
14755
|
+
),
|
|
14756
|
+
/* @__PURE__ */ jsx66(ErrorMessage, { message: loadErrorText, css: brokenImageMessage, truncated: true })
|
|
14757
|
+
]
|
|
14758
|
+
}
|
|
14759
|
+
) : null
|
|
14711
14760
|
]
|
|
14712
14761
|
}
|
|
14713
14762
|
);
|
|
@@ -15087,10 +15136,10 @@ var IntegrationLoadingFrame = css58`
|
|
|
15087
15136
|
`;
|
|
15088
15137
|
|
|
15089
15138
|
// src/components/Tiles/IntegrationLoadingTile.tsx
|
|
15090
|
-
import { Fragment as
|
|
15139
|
+
import { Fragment as Fragment10, jsx as jsx72, jsxs as jsxs46 } from "@emotion/react/jsx-runtime";
|
|
15091
15140
|
var IntegrationLoadingTile = ({ count = 1 }) => {
|
|
15092
15141
|
const componentCount = Array.from(Array(count).keys());
|
|
15093
|
-
return /* @__PURE__ */ jsx72(
|
|
15142
|
+
return /* @__PURE__ */ jsx72(Fragment10, { children: componentCount.map((i) => /* @__PURE__ */ jsxs46("div", { css: IntegrationLoadingTileContainer, children: [
|
|
15094
15143
|
/* @__PURE__ */ jsx72("div", { css: [IntegrationLoadingTileImg, IntegrationLoadingFrame], role: "presentation" }),
|
|
15095
15144
|
/* @__PURE__ */ jsx72("div", { css: [IntegrationLoadingTileText, IntegrationLoadingFrame] })
|
|
15096
15145
|
] }, i)) });
|
|
@@ -15332,7 +15381,7 @@ var IntegrationModalHeaderContentWrapper = css63`
|
|
|
15332
15381
|
`;
|
|
15333
15382
|
|
|
15334
15383
|
// src/components/IntegrationModalHeader/IntegrationModalHeader.tsx
|
|
15335
|
-
import { Fragment as
|
|
15384
|
+
import { Fragment as Fragment11, jsx as jsx78, jsxs as jsxs49 } from "@emotion/react/jsx-runtime";
|
|
15336
15385
|
var HexModalBackground = ({ ...props }) => {
|
|
15337
15386
|
return /* @__PURE__ */ jsxs49(
|
|
15338
15387
|
"svg",
|
|
@@ -15373,7 +15422,7 @@ var HexModalBackground = ({ ...props }) => {
|
|
|
15373
15422
|
);
|
|
15374
15423
|
};
|
|
15375
15424
|
var IntegrationModalHeader = ({ icon, name, menu, children }) => {
|
|
15376
|
-
return /* @__PURE__ */ jsxs49(
|
|
15425
|
+
return /* @__PURE__ */ jsxs49(Fragment11, { children: [
|
|
15377
15426
|
/* @__PURE__ */ jsx78(HexModalBackground, { css: IntegrationModalHeaderSVGBackground, role: "presentation" }),
|
|
15378
15427
|
/* @__PURE__ */ jsx78("div", { css: IntegrationModalHeaderGroup, children: /* @__PURE__ */ jsxs49("div", { css: IntegrationModalHeaderTitleGroup, children: [
|
|
15379
15428
|
icon ? /* @__PURE__ */ jsx78(IntegrationModalIcon, { icon, name: name || "" }) : null,
|
|
@@ -15959,7 +16008,7 @@ var Popover = css71`
|
|
|
15959
16008
|
`;
|
|
15960
16009
|
|
|
15961
16010
|
// src/components/Popover/Popover.tsx
|
|
15962
|
-
import { Fragment as
|
|
16011
|
+
import { Fragment as Fragment12, jsx as jsx87, jsxs as jsxs57 } from "@emotion/react/jsx-runtime";
|
|
15963
16012
|
var Popover2 = ({
|
|
15964
16013
|
iconColor = "action",
|
|
15965
16014
|
icon = "info",
|
|
@@ -15973,7 +16022,7 @@ var Popover2 = ({
|
|
|
15973
16022
|
...otherProps
|
|
15974
16023
|
}) => {
|
|
15975
16024
|
const popover = usePopoverState({ placement });
|
|
15976
|
-
return /* @__PURE__ */ jsxs57(
|
|
16025
|
+
return /* @__PURE__ */ jsxs57(Fragment12, { children: [
|
|
15977
16026
|
/* @__PURE__ */ jsx87(
|
|
15978
16027
|
PopoverDisclosure,
|
|
15979
16028
|
{
|
|
@@ -15981,7 +16030,7 @@ var Popover2 = ({
|
|
|
15981
16030
|
css: [PopoverBtn, trigger ? void 0 : PopoverDefaulterTriggerBtn],
|
|
15982
16031
|
title: buttonText,
|
|
15983
16032
|
"data-testid": testId,
|
|
15984
|
-
children: trigger ? trigger : /* @__PURE__ */ jsxs57(
|
|
16033
|
+
children: trigger ? trigger : /* @__PURE__ */ jsxs57(Fragment12, { children: [
|
|
15985
16034
|
/* @__PURE__ */ jsx87(Icon, { icon, iconColor, size: iconSize }),
|
|
15986
16035
|
/* @__PURE__ */ jsx87("span", { hidden: true, children: buttonText })
|
|
15987
16036
|
] })
|
|
@@ -16004,9 +16053,11 @@ var cardBase = css72`
|
|
|
16004
16053
|
min-height: unset;
|
|
16005
16054
|
outline: none;
|
|
16006
16055
|
cursor: pointer;
|
|
16056
|
+
transition: border-color var(--duration-xfast) ease-in-out;
|
|
16007
16057
|
|
|
16008
16058
|
&:hover {
|
|
16009
16059
|
--mediacard-title-color: var(--brand-secondary-1);
|
|
16060
|
+
border-color: var(--primary-action-hover);
|
|
16010
16061
|
}
|
|
16011
16062
|
`;
|
|
16012
16063
|
var coverWrapper = css72`
|
|
@@ -16128,7 +16179,7 @@ var MediaCard = ({
|
|
|
16128
16179
|
|
|
16129
16180
|
// src/components/Modal/Modal.tsx
|
|
16130
16181
|
import { CgClose as CgClose5 } from "@react-icons/all-files/cg/CgClose";
|
|
16131
|
-
import React19 from "react";
|
|
16182
|
+
import React19, { useEffect as useEffect10, useRef as useRef6 } from "react";
|
|
16132
16183
|
|
|
16133
16184
|
// src/components/Modal/Modal.styles.ts
|
|
16134
16185
|
import { css as css73 } from "@emotion/react";
|
|
@@ -16140,26 +16191,32 @@ var modalWrapperStyles = css73`
|
|
|
16140
16191
|
justify-content: center;
|
|
16141
16192
|
z-index: var(--z-drawer);
|
|
16142
16193
|
`;
|
|
16143
|
-
var modalBackdropStyles = css73`
|
|
16144
|
-
position: absolute;
|
|
16145
|
-
inset: 0;
|
|
16146
|
-
background-color: var(--brand-secondary-1);
|
|
16147
|
-
opacity: 0.4;
|
|
16148
|
-
`;
|
|
16149
16194
|
var modalStyles = css73`
|
|
16150
16195
|
position: relative;
|
|
16196
|
+
max-width: calc(100% - var(--spacing-base) * 2);
|
|
16197
|
+
max-height: calc(100% - var(--spacing-base) * 2);
|
|
16198
|
+
padding: 0;
|
|
16199
|
+
background-color: transparent;
|
|
16200
|
+
z-index: 1;
|
|
16201
|
+
|
|
16202
|
+
&::backdrop {
|
|
16203
|
+
background-color: var(--brand-secondary-1);
|
|
16204
|
+
opacity: 0.4;
|
|
16205
|
+
}
|
|
16206
|
+
`;
|
|
16207
|
+
var modalInnerStyles = css73`
|
|
16208
|
+
position: relative;
|
|
16209
|
+
width: 100%;
|
|
16210
|
+
height: 100%;
|
|
16151
16211
|
display: flex;
|
|
16152
16212
|
flex-direction: column;
|
|
16153
16213
|
justify-content: stretch;
|
|
16154
|
-
max-width: calc(100% - var(--spacing-base) * 2);
|
|
16155
|
-
max-height: calc(100% - var(--spacing-base) * 2);
|
|
16156
16214
|
gap: var(--spacing-base);
|
|
16157
16215
|
background: var(--gray-50);
|
|
16216
|
+
color: unset;
|
|
16217
|
+
padding: var(--spacing-base);
|
|
16158
16218
|
border-radius: var(--rounded-base);
|
|
16159
16219
|
border: 1px solid var(--gray-300);
|
|
16160
|
-
padding: var(--spacing-base);
|
|
16161
|
-
color: unset;
|
|
16162
|
-
z-index: 1;
|
|
16163
16220
|
`;
|
|
16164
16221
|
var modalHeaderStyles = css73`
|
|
16165
16222
|
display: flex;
|
|
@@ -16168,6 +16225,9 @@ var modalHeaderStyles = css73`
|
|
|
16168
16225
|
font-size: var(--fs-md);
|
|
16169
16226
|
line-height: 1.2;
|
|
16170
16227
|
`;
|
|
16228
|
+
var modalHeaderHeaderStyles = css73`
|
|
16229
|
+
max-width: calc(100% - 3rem);
|
|
16230
|
+
`;
|
|
16171
16231
|
var modalCloseButtonStyles = css73`
|
|
16172
16232
|
display: block;
|
|
16173
16233
|
padding: 0;
|
|
@@ -16195,47 +16255,63 @@ var Modal = React19.forwardRef(
|
|
|
16195
16255
|
onRequestClose,
|
|
16196
16256
|
width = defaultModalWidth,
|
|
16197
16257
|
height = defaultModalHeight,
|
|
16198
|
-
wrapperClassName,
|
|
16199
16258
|
withoutContentPadding = false,
|
|
16200
16259
|
buttonGroup,
|
|
16201
16260
|
...modalProps
|
|
16202
16261
|
}, ref) => {
|
|
16262
|
+
const dialogRef = useRef6(null);
|
|
16203
16263
|
useShortcut({
|
|
16204
16264
|
handler: onRequestClose,
|
|
16205
16265
|
shortcut: "escape"
|
|
16206
16266
|
});
|
|
16207
|
-
|
|
16208
|
-
|
|
16209
|
-
|
|
16210
|
-
|
|
16211
|
-
|
|
16212
|
-
|
|
16213
|
-
|
|
16214
|
-
|
|
16215
|
-
|
|
16216
|
-
|
|
16217
|
-
|
|
16218
|
-
|
|
16219
|
-
|
|
16220
|
-
|
|
16221
|
-
|
|
16222
|
-
|
|
16223
|
-
|
|
16224
|
-
|
|
16225
|
-
|
|
16226
|
-
|
|
16227
|
-
|
|
16228
|
-
|
|
16229
|
-
|
|
16230
|
-
|
|
16231
|
-
|
|
16232
|
-
|
|
16233
|
-
|
|
16234
|
-
|
|
16235
|
-
|
|
16236
|
-
|
|
16237
|
-
|
|
16238
|
-
|
|
16267
|
+
useEffect10(() => {
|
|
16268
|
+
var _a;
|
|
16269
|
+
(_a = dialogRef.current) == null ? void 0 : _a.showModal();
|
|
16270
|
+
return () => {
|
|
16271
|
+
var _a2;
|
|
16272
|
+
return (_a2 = dialogRef.current) == null ? void 0 : _a2.close();
|
|
16273
|
+
};
|
|
16274
|
+
}, []);
|
|
16275
|
+
return /* @__PURE__ */ jsx89(
|
|
16276
|
+
"dialog",
|
|
16277
|
+
{
|
|
16278
|
+
ref: (element) => {
|
|
16279
|
+
dialogRef.current = element;
|
|
16280
|
+
if (!ref) {
|
|
16281
|
+
return;
|
|
16282
|
+
}
|
|
16283
|
+
if (typeof ref === "function") {
|
|
16284
|
+
ref(element);
|
|
16285
|
+
} else {
|
|
16286
|
+
ref.current = element;
|
|
16287
|
+
}
|
|
16288
|
+
},
|
|
16289
|
+
css: modalStyles,
|
|
16290
|
+
style: { width, height: height === "auto" ? "min-content" : height },
|
|
16291
|
+
"data-testid": "side-dialog",
|
|
16292
|
+
onClick: onRequestClose,
|
|
16293
|
+
...modalProps,
|
|
16294
|
+
children: /* @__PURE__ */ jsxs59("div", { css: modalInnerStyles, onClick: (e) => e.stopPropagation(), children: [
|
|
16295
|
+
/* @__PURE__ */ jsxs59("div", { css: modalHeaderStyles, children: [
|
|
16296
|
+
/* @__PURE__ */ jsx89("div", { css: modalHeaderHeaderStyles, children: header }),
|
|
16297
|
+
/* @__PURE__ */ jsx89(
|
|
16298
|
+
Button,
|
|
16299
|
+
{
|
|
16300
|
+
type: "button",
|
|
16301
|
+
onClick: onRequestClose,
|
|
16302
|
+
css: modalCloseButtonStyles,
|
|
16303
|
+
title: "Close dialog",
|
|
16304
|
+
buttonType: "ghost",
|
|
16305
|
+
"data-testid": "close-dialog",
|
|
16306
|
+
children: /* @__PURE__ */ jsx89(Icon, { icon: CgClose5, iconColor: "gray", size: 24 })
|
|
16307
|
+
}
|
|
16308
|
+
)
|
|
16309
|
+
] }),
|
|
16310
|
+
/* @__PURE__ */ jsx89("div", { css: [modalContentStyles, !withoutContentPadding ? null : { padding: 0 }], children }),
|
|
16311
|
+
buttonGroup ? /* @__PURE__ */ jsx89(HorizontalRhythm, { children: buttonGroup }) : null
|
|
16312
|
+
] })
|
|
16313
|
+
}
|
|
16314
|
+
);
|
|
16239
16315
|
}
|
|
16240
16316
|
);
|
|
16241
16317
|
Modal.displayName = "Modal";
|
|
@@ -16800,7 +16876,7 @@ var previewModalImage = css79`
|
|
|
16800
16876
|
`;
|
|
16801
16877
|
|
|
16802
16878
|
// src/components/ParameterInputs/ParameterImagePreview.tsx
|
|
16803
|
-
import { Fragment as
|
|
16879
|
+
import { Fragment as Fragment13, jsx as jsx95, jsxs as jsxs64 } from "@emotion/react/jsx-runtime";
|
|
16804
16880
|
function ParameterImagePreview({ imageSrc }) {
|
|
16805
16881
|
const [showModal, setShowModal] = useState9(false);
|
|
16806
16882
|
return imageSrc ? /* @__PURE__ */ jsxs64("div", { css: previewWrapper, children: [
|
|
@@ -16818,7 +16894,7 @@ function ParameterImagePreview({ imageSrc }) {
|
|
|
16818
16894
|
] }) : null;
|
|
16819
16895
|
}
|
|
16820
16896
|
var PreviewImageModal = ({ open, onRequestClose, imageSrc }) => {
|
|
16821
|
-
return open ? /* @__PURE__ */ jsx95(
|
|
16897
|
+
return open ? /* @__PURE__ */ jsx95(Fragment13, { children: createPortal2(
|
|
16822
16898
|
/* @__PURE__ */ jsx95(
|
|
16823
16899
|
Modal,
|
|
16824
16900
|
{
|
|
@@ -16955,6 +17031,7 @@ var ParameterShell = ({
|
|
|
16955
17031
|
onResetOverriddenValue,
|
|
16956
17032
|
title: title2,
|
|
16957
17033
|
children,
|
|
17034
|
+
isParameterGroup = false,
|
|
16958
17035
|
...props
|
|
16959
17036
|
}) => {
|
|
16960
17037
|
const [manualErrorMessage, setManualErrorMessage] = useState10(void 0);
|
|
@@ -16998,7 +17075,7 @@ var ParameterShell = ({
|
|
|
16998
17075
|
errorMessage: errorMessaging,
|
|
16999
17076
|
handleManuallySetErrorMessage: (message) => setErrorMessage(message)
|
|
17000
17077
|
},
|
|
17001
|
-
children: /* @__PURE__ */ jsxs65(ParameterShellPlaceholder, { children: [
|
|
17078
|
+
children: isParameterGroup ? /* @__PURE__ */ jsx98("div", { style: { flexGrow: 1 }, children }) : /* @__PURE__ */ jsxs65(ParameterShellPlaceholder, { children: [
|
|
17002
17079
|
children,
|
|
17003
17080
|
hasOverriddenValue && onResetOverriddenValue ? /* @__PURE__ */ jsx98(ParameterOverrideMarker, { onClick: onResetOverriddenValue }) : null
|
|
17004
17081
|
] })
|
|
@@ -17017,7 +17094,7 @@ var ParameterShellPlaceholder = ({ children }) => {
|
|
|
17017
17094
|
var ParameterOverrideMarker = (props) => /* @__PURE__ */ jsx98(Tooltip, { title: "The default value has been overridden", children: /* @__PURE__ */ jsx98("button", { type: "button", css: overrideMarker, ...props, children: /* @__PURE__ */ jsx98("span", { hidden: true, children: "reset overridden value to default" }) }) });
|
|
17018
17095
|
|
|
17019
17096
|
// src/components/ParameterInputs/ParameterImage.tsx
|
|
17020
|
-
import { Fragment as
|
|
17097
|
+
import { Fragment as Fragment14, jsx as jsx99, jsxs as jsxs66 } from "@emotion/react/jsx-runtime";
|
|
17021
17098
|
var ParameterImage = forwardRef13(
|
|
17022
17099
|
({ children, ...props }, ref) => {
|
|
17023
17100
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
@@ -17031,7 +17108,7 @@ var ParameterImageInner = forwardRef13((props, ref) => {
|
|
|
17031
17108
|
const { value } = props;
|
|
17032
17109
|
const { id, label, hiddenLabel, errorMessage } = useParameterShell();
|
|
17033
17110
|
const deferredValue = useDeferredValue(value);
|
|
17034
|
-
return /* @__PURE__ */ jsxs66(
|
|
17111
|
+
return /* @__PURE__ */ jsxs66(Fragment14, { children: [
|
|
17035
17112
|
/* @__PURE__ */ jsx99(
|
|
17036
17113
|
"input",
|
|
17037
17114
|
{
|
|
@@ -17146,7 +17223,7 @@ var ParameterLinkInner = forwardRef15(
|
|
|
17146
17223
|
);
|
|
17147
17224
|
|
|
17148
17225
|
// src/components/ParameterInputs/ParameterNameAndPublicIdInput.tsx
|
|
17149
|
-
import { Fragment as
|
|
17226
|
+
import { Fragment as Fragment15, jsx as jsx102, jsxs as jsxs68 } from "@emotion/react/jsx-runtime";
|
|
17150
17227
|
var ParameterNameAndPublicIdInput = ({
|
|
17151
17228
|
id,
|
|
17152
17229
|
onBlur,
|
|
@@ -17172,7 +17249,7 @@ var ParameterNameAndPublicIdInput = ({
|
|
|
17172
17249
|
navigator.clipboard.writeText(values[publicIdFieldName]);
|
|
17173
17250
|
};
|
|
17174
17251
|
autoFocus == null ? void 0 : autoFocus();
|
|
17175
|
-
return /* @__PURE__ */ jsxs68(
|
|
17252
|
+
return /* @__PURE__ */ jsxs68(Fragment15, { children: [
|
|
17176
17253
|
/* @__PURE__ */ jsx102(
|
|
17177
17254
|
ParameterInput,
|
|
17178
17255
|
{
|
|
@@ -17337,7 +17414,7 @@ var getLabelForElement = (type) => {
|
|
|
17337
17414
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
17338
17415
|
import { deepEqual as deepEqual2 } from "fast-equals";
|
|
17339
17416
|
import { ParagraphNode as ParagraphNode2 } from "lexical";
|
|
17340
|
-
import { useEffect as
|
|
17417
|
+
import { useEffect as useEffect15, useRef as useRef8 } from "react";
|
|
17341
17418
|
|
|
17342
17419
|
// src/components/ParameterInputs/rich-text/CustomCodeNode.ts
|
|
17343
17420
|
import { CodeNode } from "@lexical/code";
|
|
@@ -17358,10 +17435,10 @@ CustomCodeNode.importDOM = function() {
|
|
|
17358
17435
|
import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
|
|
17359
17436
|
import { mergeRegister } from "@lexical/utils";
|
|
17360
17437
|
import { ParagraphNode } from "lexical";
|
|
17361
|
-
import { useEffect as
|
|
17438
|
+
import { useEffect as useEffect11 } from "react";
|
|
17362
17439
|
function DisableStylesPlugin() {
|
|
17363
17440
|
const [editor] = useLexicalComposerContext();
|
|
17364
|
-
|
|
17441
|
+
useEffect11(() => {
|
|
17365
17442
|
return mergeRegister(
|
|
17366
17443
|
// Disable text alignment on paragraph nodes
|
|
17367
17444
|
editor.registerNodeTransform(ParagraphNode, (node) => {
|
|
@@ -17570,7 +17647,7 @@ import {
|
|
|
17570
17647
|
ElementNode as ElementNode2,
|
|
17571
17648
|
FOCUS_COMMAND
|
|
17572
17649
|
} from "lexical";
|
|
17573
|
-
import { useCallback as useCallback5, useEffect as
|
|
17650
|
+
import { useCallback as useCallback5, useEffect as useEffect12, useRef as useRef7, useState as useState11 } from "react";
|
|
17574
17651
|
|
|
17575
17652
|
// src/components/ParameterInputs/rich-text/utils.ts
|
|
17576
17653
|
import { $isAtNodeEnd } from "@lexical/selection";
|
|
@@ -17608,7 +17685,7 @@ var getSelectedNode = (selection) => {
|
|
|
17608
17685
|
};
|
|
17609
17686
|
|
|
17610
17687
|
// src/components/ParameterInputs/rich-text/LinkNodePlugin.tsx
|
|
17611
|
-
import { Fragment as
|
|
17688
|
+
import { Fragment as Fragment16, jsx as jsx103, jsxs as jsxs69 } from "@emotion/react/jsx-runtime";
|
|
17612
17689
|
var isProjectMapLinkValue = (value) => {
|
|
17613
17690
|
return (value == null ? void 0 : value.type) === "projectMapNode" && Boolean(
|
|
17614
17691
|
value.nodeId && value.path && value.projectMapId
|
|
@@ -17914,16 +17991,16 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
17914
17991
|
};
|
|
17915
17992
|
const [editor] = useLexicalComposerContext2();
|
|
17916
17993
|
const [linkPopoverState, setLinkPopoverState] = useState11();
|
|
17917
|
-
const linkPopoverElRef =
|
|
17994
|
+
const linkPopoverElRef = useRef7(null);
|
|
17918
17995
|
const [isEditorFocused, setIsEditorFocused] = useState11(false);
|
|
17919
17996
|
const [isLinkPopoverFocused, setIsLinkPopoverFocused] = useState11(false);
|
|
17920
|
-
|
|
17997
|
+
useEffect12(() => {
|
|
17921
17998
|
if (!isEditorFocused && !isLinkPopoverFocused) {
|
|
17922
17999
|
setLinkPopoverState(void 0);
|
|
17923
18000
|
return;
|
|
17924
18001
|
}
|
|
17925
18002
|
}, [isEditorFocused, isLinkPopoverFocused]);
|
|
17926
|
-
|
|
18003
|
+
useEffect12(() => {
|
|
17927
18004
|
if (!editor.hasNodes([LinkNode])) {
|
|
17928
18005
|
throw new Error("LinkNode not registered on editor");
|
|
17929
18006
|
}
|
|
@@ -18024,7 +18101,7 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
18024
18101
|
}
|
|
18025
18102
|
});
|
|
18026
18103
|
}, [editor]);
|
|
18027
|
-
|
|
18104
|
+
useEffect12(() => {
|
|
18028
18105
|
return editor.registerUpdateListener(({ editorState }) => {
|
|
18029
18106
|
requestAnimationFrame(() => {
|
|
18030
18107
|
editorState.read(() => {
|
|
@@ -18051,7 +18128,7 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
18051
18128
|
});
|
|
18052
18129
|
});
|
|
18053
18130
|
};
|
|
18054
|
-
return /* @__PURE__ */ jsxs69(
|
|
18131
|
+
return /* @__PURE__ */ jsxs69(Fragment16, { children: [
|
|
18055
18132
|
/* @__PURE__ */ jsx103(
|
|
18056
18133
|
NodeEventPlugin,
|
|
18057
18134
|
{
|
|
@@ -18116,7 +18193,7 @@ import {
|
|
|
18116
18193
|
COMMAND_PRIORITY_CRITICAL,
|
|
18117
18194
|
INDENT_CONTENT_COMMAND
|
|
18118
18195
|
} from "lexical";
|
|
18119
|
-
import { useEffect as
|
|
18196
|
+
import { useEffect as useEffect13 } from "react";
|
|
18120
18197
|
import { jsx as jsx104 } from "@emotion/react/jsx-runtime";
|
|
18121
18198
|
function isIndentPermitted(maxDepth) {
|
|
18122
18199
|
const selection = $getSelection2();
|
|
@@ -18140,7 +18217,7 @@ function isIndentPermitted(maxDepth) {
|
|
|
18140
18217
|
}
|
|
18141
18218
|
function ListIndentPlugin({ maxDepth }) {
|
|
18142
18219
|
const [editor] = useLexicalComposerContext3();
|
|
18143
|
-
|
|
18220
|
+
useEffect13(() => {
|
|
18144
18221
|
return editor.registerCommand(
|
|
18145
18222
|
INDENT_CONTENT_COMMAND,
|
|
18146
18223
|
() => !isIndentPermitted(maxDepth),
|
|
@@ -18173,8 +18250,8 @@ import {
|
|
|
18173
18250
|
FORMAT_TEXT_COMMAND,
|
|
18174
18251
|
SELECTION_CHANGE_COMMAND
|
|
18175
18252
|
} from "lexical";
|
|
18176
|
-
import { useCallback as useCallback6, useEffect as
|
|
18177
|
-
import { Fragment as
|
|
18253
|
+
import { useCallback as useCallback6, useEffect as useEffect14, useMemo as useMemo3, useState as useState12 } from "react";
|
|
18254
|
+
import { Fragment as Fragment17, jsx as jsx105, jsxs as jsxs70 } from "@emotion/react/jsx-runtime";
|
|
18178
18255
|
var toolbar = css84`
|
|
18179
18256
|
background: var(--gray-50);
|
|
18180
18257
|
border-radius: var(--rounded-base);
|
|
@@ -18316,7 +18393,7 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
18316
18393
|
setIsLink(false);
|
|
18317
18394
|
}
|
|
18318
18395
|
}, [editor, setActiveElement, setActiveFormats, setIsLink]);
|
|
18319
|
-
|
|
18396
|
+
useEffect14(() => {
|
|
18320
18397
|
return editor.registerCommand(
|
|
18321
18398
|
SELECTION_CHANGE_COMMAND,
|
|
18322
18399
|
(_payload) => {
|
|
@@ -18326,7 +18403,7 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
18326
18403
|
COMMAND_PRIORITY_CRITICAL2
|
|
18327
18404
|
);
|
|
18328
18405
|
}, [editor, updateToolbar]);
|
|
18329
|
-
|
|
18406
|
+
useEffect14(() => {
|
|
18330
18407
|
return editor.registerUpdateListener(({ editorState }) => {
|
|
18331
18408
|
requestAnimationFrame(() => {
|
|
18332
18409
|
editorState.read(() => {
|
|
@@ -18411,7 +18488,7 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
18411
18488
|
children: /* @__PURE__ */ jsx105(RichTextToolbarIcon, { icon: "link" })
|
|
18412
18489
|
}
|
|
18413
18490
|
) }) : null,
|
|
18414
|
-
visibleLists.size > 0 ? /* @__PURE__ */ jsxs70(
|
|
18491
|
+
visibleLists.size > 0 ? /* @__PURE__ */ jsxs70(Fragment17, { children: [
|
|
18415
18492
|
visibleLists.has("unorderedList") ? /* @__PURE__ */ jsx105(Tooltip, { title: "Bullet List", placement: "top", children: /* @__PURE__ */ jsx105(
|
|
18416
18493
|
"button",
|
|
18417
18494
|
{
|
|
@@ -18574,7 +18651,7 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
18574
18651
|
};
|
|
18575
18652
|
|
|
18576
18653
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
18577
|
-
import { Fragment as
|
|
18654
|
+
import { Fragment as Fragment18, jsx as jsx106, jsxs as jsxs71 } from "@emotion/react/jsx-runtime";
|
|
18578
18655
|
var ParameterRichText = ({
|
|
18579
18656
|
label,
|
|
18580
18657
|
labelLeadingIcon,
|
|
@@ -18631,7 +18708,7 @@ var ParameterRichText = ({
|
|
|
18631
18708
|
children
|
|
18632
18709
|
}
|
|
18633
18710
|
),
|
|
18634
|
-
menuItems ? /* @__PURE__ */ jsx106(ParameterMenuButton, { label: `${label} menu`, children: /* @__PURE__ */ jsx106(
|
|
18711
|
+
menuItems ? /* @__PURE__ */ jsx106(ParameterMenuButton, { label: `${label} menu`, children: /* @__PURE__ */ jsx106(Fragment18, { children: menuItems }) }) : null
|
|
18635
18712
|
]
|
|
18636
18713
|
}
|
|
18637
18714
|
);
|
|
@@ -18742,7 +18819,7 @@ var ParameterRichTextInner = ({
|
|
|
18742
18819
|
},
|
|
18743
18820
|
editable: !readOnly
|
|
18744
18821
|
};
|
|
18745
|
-
return /* @__PURE__ */ jsxs71(
|
|
18822
|
+
return /* @__PURE__ */ jsxs71(Fragment18, { children: [
|
|
18746
18823
|
/* @__PURE__ */ jsx106("div", { css: [editorWrapper], className: editorWrapperClassName, children: /* @__PURE__ */ jsx106(LexicalComposer, { initialConfig: lexicalConfig, children: /* @__PURE__ */ jsx106(
|
|
18747
18824
|
RichText,
|
|
18748
18825
|
{
|
|
@@ -18780,14 +18857,14 @@ var RichText = ({
|
|
|
18780
18857
|
variables,
|
|
18781
18858
|
customControls
|
|
18782
18859
|
}) => {
|
|
18783
|
-
const editorContainerRef =
|
|
18860
|
+
const editorContainerRef = useRef8(null);
|
|
18784
18861
|
const [editor] = useLexicalComposerContext5();
|
|
18785
|
-
|
|
18862
|
+
useEffect15(() => {
|
|
18786
18863
|
if (onRichTextInit) {
|
|
18787
18864
|
onRichTextInit(editor);
|
|
18788
18865
|
}
|
|
18789
18866
|
}, [editor, onRichTextInit]);
|
|
18790
|
-
|
|
18867
|
+
useEffect15(() => {
|
|
18791
18868
|
const removeUpdateListener = editor.registerUpdateListener(({ editorState, prevEditorState }) => {
|
|
18792
18869
|
requestAnimationFrame(() => {
|
|
18793
18870
|
if (!deepEqual2(editorState.toJSON(), prevEditorState.toJSON())) {
|
|
@@ -18799,7 +18876,7 @@ var RichText = ({
|
|
|
18799
18876
|
removeUpdateListener();
|
|
18800
18877
|
};
|
|
18801
18878
|
}, []);
|
|
18802
|
-
return /* @__PURE__ */ jsxs71(
|
|
18879
|
+
return /* @__PURE__ */ jsxs71(Fragment18, { children: [
|
|
18803
18880
|
readOnly ? null : /* @__PURE__ */ jsx106(RichTextToolbar_default, { config, customControls }),
|
|
18804
18881
|
/* @__PURE__ */ jsxs71("div", { css: editorContainer, ref: editorContainerRef, "data-testid": "value-container", children: [
|
|
18805
18882
|
/* @__PURE__ */ jsx106(
|
|
@@ -18825,7 +18902,7 @@ var RichText = ({
|
|
|
18825
18902
|
/* @__PURE__ */ jsx106(ListIndentPlugin, { maxDepth: 4 }),
|
|
18826
18903
|
/* @__PURE__ */ jsx106(DisableStylesPlugin, {}),
|
|
18827
18904
|
/* @__PURE__ */ jsx106(MarkdownShortcutPlugin, { transformers: MARKDOWN_TRANSFORMERS }),
|
|
18828
|
-
/* @__PURE__ */ jsx106(
|
|
18905
|
+
/* @__PURE__ */ jsx106(Fragment18, { children })
|
|
18829
18906
|
] })
|
|
18830
18907
|
] });
|
|
18831
18908
|
};
|
|
@@ -19432,14 +19509,14 @@ var SwitchText = css92`
|
|
|
19432
19509
|
`;
|
|
19433
19510
|
|
|
19434
19511
|
// src/components/Switch/Switch.tsx
|
|
19435
|
-
import { Fragment as
|
|
19512
|
+
import { Fragment as Fragment19, jsx as jsx114, jsxs as jsxs76 } from "@emotion/react/jsx-runtime";
|
|
19436
19513
|
var Switch = React23.forwardRef(
|
|
19437
19514
|
({ label, infoText, toggleText, children, ...inputProps }, ref) => {
|
|
19438
19515
|
let additionalText = infoText;
|
|
19439
19516
|
if (infoText && toggleText) {
|
|
19440
19517
|
additionalText = inputProps.checked ? toggleText : infoText;
|
|
19441
19518
|
}
|
|
19442
|
-
return /* @__PURE__ */ jsxs76(
|
|
19519
|
+
return /* @__PURE__ */ jsxs76(Fragment19, { children: [
|
|
19443
19520
|
/* @__PURE__ */ jsxs76("label", { css: [SwitchInputContainer, inputProps.disabled ? SwitchInputDisabled : void 0], children: [
|
|
19444
19521
|
/* @__PURE__ */ jsx114("input", { type: "checkbox", css: SwitchInput, ...inputProps, ref }),
|
|
19445
19522
|
/* @__PURE__ */ jsx114("span", { css: SwitchInputLabel, children: label })
|
|
@@ -19519,7 +19596,7 @@ var TableCellData = React24.forwardRef(
|
|
|
19519
19596
|
);
|
|
19520
19597
|
|
|
19521
19598
|
// src/components/Tabs/Tabs.tsx
|
|
19522
|
-
import { createContext as createContext5, useContext as useContext6, useEffect as
|
|
19599
|
+
import { createContext as createContext5, useContext as useContext6, useEffect as useEffect16, useMemo as useMemo6 } from "react";
|
|
19523
19600
|
import {
|
|
19524
19601
|
Tab as ReakitTab,
|
|
19525
19602
|
TabList as ReakitTabList,
|
|
@@ -19569,7 +19646,7 @@ var Tabs = ({ children, onSelectedIdChange, useHashForState, selectedId, ...prop
|
|
|
19569
19646
|
return useHashForState && typeof window !== "undefined" && window.location.hash ? window.location.hash.substring(1) : void 0;
|
|
19570
19647
|
}, [selectedId, useHashForState]);
|
|
19571
19648
|
const tab = useTabState({ ...props, selectedId: selected });
|
|
19572
|
-
|
|
19649
|
+
useEffect16(() => {
|
|
19573
19650
|
var _a;
|
|
19574
19651
|
const selectedValueWithoutNull = (_a = tab.selectedId) != null ? _a : void 0;
|
|
19575
19652
|
onSelectedIdChange == null ? void 0 : onSelectedIdChange(selectedValueWithoutNull);
|
|
@@ -19578,7 +19655,7 @@ var Tabs = ({ children, onSelectedIdChange, useHashForState, selectedId, ...prop
|
|
|
19578
19655
|
window.history.pushState(null, "", hashValue);
|
|
19579
19656
|
}
|
|
19580
19657
|
}, [tab.selectedId, onSelectedIdChange, useHashForState]);
|
|
19581
|
-
|
|
19658
|
+
useEffect16(() => {
|
|
19582
19659
|
if (selected && selected !== tab.selectedId) {
|
|
19583
19660
|
tab.setSelectedId(selected);
|
|
19584
19661
|
}
|
package/dist/index.d.mts
CHANGED
|
@@ -21300,9 +21300,19 @@ type DetailsProps = React$1.HTMLAttributes<HTMLDetailsElement> & {
|
|
|
21300
21300
|
* @default false
|
|
21301
21301
|
*/
|
|
21302
21302
|
isOpenByDefault?: boolean;
|
|
21303
|
+
/** Makes the content indented, and shows an indent guide line.
|
|
21304
|
+
* @default false
|
|
21305
|
+
* @deprecated this prop is in beta, and might get breaking changes in minor releases.
|
|
21306
|
+
*/
|
|
21307
|
+
isIndented?: boolean;
|
|
21308
|
+
/** Makes the the UI of the summary more compact, by removing the paddings.
|
|
21309
|
+
* @default false
|
|
21310
|
+
* @deprecated this prop is in beta, and might get breaking changes in minor releases.
|
|
21311
|
+
*/
|
|
21312
|
+
isCompact?: boolean;
|
|
21303
21313
|
};
|
|
21304
21314
|
/** @example <Details summary="summary text">child content here</Details>*/
|
|
21305
|
-
declare const Details: ({ summary, children, isOpenByDefault, isOpen, onChange, ...props }: DetailsProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
21315
|
+
declare const Details: ({ summary, children, isOpenByDefault, isOpen, isIndented, isCompact, onChange, ...props }: DetailsProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
21306
21316
|
|
|
21307
21317
|
interface DrawerRendererProps extends Omit<React__default.HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
21308
21318
|
/** The ID of the stack to render. Some drawers need to use the same stack ID to be rendered here */
|
|
@@ -21505,12 +21515,18 @@ type ErrorMessageProps = {
|
|
|
21505
21515
|
/** sets the test id for test automation (optional) */
|
|
21506
21516
|
testId?: string;
|
|
21507
21517
|
className?: string;
|
|
21518
|
+
/**
|
|
21519
|
+
* When set to true, the error message will be truncated instead of wrapped
|
|
21520
|
+
* when it's longer than the available width.
|
|
21521
|
+
* @default false
|
|
21522
|
+
**/
|
|
21523
|
+
truncated?: boolean;
|
|
21508
21524
|
};
|
|
21509
21525
|
/**
|
|
21510
21526
|
* Component that provides error messaging to input fields
|
|
21511
21527
|
* @example <ErrorMessage>something went wrong, please try again</ErrorMessage>
|
|
21512
21528
|
*/
|
|
21513
|
-
declare const ErrorMessage: ({ message, testId, ...otherProps }: ErrorMessageProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element | null;
|
|
21529
|
+
declare const ErrorMessage: ({ message, testId, truncated, ...otherProps }: ErrorMessageProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element | null;
|
|
21514
21530
|
|
|
21515
21531
|
type FieldsetProps = React$1.HTMLAttributes<HTMLFieldSetElement> & {
|
|
21516
21532
|
/** sets the legend value */
|
|
@@ -22219,7 +22235,9 @@ type ModalProps = {
|
|
|
22219
22235
|
width?: string;
|
|
22220
22236
|
/** A valid CSS height */
|
|
22221
22237
|
height?: string;
|
|
22222
|
-
/** The classname to set on the wrapper of the modal
|
|
22238
|
+
/** The classname to set on the wrapper of the modal.
|
|
22239
|
+
* @deprecated the dialog is not rendered inside a wrapper anymore.
|
|
22240
|
+
*/
|
|
22223
22241
|
wrapperClassName?: string;
|
|
22224
22242
|
/** Removes the default padding on the content wrapper */
|
|
22225
22243
|
withoutContentPadding?: boolean;
|
|
@@ -22239,7 +22257,9 @@ declare const Modal: React__default.ForwardRefExoticComponent<{
|
|
|
22239
22257
|
width?: string | undefined;
|
|
22240
22258
|
/** A valid CSS height */
|
|
22241
22259
|
height?: string | undefined;
|
|
22242
|
-
/** The classname to set on the wrapper of the modal
|
|
22260
|
+
/** The classname to set on the wrapper of the modal.
|
|
22261
|
+
* @deprecated the dialog is not rendered inside a wrapper anymore.
|
|
22262
|
+
*/
|
|
22243
22263
|
wrapperClassName?: string | undefined;
|
|
22244
22264
|
/** Removes the default padding on the content wrapper */
|
|
22245
22265
|
withoutContentPadding?: boolean | undefined;
|
|
@@ -22638,13 +22658,18 @@ type ParameterShellOverrideProps = {
|
|
|
22638
22658
|
* @deprecated
|
|
22639
22659
|
*/
|
|
22640
22660
|
onResetOverriddenValue?: () => void;
|
|
22661
|
+
/**
|
|
22662
|
+
* Adjusts the UI to work with parameter groups. At the moment, it just remove the white background.
|
|
22663
|
+
* @default false
|
|
22664
|
+
*/
|
|
22665
|
+
isParameterGroup?: boolean;
|
|
22641
22666
|
};
|
|
22642
22667
|
type ParameterShellProps = React.InputHTMLAttributes<HTMLDivElement> & CommonParameterInputProps & ParameterShellOverrideProps;
|
|
22643
22668
|
/**
|
|
22644
22669
|
* Uniform Parameter shell component
|
|
22645
22670
|
* @example <ParameterShell label="my label" id="my-id"><ParameterInput onChange={() => {}} /></ParameterShell>
|
|
22646
22671
|
*/
|
|
22647
|
-
declare const ParameterShell: ({ label, labelLeadingIcon, labelTrailingIcon, hiddenLabel, id, errorMessage, warningMessage, infoMessage, caption, errorTestId, captionTestId, menuItems, actionItems, hasOverriddenValue, onResetOverriddenValue, title, children, ...props }: ParameterShellProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
22672
|
+
declare const ParameterShell: ({ label, labelLeadingIcon, labelTrailingIcon, hiddenLabel, id, errorMessage, warningMessage, infoMessage, caption, errorTestId, captionTestId, menuItems, actionItems, hasOverriddenValue, onResetOverriddenValue, title, children, isParameterGroup, ...props }: ParameterShellProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
22648
22673
|
declare const ParameterShellPlaceholder: ({ children }: {
|
|
22649
22674
|
children?: ReactNode;
|
|
22650
22675
|
}) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
package/dist/index.d.ts
CHANGED
|
@@ -21300,9 +21300,19 @@ type DetailsProps = React$1.HTMLAttributes<HTMLDetailsElement> & {
|
|
|
21300
21300
|
* @default false
|
|
21301
21301
|
*/
|
|
21302
21302
|
isOpenByDefault?: boolean;
|
|
21303
|
+
/** Makes the content indented, and shows an indent guide line.
|
|
21304
|
+
* @default false
|
|
21305
|
+
* @deprecated this prop is in beta, and might get breaking changes in minor releases.
|
|
21306
|
+
*/
|
|
21307
|
+
isIndented?: boolean;
|
|
21308
|
+
/** Makes the the UI of the summary more compact, by removing the paddings.
|
|
21309
|
+
* @default false
|
|
21310
|
+
* @deprecated this prop is in beta, and might get breaking changes in minor releases.
|
|
21311
|
+
*/
|
|
21312
|
+
isCompact?: boolean;
|
|
21303
21313
|
};
|
|
21304
21314
|
/** @example <Details summary="summary text">child content here</Details>*/
|
|
21305
|
-
declare const Details: ({ summary, children, isOpenByDefault, isOpen, onChange, ...props }: DetailsProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
21315
|
+
declare const Details: ({ summary, children, isOpenByDefault, isOpen, isIndented, isCompact, onChange, ...props }: DetailsProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
21306
21316
|
|
|
21307
21317
|
interface DrawerRendererProps extends Omit<React__default.HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
21308
21318
|
/** The ID of the stack to render. Some drawers need to use the same stack ID to be rendered here */
|
|
@@ -21505,12 +21515,18 @@ type ErrorMessageProps = {
|
|
|
21505
21515
|
/** sets the test id for test automation (optional) */
|
|
21506
21516
|
testId?: string;
|
|
21507
21517
|
className?: string;
|
|
21518
|
+
/**
|
|
21519
|
+
* When set to true, the error message will be truncated instead of wrapped
|
|
21520
|
+
* when it's longer than the available width.
|
|
21521
|
+
* @default false
|
|
21522
|
+
**/
|
|
21523
|
+
truncated?: boolean;
|
|
21508
21524
|
};
|
|
21509
21525
|
/**
|
|
21510
21526
|
* Component that provides error messaging to input fields
|
|
21511
21527
|
* @example <ErrorMessage>something went wrong, please try again</ErrorMessage>
|
|
21512
21528
|
*/
|
|
21513
|
-
declare const ErrorMessage: ({ message, testId, ...otherProps }: ErrorMessageProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element | null;
|
|
21529
|
+
declare const ErrorMessage: ({ message, testId, truncated, ...otherProps }: ErrorMessageProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element | null;
|
|
21514
21530
|
|
|
21515
21531
|
type FieldsetProps = React$1.HTMLAttributes<HTMLFieldSetElement> & {
|
|
21516
21532
|
/** sets the legend value */
|
|
@@ -22219,7 +22235,9 @@ type ModalProps = {
|
|
|
22219
22235
|
width?: string;
|
|
22220
22236
|
/** A valid CSS height */
|
|
22221
22237
|
height?: string;
|
|
22222
|
-
/** The classname to set on the wrapper of the modal
|
|
22238
|
+
/** The classname to set on the wrapper of the modal.
|
|
22239
|
+
* @deprecated the dialog is not rendered inside a wrapper anymore.
|
|
22240
|
+
*/
|
|
22223
22241
|
wrapperClassName?: string;
|
|
22224
22242
|
/** Removes the default padding on the content wrapper */
|
|
22225
22243
|
withoutContentPadding?: boolean;
|
|
@@ -22239,7 +22257,9 @@ declare const Modal: React__default.ForwardRefExoticComponent<{
|
|
|
22239
22257
|
width?: string | undefined;
|
|
22240
22258
|
/** A valid CSS height */
|
|
22241
22259
|
height?: string | undefined;
|
|
22242
|
-
/** The classname to set on the wrapper of the modal
|
|
22260
|
+
/** The classname to set on the wrapper of the modal.
|
|
22261
|
+
* @deprecated the dialog is not rendered inside a wrapper anymore.
|
|
22262
|
+
*/
|
|
22243
22263
|
wrapperClassName?: string | undefined;
|
|
22244
22264
|
/** Removes the default padding on the content wrapper */
|
|
22245
22265
|
withoutContentPadding?: boolean | undefined;
|
|
@@ -22638,13 +22658,18 @@ type ParameterShellOverrideProps = {
|
|
|
22638
22658
|
* @deprecated
|
|
22639
22659
|
*/
|
|
22640
22660
|
onResetOverriddenValue?: () => void;
|
|
22661
|
+
/**
|
|
22662
|
+
* Adjusts the UI to work with parameter groups. At the moment, it just remove the white background.
|
|
22663
|
+
* @default false
|
|
22664
|
+
*/
|
|
22665
|
+
isParameterGroup?: boolean;
|
|
22641
22666
|
};
|
|
22642
22667
|
type ParameterShellProps = React.InputHTMLAttributes<HTMLDivElement> & CommonParameterInputProps & ParameterShellOverrideProps;
|
|
22643
22668
|
/**
|
|
22644
22669
|
* Uniform Parameter shell component
|
|
22645
22670
|
* @example <ParameterShell label="my label" id="my-id"><ParameterInput onChange={() => {}} /></ParameterShell>
|
|
22646
22671
|
*/
|
|
22647
|
-
declare const ParameterShell: ({ label, labelLeadingIcon, labelTrailingIcon, hiddenLabel, id, errorMessage, warningMessage, infoMessage, caption, errorTestId, captionTestId, menuItems, actionItems, hasOverriddenValue, onResetOverriddenValue, title, children, ...props }: ParameterShellProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
22672
|
+
declare const ParameterShell: ({ label, labelLeadingIcon, labelTrailingIcon, hiddenLabel, id, errorMessage, warningMessage, infoMessage, caption, errorTestId, captionTestId, menuItems, actionItems, hasOverriddenValue, onResetOverriddenValue, title, children, isParameterGroup, ...props }: ParameterShellProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
22648
22673
|
declare const ParameterShellPlaceholder: ({ children }: {
|
|
22649
22674
|
children?: ReactNode;
|
|
22650
22675
|
}) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
package/dist/index.js
CHANGED
|
@@ -1597,7 +1597,7 @@ var Theme = ({ disableReset = false, disableGlobalReset = false }) => {
|
|
|
1597
1597
|
{
|
|
1598
1598
|
dangerouslySetInnerHTML: {
|
|
1599
1599
|
__html: `
|
|
1600
|
-
:root, :host {
|
|
1600
|
+
:root, :host, ::backdrop {
|
|
1601
1601
|
--brand-primary-1: #438fd5; /* bright blue */
|
|
1602
1602
|
--brand-primary-2: #f4220b; /* red */
|
|
1603
1603
|
--brand-primary-3: #83c6e1; /* slate blue */
|
|
@@ -14783,6 +14783,13 @@ var detailsContent = import_react53.css`
|
|
|
14783
14783
|
animation: ${fadeInRtl} var(--duration-fast) var(--timing-ease-out) forwards;
|
|
14784
14784
|
will-change: height;
|
|
14785
14785
|
`;
|
|
14786
|
+
var detailsContentIndented = import_react53.css`
|
|
14787
|
+
margin-left: calc(1.25rem / 2);
|
|
14788
|
+
border-left: 1px solid var(--gray-300);
|
|
14789
|
+
padding-top: calc(var(--spacing-md) / 2);
|
|
14790
|
+
padding-left: var(--spacing-base);
|
|
14791
|
+
padding-bottom: var(--spacing-sm);
|
|
14792
|
+
`;
|
|
14786
14793
|
var summary = import_react53.css`
|
|
14787
14794
|
align-items: center;
|
|
14788
14795
|
cursor: pointer;
|
|
@@ -14797,6 +14804,9 @@ var summary = import_react53.css`
|
|
|
14797
14804
|
display: none;
|
|
14798
14805
|
}
|
|
14799
14806
|
`;
|
|
14807
|
+
var summaryCompact = import_react53.css`
|
|
14808
|
+
padding: 0;
|
|
14809
|
+
`;
|
|
14800
14810
|
var summaryIcon = import_react53.css`
|
|
14801
14811
|
transition: rotate var(--duration-fast) var(--timing-ease-out);
|
|
14802
14812
|
rotate: -90deg;
|
|
@@ -14812,6 +14822,8 @@ var Details = ({
|
|
|
14812
14822
|
children,
|
|
14813
14823
|
isOpenByDefault = false,
|
|
14814
14824
|
isOpen,
|
|
14825
|
+
isIndented = false,
|
|
14826
|
+
isCompact = false,
|
|
14815
14827
|
onChange,
|
|
14816
14828
|
...props
|
|
14817
14829
|
}) => {
|
|
@@ -14833,7 +14845,7 @@ var Details = ({
|
|
|
14833
14845
|
ref: detailsRef,
|
|
14834
14846
|
...props,
|
|
14835
14847
|
children: [
|
|
14836
|
-
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("summary", { "data-testid": "summary", css: summary, children: [
|
|
14848
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("summary", { "data-testid": "summary", css: [summary, isCompact ? summaryCompact : null], children: [
|
|
14837
14849
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
14838
14850
|
Icon,
|
|
14839
14851
|
{
|
|
@@ -14845,7 +14857,14 @@ var Details = ({
|
|
|
14845
14857
|
),
|
|
14846
14858
|
summary2
|
|
14847
14859
|
] }),
|
|
14848
|
-
memoizedIsOpen ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
14860
|
+
memoizedIsOpen ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
14861
|
+
"div",
|
|
14862
|
+
{
|
|
14863
|
+
"data-testid": "details-content",
|
|
14864
|
+
css: [detailsContent, isIndented ? detailsContentIndented : null],
|
|
14865
|
+
children
|
|
14866
|
+
}
|
|
14867
|
+
) : null
|
|
14849
14868
|
]
|
|
14850
14869
|
}
|
|
14851
14870
|
);
|
|
@@ -15103,10 +15122,12 @@ var useCurrentDrawer = () => {
|
|
|
15103
15122
|
};
|
|
15104
15123
|
var Drawer = import_react56.default.forwardRef(
|
|
15105
15124
|
({ minWidth, maxWidth, position, leftAligned, ...drawerProps }, ref) => {
|
|
15125
|
+
var _a;
|
|
15106
15126
|
const { stackId: inheritedStackId } = useCurrentDrawer();
|
|
15107
15127
|
const { drawerTakeoverStackId } = useDrawer();
|
|
15108
15128
|
const drawerRendererProps = { width: drawerProps.width, minWidth, maxWidth, position, leftAligned };
|
|
15109
|
-
|
|
15129
|
+
const resolvedStickyStackIdRef = (0, import_react56.useRef)((_a = drawerTakeoverStackId != null ? drawerTakeoverStackId : drawerProps.stackId) != null ? _a : inheritedStackId);
|
|
15130
|
+
return resolvedStickyStackIdRef.current ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(DrawerInner, { ref, ...drawerProps, stackId: resolvedStickyStackIdRef.current }) : /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(DrawerProvider, { children: [
|
|
15110
15131
|
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(DrawerInner, { ref, ...drawerProps }),
|
|
15111
15132
|
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(DrawerRenderer, { stackId: defaultSackId, ...drawerRendererProps })
|
|
15112
15133
|
] });
|
|
@@ -15541,19 +15562,29 @@ var import_MdWarning = require("@react-icons/all-files/md/MdWarning");
|
|
|
15541
15562
|
// src/components/Input/styles/ErrorMessage.styles.ts
|
|
15542
15563
|
init_emotion_jsx_shim();
|
|
15543
15564
|
var import_react65 = require("@emotion/react");
|
|
15544
|
-
var
|
|
15565
|
+
var errorMessageStyles = import_react65.css`
|
|
15545
15566
|
align-items: center;
|
|
15546
15567
|
color: var(--brand-secondary-5);
|
|
15547
15568
|
display: flex;
|
|
15548
15569
|
gap: var(--spacing-sm);
|
|
15549
15570
|
`;
|
|
15571
|
+
var errorMessageTextStyles = import_react65.css`
|
|
15572
|
+
/* We hide the text at width 5rem or below */
|
|
15573
|
+
max-width: max(0px, calc((100% - 5rem) * 9999));
|
|
15574
|
+
overflow: hidden;
|
|
15575
|
+
`;
|
|
15576
|
+
var errorMessageTextTruncatedStyles = import_react65.css`
|
|
15577
|
+
overflow: hidden;
|
|
15578
|
+
text-overflow: ellipsis;
|
|
15579
|
+
white-space: nowrap;
|
|
15580
|
+
`;
|
|
15550
15581
|
|
|
15551
15582
|
// src/components/Input/ErrorMessage.tsx
|
|
15552
15583
|
var import_jsx_runtime51 = require("@emotion/react/jsx-runtime");
|
|
15553
|
-
var ErrorMessage = ({ message, testId, ...otherProps }) => {
|
|
15554
|
-
return message ? /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("span", { role: "alert", css:
|
|
15584
|
+
var ErrorMessage = ({ message, testId, truncated = false, ...otherProps }) => {
|
|
15585
|
+
return message ? /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("span", { role: "alert", css: errorMessageStyles, "data-testid": testId, ...otherProps, title: message, children: [
|
|
15555
15586
|
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Icon, { icon: import_MdWarning.MdWarning, size: "1rem", iconColor: "currentColor" }) }),
|
|
15556
|
-
message
|
|
15587
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { css: [errorMessageTextStyles, truncated ? errorMessageTextTruncatedStyles : null], children: message })
|
|
15557
15588
|
] }) : null;
|
|
15558
15589
|
};
|
|
15559
15590
|
|
|
@@ -16306,6 +16337,15 @@ var imgLoaded = import_react74.css`
|
|
|
16306
16337
|
var brokenImage = import_react74.css`
|
|
16307
16338
|
height: 160px;
|
|
16308
16339
|
`;
|
|
16340
|
+
var brokenImageMessage = import_react74.css`
|
|
16341
|
+
position: absolute;
|
|
16342
|
+
bottom: var(--spacing-xs);
|
|
16343
|
+
left: var(--spacing-xs);
|
|
16344
|
+
width: 100%;
|
|
16345
|
+
justify-content: center;
|
|
16346
|
+
padding-inline: var(--spacing-xs);
|
|
16347
|
+
font-size: var(--fs-sm);
|
|
16348
|
+
`;
|
|
16309
16349
|
var variantFillImageWrapper = import_react74.css`
|
|
16310
16350
|
display: flex;
|
|
16311
16351
|
justify-content: center;
|
|
@@ -16314,6 +16354,7 @@ var variantFillImageWrapper = import_react74.css`
|
|
|
16314
16354
|
`;
|
|
16315
16355
|
var variantFillImageImg = import_react74.css`
|
|
16316
16356
|
height: inherit;
|
|
16357
|
+
width: inherit;
|
|
16317
16358
|
`;
|
|
16318
16359
|
|
|
16319
16360
|
// src/components/Image/ImageBroken.tsx
|
|
@@ -16432,18 +16473,26 @@ function Image({
|
|
|
16432
16473
|
onError: handleErrorEvent
|
|
16433
16474
|
}
|
|
16434
16475
|
) : null,
|
|
16435
|
-
src && loadErrorText ? /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
|
16436
|
-
|
|
16437
|
-
|
|
16438
|
-
{
|
|
16439
|
-
|
|
16440
|
-
|
|
16441
|
-
height
|
|
16442
|
-
|
|
16443
|
-
|
|
16444
|
-
|
|
16445
|
-
|
|
16446
|
-
|
|
16476
|
+
src && loadErrorText ? /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
|
16477
|
+
"span",
|
|
16478
|
+
{
|
|
16479
|
+
style: {
|
|
16480
|
+
display: "inline-flex",
|
|
16481
|
+
position: "relative",
|
|
16482
|
+
...variant === "fill-container" ? {} : { width, height }
|
|
16483
|
+
},
|
|
16484
|
+
children: [
|
|
16485
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
16486
|
+
ImageBroken,
|
|
16487
|
+
{
|
|
16488
|
+
css: [brokenImage, img, imgLoaded],
|
|
16489
|
+
"data-testid": "broken-image"
|
|
16490
|
+
}
|
|
16491
|
+
),
|
|
16492
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(ErrorMessage, { message: loadErrorText, css: brokenImageMessage, truncated: true })
|
|
16493
|
+
]
|
|
16494
|
+
}
|
|
16495
|
+
) : null
|
|
16447
16496
|
]
|
|
16448
16497
|
}
|
|
16449
16498
|
);
|
|
@@ -17796,9 +17845,11 @@ var cardBase = import_react96.css`
|
|
|
17796
17845
|
min-height: unset;
|
|
17797
17846
|
outline: none;
|
|
17798
17847
|
cursor: pointer;
|
|
17848
|
+
transition: border-color var(--duration-xfast) ease-in-out;
|
|
17799
17849
|
|
|
17800
17850
|
&:hover {
|
|
17801
17851
|
--mediacard-title-color: var(--brand-secondary-1);
|
|
17852
|
+
border-color: var(--primary-action-hover);
|
|
17802
17853
|
}
|
|
17803
17854
|
`;
|
|
17804
17855
|
var coverWrapper = import_react96.css`
|
|
@@ -17934,26 +17985,32 @@ var modalWrapperStyles = import_react98.css`
|
|
|
17934
17985
|
justify-content: center;
|
|
17935
17986
|
z-index: var(--z-drawer);
|
|
17936
17987
|
`;
|
|
17937
|
-
var modalBackdropStyles = import_react98.css`
|
|
17938
|
-
position: absolute;
|
|
17939
|
-
inset: 0;
|
|
17940
|
-
background-color: var(--brand-secondary-1);
|
|
17941
|
-
opacity: 0.4;
|
|
17942
|
-
`;
|
|
17943
17988
|
var modalStyles = import_react98.css`
|
|
17944
17989
|
position: relative;
|
|
17990
|
+
max-width: calc(100% - var(--spacing-base) * 2);
|
|
17991
|
+
max-height: calc(100% - var(--spacing-base) * 2);
|
|
17992
|
+
padding: 0;
|
|
17993
|
+
background-color: transparent;
|
|
17994
|
+
z-index: 1;
|
|
17995
|
+
|
|
17996
|
+
&::backdrop {
|
|
17997
|
+
background-color: var(--brand-secondary-1);
|
|
17998
|
+
opacity: 0.4;
|
|
17999
|
+
}
|
|
18000
|
+
`;
|
|
18001
|
+
var modalInnerStyles = import_react98.css`
|
|
18002
|
+
position: relative;
|
|
18003
|
+
width: 100%;
|
|
18004
|
+
height: 100%;
|
|
17945
18005
|
display: flex;
|
|
17946
18006
|
flex-direction: column;
|
|
17947
18007
|
justify-content: stretch;
|
|
17948
|
-
max-width: calc(100% - var(--spacing-base) * 2);
|
|
17949
|
-
max-height: calc(100% - var(--spacing-base) * 2);
|
|
17950
18008
|
gap: var(--spacing-base);
|
|
17951
18009
|
background: var(--gray-50);
|
|
18010
|
+
color: unset;
|
|
18011
|
+
padding: var(--spacing-base);
|
|
17952
18012
|
border-radius: var(--rounded-base);
|
|
17953
18013
|
border: 1px solid var(--gray-300);
|
|
17954
|
-
padding: var(--spacing-base);
|
|
17955
|
-
color: unset;
|
|
17956
|
-
z-index: 1;
|
|
17957
18014
|
`;
|
|
17958
18015
|
var modalHeaderStyles = import_react98.css`
|
|
17959
18016
|
display: flex;
|
|
@@ -17962,6 +18019,9 @@ var modalHeaderStyles = import_react98.css`
|
|
|
17962
18019
|
font-size: var(--fs-md);
|
|
17963
18020
|
line-height: 1.2;
|
|
17964
18021
|
`;
|
|
18022
|
+
var modalHeaderHeaderStyles = import_react98.css`
|
|
18023
|
+
max-width: calc(100% - 3rem);
|
|
18024
|
+
`;
|
|
17965
18025
|
var modalCloseButtonStyles = import_react98.css`
|
|
17966
18026
|
display: block;
|
|
17967
18027
|
padding: 0;
|
|
@@ -17989,47 +18049,63 @@ var Modal = import_react99.default.forwardRef(
|
|
|
17989
18049
|
onRequestClose,
|
|
17990
18050
|
width = defaultModalWidth,
|
|
17991
18051
|
height = defaultModalHeight,
|
|
17992
|
-
wrapperClassName,
|
|
17993
18052
|
withoutContentPadding = false,
|
|
17994
18053
|
buttonGroup,
|
|
17995
18054
|
...modalProps
|
|
17996
18055
|
}, ref) => {
|
|
18056
|
+
const dialogRef = (0, import_react99.useRef)(null);
|
|
17997
18057
|
useShortcut({
|
|
17998
18058
|
handler: onRequestClose,
|
|
17999
18059
|
shortcut: "escape"
|
|
18000
18060
|
});
|
|
18001
|
-
|
|
18002
|
-
|
|
18003
|
-
|
|
18004
|
-
|
|
18005
|
-
|
|
18006
|
-
|
|
18007
|
-
|
|
18008
|
-
|
|
18009
|
-
|
|
18010
|
-
|
|
18011
|
-
|
|
18012
|
-
|
|
18013
|
-
|
|
18014
|
-
|
|
18015
|
-
|
|
18016
|
-
|
|
18017
|
-
|
|
18018
|
-
|
|
18019
|
-
|
|
18020
|
-
|
|
18021
|
-
|
|
18022
|
-
|
|
18023
|
-
|
|
18024
|
-
|
|
18025
|
-
|
|
18026
|
-
|
|
18027
|
-
|
|
18028
|
-
|
|
18029
|
-
|
|
18030
|
-
|
|
18031
|
-
|
|
18032
|
-
|
|
18061
|
+
(0, import_react99.useEffect)(() => {
|
|
18062
|
+
var _a;
|
|
18063
|
+
(_a = dialogRef.current) == null ? void 0 : _a.showModal();
|
|
18064
|
+
return () => {
|
|
18065
|
+
var _a2;
|
|
18066
|
+
return (_a2 = dialogRef.current) == null ? void 0 : _a2.close();
|
|
18067
|
+
};
|
|
18068
|
+
}, []);
|
|
18069
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
18070
|
+
"dialog",
|
|
18071
|
+
{
|
|
18072
|
+
ref: (element) => {
|
|
18073
|
+
dialogRef.current = element;
|
|
18074
|
+
if (!ref) {
|
|
18075
|
+
return;
|
|
18076
|
+
}
|
|
18077
|
+
if (typeof ref === "function") {
|
|
18078
|
+
ref(element);
|
|
18079
|
+
} else {
|
|
18080
|
+
ref.current = element;
|
|
18081
|
+
}
|
|
18082
|
+
},
|
|
18083
|
+
css: modalStyles,
|
|
18084
|
+
style: { width, height: height === "auto" ? "min-content" : height },
|
|
18085
|
+
"data-testid": "side-dialog",
|
|
18086
|
+
onClick: onRequestClose,
|
|
18087
|
+
...modalProps,
|
|
18088
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { css: modalInnerStyles, onClick: (e) => e.stopPropagation(), children: [
|
|
18089
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { css: modalHeaderStyles, children: [
|
|
18090
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { css: modalHeaderHeaderStyles, children: header }),
|
|
18091
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
18092
|
+
Button,
|
|
18093
|
+
{
|
|
18094
|
+
type: "button",
|
|
18095
|
+
onClick: onRequestClose,
|
|
18096
|
+
css: modalCloseButtonStyles,
|
|
18097
|
+
title: "Close dialog",
|
|
18098
|
+
buttonType: "ghost",
|
|
18099
|
+
"data-testid": "close-dialog",
|
|
18100
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(Icon, { icon: import_CgClose6.CgClose, iconColor: "gray", size: 24 })
|
|
18101
|
+
}
|
|
18102
|
+
)
|
|
18103
|
+
] }),
|
|
18104
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { css: [modalContentStyles, !withoutContentPadding ? null : { padding: 0 }], children }),
|
|
18105
|
+
buttonGroup ? /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(HorizontalRhythm, { children: buttonGroup }) : null
|
|
18106
|
+
] })
|
|
18107
|
+
}
|
|
18108
|
+
);
|
|
18033
18109
|
}
|
|
18034
18110
|
);
|
|
18035
18111
|
Modal.displayName = "Modal";
|
|
@@ -18773,6 +18849,7 @@ var ParameterShell = ({
|
|
|
18773
18849
|
onResetOverriddenValue,
|
|
18774
18850
|
title: title2,
|
|
18775
18851
|
children,
|
|
18852
|
+
isParameterGroup = false,
|
|
18776
18853
|
...props
|
|
18777
18854
|
}) => {
|
|
18778
18855
|
const [manualErrorMessage, setManualErrorMessage] = (0, import_react111.useState)(void 0);
|
|
@@ -18816,7 +18893,7 @@ var ParameterShell = ({
|
|
|
18816
18893
|
errorMessage: errorMessaging,
|
|
18817
18894
|
handleManuallySetErrorMessage: (message) => setErrorMessage(message)
|
|
18818
18895
|
},
|
|
18819
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(ParameterShellPlaceholder, { children: [
|
|
18896
|
+
children: isParameterGroup ? /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { style: { flexGrow: 1 }, children }) : /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(ParameterShellPlaceholder, { children: [
|
|
18820
18897
|
children,
|
|
18821
18898
|
hasOverriddenValue && onResetOverriddenValue ? /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(ParameterOverrideMarker, { onClick: onResetOverriddenValue }) : null
|
|
18822
18899
|
] })
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/design-system",
|
|
3
|
-
"version": "19.75.
|
|
3
|
+
"version": "19.75.1-alpha.30+4b3edf13d",
|
|
4
4
|
"description": "Uniform design system components",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"@storybook/react": "6.5.16",
|
|
24
24
|
"@types/react": "18.2.21",
|
|
25
25
|
"@types/react-dom": "18.2.7",
|
|
26
|
-
"@uniformdev/canvas": "^19.75.
|
|
27
|
-
"@uniformdev/richtext": "^19.75.
|
|
26
|
+
"@uniformdev/canvas": "^19.75.1-alpha.30+4b3edf13d",
|
|
27
|
+
"@uniformdev/richtext": "^19.75.1-alpha.30+4b3edf13d",
|
|
28
28
|
"autoprefixer": "10.4.16",
|
|
29
29
|
"hygen": "6.2.11",
|
|
30
30
|
"postcss": "8.4.31",
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"publishConfig": {
|
|
68
68
|
"access": "public"
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "4b3edf13dfea6d5d0ffa8c1ca1ac9a54013a3350"
|
|
71
71
|
}
|