@ncds/ui-admin 1.8.22-alpha.0 → 1.8.22-alpha.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.
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import classnames from 'classnames';
3
3
  import { useEffect, useRef } from 'react';
4
4
  import ReactDOM from 'react-dom';
@@ -12,6 +12,8 @@ const Modal = _ref => {
12
12
  size = 'md',
13
13
  closeOnBackdropClick = false,
14
14
  closeOnEsc = true,
15
+ showHeaderDivider = false,
16
+ showActionsDivider = false,
15
17
  className,
16
18
  zIndex,
17
19
  ...restProps
@@ -47,7 +49,10 @@ const Modal = _ref => {
47
49
  } : undefined,
48
50
  ...restProps,
49
51
  children: _jsx("div", {
50
- className: classnames('ncua-modal', `ncua-modal--${size}`),
52
+ className: classnames('ncua-modal', `ncua-modal--${size}`, {
53
+ 'ncua-modal--divider-header': showHeaderDivider,
54
+ 'ncua-modal--divider-actions': showActionsDivider
55
+ }),
51
56
  children: children
52
57
  })
53
58
  });
@@ -61,36 +66,31 @@ Modal.Header = _ref2 => {
61
66
  title,
62
67
  subtitle,
63
68
  align = 'left',
64
- showDivider = false,
65
69
  hideCloseButton = false
66
70
  } = _ref2;
67
- return _jsxs(_Fragment, {
68
- children: [_jsxs("header", {
69
- className: classnames('ncua-modal__header', `ncua-modal__header--${align}`, {
70
- 'ncua-modal__header--close-button': !hideCloseButton
71
- }),
72
- children: [featuredIcon && _jsx(FeaturedIcon, {
73
- icon: featuredIcon.icon,
74
- color: featuredIcon.color,
75
- theme: featuredIcon.theme,
76
- size: "sm"
77
- }), _jsxs("div", {
78
- className: "ncua-modal__title",
79
- children: [_jsx("div", {
80
- className: "ncua-modal__title-text",
81
- children: title
82
- }), subtitle && _jsx("div", {
83
- className: "ncua-modal__title-subtitle",
84
- children: subtitle
85
- })]
86
- }), children, !hideCloseButton && _jsx(ButtonCloseX, {
87
- className: "ncua-modal__close-button",
88
- size: "sm",
89
- theme: "light",
90
- onClick: onClose
71
+ return _jsxs("header", {
72
+ className: classnames('ncua-modal__header', `ncua-modal__header--${align}`, {
73
+ 'ncua-modal__header--close-button': !hideCloseButton
74
+ }),
75
+ children: [featuredIcon && _jsx(FeaturedIcon, {
76
+ icon: featuredIcon.icon,
77
+ color: featuredIcon.color,
78
+ theme: featuredIcon.theme,
79
+ size: "sm"
80
+ }), _jsxs("div", {
81
+ className: "ncua-modal__title",
82
+ children: [_jsx("div", {
83
+ className: "ncua-modal__title-text",
84
+ children: title
85
+ }), subtitle && _jsx("div", {
86
+ className: "ncua-modal__title-subtitle",
87
+ children: subtitle
91
88
  })]
92
- }), showDivider && _jsx("div", {
93
- className: "ncua-modal__header-divider"
89
+ }), children, !hideCloseButton && _jsx(ButtonCloseX, {
90
+ className: "ncua-modal__close-button",
91
+ size: "sm",
92
+ theme: "light",
93
+ onClick: onClose
94
94
  })]
95
95
  });
96
96
  };
@@ -136,28 +136,23 @@ Modal.Actions = _ref4 => {
136
136
  let {
137
137
  children,
138
138
  layout = 'vertical',
139
- showDivider = false,
140
139
  align = 'stretch',
141
140
  checkboxContent,
142
141
  className
143
142
  } = _ref4;
144
- return _jsxs(_Fragment, {
145
- children: [showDivider && _jsx("div", {
146
- className: "ncua-modal__actions-divider"
147
- }), _jsxs("div", {
148
- className: classnames('ncua-modal__actions-wrapper', className, {
149
- 'ncua-modal__actions-wrapper--checkbox': layout === 'checkbox'
150
- }),
151
- children: [layout === 'checkbox' && _jsx("div", {
152
- className: "ncua-modal__actions-checkbox",
153
- children: _jsx("div", {
154
- className: "ncua-modal__actions-checkbox-content",
155
- children: checkboxContent
156
- })
157
- }), _jsx("div", {
158
- className: classnames('ncua-modal__actions', `ncua-modal__actions--${layout}`, `ncua-modal__actions--${align}`),
159
- children: children
160
- })]
143
+ return _jsxs("div", {
144
+ className: classnames('ncua-modal__actions-wrapper', className, {
145
+ 'ncua-modal__actions-wrapper--checkbox': layout === 'checkbox'
146
+ }),
147
+ children: [layout === 'checkbox' && _jsx("div", {
148
+ className: "ncua-modal__actions-checkbox",
149
+ children: _jsx("div", {
150
+ className: "ncua-modal__actions-checkbox-content",
151
+ children: checkboxContent
152
+ })
153
+ }), _jsx("div", {
154
+ className: classnames('ncua-modal__actions', `ncua-modal__actions--${layout}`, `ncua-modal__actions--${align}`),
155
+ children: children
161
156
  })]
162
157
  });
163
158
  };
@@ -145,10 +145,10 @@ const PostcodeSearchModal = _ref2 => {
145
145
  size: "md",
146
146
  zIndex: zIndex,
147
147
  className: className,
148
+ showHeaderDivider: true,
148
149
  children: [_jsx(Modal.Header, {
149
150
  title: MODAL_TITLE,
150
- onClose: onClose,
151
- showDivider: true
151
+ onClose: onClose
152
152
  }), _jsx(Modal.Content, {
153
153
  children: _jsxs("div", {
154
154
  className: "ncua-postcode-search-modal",