@dxc-technology/halstack-react 0.0.0-3b81157 → 0.0.0-3ce9060

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.
Files changed (99) hide show
  1. package/HalstackContext.d.ts +11 -1
  2. package/HalstackContext.js +1 -1
  3. package/README.md +47 -0
  4. package/accordion/Accordion.d.ts +1 -1
  5. package/accordion/Accordion.js +2 -14
  6. package/accordion/Accordion.stories.tsx +2 -100
  7. package/accordion/types.d.ts +0 -12
  8. package/accordion-group/AccordionGroup.d.ts +4 -3
  9. package/accordion-group/AccordionGroup.js +21 -42
  10. package/accordion-group/AccordionGroup.stories.tsx +77 -76
  11. package/accordion-group/AccordionGroup.test.js +6 -16
  12. package/accordion-group/AccordionGroupAccordion.d.ts +4 -0
  13. package/accordion-group/AccordionGroupAccordion.js +43 -0
  14. package/accordion-group/types.d.ts +0 -12
  15. package/alert/Alert.js +1 -3
  16. package/box/Box.d.ts +1 -1
  17. package/box/Box.js +5 -22
  18. package/box/Box.stories.tsx +25 -53
  19. package/box/types.d.ts +0 -12
  20. package/button/Button.d.ts +1 -1
  21. package/button/Button.js +45 -54
  22. package/button/Button.stories.tsx +1 -1
  23. package/button/Button.test.js +11 -0
  24. package/button/types.d.ts +4 -0
  25. package/card/Card.d.ts +1 -1
  26. package/card/Card.js +18 -35
  27. package/card/Card.stories.tsx +0 -29
  28. package/card/types.d.ts +1 -7
  29. package/chip/Chip.js +23 -36
  30. package/chip/Chip.stories.tsx +25 -17
  31. package/common/coreTokens.js +1 -1
  32. package/common/variables.d.ts +10 -0
  33. package/common/variables.js +10 -0
  34. package/date-input/Calendar.js +2 -2
  35. package/dialog/Dialog.d.ts +1 -1
  36. package/dialog/Dialog.js +4 -22
  37. package/dialog/Dialog.stories.tsx +52 -176
  38. package/dialog/types.d.ts +0 -13
  39. package/file-input/FileItem.js +2 -2
  40. package/file-input/types.d.ts +1 -1
  41. package/footer/Footer.d.ts +1 -1
  42. package/footer/Footer.js +43 -61
  43. package/footer/Footer.stories.tsx +19 -95
  44. package/footer/Footer.test.js +3 -1
  45. package/footer/types.d.ts +10 -12
  46. package/grid/Grid.d.ts +1 -1
  47. package/grid/Grid.js +1 -1
  48. package/grid/Grid.stories.tsx +38 -38
  49. package/header/Header.d.ts +1 -1
  50. package/header/Header.js +3 -30
  51. package/header/Header.stories.tsx +7 -71
  52. package/header/types.d.ts +0 -14
  53. package/image/Image.d.ts +4 -0
  54. package/image/Image.js +85 -0
  55. package/image/Image.stories.tsx +127 -0
  56. package/image/types.d.ts +72 -0
  57. package/layout/ApplicationLayout.d.ts +2 -2
  58. package/layout/ApplicationLayout.js +14 -11
  59. package/layout/ApplicationLayout.stories.tsx +1 -1
  60. package/layout/Icons.d.ts +7 -4
  61. package/layout/Icons.js +52 -56
  62. package/main.d.ts +2 -1
  63. package/main.js +8 -0
  64. package/nav-tabs/NavTabs.d.ts +2 -2
  65. package/nav-tabs/NavTabs.js +7 -10
  66. package/nav-tabs/NavTabs.stories.tsx +14 -0
  67. package/nav-tabs/Tab.js +22 -26
  68. package/nav-tabs/types.d.ts +8 -9
  69. package/number-input/NumberInput.d.ts +7 -0
  70. package/number-input/NumberInput.js +6 -4
  71. package/number-input/NumberInput.test.js +278 -95
  72. package/package.json +2 -2
  73. package/paginator/Paginator.js +1 -1
  74. package/paginator/Paginator.test.js +13 -0
  75. package/password-input/Icons.d.ts +6 -0
  76. package/password-input/Icons.js +39 -0
  77. package/password-input/PasswordInput.js +35 -82
  78. package/password-input/PasswordInput.stories.tsx +1 -0
  79. package/password-input/PasswordInput.test.js +27 -34
  80. package/radio-group/Radio.js +10 -10
  81. package/radio-group/RadioGroup.js +8 -10
  82. package/select/Select.stories.tsx +3 -3
  83. package/select/Select.test.js +4 -4
  84. package/text-input/TextInput.js +62 -78
  85. package/textarea/Textarea.js +24 -22
  86. package/textarea/Textarea.stories.jsx +8 -0
  87. package/textarea/Textarea.test.js +59 -15
  88. package/textarea/types.d.ts +4 -0
  89. package/toggle-group/ToggleGroup.js +79 -56
  90. package/toggle-group/ToggleGroup.stories.tsx +6 -3
  91. package/toggle-group/ToggleGroup.test.js +37 -23
  92. package/toggle-group/types.d.ts +22 -13
  93. package/useTheme.d.ts +10 -0
  94. package/utils/FocusLock.js +2 -3
  95. package/card/ice-cream.jpg +0 -0
  96. package/number-input/NumberInputContext.d.ts +0 -4
  97. package/number-input/NumberInputContext.js +0 -19
  98. package/number-input/numberInputContextTypes.d.ts +0 -19
  99. /package/{number-input/numberInputContextTypes.js → image/types.js} +0 -0
