@uniformdev/design-system 19.77.0 → 19.77.1-alpha.47
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 +214 -117
- package/dist/index.d.mts +30 -5
- package/dist/index.d.ts +30 -5
- package/dist/index.js +169 -72
- 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 */
|
|
@@ -133,12 +133,22 @@ var Theme = ({ disableReset = false, disableGlobalReset = false }) => {
|
|
|
133
133
|
/* max text width */
|
|
134
134
|
--prose: 65ch;
|
|
135
135
|
|
|
136
|
+
/* elevation */
|
|
137
|
+
--elevation-0: none;
|
|
138
|
+
--elevation-100: 0 0 2px 0 rgba(13, 24, 39, 0.08), 0 2px 4px 0 rgba(17, 24, 39, 0.08);
|
|
139
|
+
--elevation-200: 0 0 2px 0 rgba(17, 24, 39, 0.07), 0 2px 4px 0 rgba(13, 24, 39, 0.07), 0 4px 8px 0 rgba(17, 24, 39, 0.07);
|
|
140
|
+
--elevation-300: 0 8px 16px 0 rgba(17, 24, 39, 0.06), 0 2px 4px 0 rgba(13, 24, 39, 0.06), 0 4px 8px 0 rgba(17, 24, 39, 0.06);
|
|
141
|
+
--elevation-400: 0 8px 16px 0 rgba(17, 24, 39, 0.05), 0 16px 24px 0 rgba(13, 24, 39, 0.05), 0 4px 8px 0 rgba(17, 24, 39, 0.05);
|
|
142
|
+
--elevation-500: 0 8px 16px 0 rgba(17, 24, 39, 0.04), 0 16px 24px 0 rgba(13, 24, 39, 0.04), 0 24px 32px 0 rgba(17, 24, 39, 0.04);
|
|
143
|
+
--elevation-600: 0 32px 40px 0 rgba(17, 24, 39, 0.03), 0 16px 24px 0 rgba(13, 24, 39, 0.03), 0 24px 32px 0 rgba(17, 24, 39, 0.03);
|
|
144
|
+
|
|
145
|
+
/* deprecated in favour of --elevation-* variables */
|
|
136
146
|
/* brand shadow styles */
|
|
137
|
-
--shadow-sm:
|
|
138
|
-
--shadow-base:
|
|
139
|
-
|
|
140
|
-
--shadow-
|
|
141
|
-
|
|
147
|
+
--shadow-sm: var(--elevation-100);
|
|
148
|
+
--shadow-base: var(--elevation-200);
|
|
149
|
+
--shadow-md: var(--elevation-300);
|
|
150
|
+
--shadow-xl: var(--elevation-600);
|
|
151
|
+
/* deprecated in favour of --elevation-* variables */
|
|
142
152
|
|
|
143
153
|
/* rounder corners */
|
|
144
154
|
--rounded-sm: 0.125rem; /* 2px */
|
|
@@ -13093,6 +13103,13 @@ var detailsContent = css41`
|
|
|
13093
13103
|
animation: ${fadeInRtl} var(--duration-fast) var(--timing-ease-out) forwards;
|
|
13094
13104
|
will-change: height;
|
|
13095
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
|
+
`;
|
|
13096
13113
|
var summary = css41`
|
|
13097
13114
|
align-items: center;
|
|
13098
13115
|
cursor: pointer;
|
|
@@ -13107,6 +13124,9 @@ var summary = css41`
|
|
|
13107
13124
|
display: none;
|
|
13108
13125
|
}
|
|
13109
13126
|
`;
|
|
13127
|
+
var summaryCompact = css41`
|
|
13128
|
+
padding: 0;
|
|
13129
|
+
`;
|
|
13110
13130
|
var summaryIcon = css41`
|
|
13111
13131
|
transition: rotate var(--duration-fast) var(--timing-ease-out);
|
|
13112
13132
|
rotate: -90deg;
|
|
@@ -13122,6 +13142,8 @@ var Details = ({
|
|
|
13122
13142
|
children,
|
|
13123
13143
|
isOpenByDefault = false,
|
|
13124
13144
|
isOpen,
|
|
13145
|
+
isIndented = false,
|
|
13146
|
+
isCompact = false,
|
|
13125
13147
|
onChange,
|
|
13126
13148
|
...props
|
|
13127
13149
|
}) => {
|
|
@@ -13143,7 +13165,7 @@ var Details = ({
|
|
|
13143
13165
|
ref: detailsRef,
|
|
13144
13166
|
...props,
|
|
13145
13167
|
children: [
|
|
13146
|
-
/* @__PURE__ */ jsxs25("summary", { "data-testid": "summary", css: summary, children: [
|
|
13168
|
+
/* @__PURE__ */ jsxs25("summary", { "data-testid": "summary", css: [summary, isCompact ? summaryCompact : null], children: [
|
|
13147
13169
|
/* @__PURE__ */ jsx42(
|
|
13148
13170
|
Icon,
|
|
13149
13171
|
{
|
|
@@ -13155,7 +13177,14 @@ var Details = ({
|
|
|
13155
13177
|
),
|
|
13156
13178
|
summary2
|
|
13157
13179
|
] }),
|
|
13158
|
-
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
|
|
13159
13188
|
]
|
|
13160
13189
|
}
|
|
13161
13190
|
);
|
|
@@ -13410,10 +13439,12 @@ var useCurrentDrawer = () => {
|
|
|
13410
13439
|
};
|
|
13411
13440
|
var Drawer = React13.forwardRef(
|
|
13412
13441
|
({ minWidth, maxWidth, position, leftAligned, ...drawerProps }, ref) => {
|
|
13442
|
+
var _a;
|
|
13413
13443
|
const { stackId: inheritedStackId } = useCurrentDrawer();
|
|
13414
13444
|
const { drawerTakeoverStackId } = useDrawer();
|
|
13415
13445
|
const drawerRendererProps = { width: drawerProps.width, minWidth, maxWidth, position, leftAligned };
|
|
13416
|
-
|
|
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: [
|
|
13417
13448
|
/* @__PURE__ */ jsx44(DrawerInner, { ref, ...drawerProps }),
|
|
13418
13449
|
/* @__PURE__ */ jsx44(DrawerRenderer, { stackId: defaultSackId, ...drawerRendererProps })
|
|
13419
13450
|
] });
|
|
@@ -13825,19 +13856,29 @@ import { MdWarning } from "@react-icons/all-files/md/MdWarning";
|
|
|
13825
13856
|
|
|
13826
13857
|
// src/components/Input/styles/ErrorMessage.styles.ts
|
|
13827
13858
|
import { css as css47 } from "@emotion/react";
|
|
13828
|
-
var
|
|
13859
|
+
var errorMessageStyles = css47`
|
|
13829
13860
|
align-items: center;
|
|
13830
13861
|
color: var(--brand-secondary-5);
|
|
13831
13862
|
display: flex;
|
|
13832
13863
|
gap: var(--spacing-sm);
|
|
13833
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
|
+
`;
|
|
13834
13875
|
|
|
13835
13876
|
// src/components/Input/ErrorMessage.tsx
|
|
13836
13877
|
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:
|
|
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: [
|
|
13839
13880
|
/* @__PURE__ */ jsx51("span", { children: /* @__PURE__ */ jsx51(Icon, { icon: MdWarning, size: "1rem", iconColor: "currentColor" }) }),
|
|
13840
|
-
message
|
|
13881
|
+
/* @__PURE__ */ jsx51("span", { css: [errorMessageTextStyles, truncated ? errorMessageTextTruncatedStyles : null], children: message })
|
|
13841
13882
|
] }) : null;
|
|
13842
13883
|
};
|
|
13843
13884
|
|
|
@@ -14571,6 +14612,15 @@ var imgLoaded = css54`
|
|
|
14571
14612
|
var brokenImage = css54`
|
|
14572
14613
|
height: 160px;
|
|
14573
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
|
+
`;
|
|
14574
14624
|
var variantFillImageWrapper = css54`
|
|
14575
14625
|
display: flex;
|
|
14576
14626
|
justify-content: center;
|
|
@@ -14579,6 +14629,7 @@ var variantFillImageWrapper = css54`
|
|
|
14579
14629
|
`;
|
|
14580
14630
|
var variantFillImageImg = css54`
|
|
14581
14631
|
height: inherit;
|
|
14632
|
+
width: inherit;
|
|
14582
14633
|
`;
|
|
14583
14634
|
|
|
14584
14635
|
// src/components/Image/ImageBroken.tsx
|
|
@@ -14617,7 +14668,7 @@ var ImageBroken = ({ width, height, ...props }) => {
|
|
|
14617
14668
|
};
|
|
14618
14669
|
|
|
14619
14670
|
// src/components/Image/Image.tsx
|
|
14620
|
-
import {
|
|
14671
|
+
import { jsx as jsx66, jsxs as jsxs41 } from "@emotion/react/jsx-runtime";
|
|
14621
14672
|
var MIN_LOADING_MS = 100;
|
|
14622
14673
|
function Image({
|
|
14623
14674
|
alt,
|
|
@@ -14696,18 +14747,26 @@ function Image({
|
|
|
14696
14747
|
onError: handleErrorEvent
|
|
14697
14748
|
}
|
|
14698
14749
|
) : null,
|
|
14699
|
-
src && loadErrorText ? /* @__PURE__ */ jsxs41(
|
|
14700
|
-
|
|
14701
|
-
|
|
14702
|
-
{
|
|
14703
|
-
|
|
14704
|
-
|
|
14705
|
-
height
|
|
14706
|
-
|
|
14707
|
-
|
|
14708
|
-
|
|
14709
|
-
|
|
14710
|
-
|
|
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
|
|
14711
14770
|
]
|
|
14712
14771
|
}
|
|
14713
14772
|
);
|
|
@@ -15087,10 +15146,10 @@ var IntegrationLoadingFrame = css58`
|
|
|
15087
15146
|
`;
|
|
15088
15147
|
|
|
15089
15148
|
// src/components/Tiles/IntegrationLoadingTile.tsx
|
|
15090
|
-
import { Fragment as
|
|
15149
|
+
import { Fragment as Fragment10, jsx as jsx72, jsxs as jsxs46 } from "@emotion/react/jsx-runtime";
|
|
15091
15150
|
var IntegrationLoadingTile = ({ count = 1 }) => {
|
|
15092
15151
|
const componentCount = Array.from(Array(count).keys());
|
|
15093
|
-
return /* @__PURE__ */ jsx72(
|
|
15152
|
+
return /* @__PURE__ */ jsx72(Fragment10, { children: componentCount.map((i) => /* @__PURE__ */ jsxs46("div", { css: IntegrationLoadingTileContainer, children: [
|
|
15094
15153
|
/* @__PURE__ */ jsx72("div", { css: [IntegrationLoadingTileImg, IntegrationLoadingFrame], role: "presentation" }),
|
|
15095
15154
|
/* @__PURE__ */ jsx72("div", { css: [IntegrationLoadingTileText, IntegrationLoadingFrame] })
|
|
15096
15155
|
] }, i)) });
|
|
@@ -15332,7 +15391,7 @@ var IntegrationModalHeaderContentWrapper = css63`
|
|
|
15332
15391
|
`;
|
|
15333
15392
|
|
|
15334
15393
|
// src/components/IntegrationModalHeader/IntegrationModalHeader.tsx
|
|
15335
|
-
import { Fragment as
|
|
15394
|
+
import { Fragment as Fragment11, jsx as jsx78, jsxs as jsxs49 } from "@emotion/react/jsx-runtime";
|
|
15336
15395
|
var HexModalBackground = ({ ...props }) => {
|
|
15337
15396
|
return /* @__PURE__ */ jsxs49(
|
|
15338
15397
|
"svg",
|
|
@@ -15373,7 +15432,7 @@ var HexModalBackground = ({ ...props }) => {
|
|
|
15373
15432
|
);
|
|
15374
15433
|
};
|
|
15375
15434
|
var IntegrationModalHeader = ({ icon, name, menu, children }) => {
|
|
15376
|
-
return /* @__PURE__ */ jsxs49(
|
|
15435
|
+
return /* @__PURE__ */ jsxs49(Fragment11, { children: [
|
|
15377
15436
|
/* @__PURE__ */ jsx78(HexModalBackground, { css: IntegrationModalHeaderSVGBackground, role: "presentation" }),
|
|
15378
15437
|
/* @__PURE__ */ jsx78("div", { css: IntegrationModalHeaderGroup, children: /* @__PURE__ */ jsxs49("div", { css: IntegrationModalHeaderTitleGroup, children: [
|
|
15379
15438
|
icon ? /* @__PURE__ */ jsx78(IntegrationModalIcon, { icon, name: name || "" }) : null,
|
|
@@ -15959,7 +16018,7 @@ var Popover = css71`
|
|
|
15959
16018
|
`;
|
|
15960
16019
|
|
|
15961
16020
|
// src/components/Popover/Popover.tsx
|
|
15962
|
-
import { Fragment as
|
|
16021
|
+
import { Fragment as Fragment12, jsx as jsx87, jsxs as jsxs57 } from "@emotion/react/jsx-runtime";
|
|
15963
16022
|
var Popover2 = ({
|
|
15964
16023
|
iconColor = "action",
|
|
15965
16024
|
icon = "info",
|
|
@@ -15973,7 +16032,7 @@ var Popover2 = ({
|
|
|
15973
16032
|
...otherProps
|
|
15974
16033
|
}) => {
|
|
15975
16034
|
const popover = usePopoverState({ placement });
|
|
15976
|
-
return /* @__PURE__ */ jsxs57(
|
|
16035
|
+
return /* @__PURE__ */ jsxs57(Fragment12, { children: [
|
|
15977
16036
|
/* @__PURE__ */ jsx87(
|
|
15978
16037
|
PopoverDisclosure,
|
|
15979
16038
|
{
|
|
@@ -15981,7 +16040,7 @@ var Popover2 = ({
|
|
|
15981
16040
|
css: [PopoverBtn, trigger ? void 0 : PopoverDefaulterTriggerBtn],
|
|
15982
16041
|
title: buttonText,
|
|
15983
16042
|
"data-testid": testId,
|
|
15984
|
-
children: trigger ? trigger : /* @__PURE__ */ jsxs57(
|
|
16043
|
+
children: trigger ? trigger : /* @__PURE__ */ jsxs57(Fragment12, { children: [
|
|
15985
16044
|
/* @__PURE__ */ jsx87(Icon, { icon, iconColor, size: iconSize }),
|
|
15986
16045
|
/* @__PURE__ */ jsx87("span", { hidden: true, children: buttonText })
|
|
15987
16046
|
] })
|
|
@@ -16004,9 +16063,11 @@ var cardBase = css72`
|
|
|
16004
16063
|
min-height: unset;
|
|
16005
16064
|
outline: none;
|
|
16006
16065
|
cursor: pointer;
|
|
16066
|
+
transition: border-color var(--duration-xfast) ease-in-out;
|
|
16007
16067
|
|
|
16008
16068
|
&:hover {
|
|
16009
16069
|
--mediacard-title-color: var(--brand-secondary-1);
|
|
16070
|
+
border-color: var(--primary-action-hover);
|
|
16010
16071
|
}
|
|
16011
16072
|
`;
|
|
16012
16073
|
var coverWrapper = css72`
|
|
@@ -16083,7 +16144,7 @@ var MediaCard = ({
|
|
|
16083
16144
|
e.stopPropagation();
|
|
16084
16145
|
}, []);
|
|
16085
16146
|
const hasMenuItems = Array.isArray(menuItems) ? menuItems.length > 0 : Boolean(menuItems);
|
|
16086
|
-
return /* @__PURE__ */ jsxs58(Card, { css: cardBase, ...cardProps, onClick, children: [
|
|
16147
|
+
return /* @__PURE__ */ jsxs58(Card, { css: cardBase, ...cardProps, onClick, "data-testId": "card-item", children: [
|
|
16087
16148
|
/* @__PURE__ */ jsx88("button", { tabIndex: -1, css: coverWrapper, children: cover }),
|
|
16088
16149
|
/* @__PURE__ */ jsx88("div", { css: contentWrapper, children: /* @__PURE__ */ jsxs58(HorizontalRhythm, { gap: "sm", justify: "space-between", align: "center", css: { width: "100%" }, children: [
|
|
16089
16150
|
/* @__PURE__ */ jsxs58(VerticalRhythm, { gap: "0", align: "flex-start", css: { flex: 1, minWidth: 0 }, children: [
|
|
@@ -16115,7 +16176,16 @@ var MediaCard = ({
|
|
|
16115
16176
|
children: /* @__PURE__ */ jsx88(
|
|
16116
16177
|
Menu,
|
|
16117
16178
|
{
|
|
16118
|
-
menuTrigger: /* @__PURE__ */ jsx88(
|
|
16179
|
+
menuTrigger: /* @__PURE__ */ jsx88(
|
|
16180
|
+
"button",
|
|
16181
|
+
{
|
|
16182
|
+
type: "button",
|
|
16183
|
+
"aria-label": "More options",
|
|
16184
|
+
css: menuButton,
|
|
16185
|
+
"data-testId": "button-more",
|
|
16186
|
+
children: /* @__PURE__ */ jsx88(Icon, { icon: "more-alt", iconColor: "gray", size: 16 })
|
|
16187
|
+
}
|
|
16188
|
+
),
|
|
16119
16189
|
menuLabel: `Menu of ${title2}`,
|
|
16120
16190
|
children: menuItems
|
|
16121
16191
|
}
|
|
@@ -16128,7 +16198,7 @@ var MediaCard = ({
|
|
|
16128
16198
|
|
|
16129
16199
|
// src/components/Modal/Modal.tsx
|
|
16130
16200
|
import { CgClose as CgClose5 } from "@react-icons/all-files/cg/CgClose";
|
|
16131
|
-
import React19 from "react";
|
|
16201
|
+
import React19, { useEffect as useEffect10, useRef as useRef6 } from "react";
|
|
16132
16202
|
|
|
16133
16203
|
// src/components/Modal/Modal.styles.ts
|
|
16134
16204
|
import { css as css73 } from "@emotion/react";
|
|
@@ -16140,26 +16210,33 @@ var modalWrapperStyles = css73`
|
|
|
16140
16210
|
justify-content: center;
|
|
16141
16211
|
z-index: var(--z-drawer);
|
|
16142
16212
|
`;
|
|
16143
|
-
var modalBackdropStyles = css73`
|
|
16144
|
-
position: absolute;
|
|
16145
|
-
inset: 0;
|
|
16146
|
-
background-color: var(--brand-secondary-1);
|
|
16147
|
-
opacity: 0.4;
|
|
16148
|
-
`;
|
|
16149
16213
|
var modalStyles = css73`
|
|
16150
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%;
|
|
16151
16230
|
display: flex;
|
|
16152
16231
|
flex-direction: column;
|
|
16153
16232
|
justify-content: stretch;
|
|
16154
|
-
max-width: calc(100% - var(--spacing-base) * 2);
|
|
16155
|
-
max-height: calc(100% - var(--spacing-base) * 2);
|
|
16156
16233
|
gap: var(--spacing-base);
|
|
16157
16234
|
background: var(--gray-50);
|
|
16235
|
+
color: unset;
|
|
16236
|
+
padding: var(--spacing-base);
|
|
16237
|
+
box-shadow: var(--elevation-500);
|
|
16158
16238
|
border-radius: var(--rounded-base);
|
|
16159
16239
|
border: 1px solid var(--gray-300);
|
|
16160
|
-
padding: var(--spacing-base);
|
|
16161
|
-
color: unset;
|
|
16162
|
-
z-index: 1;
|
|
16163
16240
|
`;
|
|
16164
16241
|
var modalHeaderStyles = css73`
|
|
16165
16242
|
display: flex;
|
|
@@ -16168,6 +16245,9 @@ var modalHeaderStyles = css73`
|
|
|
16168
16245
|
font-size: var(--fs-md);
|
|
16169
16246
|
line-height: 1.2;
|
|
16170
16247
|
`;
|
|
16248
|
+
var modalHeaderHeaderStyles = css73`
|
|
16249
|
+
max-width: calc(100% - 3rem);
|
|
16250
|
+
`;
|
|
16171
16251
|
var modalCloseButtonStyles = css73`
|
|
16172
16252
|
display: block;
|
|
16173
16253
|
padding: 0;
|
|
@@ -16195,47 +16275,63 @@ var Modal = React19.forwardRef(
|
|
|
16195
16275
|
onRequestClose,
|
|
16196
16276
|
width = defaultModalWidth,
|
|
16197
16277
|
height = defaultModalHeight,
|
|
16198
|
-
wrapperClassName,
|
|
16199
16278
|
withoutContentPadding = false,
|
|
16200
16279
|
buttonGroup,
|
|
16201
16280
|
...modalProps
|
|
16202
16281
|
}, ref) => {
|
|
16282
|
+
const dialogRef = useRef6(null);
|
|
16203
16283
|
useShortcut({
|
|
16204
16284
|
handler: onRequestClose,
|
|
16205
16285
|
shortcut: "escape"
|
|
16206
16286
|
});
|
|
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
|
-
|
|
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
|
+
);
|
|
16239
16335
|
}
|
|
16240
16336
|
);
|
|
16241
16337
|
Modal.displayName = "Modal";
|
|
@@ -16800,7 +16896,7 @@ var previewModalImage = css79`
|
|
|
16800
16896
|
`;
|
|
16801
16897
|
|
|
16802
16898
|
// src/components/ParameterInputs/ParameterImagePreview.tsx
|
|
16803
|
-
import { Fragment as
|
|
16899
|
+
import { Fragment as Fragment13, jsx as jsx95, jsxs as jsxs64 } from "@emotion/react/jsx-runtime";
|
|
16804
16900
|
function ParameterImagePreview({ imageSrc }) {
|
|
16805
16901
|
const [showModal, setShowModal] = useState9(false);
|
|
16806
16902
|
return imageSrc ? /* @__PURE__ */ jsxs64("div", { css: previewWrapper, children: [
|
|
@@ -16818,7 +16914,7 @@ function ParameterImagePreview({ imageSrc }) {
|
|
|
16818
16914
|
] }) : null;
|
|
16819
16915
|
}
|
|
16820
16916
|
var PreviewImageModal = ({ open, onRequestClose, imageSrc }) => {
|
|
16821
|
-
return open ? /* @__PURE__ */ jsx95(
|
|
16917
|
+
return open ? /* @__PURE__ */ jsx95(Fragment13, { children: createPortal2(
|
|
16822
16918
|
/* @__PURE__ */ jsx95(
|
|
16823
16919
|
Modal,
|
|
16824
16920
|
{
|
|
@@ -16955,6 +17051,7 @@ var ParameterShell = ({
|
|
|
16955
17051
|
onResetOverriddenValue,
|
|
16956
17052
|
title: title2,
|
|
16957
17053
|
children,
|
|
17054
|
+
isParameterGroup = false,
|
|
16958
17055
|
...props
|
|
16959
17056
|
}) => {
|
|
16960
17057
|
const [manualErrorMessage, setManualErrorMessage] = useState10(void 0);
|
|
@@ -16998,7 +17095,7 @@ var ParameterShell = ({
|
|
|
16998
17095
|
errorMessage: errorMessaging,
|
|
16999
17096
|
handleManuallySetErrorMessage: (message) => setErrorMessage(message)
|
|
17000
17097
|
},
|
|
17001
|
-
children: /* @__PURE__ */ jsxs65(ParameterShellPlaceholder, { children: [
|
|
17098
|
+
children: isParameterGroup ? /* @__PURE__ */ jsx98("div", { style: { flexGrow: 1 }, children }) : /* @__PURE__ */ jsxs65(ParameterShellPlaceholder, { children: [
|
|
17002
17099
|
children,
|
|
17003
17100
|
hasOverriddenValue && onResetOverriddenValue ? /* @__PURE__ */ jsx98(ParameterOverrideMarker, { onClick: onResetOverriddenValue }) : null
|
|
17004
17101
|
] })
|
|
@@ -17017,7 +17114,7 @@ var ParameterShellPlaceholder = ({ children }) => {
|
|
|
17017
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" }) }) });
|
|
17018
17115
|
|
|
17019
17116
|
// src/components/ParameterInputs/ParameterImage.tsx
|
|
17020
|
-
import { Fragment as
|
|
17117
|
+
import { Fragment as Fragment14, jsx as jsx99, jsxs as jsxs66 } from "@emotion/react/jsx-runtime";
|
|
17021
17118
|
var ParameterImage = forwardRef13(
|
|
17022
17119
|
({ children, ...props }, ref) => {
|
|
17023
17120
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
@@ -17031,7 +17128,7 @@ var ParameterImageInner = forwardRef13((props, ref) => {
|
|
|
17031
17128
|
const { value } = props;
|
|
17032
17129
|
const { id, label, hiddenLabel, errorMessage } = useParameterShell();
|
|
17033
17130
|
const deferredValue = useDeferredValue(value);
|
|
17034
|
-
return /* @__PURE__ */ jsxs66(
|
|
17131
|
+
return /* @__PURE__ */ jsxs66(Fragment14, { children: [
|
|
17035
17132
|
/* @__PURE__ */ jsx99(
|
|
17036
17133
|
"input",
|
|
17037
17134
|
{
|
|
@@ -17146,7 +17243,7 @@ var ParameterLinkInner = forwardRef15(
|
|
|
17146
17243
|
);
|
|
17147
17244
|
|
|
17148
17245
|
// src/components/ParameterInputs/ParameterNameAndPublicIdInput.tsx
|
|
17149
|
-
import { Fragment as
|
|
17246
|
+
import { Fragment as Fragment15, jsx as jsx102, jsxs as jsxs68 } from "@emotion/react/jsx-runtime";
|
|
17150
17247
|
var ParameterNameAndPublicIdInput = ({
|
|
17151
17248
|
id,
|
|
17152
17249
|
onBlur,
|
|
@@ -17172,7 +17269,7 @@ var ParameterNameAndPublicIdInput = ({
|
|
|
17172
17269
|
navigator.clipboard.writeText(values[publicIdFieldName]);
|
|
17173
17270
|
};
|
|
17174
17271
|
autoFocus == null ? void 0 : autoFocus();
|
|
17175
|
-
return /* @__PURE__ */ jsxs68(
|
|
17272
|
+
return /* @__PURE__ */ jsxs68(Fragment15, { children: [
|
|
17176
17273
|
/* @__PURE__ */ jsx102(
|
|
17177
17274
|
ParameterInput,
|
|
17178
17275
|
{
|
|
@@ -17337,7 +17434,7 @@ var getLabelForElement = (type) => {
|
|
|
17337
17434
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
17338
17435
|
import { deepEqual as deepEqual2 } from "fast-equals";
|
|
17339
17436
|
import { ParagraphNode as ParagraphNode2 } from "lexical";
|
|
17340
|
-
import { useEffect as
|
|
17437
|
+
import { useEffect as useEffect15, useRef as useRef8 } from "react";
|
|
17341
17438
|
|
|
17342
17439
|
// src/components/ParameterInputs/rich-text/CustomCodeNode.ts
|
|
17343
17440
|
import { CodeNode } from "@lexical/code";
|
|
@@ -17358,10 +17455,10 @@ CustomCodeNode.importDOM = function() {
|
|
|
17358
17455
|
import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
|
|
17359
17456
|
import { mergeRegister } from "@lexical/utils";
|
|
17360
17457
|
import { ParagraphNode } from "lexical";
|
|
17361
|
-
import { useEffect as
|
|
17458
|
+
import { useEffect as useEffect11 } from "react";
|
|
17362
17459
|
function DisableStylesPlugin() {
|
|
17363
17460
|
const [editor] = useLexicalComposerContext();
|
|
17364
|
-
|
|
17461
|
+
useEffect11(() => {
|
|
17365
17462
|
return mergeRegister(
|
|
17366
17463
|
// Disable text alignment on paragraph nodes
|
|
17367
17464
|
editor.registerNodeTransform(ParagraphNode, (node) => {
|
|
@@ -17570,7 +17667,7 @@ import {
|
|
|
17570
17667
|
ElementNode as ElementNode2,
|
|
17571
17668
|
FOCUS_COMMAND
|
|
17572
17669
|
} from "lexical";
|
|
17573
|
-
import { useCallback as useCallback5, useEffect as
|
|
17670
|
+
import { useCallback as useCallback5, useEffect as useEffect12, useRef as useRef7, useState as useState11 } from "react";
|
|
17574
17671
|
|
|
17575
17672
|
// src/components/ParameterInputs/rich-text/utils.ts
|
|
17576
17673
|
import { $isAtNodeEnd } from "@lexical/selection";
|
|
@@ -17608,7 +17705,7 @@ var getSelectedNode = (selection) => {
|
|
|
17608
17705
|
};
|
|
17609
17706
|
|
|
17610
17707
|
// src/components/ParameterInputs/rich-text/LinkNodePlugin.tsx
|
|
17611
|
-
import { Fragment as
|
|
17708
|
+
import { Fragment as Fragment16, jsx as jsx103, jsxs as jsxs69 } from "@emotion/react/jsx-runtime";
|
|
17612
17709
|
var isProjectMapLinkValue = (value) => {
|
|
17613
17710
|
return (value == null ? void 0 : value.type) === "projectMapNode" && Boolean(
|
|
17614
17711
|
value.nodeId && value.path && value.projectMapId
|
|
@@ -17914,16 +18011,16 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
17914
18011
|
};
|
|
17915
18012
|
const [editor] = useLexicalComposerContext2();
|
|
17916
18013
|
const [linkPopoverState, setLinkPopoverState] = useState11();
|
|
17917
|
-
const linkPopoverElRef =
|
|
18014
|
+
const linkPopoverElRef = useRef7(null);
|
|
17918
18015
|
const [isEditorFocused, setIsEditorFocused] = useState11(false);
|
|
17919
18016
|
const [isLinkPopoverFocused, setIsLinkPopoverFocused] = useState11(false);
|
|
17920
|
-
|
|
18017
|
+
useEffect12(() => {
|
|
17921
18018
|
if (!isEditorFocused && !isLinkPopoverFocused) {
|
|
17922
18019
|
setLinkPopoverState(void 0);
|
|
17923
18020
|
return;
|
|
17924
18021
|
}
|
|
17925
18022
|
}, [isEditorFocused, isLinkPopoverFocused]);
|
|
17926
|
-
|
|
18023
|
+
useEffect12(() => {
|
|
17927
18024
|
if (!editor.hasNodes([LinkNode])) {
|
|
17928
18025
|
throw new Error("LinkNode not registered on editor");
|
|
17929
18026
|
}
|
|
@@ -18024,7 +18121,7 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
18024
18121
|
}
|
|
18025
18122
|
});
|
|
18026
18123
|
}, [editor]);
|
|
18027
|
-
|
|
18124
|
+
useEffect12(() => {
|
|
18028
18125
|
return editor.registerUpdateListener(({ editorState }) => {
|
|
18029
18126
|
requestAnimationFrame(() => {
|
|
18030
18127
|
editorState.read(() => {
|
|
@@ -18051,7 +18148,7 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
18051
18148
|
});
|
|
18052
18149
|
});
|
|
18053
18150
|
};
|
|
18054
|
-
return /* @__PURE__ */ jsxs69(
|
|
18151
|
+
return /* @__PURE__ */ jsxs69(Fragment16, { children: [
|
|
18055
18152
|
/* @__PURE__ */ jsx103(
|
|
18056
18153
|
NodeEventPlugin,
|
|
18057
18154
|
{
|
|
@@ -18116,7 +18213,7 @@ import {
|
|
|
18116
18213
|
COMMAND_PRIORITY_CRITICAL,
|
|
18117
18214
|
INDENT_CONTENT_COMMAND
|
|
18118
18215
|
} from "lexical";
|
|
18119
|
-
import { useEffect as
|
|
18216
|
+
import { useEffect as useEffect13 } from "react";
|
|
18120
18217
|
import { jsx as jsx104 } from "@emotion/react/jsx-runtime";
|
|
18121
18218
|
function isIndentPermitted(maxDepth) {
|
|
18122
18219
|
const selection = $getSelection2();
|
|
@@ -18140,7 +18237,7 @@ function isIndentPermitted(maxDepth) {
|
|
|
18140
18237
|
}
|
|
18141
18238
|
function ListIndentPlugin({ maxDepth }) {
|
|
18142
18239
|
const [editor] = useLexicalComposerContext3();
|
|
18143
|
-
|
|
18240
|
+
useEffect13(() => {
|
|
18144
18241
|
return editor.registerCommand(
|
|
18145
18242
|
INDENT_CONTENT_COMMAND,
|
|
18146
18243
|
() => !isIndentPermitted(maxDepth),
|
|
@@ -18173,8 +18270,8 @@ import {
|
|
|
18173
18270
|
FORMAT_TEXT_COMMAND,
|
|
18174
18271
|
SELECTION_CHANGE_COMMAND
|
|
18175
18272
|
} from "lexical";
|
|
18176
|
-
import { useCallback as useCallback6, useEffect as
|
|
18177
|
-
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";
|
|
18178
18275
|
var toolbar = css84`
|
|
18179
18276
|
background: var(--gray-50);
|
|
18180
18277
|
border-radius: var(--rounded-base);
|
|
@@ -18316,7 +18413,7 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
18316
18413
|
setIsLink(false);
|
|
18317
18414
|
}
|
|
18318
18415
|
}, [editor, setActiveElement, setActiveFormats, setIsLink]);
|
|
18319
|
-
|
|
18416
|
+
useEffect14(() => {
|
|
18320
18417
|
return editor.registerCommand(
|
|
18321
18418
|
SELECTION_CHANGE_COMMAND,
|
|
18322
18419
|
(_payload) => {
|
|
@@ -18326,7 +18423,7 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
18326
18423
|
COMMAND_PRIORITY_CRITICAL2
|
|
18327
18424
|
);
|
|
18328
18425
|
}, [editor, updateToolbar]);
|
|
18329
|
-
|
|
18426
|
+
useEffect14(() => {
|
|
18330
18427
|
return editor.registerUpdateListener(({ editorState }) => {
|
|
18331
18428
|
requestAnimationFrame(() => {
|
|
18332
18429
|
editorState.read(() => {
|
|
@@ -18411,7 +18508,7 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
18411
18508
|
children: /* @__PURE__ */ jsx105(RichTextToolbarIcon, { icon: "link" })
|
|
18412
18509
|
}
|
|
18413
18510
|
) }) : null,
|
|
18414
|
-
visibleLists.size > 0 ? /* @__PURE__ */ jsxs70(
|
|
18511
|
+
visibleLists.size > 0 ? /* @__PURE__ */ jsxs70(Fragment17, { children: [
|
|
18415
18512
|
visibleLists.has("unorderedList") ? /* @__PURE__ */ jsx105(Tooltip, { title: "Bullet List", placement: "top", children: /* @__PURE__ */ jsx105(
|
|
18416
18513
|
"button",
|
|
18417
18514
|
{
|
|
@@ -18574,7 +18671,7 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
18574
18671
|
};
|
|
18575
18672
|
|
|
18576
18673
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
18577
|
-
import { Fragment as
|
|
18674
|
+
import { Fragment as Fragment18, jsx as jsx106, jsxs as jsxs71 } from "@emotion/react/jsx-runtime";
|
|
18578
18675
|
var ParameterRichText = ({
|
|
18579
18676
|
label,
|
|
18580
18677
|
labelLeadingIcon,
|
|
@@ -18631,7 +18728,7 @@ var ParameterRichText = ({
|
|
|
18631
18728
|
children
|
|
18632
18729
|
}
|
|
18633
18730
|
),
|
|
18634
|
-
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
|
|
18635
18732
|
]
|
|
18636
18733
|
}
|
|
18637
18734
|
);
|
|
@@ -18742,7 +18839,7 @@ var ParameterRichTextInner = ({
|
|
|
18742
18839
|
},
|
|
18743
18840
|
editable: !readOnly
|
|
18744
18841
|
};
|
|
18745
|
-
return /* @__PURE__ */ jsxs71(
|
|
18842
|
+
return /* @__PURE__ */ jsxs71(Fragment18, { children: [
|
|
18746
18843
|
/* @__PURE__ */ jsx106("div", { css: [editorWrapper], className: editorWrapperClassName, children: /* @__PURE__ */ jsx106(LexicalComposer, { initialConfig: lexicalConfig, children: /* @__PURE__ */ jsx106(
|
|
18747
18844
|
RichText,
|
|
18748
18845
|
{
|
|
@@ -18780,14 +18877,14 @@ var RichText = ({
|
|
|
18780
18877
|
variables,
|
|
18781
18878
|
customControls
|
|
18782
18879
|
}) => {
|
|
18783
|
-
const editorContainerRef =
|
|
18880
|
+
const editorContainerRef = useRef8(null);
|
|
18784
18881
|
const [editor] = useLexicalComposerContext5();
|
|
18785
|
-
|
|
18882
|
+
useEffect15(() => {
|
|
18786
18883
|
if (onRichTextInit) {
|
|
18787
18884
|
onRichTextInit(editor);
|
|
18788
18885
|
}
|
|
18789
18886
|
}, [editor, onRichTextInit]);
|
|
18790
|
-
|
|
18887
|
+
useEffect15(() => {
|
|
18791
18888
|
const removeUpdateListener = editor.registerUpdateListener(({ editorState, prevEditorState }) => {
|
|
18792
18889
|
requestAnimationFrame(() => {
|
|
18793
18890
|
if (!deepEqual2(editorState.toJSON(), prevEditorState.toJSON())) {
|
|
@@ -18799,7 +18896,7 @@ var RichText = ({
|
|
|
18799
18896
|
removeUpdateListener();
|
|
18800
18897
|
};
|
|
18801
18898
|
}, []);
|
|
18802
|
-
return /* @__PURE__ */ jsxs71(
|
|
18899
|
+
return /* @__PURE__ */ jsxs71(Fragment18, { children: [
|
|
18803
18900
|
readOnly ? null : /* @__PURE__ */ jsx106(RichTextToolbar_default, { config, customControls }),
|
|
18804
18901
|
/* @__PURE__ */ jsxs71("div", { css: editorContainer, ref: editorContainerRef, "data-testid": "value-container", children: [
|
|
18805
18902
|
/* @__PURE__ */ jsx106(
|
|
@@ -18825,7 +18922,7 @@ var RichText = ({
|
|
|
18825
18922
|
/* @__PURE__ */ jsx106(ListIndentPlugin, { maxDepth: 4 }),
|
|
18826
18923
|
/* @__PURE__ */ jsx106(DisableStylesPlugin, {}),
|
|
18827
18924
|
/* @__PURE__ */ jsx106(MarkdownShortcutPlugin, { transformers: MARKDOWN_TRANSFORMERS }),
|
|
18828
|
-
/* @__PURE__ */ jsx106(
|
|
18925
|
+
/* @__PURE__ */ jsx106(Fragment18, { children })
|
|
18829
18926
|
] })
|
|
18830
18927
|
] });
|
|
18831
18928
|
};
|
|
@@ -19432,14 +19529,14 @@ var SwitchText = css92`
|
|
|
19432
19529
|
`;
|
|
19433
19530
|
|
|
19434
19531
|
// src/components/Switch/Switch.tsx
|
|
19435
|
-
import { Fragment as
|
|
19532
|
+
import { Fragment as Fragment19, jsx as jsx114, jsxs as jsxs76 } from "@emotion/react/jsx-runtime";
|
|
19436
19533
|
var Switch = React23.forwardRef(
|
|
19437
19534
|
({ label, infoText, toggleText, children, ...inputProps }, ref) => {
|
|
19438
19535
|
let additionalText = infoText;
|
|
19439
19536
|
if (infoText && toggleText) {
|
|
19440
19537
|
additionalText = inputProps.checked ? toggleText : infoText;
|
|
19441
19538
|
}
|
|
19442
|
-
return /* @__PURE__ */ jsxs76(
|
|
19539
|
+
return /* @__PURE__ */ jsxs76(Fragment19, { children: [
|
|
19443
19540
|
/* @__PURE__ */ jsxs76("label", { css: [SwitchInputContainer, inputProps.disabled ? SwitchInputDisabled : void 0], children: [
|
|
19444
19541
|
/* @__PURE__ */ jsx114("input", { type: "checkbox", css: SwitchInput, ...inputProps, ref }),
|
|
19445
19542
|
/* @__PURE__ */ jsx114("span", { css: SwitchInputLabel, children: label })
|
|
@@ -19519,7 +19616,7 @@ var TableCellData = React24.forwardRef(
|
|
|
19519
19616
|
);
|
|
19520
19617
|
|
|
19521
19618
|
// src/components/Tabs/Tabs.tsx
|
|
19522
|
-
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";
|
|
19523
19620
|
import {
|
|
19524
19621
|
Tab as ReakitTab,
|
|
19525
19622
|
TabList as ReakitTabList,
|
|
@@ -19569,7 +19666,7 @@ var Tabs = ({ children, onSelectedIdChange, useHashForState, selectedId, ...prop
|
|
|
19569
19666
|
return useHashForState && typeof window !== "undefined" && window.location.hash ? window.location.hash.substring(1) : void 0;
|
|
19570
19667
|
}, [selectedId, useHashForState]);
|
|
19571
19668
|
const tab = useTabState({ ...props, selectedId: selected });
|
|
19572
|
-
|
|
19669
|
+
useEffect16(() => {
|
|
19573
19670
|
var _a;
|
|
19574
19671
|
const selectedValueWithoutNull = (_a = tab.selectedId) != null ? _a : void 0;
|
|
19575
19672
|
onSelectedIdChange == null ? void 0 : onSelectedIdChange(selectedValueWithoutNull);
|
|
@@ -19578,7 +19675,7 @@ var Tabs = ({ children, onSelectedIdChange, useHashForState, selectedId, ...prop
|
|
|
19578
19675
|
window.history.pushState(null, "", hashValue);
|
|
19579
19676
|
}
|
|
19580
19677
|
}, [tab.selectedId, onSelectedIdChange, useHashForState]);
|
|
19581
|
-
|
|
19678
|
+
useEffect16(() => {
|
|
19582
19679
|
if (selected && selected !== tab.selectedId) {
|
|
19583
19680
|
tab.setSelectedId(selected);
|
|
19584
19681
|
}
|