@kaizen/components 0.0.0-canary-debug-kaizen-provider-20241223031700 → 0.0.0-canary-debug-kaizen-provider-20250107211815
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/dist/cjs/Filter/FilterBar/subcomponents/AddFiltersMenu/AddFiltersMenu.cjs +1 -1
- package/dist/cjs/LinkButton/LinkButton.cjs +2 -3
- package/dist/cjs/Notification/ToastNotification/ToastNotificationsList/ToastNotificationsList.cjs +17 -17
- package/dist/cjs/__rc__/Button/Button.module.css.cjs +2 -2
- package/dist/esm/Filter/FilterBar/subcomponents/AddFiltersMenu/AddFiltersMenu.mjs +1 -1
- package/dist/esm/LinkButton/LinkButton.mjs +1 -1
- package/dist/esm/Notification/ToastNotification/ToastNotificationsList/ToastNotificationsList.mjs +18 -18
- package/dist/esm/__rc__/Button/Button.mjs +3 -3
- package/dist/esm/__rc__/Button/Button.module.css.mjs +2 -2
- package/dist/styles.css +2429 -2429
- package/locales/en-GB.json +1 -1
- package/locales/en.json +1 -1
- package/package.json +3 -3
- package/src/Filter/FilterBar/FilterBar.spec.tsx +10 -10
- package/src/Filter/FilterBar/_docs/FilterBar.spec.stories.tsx +2 -2
- package/src/Filter/FilterBar/_docs/FilterBar.stories.tsx +2 -2
- package/src/Filter/FilterBar/subcomponents/AddFiltersMenu/AddFiltersMenu.spec.tsx +3 -3
- package/src/Filter/FilterBar/subcomponents/AddFiltersMenu/AddFiltersMenu.tsx +1 -1
- package/src/LinkButton/LinkButton.tsx +1 -1
- package/src/Notification/ToastNotification/ToastNotificationsList/ToastNotificationsList.tsx +21 -25
- package/src/Notification/ToastNotification/_docs/ToastNotification.stories.tsx +18 -19
|
@@ -18,7 +18,7 @@ var AddFiltersMenu = function () {
|
|
|
18
18
|
var buttonRef = React.useRef(null);
|
|
19
19
|
var menuButtonLabel = formatMessage({
|
|
20
20
|
id: 'filterBar.addFiltersMenu.buttonLabel',
|
|
21
|
-
defaultMessage: 'Add
|
|
21
|
+
defaultMessage: 'Add filters',
|
|
22
22
|
description: 'Menu button label to show additional available filter options'
|
|
23
23
|
});
|
|
24
24
|
var _a = FilterBarContext.useFilterBarContext(),
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
var tslib = require('tslib');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var reactAriaComponents = require('react-aria-components');
|
|
6
|
-
var buttonStyles = require('~components/__rc__/Button/Button.module.css');
|
|
7
6
|
require('classnames');
|
|
8
7
|
require('../Loading/LoadingGraphic/LoadingGraphic.cjs');
|
|
9
8
|
require('../Loading/LoadingHeading/LoadingHeading.cjs');
|
|
@@ -13,6 +12,7 @@ require('../Loading/LoadingSpinner/LoadingSpinner.cjs');
|
|
|
13
12
|
require('../VisuallyHidden/VisuallyHidden.cjs');
|
|
14
13
|
var ButtonContent = require('../__rc__/Button/subcomponents/ButtonContent/ButtonContent.cjs');
|
|
15
14
|
var mergeClassNames = require('../utils/mergeClassNames.cjs');
|
|
15
|
+
var Button_module = require('../__rc__/Button/Button.module.css.cjs');
|
|
16
16
|
var LinkButton_module = require('./LinkButton.module.css.cjs');
|
|
17
17
|
var ReversedColors = require('../__utilities__/ReversedColors/v3/ReversedColors.cjs');
|
|
18
18
|
function _interopDefault(e) {
|
|
@@ -21,7 +21,6 @@ function _interopDefault(e) {
|
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
23
|
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
24
|
-
var buttonStyles__default = /*#__PURE__*/_interopDefault(buttonStyles);
|
|
25
24
|
var LinkButton = React.forwardRef(function (_a, ref) {
|
|
26
25
|
var children = _a.children,
|
|
27
26
|
_b = _a.variant,
|
|
@@ -43,7 +42,7 @@ var LinkButton = React.forwardRef(function (_a, ref) {
|
|
|
43
42
|
var isReversedVariant = isReversed !== null && isReversed !== void 0 ? isReversed : shouldUseReverse;
|
|
44
43
|
return React__default.default.createElement(reactAriaComponents.Link, tslib.__assign({
|
|
45
44
|
ref: ref,
|
|
46
|
-
className: mergeClassNames.mergeClassNames(LinkButton_module.linkButton,
|
|
45
|
+
className: mergeClassNames.mergeClassNames(LinkButton_module.linkButton, Button_module.button, Button_module[size], hasHiddenLabel && Button_module["".concat(size, "IconButton")], isDisabled && Button_module.isDisabled, isReversedVariant ? Button_module["".concat(variant, "Reversed")] : Button_module[variant], isFullWidth && Button_module.fullWidth, className),
|
|
47
46
|
isDisabled: isDisabled
|
|
48
47
|
}, otherProps), function (racStateProps) {
|
|
49
48
|
var childIsFunction = typeof children === 'function';
|
package/dist/cjs/Notification/ToastNotification/ToastNotificationsList/ToastNotificationsList.cjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
|
-
var ReactDOM = require('react-dom');
|
|
5
4
|
var ToastNotificationContext = require('../context/ToastNotificationContext.cjs');
|
|
6
5
|
var ToastNotificationsMap = require('./subcomponents/ToastNotificationsMap/ToastNotificationsMap.cjs');
|
|
7
6
|
var ToastNotificationsList_module = require('./ToastNotificationsList.module.scss.cjs');
|
|
@@ -15,24 +14,25 @@ var ToastNotificationsList = function () {
|
|
|
15
14
|
var _a = ToastNotificationContext.useToastNotificationContext(),
|
|
16
15
|
notifications = _a.notifications,
|
|
17
16
|
removeToastNotification = _a.removeToastNotification;
|
|
18
|
-
var
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
},
|
|
17
|
+
var _b = React.useState(null),
|
|
18
|
+
toastContainer = _b[0],
|
|
19
|
+
setToastContainer = _b[1];
|
|
20
|
+
React.useEffect(function () {
|
|
21
|
+
var container = document.querySelector('[data-testid="toast-notifications-list"]');
|
|
22
|
+
if (!container) {
|
|
23
|
+
container = document.createElement('div');
|
|
24
|
+
container.setAttribute('data-testid', 'toast-notifications-list');
|
|
25
|
+
container.setAttribute('role', 'status');
|
|
26
|
+
container.className = ToastNotificationsList_module.toastNotificationsList;
|
|
27
|
+
document.body.appendChild(container);
|
|
28
|
+
}
|
|
29
|
+
setToastContainer(container);
|
|
30
|
+
}, []);
|
|
31
|
+
return toastContainer ? React__default.default.createElement(ToastNotificationsMap.ToastNotificationsMap, {
|
|
32
32
|
notifications: notifications,
|
|
33
33
|
onHide: removeToastNotification,
|
|
34
|
-
container:
|
|
35
|
-
})
|
|
34
|
+
container: toastContainer
|
|
35
|
+
}) : React__default.default.createElement(React__default.default.Fragment, null);
|
|
36
36
|
};
|
|
37
37
|
ToastNotificationsList.displayName = 'ToastNotificationsList';
|
|
38
38
|
exports.ToastNotificationsList = ToastNotificationsList;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var buttonStyles = {
|
|
4
4
|
"button": "Button-module_button__llv4w",
|
|
5
5
|
"fullWidth": "Button-module_fullWidth__yyvBq",
|
|
6
6
|
"small": "Button-module_small__NHLqb",
|
|
@@ -18,4 +18,4 @@ var styles = {
|
|
|
18
18
|
"hideContentWidth": "Button-module_hideContentWidth__WTIHN",
|
|
19
19
|
"retainContentWidth": "Button-module_retainContentWidth__dRMEx"
|
|
20
20
|
};
|
|
21
|
-
module.exports =
|
|
21
|
+
module.exports = buttonStyles;
|
|
@@ -11,7 +11,7 @@ const AddFiltersMenu = /*#__PURE__*/function () {
|
|
|
11
11
|
var buttonRef = useRef(null);
|
|
12
12
|
var menuButtonLabel = formatMessage({
|
|
13
13
|
id: 'filterBar.addFiltersMenu.buttonLabel',
|
|
14
|
-
defaultMessage: 'Add
|
|
14
|
+
defaultMessage: 'Add filters',
|
|
15
15
|
description: 'Menu button label to show additional available filter options'
|
|
16
16
|
});
|
|
17
17
|
var _a = useFilterBarContext(),
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { __rest, __assign } from 'tslib';
|
|
2
2
|
import React, { forwardRef } from 'react';
|
|
3
3
|
import { Link } from 'react-aria-components';
|
|
4
|
-
import buttonStyles from '~components/__rc__/Button/Button.module.css';
|
|
5
4
|
import 'classnames';
|
|
6
5
|
import '../Loading/LoadingGraphic/LoadingGraphic.mjs';
|
|
7
6
|
import '../Loading/LoadingHeading/LoadingHeading.mjs';
|
|
@@ -11,6 +10,7 @@ import '../Loading/LoadingSpinner/LoadingSpinner.mjs';
|
|
|
11
10
|
import '../VisuallyHidden/VisuallyHidden.mjs';
|
|
12
11
|
import { ButtonContent } from '../__rc__/Button/subcomponents/ButtonContent/ButtonContent.mjs';
|
|
13
12
|
import { mergeClassNames } from '../utils/mergeClassNames.mjs';
|
|
13
|
+
import buttonStyles from '../__rc__/Button/Button.module.css.mjs';
|
|
14
14
|
import styles from './LinkButton.module.css.mjs';
|
|
15
15
|
import { useReversedColors } from '../__utilities__/ReversedColors/v3/ReversedColors.mjs';
|
|
16
16
|
const LinkButton = /*#__PURE__*/function () {
|
package/dist/esm/Notification/ToastNotification/ToastNotificationsList/ToastNotificationsList.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { createPortal } from 'react-dom';
|
|
1
|
+
import React, { useState, useEffect } from 'react';
|
|
3
2
|
import { useToastNotificationContext } from '../context/ToastNotificationContext.mjs';
|
|
4
3
|
import { ToastNotificationsMap } from './subcomponents/ToastNotificationsMap/ToastNotificationsMap.mjs';
|
|
5
4
|
import styles from './ToastNotificationsList.module.scss.mjs';
|
|
@@ -8,24 +7,25 @@ const ToastNotificationsList = /*#__PURE__*/function () {
|
|
|
8
7
|
var _a = useToastNotificationContext(),
|
|
9
8
|
notifications = _a.notifications,
|
|
10
9
|
removeToastNotification = _a.removeToastNotification;
|
|
11
|
-
var
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
},
|
|
10
|
+
var _b = useState(null),
|
|
11
|
+
toastContainer = _b[0],
|
|
12
|
+
setToastContainer = _b[1];
|
|
13
|
+
useEffect(function () {
|
|
14
|
+
var container = document.querySelector('[data-testid="toast-notifications-list"]');
|
|
15
|
+
if (!container) {
|
|
16
|
+
container = document.createElement('div');
|
|
17
|
+
container.setAttribute('data-testid', 'toast-notifications-list');
|
|
18
|
+
container.setAttribute('role', 'status');
|
|
19
|
+
container.className = styles.toastNotificationsList;
|
|
20
|
+
document.body.appendChild(container);
|
|
21
|
+
}
|
|
22
|
+
setToastContainer(container);
|
|
23
|
+
}, []);
|
|
24
|
+
return toastContainer ? ( /*#__PURE__*/React.createElement(ToastNotificationsMap, {
|
|
25
25
|
notifications: notifications,
|
|
26
26
|
onHide: removeToastNotification,
|
|
27
|
-
container:
|
|
28
|
-
})),
|
|
27
|
+
container: toastContainer
|
|
28
|
+
})) : ( /*#__PURE__*/React.createElement(React.Fragment, null));
|
|
29
29
|
};
|
|
30
30
|
ToastNotificationsList.displayName = 'ToastNotificationsList';
|
|
31
31
|
return ToastNotificationsList;
|
|
@@ -4,7 +4,7 @@ import { Button as Button$1 } from 'react-aria-components';
|
|
|
4
4
|
import { mergeClassNames } from '../../utils/mergeClassNames.mjs';
|
|
5
5
|
import { PendingContent } from './subcomponents/PendingContent/PendingContent.mjs';
|
|
6
6
|
import { ButtonContent } from './subcomponents/ButtonContent/ButtonContent.mjs';
|
|
7
|
-
import
|
|
7
|
+
import buttonStyles from './Button.module.css.mjs';
|
|
8
8
|
import { useReversedColors } from '../../__utilities__/ReversedColors/v3/ReversedColors.mjs';
|
|
9
9
|
const Button = /*#__PURE__*/function () {
|
|
10
10
|
const Button = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
@@ -34,10 +34,10 @@ const Button = /*#__PURE__*/function () {
|
|
|
34
34
|
hasHiddenPendingLabel: hasHiddenLabel || propsHasHiddenPendingLabel,
|
|
35
35
|
pendingLabel: pendingLabel
|
|
36
36
|
} : {};
|
|
37
|
-
var buttonContentClass = isPending ? !hasHiddenLabel && propsHasHiddenPendingLabel ?
|
|
37
|
+
var buttonContentClass = isPending ? !hasHiddenLabel && propsHasHiddenPendingLabel ? buttonStyles.retainContentWidth : buttonStyles.hideContentWidth : undefined;
|
|
38
38
|
return /*#__PURE__*/React.createElement(Button$1, __assign({
|
|
39
39
|
ref: ref,
|
|
40
|
-
className: mergeClassNames(
|
|
40
|
+
className: mergeClassNames(buttonStyles.button, buttonStyles[size], hasHiddenLabel && buttonStyles["".concat(size, "IconButton")], isDisabled && buttonStyles.isDisabled, isReversedVariant ? buttonStyles["".concat(variant, "Reversed")] : buttonStyles[variant], isFullWidth && buttonStyles.fullWidth, className),
|
|
41
41
|
isDisabled: isDisabled,
|
|
42
42
|
isPending: isPending
|
|
43
43
|
}, restProps), function (racStateProps) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
var buttonStyles = {
|
|
2
2
|
"button": "Button-module_button__llv4w",
|
|
3
3
|
"fullWidth": "Button-module_fullWidth__yyvBq",
|
|
4
4
|
"small": "Button-module_small__NHLqb",
|
|
@@ -16,4 +16,4 @@ var styles = {
|
|
|
16
16
|
"hideContentWidth": "Button-module_hideContentWidth__WTIHN",
|
|
17
17
|
"retainContentWidth": "Button-module_retainContentWidth__dRMEx"
|
|
18
18
|
};
|
|
19
|
-
export {
|
|
19
|
+
export { buttonStyles as default };
|