braid-design-system 32.5.0 → 32.7.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/CHANGELOG.md +80 -0
- package/codemod/dist/wrapper.js +82628 -42142
- package/dist/ToastContext.chunk.cjs +10 -0
- package/dist/ToastContext.chunk.mjs +10 -0
- package/dist/{Toggle.chunk.cjs → index.chunk.cjs} +122 -52
- package/dist/{Toggle.chunk.mjs → index.chunk.mjs} +121 -51
- package/dist/index.cjs +137 -135
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +3 -1
- package/dist/playroom/components.cjs +159 -150
- package/dist/playroom/components.d.ts +1 -1
- package/dist/playroom/components.mjs +16 -7
- package/dist/playroom/snippets.cjs +60 -52
- package/dist/playroom/snippets.mjs +60 -52
- package/dist/playroomState.chunk.cjs +1 -1
- package/dist/playroomState.chunk.mjs +1 -1
- package/dist/reset.cjs +5 -0
- package/dist/reset.d.ts +19 -5
- package/dist/reset.mjs +5 -0
- package/dist/styles/lib/components/private/Modal/Modal.css.cjs +15 -7
- package/dist/styles/lib/components/private/Modal/Modal.css.mjs +15 -7
- package/package.json +4 -2
|
@@ -1612,6 +1612,7 @@ const Button = React.forwardRef(
|
|
|
1612
1612
|
"aria-controls": ariaControls,
|
|
1613
1613
|
"aria-expanded": ariaExpanded,
|
|
1614
1614
|
"aria-describedby": ariaDescribedBy,
|
|
1615
|
+
"aria-label": ariaLabel,
|
|
1615
1616
|
data,
|
|
1616
1617
|
...restProps
|
|
1617
1618
|
}, ref) => {
|
|
@@ -1645,6 +1646,7 @@ const Button = React.forwardRef(
|
|
|
1645
1646
|
"aria-controls": ariaControls,
|
|
1646
1647
|
"aria-expanded": ariaExpanded,
|
|
1647
1648
|
"aria-describedby": ariaDescribedBy,
|
|
1649
|
+
"aria-label": ariaLabel,
|
|
1648
1650
|
onClick,
|
|
1649
1651
|
disabled: loading,
|
|
1650
1652
|
...buildDataAttributes({ data, validateRestProps: restProps }),
|
|
@@ -1773,6 +1775,12 @@ const TooltipRenderer = ({
|
|
|
1773
1775
|
offset: [0, space.small * grid]
|
|
1774
1776
|
}
|
|
1775
1777
|
},
|
|
1778
|
+
{
|
|
1779
|
+
name: "arrow",
|
|
1780
|
+
options: {
|
|
1781
|
+
padding: space.xsmall * grid
|
|
1782
|
+
}
|
|
1783
|
+
},
|
|
1776
1784
|
...isStatic ? [
|
|
1777
1785
|
{
|
|
1778
1786
|
name: "flip",
|
|
@@ -2082,6 +2090,7 @@ const TextLinkButton = ({
|
|
|
2082
2090
|
"aria-controls": ariaControls,
|
|
2083
2091
|
"aria-expanded": ariaExpanded,
|
|
2084
2092
|
"aria-describedby": ariaDescribedBy,
|
|
2093
|
+
"aria-label": ariaLabel,
|
|
2085
2094
|
tabIndex,
|
|
2086
2095
|
icon,
|
|
2087
2096
|
iconPosition,
|
|
@@ -2115,6 +2124,7 @@ const TextLinkButton = ({
|
|
|
2115
2124
|
"aria-controls": ariaControls,
|
|
2116
2125
|
"aria-expanded": ariaExpanded,
|
|
2117
2126
|
"aria-describedby": ariaDescribedBy,
|
|
2127
|
+
"aria-label": ariaLabel,
|
|
2118
2128
|
id,
|
|
2119
2129
|
className: classes,
|
|
2120
2130
|
...buildDataAttributes({ data, validateRestProps: restProps }),
|
|
@@ -1605,6 +1605,7 @@ const Button = forwardRef(
|
|
|
1605
1605
|
"aria-controls": ariaControls,
|
|
1606
1606
|
"aria-expanded": ariaExpanded,
|
|
1607
1607
|
"aria-describedby": ariaDescribedBy,
|
|
1608
|
+
"aria-label": ariaLabel,
|
|
1608
1609
|
data,
|
|
1609
1610
|
...restProps
|
|
1610
1611
|
}, ref) => {
|
|
@@ -1638,6 +1639,7 @@ const Button = forwardRef(
|
|
|
1638
1639
|
"aria-controls": ariaControls,
|
|
1639
1640
|
"aria-expanded": ariaExpanded,
|
|
1640
1641
|
"aria-describedby": ariaDescribedBy,
|
|
1642
|
+
"aria-label": ariaLabel,
|
|
1641
1643
|
onClick,
|
|
1642
1644
|
disabled: loading,
|
|
1643
1645
|
...buildDataAttributes({ data, validateRestProps: restProps }),
|
|
@@ -1766,6 +1768,12 @@ const TooltipRenderer = ({
|
|
|
1766
1768
|
offset: [0, space.small * grid]
|
|
1767
1769
|
}
|
|
1768
1770
|
},
|
|
1771
|
+
{
|
|
1772
|
+
name: "arrow",
|
|
1773
|
+
options: {
|
|
1774
|
+
padding: space.xsmall * grid
|
|
1775
|
+
}
|
|
1776
|
+
},
|
|
1769
1777
|
...isStatic ? [
|
|
1770
1778
|
{
|
|
1771
1779
|
name: "flip",
|
|
@@ -2075,6 +2083,7 @@ const TextLinkButton = ({
|
|
|
2075
2083
|
"aria-controls": ariaControls,
|
|
2076
2084
|
"aria-expanded": ariaExpanded,
|
|
2077
2085
|
"aria-describedby": ariaDescribedBy,
|
|
2086
|
+
"aria-label": ariaLabel,
|
|
2078
2087
|
tabIndex,
|
|
2079
2088
|
icon,
|
|
2080
2089
|
iconPosition,
|
|
@@ -2108,6 +2117,7 @@ const TextLinkButton = ({
|
|
|
2108
2117
|
"aria-controls": ariaControls,
|
|
2109
2118
|
"aria-expanded": ariaExpanded,
|
|
2110
2119
|
"aria-describedby": ariaDescribedBy,
|
|
2120
|
+
"aria-label": ariaLabel,
|
|
2111
2121
|
id,
|
|
2112
2122
|
className: classes,
|
|
2113
2123
|
...buildDataAttributes({ data, validateRestProps: restProps }),
|
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const ToastContext = require("./ToastContext.chunk.cjs");
|
|
3
2
|
const sideEffects_lib_components_BraidProvider_BraidProvider_cjs = require("./side-effects/lib/components/BraidProvider/BraidProvider.cjs");
|
|
3
|
+
const ToastContext = require("./ToastContext.chunk.cjs");
|
|
4
4
|
const jsxRuntime = require("react/jsx-runtime");
|
|
5
5
|
const assert = require("assert");
|
|
6
6
|
const React = require("react");
|
|
7
7
|
const styles_lib_css_atoms_sprinkles_css_cjs = require("./styles/lib/css/atoms/sprinkles.css.cjs");
|
|
8
|
-
const styles_lib_components_icons_IconArrow_IconArrow_css_cjs = require("./styles/lib/components/icons/IconArrow/IconArrow.css.cjs");
|
|
9
|
-
const styles_lib_components_icons_IconThumb_IconThumb_css_cjs = require("./styles/lib/components/icons/IconThumb/IconThumb.css.cjs");
|
|
10
8
|
const styles_lib_components_Accordion_AccordionItem_css_cjs = require("./styles/lib/components/Accordion/AccordionItem.css.cjs");
|
|
9
|
+
const styles_lib_components_icons_IconChevron_IconChevron_css_cjs = require("./styles/lib/components/icons/IconChevron/IconChevron.css.cjs");
|
|
11
10
|
const styles_lib_components_private_hideFocusRings_hideFocusRings_css_cjs = require("./styles/lib/components/private/hideFocusRings/hideFocusRings.css.cjs");
|
|
12
11
|
const styles_lib_css_textAlignedToIcon_css_cjs = require("./styles/lib/css/textAlignedToIcon.css.cjs");
|
|
13
12
|
const styles_lib_components_Alert_Alert_css_cjs = require("./styles/lib/components/Alert/Alert.css.cjs");
|
|
14
13
|
const dedent = require("dedent");
|
|
15
14
|
const parseHighlights = require("autosuggest-highlight/parse/index.js");
|
|
15
|
+
const styles_lib_css_typography_css_cjs = require("./styles/lib/css/typography.css.cjs");
|
|
16
16
|
const styles_lib_components_HiddenVisually_HiddenVisually_css_cjs = require("./styles/lib/components/HiddenVisually/HiddenVisually.css.cjs");
|
|
17
17
|
const reactDom = require("react-dom");
|
|
18
18
|
const styles_lib_css_atoms_atoms_cjs = require("./styles/lib/css/atoms/atoms.cjs");
|
|
19
|
-
const
|
|
19
|
+
const clsx = require("clsx");
|
|
20
|
+
const styles_lib_components_private_Field_Field_css_cjs = require("./styles/lib/components/private/Field/Field.css.cjs");
|
|
20
21
|
const reactRemoveScroll = require("react-remove-scroll");
|
|
21
22
|
const styles_lib_components_Autosuggest_Autosuggest_css_cjs = require("./styles/lib/components/Autosuggest/Autosuggest.css.cjs");
|
|
22
23
|
const matchHighlights = require("autosuggest-highlight/match/index.js");
|
|
23
|
-
const clsx = require("clsx");
|
|
24
24
|
const styles_lib_components_private_Keyline_Keyline_css_cjs = require("./styles/lib/components/private/Keyline/Keyline.css.cjs");
|
|
25
|
+
const styles_lib_components_private_InlineField_InlineField_css_cjs = require("./styles/lib/components/private/InlineField/InlineField.css.cjs");
|
|
25
26
|
const FocusLock = require("react-focus-lock");
|
|
26
27
|
const styles_lib_components_private_Modal_ModalExternalGutter_cjs = require("./styles/lib/components/private/Modal/ModalExternalGutter.cjs");
|
|
27
28
|
const styles_lib_components_private_Modal_Modal_css_cjs = require("./styles/lib/components/private/Modal/Modal.css.cjs");
|
|
29
|
+
const styles_lib_components_Dropdown_Dropdown_css_cjs = require("./styles/lib/components/Dropdown/Dropdown.css.cjs");
|
|
28
30
|
const styles_lib_css_lineHeightContainer_css_cjs = require("./styles/lib/css/lineHeightContainer.css.cjs");
|
|
29
31
|
const styles_lib_components_List_List_css_cjs = require("./styles/lib/components/List/List.css.cjs");
|
|
30
32
|
const styles_lib_components_Loader_Loader_css_cjs = require("./styles/lib/components/Loader/Loader.css.cjs");
|
|
31
|
-
const styles_lib_components_MenuItemCheckbox_MenuItemCheckbox_css_cjs = require("./styles/lib/components/MenuItemCheckbox/MenuItemCheckbox.css.cjs");
|
|
32
|
-
const styles_lib_components_MenuItem_useMenuItem_css_cjs = require("./styles/lib/components/MenuItem/useMenuItem.css.cjs");
|
|
33
33
|
const styles_lib_components_MenuRenderer_MenuRenderer_css_cjs = require("./styles/lib/components/MenuRenderer/MenuRenderer.css.cjs");
|
|
34
|
+
const styles_lib_components_MenuItem_useMenuItem_css_cjs = require("./styles/lib/components/MenuItem/useMenuItem.css.cjs");
|
|
35
|
+
const styles_lib_components_MenuItemCheckbox_MenuItemCheckbox_css_cjs = require("./styles/lib/components/MenuItemCheckbox/MenuItemCheckbox.css.cjs");
|
|
34
36
|
const styles_lib_components_OverflowMenu_OverflowMenu_css_cjs = require("./styles/lib/components/OverflowMenu/OverflowMenu.css.cjs");
|
|
35
37
|
const isMobile = require("is-mobile");
|
|
36
|
-
const styles_lib_components_Dropdown_Dropdown_css_cjs = require("./styles/lib/components/Dropdown/Dropdown.css.cjs");
|
|
37
38
|
const styles_lib_components_MonthPicker_MonthPicker_css_cjs = require("./styles/lib/components/MonthPicker/MonthPicker.css.cjs");
|
|
38
39
|
const styles_lib_components_Pagination_Pagination_css_cjs = require("./styles/lib/components/Pagination/Pagination.css.cjs");
|
|
39
|
-
const styles_lib_components_private_InlineField_InlineField_css_cjs = require("./styles/lib/components/private/InlineField/InlineField.css.cjs");
|
|
40
40
|
const styles_lib_components_Rating_Rating_css_cjs = require("./styles/lib/components/Rating/Rating.css.cjs");
|
|
41
41
|
const styles_lib_components_Stepper_Stepper_css_cjs = require("./styles/lib/components/Stepper/Stepper.css.cjs");
|
|
42
42
|
const styles_lib_components_Tabs_Tabs_css_cjs = require("./styles/lib/components/Tabs/Tabs.css.cjs");
|
|
@@ -45,16 +45,16 @@ const styles_lib_components_Tag_Tag_css_cjs = require("./styles/lib/components/T
|
|
|
45
45
|
const styles_lib_components_Textarea_Highlight_Highlight_css_cjs = require("./styles/lib/components/Textarea/Highlight/Highlight.css.cjs");
|
|
46
46
|
const styles_lib_components_Textarea_Textarea_css_cjs = require("./styles/lib/components/Textarea/Textarea.css.cjs");
|
|
47
47
|
const styles_lib_components_TextDropdown_TextDropdown_css_cjs = require("./styles/lib/components/TextDropdown/TextDropdown.css.cjs");
|
|
48
|
-
const styles_lib_components_icons_IconChevron_IconChevron_css_cjs = require("./styles/lib/components/icons/IconChevron/IconChevron.css.cjs");
|
|
49
|
-
const styles_lib_components_private_Field_Field_css_cjs = require("./styles/lib/components/private/Field/Field.css.cjs");
|
|
50
48
|
const styles_lib_components_Tiles_Tiles_css_cjs = require("./styles/lib/components/Tiles/Tiles.css.cjs");
|
|
51
49
|
const styles_lib_components_Toggle_Toggle_css_cjs = require("./styles/lib/components/Toggle/Toggle.css.cjs");
|
|
50
|
+
const styles_lib_components_icons_IconArrow_IconArrow_css_cjs = require("./styles/lib/components/icons/IconArrow/IconArrow.css.cjs");
|
|
51
|
+
const styles_lib_components_icons_IconThumb_IconThumb_css_cjs = require("./styles/lib/components/icons/IconThumb/IconThumb.css.cjs");
|
|
52
52
|
const _interopDefaultCompat = (e) => e && typeof e === "object" && "default" in e ? e : { default: e };
|
|
53
53
|
const assert__default = /* @__PURE__ */ _interopDefaultCompat(assert);
|
|
54
54
|
const dedent__default = /* @__PURE__ */ _interopDefaultCompat(dedent);
|
|
55
55
|
const parseHighlights__default = /* @__PURE__ */ _interopDefaultCompat(parseHighlights);
|
|
56
|
-
const matchHighlights__default = /* @__PURE__ */ _interopDefaultCompat(matchHighlights);
|
|
57
56
|
const clsx__default = /* @__PURE__ */ _interopDefaultCompat(clsx);
|
|
57
|
+
const matchHighlights__default = /* @__PURE__ */ _interopDefaultCompat(matchHighlights);
|
|
58
58
|
const FocusLock__default = /* @__PURE__ */ _interopDefaultCompat(FocusLock);
|
|
59
59
|
const ThemeNameConsumer = ({ children }) => children(ToastContext.useThemeName());
|
|
60
60
|
const useColor = () => sideEffects_lib_components_BraidProvider_BraidProvider_cjs.useBraidTheme().color;
|
|
@@ -961,6 +961,37 @@ const IconMail = (props) => {
|
|
|
961
961
|
const iconProps = ToastContext.useIcon(props);
|
|
962
962
|
return /* @__PURE__ */ jsxRuntime.jsx(ToastContext.Box, { component: IconMailSvg, ...iconProps });
|
|
963
963
|
};
|
|
964
|
+
const IconMessageSvg = ({ title, titleId, ...props }) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
965
|
+
"svg",
|
|
966
|
+
{
|
|
967
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
968
|
+
width: 16,
|
|
969
|
+
height: 16,
|
|
970
|
+
viewBox: "0 0 24 24",
|
|
971
|
+
focusable: "false",
|
|
972
|
+
fill: "currentColor",
|
|
973
|
+
"aria-labelledby": titleId,
|
|
974
|
+
...props,
|
|
975
|
+
children: [
|
|
976
|
+
title ? /* @__PURE__ */ jsxRuntime.jsx("title", { id: titleId, children: title }) : null,
|
|
977
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
978
|
+
"path",
|
|
979
|
+
{
|
|
980
|
+
d: "M12 3a9 9 0 0 0-7.605 13.815L3 21l4.909-.982A9 9 0 1 0 12 3Z",
|
|
981
|
+
fill: "none",
|
|
982
|
+
stroke: "currentColor",
|
|
983
|
+
strokeLinecap: "round",
|
|
984
|
+
strokeLinejoin: "round",
|
|
985
|
+
strokeWidth: 2
|
|
986
|
+
}
|
|
987
|
+
)
|
|
988
|
+
]
|
|
989
|
+
}
|
|
990
|
+
);
|
|
991
|
+
const IconMessage = (props) => {
|
|
992
|
+
const iconProps = ToastContext.useIcon(props);
|
|
993
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ToastContext.Box, { component: IconMessageSvg, ...iconProps });
|
|
994
|
+
};
|
|
964
995
|
const IconMinusSvg = ({ title, titleId, ...props }) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
965
996
|
"svg",
|
|
966
997
|
{
|
|
@@ -4270,35 +4301,68 @@ const Heading = ({
|
|
|
4270
4301
|
]
|
|
4271
4302
|
}
|
|
4272
4303
|
) });
|
|
4273
|
-
const
|
|
4304
|
+
const validPageBlockComponents = [
|
|
4305
|
+
"div",
|
|
4306
|
+
"article",
|
|
4307
|
+
"aside",
|
|
4308
|
+
"main",
|
|
4309
|
+
"section",
|
|
4310
|
+
"nav"
|
|
4311
|
+
];
|
|
4312
|
+
const gutters = { mobile: "xsmall", tablet: "gutter" };
|
|
4313
|
+
const PageBlock = ({
|
|
4314
|
+
children,
|
|
4315
|
+
width = "large",
|
|
4316
|
+
component: componentProp,
|
|
4317
|
+
data,
|
|
4318
|
+
...restProps
|
|
4319
|
+
}) => {
|
|
4320
|
+
const component = componentProp && validPageBlockComponents.includes(componentProp) ? componentProp : "div";
|
|
4321
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4322
|
+
ToastContext.Box,
|
|
4323
|
+
{
|
|
4324
|
+
component,
|
|
4325
|
+
paddingX: gutters,
|
|
4326
|
+
...ToastContext.buildDataAttributes({ data, validateRestProps: restProps }),
|
|
4327
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(ToastContext.ContentBlock, { width, children })
|
|
4328
|
+
}
|
|
4329
|
+
);
|
|
4330
|
+
};
|
|
4331
|
+
const modalPadding = { mobile: "gutter", tablet: "large" };
|
|
4274
4332
|
const ModalContentHeader = React.forwardRef(
|
|
4275
|
-
({ title, headingLevel, description, descriptionId, center }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
{
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
|
|
4286
|
-
|
|
4287
|
-
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
|
|
4291
|
-
|
|
4292
|
-
|
|
4293
|
-
|
|
4294
|
-
|
|
4295
|
-
|
|
4296
|
-
|
|
4297
|
-
|
|
4298
|
-
|
|
4299
|
-
|
|
4300
|
-
|
|
4301
|
-
|
|
4333
|
+
({ title, headingLevel, description, descriptionId, center }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4334
|
+
ToastContext.Stack,
|
|
4335
|
+
{
|
|
4336
|
+
space: headingLevel === "2" ? { mobile: "small", tablet: "medium" } : "small",
|
|
4337
|
+
children: [
|
|
4338
|
+
/* @__PURE__ */ jsxRuntime.jsx(Heading, { level: headingLevel, align: center ? "center" : void 0, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4339
|
+
ToastContext.Box,
|
|
4340
|
+
{
|
|
4341
|
+
ref,
|
|
4342
|
+
component: "span",
|
|
4343
|
+
tabIndex: -1,
|
|
4344
|
+
outline: "none",
|
|
4345
|
+
position: "relative",
|
|
4346
|
+
className: styles_lib_components_private_Modal_Modal_css_cjs.headingRoot,
|
|
4347
|
+
children: [
|
|
4348
|
+
title,
|
|
4349
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4350
|
+
ToastContext.Overlay,
|
|
4351
|
+
{
|
|
4352
|
+
boxShadow: "outlineFocus",
|
|
4353
|
+
borderRadius: "standard",
|
|
4354
|
+
transition: "fast",
|
|
4355
|
+
className: styles_lib_components_private_Modal_Modal_css_cjs.headingFocus,
|
|
4356
|
+
onlyVisibleForKeyboardNavigation: true
|
|
4357
|
+
}
|
|
4358
|
+
)
|
|
4359
|
+
]
|
|
4360
|
+
}
|
|
4361
|
+
) }),
|
|
4362
|
+
description ? /* @__PURE__ */ jsxRuntime.jsx(ToastContext.Box, { id: descriptionId, children: description }) : null
|
|
4363
|
+
]
|
|
4364
|
+
}
|
|
4365
|
+
)
|
|
4302
4366
|
);
|
|
4303
4367
|
const ModalContent = ({
|
|
4304
4368
|
id,
|
|
@@ -4366,7 +4430,8 @@ const ModalContent = ({
|
|
|
4366
4430
|
boxShadow: "large",
|
|
4367
4431
|
width: width !== "content" ? "full" : void 0,
|
|
4368
4432
|
height: position === "right" || position === "left" ? "full" : void 0,
|
|
4369
|
-
|
|
4433
|
+
paddingY: modalPadding,
|
|
4434
|
+
paddingX: position !== "center" ? gutters : modalPadding,
|
|
4370
4435
|
className: [
|
|
4371
4436
|
styles_lib_components_private_Modal_Modal_css_cjs.pointerEventsAll,
|
|
4372
4437
|
position === "center" && styles_lib_components_private_Modal_Modal_css_cjs.maxSize[position]
|
|
@@ -4415,15 +4480,14 @@ const ModalContent = ({
|
|
|
4415
4480
|
display: "flex",
|
|
4416
4481
|
justifyContent: "flexEnd",
|
|
4417
4482
|
paddingTop: modalPadding,
|
|
4418
|
-
paddingRight: modalPadding,
|
|
4483
|
+
paddingRight: position !== "center" ? gutters : modalPadding,
|
|
4419
4484
|
className: position === "center" && styles_lib_components_private_Modal_Modal_css_cjs.maxSize[position],
|
|
4420
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4485
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4421
4486
|
ToastContext.Box,
|
|
4422
4487
|
{
|
|
4423
4488
|
position: "relative",
|
|
4424
4489
|
background: "surface",
|
|
4425
4490
|
borderRadius: "full",
|
|
4426
|
-
padding: "xsmall",
|
|
4427
4491
|
className: [styles_lib_components_private_Modal_Modal_css_cjs.closeIconOffset, styles_lib_components_private_Modal_Modal_css_cjs.pointerEventsAll],
|
|
4428
4492
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4429
4493
|
ToastContext.ButtonIcon,
|
|
@@ -4438,7 +4502,7 @@ const ModalContent = ({
|
|
|
4438
4502
|
}
|
|
4439
4503
|
)
|
|
4440
4504
|
}
|
|
4441
|
-
)
|
|
4505
|
+
)
|
|
4442
4506
|
}
|
|
4443
4507
|
)
|
|
4444
4508
|
]
|
|
@@ -4531,24 +4595,28 @@ const Modal = ({
|
|
|
4531
4595
|
const closeHandlerRef = React.useRef(onClose);
|
|
4532
4596
|
const initiateClose = () => {
|
|
4533
4597
|
if (allowClose) {
|
|
4534
|
-
|
|
4598
|
+
const result = closeHandlerRef.current(false);
|
|
4599
|
+
if (result === false) {
|
|
4600
|
+
return result;
|
|
4601
|
+
}
|
|
4602
|
+
if (openRef.current) {
|
|
4603
|
+
dispatch(CLOSE_MODAL);
|
|
4604
|
+
}
|
|
4535
4605
|
}
|
|
4536
4606
|
};
|
|
4537
4607
|
React.useEffect(() => {
|
|
4538
4608
|
openRef.current = open;
|
|
4539
4609
|
dispatch(open ? OPEN_MODAL : CLOSE_MODAL);
|
|
4540
4610
|
}, [open]);
|
|
4611
|
+
const closing = state === CLOSING;
|
|
4541
4612
|
React.useEffect(() => {
|
|
4542
|
-
if (
|
|
4613
|
+
if (closing) {
|
|
4543
4614
|
const timer = setTimeout(() => {
|
|
4544
4615
|
dispatch(ANIMATION_COMPLETE);
|
|
4545
4616
|
}, ANIMATION_DURATION);
|
|
4546
4617
|
return () => clearTimeout(timer);
|
|
4547
4618
|
}
|
|
4548
|
-
|
|
4549
|
-
closeHandlerRef.current(false);
|
|
4550
|
-
}
|
|
4551
|
-
}, [state]);
|
|
4619
|
+
}, [closing]);
|
|
4552
4620
|
const shouldAriaHideOthers = state === OPEN || state === CLOSING;
|
|
4553
4621
|
React.useEffect(() => {
|
|
4554
4622
|
if (shouldAriaHideOthers && modalRef.current) {
|
|
@@ -4615,7 +4683,7 @@ const Modal = ({
|
|
|
4615
4683
|
padding: position === "center" ? styles_lib_components_private_Modal_ModalExternalGutter_cjs.externalGutter : void 0,
|
|
4616
4684
|
className: [
|
|
4617
4685
|
styles_lib_components_private_Modal_Modal_css_cjs.modalContainer,
|
|
4618
|
-
position === "left" || position === "right" && styles_lib_components_private_Modal_Modal_css_cjs.horiztontalTransition,
|
|
4686
|
+
(position === "left" || position === "right") && styles_lib_components_private_Modal_Modal_css_cjs.horiztontalTransition,
|
|
4619
4687
|
state === OPENING && styles_lib_components_private_Modal_Modal_css_cjs.entrance[position],
|
|
4620
4688
|
state === CLOSING && position in styles_lib_components_private_Modal_Modal_css_cjs.exit && styles_lib_components_private_Modal_Modal_css_cjs.exit[position]
|
|
4621
4689
|
],
|
|
@@ -8163,6 +8231,7 @@ exports.IconLinkBroken = IconLinkBroken;
|
|
|
8163
8231
|
exports.IconList = IconList;
|
|
8164
8232
|
exports.IconLocation = IconLocation;
|
|
8165
8233
|
exports.IconMail = IconMail;
|
|
8234
|
+
exports.IconMessage = IconMessage;
|
|
8166
8235
|
exports.IconMinus = IconMinus;
|
|
8167
8236
|
exports.IconMobile = IconMobile;
|
|
8168
8237
|
exports.IconMoney = IconMoney;
|
|
@@ -8220,6 +8289,7 @@ exports.MenuRenderer = MenuRenderer;
|
|
|
8220
8289
|
exports.MonthPicker = MonthPicker;
|
|
8221
8290
|
exports.Notice = Notice;
|
|
8222
8291
|
exports.OverflowMenu = OverflowMenu;
|
|
8292
|
+
exports.PageBlock = PageBlock;
|
|
8223
8293
|
exports.Pagination = Pagination;
|
|
8224
8294
|
exports.PasswordField = PasswordField;
|
|
8225
8295
|
exports.Radio = Radio;
|