package/chip/Chip.js CHANGED
@@ -42,43 +42,42 @@ var DxcChip = function DxcChip(_ref) {
42
42
  var colorsTheme = (0, _useTheme["default"])();
43
43
  return /*#__PURE__*/_react["default"].createElement(_styledComponents.ThemeProvider, {
44
44
  theme: colorsTheme.chip
45
- }, /*#__PURE__*/_react["default"].createElement(StyledDxcChip, {
45
+ }, /*#__PURE__*/_react["default"].createElement(Chip, {
46
46
  disabled: disabled,
47
47
  margin: margin
48
48
  }, prefixIcon && /*#__PURE__*/_react["default"].createElement(IconContainer, {
49
+ role: typeof onClickPrefix === "function" ? "button" : undefined,
49
50
  disabled: disabled,
50
- prefixIcon: true,
51
- label: label,
51
+ interactuable: typeof onClickPrefix === "function" && !disabled,
52
52
  tabIndex: typeof onClickPrefix === "function" && !disabled ? tabIndex : -1,
53
53
  onClick: function onClick() {
54
54
  return onClickPrefix && !disabled && onClickPrefix();
55
- },
56
- interactuable: typeof onClickPrefix === "function" && !disabled
55
+ }
57
56
  }, typeof prefixIcon === "string" ? /*#__PURE__*/_react["default"].createElement("img", {
58
57
  src: prefixIcon
59
- }) : prefixIcon), label && /*#__PURE__*/_react["default"].createElement(ChipTextContainer, {
58
+ }) : prefixIcon), label && /*#__PURE__*/_react["default"].createElement(LabelContainer, {
60
59
  disabled: disabled
61
60
  }, label), suffixIcon && /*#__PURE__*/_react["default"].createElement(IconContainer, {
61
+ role: typeof onClickSuffix === "function" ? "button" : undefined,
62
62
  disabled: disabled,
63
- suffixIcon: true,
64
- label: label,
63
+ interactuable: typeof onClickSuffix === "function" && !disabled,
65
64
  tabIndex: typeof onClickSuffix === "function" && !disabled ? tabIndex : -1,
66
65
  onClick: function onClick() {
67
- return onClickSuffix && !disabled && onClickSuffix();
68
- },
69
- interactuable: typeof onClickSuffix === "function" && !disabled
66
+ return !disabled && (onClickSuffix === null || onClickSuffix === void 0 ? void 0 : onClickSuffix());
67
+ }
70
68
  }, typeof suffixIcon === "string" ? /*#__PURE__*/_react["default"].createElement("img", {
71
69
  src: suffixIcon
72
70
  }) : suffixIcon)));
73
71
  };
74
72
 
