@hazelcast/ui 1.3.2-next.16 → 1.3.2-next.19
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/lib/Calendar/Calendar.d.ts +3 -1
- package/lib/Calendar/Calendar.js +29 -21
- package/lib/Calendar/Calendar.js.map +1 -1
- package/lib/Calendar/Calendar.module.scss +2 -1
- package/lib/Calendar/CalendarRange.d.ts +3 -3
- package/lib/Calendar/CalendarRange.js +5 -5
- package/lib/Calendar/CalendarRange.js.map +1 -1
- package/lib/Calendar/CalendarRange.module.scss +5 -0
- package/lib/Calendar/components/CalendarTime.js +1 -1
- package/lib/Calendar/components/CalendarTime.js.map +1 -1
- package/lib/Card.js +2 -2
- package/lib/Card.js.map +1 -1
- package/lib/Overlay.d.ts +3 -0
- package/lib/Overlay.js +4 -3
- package/lib/Overlay.js.map +1 -1
- package/lib/Select/CheckableSelectField.module.scss +1 -1
- package/package.json +2 -2
|
@@ -10,5 +10,7 @@ export declare type CalendarProps = {
|
|
|
10
10
|
onDateChange: ReactDatePickerProps['onChange'];
|
|
11
11
|
size?: CalendarSize;
|
|
12
12
|
container?: PortalContainer;
|
|
13
|
-
|
|
13
|
+
inPortal?: boolean;
|
|
14
|
+
dateFormat?: string;
|
|
15
|
+
} & Omit<ReactDatePickerProps, 'value' | 'onChange' | 'dateFormat'>;
|
|
14
16
|
export declare const Calendar: FC<CalendarProps>;
|
package/lib/Calendar/Calendar.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
2
|
import cn from 'classnames';
|
|
3
3
|
import { createPortal } from 'react-dom';
|
|
4
4
|
import DatePicker from 'react-datepicker';
|
|
@@ -8,24 +8,32 @@ import { CalendarTime } from './components/CalendarTime';
|
|
|
8
8
|
import styles from './Calendar.module.scss';
|
|
9
9
|
import { getPortalContainer } from '../utils/portal';
|
|
10
10
|
const DATE_FORMAT = 'yyyy-MM-dd';
|
|
11
|
-
const
|
|
12
|
-
const CalendarPopperContainer = (container) => ({ children }) =>
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
11
|
+
const TIME_FORMAT = 'hh:mm a';
|
|
12
|
+
const CalendarPopperContainer = (container, inPortal) => ({ children }) => {
|
|
13
|
+
const content = ( // eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
14
|
+
React.createElement("div", { className: styles.popper },
|
|
15
|
+
React.createElement("div", { "data-test": "date-picker-popper-container", className: "hz-date-picker-popper-container" }, children)));
|
|
16
|
+
if (inPortal) {
|
|
17
|
+
return content;
|
|
18
|
+
}
|
|
19
|
+
return container && children ? createPortal(content, container) : null;
|
|
20
|
+
};
|
|
21
|
+
export const Calendar = ({ calendarClassName, className, containerClassName, date, inputLabel, inputClassName, onDateChange, showTimeInput, size = 'medium', container = `body`, inPortal = false, dateFormat = DATE_FORMAT, timeFormat = TIME_FORMAT, ...props }) => {
|
|
22
|
+
const PopperContainer = useMemo(() => CalendarPopperContainer(getPortalContainer(container), inPortal), [container, inPortal]);
|
|
23
|
+
return (React.createElement("div", { className: cn(styles.container, {
|
|
24
|
+
[styles.time]: showTimeInput,
|
|
25
|
+
}, containerClassName) },
|
|
26
|
+
React.createElement(DatePicker, { ...props, calendarClassName: cn(styles.calendar, calendarClassName), className: className,
|
|
27
|
+
/*
|
|
28
|
+
* Note: The library instantiates the component using React.cloneElement
|
|
29
|
+
* Source: https://github.com/Hacker0x01/react-datepicker/blob/master/src/index.jsx#L926
|
|
30
|
+
*/
|
|
31
|
+
customInput: React.createElement(CalendarInput, { label: inputLabel, textFieldSize: size, className: inputClassName }), customTimeInput: React.createElement(CalendarTime, null), dateFormat: showTimeInput ? `${dateFormat} ${timeFormat}` : dateFormat, onChange: onDateChange, popperContainer: PopperContainer,
|
|
32
|
+
/*
|
|
33
|
+
* Note:
|
|
34
|
+
* 'renderCustomHeader' is the only child component override prop that is not instantiated
|
|
35
|
+
* via React.cloneElement. So at least we can utilise a typed React.Component over React.ReactNode here
|
|
36
|
+
*/
|
|
37
|
+
renderCustomHeader: CalendarHeader, selected: date, timeFormat: timeFormat, showPopperArrow: false, showTimeInput: showTimeInput })));
|
|
38
|
+
};
|
|
31
39
|
//# sourceMappingURL=Calendar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Calendar.js","sourceRoot":"","sources":["../../src/Calendar/Calendar.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Calendar.js","sourceRoot":"","sources":["../../src/Calendar/Calendar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAM,OAAO,EAAE,MAAM,OAAO,CAAA;AAC1C,OAAO,EAAE,MAAM,YAAY,CAAA;AAC3B,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AACxC,OAAO,UAAoC,MAAM,kBAAkB,CAAA;AAEnE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAExD,OAAO,MAAM,MAAM,wBAAwB,CAAA;AAC3C,OAAO,EAAE,kBAAkB,EAAmB,MAAM,iBAAiB,CAAA;AAErE,MAAM,WAAW,GAAG,YAAY,CAAA;AAChC,MAAM,WAAW,GAAG,SAAS,CAAA;AAE7B,MAAM,uBAAuB,GAC3B,CAAC,SAA6B,EAAE,QAAiB,EAAM,EAAE,CACzD,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IACf,MAAM,OAAO,GAAG,EAAE,mEAAmE;IACnF,6BAAK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GAAG,UAAU,IAAI,UAAU,EAAE,CAAC,CAAC,CAAC,UAAU,EACtE,QAAQ,EAAE,YAAY,EACtB,eAAe,EAAE,eAAe;YAChC;;;;eAIG;YACH,kBAAkB,EAAE,cAAc,EAClC,QAAQ,EAAE,IAAI,EACd,UAAU,EAAE,UAAU,EACtB,eAAe,EAAE,KAAK,EACtB,aAAa,EAAE,aAAa,GAC5B,CACE,CACP,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -33,6 +33,8 @@ $inputPadding: c.$grid * 3;
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
:global .react-datepicker {
|
|
36
|
+
padding: $inputPadding;
|
|
37
|
+
|
|
36
38
|
:global .react-datepicker__header {
|
|
37
39
|
margin: 0;
|
|
38
40
|
padding: 0;
|
|
@@ -161,7 +163,6 @@ $inputPadding: c.$grid * 3;
|
|
|
161
163
|
flex-direction: row;
|
|
162
164
|
border: c.$borderWidth solid c.$colorNeutralLight;
|
|
163
165
|
background-color: c.$colorNeutralLighter;
|
|
164
|
-
padding: $inputPadding;
|
|
165
166
|
box-sizing: border-box;
|
|
166
167
|
|
|
167
168
|
.headerContainer {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import { ReactDatePickerProps } from 'react-datepicker';
|
|
3
2
|
import { CalendarProps } from './Calendar';
|
|
3
|
+
export declare type CalendarRangeVariant = 'horizontal' | 'vertical';
|
|
4
4
|
export declare type CalendarRangeProps = {
|
|
5
5
|
startDate: CalendarProps['date'];
|
|
6
6
|
startInputLabel?: string;
|
|
@@ -9,7 +9,7 @@ export declare type CalendarRangeProps = {
|
|
|
9
9
|
endDate: CalendarProps['date'];
|
|
10
10
|
endInputLabel?: string;
|
|
11
11
|
endOpen?: boolean;
|
|
12
|
+
variant?: CalendarRangeVariant;
|
|
12
13
|
onEndDateChange: CalendarProps['onDateChange'];
|
|
13
|
-
|
|
14
|
-
} & Pick<ReactDatePickerProps, 'showTimeInput'>;
|
|
14
|
+
} & Omit<CalendarProps, 'onDateChange' | 'date' | 'inputLabel'>;
|
|
15
15
|
export declare const CalendarRange: FC<CalendarRangeProps>;
|
|
@@ -4,10 +4,10 @@ import cn from 'classnames';
|
|
|
4
4
|
import { Icon } from '../Icon';
|
|
5
5
|
import { Calendar } from './Calendar';
|
|
6
6
|
import styles from './CalendarRange.module.scss';
|
|
7
|
-
export const CalendarRange = ({ startDate, startInputLabel = 'From', startOpen, onStartDateChange, endDate, endInputLabel = 'To', endOpen, onEndDateChange,
|
|
8
|
-
return (React.createElement("div", { className: styles.container },
|
|
9
|
-
React.createElement(Calendar, { "data-test": "calendar-range-start", date: startDate, onDateChange: onStartDateChange, selectsStart: true, startDate: startDate, endDate: endDate, inputLabel: startInputLabel,
|
|
10
|
-
React.createElement(Icon, { "data-test": "calendar-range-icon", className: cn(styles.arrowRight, { [styles.small]: size === 'small' }), icon: ArrowRight, ariaLabel: "Arrow Right" }),
|
|
11
|
-
React.createElement(Calendar, { "data-test": "calendar-range-end", date: endDate, onDateChange: onEndDateChange, selectsEnd: true, startDate: startDate, endDate: endDate, minDate: startDate, inputLabel: endInputLabel,
|
|
7
|
+
export const CalendarRange = ({ startDate, startInputLabel = 'From', startOpen, onStartDateChange, endDate, endInputLabel = 'To', endOpen, onEndDateChange, size, variant = 'horizontal', ...rest }) => {
|
|
8
|
+
return (React.createElement("div", { className: cn(styles.container, { [styles.vertical]: variant === 'vertical' }) },
|
|
9
|
+
React.createElement(Calendar, { "data-test": "calendar-range-start", date: startDate, onDateChange: onStartDateChange, selectsStart: true, startDate: startDate, endDate: endDate, inputLabel: startInputLabel, open: startOpen, size: size, ...rest }),
|
|
10
|
+
variant === 'horizontal' && (React.createElement(Icon, { "data-test": "calendar-range-icon", className: cn(styles.arrowRight, { [styles.small]: size === 'small' }), icon: ArrowRight, ariaLabel: "Arrow Right" })),
|
|
11
|
+
React.createElement(Calendar, { "data-test": "calendar-range-end", date: endDate, onDateChange: onEndDateChange, selectsEnd: true, startDate: startDate, endDate: endDate, minDate: startDate, inputLabel: endInputLabel, open: endOpen, size: size, ...rest })));
|
|
12
12
|
};
|
|
13
13
|
//# sourceMappingURL=CalendarRange.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CalendarRange.js","sourceRoot":"","sources":["../../src/Calendar/CalendarRange.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAa,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"CalendarRange.js","sourceRoot":"","sources":["../../src/Calendar/CalendarRange.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAa,MAAM,OAAO,CAAA;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,EAAE,MAAM,YAAY,CAAA;AAE3B,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAC9B,OAAO,EAAE,QAAQ,EAAiB,MAAM,YAAY,CAAA;AAEpD,OAAO,MAAM,MAAM,6BAA6B,CAAA;AAehD,MAAM,CAAC,MAAM,aAAa,GAA2B,CAAC,EACpD,SAAS,EACT,eAAe,GAAG,MAAM,EACxB,SAAS,EACT,iBAAiB,EACjB,OAAO,EACP,aAAa,GAAG,IAAI,EACpB,OAAO,EACP,eAAe,EACf,IAAI,EACJ,OAAO,GAAG,YAAY,EACtB,GAAG,IAAI,EACR,EAAE,EAAE;IACH,OAAO,CACL,6BAAK,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,OAAO,KAAK,UAAU,EAAE,CAAC;QACjF,oBAAC,QAAQ,iBACG,sBAAsB,EAChC,IAAI,EAAE,SAAS,EACf,YAAY,EAAE,iBAAiB,EAC/B,YAAY,QACZ,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,eAAe,EAC3B,IAAI,EAAE,SAAS,EACf,IAAI,EAAE,IAAI,KACN,IAAI,GACR;QACD,OAAO,KAAK,YAAY,IAAI,CAC3B,oBAAC,IAAI,iBACO,qBAAqB,EAC/B,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,UAAU,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,IAAI,KAAK,OAAO,EAAE,CAAC,EACtE,IAAI,EAAE,UAAU,EAChB,SAAS,EAAC,aAAa,GACvB,CACH;QACD,oBAAC,QAAQ,iBACG,oBAAoB,EAC9B,IAAI,EAAE,OAAO,EACb,YAAY,EAAE,eAAe,EAC7B,UAAU,QACV,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,SAAS,EAClB,UAAU,EAAE,aAAa,EACzB,IAAI,EAAE,OAAO,EACb,IAAI,EAAE,IAAI,KACN,IAAI,GACR,CACE,CACP,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -53,7 +53,7 @@ export const CalendarTimeInternal = ({ date, value, onChange }) => {
|
|
|
53
53
|
}, [onChange, date]);
|
|
54
54
|
return (React.createElement("div", { "data-test": "calendar-time", className: styles.container },
|
|
55
55
|
React.createElement("div", { "data-test": "calendar-time-header", className: styles.header },
|
|
56
|
-
React.createElement(TimeField, { showAriaLabel: true, label: "Time Input", error: timeInputError,
|
|
56
|
+
React.createElement(TimeField, { showAriaLabel: true, label: "Time Input", error: timeInputError, name: "time", value: time.toString(), onChange: handleTimeInputChange })),
|
|
57
57
|
React.createElement("div", { "data-test": "calendar-time-timePoints", className: styles.timePoints }, timePoints.map((tP) => (React.createElement(Button, { className: styles.timePoint, bodyClassName: styles.timePointBody, key: tP, kind: "transparent", onClick: handleDateClick(tP) }, tP))))));
|
|
58
58
|
};
|
|
59
59
|
export const CalendarTime = (props) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CalendarTime.js","sourceRoot":"","sources":["../../../src/Calendar/components/CalendarTime.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAmB,WAAW,EAAE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,EAAC,SAAS,EAAE,MAAM,CAAC,MAAM;YAC5D,oBAAC,SAAS,IACR,aAAa,QACb,KAAK,EAAC,YAAY,EAClB,KAAK,EAAE,cAAc,EACrB,IAAI,EAAC,MAAM,EACX,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,EACtB,QAAQ,EAAE,qBAAqB,GAC/B,CACE;QACN,0CAAe,0BAA0B,EAAC,SAAS,EAAE,MAAM,CAAC,UAAU,IACnE,UAAU,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CACtB,oBAAC,MAAM,IACL,SAAS,EAAE,MAAM,CAAC,SAAS,EAC3B,aAAa,EAAE,MAAM,CAAC,aAAa,EACnC,GAAG,EAAE,EAAE,EACP,IAAI,EAAC,aAAa,EAClB,OAAO,EAAE,eAAe,CAAC,EAAE,CAAC,IAE3B,EAAE,CACI,CACV,CAAC,CACE,CACF,CACP,CAAA;AACH,CAAC,CAAA;AAUD,MAAM,CAAC,MAAM,YAAY,GAA0B,CAAC,KAAK,EAAE,EAAE;IAC3D,oDAAoD;IACpD,MAAM,UAAU,GAAG,KAAkC,CAAA;IAErD,OAAO,oBAAC,oBAAoB,OAAK,UAAU,GAAI,CAAA;AACjD,CAAC,CAAA"}
|
package/lib/Card.js
CHANGED
|
@@ -11,9 +11,9 @@ import styles from './Card.module.scss';
|
|
|
11
11
|
*/
|
|
12
12
|
export const Card = ({ headingIcon, title, headingContent, separator = false, 'data-test': dataTest, children, className, iconClassName, titleClassName, contentClassName, headerClassName, caption, }) => (React.createElement("div", { "data-test": dataTest !== null && dataTest !== void 0 ? dataTest : 'card-wrapper', className: cn(styles.wrapper, { [styles.noTitle]: !title }, className) },
|
|
13
13
|
caption && React.createElement("div", { className: styles.caption }, caption),
|
|
14
|
-
title && (React.createElement("div", { "data-test": "card-heading", className: cn(styles.heading, headerClassName) },
|
|
14
|
+
(title || headingContent || headingIcon) && (React.createElement("div", { "data-test": "card-heading", className: cn(styles.heading, headerClassName) },
|
|
15
15
|
headingIcon && React.createElement(Icon, { "data-test": "card-heading-icon", icon: headingIcon, className: cn(styles.icon, iconClassName), ariaHidden: true }),
|
|
16
|
-
React.createElement("h3", { "data-test": "card-heading-title", className: cn(styles.title, { [styles.space]: !!headingContent }, titleClassName) }, title),
|
|
16
|
+
title && (React.createElement("h3", { "data-test": "card-heading-title", className: cn(styles.title, { [styles.space]: !!headingContent }, titleClassName) }, title)),
|
|
17
17
|
headingContent)),
|
|
18
18
|
separator && React.createElement("div", { "data-test": "card-separator", className: styles.separator }),
|
|
19
19
|
children && (React.createElement("div", { "data-test": "card-content", className: cn(styles.content, contentClassName) }, children))));
|
package/lib/Card.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.js","sourceRoot":"","sources":["../src/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAA;AAC5C,OAAO,EAAE,MAAM,YAAY,CAAA;AAG3B,OAAO,EAAE,IAAI,EAAa,MAAM,QAAQ,CAAA;AAExC,OAAO,MAAM,MAAM,oBAAoB,CAAA;AAgBvC;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,IAAI,GAAkB,CAAC,EAClC,WAAW,EACX,KAAK,EACL,cAAc,EACd,SAAS,GAAG,KAAK,EACjB,WAAW,EAAE,QAAQ,EACrB,QAAQ,EACR,SAAS,EACT,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,OAAO,GACR,EAAE,EAAE,CAAC,CACJ,0CAAgB,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,cAAc,EAAE,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,EAAE,SAAS,CAAC;IAC/G,OAAO,IAAI,6BAAK,SAAS,EAAE,MAAM,CAAC,OAAO,IAAG,OAAO,CAAO;IAC1D,KAAK,IAAI,
|
|
1
|
+
{"version":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QACA,cAAc,CACX,CACP;IAEA,SAAS,IAAI,0CAAe,gBAAgB,EAAC,SAAS,EAAE,MAAM,CAAC,SAAS,GAAI;IAE5E,QAAQ,IAAI,CACX,0CAAe,cAAc,EAAC,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,gBAAgB,CAAC,IAC1E,QAAQ,CACL,CACP,CACG,CACP,CAAA"}
|
package/lib/Overlay.d.ts
CHANGED
|
@@ -9,11 +9,14 @@ export declare type OverlayProps = {
|
|
|
9
9
|
closable?: boolean;
|
|
10
10
|
closeText?: string | null;
|
|
11
11
|
headerClassName?: string;
|
|
12
|
+
footerClassName?: string;
|
|
12
13
|
contentClassName?: string;
|
|
14
|
+
wrapperClassName?: string;
|
|
13
15
|
icon?: IconProps['icon'];
|
|
14
16
|
onClose?: ReactModalProps['onRequestClose'];
|
|
15
17
|
contentWidth?: 'fullscreen' | 'normal';
|
|
16
18
|
title?: string;
|
|
17
19
|
headingContent?: ReactNode;
|
|
20
|
+
footerContent?: ReactNode;
|
|
18
21
|
} & DataTestProp & Exclude<ReactModalProps, 'onRequestClose' | 'shouldFocusAfterRender' | 'shouldReturnFocusAfterClose'>;
|
|
19
22
|
export declare const Overlay: FC<OverlayProps>;
|
package/lib/Overlay.js
CHANGED
|
@@ -15,7 +15,7 @@ import styles from './Overlay.module.scss';
|
|
|
15
15
|
* - Overlay always contains a title, cancel button in the top right corner, and content.
|
|
16
16
|
* - To close the Overlay, use cancel button in the top right corner or press "Esc" key.
|
|
17
17
|
*/
|
|
18
|
-
export const Overlay = ({ 'data-test': dataTest, children, className, headerClassName, contentClassName, icon, onClose, title, headingContent, contentWidth = 'normal', isOpen, closable = true, closeText = 'Cancel', ...rest }) => {
|
|
18
|
+
export const Overlay = ({ 'data-test': dataTest, children, className, headerClassName, footerClassName, contentClassName, wrapperClassName, icon, onClose, title, headingContent, footerContent, contentWidth = 'normal', isOpen, closable = true, closeText = 'Cancel', ...rest }) => {
|
|
19
19
|
useIsomorphicLayoutEffect(() => {
|
|
20
20
|
if (isOpen) {
|
|
21
21
|
document.body.classList.add(styles.overlayed);
|
|
@@ -25,12 +25,13 @@ export const Overlay = ({ 'data-test': dataTest, children, className, headerClas
|
|
|
25
25
|
}
|
|
26
26
|
}, [isOpen]);
|
|
27
27
|
return (React.createElement(ReactModal, { "data-test": dataTest, portalClassName: styles.portal, className: cn(styles.modal, className), contentLabel: title, onRequestClose: onClose, shouldCloseOnOverlayClick: false, shouldCloseOnEsc: closable, shouldFocusAfterRender: true, shouldReturnFocusAfterClose: true, isOpen: isOpen, ...rest },
|
|
28
|
-
React.createElement("div", { "data-test": "overlay-wrapper", className: cn(styles.wrapper, { [styles.normal]: contentWidth === 'normal', [styles.fullscreen]: contentWidth === 'fullscreen' }) },
|
|
28
|
+
React.createElement("div", { "data-test": "overlay-wrapper", className: cn(styles.wrapper, { [styles.normal]: contentWidth === 'normal', [styles.fullscreen]: contentWidth === 'fullscreen' }, wrapperClassName) },
|
|
29
29
|
React.createElement("div", { "data-test": "overlay-header", className: cn(styles.header, headerClassName) },
|
|
30
30
|
icon && React.createElement(Icon, { "data-test": "overlay-header-icon", className: styles.icon, size: "medium", icon: icon, ariaHidden: true }),
|
|
31
31
|
title && (React.createElement("h1", { "data-test": "overlay-header-title", className: styles.title }, title)),
|
|
32
32
|
headingContent,
|
|
33
33
|
closable && (React.createElement(Link, { "data-test": "overlay-header-cancel-button", className: styles.close, component: "button", onClick: onClose, size: "small", iconClassName: styles.closeIcon, icon: X, ariaLabel: closeText || 'Cancel' }, !!closeText && React.createElement("span", { className: styles.closeText }, closeText)))),
|
|
34
|
-
React.createElement("div", { "data-test": "overlay-content", className: cn(styles.content, contentClassName) }, children)
|
|
34
|
+
React.createElement("div", { "data-test": "overlay-content", className: cn(styles.content, contentClassName) }, children),
|
|
35
|
+
footerContent && (React.createElement("div", { "data-test": "overlay-footer", className: footerClassName }, footerContent)))));
|
|
35
36
|
};
|
|
36
37
|
//# sourceMappingURL=Overlay.js.map
|
package/lib/Overlay.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Overlay.js","sourceRoot":"","sources":["../src/Overlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAA;AAC5C,OAAO,UAAwC,MAAM,aAAa,CAAA;AAClE,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAA;AACjC,OAAO,EAAE,MAAM,YAAY,CAAA;AAC3B,OAAO,yBAAyB,MAAM,yCAAyC,CAAA;AAI/E,OAAO,EAAE,IAAI,EAAa,MAAM,QAAQ,CAAA;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAE7B,OAAO,MAAM,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"Overlay.js","sourceRoot":"","sources":["../src/Overlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAA;AAC5C,OAAO,UAAwC,MAAM,aAAa,CAAA;AAClE,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAA;AACjC,OAAO,EAAE,MAAM,YAAY,CAAA;AAC3B,OAAO,yBAAyB,MAAM,yCAAyC,CAAA;AAI/E,OAAO,EAAE,IAAI,EAAa,MAAM,QAAQ,CAAA;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAE7B,OAAO,MAAM,MAAM,uBAAuB,CAAA;AAoB1C;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,OAAO,GAAqB,CAAC,EACxC,WAAW,EAAE,QAAQ,EACrB,QAAQ,EACR,SAAS,EACT,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,IAAI,EACJ,OAAO,EACP,KAAK,EACL,cAAc,EACd,aAAa,EACb,YAAY,GAAG,QAAQ,EACvB,MAAM,EACN,QAAQ,GAAG,IAAI,EACf,SAAS,GAAG,QAAQ,EACpB,GAAG,IAAI,EACR,EAAE,EAAE;IACH,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SAAS,EAAE,MAAM,CAAC,KAAK,EACvB,SAAS,EAAC,QAAQ,EAClB,OAAO,EAAE,OAAO,EAChB,IAAI,EAAC,OAAO,EACZ,aAAa,EAAE,MAAM,CAAC,SAAS,EAC/B,IAAI,EAAE,CAAC,EACP,SAAS,EAAE,SAAS,IAAI,QAAQ,IAE/B,CAAC,CAAC,SAAS,IAAI,8BAAM,SAAS,EAAE,MAAM,CAAC,SAAS,IAAG,SAAS,CAAQ,CAChE,CACR,CACG;YACN,0CAAe,iBAAiB,EAAC,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,gBAAgB,CAAC,IAC7E,QAAQ,CACL;YACL,aAAa,IAAI,CAChB,0CAAe,gBAAgB,EAAC,SAAS,EAAE,eAAe,IACvD,aAAa,CACV,CACP,CACG,CACK,CACd,CAAA;AACH,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hazelcast/ui",
|
|
3
|
-
"version": "1.3.2-next.
|
|
3
|
+
"version": "1.3.2-next.19+e89d79a",
|
|
4
4
|
"description": "Hazelcast design system components",
|
|
5
5
|
"author": "",
|
|
6
6
|
"homepage": "https://github.com/hazelcast/frontend-shared#readme",
|
|
@@ -113,5 +113,5 @@
|
|
|
113
113
|
"webpack": "^5.65.0",
|
|
114
114
|
"yup": "^0.32.11"
|
|
115
115
|
},
|
|
116
|
-
"gitHead": "
|
|
116
|
+
"gitHead": "e89d79a3c4be99498f3b308d1e65a51de7d1654e"
|
|
117
117
|
}
|