@uniformdev/design-system 19.78.1 → 19.79.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 +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 */
|
|
@@ -13103,6 +13103,13 @@ var detailsContent = css41`
|
|
|
13103
13103
|
animation: ${fadeInRtl} var(--duration-fast) var(--timing-ease-out) forwards;
|
|
13104
13104
|
will-change: height;
|
|
13105
13105
|
`;
|
|
13106
|
+
var detailsContentIndented = css41`
|
|
13107
|
+
margin-left: calc(1.25rem / 2);
|
|
13108
|
+
border-left: 1px solid var(--gray-300);
|
|
13109
|
+
padding-top: calc(var(--spacing-md) / 2);
|
|
13110
|
+
padding-left: var(--spacing-base);
|
|
13111
|
+
padding-bottom: var(--spacing-sm);
|
|
13112
|
+
`;
|
|
13106
13113
|
var summary = css41`
|
|
13107
13114
|
align-items: center;
|
|
13108
13115
|
cursor: pointer;
|
|
@@ -13117,6 +13124,9 @@ var summary = css41`
|
|
|
13117
13124
|
display: none;
|
|
13118
13125
|
}
|
|
13119
13126
|
`;
|
|
13127
|
+
var summaryCompact = css41`
|
|
13128
|
+
padding: 0;
|
|
13129
|
+
`;
|
|
13120
13130
|
var summaryIcon = css41`
|
|
13121
13131
|
transition: rotate var(--duration-fast) var(--timing-ease-out);
|
|
13122
13132
|
rotate: -90deg;
|
|
@@ -13132,6 +13142,8 @@ var Details = ({
|
|
|
13132
13142
|
children,
|
|
13133
13143
|
isOpenByDefault = false,
|
|
13134
13144
|
isOpen,
|
|
13145
|
+
isIndented = false,
|
|
13146
|
+
isCompact = false,
|
|
13135
13147
|
onChange,
|
|
13136
13148
|
...props
|
|
13137
13149
|
}) => {
|
|
@@ -13153,7 +13165,7 @@ var Details = ({
|
|
|
13153
13165
|
ref: detailsRef,
|
|
13154
13166
|
...props,
|
|
13155
13167
|
children: [
|
|
13156
|
-
/* @__PURE__ */ jsxs25("summary", { "data-testid": "summary", css: summary, children: [
|
|
13168
|
+
/* @__PURE__ */ jsxs25("summary", { "data-testid": "summary", css: [summary, isCompact ? summaryCompact : null], children: [
|
|
13157
13169
|
/* @__PURE__ */ jsx42(
|
|
13158
13170
|
Icon,
|
|
13159
13171
|
{
|
|
@@ -13165,7 +13177,14 @@ var Details = ({
|
|
|
13165
13177
|
),
|
|
13166
13178
|
summary2
|
|
13167
13179
|
] }),
|
|
13168
|
-
memoizedIsOpen ? /* @__PURE__ */ jsx42(
|
|
13180
|
+
memoizedIsOpen ? /* @__PURE__ */ jsx42(
|
|
13181
|
+
"div",
|
|
13182
|
+
{
|
|
13183
|
+
"data-testid": "details-content",
|
|
13184
|
+
css: [detailsContent, isIndented ? detailsContentIndented : null],
|
|
13185
|
+
children
|
|
13186
|
+
}
|
|
13187
|
+
) : null
|
|
13169
13188
|
]
|
|
13170
13189
|
}
|
|
13171
13190
|
);
|
|
@@ -13420,10 +13439,12 @@ var useCurrentDrawer = () => {
|
|
|
13420
13439
|
};
|
|
13421
13440
|
var Drawer = React13.forwardRef(
|
|
13422
13441
|
({ minWidth, maxWidth, position, leftAligned, ...drawerProps }, ref) => {
|
|
13442
|
+
var _a;
|
|
13423
13443
|
const { stackId: inheritedStackId } = useCurrentDrawer();
|
|
13424
13444
|
const { drawerTakeoverStackId } = useDrawer();
|
|
13425
13445
|
const drawerRendererProps = { width: drawerProps.width, minWidth, maxWidth, position, leftAligned };
|
|
13426
|
-
|
|
13446
|
+
const resolvedStickyStackIdRef = useRef3((_a = drawerTakeoverStackId != null ? drawerTakeoverStackId : drawerProps.stackId) != null ? _a : inheritedStackId);
|
|
13447
|
+
return resolvedStickyStackIdRef.current ? /* @__PURE__ */ jsx44(DrawerInner, { ref, ...drawerProps, stackId: resolvedStickyStackIdRef.current }) : /* @__PURE__ */ jsxs26(DrawerProvider, { children: [
|
|
13427
13448
|
/* @__PURE__ */ jsx44(DrawerInner, { ref, ...drawerProps }),
|
|
13428
13449
|
/* @__PURE__ */ jsx44(DrawerRenderer, { stackId: defaultSackId, ...drawerRendererProps })
|
|
13429
13450
|
] });
|
|
@@ -13835,19 +13856,29 @@ import { MdWarning } from "@react-icons/all-files/md/MdWarning";
|
|
|
13835
13856
|
|
|
13836
13857
|
// src/components/Input/styles/ErrorMessage.styles.ts
|
|
13837
13858
|
import { css as css47 } from "@emotion/react";
|
|
13838
|
-
var
|
|
13859
|
+
var errorMessageStyles = css47`
|
|
13839
13860
|
align-items: center;
|
|
13840
13861
|
color: var(--brand-secondary-5);
|
|
13841
13862
|
display: flex;
|
|
13842
13863
|
gap: var(--spacing-sm);
|
|
13843
13864
|
`;
|
|
13865
|
+
var errorMessageTextStyles = css47`
|
|
13866
|
+
/* We hide the text at width 5rem or below */
|
|
13867
|
+
max-width: max(0px, calc((100% - 5rem) * 9999));
|
|
13868
|
+
overflow: hidden;
|
|
13869
|
+
`;
|
|
13870
|
+
var errorMessageTextTruncatedStyles = css47`
|
|
13871
|
+
overflow: hidden;
|
|
13872
|
+
text-overflow: ellipsis;
|
|
13873
|
+
white-space: nowrap;
|
|
13874
|
+
`;
|
|
13844
13875
|
|
|
13845
13876
|
// src/components/Input/ErrorMessage.tsx
|
|
13846
13877
|
import { jsx as jsx51, jsxs as jsxs30 } from "@emotion/react/jsx-runtime";
|
|
13847
|
-
var ErrorMessage = ({ message, testId, ...otherProps }) => {
|
|
13848
|
-
return message ? /* @__PURE__ */ jsxs30("span", { role: "alert", css:
|
|
13878
|
+
var ErrorMessage = ({ message, testId, truncated = false, ...otherProps }) => {
|
|
13879
|
+
return message ? /* @__PURE__ */ jsxs30("span", { role: "alert", css: errorMessageStyles, "data-testid": testId, ...otherProps, title: message, children: [
|
|
13849
13880
|
/* @__PURE__ */ jsx51("span", { children: /* @__PURE__ */ jsx51(Icon, { icon: MdWarning, size: "1rem", iconColor: "currentColor" }) }),
|
|
13850
|
-
message
|
|
13881
|
+
/* @__PURE__ */ jsx51("span", { css: [errorMessageTextStyles, truncated ? errorMessageTextTruncatedStyles : null], children: message })
|
|
13851
13882
|
] }) : null;
|
|
13852
13883
|
};
|
|
13853
13884
|
|
|
@@ -14581,6 +14612,15 @@ var imgLoaded = css54`
|
|
|
14581
14612
|
var brokenImage = css54`
|
|
14582
14613
|
height: 160px;
|
|
14583
14614
|
`;
|
|
14615
|
+
var brokenImageMessage = css54`
|
|
14616
|
+
position: absolute;
|
|
14617
|
+
bottom: var(--spacing-xs);
|
|
14618
|
+
left: var(--spacing-xs);
|
|
14619
|
+
width: 100%;
|
|
14620
|
+
justify-content: center;
|
|
14621
|
+
padding-inline: var(--spacing-xs);
|
|
14622
|
+
font-size: var(--fs-sm);
|
|
14623
|
+
`;
|
|
14584
14624
|
var variantFillImageWrapper = css54`
|
|
14585
14625
|
display: flex;
|
|
14586
14626
|
justify-content: center;
|
|
@@ -14589,6 +14629,7 @@ var variantFillImageWrapper = css54`
|
|
|
14589
14629
|
`;
|
|
14590
14630
|
var variantFillImageImg = css54`
|
|
14591
14631
|
height: inherit;
|
|
14632
|
+
width: inherit;
|
|
14592
14633
|
`;
|
|
14593
14634
|
|
|
14594
14635
|
// src/components/Image/ImageBroken.tsx
|
|
@@ -14627,7 +14668,7 @@ var ImageBroken = ({ width, height, ...props }) => {
|
|
|
14627
14668
|
};
|
|
14628
14669
|
|
|
14629
14670
|
// src/components/Image/Image.tsx
|
|
14630
|
-
import {
|
|
14671
|
+
import { jsx as jsx66, jsxs as jsxs41 } from "@emotion/react/jsx-runtime";
|
|
14631
14672
|
var MIN_LOADING_MS = 100;
|
|
14632
14673
|
function Image({
|
|
14633
14674
|
alt,
|
|
@@ -14706,18 +14747,26 @@ function Image({
|
|
|
14706
14747
|
onError: handleErrorEvent
|
|
14707
14748
|
}
|
|
14708
14749
|
) : null,
|
|
14709
|
-
src && loadErrorText ? /* @__PURE__ */ jsxs41(
|
|
14710
|
-
|
|
14711
|
-
|
|
14712
|
-
{
|
|
14713
|
-
|
|
14714
|
-
|
|
14715
|
-
height
|
|
14716
|
-
|
|
14717
|
-
|
|
14718
|
-
|
|
14719
|
-
|
|
14720
|
-
|
|
14750
|
+
src && loadErrorText ? /* @__PURE__ */ jsxs41(
|
|
14751
|
+
"span",
|
|
14752
|
+
{
|
|
14753
|
+
style: {
|
|
14754
|
+
display: "inline-flex",
|
|
14755
|
+
position: "relative",
|
|
14756
|
+
...variant === "fill-container" ? {} : { width, height }
|
|
14757
|
+
},
|
|
14758
|
+
children: [
|
|
14759
|
+
/* @__PURE__ */ jsx66(
|
|
14760
|
+
ImageBroken,
|
|
14761
|
+
{
|
|
14762
|
+
css: [brokenImage, img, imgLoaded],
|
|
14763
|
+
"data-testid": "broken-image"
|
|
14764
|
+
}
|
|
14765
|
+
),
|
|
14766
|
+
/* @__PURE__ */ jsx66(ErrorMessage, { message: loadErrorText, css: brokenImageMessage, truncated: true })
|
|
14767
|
+
]
|
|
14768
|
+
}
|
|
14769
|
+
) : null
|
|
14721
14770
|
]
|
|
14722
14771
|
}
|
|
14723
14772
|
);
|
|
@@ -15097,10 +15146,10 @@ var IntegrationLoadingFrame = css58`
|
|
|
15097
15146
|
`;
|
|
15098
15147
|
|
|
15099
15148
|
// src/components/Tiles/IntegrationLoadingTile.tsx
|
|
15100
|
-
import { Fragment as
|
|
15149
|
+
import { Fragment as Fragment10, jsx as jsx72, jsxs as jsxs46 } from "@emotion/react/jsx-runtime";
|
|
15101
15150
|
var IntegrationLoadingTile = ({ count = 1 }) => {
|
|
15102
15151
|
const componentCount = Array.from(Array(count).keys());
|
|
15103
|
-
return /* @__PURE__ */ jsx72(
|
|
15152
|
+
return /* @__PURE__ */ jsx72(Fragment10, { children: componentCount.map((i) => /* @__PURE__ */ jsxs46("div", { css: IntegrationLoadingTileContainer, children: [
|
|
15104
15153
|
/* @__PURE__ */ jsx72("div", { css: [IntegrationLoadingTileImg, IntegrationLoadingFrame], role: "presentation" }),
|
|
15105
15154
|
/* @__PURE__ */ jsx72("div", { css: [IntegrationLoadingTileText, IntegrationLoadingFrame] })
|
|
15106
15155
|
] }, i)) });
|
|
@@ -15342,7 +15391,7 @@ var IntegrationModalHeaderContentWrapper = css63`
|
|
|
15342
15391
|
`;
|
|
15343
15392
|
|
|
15344
15393
|
// src/components/IntegrationModalHeader/IntegrationModalHeader.tsx
|
|
15345
|
-
import { Fragment as
|
|
15394
|
+
import { Fragment as Fragment11, jsx as jsx78, jsxs as jsxs49 } from "@emotion/react/jsx-runtime";
|
|
15346
15395
|
var HexModalBackground = ({ ...props }) => {
|
|
15347
15396
|
return /* @__PURE__ */ jsxs49(
|
|
15348
15397
|
"svg",
|
|
@@ -15383,7 +15432,7 @@ var HexModalBackground = ({ ...props }) => {
|
|
|
15383
15432
|
);
|
|
15384
15433
|
};
|
|
15385
15434
|
var IntegrationModalHeader = ({ icon, name, menu, children }) => {
|
|
15386
|
-
return /* @__PURE__ */ jsxs49(
|
|
15435
|
+
return /* @__PURE__ */ jsxs49(Fragment11, { children: [
|
|
15387
15436
|
/* @__PURE__ */ jsx78(HexModalBackground, { css: IntegrationModalHeaderSVGBackground, role: "presentation" }),
|
|
15388
15437
|
/* @__PURE__ */ jsx78("div", { css: IntegrationModalHeaderGroup, children: /* @__PURE__ */ jsxs49("div", { css: IntegrationModalHeaderTitleGroup, children: [
|
|
15389
15438
|
icon ? /* @__PURE__ */ jsx78(IntegrationModalIcon, { icon, name: name || "" }) : null,
|
|
@@ -15969,7 +16018,7 @@ var Popover = css71`
|
|
|
15969
16018
|
`;
|
|
15970
16019
|
|
|
15971
16020
|
// src/components/Popover/Popover.tsx
|
|
15972
|
-
import { Fragment as
|
|
16021
|
+
import { Fragment as Fragment12, jsx as jsx87, jsxs as jsxs57 } from "@emotion/react/jsx-runtime";
|
|
15973
16022
|
var Popover2 = ({
|
|
15974
16023
|
iconColor = "action",
|
|
15975
16024
|
icon = "info",
|
|
@@ -15983,7 +16032,7 @@ var Popover2 = ({
|
|
|
15983
16032
|
...otherProps
|
|
15984
16033
|
}) => {
|
|
15985
16034
|
const popover = usePopoverState({ placement });
|
|
15986
|
-
return /* @__PURE__ */ jsxs57(
|
|
16035
|
+
return /* @__PURE__ */ jsxs57(Fragment12, { children: [
|
|
15987
16036
|
/* @__PURE__ */ jsx87(
|
|
15988
16037
|
PopoverDisclosure,
|
|
15989
16038
|
{
|
|
@@ -15991,7 +16040,7 @@ var Popover2 = ({
|
|
|
15991
16040
|
css: [PopoverBtn, trigger ? void 0 : PopoverDefaulterTriggerBtn],
|
|
15992
16041
|
title: buttonText,
|
|
15993
16042
|
"data-testid": testId,
|
|
15994
|
-
children: trigger ? trigger : /* @__PURE__ */ jsxs57(
|
|
16043
|
+
children: trigger ? trigger : /* @__PURE__ */ jsxs57(Fragment12, { children: [
|
|
15995
16044
|
/* @__PURE__ */ jsx87(Icon, { icon, iconColor, size: iconSize }),
|
|
15996
16045
|
/* @__PURE__ */ jsx87("span", { hidden: true, children: buttonText })
|
|
15997
16046
|
] })
|
|
@@ -16014,9 +16063,11 @@ var cardBase = css72`
|
|
|
16014
16063
|
min-height: unset;
|
|
16015
16064
|
outline: none;
|
|
16016
16065
|
cursor: pointer;
|
|
16066
|
+
transition: border-color var(--duration-xfast) ease-in-out;
|
|
16017
16067
|
|
|
16018
16068
|
&:hover {
|
|
16019
16069
|
--mediacard-title-color: var(--brand-secondary-1);
|
|
16070
|
+
border-color: var(--primary-action-hover);
|
|
16020
16071
|
}
|
|
16021
16072
|
`;
|
|
16022
16073
|
var coverWrapper = css72`
|
|
@@ -16147,7 +16198,7 @@ var MediaCard = ({
|
|
|
16147
16198
|
|
|
16148
16199
|
// src/components/Modal/Modal.tsx
|
|
16149
16200
|
import { CgClose as CgClose5 } from "@react-icons/all-files/cg/CgClose";
|
|
16150
|
-
import React19 from "react";
|
|
16201
|
+
import React19, { useEffect as useEffect10, useRef as useRef6 } from "react";
|
|
16151
16202
|
|
|
16152
16203
|
// src/components/Modal/Modal.styles.ts
|
|
16153
16204
|
import { css as css73 } from "@emotion/react";
|
|
@@ -16159,27 +16210,33 @@ var modalWrapperStyles = css73`
|
|
|
16159
16210
|
justify-content: center;
|
|
16160
16211
|
z-index: var(--z-drawer);
|
|
16161
16212
|
`;
|
|
16162
|
-
var modalBackdropStyles = css73`
|
|
16163
|
-
position: absolute;
|
|
16164
|
-
inset: 0;
|
|
16165
|
-
background-color: var(--brand-secondary-1);
|
|
16166
|
-
opacity: 0.4;
|
|
16167
|
-
`;
|
|
16168
16213
|
var modalStyles = css73`
|
|
16169
16214
|
position: relative;
|
|
16215
|
+
max-width: calc(100% - var(--spacing-base) * 2);
|
|
16216
|
+
max-height: calc(100% - var(--spacing-base) * 2);
|
|
16217
|
+
padding: 0;
|
|
16218
|
+
background-color: transparent;
|
|
16219
|
+
z-index: 1;
|
|
16220
|
+
|
|
16221
|
+
&::backdrop {
|
|
16222
|
+
background-color: var(--brand-secondary-1);
|
|
16223
|
+
opacity: 0.4;
|
|
16224
|
+
}
|
|
16225
|
+
`;
|
|
16226
|
+
var modalInnerStyles = css73`
|
|
16227
|
+
position: relative;
|
|
16228
|
+
width: 100%;
|
|
16229
|
+
height: 100%;
|
|
16170
16230
|
display: flex;
|
|
16171
16231
|
flex-direction: column;
|
|
16172
16232
|
justify-content: stretch;
|
|
16173
|
-
max-width: calc(100% - var(--spacing-base) * 2);
|
|
16174
|
-
max-height: calc(100% - var(--spacing-base) * 2);
|
|
16175
16233
|
gap: var(--spacing-base);
|
|
16176
16234
|
background: var(--gray-50);
|
|
16235
|
+
color: unset;
|
|
16236
|
+
padding: var(--spacing-base);
|
|
16177
16237
|
box-shadow: var(--elevation-500);
|
|
16178
16238
|
border-radius: var(--rounded-base);
|
|
16179
16239
|
border: 1px solid var(--gray-300);
|
|
16180
|
-
padding: var(--spacing-base);
|
|
16181
|
-
color: unset;
|
|
16182
|
-
z-index: 1;
|
|
16183
16240
|
`;
|
|
16184
16241
|
var modalHeaderStyles = css73`
|
|
16185
16242
|
display: flex;
|
|
@@ -16188,6 +16245,9 @@ var modalHeaderStyles = css73`
|
|
|
16188
16245
|
font-size: var(--fs-md);
|
|
16189
16246
|
line-height: 1.2;
|
|
16190
16247
|
`;
|
|
16248
|
+
var modalHeaderHeaderStyles = css73`
|
|
16249
|
+
max-width: calc(100% - 3rem);
|
|
16250
|
+
`;
|
|
16191
16251
|
var modalCloseButtonStyles = css73`
|
|
16192
16252
|
display: block;
|
|
16193
16253
|
padding: 0;
|
|
@@ -16215,47 +16275,63 @@ var Modal = React19.forwardRef(
|
|
|
16215
16275
|
onRequestClose,
|
|
16216
16276
|
width = defaultModalWidth,
|
|
16217
16277
|
height = defaultModalHeight,
|
|
16218
|
-
wrapperClassName,
|
|
16219
16278
|
withoutContentPadding = false,
|
|
16220
16279
|
buttonGroup,
|
|
16221
16280
|
...modalProps
|
|
16222
16281
|
}, ref) => {
|
|
16282
|
+
const dialogRef = useRef6(null);
|
|
16223
16283
|
useShortcut({
|
|
16224
16284
|
handler: onRequestClose,
|
|
16225
16285
|
shortcut: "escape"
|
|
16226
16286
|
});
|
|
16227
|
-
|
|
16228
|
-
|
|
16229
|
-
|
|
16230
|
-
|
|
16231
|
-
|
|
16232
|
-
|
|
16233
|
-
|
|
16234
|
-
|
|
16235
|
-
|
|
16236
|
-
|
|
16237
|
-
|
|
16238
|
-
|
|
16239
|
-
|
|
16240
|
-
|
|
16241
|
-
|
|
16242
|
-
|
|
16243
|
-
|
|
16244
|
-
|
|
16245
|
-
|
|
16246
|
-
|
|
16247
|
-
|
|
16248
|
-
|
|
16249
|
-
|
|
16250
|
-
|
|
16251
|
-
|
|
16252
|
-
|
|
16253
|
-
|
|
16254
|
-
|
|
16255
|
-
|
|
16256
|
-
|
|
16257
|
-
|
|
16258
|
-
|
|
16287
|
+
useEffect10(() => {
|
|
16288
|
+
var _a;
|
|
16289
|
+
(_a = dialogRef.current) == null ? void 0 : _a.showModal();
|
|
16290
|
+
return () => {
|
|
16291
|
+
var _a2;
|
|
16292
|
+
return (_a2 = dialogRef.current) == null ? void 0 : _a2.close();
|
|
16293
|
+
};
|
|
16294
|
+
}, []);
|
|
16295
|
+
return /* @__PURE__ */ jsx89(
|
|
16296
|
+
"dialog",
|
|
16297
|
+
{
|
|
16298
|
+
ref: (element) => {
|
|
16299
|
+
dialogRef.current = element;
|
|
16300
|
+
if (!ref) {
|
|
16301
|
+
return;
|
|
16302
|
+
}
|
|
16303
|
+
if (typeof ref === "function") {
|
|
16304
|
+
ref(element);
|
|
16305
|
+
} else {
|
|
16306
|
+
ref.current = element;
|
|
16307
|
+
}
|
|
16308
|
+
},
|
|
16309
|
+
css: modalStyles,
|
|
16310
|
+
style: { width, height: height === "auto" ? "min-content" : height },
|
|
16311
|
+
"data-testid": "side-dialog",
|
|
16312
|
+
onClick: onRequestClose,
|
|
16313
|
+
...modalProps,
|
|
16314
|
+
children: /* @__PURE__ */ jsxs59("div", { css: modalInnerStyles, onClick: (e) => e.stopPropagation(), children: [
|
|
16315
|
+
/* @__PURE__ */ jsxs59("div", { css: modalHeaderStyles, children: [
|
|
16316
|
+
/* @__PURE__ */ jsx89("div", { css: modalHeaderHeaderStyles, children: header }),
|
|
16317
|
+
/* @__PURE__ */ jsx89(
|
|
16318
|
+
Button,
|
|
16319
|
+
{
|
|
16320
|
+
type: "button",
|
|
16321
|
+
onClick: onRequestClose,
|
|
16322
|
+
css: modalCloseButtonStyles,
|
|
16323
|
+
title: "Close dialog",
|
|
16324
|
+
buttonType: "ghost",
|
|
16325
|
+
"data-testid": "close-dialog",
|
|
16326
|
+
children: /* @__PURE__ */ jsx89(Icon, { icon: CgClose5, iconColor: "gray", size: 24 })
|
|
16327
|
+
}
|
|
16328
|
+
)
|
|
16329
|
+
] }),
|
|
16330
|
+
/* @__PURE__ */ jsx89("div", { css: [modalContentStyles, !withoutContentPadding ? null : { padding: 0 }], children }),
|
|
16331
|
+
buttonGroup ? /* @__PURE__ */ jsx89(HorizontalRhythm, { children: buttonGroup }) : null
|
|
16332
|
+
] })
|
|
16333
|
+
}
|
|
16334
|
+
);
|
|
16259
16335
|
}
|
|
16260
16336
|
);
|
|
16261
16337
|
Modal.displayName = "Modal";
|
|
@@ -16820,7 +16896,7 @@ var previewModalImage = css79`
|
|
|
16820
16896
|
`;
|
|
16821
16897
|
|
|
16822
16898
|
// src/components/ParameterInputs/ParameterImagePreview.tsx
|
|
16823
|
-
import { Fragment as
|
|
16899
|
+
import { Fragment as Fragment13, jsx as jsx95, jsxs as jsxs64 } from "@emotion/react/jsx-runtime";
|
|
16824
16900
|
function ParameterImagePreview({ imageSrc }) {
|
|
16825
16901
|
const [showModal, setShowModal] = useState9(false);
|
|
16826
16902
|
return imageSrc ? /* @__PURE__ */ jsxs64("div", { css: previewWrapper, children: [
|
|
@@ -16838,7 +16914,7 @@ function ParameterImagePreview({ imageSrc }) {
|
|
|
16838
16914
|
] }) : null;
|
|
16839
16915
|
}
|
|
16840
16916
|
var PreviewImageModal = ({ open, onRequestClose, imageSrc }) => {
|
|
16841
|
-
return open ? /* @__PURE__ */ jsx95(
|
|
16917
|
+
return open ? /* @__PURE__ */ jsx95(Fragment13, { children: createPortal2(
|
|
16842
16918
|
/* @__PURE__ */ jsx95(
|
|
16843
16919
|
Modal,
|
|
16844
16920
|
{
|
|
@@ -16975,6 +17051,7 @@ var ParameterShell = ({
|
|
|
16975
17051
|
onResetOverriddenValue,
|
|
16976
17052
|
title: title2,
|
|
16977
17053
|
children,
|
|
17054
|
+
isParameterGroup = false,
|
|
16978
17055
|
...props
|
|
16979
17056
|
}) => {
|
|
16980
17057
|
const [manualErrorMessage, setManualErrorMessage] = useState10(void 0);
|
|
@@ -17018,7 +17095,7 @@ var ParameterShell = ({
|
|
|
17018
17095
|
errorMessage: errorMessaging,
|
|
17019
17096
|
handleManuallySetErrorMessage: (message) => setErrorMessage(message)
|
|
17020
17097
|
},
|
|
17021
|
-
children: /* @__PURE__ */ jsxs65(ParameterShellPlaceholder, { children: [
|
|
17098
|
+
children: isParameterGroup ? /* @__PURE__ */ jsx98("div", { style: { flexGrow: 1 }, children }) : /* @__PURE__ */ jsxs65(ParameterShellPlaceholder, { children: [
|
|
17022
17099
|
children,
|
|
17023
17100
|
hasOverriddenValue && onResetOverriddenValue ? /* @__PURE__ */ jsx98(ParameterOverrideMarker, { onClick: onResetOverriddenValue }) : null
|
|
17024
17101
|
] })
|
|
@@ -17037,7 +17114,7 @@ var ParameterShellPlaceholder = ({ children }) => {
|
|
|
17037
17114
|
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" }) }) });
|
|
17038
17115
|
|
|
17039
17116
|
// src/components/ParameterInputs/ParameterImage.tsx
|
|
17040
|
-
import { Fragment as
|
|
17117
|
+
import { Fragment as Fragment14, jsx as jsx99, jsxs as jsxs66 } from "@emotion/react/jsx-runtime";
|
|
17041
17118
|
var ParameterImage = forwardRef13(
|
|
17042
17119
|
({ children, ...props }, ref) => {
|
|
17043
17120
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
@@ -17051,7 +17128,7 @@ var ParameterImageInner = forwardRef13((props, ref) => {
|
|
|
17051
17128
|
const { value } = props;
|
|
17052
17129
|
const { id, label, hiddenLabel, errorMessage } = useParameterShell();
|
|
17053
17130
|
const deferredValue = useDeferredValue(value);
|
|
17054
|
-
return /* @__PURE__ */ jsxs66(
|
|
17131
|
+
return /* @__PURE__ */ jsxs66(Fragment14, { children: [
|
|
17055
17132
|
/* @__PURE__ */ jsx99(
|
|
17056
17133
|
"input",
|
|
17057
17134
|
{
|
|
@@ -17166,7 +17243,7 @@ var ParameterLinkInner = forwardRef15(
|
|
|
17166
17243
|
);
|
|
17167
17244
|
|
|
17168
17245
|
// src/components/ParameterInputs/ParameterNameAndPublicIdInput.tsx
|
|
17169
|
-
import { Fragment as
|
|
17246
|
+
import { Fragment as Fragment15, jsx as jsx102, jsxs as jsxs68 } from "@emotion/react/jsx-runtime";
|
|
17170
17247
|
var ParameterNameAndPublicIdInput = ({
|
|
17171
17248
|
id,
|
|
17172
17249
|
onBlur,
|
|
@@ -17192,7 +17269,7 @@ var ParameterNameAndPublicIdInput = ({
|
|
|
17192
17269
|
navigator.clipboard.writeText(values[publicIdFieldName]);
|
|
17193
17270
|
};
|
|
17194
17271
|
autoFocus == null ? void 0 : autoFocus();
|
|
17195
|
-
return /* @__PURE__ */ jsxs68(
|
|
17272
|
+
return /* @__PURE__ */ jsxs68(Fragment15, { children: [
|
|
17196
17273
|
/* @__PURE__ */ jsx102(
|
|
17197
17274
|
ParameterInput,
|
|
17198
17275
|
{
|
|
@@ -17357,7 +17434,7 @@ var getLabelForElement = (type) => {
|
|
|
17357
17434
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
17358
17435
|
import { deepEqual as deepEqual2 } from "fast-equals";
|
|
17359
17436
|
import { ParagraphNode as ParagraphNode2 } from "lexical";
|
|
17360
|
-
import { useEffect as
|
|
17437
|
+
import { useEffect as useEffect15, useRef as useRef8 } from "react";
|
|
17361
17438
|
|
|
17362
17439
|
// src/components/ParameterInputs/rich-text/CustomCodeNode.ts
|
|
17363
17440
|
import { CodeNode } from "@lexical/code";
|
|
@@ -17378,10 +17455,10 @@ CustomCodeNode.importDOM = function() {
|
|
|
17378
17455
|
import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
|
|
17379
17456
|
import { mergeRegister } from "@lexical/utils";
|
|
17380
17457
|
import { ParagraphNode } from "lexical";
|
|
17381
|
-
import { useEffect as
|
|
17458
|
+
import { useEffect as useEffect11 } from "react";
|
|
17382
17459
|
function DisableStylesPlugin() {
|
|
17383
17460
|
const [editor] = useLexicalComposerContext();
|
|
17384
|
-
|
|
17461
|
+
useEffect11(() => {
|
|
17385
17462
|
return mergeRegister(
|
|
17386
17463
|
// Disable text alignment on paragraph nodes
|
|
17387
17464
|
editor.registerNodeTransform(ParagraphNode, (node) => {
|
|
@@ -17590,7 +17667,7 @@ import {
|
|
|
17590
17667
|
ElementNode as ElementNode2,
|
|
17591
17668
|
FOCUS_COMMAND
|
|
17592
17669
|
} from "lexical";
|
|
17593
|
-
import { useCallback as useCallback5, useEffect as
|
|
17670
|
+
import { useCallback as useCallback5, useEffect as useEffect12, useRef as useRef7, useState as useState11 } from "react";
|
|
17594
17671
|
|
|
17595
17672
|
// src/components/ParameterInputs/rich-text/utils.ts
|
|
17596
17673
|
import { $isAtNodeEnd } from "@lexical/selection";
|
|
@@ -17628,7 +17705,7 @@ var getSelectedNode = (selection) => {
|
|
|
17628
17705
|
};
|
|
17629
17706
|
|
|
17630
17707
|
// src/components/ParameterInputs/rich-text/LinkNodePlugin.tsx
|
|
17631
|
-
import { Fragment as
|
|
17708
|
+
import { Fragment as Fragment16, jsx as jsx103, jsxs as jsxs69 } from "@emotion/react/jsx-runtime";
|
|
17632
17709
|
var isProjectMapLinkValue = (value) => {
|
|
17633
17710
|
return (value == null ? void 0 : value.type) === "projectMapNode" && Boolean(
|
|
17634
17711
|
value.nodeId && value.path && value.projectMapId
|
|
@@ -17934,16 +18011,16 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
17934
18011
|
};
|
|
17935
18012
|
const [editor] = useLexicalComposerContext2();
|
|
17936
18013
|
const [linkPopoverState, setLinkPopoverState] = useState11();
|
|
17937
|
-
const linkPopoverElRef =
|
|
18014
|
+
const linkPopoverElRef = useRef7(null);
|
|
17938
18015
|
const [isEditorFocused, setIsEditorFocused] = useState11(false);
|
|
17939
18016
|
const [isLinkPopoverFocused, setIsLinkPopoverFocused] = useState11(false);
|
|
17940
|
-
|
|
18017
|
+
useEffect12(() => {
|
|
17941
18018
|
if (!isEditorFocused && !isLinkPopoverFocused) {
|
|
17942
18019
|
setLinkPopoverState(void 0);
|
|
17943
18020
|
return;
|
|
17944
18021
|
}
|
|
17945
18022
|
}, [isEditorFocused, isLinkPopoverFocused]);
|
|
17946
|
-
|
|
18023
|
+
useEffect12(() => {
|
|
17947
18024
|
if (!editor.hasNodes([LinkNode])) {
|
|
17948
18025
|
throw new Error("LinkNode not registered on editor");
|
|
17949
18026
|
}
|
|
@@ -18044,7 +18121,7 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
18044
18121
|
}
|
|
18045
18122
|
});
|
|
18046
18123
|
}, [editor]);
|
|
18047
|
-
|
|
18124
|
+
useEffect12(() => {
|
|
18048
18125
|
return editor.registerUpdateListener(({ editorState }) => {
|
|
18049
18126
|
requestAnimationFrame(() => {
|
|
18050
18127
|
editorState.read(() => {
|
|
@@ -18071,7 +18148,7 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
18071
18148
|
});
|
|
18072
18149
|
});
|
|
18073
18150
|
};
|
|
18074
|
-
return /* @__PURE__ */ jsxs69(
|
|
18151
|
+
return /* @__PURE__ */ jsxs69(Fragment16, { children: [
|
|
18075
18152
|
/* @__PURE__ */ jsx103(
|
|
18076
18153
|
NodeEventPlugin,
|
|
18077
18154
|
{
|
|
@@ -18136,7 +18213,7 @@ import {
|
|
|
18136
18213
|
COMMAND_PRIORITY_CRITICAL,
|
|
18137
18214
|
INDENT_CONTENT_COMMAND
|
|
18138
18215
|
} from "lexical";
|
|
18139
|
-
import { useEffect as
|
|
18216
|
+
import { useEffect as useEffect13 } from "react";
|
|
18140
18217
|
import { jsx as jsx104 } from "@emotion/react/jsx-runtime";
|
|
18141
18218
|
function isIndentPermitted(maxDepth) {
|
|
18142
18219
|
const selection = $getSelection2();
|
|
@@ -18160,7 +18237,7 @@ function isIndentPermitted(maxDepth) {
|
|
|
18160
18237
|
}
|
|
18161
18238
|
function ListIndentPlugin({ maxDepth }) {
|
|
18162
18239
|
const [editor] = useLexicalComposerContext3();
|
|
18163
|
-
|
|
18240
|
+
useEffect13(() => {
|
|
18164
18241
|
return editor.registerCommand(
|
|
18165
18242
|
INDENT_CONTENT_COMMAND,
|
|
18166
18243
|
() => !isIndentPermitted(maxDepth),
|
|
@@ -18193,8 +18270,8 @@ import {
|
|
|
18193
18270
|
FORMAT_TEXT_COMMAND,
|
|
18194
18271
|
SELECTION_CHANGE_COMMAND
|
|
18195
18272
|
} from "lexical";
|
|
18196
|
-
import { useCallback as useCallback6, useEffect as
|
|
18197
|
-
import { Fragment as
|
|
18273
|
+
import { useCallback as useCallback6, useEffect as useEffect14, useMemo as useMemo3, useState as useState12 } from "react";
|
|
18274
|
+
import { Fragment as Fragment17, jsx as jsx105, jsxs as jsxs70 } from "@emotion/react/jsx-runtime";
|
|
18198
18275
|
var toolbar = css84`
|
|
18199
18276
|
background: var(--gray-50);
|
|
18200
18277
|
border-radius: var(--rounded-base);
|
|
@@ -18336,7 +18413,7 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
18336
18413
|
setIsLink(false);
|
|
18337
18414
|
}
|
|
18338
18415
|
}, [editor, setActiveElement, setActiveFormats, setIsLink]);
|
|
18339
|
-
|
|
18416
|
+
useEffect14(() => {
|
|
18340
18417
|
return editor.registerCommand(
|
|
18341
18418
|
SELECTION_CHANGE_COMMAND,
|
|
18342
18419
|
(_payload) => {
|
|
@@ -18346,7 +18423,7 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
18346
18423
|
COMMAND_PRIORITY_CRITICAL2
|
|
18347
18424
|
);
|
|
18348
18425
|
}, [editor, updateToolbar]);
|
|
18349
|
-
|
|
18426
|
+
useEffect14(() => {
|
|
18350
18427
|
return editor.registerUpdateListener(({ editorState }) => {
|
|
18351
18428
|
requestAnimationFrame(() => {
|
|
18352
18429
|
editorState.read(() => {
|
|
@@ -18431,7 +18508,7 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
18431
18508
|
children: /* @__PURE__ */ jsx105(RichTextToolbarIcon, { icon: "link" })
|
|
18432
18509
|
}
|
|
18433
18510
|
) }) : null,
|
|
18434
|
-
visibleLists.size > 0 ? /* @__PURE__ */ jsxs70(
|
|
18511
|
+
visibleLists.size > 0 ? /* @__PURE__ */ jsxs70(Fragment17, { children: [
|
|
18435
18512
|
visibleLists.has("unorderedList") ? /* @__PURE__ */ jsx105(Tooltip, { title: "Bullet List", placement: "top", children: /* @__PURE__ */ jsx105(
|
|
18436
18513
|
"button",
|
|
18437
18514
|
{
|
|
@@ -18594,7 +18671,7 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
18594
18671
|
};
|
|
18595
18672
|
|
|
18596
18673
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
18597
|
-
import { Fragment as
|
|
18674
|
+
import { Fragment as Fragment18, jsx as jsx106, jsxs as jsxs71 } from "@emotion/react/jsx-runtime";
|
|
18598
18675
|
var ParameterRichText = ({
|
|
18599
18676
|
label,
|
|
18600
18677
|
labelLeadingIcon,
|
|
@@ -18651,7 +18728,7 @@ var ParameterRichText = ({
|
|
|
18651
18728
|
children
|
|
18652
18729
|
}
|
|
18653
18730
|
),
|
|
18654
|
-
menuItems ? /* @__PURE__ */ jsx106(ParameterMenuButton, { label: `${label} menu`, children: /* @__PURE__ */ jsx106(
|
|
18731
|
+
menuItems ? /* @__PURE__ */ jsx106(ParameterMenuButton, { label: `${label} menu`, children: /* @__PURE__ */ jsx106(Fragment18, { children: menuItems }) }) : null
|
|
18655
18732
|
]
|
|
18656
18733
|
}
|
|
18657
18734
|
);
|
|
@@ -18762,7 +18839,7 @@ var ParameterRichTextInner = ({
|
|
|
18762
18839
|
},
|
|
18763
18840
|
editable: !readOnly
|
|
18764
18841
|
};
|
|
18765
|
-
return /* @__PURE__ */ jsxs71(
|
|
18842
|
+
return /* @__PURE__ */ jsxs71(Fragment18, { children: [
|
|
18766
18843
|
/* @__PURE__ */ jsx106("div", { css: [editorWrapper], className: editorWrapperClassName, children: /* @__PURE__ */ jsx106(LexicalComposer, { initialConfig: lexicalConfig, children: /* @__PURE__ */ jsx106(
|
|
18767
18844
|
RichText,
|
|
18768
18845
|
{
|
|
@@ -18800,14 +18877,14 @@ var RichText = ({
|
|
|
18800
18877
|
variables,
|
|
18801
18878
|
customControls
|
|
18802
18879
|
}) => {
|
|
18803
|
-
const editorContainerRef =
|
|
18880
|
+
const editorContainerRef = useRef8(null);
|
|
18804
18881
|
const [editor] = useLexicalComposerContext5();
|
|
18805
|
-
|
|
18882
|
+
useEffect15(() => {
|
|
18806
18883
|
if (onRichTextInit) {
|
|
18807
18884
|
onRichTextInit(editor);
|
|
18808
18885
|
}
|
|
18809
18886
|
}, [editor, onRichTextInit]);
|
|
18810
|
-
|
|
18887
|
+
useEffect15(() => {
|
|
18811
18888
|
const removeUpdateListener = editor.registerUpdateListener(({ editorState, prevEditorState }) => {
|
|
18812
18889
|
requestAnimationFrame(() => {
|
|
18813
18890
|
if (!deepEqual2(editorState.toJSON(), prevEditorState.toJSON())) {
|
|
@@ -18819,7 +18896,7 @@ var RichText = ({
|
|
|
18819
18896
|
removeUpdateListener();
|
|
18820
18897
|
};
|
|
18821
18898
|
}, []);
|
|
18822
|
-
return /* @__PURE__ */ jsxs71(
|
|
18899
|
+
return /* @__PURE__ */ jsxs71(Fragment18, { children: [
|
|
18823
18900
|
readOnly ? null : /* @__PURE__ */ jsx106(RichTextToolbar_default, { config, customControls }),
|
|
18824
18901
|
/* @__PURE__ */ jsxs71("div", { css: editorContainer, ref: editorContainerRef, "data-testid": "value-container", children: [
|
|
18825
18902
|
/* @__PURE__ */ jsx106(
|
|
@@ -18845,7 +18922,7 @@ var RichText = ({
|
|
|
18845
18922
|
/* @__PURE__ */ jsx106(ListIndentPlugin, { maxDepth: 4 }),
|
|
18846
18923
|
/* @__PURE__ */ jsx106(DisableStylesPlugin, {}),
|
|
18847
18924
|
/* @__PURE__ */ jsx106(MarkdownShortcutPlugin, { transformers: MARKDOWN_TRANSFORMERS }),
|
|
18848
|
-
/* @__PURE__ */ jsx106(
|
|
18925
|
+
/* @__PURE__ */ jsx106(Fragment18, { children })
|
|
18849
18926
|
] })
|
|
18850
18927
|
] });
|
|
18851
18928
|
};
|
|
@@ -19452,14 +19529,14 @@ var SwitchText = css92`
|
|
|
19452
19529
|
`;
|
|
19453
19530
|
|
|
19454
19531
|
// src/components/Switch/Switch.tsx
|
|
19455
|
-
import { Fragment as
|
|
19532
|
+
import { Fragment as Fragment19, jsx as jsx114, jsxs as jsxs76 } from "@emotion/react/jsx-runtime";
|
|
19456
19533
|
var Switch = React23.forwardRef(
|
|
19457
19534
|
({ label, infoText, toggleText, children, ...inputProps }, ref) => {
|
|
19458
19535
|
let additionalText = infoText;
|
|
19459
19536
|
if (infoText && toggleText) {
|
|
19460
19537
|
additionalText = inputProps.checked ? toggleText : infoText;
|
|
19461
19538
|
}
|
|
19462
|
-
return /* @__PURE__ */ jsxs76(
|
|
19539
|
+
return /* @__PURE__ */ jsxs76(Fragment19, { children: [
|
|
19463
19540
|
/* @__PURE__ */ jsxs76("label", { css: [SwitchInputContainer, inputProps.disabled ? SwitchInputDisabled : void 0], children: [
|
|
19464
19541
|
/* @__PURE__ */ jsx114("input", { type: "checkbox", css: SwitchInput, ...inputProps, ref }),
|
|
19465
19542
|
/* @__PURE__ */ jsx114("span", { css: SwitchInputLabel, children: label })
|
|
@@ -19539,7 +19616,7 @@ var TableCellData = React24.forwardRef(
|
|
|
19539
19616
|
);
|
|
19540
19617
|
|
|
19541
19618
|
// src/components/Tabs/Tabs.tsx
|
|
19542
|
-
import { createContext as createContext5, useContext as useContext6, useEffect as
|
|
19619
|
+
import { createContext as createContext5, useContext as useContext6, useEffect as useEffect16, useMemo as useMemo6 } from "react";
|
|
19543
19620
|
import {
|
|
19544
19621
|
Tab as ReakitTab,
|
|
19545
19622
|
TabList as ReakitTabList,
|
|
@@ -19589,7 +19666,7 @@ var Tabs = ({ children, onSelectedIdChange, useHashForState, selectedId, ...prop
|
|
|
19589
19666
|
return useHashForState && typeof window !== "undefined" && window.location.hash ? window.location.hash.substring(1) : void 0;
|
|
19590
19667
|
}, [selectedId, useHashForState]);
|
|
19591
19668
|
const tab = useTabState({ ...props, selectedId: selected });
|
|
19592
|
-
|
|
19669
|
+
useEffect16(() => {
|
|
19593
19670
|
var _a;
|
|
19594
19671
|
const selectedValueWithoutNull = (_a = tab.selectedId) != null ? _a : void 0;
|
|
19595
19672
|
onSelectedIdChange == null ? void 0 : onSelectedIdChange(selectedValueWithoutNull);
|
|
@@ -19598,7 +19675,7 @@ var Tabs = ({ children, onSelectedIdChange, useHashForState, selectedId, ...prop
|
|
|
19598
19675
|
window.history.pushState(null, "", hashValue);
|
|
19599
19676
|
}
|
|
19600
19677
|
}, [tab.selectedId, onSelectedIdChange, useHashForState]);
|
|
19601
|
-
|
|
19678
|
+
useEffect16(() => {
|
|
19602
19679
|
if (selected && selected !== tab.selectedId) {
|
|
19603
19680
|
tab.setSelectedId(selected);
|
|
19604
19681
|
}
|
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 */
|
|
@@ -14793,6 +14793,13 @@ var detailsContent = import_react53.css`
|
|
|
14793
14793
|
animation: ${fadeInRtl} var(--duration-fast) var(--timing-ease-out) forwards;
|
|
14794
14794
|
will-change: height;
|
|
14795
14795
|
`;
|
|
14796
|
+
var detailsContentIndented = import_react53.css`
|
|
14797
|
+
margin-left: calc(1.25rem / 2);
|
|
14798
|
+
border-left: 1px solid var(--gray-300);
|
|
14799
|
+
padding-top: calc(var(--spacing-md) / 2);
|
|
14800
|
+
padding-left: var(--spacing-base);
|
|
14801
|
+
padding-bottom: var(--spacing-sm);
|
|
14802
|
+
`;
|
|
14796
14803
|
var summary = import_react53.css`
|
|
14797
14804
|
align-items: center;
|
|
14798
14805
|
cursor: pointer;
|
|
@@ -14807,6 +14814,9 @@ var summary = import_react53.css`
|
|
|
14807
14814
|
display: none;
|
|
14808
14815
|
}
|
|
14809
14816
|
`;
|
|
14817
|
+
var summaryCompact = import_react53.css`
|
|
14818
|
+
padding: 0;
|
|
14819
|
+
`;
|
|
14810
14820
|
var summaryIcon = import_react53.css`
|
|
14811
14821
|
transition: rotate var(--duration-fast) var(--timing-ease-out);
|
|
14812
14822
|
rotate: -90deg;
|
|
@@ -14822,6 +14832,8 @@ var Details = ({
|
|
|
14822
14832
|
children,
|
|
14823
14833
|
isOpenByDefault = false,
|
|
14824
14834
|
isOpen,
|
|
14835
|
+
isIndented = false,
|
|
14836
|
+
isCompact = false,
|
|
14825
14837
|
onChange,
|
|
14826
14838
|
...props
|
|
14827
14839
|
}) => {
|
|
@@ -14843,7 +14855,7 @@ var Details = ({
|
|
|
14843
14855
|
ref: detailsRef,
|
|
14844
14856
|
...props,
|
|
14845
14857
|
children: [
|
|
14846
|
-
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("summary", { "data-testid": "summary", css: summary, children: [
|
|
14858
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("summary", { "data-testid": "summary", css: [summary, isCompact ? summaryCompact : null], children: [
|
|
14847
14859
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
14848
14860
|
Icon,
|
|
14849
14861
|
{
|
|
@@ -14855,7 +14867,14 @@ var Details = ({
|
|
|
14855
14867
|
),
|
|
14856
14868
|
summary2
|
|
14857
14869
|
] }),
|
|
14858
|
-
memoizedIsOpen ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
14870
|
+
memoizedIsOpen ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
14871
|
+
"div",
|
|
14872
|
+
{
|
|
14873
|
+
"data-testid": "details-content",
|
|
14874
|
+
css: [detailsContent, isIndented ? detailsContentIndented : null],
|
|
14875
|
+
children
|
|
14876
|
+
}
|
|
14877
|
+
) : null
|
|
14859
14878
|
]
|
|
14860
14879
|
}
|
|
14861
14880
|
);
|
|
@@ -15113,10 +15132,12 @@ var useCurrentDrawer = () => {
|
|
|
15113
15132
|
};
|
|
15114
15133
|
var Drawer = import_react56.default.forwardRef(
|
|
15115
15134
|
({ minWidth, maxWidth, position, leftAligned, ...drawerProps }, ref) => {
|
|
15135
|
+
var _a;
|
|
15116
15136
|
const { stackId: inheritedStackId } = useCurrentDrawer();
|
|
15117
15137
|
const { drawerTakeoverStackId } = useDrawer();
|
|
15118
15138
|
const drawerRendererProps = { width: drawerProps.width, minWidth, maxWidth, position, leftAligned };
|
|
15119
|
-
|
|
15139
|
+
const resolvedStickyStackIdRef = (0, import_react56.useRef)((_a = drawerTakeoverStackId != null ? drawerTakeoverStackId : drawerProps.stackId) != null ? _a : inheritedStackId);
|
|
15140
|
+
return resolvedStickyStackIdRef.current ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(DrawerInner, { ref, ...drawerProps, stackId: resolvedStickyStackIdRef.current }) : /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(DrawerProvider, { children: [
|
|
15120
15141
|
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(DrawerInner, { ref, ...drawerProps }),
|
|
15121
15142
|
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(DrawerRenderer, { stackId: defaultSackId, ...drawerRendererProps })
|
|
15122
15143
|
] });
|
|
@@ -15551,19 +15572,29 @@ var import_MdWarning = require("@react-icons/all-files/md/MdWarning");
|
|
|
15551
15572
|
// src/components/Input/styles/ErrorMessage.styles.ts
|
|
15552
15573
|
init_emotion_jsx_shim();
|
|
15553
15574
|
var import_react65 = require("@emotion/react");
|
|
15554
|
-
var
|
|
15575
|
+
var errorMessageStyles = import_react65.css`
|
|
15555
15576
|
align-items: center;
|
|
15556
15577
|
color: var(--brand-secondary-5);
|
|
15557
15578
|
display: flex;
|
|
15558
15579
|
gap: var(--spacing-sm);
|
|
15559
15580
|
`;
|
|
15581
|
+
var errorMessageTextStyles = import_react65.css`
|
|
15582
|
+
/* We hide the text at width 5rem or below */
|
|
15583
|
+
max-width: max(0px, calc((100% - 5rem) * 9999));
|
|
15584
|
+
overflow: hidden;
|
|
15585
|
+
`;
|
|
15586
|
+
var errorMessageTextTruncatedStyles = import_react65.css`
|
|
15587
|
+
overflow: hidden;
|
|
15588
|
+
text-overflow: ellipsis;
|
|
15589
|
+
white-space: nowrap;
|
|
15590
|
+
`;
|
|
15560
15591
|
|
|
15561
15592
|
// src/components/Input/ErrorMessage.tsx
|
|
15562
15593
|
var import_jsx_runtime51 = require("@emotion/react/jsx-runtime");
|
|
15563
|
-
var ErrorMessage = ({ message, testId, ...otherProps }) => {
|
|
15564
|
-
return message ? /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("span", { role: "alert", css:
|
|
15594
|
+
var ErrorMessage = ({ message, testId, truncated = false, ...otherProps }) => {
|
|
15595
|
+
return message ? /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("span", { role: "alert", css: errorMessageStyles, "data-testid": testId, ...otherProps, title: message, children: [
|
|
15565
15596
|
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Icon, { icon: import_MdWarning.MdWarning, size: "1rem", iconColor: "currentColor" }) }),
|
|
15566
|
-
message
|
|
15597
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { css: [errorMessageTextStyles, truncated ? errorMessageTextTruncatedStyles : null], children: message })
|
|
15567
15598
|
] }) : null;
|
|
15568
15599
|
};
|
|
15569
15600
|
|
|
@@ -16316,6 +16347,15 @@ var imgLoaded = import_react74.css`
|
|
|
16316
16347
|
var brokenImage = import_react74.css`
|
|
16317
16348
|
height: 160px;
|
|
16318
16349
|
`;
|
|
16350
|
+
var brokenImageMessage = import_react74.css`
|
|
16351
|
+
position: absolute;
|
|
16352
|
+
bottom: var(--spacing-xs);
|
|
16353
|
+
left: var(--spacing-xs);
|
|
16354
|
+
width: 100%;
|
|
16355
|
+
justify-content: center;
|
|
16356
|
+
padding-inline: var(--spacing-xs);
|
|
16357
|
+
font-size: var(--fs-sm);
|
|
16358
|
+
`;
|
|
16319
16359
|
var variantFillImageWrapper = import_react74.css`
|
|
16320
16360
|
display: flex;
|
|
16321
16361
|
justify-content: center;
|
|
@@ -16324,6 +16364,7 @@ var variantFillImageWrapper = import_react74.css`
|
|
|
16324
16364
|
`;
|
|
16325
16365
|
var variantFillImageImg = import_react74.css`
|
|
16326
16366
|
height: inherit;
|
|
16367
|
+
width: inherit;
|
|
16327
16368
|
`;
|
|
16328
16369
|
|
|
16329
16370
|
// src/components/Image/ImageBroken.tsx
|
|
@@ -16442,18 +16483,26 @@ function Image({
|
|
|
16442
16483
|
onError: handleErrorEvent
|
|
16443
16484
|
}
|
|
16444
16485
|
) : null,
|
|
16445
|
-
src && loadErrorText ? /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
|
16446
|
-
|
|
16447
|
-
|
|
16448
|
-
{
|
|
16449
|
-
|
|
16450
|
-
|
|
16451
|
-
height
|
|
16452
|
-
|
|
16453
|
-
|
|
16454
|
-
|
|
16455
|
-
|
|
16456
|
-
|
|
16486
|
+
src && loadErrorText ? /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
|
16487
|
+
"span",
|
|
16488
|
+
{
|
|
16489
|
+
style: {
|
|
16490
|
+
display: "inline-flex",
|
|
16491
|
+
position: "relative",
|
|
16492
|
+
...variant === "fill-container" ? {} : { width, height }
|
|
16493
|
+
},
|
|
16494
|
+
children: [
|
|
16495
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
16496
|
+
ImageBroken,
|
|
16497
|
+
{
|
|
16498
|
+
css: [brokenImage, img, imgLoaded],
|
|
16499
|
+
"data-testid": "broken-image"
|
|
16500
|
+
}
|
|
16501
|
+
),
|
|
16502
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(ErrorMessage, { message: loadErrorText, css: brokenImageMessage, truncated: true })
|
|
16503
|
+
]
|
|
16504
|
+
}
|
|
16505
|
+
) : null
|
|
16457
16506
|
]
|
|
16458
16507
|
}
|
|
16459
16508
|
);
|
|
@@ -17806,9 +17855,11 @@ var cardBase = import_react96.css`
|
|
|
17806
17855
|
min-height: unset;
|
|
17807
17856
|
outline: none;
|
|
17808
17857
|
cursor: pointer;
|
|
17858
|
+
transition: border-color var(--duration-xfast) ease-in-out;
|
|
17809
17859
|
|
|
17810
17860
|
&:hover {
|
|
17811
17861
|
--mediacard-title-color: var(--brand-secondary-1);
|
|
17862
|
+
border-color: var(--primary-action-hover);
|
|
17812
17863
|
}
|
|
17813
17864
|
`;
|
|
17814
17865
|
var coverWrapper = import_react96.css`
|
|
@@ -17953,27 +18004,33 @@ var modalWrapperStyles = import_react98.css`
|
|
|
17953
18004
|
justify-content: center;
|
|
17954
18005
|
z-index: var(--z-drawer);
|
|
17955
18006
|
`;
|
|
17956
|
-
var modalBackdropStyles = import_react98.css`
|
|
17957
|
-
position: absolute;
|
|
17958
|
-
inset: 0;
|
|
17959
|
-
background-color: var(--brand-secondary-1);
|
|
17960
|
-
opacity: 0.4;
|
|
17961
|
-
`;
|
|
17962
18007
|
var modalStyles = import_react98.css`
|
|
17963
18008
|
position: relative;
|
|
18009
|
+
max-width: calc(100% - var(--spacing-base) * 2);
|
|
18010
|
+
max-height: calc(100% - var(--spacing-base) * 2);
|
|
18011
|
+
padding: 0;
|
|
18012
|
+
background-color: transparent;
|
|
18013
|
+
z-index: 1;
|
|
18014
|
+
|
|
18015
|
+
&::backdrop {
|
|
18016
|
+
background-color: var(--brand-secondary-1);
|
|
18017
|
+
opacity: 0.4;
|
|
18018
|
+
}
|
|
18019
|
+
`;
|
|
18020
|
+
var modalInnerStyles = import_react98.css`
|
|
18021
|
+
position: relative;
|
|
18022
|
+
width: 100%;
|
|
18023
|
+
height: 100%;
|
|
17964
18024
|
display: flex;
|
|
17965
18025
|
flex-direction: column;
|
|
17966
18026
|
justify-content: stretch;
|
|
17967
|
-
max-width: calc(100% - var(--spacing-base) * 2);
|
|
17968
|
-
max-height: calc(100% - var(--spacing-base) * 2);
|
|
17969
18027
|
gap: var(--spacing-base);
|
|
17970
18028
|
background: var(--gray-50);
|
|
18029
|
+
color: unset;
|
|
18030
|
+
padding: var(--spacing-base);
|
|
17971
18031
|
box-shadow: var(--elevation-500);
|
|
17972
18032
|
border-radius: var(--rounded-base);
|
|
17973
18033
|
border: 1px solid var(--gray-300);
|
|
17974
|
-
padding: var(--spacing-base);
|
|
17975
|
-
color: unset;
|
|
17976
|
-
z-index: 1;
|
|
17977
18034
|
`;
|
|
17978
18035
|
var modalHeaderStyles = import_react98.css`
|
|
17979
18036
|
display: flex;
|
|
@@ -17982,6 +18039,9 @@ var modalHeaderStyles = import_react98.css`
|
|
|
17982
18039
|
font-size: var(--fs-md);
|
|
17983
18040
|
line-height: 1.2;
|
|
17984
18041
|
`;
|
|
18042
|
+
var modalHeaderHeaderStyles = import_react98.css`
|
|
18043
|
+
max-width: calc(100% - 3rem);
|
|
18044
|
+
`;
|
|
17985
18045
|
var modalCloseButtonStyles = import_react98.css`
|
|
17986
18046
|
display: block;
|
|
17987
18047
|
padding: 0;
|
|
@@ -18009,47 +18069,63 @@ var Modal = import_react99.default.forwardRef(
|
|
|
18009
18069
|
onRequestClose,
|
|
18010
18070
|
width = defaultModalWidth,
|
|
18011
18071
|
height = defaultModalHeight,
|
|
18012
|
-
wrapperClassName,
|
|
18013
18072
|
withoutContentPadding = false,
|
|
18014
18073
|
buttonGroup,
|
|
18015
18074
|
...modalProps
|
|
18016
18075
|
}, ref) => {
|
|
18076
|
+
const dialogRef = (0, import_react99.useRef)(null);
|
|
18017
18077
|
useShortcut({
|
|
18018
18078
|
handler: onRequestClose,
|
|
18019
18079
|
shortcut: "escape"
|
|
18020
18080
|
});
|
|
18021
|
-
|
|
18022
|
-
|
|
18023
|
-
|
|
18024
|
-
|
|
18025
|
-
|
|
18026
|
-
|
|
18027
|
-
|
|
18028
|
-
|
|
18029
|
-
|
|
18030
|
-
|
|
18031
|
-
|
|
18032
|
-
|
|
18033
|
-
|
|
18034
|
-
|
|
18035
|
-
|
|
18036
|
-
|
|
18037
|
-
|
|
18038
|
-
|
|
18039
|
-
|
|
18040
|
-
|
|
18041
|
-
|
|
18042
|
-
|
|
18043
|
-
|
|
18044
|
-
|
|
18045
|
-
|
|
18046
|
-
|
|
18047
|
-
|
|
18048
|
-
|
|
18049
|
-
|
|
18050
|
-
|
|
18051
|
-
|
|
18052
|
-
|
|
18081
|
+
(0, import_react99.useEffect)(() => {
|
|
18082
|
+
var _a;
|
|
18083
|
+
(_a = dialogRef.current) == null ? void 0 : _a.showModal();
|
|
18084
|
+
return () => {
|
|
18085
|
+
var _a2;
|
|
18086
|
+
return (_a2 = dialogRef.current) == null ? void 0 : _a2.close();
|
|
18087
|
+
};
|
|
18088
|
+
}, []);
|
|
18089
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
18090
|
+
"dialog",
|
|
18091
|
+
{
|
|
18092
|
+
ref: (element) => {
|
|
18093
|
+
dialogRef.current = element;
|
|
18094
|
+
if (!ref) {
|
|
18095
|
+
return;
|
|
18096
|
+
}
|
|
18097
|
+
if (typeof ref === "function") {
|
|
18098
|
+
ref(element);
|
|
18099
|
+
} else {
|
|
18100
|
+
ref.current = element;
|
|
18101
|
+
}
|
|
18102
|
+
},
|
|
18103
|
+
css: modalStyles,
|
|
18104
|
+
style: { width, height: height === "auto" ? "min-content" : height },
|
|
18105
|
+
"data-testid": "side-dialog",
|
|
18106
|
+
onClick: onRequestClose,
|
|
18107
|
+
...modalProps,
|
|
18108
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { css: modalInnerStyles, onClick: (e) => e.stopPropagation(), children: [
|
|
18109
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { css: modalHeaderStyles, children: [
|
|
18110
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { css: modalHeaderHeaderStyles, children: header }),
|
|
18111
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
18112
|
+
Button,
|
|
18113
|
+
{
|
|
18114
|
+
type: "button",
|
|
18115
|
+
onClick: onRequestClose,
|
|
18116
|
+
css: modalCloseButtonStyles,
|
|
18117
|
+
title: "Close dialog",
|
|
18118
|
+
buttonType: "ghost",
|
|
18119
|
+
"data-testid": "close-dialog",
|
|
18120
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(Icon, { icon: import_CgClose6.CgClose, iconColor: "gray", size: 24 })
|
|
18121
|
+
}
|
|
18122
|
+
)
|
|
18123
|
+
] }),
|
|
18124
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { css: [modalContentStyles, !withoutContentPadding ? null : { padding: 0 }], children }),
|
|
18125
|
+
buttonGroup ? /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(HorizontalRhythm, { children: buttonGroup }) : null
|
|
18126
|
+
] })
|
|
18127
|
+
}
|
|
18128
|
+
);
|
|
18053
18129
|
}
|
|
18054
18130
|
);
|
|
18055
18131
|
Modal.displayName = "Modal";
|
|
@@ -18793,6 +18869,7 @@ var ParameterShell = ({
|
|
|
18793
18869
|
onResetOverriddenValue,
|
|
18794
18870
|
title: title2,
|
|
18795
18871
|
children,
|
|
18872
|
+
isParameterGroup = false,
|
|
18796
18873
|
...props
|
|
18797
18874
|
}) => {
|
|
18798
18875
|
const [manualErrorMessage, setManualErrorMessage] = (0, import_react111.useState)(void 0);
|
|
@@ -18836,7 +18913,7 @@ var ParameterShell = ({
|
|
|
18836
18913
|
errorMessage: errorMessaging,
|
|
18837
18914
|
handleManuallySetErrorMessage: (message) => setErrorMessage(message)
|
|
18838
18915
|
},
|
|
18839
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(ParameterShellPlaceholder, { children: [
|
|
18916
|
+
children: isParameterGroup ? /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { style: { flexGrow: 1 }, children }) : /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(ParameterShellPlaceholder, { children: [
|
|
18840
18917
|
children,
|
|
18841
18918
|
hasOverriddenValue && onResetOverriddenValue ? /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(ParameterOverrideMarker, { onClick: onResetOverriddenValue }) : null
|
|
18842
18919
|
] })
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/design-system",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.79.0",
|
|
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.
|
|
27
|
-
"@uniformdev/richtext": "^19.
|
|
26
|
+
"@uniformdev/canvas": "^19.79.0",
|
|
27
|
+
"@uniformdev/richtext": "^19.79.0",
|
|
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": "78f5ededbaa1a67d58d808eac23ab64769e14e10"
|
|
71
71
|
}
|