75
- var getCursor = function getCursor(interactuable, disabled) {
76
- if (disabled) return "cursor: not-allowed;";else if (interactuable) return "cursor: pointer;";else return "cursor: default; outline:none;";
73
+ var calculateWidth = function calculateWidth(margin) {
74
+ return "calc(100% - ".concat((0, _utils.getMargin)(margin, "left"), " - ").concat((0, _utils.getMargin)(margin, "right"), ")");
77
75
  };
78
76
 
79
- var StyledDxcChip = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n display: inline-flex;\n align-items: center;\n min-height: 40px;\n max-width: ", ";\n background-color: ", ";\n border-radius: ", ";\n border-width: ", ";\n border-style: ", ";\n border-color: ", ";\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n cursor: ", ";\n"])), function (_ref2) {
80
- var margin = _ref2.margin;
81
- return "calc(100% - 40px - ".concat((0, _utils.getMargin)(margin, "left"), " - ").concat((0, _utils.getMargin)(margin, "right"), ")");
77
+ var Chip = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n box-sizing: border-box;\n display: inline-flex;\n align-items: center;\n gap: ", ";\n min-height: 40px;\n max-width: ", ";\n background-color: ", ";\n border-radius: ", ";\n border-width: ", ";\n border-style: ", ";\n border-color: ", ";\n\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n cursor: ", ";\n"])), function (props) {
78
+ return props.theme.iconSpacing;
79
+ }, function (props) {
80
+ return calculateWidth(props.margin);
82
81
  }, function (props) {
83
82
  return props.disabled && props.theme.disabledBackgroundColor || props.theme.backgroundColor;
84
83
  }, function (props) {
@@ -107,12 +106,12 @@ var StyledDxcChip = _styledComponents["default"].div(_templateObject || (_templa
107
106
  return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.bottom ? _variables.spaces[props.margin.bottom] : "";
108
107
  }, function (props) {
109
108
  return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.left ? _variables.spaces[props.margin.left] : "";
110
- }, function (_ref3) {
111
- var disabled = _ref3.disabled;
109
+ }, function (_ref2) {
110
+ var disabled = _ref2.disabled;
112
111
  return disabled && "not-allowed";
113
112
  });
114
113
 
115
- var ChipTextContainer = _styledComponents["default"].span(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n font-size: ", ";\n font-family: ", ";\n font-weight: ", ";\n font-style: ", ";\n color: ", ";\n cursor: ", ";\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n"])), function (props) {
114
+ var LabelContainer = _styledComponents["default"].span(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n font-size: ", ";\n font-family: ", ";\n font-weight: ", ";\n font-style: ", ";\n color: ", ";\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n"])), function (props) {
116
115
  return props.theme.fontSize;
117
116
  }, function (props) {
118
117
  return props.theme.fontFamily;
@@ -122,27 +121,15 @@ var ChipTextContainer = _styledComponents["default"].span(_templateObject2 || (_
122
121
  return props.theme.fontStyle;
123
122
  }, function (props) {
124
123
  return props.disabled ? props.theme.disabledFontColor : props.theme.fontColor;
125
- }, function (_ref4) {
126
- var disabled = _ref4.disabled;
127
- return disabled && "not-allowed" || "default";
128
124
  });
129
125
 
130
- var IconContainer = _styledComponents["default"].div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n ", "\n color: ", ";\n ", "\n\n &:hover {\n color: ", ";\n }\n &:focus {\n outline-color: ", ";\n outline-width: ", ";\n ", "\n }\n &:active {\n color: ", ";\n }\n img,\n svg {\n width: ", ";\n height: ", ";\n }\n"])), function (props) {
131
- return props.prefixIcon ? "margin-right: ".concat((props.label || props.suffixIcon) && props.theme.iconSpacing || props.prefixIcon && "0", ";") : "margin-left: ".concat((props.label || props.prefixIcon) && props.theme.iconSpacing || props.prefixIcon && "0", ";");
132
- }, function (props) {
126
+ var IconContainer = _styledComponents["default"].div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n border-radius: 0.25rem;\n color: ", ";\n ", "\n\n ", "\n\n img,\n svg {\n width: ", ";\n height: ", ";\n }\n"])), function (props) {
133
127
  return props.disabled ? props.theme.disabledIconColor : props.theme.iconColor;
128
+ }, function (_ref3) {
129
+ var interactuable = _ref3.interactuable;
130
+ return interactuable && "cursor: pointer;";
134
131
  }, function (props) {
135
- return getCursor(props.interactuable, props.disabled);
136
- }, function (props) {
137
- return !props.disabled && props.theme.hoverIconColor;
138
- }, function (props) {
139
- return !props.disabled && props.theme.focusColor;
140
- }, function (props) {
141
- return !props.disabled && props.theme.focusBorderThickness;
142
- }, function (props) {
143
- return props.disabled && "outline: none;";
144
- }, function (props) {
145
- return !props.disabled && props.theme.activeIconColor;
132
+ return props.interactuable && "\n &:hover {\n color: ".concat(props.theme.hoverIconColor, ";\n }\n &:focus,\n &:focus-visible {\n outline: ").concat(props.theme.focusBorderThickness, " solid ").concat(props.theme.focusColor, ";\n }\n &:active {\n color: ").concat(props.theme.activeIconColor, ";\n }\n ");
146
133
  }, function (props) {
147
134
  return props.theme.iconSize;
148
135
  }, function (props) {
@@ -81,29 +81,37 @@ export const Chromatic = () => (
81
81
  </ExampleContainer>
82
82
  <ExampleContainer>
83
83
  <Title title="Chip with ellipsis" theme="light" level={4} />
84
- <DxcChip label="With ellipsis asdfasdf asdf asdfasdf asdf asdfasdf asdfasdf asdf asdf adfasrfasf afsdg afgasfg asdf asdf asdf asdf asdf asdf asdf afdg asfg asdfg asdf asdf asdf asdfasdf asd fas df asd asdf asdf asdfasd fg ssssssssssss ssss" />
84
+ <div style={{ width: "200px" }}>
85
+ <DxcChip label="With ellipsis asdfasdf asdf asdfasdf asdf asdfasdf asdfasdf asdf asdf adfasrfasf afsdg afgasfg asdf asdf asdf asdf asdf asdf asdf afdg asfg asdfg asdf asdf asdf asdfasdf asd fas df asd asdf asdf asdfasd fg ssssssssssss ssss" />
86
+ </div>
85
87
  </ExampleContainer>
86
88
  <ExampleContainer>
87
89
  <Title title="Chip with ellipsis and suffix" theme="light" level={4} />
88
- <DxcChip
89
- suffixIcon={iconSVG}
90
- label="With ellipsis asdfasdf asdf asdfasdf asdf asdfasdf asdfasdf asdf asdf adfasrfasf afsdg afgasfg asdf asdf asdf asdf asdf asdf asdf afdg asfg asdfg asdf asdf asdf asdfasdf asd fas df asd asdf asdf asdfasd fgsss"
91
- />
90
+ <div style={{ width: "200px" }}>
91
+ <DxcChip
92
+ suffixIcon={iconSVG}
93
+ label="With ellipsis asdfasdf asdf asdfasdf asdf asdfasdf asdfasdf asdf asdf adfasrfasf afsdg afgasfg asdf asdf asdf asdf asdf asdf asdf afdg asfg asdfg asdf asdf asdf asdfasdf asd fas df asd asdf asdf asdfasd fgsss"
94
+ />
95
+ </div>
92
96
  </ExampleContainer>
93
97
  <ExampleContainer>
94
98
  <Title title="Chip with ellipsis and prefix" theme="light" level={4} />
95
- <DxcChip
96
- prefixIcon={iconSVG}
97
- label="With ellipsis asdfasdf asdf asdfasdf asdf asdfasdf asdfasdf asdf asdf adfasrfasf afsdg afgasfg asdf asdf asdf asdf asdf asdf asdf afdg asfg asdfg asdf asdf asdf asdfasdf asd fas df asd asdf asdf asdfasd fgsss"
98
- />
99
+ <div style={{ width: "200px" }}>
100
+ <DxcChip
101
+ prefixIcon={iconSVG}
102
+ label="With ellipsis asdfasdf asdf asdfasdf asdf asdfasdf asdfasdf asdf asdf adfasrfasf afsdg afgasfg asdf asdf asdf asdf asdf asdf asdf afdg asfg asdfg asdf asdf asdf asdfasdf asd fas df asd asdf asdf asdfasd fgsss"
103
+ />
104
+ </div>
99
105
  </ExampleContainer>
100
106
  <ExampleContainer>
101
107
  <Title title="Chip with ellipsis, suffix and prefix" theme="light" level={4} />
102
- <DxcChip
103
- prefixIcon={iconSVG}
104
- suffixIcon={iconSVG}
105
- label="With ellipsis asdfasdf asdf asdfasdf asdf asdfasdf asdfasdf asdf asdf adfasrfasf afsdg afgasfg asdf asdf asdf asdf asdf asdf asdf afdg asfg asdfg asdf asdf asdf asdfasdf asd fas df asd asdf asdf asdfasdf"
106
- />
108
+ <div style={{ width: "200px" }}>
109
+ <DxcChip
110
+ prefixIcon={iconSVG}
111
+ suffixIcon={iconSVG}
112
+ label="With ellipsis asdfasdf asdf asdfasdf asdf asdfasdf asdfasdf asdf asdf adfasrfasf afsdg afgasfg asdf asdf asdf asdf asdf asdf asdf afdg asfg asdfg asdf asdf asdf asdfasdf asd fas df asd asdf asdf asdfasdf"
113
+ />
114
+ </div>
107
115
  </ExampleContainer>
108
116
  <Title title="Margins" theme="light" level={2} />
109
117
  <ExampleContainer>
@@ -191,16 +199,16 @@ const ChipPrefixFocused = () => (
191
199
  const ChipSuffixFocused = () => (
192
200
  <ExampleContainer>
193
201
  <Title title="Chip with suffix" theme="light" level={4} />
194
- <DxcChip label="Chip with suffix" suffixIcon={iconSVG} onClickSuffix={() => {}} />
202
+ <DxcChip label="Chip with suffix" suffixIcon="https://icons-for-free.com/download-icon-close+icon-1320184117228553763_512.png" onClickSuffix={() => {}} />
195
203
  </ExampleContainer>
196
204
  );
197
205
 
198
206
  export const PrefixFocused = ChipPrefixFocused.bind({});
199
- PrefixFocused.play = async ({ canvasElement }) => {
207
+ PrefixFocused.play = async () => {
200
208
  await userEvent.tab();
201
209
  };
202
210
 
203
211
  export const SuffixFocused = ChipSuffixFocused.bind({});
204
- SuffixFocused.play = async ({ canvasElement }) => {
212
+ SuffixFocused.play = async () => {
205
213
  await userEvent.tab();
206
214
  };
@@ -23,7 +23,7 @@ var CORE_TOKENS = {
23
23
  color_grey_700: "#666666",
24
24
  color_grey_800: "#4d4d4d",
25
25
  color_grey_900: "#333333",
26
- // Trasparent variants
26
+ // Transparent variants
27
27
  color_grey_50_a: "#00000005",
28
28
  color_grey_100_a: "#0000000d",
29
29
  color_grey_200_a: "#0000001a",
@@ -488,6 +488,14 @@ export declare const componentTokens: {
488
488
  level5LineHeight: string;
489
489
  level5LetterSpacing: string;
490
490
  };
491
+ image: {
492
+ captionFontColor: string;
493
+ captionFontFamily: string;
494
+ captionFontSize: string;
495
+ captionFontStyle: string;
496
+ captionFontWeight: string;
497
+ captionLineHeight: string;
498
+ };
491
499
  link: {
492
500
  fontColor: string;
493
501
  fontFamily: string;
@@ -992,6 +1000,8 @@ export declare const componentTokens: {
992
1000
  disabledBorderColorOnDark: string;
993
1001
  disabledContainerFillColor: string;
994
1002
  disabledContainerFillColorOnDark: string;
1003
+ readOnlyBorderColor: string;
1004
+ hoverReadOnlyBorderColor: string;
995
1005
  errorBorderColor: string;
996
1006
  errorBorderColorOnDark: string;
997
1007
  hoverErrorBorderColor: string;
@@ -499,6 +499,14 @@ var componentTokens = {
499
499
  level5LineHeight: _coreTokens["default"].type_leading_normal,
500
500
  level5LetterSpacing: _coreTokens["default"].type_spacing_wide_01
501
501
  },
502
+ image: {
503
+ captionFontColor: _coreTokens["default"].color_grey_900,
504
+ captionFontFamily: _coreTokens["default"].type_sans,
505
+ captionFontSize: _coreTokens["default"].type_scale_02,
506
+ captionFontStyle: _coreTokens["default"].type_normal,
507
+ captionFontWeight: _coreTokens["default"].type_regular,
508
+ captionLineHeight: _coreTokens["default"].type_leading_normal
509
+ },
502
510
  link: {
503
511
  fontColor: _coreTokens["default"].color_blue_800,
504
512
  fontFamily: _coreTokens["default"].inherit,
@@ -1003,6 +1011,8 @@ var componentTokens = {
1003
1011
  disabledBorderColorOnDark: _coreTokens["default"].color_grey_500,
1004
1012
  disabledContainerFillColor: _coreTokens["default"].color_grey_100,
1005
1013
  disabledContainerFillColorOnDark: _coreTokens["default"].color_grey_700,
1014
+ readOnlyBorderColor: _coreTokens["default"].color_grey_500,
1015
+ hoverReadOnlyBorderColor: _coreTokens["default"].color_grey_600,
1006
1016
  errorBorderColor: _coreTokens["default"].color_red_700,
1007
1017
  errorBorderColorOnDark: _coreTokens["default"].color_red_500,
1008
1018
  hoverErrorBorderColor: _coreTokens["default"].color_red_600,
@@ -19,7 +19,7 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
19
19
 
20
20
  var _useTranslatedLabels = _interopRequireDefault(require("../useTranslatedLabels"));
21
21
 
22
- var _main = require("../main");
22
+ var _Flex = _interopRequireDefault(require("../flex/Flex"));
23
23
 
24
24
  var _templateObject, _templateObject2, _templateObject3, _templateObject4;
25
25
 
@@ -183,7 +183,7 @@ var Calendar = function Calendar(_ref) {
183
183
  }
184
184
  };
185
185
 
186
- return /*#__PURE__*/_react["default"].createElement(CalendarContainer, null, /*#__PURE__*/_react["default"].createElement(_main.DxcFlex, {
186
+ return /*#__PURE__*/_react["default"].createElement(CalendarContainer, null, /*#__PURE__*/_react["default"].createElement(_Flex["default"], {
187
187
  alignItems: "center",
188
188
  justifyContent: "space-between"
189
189
  }, weekDays.map(function (weekDay) {
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  import DialogPropsType from "./types";
3
- declare const DxcDialog: ({ isCloseVisible, onCloseClick, children, overlay, onBackgroundClick, padding, tabIndex, }: DialogPropsType) => JSX.Element;
3
+ declare const DxcDialog: ({ isCloseVisible, onCloseClick, children, overlay, onBackgroundClick, tabIndex, }: DialogPropsType) => JSX.Element;
4
4
  export default DxcDialog;
package/dialog/Dialog.js CHANGED
@@ -2,15 +2,13 @@
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
4
 
5
- var _typeof3 = require("@babel/runtime/helpers/typeof");
5
+ var _typeof = require("@babel/runtime/helpers/typeof");
6
6
 
7
7
  Object.defineProperty(exports, "__esModule", {
8
8
  value: true
9
9
  });
10
10
  exports["default"] = void 0;
11
11
 
12
- var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
13
-
14
12
  var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
15
13
 
16
14
  var _react = _interopRequireWildcard(require("react"));
@@ -29,11 +27,11 @@ var _reactDom = require("react-dom");
29
27
 
30
28
  var _FocusLock = _interopRequireDefault(require("../utils/FocusLock"));
31
29
 
32
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
30
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
33
31
 
34
32
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
35
33
 
36
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof3(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
34
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
37
35
 
38
36
  var closeIcon = /*#__PURE__*/_react["default"].createElement("svg", {
39
37
  role: "img",
@@ -57,8 +55,6 @@ var DxcDialog = function DxcDialog(_ref) {
57
55
  _ref$overlay = _ref.overlay,
58
56
  overlay = _ref$overlay === void 0 ? true : _ref$overlay,
59
57
  onBackgroundClick = _ref.onBackgroundClick,
60
- _ref$padding = _ref.padding,
61
- padding = _ref$padding === void 0 ? "small" : _ref$padding,
62
58
  _ref$tabIndex = _ref.tabIndex,
63
59
  tabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex;
64
60
  var colorsTheme = (0, _useTheme["default"])();
@@ -86,11 +82,9 @@ var DxcDialog = function DxcDialog(_ref) {
86
82
  role: "dialog",
87
83
  "aria-modal": overlay,
88
84
  isCloseVisible: isCloseVisible
89
- }, /*#__PURE__*/_react["default"].createElement(Children, {
90
- padding: padding
91
85
  }, /*#__PURE__*/_react["default"].createElement(_BackgroundColorContext.BackgroundColorProvider, {
92
86
  color: colorsTheme.dialog.backgroundColor
93
- }, children)), isCloseVisible && /*#__PURE__*/_react["default"].createElement(CloseIconAction, {
87
+ }, children), isCloseVisible && /*#__PURE__*/_react["default"].createElement(CloseIconAction, {
94
88
  onClick: function onClick() {
95
89
  onCloseClick === null || onCloseClick === void 0 ? void 0 : onCloseClick();
96
90
  },
@@ -133,17 +127,5 @@ var CloseIconAction = _styledComponents["default"].button(_templateObject5 || (_
133
127
  return props.theme.closeIconHeight;
134
128
  });
135
129
 
136
- var Children = _styledComponents["default"].div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2["default"])(["\n padding: ", ";\n padding-top: ", ";\n padding-right: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n"])), function (props) {
137
- return props.padding && (0, _typeof2["default"])(props.padding) !== "object" ? _variables.spaces[props.padding] : _variables.spaces["small"];
138
- }, function (props) {
139
- return props.padding && (0, _typeof2["default"])(props.padding) === "object" && props.padding.top ? _variables.spaces[props.padding.top] : "";
140
- }, function (props) {
141
- return props.padding && (0, _typeof2["default"])(props.padding) === "object" && props.padding.right ? _variables.spaces[props.padding.right] : "";
142
- }, function (props) {
143
- return props.padding && (0, _typeof2["default"])(props.padding) === "object" && props.padding.bottom ? _variables.spaces[props.padding.bottom] : "";
144
- }, function (props) {
145
- return props.padding && (0, _typeof2["default"])(props.padding) === "object" && props.padding.left ? _variables.spaces[props.padding.left] : "";
146
- });
147
-
148
130
  var _default = DxcDialog;
149
131
  exports["default"] = _default;
@@ -12,7 +12,7 @@ import DxcParagraph from "../paragraph/Paragraph";
12
12
  import DxcAlert from "../alert/Alert";
13
13
 
14
14
  export default {
15
- title: "Dialog ",
15
+ title: "Dialog",
16
16
  component: DxcDialog,
17
17
  };
18
18
 
@@ -28,29 +28,7 @@ export const DefaultDialog = () => (
28
28
  <ExampleContainer expanded={true}>
29
29
  <Title title="Default dialog" theme="light" level={4} />
30
30
  <DxcDialog>
31
- <DxcFlex direction="column" gap="1rem">
32
- <DxcHeading level={4} text="Example title" />
33
- <DxcParagraph>
34
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi egestas luctus porttitor. Donec massa magna,
35
- placerat sit amet felis eget, venenatis fringilla ipsum. Lorem ipsum dolor sit amet, consectetur adipiscing
36
- elit. Donec congue laoreet orci, nec elementum dolor consequat quis. Curabitur rhoncus justo sed dapibus
37
- tincidunt. Vestibulum cursus ut risus sit amet congue. Nunc luctus, urna ullamcorper facilisis Jia Le, risus
38
- eros aliquam erat, ut efficitur ante neque id odio. Nam orci leo, dignissim sit amet dolor ut, congue gravida
39
- enim. Donec rhoncus aliquam nisl, ac cursus enim bibendum vitae. Nunc sit amet elit ornare, malesuada urna eu,
40
- fringilla mauris. Vivamus bibendum turpis est, id elementum purus euismod sit amet. Etiam sit amet maximus
41
- augue. Vivamus erat sapien, ultricies fringilla tellus id, condimentum blandit justo. Praesent quis nunc
42
- dignissim, pharetra neque molestie, molestie lectus.
43
- </DxcParagraph>
44
- </DxcFlex>
45
- </DxcDialog>
46
- </ExampleContainer>
47
- );
48
-
49
- export const DefaultDialogOpinionated = () => (
50
- <ExampleContainer expanded={true}>
51
- <Title title="Default dialog" theme="light" level={4} />
52
- <HalstackProvider theme={opinionatedTheme}>
53
- <DxcDialog>
31
+ <DxcInset space="1.5rem">
54
32
  <DxcFlex direction="column" gap="1rem">
55
33
  <DxcHeading level={4} text="Example title" />
56
34
  <DxcParagraph>
@@ -65,6 +43,32 @@ export const DefaultDialogOpinionated = () => (
65
43
  Praesent quis nunc dignissim, pharetra neque molestie, molestie lectus.
66
44
  </DxcParagraph>
67
45
  </DxcFlex>
46
+ </DxcInset>
47
+ </DxcDialog>
48
+ </ExampleContainer>
49
+ );
50
+
51
+ export const DefaultDialogOpinionated = () => (
52
+ <ExampleContainer expanded={true}>
53
+ <Title title="Default dialog" theme="light" level={4} />
54
+ <HalstackProvider theme={opinionatedTheme}>
55
+ <DxcDialog>
56
+ <DxcInset space="1.5rem">
57
+ <DxcFlex direction="column" gap="1rem">
58
+ <DxcHeading level={4} text="Example title" />
59
+ <DxcParagraph>
60
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi egestas luctus porttitor. Donec massa
61
+ magna, placerat sit amet felis eget, venenatis fringilla ipsum. Lorem ipsum dolor sit amet, consectetur
62
+ adipiscing elit. Donec congue laoreet orci, nec elementum dolor consequat quis. Curabitur rhoncus justo
63
+ sed dapibus tincidunt. Vestibulum cursus ut risus sit amet congue. Nunc luctus, urna ullamcorper facilisis
64
+ Jia Le, risus eros aliquam erat, ut efficitur ante neque id odio. Nam orci leo, dignissim sit amet dolor
65
+ ut, congue gravida enim. Donec rhoncus aliquam nisl, ac cursus enim bibendum vitae. Nunc sit amet elit
66
+ ornare, malesuada urna eu, fringilla mauris. Vivamus bibendum turpis est, id elementum purus euismod sit
67
+ amet. Etiam sit amet maximus augue. Vivamus erat sapien, ultricies fringilla tellus id, condimentum
68
+ blandit justo. Praesent quis nunc dignissim, pharetra neque molestie, molestie lectus.
69
+ </DxcParagraph>
70
+ </DxcFlex>
71
+ </DxcInset>
68
72
  </DxcDialog>
69
73
  </HalstackProvider>
70
74
  </ExampleContainer>
@@ -74,7 +78,7 @@ export const DialogWithInputs = () => (
74
78
  <ExampleContainer expanded={true}>
75
79
  <Title title="Dialog with inputs" theme="light" level={4} />
76
80
  <DxcDialog>
77
- <DxcInset bottom="1rem">
81
+ <DxcInset space="1.5rem">
78
82
  <DxcFlex gap="2rem" direction="column">
79
83
  <DxcHeading level={4} text="Example form" />
80
84
  <DxcFlex gap="1rem" direction="column">
@@ -101,7 +105,7 @@ const RespDialog = () => (
101
105
  <ExampleContainer expanded={true}>
102
106
  <Title title="Responsive dialog" theme="light" level={4} />
103
107
  <DxcDialog>
104
- <DxcInset bottom="1rem">
108
+ <DxcInset space="1.5rem">
105
109
  <DxcFlex gap="2rem" direction="column">
106
110
  <DxcHeading level={4} text="Example form" />
107
111
  <DxcFlex gap="1rem" direction="column">
@@ -122,20 +126,22 @@ export const DialogWithoutOverlay = () => (
122
126
  <ExampleContainer expanded={true}>
123
127
  <Title title="Dialog Without Overlay" theme="light" level={4} />
124
128
  <DxcDialog overlay={false}>
125
- <DxcFlex direction="column" gap="1rem">
126
- <DxcHeading level={4} text="Example title" />
127
- <DxcParagraph>
128
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi egestas luctus porttitor. Donec massa magna,
129
- placerat sit amet felis eget, venenatis fringilla ipsum. Lorem ipsum dolor sit amet, consectetur adipiscing
130
- elit. Donec congue laoreet orci, nec elementum dolor consequat quis. Curabitur rhoncus justo sed dapibus
131
- tincidunt. Vestibulum cursus ut risus sit amet congue. Nunc luctus, urna ullamcorper facilisis Jia Le, risus
132
- eros aliquam erat, ut efficitur ante neque id odio. Nam orci leo, dignissim sit amet dolor ut, congue gravida
133
- enim. Donec rhoncus aliquam nisl, ac cursus enim bibendum vitae. Nunc sit amet elit ornare, malesuada urna eu,
134
- fringilla mauris. Vivamus bibendum turpis est, id elementum purus euismod sit amet. Etiam sit amet maximus
135
- augue. Vivamus erat sapien, ultricies fringilla tellus id, condimentum blandit justo. Praesent quis nunc
136
- dignissim, pharetra neque molestie, molestie lectus.
137
- </DxcParagraph>
138
- </DxcFlex>
129
+ <DxcInset space="1.5rem">
130
+ <DxcFlex direction="column" gap="1rem">
131
+ <DxcHeading level={4} text="Example title" />
132
+ <DxcParagraph>
133
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi egestas luctus porttitor. Donec massa magna,
134
+ placerat sit amet felis eget, venenatis fringilla ipsum. Lorem ipsum dolor sit amet, consectetur adipiscing
135
+ elit. Donec congue laoreet orci, nec elementum dolor consequat quis. Curabitur rhoncus justo sed dapibus
136
+ tincidunt. Vestibulum cursus ut risus sit amet congue. Nunc luctus, urna ullamcorper facilisis Jia Le, risus
137
+ eros aliquam erat, ut efficitur ante neque id odio. Nam orci leo, dignissim sit amet dolor ut, congue
138
+ gravida enim. Donec rhoncus aliquam nisl, ac cursus enim bibendum vitae. Nunc sit amet elit ornare,
139
+ malesuada urna eu, fringilla mauris. Vivamus bibendum turpis est, id elementum purus euismod sit amet. Etiam
140
+ sit amet maximus augue. Vivamus erat sapien, ultricies fringilla tellus id, condimentum blandit justo.
141
+ Praesent quis nunc dignissim, pharetra neque molestie, molestie lectus.
142
+ </DxcParagraph>
143
+ </DxcFlex>
144
+ </DxcInset>
139
145
  </DxcDialog>
140
146
  </ExampleContainer>
141
147
  );
@@ -144,115 +150,7 @@ export const DialogCloseVisibleFalse = () => (
144
150
  <ExampleContainer expanded={true}>
145
151
  <Title title="Dialog Close Visible" theme="dark" level={4} />
146
152
  <DxcDialog isCloseVisible={false}>
147
- <DxcParagraph>
148
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi egestas luctus porttitor. Donec massa magna,
149
- placerat sit amet felis eget, venenatis fringilla ipsum. Lorem ipsum dolor sit amet, consectetur adipiscing
150
- elit. Donec congue laoreet orci, nec elementum dolor consequat quis. Curabitur rhoncus justo sed dapibus
151
- tincidunt. Vestibulum cursus ut risus sit amet congue. Nunc luctus, urna ullamcorper facilisis Jia Le, risus
152
- eros aliquam erat, ut efficitur ante neque id odio. Nam orci leo, dignissim sit amet dolor ut, congue gravida
153
- enim. Donec rhoncus aliquam nisl, ac cursus enim bibendum vitae. Nunc sit amet elit ornare, malesuada urna eu,
154
- fringilla mauris. Vivamus bibendum turpis est, id elementum purus euismod sit amet. Etiam sit amet maximus
155
- augue. Vivamus erat sapien, ultricies fringilla tellus id, condimentum blandit justo. Praesent quis nunc
156
- dignissim, pharetra neque molestie, molestie lectus.
157
- </DxcParagraph>
158
- </DxcDialog>
159
- </ExampleContainer>
160
- );
161
-
162
- export const DialogWithXxsmallPadding = () => (
163
- <ExampleContainer expanded={true}>
164
- <Title title="Dialog With Xxsmall Padding" theme="light" level={4} />
165
- <DxcDialog padding="xxsmall">
166
- <DxcFlex direction="column" gap="0.25rem">
167
- <DxcHeading level={4} text="Example title" />
168
- <DxcParagraph>
169
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi egestas luctus porttitor. Donec massa magna,
170
- placerat sit amet felis eget, venenatis fringilla ipsum. Lorem ipsum dolor sit amet, consectetur adipiscing
171
- elit. Donec congue laoreet orci, nec elementum dolor consequat quis. Curabitur rhoncus justo sed dapibus
172
- tincidunt. Vestibulum cursus ut risus sit amet congue. Nunc luctus, urna ullamcorper facilisis Jia Le, risus
173
- eros aliquam erat, ut efficitur ante neque id odio. Nam orci leo, dignissim sit amet dolor ut, congue gravida
174
- enim. Donec rhoncus aliquam nisl, ac cursus enim bibendum vitae. Nunc sit amet elit ornare, malesuada urna eu,
175
- fringilla mauris. Vivamus bibendum turpis est, id elementum purus euismod sit amet. Etiam sit amet maximus
176
- augue. Vivamus erat sapien, ultricies fringilla tellus id, condimentum blandit justo. Praesent quis nunc
177
- dignissim, pharetra neque molestie, molestie lectus.
178
- </DxcParagraph>
179
- </DxcFlex>
180
- </DxcDialog>
181
- </ExampleContainer>
182
- );
183
-
184
- export const DialogWithXsmallPadding = () => (
185
- <ExampleContainer expanded={true}>
186
- <Title title="Dialog With Xsmall Padding" theme="light" level={4} />
187
- <DxcDialog padding={"xsmall"}>
188
- <DxcFlex direction="column" gap="1rem">
189
- <DxcHeading level={4} text="Example title" />
190
- <DxcParagraph>
191
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi egestas luctus porttitor. Donec massa magna,
192
- placerat sit amet felis eget, venenatis fringilla ipsum. Lorem ipsum dolor sit amet, consectetur adipiscing
193
- elit. Donec congue laoreet orci, nec elementum dolor consequat quis. Curabitur rhoncus justo sed dapibus
194
- tincidunt. Vestibulum cursus ut risus sit amet congue. Nunc luctus, urna ullamcorper facilisis Jia Le, risus
195
- eros aliquam erat, ut efficitur ante neque id odio. Nam orci leo, dignissim sit amet dolor ut, congue gravida
196
- enim. Donec rhoncus aliquam nisl, ac cursus enim bibendum vitae. Nunc sit amet elit ornare, malesuada urna eu,
197
- fringilla mauris. Vivamus bibendum turpis est, id elementum purus euismod sit amet. Etiam sit amet maximus
198
- augue. Vivamus erat sapien, ultricies fringilla tellus id, condimentum blandit justo. Praesent quis nunc
199
- dignissim, pharetra neque molestie, molestie lectus.
200
- </DxcParagraph>
201
- </DxcFlex>
202
- </DxcDialog>
203
- </ExampleContainer>
204
- );
205
-
206
- export const DialogWithMediumPadding = () => (
207
- <ExampleContainer expanded={true}>
208
- <Title title="Dialog With Medium Padding" theme="light" level={4} />
209
- <DxcDialog padding="medium">
210
- <DxcFlex direction="column" gap="1rem">
211
- <DxcHeading level={4} text="Example title" />
212
- <DxcParagraph>
213
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi egestas luctus porttitor. Donec massa magna,
214
- placerat sit amet felis eget, venenatis fringilla ipsum. Lorem ipsum dolor sit amet, consectetur adipiscing
215
- elit. Donec congue laoreet orci, nec elementum dolor consequat quis. Curabitur rhoncus justo sed dapibus
216
- tincidunt. Vestibulum cursus ut risus sit amet congue. Nunc luctus, urna ullamcorper facilisis Jia Le, risus
217
- eros aliquam erat, ut efficitur ante neque id odio. Nam orci leo, dignissim sit amet dolor ut, congue gravida
218
- enim. Donec rhoncus aliquam nisl, ac cursus enim bibendum vitae. Nunc sit amet elit ornare, malesuada urna eu,
219
- fringilla mauris. Vivamus bibendum turpis est, id elementum purus euismod sit amet. Etiam sit amet maximus
220
- augue. Vivamus erat sapien, ultricies fringilla tellus id, condimentum blandit justo. Praesent quis nunc
221
- dignissim, pharetra neque molestie, molestie lectus.
222
- </DxcParagraph>
223
- </DxcFlex>
224
- </DxcDialog>
225
- </ExampleContainer>
226
- );
227
-
228
- export const DialogWithLargePadding = () => (
229
- <ExampleContainer expanded={true}>
230
- <Title title="Dialog With Large Padding" theme="light" level={4} />
231
- <DxcDialog padding="large">
232
- <DxcFlex direction="column" gap="1rem">
233
- <DxcHeading level={4} text="Example title" />
234
- <DxcParagraph>
235
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi egestas luctus porttitor. Donec massa magna,
236
- placerat sit amet felis eget, venenatis fringilla ipsum. Lorem ipsum dolor sit amet, consectetur adipiscing
237
- elit. Donec congue laoreet orci, nec elementum dolor consequat quis. Curabitur rhoncus justo sed dapibus
238
- tincidunt. Vestibulum cursus ut risus sit amet congue. Nunc luctus, urna ullamcorper facilisis Jia Le, risus
239
- eros aliquam erat, ut efficitur ante neque id odio. Nam orci leo, dignissim sit amet dolor ut, congue gravida
240
- enim. Donec rhoncus aliquam nisl, ac cursus enim bibendum vitae. Nunc sit amet elit ornare, malesuada urna eu,
241
- fringilla mauris. Vivamus bibendum turpis est, id elementum purus euismod sit amet. Etiam sit amet maximus
242
- augue. Vivamus erat sapien, ultricies fringilla tellus id, condimentum blandit justo. Praesent quis nunc
243
- dignissim, pharetra neque molestie, molestie lectus.
244
- </DxcParagraph>
245
- </DxcFlex>
246
- </DxcDialog>
247
- </ExampleContainer>
248
- );
249
-
250
- export const DialogWithXlargePadding = () => (
251
- <ExampleContainer expanded={true}>
252
- <Title title="Dialog With Xlarge Padding" theme="light" level={4} />
253
- <DxcDialog padding="xlarge">
254
- <DxcFlex direction="column" gap="1rem">
255
- <DxcHeading level={4} text="Example title" />
153
+ <DxcInset space="1.5rem">
256
154
  <DxcParagraph>
257
155
  Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi egestas luctus porttitor. Donec massa magna,
258
156
  placerat sit amet felis eget, venenatis fringilla ipsum. Lorem ipsum dolor sit amet, consectetur adipiscing
@@ -264,39 +162,17 @@ export const DialogWithXlargePadding = () => (
264
162
  augue. Vivamus erat sapien, ultricies fringilla tellus id, condimentum blandit justo. Praesent quis nunc
265
163
  dignissim, pharetra neque molestie, molestie lectus.
266
164
  </DxcParagraph>
267
- </DxcFlex>
268
- </DxcDialog>
269
- </ExampleContainer>
270
- );
271
-
272
- export const DialogWithXxlargePadding = () => (
273
- <ExampleContainer expanded={true}>
274
- <Title title="Dialog With Xxlarge Padding" theme="light" level={4} />
275
- <DxcDialog padding="xxlarge">
276
- <DxcFlex direction="column" gap="1rem">
277
- <DxcHeading level={4} text="Example title" />
278
- <DxcParagraph>
279
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi egestas luctus porttitor. Donec massa magna,
280
- placerat sit amet felis eget, venenatis fringilla ipsum. Lorem ipsum dolor sit amet, consectetur adipiscing
281
- elit. Donec congue laoreet orci, nec elementum dolor consequat quis. Curabitur rhoncus justo sed dapibus
282
- tincidunt. Vestibulum cursus ut risus sit amet congue. Nunc luctus, urna ullamcorper facilisis Jia Le, risus
283
- eros aliquam erat, ut efficitur ante neque id odio. Nam orci leo, dignissim sit amet dolor ut, congue gravida
284
- enim. Donec rhoncus aliquam nisl, ac cursus enim bibendum vitae. Nunc sit amet elit ornare, malesuada urna eu,
285
- fringilla mauris. Vivamus bibendum turpis est, id elementum purus euismod sit amet. Etiam sit amet maximus
286
- augue. Vivamus erat sapien, ultricies fringilla tellus id, condimentum blandit justo. Praesent quis nunc
287
- dignissim, pharetra neque molestie, molestie lectus.
288
- </DxcParagraph>
289
- </DxcFlex>
165
+ </DxcInset>
290
166
  </DxcDialog>
291
167
  </ExampleContainer>
292
168
  );
293
169
 
294
170
  const customViewports = {
295
171
  resizedScreen: {
296
- name: 'Custom viewport',
172
+ name: "Custom viewport",
297
173
  styles: {
298
- width: '720px',
299
- height: '900px',
174
+ width: "720px",
175
+ height: "900px",
300
176
  },
301
177
  },
302
178
  };
@@ -316,4 +192,4 @@ MobileResponsiveDialog.parameters = {
316
192
  defaultViewport: "iphonex",
317
193
  },
318
194
  chromatic: { viewports: [375] },
319
- };
195
+ };