@kaizen/components 0.0.0-canary-debug-kaizen-provider-20241223031700 → 0.0.0-canary-debug-kaizen-20250106051729
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 +21 -10
- 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 +22 -11
- package/dist/esm/__rc__/Button/Button.mjs +3 -3
- package/dist/esm/__rc__/Button/Button.module.css.mjs +2 -2
- package/dist/styles.css +9042 -9042
- 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 +20 -11
- 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
|
@@ -15,15 +15,26 @@ var ToastNotificationsList = function () {
|
|
|
15
15
|
var _a = ToastNotificationContext.useToastNotificationContext(),
|
|
16
16
|
notifications = _a.notifications,
|
|
17
17
|
removeToastNotification = _a.removeToastNotification;
|
|
18
|
-
var
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
containers.
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
|
|
18
|
+
var _b = React.useState(null),
|
|
19
|
+
toastContainer = _b[0],
|
|
20
|
+
setToastContainer = _b[1];
|
|
21
|
+
React.useEffect(function () {
|
|
22
|
+
var containers = document.querySelectorAll('[data-testid="toast-notifications-list"');
|
|
23
|
+
if (toastContainer && containers.length === 1) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
if (containers) {
|
|
27
|
+
// Remove any duplicate instances
|
|
28
|
+
// (eg. Storybook docs page has multiple stories each with their own context)
|
|
29
|
+
containers.forEach(function (c, i) {
|
|
30
|
+
if (i === 0) {
|
|
31
|
+
setToastContainer(c);
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
c.remove();
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
}, [toastContainer]);
|
|
27
38
|
return ReactDOM.createPortal(React__default.default.createElement("div", {
|
|
28
39
|
"data-testid": "toast-notifications-list",
|
|
29
40
|
role: "status",
|
|
@@ -31,7 +42,7 @@ var ToastNotificationsList = function () {
|
|
|
31
42
|
}, React__default.default.createElement(ToastNotificationsMap.ToastNotificationsMap, {
|
|
32
43
|
notifications: notifications,
|
|
33
44
|
onHide: removeToastNotification,
|
|
34
|
-
container:
|
|
45
|
+
container: toastContainer
|
|
35
46
|
})), document.body);
|
|
36
47
|
};
|
|
37
48
|
ToastNotificationsList.displayName = '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,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { useState, useEffect } from 'react';
|
|
2
2
|
import { createPortal } from 'react-dom';
|
|
3
3
|
import { useToastNotificationContext } from '../context/ToastNotificationContext.mjs';
|
|
4
4
|
import { ToastNotificationsMap } from './subcomponents/ToastNotificationsMap/ToastNotificationsMap.mjs';
|
|
@@ -8,15 +8,26 @@ const ToastNotificationsList = /*#__PURE__*/function () {
|
|
|
8
8
|
var _a = useToastNotificationContext(),
|
|
9
9
|
notifications = _a.notifications,
|
|
10
10
|
removeToastNotification = _a.removeToastNotification;
|
|
11
|
-
var
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
containers.
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
|
|
11
|
+
var _b = useState(null),
|
|
12
|
+
toastContainer = _b[0],
|
|
13
|
+
setToastContainer = _b[1];
|
|
14
|
+
useEffect(function () {
|
|
15
|
+
var containers = document.querySelectorAll('[data-testid="toast-notifications-list"');
|
|
16
|
+
if (toastContainer && containers.length === 1) {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
if (containers) {
|
|
20
|
+
// Remove any duplicate instances
|
|
21
|
+
// (eg. Storybook docs page has multiple stories each with their own context)
|
|
22
|
+
containers.forEach(function (c, i) {
|
|
23
|
+
if (i === 0) {
|
|
24
|
+
setToastContainer(c);
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
c.remove();
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
}, [toastContainer]);
|
|
20
31
|
return /*#__PURE__*/createPortal( /*#__PURE__*/React.createElement("div", {
|
|
21
32
|
"data-testid": "toast-notifications-list",
|
|
22
33
|
role: "status",
|
|
@@ -24,7 +35,7 @@ const ToastNotificationsList = /*#__PURE__*/function () {
|
|
|
24
35
|
}, /*#__PURE__*/React.createElement(ToastNotificationsMap, {
|
|
25
36
|
notifications: notifications,
|
|
26
37
|
onHide: removeToastNotification,
|
|
27
|
-
container:
|
|
38
|
+
container: toastContainer
|
|
28
39
|
})), document.body);
|
|
29
40
|
};
|
|
30
41
|
ToastNotificationsList.displayName = '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 };
|