@spaced-out/ui-design-system 0.0.2 → 0.0.3-beta.1

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 (47) hide show
  1. package/.storybook/SenseTheme.js +1 -1
  2. package/.storybook/manager-head.html +7 -6
  3. package/.storybook/preview.js +1 -1
  4. package/.storybook/public/images/Logo.png +0 -0
  5. package/.storybook/public/images/component-token.png +0 -0
  6. package/.storybook/public/images/components.png +0 -0
  7. package/.storybook/public/images/intro-cover.png +0 -0
  8. package/CHANGELOG.md +14 -0
  9. package/lib/components/Button/Button.js +4 -1
  10. package/lib/components/Button/Button.js.flow +4 -1
  11. package/lib/components/Checkbox/CheckboxGroup.js +1 -1
  12. package/lib/components/Checkbox/CheckboxGroup.js.flow +1 -1
  13. package/lib/components/Checkbox/index.js +2 -2
  14. package/lib/components/Checkbox/index.js.flow +2 -2
  15. package/lib/components/Dialog/Dialog.js +2 -2
  16. package/lib/components/Dialog/Dialog.js.flow +2 -2
  17. package/lib/components/Dialog/index.js +1 -1
  18. package/lib/components/Dialog/index.js.flow +2 -2
  19. package/lib/components/Icon/ClickableIcon.js +2 -0
  20. package/lib/components/Icon/ClickableIcon.js.flow +3 -0
  21. package/lib/components/Icon/Icon.js.flow +1 -0
  22. package/lib/components/Icon/index.js +1 -1
  23. package/lib/components/Icon/index.js.flow +1 -1
  24. package/lib/components/Modal/Modal.js +45 -5
  25. package/lib/components/Modal/Modal.js.flow +57 -3
  26. package/lib/components/Modal/Modal.module.css +42 -3
  27. package/lib/components/Modal/index.js +19 -1
  28. package/lib/components/Modal/index.js.flow +7 -2
  29. package/lib/components/Panel/Panel.js +5 -2
  30. package/lib/components/Panel/Panel.js.flow +3 -0
  31. package/lib/components/Panel/Panel.module.css +2 -0
  32. package/lib/components/Panel/index.js +1 -1
  33. package/lib/components/Panel/index.js.flow +2 -2
  34. package/lib/components/RadioButton/RadioGroup.js +1 -1
  35. package/lib/components/RadioButton/RadioGroup.js.flow +1 -1
  36. package/lib/components/RadioButton/index.js +2 -2
  37. package/lib/components/RadioButton/index.js.flow +2 -2
  38. package/lib/components/Toast/Toast.js +2 -1
  39. package/lib/components/Toast/Toast.js.flow +5 -1
  40. package/lib/components/Toggle/index.js +1 -1
  41. package/lib/components/Toggle/index.js.flow +1 -1
  42. package/lib/components/Truncate/Truncate.js +12 -6
  43. package/lib/components/Truncate/Truncate.js.flow +15 -3
  44. package/package.json +1 -1
  45. package/.storybook/public/images/Logo.svg +0 -10
  46. package/.storybook/public/images/components.svg +0 -214
  47. package/.storybook/public/images/intro-cover.svg +0 -22
