@spaced-out/ui-design-system 0.5.1 → 0.5.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.
- package/CHANGELOG.md +7 -0
- package/lib/components/InContextAlert/InContextAlert.d.ts +9 -0
- package/lib/components/InContextAlert/InContextAlert.d.ts.map +1 -1
- package/lib/components/InContextAlert/InContextAlert.js +4 -2
- package/lib/components/InContextAlert/InContextAlert.stories.d.ts +17 -0
- package/lib/components/InContextAlert/InContextAlert.stories.d.ts.map +1 -1
- package/lib/components/InContextAlertWithMultipleActions/InContextAlertWithMultipleActions.d.ts +12 -0
- package/lib/components/InContextAlertWithMultipleActions/InContextAlertWithMultipleActions.d.ts.map +1 -0
- package/lib/components/InContextAlertWithMultipleActions/InContextAlertWithMultipleActions.js +78 -0
- package/lib/components/InContextAlertWithMultipleActions/InContextAlertWithMultipleActions.module.css +91 -0
- package/lib/components/InContextAlertWithMultipleActions/InContextAlertWithMultipleActions.stories.d.ts +249 -0
- package/lib/components/InContextAlertWithMultipleActions/InContextAlertWithMultipleActions.stories.d.ts.map +1 -0
- package/lib/components/InContextAlertWithMultipleActions/index.d.ts +2 -0
- package/lib/components/InContextAlertWithMultipleActions/index.d.ts.map +1 -0
- package/lib/components/InContextAlertWithMultipleActions/index.js +16 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.5.2](https://github.com/spaced-out/ui-design-system/compare/v0.5.1...v0.5.2) (2025-09-02)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* in context alert with bottom buttons ([#395](https://github.com/spaced-out/ui-design-system/issues/395)) ([1478a08](https://github.com/spaced-out/ui-design-system/commit/1478a08016922f29815eeac9403cee3496dcc5bf))
|
|
11
|
+
|
|
5
12
|
### [0.5.1](https://github.com/spaced-out/ui-design-system/compare/v0.5.0...v0.5.1) (2025-08-25)
|
|
6
13
|
|
|
7
14
|
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { Flow } from 'flow-to-typescript-codemod';
|
|
3
3
|
import type { AlertSemanticType } from '../../types/common';
|
|
4
|
+
import type { ColorTypes } from '../../types/typography';
|
|
4
5
|
import type { IconType } from '../Icon';
|
|
5
6
|
type ClassNames = Readonly<{
|
|
6
7
|
wrapper?: string;
|
|
7
8
|
alertText?: string;
|
|
8
9
|
actionContainer?: string;
|
|
9
10
|
icon?: string;
|
|
11
|
+
contentContainer?: string;
|
|
10
12
|
}>;
|
|
11
13
|
type InContextAlertBaseProps = {
|
|
12
14
|
classNames?: ClassNames;
|
|
@@ -20,12 +22,19 @@ type InContextAlertBaseProps = {
|
|
|
20
22
|
children?: string;
|
|
21
23
|
actionText?: string;
|
|
22
24
|
onAction?: ((arg1: React.SyntheticEvent<HTMLElement>) => unknown) | null | undefined;
|
|
25
|
+
actionTextColor?: ColorTypes;
|
|
23
26
|
};
|
|
24
27
|
export type InContextAlertProps = InContextAlertBaseProps & {
|
|
25
28
|
semantic?: AlertSemanticType;
|
|
26
29
|
leftIconName?: string;
|
|
27
30
|
leftIconType?: IconType;
|
|
28
31
|
};
|
|
32
|
+
export declare const AlertIcon: ({ semantic, leftIconName, leftIconType, iconClassName, }: {
|
|
33
|
+
semantic: AlertSemanticType;
|
|
34
|
+
leftIconName: string;
|
|
35
|
+
leftIconType?: IconType;
|
|
36
|
+
iconClassName?: string;
|
|
37
|
+
}) => React.JSX.Element;
|
|
29
38
|
export declare const InContextAlert: Flow.AbstractComponent<InContextAlertProps, HTMLDivElement>;
|
|
30
39
|
export {};
|
|
31
40
|
//# sourceMappingURL=InContextAlert.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InContextAlert.d.ts","sourceRoot":"","sources":["../../../src/components/InContextAlert/InContextAlert.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAErD,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"InContextAlert.d.ts","sourceRoot":"","sources":["../../../src/components/InContextAlert/InContextAlert.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAErD,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,wBAAwB,CAAC;AAGvD,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,SAAS,CAAC;AAStC,KAAK,UAAU,GAAG,QAAQ,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC,CAAC;AAEH,KAAK,uBAAuB,GAAG;IAC7B,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB,GAAG,CACA;IACE,WAAW,EAAE,IAAI,CAAC;IAClB,YAAY,CAAC,EACT,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,KAAK,OAAO,CAAC,GACtD,IAAI,GACJ,SAAS,CAAC;IACd,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,GACD;IACE,WAAW,CAAC,EAAE,KAAK,CAAC;CACrB,CACJ,GAAG;IACA,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EACL,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,KAAK,OAAO,CAAC,GACtD,IAAI,GACJ,SAAS,CAAC;IACd,eAAe,CAAC,EAAE,UAAU,CAAC;CAC9B,CAAC;AAEJ,MAAM,MAAM,mBAAmB,GAAG,uBAAuB,GAAG;IAC1D,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,QAAQ,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,0DAKvB;IACD,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,QAAQ,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,sBAmEA,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,IAAI,CAAC,iBAAiB,CACjD,mBAAmB,EACnB,cAAc,CAoFf,CAAC"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.InContextAlert = void 0;
|
|
6
|
+
exports.InContextAlert = exports.AlertIcon = void 0;
|
|
7
7
|
var React = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _common = require("../../types/common");
|
|
9
9
|
var _typography = require("../../types/typography");
|
|
@@ -73,6 +73,7 @@ const AlertIcon = _ref => {
|
|
|
73
73
|
});
|
|
74
74
|
}
|
|
75
75
|
};
|
|
76
|
+
exports.AlertIcon = AlertIcon;
|
|
76
77
|
const InContextAlert = exports.InContextAlert = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
77
78
|
const {
|
|
78
79
|
classNames,
|
|
@@ -85,6 +86,7 @@ const InContextAlert = exports.InContextAlert = /*#__PURE__*/React.forwardRef((p
|
|
|
85
86
|
// @ts-ignore - TS2339 - Property 'onCloseClick' does not exist on type 'InContextAlertProps'.
|
|
86
87
|
onCloseClick,
|
|
87
88
|
actionText = '',
|
|
89
|
+
actionTextColor = _typography.TEXT_COLORS.primary,
|
|
88
90
|
onAction,
|
|
89
91
|
leftIconType
|
|
90
92
|
} = props;
|
|
@@ -116,7 +118,7 @@ const InContextAlert = exports.InContextAlert = /*#__PURE__*/React.forwardRef((p
|
|
|
116
118
|
className: (0, _classify.classify)(_InContextAlertModule.default.actionContainer, classNames?.actionContainer)
|
|
117
119
|
}, !!actionText && /*#__PURE__*/React.createElement(_Link.Link, {
|
|
118
120
|
onClick: onAction,
|
|
119
|
-
color:
|
|
121
|
+
color: actionTextColor
|
|
120
122
|
}, actionText), !!dismissable && /*#__PURE__*/React.createElement(_Icon.ClickableIcon, {
|
|
121
123
|
color: _typography.TEXT_COLORS.primary,
|
|
122
124
|
ariaLabel: "close",
|
|
@@ -24,6 +24,22 @@ declare const _default: {
|
|
|
24
24
|
summary: string;
|
|
25
25
|
};
|
|
26
26
|
};
|
|
27
|
+
actionTextColor: {
|
|
28
|
+
options: unknown[];
|
|
29
|
+
name: string;
|
|
30
|
+
description: string;
|
|
31
|
+
control: {
|
|
32
|
+
type: string;
|
|
33
|
+
};
|
|
34
|
+
table: {
|
|
35
|
+
type: {
|
|
36
|
+
summary: string;
|
|
37
|
+
};
|
|
38
|
+
defaultValue: {
|
|
39
|
+
summary: string;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
};
|
|
27
43
|
semantic: {
|
|
28
44
|
options: unknown[];
|
|
29
45
|
description: string;
|
|
@@ -159,6 +175,7 @@ export declare const _Actionable: {
|
|
|
159
175
|
children: string;
|
|
160
176
|
semantic: string;
|
|
161
177
|
actionText: string;
|
|
178
|
+
actionTextColor: string;
|
|
162
179
|
};
|
|
163
180
|
};
|
|
164
181
|
//# sourceMappingURL=InContextAlert.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InContextAlert.stories.d.ts","sourceRoot":"","sources":["../../../src/components/InContextAlert/InContextAlert.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"InContextAlert.stories.d.ts","sourceRoot":"","sources":["../../../src/components/InContextAlert/InContextAlert.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,kBAAkB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAS1D,wBAiIE;AAEF,eAAO,MAAM,QAAQ;WAAU,mBAAmB;;;;;;CAIjD,CAAC;AASF,eAAO,MAAM,YAAY;WAAU,mBAAmB;;;;;;;;CAIrD,CAAC;AAWF,eAAO,MAAM,WAAW;WAAU,mBAAmB;;;;;;;CAIpD,CAAC"}
|
package/lib/components/InContextAlertWithMultipleActions/InContextAlertWithMultipleActions.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { Flow } from 'flow-to-typescript-codemod';
|
|
3
|
+
import type { ColorTypes } from '../../types/typography';
|
|
4
|
+
import type { InContextAlertProps } from '../InContextAlert';
|
|
5
|
+
export type InContextAlertWithMultipleActionsProps = InContextAlertProps & {
|
|
6
|
+
inline?: boolean;
|
|
7
|
+
secondaryActionText?: string;
|
|
8
|
+
onSecondaryAction?: ((arg1: React.SyntheticEvent<HTMLElement>) => unknown) | null | undefined;
|
|
9
|
+
secondaryActionTextColor?: ColorTypes;
|
|
10
|
+
};
|
|
11
|
+
export declare const InContextAlertWithMultipleActions: Flow.AbstractComponent<InContextAlertWithMultipleActionsProps, HTMLDivElement>;
|
|
12
|
+
//# sourceMappingURL=InContextAlertWithMultipleActions.d.ts.map
|
package/lib/components/InContextAlertWithMultipleActions/InContextAlertWithMultipleActions.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InContextAlertWithMultipleActions.d.ts","sourceRoot":"","sources":["../../../src/components/InContextAlertWithMultipleActions/InContextAlertWithMultipleActions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAGrD,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,wBAAwB,CAAC;AAIvD,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,mBAAmB,CAAC;AAQ3D,MAAM,MAAM,sCAAsC,GAAG,mBAAmB,GAAG;IACzE,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,iBAAiB,CAAC,EACd,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,KAAK,OAAO,CAAC,GACtD,IAAI,GACJ,SAAS,CAAC;IACd,wBAAwB,CAAC,EAAE,UAAU,CAAC;CACvC,CAAC;AAEF,eAAO,MAAM,iCAAiC,EAAE,IAAI,CAAC,iBAAiB,CACpE,sCAAsC,EACtC,cAAc,CAwGf,CAAC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.InContextAlertWithMultipleActions = void 0;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _common = require("../../types/common");
|
|
9
|
+
var _typography = require("../../types/typography");
|
|
10
|
+
var _classify = require("../../utils/classify");
|
|
11
|
+
var _Icon = require("../Icon");
|
|
12
|
+
var _InContextAlert = require("../InContextAlert");
|
|
13
|
+
var _Link = require("../Link");
|
|
14
|
+
var _Text = require("../Text");
|
|
15
|
+
var _InContextAlertWithMultipleActionsModule = _interopRequireDefault(require("./InContextAlertWithMultipleActions.module.css"));
|
|
16
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
18
|
+
const InContextAlertWithMultipleActions = exports.InContextAlertWithMultipleActions = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
19
|
+
const {
|
|
20
|
+
classNames,
|
|
21
|
+
semantic = _common.ALERT_SEMANTIC.neutral,
|
|
22
|
+
dismissable,
|
|
23
|
+
children,
|
|
24
|
+
inline = false,
|
|
25
|
+
// @ts-ignore - TS2339 - Property 'selfDismiss' does not exist on type 'InContextAlertWithMultipleActionsProps'.
|
|
26
|
+
selfDismiss = false,
|
|
27
|
+
leftIconName = '',
|
|
28
|
+
// @ts-ignore - TS2339 - Property 'onCloseClick' does not exist on type 'InContextAlertWithMultipleActionsProps'.
|
|
29
|
+
onCloseClick,
|
|
30
|
+
actionText = '',
|
|
31
|
+
onAction,
|
|
32
|
+
actionTextColor = _typography.TEXT_COLORS.primary,
|
|
33
|
+
secondaryActionText = '',
|
|
34
|
+
onSecondaryAction,
|
|
35
|
+
secondaryActionTextColor = _typography.TEXT_COLORS.primary,
|
|
36
|
+
leftIconType
|
|
37
|
+
} = props;
|
|
38
|
+
const [dismissed, setDismissed] = React.useState(false);
|
|
39
|
+
const closeClickHandler = e => {
|
|
40
|
+
onCloseClick && onCloseClick(e);
|
|
41
|
+
selfDismiss && setDismissed(true);
|
|
42
|
+
};
|
|
43
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, !dismissed && /*#__PURE__*/React.createElement("div", {
|
|
44
|
+
className: (0, _classify.classify)(_InContextAlertWithMultipleActionsModule.default.alertContainer, {
|
|
45
|
+
[_InContextAlertWithMultipleActionsModule.default.neutral]: semantic === _common.ALERT_SEMANTIC.neutral,
|
|
46
|
+
[_InContextAlertWithMultipleActionsModule.default.success]: semantic === _common.ALERT_SEMANTIC.success,
|
|
47
|
+
[_InContextAlertWithMultipleActionsModule.default.information]: semantic === _common.ALERT_SEMANTIC.information,
|
|
48
|
+
[_InContextAlertWithMultipleActionsModule.default.warning]: semantic === _common.ALERT_SEMANTIC.warning,
|
|
49
|
+
[_InContextAlertWithMultipleActionsModule.default.danger]: semantic === _common.ALERT_SEMANTIC.danger
|
|
50
|
+
}, classNames?.wrapper),
|
|
51
|
+
ref: ref
|
|
52
|
+
}, /*#__PURE__*/React.createElement(_InContextAlert.AlertIcon, {
|
|
53
|
+
semantic: semantic,
|
|
54
|
+
leftIconName: leftIconName,
|
|
55
|
+
leftIconType: leftIconType,
|
|
56
|
+
iconClassName: classNames?.icon
|
|
57
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
58
|
+
className: (0, _classify.classify)(_InContextAlertWithMultipleActionsModule.default.contentContainer, inline ? _InContextAlertWithMultipleActionsModule.default.contentContainerRow : _InContextAlertWithMultipleActionsModule.default.contentContainerColumn, classNames?.contentContainer)
|
|
59
|
+
}, React.Children.count(children) > 0 && /*#__PURE__*/React.createElement(_Text.SubTitleExtraSmall, {
|
|
60
|
+
className: (0, _classify.classify)(classNames?.alertText)
|
|
61
|
+
}, children), !!(actionText || secondaryActionText) && /*#__PURE__*/React.createElement("div", {
|
|
62
|
+
className: (0, _classify.classify)(_InContextAlertWithMultipleActionsModule.default.actionContainer, classNames?.actionContainer)
|
|
63
|
+
}, !!actionText && /*#__PURE__*/React.createElement(_Link.Link, {
|
|
64
|
+
onClick: onAction,
|
|
65
|
+
color: actionTextColor
|
|
66
|
+
}, actionText), !!secondaryActionText && /*#__PURE__*/React.createElement(_Link.Link, {
|
|
67
|
+
onClick: onSecondaryAction,
|
|
68
|
+
color: secondaryActionTextColor
|
|
69
|
+
}, secondaryActionText))), /*#__PURE__*/React.createElement("div", null, !!dismissable && /*#__PURE__*/React.createElement(_Icon.ClickableIcon, {
|
|
70
|
+
color: _typography.TEXT_COLORS.primary,
|
|
71
|
+
ariaLabel: "close",
|
|
72
|
+
name: "close",
|
|
73
|
+
size: "small",
|
|
74
|
+
type: "regular",
|
|
75
|
+
onClick: closeClickHandler,
|
|
76
|
+
className: _InContextAlertWithMultipleActionsModule.default.closeIcon
|
|
77
|
+
}))));
|
|
78
|
+
});
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
@value (borderRadiusXSmall) from '../../styles/variables/_border.css';
|
|
2
|
+
@value (colorNeutralLight,
|
|
3
|
+
colorNeutralLightest,
|
|
4
|
+
colorSuccessLight,
|
|
5
|
+
colorSuccessLightest,
|
|
6
|
+
colorInformationLight,
|
|
7
|
+
colorInformationLightest,
|
|
8
|
+
colorWarningLight,
|
|
9
|
+
colorWarningLightest,
|
|
10
|
+
colorDangerLight,
|
|
11
|
+
colorDangerLightest
|
|
12
|
+
) from '../../styles/variables/_color.css';
|
|
13
|
+
|
|
14
|
+
@value (
|
|
15
|
+
spaceXSmall,
|
|
16
|
+
spaceXXSmall
|
|
17
|
+
) from '../../styles/variables/_space.css';
|
|
18
|
+
|
|
19
|
+
@value (
|
|
20
|
+
sizeFluid
|
|
21
|
+
) from '../../styles/variables/_size.css';
|
|
22
|
+
|
|
23
|
+
@value (
|
|
24
|
+
borderWidthPrimary
|
|
25
|
+
) from '../../styles/variables/_border.css';
|
|
26
|
+
|
|
27
|
+
.alertContainer {
|
|
28
|
+
display: flex;
|
|
29
|
+
flex-direction: row;
|
|
30
|
+
align-items: flex-start;
|
|
31
|
+
padding: spaceXSmall;
|
|
32
|
+
gap: spaceXSmall;
|
|
33
|
+
border-radius: borderRadiusXSmall;
|
|
34
|
+
width: sizeFluid;
|
|
35
|
+
word-break: normal;
|
|
36
|
+
border-width: borderWidthPrimary;
|
|
37
|
+
border-style: solid;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.neutral {
|
|
41
|
+
background-color: colorNeutralLightest;
|
|
42
|
+
border-color: colorNeutralLight;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.success {
|
|
46
|
+
background-color: colorSuccessLightest;
|
|
47
|
+
border-color: colorSuccessLight;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.information {
|
|
51
|
+
background-color: colorInformationLightest;
|
|
52
|
+
border-color: colorInformationLight;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.warning {
|
|
56
|
+
background-color: colorWarningLightest;
|
|
57
|
+
border-color: colorWarningLight;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.danger {
|
|
61
|
+
background-color: colorDangerLightest;
|
|
62
|
+
border-color: colorDangerLight;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.closeIcon {
|
|
66
|
+
margin-left: auto;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.contentContainer {
|
|
70
|
+
display: flex;
|
|
71
|
+
width: sizeFluid;
|
|
72
|
+
justify-content: space-between;
|
|
73
|
+
align-items: flex-start;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.contentContainerRow {
|
|
77
|
+
flex-direction: row;
|
|
78
|
+
gap: spaceXSmall;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.contentContainerColumn {
|
|
82
|
+
flex-direction: column;
|
|
83
|
+
gap: spaceXXSmall;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.actionContainer {
|
|
87
|
+
display: flex;
|
|
88
|
+
align-items: flex-start;
|
|
89
|
+
justify-content: flex-start;
|
|
90
|
+
gap: spaceXSmall;
|
|
91
|
+
}
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { InContextAlertWithMultipleActionsProps } from './InContextAlertWithMultipleActions';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
tags: string[];
|
|
5
|
+
title: string;
|
|
6
|
+
argTypes: {
|
|
7
|
+
actionText: {
|
|
8
|
+
name: string;
|
|
9
|
+
description: string;
|
|
10
|
+
control: {
|
|
11
|
+
type: string;
|
|
12
|
+
};
|
|
13
|
+
table: {
|
|
14
|
+
type: {
|
|
15
|
+
summary: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
onAction: {
|
|
20
|
+
name: string;
|
|
21
|
+
action: string;
|
|
22
|
+
description: string;
|
|
23
|
+
type: {
|
|
24
|
+
summary: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
actionTextColor: {
|
|
28
|
+
options: unknown[];
|
|
29
|
+
name: string;
|
|
30
|
+
description: string;
|
|
31
|
+
control: {
|
|
32
|
+
type: string;
|
|
33
|
+
};
|
|
34
|
+
table: {
|
|
35
|
+
type: {
|
|
36
|
+
summary: string;
|
|
37
|
+
};
|
|
38
|
+
defaultValue: {
|
|
39
|
+
summary: string;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
secondaryActionText: {
|
|
44
|
+
name: string;
|
|
45
|
+
description: string;
|
|
46
|
+
control: {
|
|
47
|
+
type: string;
|
|
48
|
+
};
|
|
49
|
+
table: {
|
|
50
|
+
type: {
|
|
51
|
+
summary: string;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
secondaryActionTextColor: {
|
|
56
|
+
options: unknown[];
|
|
57
|
+
name: string;
|
|
58
|
+
description: string;
|
|
59
|
+
control: {
|
|
60
|
+
type: string;
|
|
61
|
+
};
|
|
62
|
+
table: {
|
|
63
|
+
type: {
|
|
64
|
+
summary: string;
|
|
65
|
+
};
|
|
66
|
+
defaultValue: {
|
|
67
|
+
summary: string;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
onSecondaryAction: {
|
|
72
|
+
name: string;
|
|
73
|
+
description: string;
|
|
74
|
+
type: {
|
|
75
|
+
summary: string;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
semantic: {
|
|
79
|
+
options: unknown[];
|
|
80
|
+
description: string;
|
|
81
|
+
control: {
|
|
82
|
+
type: string;
|
|
83
|
+
};
|
|
84
|
+
table: {
|
|
85
|
+
type: {
|
|
86
|
+
summary: string;
|
|
87
|
+
};
|
|
88
|
+
defaultValue: {
|
|
89
|
+
summary: "neutral";
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
onCloseClick: {
|
|
94
|
+
name: string;
|
|
95
|
+
action: string;
|
|
96
|
+
description: string;
|
|
97
|
+
type: {
|
|
98
|
+
summary: string;
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
dismissable: {
|
|
102
|
+
description: string;
|
|
103
|
+
name: string;
|
|
104
|
+
options: boolean[];
|
|
105
|
+
control: string;
|
|
106
|
+
table: {
|
|
107
|
+
type: {
|
|
108
|
+
summary: string;
|
|
109
|
+
};
|
|
110
|
+
defaultValue: {
|
|
111
|
+
summary: boolean;
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
selfDismiss: {
|
|
116
|
+
description: string;
|
|
117
|
+
name: string;
|
|
118
|
+
options: boolean[];
|
|
119
|
+
control: string;
|
|
120
|
+
table: {
|
|
121
|
+
type: {
|
|
122
|
+
summary: string;
|
|
123
|
+
};
|
|
124
|
+
defaultValue: {
|
|
125
|
+
summary: boolean;
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
inline: {
|
|
130
|
+
description: string;
|
|
131
|
+
name: string;
|
|
132
|
+
options: boolean[];
|
|
133
|
+
control: string;
|
|
134
|
+
table: {
|
|
135
|
+
type: {
|
|
136
|
+
summary: string;
|
|
137
|
+
};
|
|
138
|
+
defaultValue: {
|
|
139
|
+
summary: boolean;
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
leftIconName: {
|
|
144
|
+
name: string;
|
|
145
|
+
control: {
|
|
146
|
+
type: string;
|
|
147
|
+
};
|
|
148
|
+
description: string;
|
|
149
|
+
table: {
|
|
150
|
+
type: {
|
|
151
|
+
summary: string;
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
leftIconType: {
|
|
156
|
+
description: string;
|
|
157
|
+
options: string[];
|
|
158
|
+
control: {
|
|
159
|
+
type: string;
|
|
160
|
+
};
|
|
161
|
+
table: {
|
|
162
|
+
type: {
|
|
163
|
+
summary: string;
|
|
164
|
+
};
|
|
165
|
+
defaultValue: {
|
|
166
|
+
summary: string;
|
|
167
|
+
};
|
|
168
|
+
};
|
|
169
|
+
};
|
|
170
|
+
children: {
|
|
171
|
+
description: string;
|
|
172
|
+
table: {
|
|
173
|
+
type: {
|
|
174
|
+
summary: string;
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
classNames: {
|
|
179
|
+
description: string;
|
|
180
|
+
control: {
|
|
181
|
+
type: string;
|
|
182
|
+
};
|
|
183
|
+
table: {
|
|
184
|
+
type: {
|
|
185
|
+
summary: string;
|
|
186
|
+
};
|
|
187
|
+
};
|
|
188
|
+
};
|
|
189
|
+
};
|
|
190
|
+
parameters: {
|
|
191
|
+
docs: {
|
|
192
|
+
subtitle: string;
|
|
193
|
+
description: {
|
|
194
|
+
component: string;
|
|
195
|
+
};
|
|
196
|
+
};
|
|
197
|
+
storySource: {
|
|
198
|
+
componentPath: string;
|
|
199
|
+
};
|
|
200
|
+
};
|
|
201
|
+
};
|
|
202
|
+
export default _default;
|
|
203
|
+
export declare const _Default: {
|
|
204
|
+
(args: InContextAlertWithMultipleActionsProps): React.JSX.Element;
|
|
205
|
+
args: {
|
|
206
|
+
children: string;
|
|
207
|
+
semantic: string;
|
|
208
|
+
leftIconName: string;
|
|
209
|
+
};
|
|
210
|
+
};
|
|
211
|
+
export declare const _Dismissable: {
|
|
212
|
+
(args: InContextAlertWithMultipleActionsProps): React.JSX.Element;
|
|
213
|
+
args: {
|
|
214
|
+
children: string;
|
|
215
|
+
semantic: string;
|
|
216
|
+
dismissable: boolean;
|
|
217
|
+
selfDismiss: boolean;
|
|
218
|
+
leftIconName: string;
|
|
219
|
+
};
|
|
220
|
+
};
|
|
221
|
+
export declare const _Actionable: {
|
|
222
|
+
(args: InContextAlertWithMultipleActionsProps): React.JSX.Element;
|
|
223
|
+
args: {
|
|
224
|
+
children: string;
|
|
225
|
+
semantic: string;
|
|
226
|
+
actionText: string;
|
|
227
|
+
};
|
|
228
|
+
};
|
|
229
|
+
export declare const _SecondaryAction: {
|
|
230
|
+
(args: InContextAlertWithMultipleActionsProps): React.JSX.Element;
|
|
231
|
+
args: {
|
|
232
|
+
children: string;
|
|
233
|
+
semantic: string;
|
|
234
|
+
actionText: string;
|
|
235
|
+
dismissable: boolean;
|
|
236
|
+
secondaryActionText: string;
|
|
237
|
+
};
|
|
238
|
+
};
|
|
239
|
+
export declare const _SecondaryWithWrapAction: {
|
|
240
|
+
(args: InContextAlertWithMultipleActionsProps): React.JSX.Element;
|
|
241
|
+
args: {
|
|
242
|
+
children: string;
|
|
243
|
+
semantic: string;
|
|
244
|
+
actionText: string;
|
|
245
|
+
dismissable: boolean;
|
|
246
|
+
secondaryActionText: string;
|
|
247
|
+
};
|
|
248
|
+
};
|
|
249
|
+
//# sourceMappingURL=InContextAlertWithMultipleActions.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InContextAlertWithMultipleActions.stories.d.ts","sourceRoot":"","sources":["../../../src/components/InContextAlertWithMultipleActions/InContextAlertWithMultipleActions.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,KAAK,EAAC,sCAAsC,EAAC,MAAM,qCAAqC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAShG,wBAyKE;AAEF,eAAO,MAAM,QAAQ;WAAU,sCAAsC;;;;;;CAIpE,CAAC;AASF,eAAO,MAAM,YAAY;WAAU,sCAAsC;;;;;;;;CAIxE,CAAC;AAWF,eAAO,MAAM,WAAW;WAAU,sCAAsC;;;;;;CAIvE,CAAC;AAQF,eAAO,MAAM,gBAAgB;WACrB,sCAAsC;;;;;;;;CAK7C,CAAC;AAUF,eAAO,MAAM,wBAAwB;WAC7B,sCAAsC;;;;;;;;CAK7C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/InContextAlertWithMultipleActions/index.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _InContextAlertWithMultipleActions = require("./InContextAlertWithMultipleActions");
|
|
7
|
+
Object.keys(_InContextAlertWithMultipleActions).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _InContextAlertWithMultipleActions[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _InContextAlertWithMultipleActions[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|