@ncds/ui-admin 1.8.22-alpha.0 → 1.8.22-alpha.2

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.
@@ -19,6 +19,8 @@ const Modal = _ref => {
19
19
  size = 'md',
20
20
  closeOnBackdropClick = false,
21
21
  closeOnEsc = true,
22
+ showHeaderDivider = false,
23
+ showActionsDivider = false,
22
24
  className,
23
25
  zIndex,
24
26
  ...restProps
@@ -54,7 +56,10 @@ const Modal = _ref => {
54
56
  } : undefined,
55
57
  ...restProps,
56
58
  children: (0, _jsxRuntime.jsx)("div", {
57
- className: (0, _classnames.default)('ncua-modal', `ncua-modal--${size}`),
59
+ className: (0, _classnames.default)('ncua-modal', `ncua-modal--${size}`, {
60
+ 'ncua-modal--divider-header': showHeaderDivider,
61
+ 'ncua-modal--divider-actions': showActionsDivider
62
+ }),
58
63
  children: children
59
64
  })
60
65
  });
@@ -69,36 +74,31 @@ Modal.Header = _ref2 => {
69
74
  title,
70
75
  subtitle,
71
76
  align = 'left',
72
- showDivider = false,
73
77
  hideCloseButton = false
74
78
  } = _ref2;
75
- return (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
76
- children: [(0, _jsxRuntime.jsxs)("header", {
77
- className: (0, _classnames.default)('ncua-modal__header', `ncua-modal__header--${align}`, {
78
- 'ncua-modal__header--close-button': !hideCloseButton
79
- }),
80
- children: [featuredIcon && (0, _jsxRuntime.jsx)(_featuredIcon.FeaturedIcon, {
81
- icon: featuredIcon.icon,
82
- color: featuredIcon.color,
83
- theme: featuredIcon.theme,
84
- size: "sm"
85
- }), (0, _jsxRuntime.jsxs)("div", {
86
- className: "ncua-modal__title",
87
- children: [(0, _jsxRuntime.jsx)("div", {
88
- className: "ncua-modal__title-text",
89
- children: title
90
- }), subtitle && (0, _jsxRuntime.jsx)("div", {
91
- className: "ncua-modal__title-subtitle",
92
- children: subtitle
93
- })]
94
- }), children, !hideCloseButton && (0, _jsxRuntime.jsx)(_ButtonCloseX.ButtonCloseX, {
95
- className: "ncua-modal__close-button",
96
- size: "sm",
97
- theme: "light",
98
- onClick: onClose
79
+ return (0, _jsxRuntime.jsxs)("header", {
80
+ className: (0, _classnames.default)('ncua-modal__header', `ncua-modal__header--${align}`, {
81
+ 'ncua-modal__header--close-button': !hideCloseButton
82
+ }),
83
+ children: [featuredIcon && (0, _jsxRuntime.jsx)(_featuredIcon.FeaturedIcon, {
84
+ icon: featuredIcon.icon,
85
+ color: featuredIcon.color,
86
+ theme: featuredIcon.theme,
87
+ size: "sm"
88
+ }), (0, _jsxRuntime.jsxs)("div", {
89
+ className: "ncua-modal__title",
90
+ children: [(0, _jsxRuntime.jsx)("div", {
91
+ className: "ncua-modal__title-text",
92
+ children: title
93
+ }), subtitle && (0, _jsxRuntime.jsx)("div", {
94
+ className: "ncua-modal__title-subtitle",
95
+ children: subtitle
99
96
  })]
100
- }), showDivider && (0, _jsxRuntime.jsx)("div", {
101
- className: "ncua-modal__header-divider"
97
+ }), children, !hideCloseButton && (0, _jsxRuntime.jsx)(_ButtonCloseX.ButtonCloseX, {
98
+ className: "ncua-modal__close-button",
99
+ size: "sm",
100
+ theme: "light",
101
+ onClick: onClose
102
102
  })]
103
103
  });
104
104
  };
@@ -144,28 +144,23 @@ Modal.Actions = _ref4 => {
144
144
  let {
145
145
  children,
146
146
  layout = 'vertical',
147
- showDivider = false,
148
147
  align = 'stretch',
149
148
  checkboxContent,
150
149
  className
151
150
  } = _ref4;
152
- return (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
153
- children: [showDivider && (0, _jsxRuntime.jsx)("div", {
154
- className: "ncua-modal__actions-divider"
155
- }), (0, _jsxRuntime.jsxs)("div", {
156
- className: (0, _classnames.default)('ncua-modal__actions-wrapper', className, {
157
- 'ncua-modal__actions-wrapper--checkbox': layout === 'checkbox'
158
- }),
159
- children: [layout === 'checkbox' && (0, _jsxRuntime.jsx)("div", {
160
- className: "ncua-modal__actions-checkbox",
161
- children: (0, _jsxRuntime.jsx)("div", {
162
- className: "ncua-modal__actions-checkbox-content",
163
- children: checkboxContent
164
- })
165
- }), (0, _jsxRuntime.jsx)("div", {
166
- className: (0, _classnames.default)('ncua-modal__actions', `ncua-modal__actions--${layout}`, `ncua-modal__actions--${align}`),
167
- children: children
168
- })]
151
+ return (0, _jsxRuntime.jsxs)("div", {
152
+ className: (0, _classnames.default)('ncua-modal__actions-wrapper', className, {
153
+ 'ncua-modal__actions-wrapper--checkbox': layout === 'checkbox'
154
+ }),
155
+ children: [layout === 'checkbox' && (0, _jsxRuntime.jsx)("div", {
156
+ className: "ncua-modal__actions-checkbox",
157
+ children: (0, _jsxRuntime.jsx)("div", {
158
+ className: "ncua-modal__actions-checkbox-content",
159
+ children: checkboxContent
160
+ })
161
+ }), (0, _jsxRuntime.jsx)("div", {
162
+ className: (0, _classnames.default)('ncua-modal__actions', `ncua-modal__actions--${layout}`, `ncua-modal__actions--${align}`),
163
+ children: children
169
164
  })]
170
165
  });
171
166
  };
@@ -152,10 +152,10 @@ const PostcodeSearchModal = _ref2 => {
152
152
  size: "md",
153
153
  zIndex: zIndex,
154
154
  className: className,
155
+ showHeaderDivider: true,
155
156
  children: [(0, _jsxRuntime.jsx)(_modal.Modal.Header, {
156
157
  title: MODAL_TITLE,
157
- onClose: onClose,
158
- showDivider: true
158
+ onClose: onClose
159
159
  }), (0, _jsxRuntime.jsx)(_modal.Modal.Content, {
160
160
  children: (0, _jsxRuntime.jsxs)("div", {
161
161
  className: "ncua-postcode-search-modal",