@@ -3,7 +3,7 @@ import {create} from '@storybook/theming';
3
3
  export default create({
4
4
  base: 'light',
5
5
  brandTitle: 'Genesis',
6
- brandImage: 'images/Logo.svg',
6
+ brandImage: 'images/Logo.png',
7
7
 
8
8
  fontBase: '"Centra No 2", "proxima-nova", "Helvetica Neue"',
9
9
  textColor: '#17172A',
@@ -37,6 +37,7 @@
37
37
  body {
38
38
  /* This will target all of the children */
39
39
  font-family: 'Centra No 2' !important;
40
+ background: #17172a;
40
41
  }
41
42
 
42
43
  .sidebar-container {
@@ -44,22 +45,22 @@
44
45
  }
45
46
 
46
47
  .sidebar-item {
47
- color: #EFEBFA !important;
48
+ color: #efebfa !important;
48
49
  }
49
50
 
50
51
  .search-result-item--label {
51
- color: #EFEBFA !important;
52
+ color: #efebfa !important;
52
53
  }
53
54
 
54
55
  .sidebar-item[data-selected='true'] {
55
56
  background: #5c34cd !important;
56
57
  }
57
58
 
58
- .search-field svg {
59
- color: #EFEBFA !important;
59
+ .search-field input {
60
+ border-color: #efebfa !important;
60
61
  }
61
62
 
62
- .search-field input {
63
- border-color: #EFEBFA !important;
63
+ #root > div:first-child {
64
+ background: #17172a;
64
65
  }
65
66
  </style>
@@ -62,8 +62,8 @@ export const parameters = {
62
62
  method: 'alphabetical',
63
63
  order: [
64
64
  'Introduction',
65
- 'Changelog',
66
65
  'Design Tokens',
66
+ 'Changelog',
67
67
  'Tokens',
68
68
  'Components',
69
69
  [
package/CHANGELOG.md CHANGED
@@ -2,6 +2,20 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### 0.0.3-beta.1 (2022-11-21)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * rename showBackdrop in modal to hideBackdrop and releated changes ([303c4d8](https://github.com/Spaced-Out/ui-design-system/commit/303c4d8c95aa75219cf5eca682ebdecf53c27e7c))
11
+
12
+ ### 0.0.3-beta.0 (2022-11-21)
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * documentation fixes and modal semantics ([45770ab](https://github.com/Spaced-Out/ui-design-system/commit/45770ab7e7a04ffa78c962fdef7bfc8971b54b3e))
18
+
5
19
  ### 0.0.2 (2022-11-16)
6
20
 
7
21
 
@@ -32,9 +32,12 @@ const UnstyledButton = /*#__PURE__*/React.forwardRef((_ref, ref) => {
32
32
  disabled,
33
33
  onClick,
34
34
  className,
35
+ ariaLabel,
35
36
  ...props
36
37
  } = _ref;
37
- return /*#__PURE__*/React.createElement("button", _extends({}, props, {
38
+ return /*#__PURE__*/React.createElement("button", _extends({}, props, ariaLabel ? {
39
+ 'aria-label': ariaLabel
40
+ } : {}, {
38
41
  className: className,
39
42
  ref: ref,
40
43
  role: "button",
@@ -16,6 +16,7 @@ export type UnstyledButtonProps = {
16
16
  disabled?: mixed,
17
17
  onClick?: ?(SyntheticEvent<HTMLElement>) => mixed,
18
18
  className?: string,
19
+ ariaLabel?: string,
19
20
  ...
20
21
  };
21
22
 
@@ -41,6 +42,7 @@ export type ButtonProps = {
41
42
  isFluid?: boolean,
42
43
  disabled?: boolean,
43
44
  size?: 'medium' | 'small',
45
+ ariaLabel?: string,
44
46
  ...
45
47
  };
46
48
 
@@ -57,11 +59,12 @@ export const UnstyledButton: React$AbstractComponent<
57
59
  HTMLButtonElement,
58
60
  > = React.forwardRef<UnstyledButtonProps, HTMLButtonElement>(
59
61
  (
60
- {disabled, onClick, className, ...props}: UnstyledButtonProps,
62
+ {disabled, onClick, className, ariaLabel, ...props}: UnstyledButtonProps,
61
63
  ref: React.Ref<'button'>,
62
64
  ) => (
63
65
  <button
64
66
  {...props}
67
+ {...(ariaLabel ? {'aria-label': ariaLabel} : {})}
65
68
  className={className}
66
69
  ref={ref}
67
70
  role="button"
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.CheckboxGroup = void 0;
7
7
  var React = _interopRequireWildcard(require("react"));
8
8
  var _classify = _interopRequireDefault(require("../../utils/classify"));
9
- var _Text = require("../Text/Text.js");
9
+ var _Text = require("../Text/Text");
10
10
  var _CheckboxGroupModule = _interopRequireDefault(require("./CheckboxGroup.module.css"));
11
11
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
12
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -4,7 +4,7 @@ import * as React from 'react';
4
4
 
5
5
  import type {GroupAlign} from '../../types/common';
6
6
  import classify from '../../utils/classify';
7
- import {BodySmall} from '../Text/Text.js';
7
+ import {BodySmall} from '../Text/Text';
8
8
 
9
9
  import css from './CheckboxGroup.module.css';
10
10
 
@@ -15,5 +15,5 @@ Object.defineProperty(exports, "CheckboxGroup", {
15
15
  return _CheckboxGroup.CheckboxGroup;
16
16
  }
17
17
  });
18
- var _Checkbox = require("./Checkbox.js");
19
- var _CheckboxGroup = require("./CheckboxGroup.js");
18
+ var _Checkbox = require("./Checkbox");
19
+ var _CheckboxGroup = require("./CheckboxGroup");
@@ -1,3 +1,3 @@
1
1
  //@flow strict
2
- export {Checkbox} from './Checkbox.js';
3
- export {CheckboxGroup} from './CheckboxGroup.js';
2
+ export {Checkbox} from './Checkbox';
3
+ export {CheckboxGroup} from './CheckboxGroup';
@@ -101,7 +101,7 @@ const Dialog = _ref5 => {
101
101
  let {
102
102
  children,
103
103
  isOpen = false,
104
- showBackdrop = true,
104
+ hideBackdrop = false,
105
105
  onClose,
106
106
  tapOutsideToClose = false,
107
107
  iconName = '',
@@ -111,7 +111,7 @@ const Dialog = _ref5 => {
111
111
  return /*#__PURE__*/React.createElement(_Modal.Modal, _extends({
112
112
  isOpen: isOpen,
113
113
  onClose: onClose,
114
- showBackdrop: showBackdrop,
114
+ hideBackdrop: hideBackdrop,
115
115
  tapOutsideToClose: tapOutsideToClose
116
116
  }, restDialogProps, {
117
117
  classNames: {
@@ -130,7 +130,7 @@ export const DialogFooter = ({children}: DialogFooterProps): React.Node => (
130
130
  export const Dialog = ({
131
131
  children,
132
132
  isOpen = false,
133
- showBackdrop = true,
133
+ hideBackdrop = false,
134
134
  onClose,
135
135
  tapOutsideToClose = false,
136
136
  iconName = '',
@@ -140,7 +140,7 @@ export const Dialog = ({
140
140
  <Modal
141
141
  isOpen={isOpen}
142
142
  onClose={onClose}
143
- showBackdrop={showBackdrop}
143
+ hideBackdrop={hideBackdrop}
144
144
  tapOutsideToClose={tapOutsideToClose}
145
145
  {...restDialogProps}
146
146
  classNames={{
@@ -33,4 +33,4 @@ Object.defineProperty(exports, "DialogHeader", {
33
33
  return _Dialog.DialogHeader;
34
34
  }
35
35
  });
36
- var _Dialog = require("./Dialog.js");
36
+ var _Dialog = require("./Dialog");
@@ -4,11 +4,11 @@ export type {
4
4
  DialogFooterProps,
5
5
  DialogHeaderProps,
6
6
  DialogProps,
7
- } from './Dialog.js';
7
+ } from './Dialog';
8
8
  export {
9
9
  Dialog,
10
10
  DIALOG_SEMANTIC,
11
11
  DialogBody,
12
12
  DialogFooter,
13
13
  DialogHeader,
14
- } from './Dialog.js';
14
+ } from './Dialog';
@@ -18,9 +18,11 @@ const ClickableIcon = _ref => {
18
18
  let {
19
19
  size = 'medium',
20
20
  className,
21
+ ariaLabel,
21
22
  ...props
22
23
  } = _ref;
23
24
  return /*#__PURE__*/React.createElement(_Button.UnstyledButton, _extends({}, props, {
25
+ ariaLabel: ariaLabel,
24
26
  className: (0, _classify.default)(_ClickableIconModule.default.button, {
25
27
  [_ClickableIconModule.default.small]: size === 'small',
26
28
  [_ClickableIconModule.default.medium]: size === 'medium'
@@ -16,10 +16,12 @@ import css from './ClickableIcon.module.css';
16
16
  export const ClickableIcon = ({
17
17
  size = 'medium',
18
18
  className,
19
+ ariaLabel,
19
20
  ...props
20
21
  }: IconProps): React.Node => (
21
22
  <UnstyledButton
22
23
  {...props}
24
+ ariaLabel={ariaLabel}
23
25
  className={classify(
24
26
  css.button,
25
27
  {
@@ -39,6 +41,7 @@ export type CloseIconProps = {
39
41
  color?: ColorTypes,
40
42
  onClick?: ?(SyntheticEvent<HTMLElement>) => mixed,
41
43
  className?: string,
44
+ ariaLabel?: string,
42
45
  };
43
46
 
44
47
  export const CloseIcon = ({
@@ -23,6 +23,7 @@ export type IconProps = {
23
23
  color?: ColorTypes,
24
24
  className?: string,
25
25
  onClick?: ?(SyntheticEvent<HTMLElement>) => mixed,
26
+ ariaLabel?: string,
26
27
  };
27
28
 
28
29
  export const Icon = ({
@@ -21,5 +21,5 @@ Object.defineProperty(exports, "Icon", {
21
21
  return _Icon.Icon;
22
22
  }
23
23
  });
24
- var _ClickableIcon = require("./ClickableIcon.js");
24
+ var _ClickableIcon = require("./ClickableIcon");
25
25
  var _Icon = require("./Icon");
@@ -1,6 +1,6 @@
1
1
  // @flow strict
2
2
 
3
3
  export type {CloseIconProps} from './ClickableIcon';
4
- export {ClickableIcon, CloseIcon} from './ClickableIcon.js';
4
+ export {ClickableIcon, CloseIcon} from './ClickableIcon';
5
5
  export type {IconProps, IconSize, IconType} from './Icon';
6
6
  export {Icon} from './Icon';
@@ -3,13 +3,15 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.Modal = void 0;
6
+ exports.ModalHeader = exports.ModalFooter = exports.ModalBody = exports.Modal = void 0;
7
7
  var React = _interopRequireWildcard(require("react"));
8
8
  var _reactDom = require("react-dom");
9
9
  var _reactDomInteractions = require("@floating-ui/react-dom-interactions");
10
10
  var _useMountTransition = _interopRequireDefault(require("../../hooks/useMountTransition"));
11
11
  var _motion = require("../../styles/variables/_motion");
12
12
  var _classify = _interopRequireDefault(require("../../utils/classify"));
13
+ var _Button = require("../Button/Button");
14
+ var _Truncate = require("../Truncate/Truncate");
13
15
  var _ModalModule = _interopRequireDefault(require("./Modal.module.css"));
14
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
17
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -17,22 +19,60 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
17
19
 
18
20
  // $FlowFixMe[untyped-import]
19
21
 
22
+ const ModalHeader = _ref => {
23
+ let {
24
+ children,
25
+ hideCloseBtn,
26
+ onCloseButtonClick
27
+ } = _ref;
28
+ return /*#__PURE__*/React.createElement(React.Fragment, null, React.Children.count(children) > 0 && /*#__PURE__*/React.createElement("div", {
29
+ className: _ModalModule.default.modalHeader
30
+ }, /*#__PURE__*/React.createElement("div", {
31
+ className: _ModalModule.default.headerContent
32
+ }, /*#__PURE__*/React.createElement(_Truncate.Truncate, null, children)), !hideCloseBtn && /*#__PURE__*/React.createElement(_Button.Button, {
33
+ iconLeftName: "xmark",
34
+ type: "ghost",
35
+ onClick: onCloseButtonClick,
36
+ ariaLabel: "Close Button"
37
+ })));
38
+ };
39
+ exports.ModalHeader = ModalHeader;
40
+ const ModalBody = _ref2 => {
41
+ let {
42
+ children
43
+ } = _ref2;
44
+ return /*#__PURE__*/React.createElement("div", {
45
+ className: _ModalModule.default.modalBody
46
+ }, children);
47
+ };
48
+ exports.ModalBody = ModalBody;
49
+ const ModalFooter = _ref3 => {
50
+ let {
51
+ children
52
+ } = _ref3;
53
+ return /*#__PURE__*/React.createElement(React.Fragment, null, React.Children.count(children) > 0 && /*#__PURE__*/React.createElement("div", {
54
+ className: _ModalModule.default.modalFooter
55
+ }, /*#__PURE__*/React.createElement("div", {
56
+ className: _ModalModule.default.modalFooterActions
57
+ }, children)));
58
+ };
59
+ exports.ModalFooter = ModalFooter;
20
60
  const createPortalRoot = () => {
21
61
  const modalRoot = document.createElement('div');
22
62
  modalRoot.setAttribute('id', 'modal-root');
23
63
  return modalRoot;
24
64
  };
25
- const Modal = _ref => {
65
+ const Modal = _ref4 => {
26
66
  let {
27
67
  classNames,
28
68
  children,
29
69
  isOpen = false,
30
70
  onClose,
31
- showBackdrop = false,
71
+ hideBackdrop = false,
32
72
  removeWhenClosed = true,
33
73
  tapOutsideToClose = true,
34
74
  initialFocus = -1
35
- } = _ref;
75
+ } = _ref4;
36
76
  const {
37
77
  floating,
38
78
  context
@@ -106,7 +146,7 @@ const Modal = _ref => {
106
146
  }, classNames?.container)
107
147
  }, /*#__PURE__*/React.createElement("div", {
108
148
  className: (0, _classify.default)(_ModalModule.default.backdrop, {
109
- [_ModalModule.default.darkBackdrop]: showBackdrop
149
+ [_ModalModule.default.darkBackdrop]: !hideBackdrop
110
150
  }, classNames?.backdrop),
111
151
  onClick: onBackdropClick
112
152
  }), /*#__PURE__*/React.createElement("div", {
@@ -13,6 +13,8 @@ import {
13
13
  import useMountTransition from '../../hooks/useMountTransition';
14
14
  import {motionDurationNormal} from '../../styles/variables/_motion';
15
15
  import classify from '../../utils/classify';
16
+ import {Button} from '../Button/Button';
17
+ import {Truncate} from '../Truncate/Truncate';
16
18
 
17
19
  import css from './Modal.module.css';
18
20
 
@@ -28,12 +30,64 @@ export type ModalProps = {
28
30
  children?: React.Node,
29
31
  isOpen?: boolean,
30
32
  onClose?: ?(SyntheticEvent<HTMLElement>) => mixed,
31
- showBackdrop?: boolean,
33
+ hideBackdrop?: boolean,
32
34
  removeWhenClosed?: boolean,
33
35
  tapOutsideToClose?: boolean,
34
36
  initialFocus?: number,
35
37
  };
36
38
 
39
+ export type ModalHeaderProps = {
40
+ children?: React.Node,
41
+ hideCloseBtn?: boolean,
42
+ onCloseButtonClick?: ?(SyntheticEvent<HTMLElement>) => mixed,
43
+ };
44
+
45
+ export type ModalFooterProps = {
46
+ children?: React.Node,
47
+ };
48
+
49
+ export type ModalBodyProps = {
50
+ children?: React.Node,
51
+ };
52
+
53
+ export const ModalHeader = ({
54
+ children,
55
+ hideCloseBtn,
56
+ onCloseButtonClick,
57
+ }: ModalHeaderProps): React.Node => (
58
+ <>
59
+ {React.Children.count(children) > 0 && (
60
+ <div className={css.modalHeader}>
61
+ <div className={css.headerContent}>
62
+ <Truncate>{children}</Truncate>
63
+ </div>
64
+ {!hideCloseBtn && (
65
+ <Button
66
+ iconLeftName="xmark"
67
+ type="ghost"
68
+ onClick={onCloseButtonClick}
69
+ ariaLabel="Close Button"
70
+ ></Button>
71
+ )}
72
+ </div>
73
+ )}
74
+ </>
75
+ );
76
+
77
+ export const ModalBody = ({children}: ModalBodyProps): React.Node => (
78
+ <div className={css.modalBody}>{children}</div>
79
+ );
80
+
81
+ export const ModalFooter = ({children}: ModalFooterProps): React.Node => (
82
+ <>
83
+ {React.Children.count(children) > 0 && (
84
+ <div className={css.modalFooter}>
85
+ <div className={css.modalFooterActions}>{children}</div>
86
+ </div>
87
+ )}
88
+ </>
89
+ );
90
+
37
91
  const createPortalRoot = () => {
38
92
  const modalRoot = document.createElement('div');
39
93
  modalRoot.setAttribute('id', 'modal-root');
@@ -46,7 +100,7 @@ export const Modal = ({
46
100
  children,
47
101
  isOpen = false,
48
102
  onClose,
49
- showBackdrop = false,
103
+ hideBackdrop = false,
50
104
  removeWhenClosed = true,
51
105
  tapOutsideToClose = true,
52
106
  initialFocus = -1,
@@ -141,7 +195,7 @@ export const Modal = ({
141
195
  className={classify(
142
196
  css.backdrop,
143
197
  {
144
- [css.darkBackdrop]: showBackdrop,
198
+ [css.darkBackdrop]: !hideBackdrop,
145
199
  },
146
200
  classNames?.backdrop,
147
201
  )}
@@ -1,9 +1,10 @@
1
- @value (colorBackgroundTertiary, colorBackdropFill) from '../../styles/variables/_color.css';
2
- @value (spaceNone, spaceXXSmall, spaceHalfFluid, spaceNegHalfFluid) from '../../styles/variables/_space.css';
3
- @value (sizeFluid) from '../../styles/variables/_size.css';
1
+ @value (colorBackgroundTertiary, colorBackgroundPrimary, colorBackdropFill) from '../../styles/variables/_color.css';
2
+ @value (spaceNone, spaceSmall, spaceMedium, spaceXXSmall, spaceHalfFluid, spaceNegHalfFluid) from '../../styles/variables/_space.css';
3
+ @value (sizeFluid, size60) from '../../styles/variables/_size.css';
4
4
  @value (elevationNone, elevationModal, elevationBackdrop) from '../../styles/variables/_elevation.css';
5
5
  @value (opacity100, opacity0) from '../../styles/variables/_opacity.css';
6
6
  @value (motionDurationNormal, motionEaseInEaseOut) from '../../styles/variables/_motion.css';
7
+ @value (borderRadiusMedium) from '../../styles/variables/_border.css';
7
8
 
8
9
  .modalContainer {
9
10
  display: flex;
@@ -24,6 +25,7 @@
24
25
  overflow: auto;
25
26
  z-index: elevationModal;
26
27
  transition: opacity motionDurationNormal, transform motionDurationNormal;
28
+ border-radius: borderRadiusMedium;
27
29
  }
28
30
 
29
31
  .modalContainer.open.in .modal {
@@ -60,3 +62,40 @@
60
62
  backdrop-filter: blur(spaceXXSmall);
61
63
  background-color: colorBackdropFill;
62
64
  }
65
+
66
+ .modalHeader {
67
+ composes: borderBottomPrimary from '../../styles/border.module.css';
68
+ composes: subTitleLarge from '../../styles/typography.module.css';
69
+ padding: spaceNone spaceSmall spaceNone spaceMedium;
70
+ min-height: size60;
71
+ display: flex;
72
+ justify-content: space-between;
73
+ align-items: center;
74
+ gap: spaceMedium;
75
+ }
76
+
77
+ .headerContent {
78
+ display: flex;
79
+ }
80
+
81
+ .modalBody {
82
+ padding: spaceMedium;
83
+ height: sizeFluid;
84
+ overflow: auto;
85
+ }
86
+
87
+ .modalFooter {
88
+ composes: borderTopPrimary from '../../styles/border.module.css';
89
+ background-color: colorBackgroundPrimary;
90
+ margin-top: auto;
91
+ padding: spaceMedium;
92
+ display: flex;
93
+ justify-content: flex-end;
94
+ align-items: center;
95
+ gap: spaceMedium;
96
+ }
97
+
98
+ .modalFooterActions {
99
+ display: flex;
100
+ gap: spaceSmall;
101
+ }
@@ -9,4 +9,22 @@ Object.defineProperty(exports, "Modal", {
9
9
  return _Modal.Modal;
10
10
  }
11
11
  });
12
- var _Modal = require("./Modal.js");
12
+ Object.defineProperty(exports, "ModalBody", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _Modal.ModalBody;
16
+ }
17
+ });
18
+ Object.defineProperty(exports, "ModalFooter", {
19
+ enumerable: true,
20
+ get: function () {
21
+ return _Modal.ModalFooter;
22
+ }
23
+ });
24
+ Object.defineProperty(exports, "ModalHeader", {
25
+ enumerable: true,
26
+ get: function () {
27
+ return _Modal.ModalHeader;
28
+ }
29
+ });
30
+ var _Modal = require("./Modal");
@@ -1,3 +1,8 @@
1
1
  //@flow strict
2
- export type {ModalProps} from './Modal.js';
3
- export {Modal} from './Modal.js';
2
+ export type {
3
+ ModalBodyProps,
4
+ ModalFooterProps,
5
+ ModalHeaderProps,
6
+ ModalProps,
7
+ } from './Modal';
8
+ export {Modal, ModalBody, ModalFooter, ModalHeader} from './Modal';
@@ -29,7 +29,8 @@ const PanelHeader = _ref => {
29
29
  }, /*#__PURE__*/React.createElement(_Truncate.Truncate, null, children)), !hideCloseBtn && /*#__PURE__*/React.createElement(_Button.Button, {
30
30
  iconLeftName: "xmark",
31
31
  type: "ghost",
32
- onClick: onCloseButtonClick
32
+ onClick: onCloseButtonClick,
33
+ ariaLabel: "Close Button"
33
34
  })));
34
35
  };
35
36
  exports.PanelHeader = PanelHeader;
@@ -60,12 +61,14 @@ const Panel = _ref4 => {
60
61
  size = 'medium',
61
62
  anchor = 'left',
62
63
  onClose,
64
+ hideBackdrop = true,
63
65
  ...restPanelProps
64
66
  } = _ref4;
65
67
  const isTransitioning = (0, _useMountTransition.default)(isOpen, parseInt(_motion.motionDurationNormal));
66
68
  return /*#__PURE__*/React.createElement(_Modal.Modal, _extends({
67
69
  isOpen: isOpen,
68
- onClose: onClose
70
+ onClose: onClose,
71
+ hideBackdrop: hideBackdrop
69
72
  }, restPanelProps, {
70
73
  classNames: {
71
74
  container: (0, _classify.default)(_PanelModule.default.panelContainer, {
@@ -52,6 +52,7 @@ export const PanelHeader = ({
52
52
  iconLeftName="xmark"
53
53
  type="ghost"
54
54
  onClick={onCloseButtonClick}
55
+ ariaLabel="Close Button"
55
56
  ></Button>
56
57
  )}
57
58
  </div>
@@ -79,6 +80,7 @@ export const Panel = ({
79
80
  size = 'medium',
80
81
  anchor = 'left',
81
82
  onClose,
83
+ hideBackdrop = true,
82
84
  ...restPanelProps
83
85
  }: PanelProps): React.Node => {
84
86
  const isTransitioning = useMountTransition(
@@ -90,6 +92,7 @@ export const Panel = ({
90
92
  <Modal
91
93
  isOpen={isOpen}
92
94
  onClose={onClose}
95
+ hideBackdrop={hideBackdrop}
93
96
  {...restPanelProps}
94
97
  classNames={{
95
98
  container: classify(css.panelContainer, {
@@ -2,12 +2,14 @@
2
2
  @value (size4, size60, size480, size580, size720, sizeFluid) from '../../styles/variables/_size.css';
3
3
  @value (motionDurationNormal, motionEaseInEaseOut) from '../../styles/variables/_motion.css';
4
4
  @value (colorBackgroundTertiary, colorBackgroundPrimary) from '../../styles/variables/_color.css';
5
+ @value (borderRadiusNone) from '../../styles/variables/_border.css';
5
6
 
6
7
  .panel {
7
8
  opacity: initial;
8
9
  height: sizeFluid;
9
10
  transition: transform motionDurationNormal motionEaseInEaseOut;
10
11
  background-color: colorBackgroundTertiary;
12
+ border-radius: borderRadiusNone;
11
13
  }
12
14
 
13
15
  .panel.small {
@@ -27,4 +27,4 @@ Object.defineProperty(exports, "PanelHeader", {
27
27
  return _Panel.PanelHeader;
28
28
  }
29
29
  });
30
- var _Panel = require("./Panel.js");
30
+ var _Panel = require("./Panel");
@@ -6,5 +6,5 @@ export type {
6
6
  PanelHeaderProps,
7
7
  PanelProps,
8
8
  PanelSize,
9
- } from './Panel.js';
10
- export {Panel, PanelBody, PanelFooter, PanelHeader} from './Panel.js';
9
+ } from './Panel';
10
+ export {Panel, PanelBody, PanelFooter, PanelHeader} from './Panel';
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.RadioGroup = void 0;
7
7
  var React = _interopRequireWildcard(require("react"));
8
8
  var _classify = _interopRequireDefault(require("../../utils/classify"));
9
- var _Text = require("../Text/Text.js");
9
+ var _Text = require("../Text/Text");
10
10
  var _RadioGroupModule = _interopRequireDefault(require("./RadioGroup.module.css"));
11
11
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
12
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }