@stokr/components-library 2.3.65-beta.11 → 2.3.65-beta.12
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/components/Input/MultiSelect.js +10 -8
- package/dist/components/Input/TableFilterDropdown.js +210 -0
- package/dist/components/Payment/PaymentDetailsCard.js +5 -2
- package/dist/components/Snackbar/Snackbar.js +3 -0
- package/dist/components/Snackbar/Snackbar.styles.js +18 -9
- package/dist/components/StatusTag/StatusTag.js +19 -9
- package/dist/components/StatusTag/StatusTag.styles.js +4 -4
- package/dist/components/Timeline/Timeline.styles.js +1 -1
- package/dist/components/Timeline/TimelineStep.js +0 -1
- package/dist/static/images/filter-icon.svg +6 -0
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default = exports.MultiSelect = void 0;
|
|
6
|
+
exports.default = exports.OptionLabel = exports.MultiSelect = exports.CheckboxWrapperDiv = exports.CheckboxDiv = void 0;
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
9
|
var _reactSelect = _interopRequireWildcard(require("react-select"));
|
|
@@ -28,15 +28,17 @@ const CountBadge = _styledComponents.default.span.withConfig({
|
|
|
28
28
|
displayName: "MultiSelect__CountBadge",
|
|
29
29
|
componentId: "sc-1udb3q8-0"
|
|
30
30
|
})(["display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 6px;background-color:", ";color:", ";border-radius:10px;font-size:12px;font-weight:600;margin-left:8px;"], _colors.default.black, _colors.default.white);
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
|
|
32
|
+
// Exported for reuse in TableFilterDropdown
|
|
33
|
+
const CheckboxWrapperDiv = exports.CheckboxWrapperDiv = _styledComponents.default.div.withConfig({
|
|
34
|
+
displayName: "MultiSelect__CheckboxWrapperDiv",
|
|
33
35
|
componentId: "sc-1udb3q8-1"
|
|
34
36
|
})(["display:flex;align-items:center;padding:16px 12px;cursor:pointer;transition:background-color 0.15s ease;&:hover{background-color:", ";}"], _colors.default.grey);
|
|
35
|
-
const
|
|
36
|
-
displayName: "
|
|
37
|
+
const CheckboxDiv = exports.CheckboxDiv = _styledComponents.default.div.withConfig({
|
|
38
|
+
displayName: "MultiSelect__CheckboxDiv",
|
|
37
39
|
componentId: "sc-1udb3q8-2"
|
|
38
40
|
})(["width:14px;height:14px;border:1px solid ", ";border-radius:3px;margin-right:12px;display:flex;align-items:center;justify-content:center;background-color:", ";transition:all 0.15s ease;flex-shrink:0;svg{opacity:", ";transition:opacity 0.15s ease;width:8px;height:8px;}svg path{stroke:", ";}"], props => props.isSelected ? _colors.default.black : _colors.default.grey2, props => props.isSelected ? _colors.default.white : _colors.default.white, props => props.isSelected ? 1 : 0, _colors.default.blue);
|
|
39
|
-
const OptionLabel = _styledComponents.default.span.withConfig({
|
|
41
|
+
const OptionLabel = exports.OptionLabel = _styledComponents.default.span.withConfig({
|
|
40
42
|
displayName: "MultiSelect__OptionLabel",
|
|
41
43
|
componentId: "sc-1udb3q8-3"
|
|
42
44
|
})(["font-size:14px;color:", ";font-weight:400;letter-spacing:0.6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1;min-width:0;"], _colors.default.black);
|
|
@@ -53,9 +55,9 @@ const CheckboxOption = props => {
|
|
|
53
55
|
innerRef,
|
|
54
56
|
innerProps
|
|
55
57
|
} = props;
|
|
56
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
58
|
+
return /*#__PURE__*/_react.default.createElement(CheckboxWrapperDiv, _extends({
|
|
57
59
|
ref: innerRef
|
|
58
|
-
}, innerProps), /*#__PURE__*/_react.default.createElement(
|
|
60
|
+
}, innerProps), /*#__PURE__*/_react.default.createElement(CheckboxDiv, {
|
|
59
61
|
isSelected: isSelected
|
|
60
62
|
}, /*#__PURE__*/_react.default.createElement(_checkIcon.ReactComponent, null)), /*#__PURE__*/_react.default.createElement(OptionLabel, null, label));
|
|
61
63
|
};
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.TableFilterDropdown = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactDom = require("react-dom");
|
|
9
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
11
|
+
var _colors = _interopRequireDefault(require("../../styles/colors"));
|
|
12
|
+
var _checkIcon = require("../../static/images/check-icon.svg");
|
|
13
|
+
var _filterIcon = require("../../static/images/filter-icon.svg");
|
|
14
|
+
var _MultiSelect = require("./MultiSelect");
|
|
15
|
+
const _excluded = ["label", "options", "value", "onChange", "icon", "minWidth", "maxWidth", "menuAlign", "menuTop"];
|
|
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
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
19
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
20
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
21
|
+
// Trigger container - matches table header styling
|
|
22
|
+
const TriggerContainer = _styledComponents.default.div.withConfig({
|
|
23
|
+
displayName: "TableFilterDropdown__TriggerContainer",
|
|
24
|
+
componentId: "sc-z6x0ne-0"
|
|
25
|
+
})(["display:flex;align-items:center;justify-content:space-between;gap:8px;cursor:pointer;user-select:none;white-space:nowrap;"]);
|
|
26
|
+
const IconWrapper = _styledComponents.default.div.withConfig({
|
|
27
|
+
displayName: "TableFilterDropdown__IconWrapper",
|
|
28
|
+
componentId: "sc-z6x0ne-1"
|
|
29
|
+
})(["display:flex;align-items:center;justify-content:center;width:16px;height:16px;position:relative;svg{width:14px;height:14px;}svg path,svg line,svg circle,svg rect{stroke:currentColor;}"]);
|
|
30
|
+
|
|
31
|
+
// Active indicator dot
|
|
32
|
+
const ActiveDot = _styledComponents.default.div.withConfig({
|
|
33
|
+
displayName: "TableFilterDropdown__ActiveDot",
|
|
34
|
+
componentId: "sc-z6x0ne-2"
|
|
35
|
+
})(["position:absolute;top:-2px;right:-2px;width:6px;height:6px;background-color:", ";border-radius:50%;"], _colors.default.blue);
|
|
36
|
+
|
|
37
|
+
// Dropdown container
|
|
38
|
+
const DropdownContainer = _styledComponents.default.div.withConfig({
|
|
39
|
+
displayName: "TableFilterDropdown__DropdownContainer",
|
|
40
|
+
componentId: "sc-z6x0ne-3"
|
|
41
|
+
})(["position:relative;display:inline-block;"]);
|
|
42
|
+
|
|
43
|
+
// Dropdown menu - now rendered via portal with fixed positioning
|
|
44
|
+
const DropdownMenu = _styledComponents.default.div.withConfig({
|
|
45
|
+
displayName: "TableFilterDropdown__DropdownMenu",
|
|
46
|
+
componentId: "sc-z6x0ne-4"
|
|
47
|
+
})(["position:fixed;z-index:10000;min-width:150px;max-width:300px;background-color:", ";border-radius:8px;box-shadow:0 4px 12px rgba(0,0,0,0.15);border:1px solid ", ";overflow:hidden;"], _colors.default.white, _colors.default.lightGrey);
|
|
48
|
+
const OptionsList = _styledComponents.default.div.withConfig({
|
|
49
|
+
displayName: "TableFilterDropdown__OptionsList",
|
|
50
|
+
componentId: "sc-z6x0ne-5"
|
|
51
|
+
})(["max-height:300px;overflow-y:auto;"]);
|
|
52
|
+
const TableFilterDropdown = _ref => {
|
|
53
|
+
let {
|
|
54
|
+
label,
|
|
55
|
+
options,
|
|
56
|
+
value = [],
|
|
57
|
+
onChange,
|
|
58
|
+
icon: CustomIcon,
|
|
59
|
+
minWidth,
|
|
60
|
+
maxWidth,
|
|
61
|
+
menuAlign = 'left',
|
|
62
|
+
menuTop = 8
|
|
63
|
+
} = _ref,
|
|
64
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
65
|
+
const [isOpen, setIsOpen] = (0, _react.useState)(false);
|
|
66
|
+
const [menuPosition, setMenuPosition] = (0, _react.useState)({
|
|
67
|
+
top: 0,
|
|
68
|
+
left: 0
|
|
69
|
+
});
|
|
70
|
+
const containerRef = (0, _react.useRef)(null);
|
|
71
|
+
const triggerRef = (0, _react.useRef)(null);
|
|
72
|
+
const menuRef = (0, _react.useRef)(null);
|
|
73
|
+
const hasActiveFilters = value.length > 0;
|
|
74
|
+
|
|
75
|
+
// Calculate menu position based on trigger element
|
|
76
|
+
const updateMenuPosition = (0, _react.useCallback)(() => {
|
|
77
|
+
if (!triggerRef.current) return;
|
|
78
|
+
const triggerRect = triggerRef.current.getBoundingClientRect();
|
|
79
|
+
const menuWidth = minWidth || 150;
|
|
80
|
+
let left = triggerRect.left;
|
|
81
|
+
if (menuAlign === 'right') {
|
|
82
|
+
left = triggerRect.right - menuWidth;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// Ensure menu doesn't go off-screen horizontally
|
|
86
|
+
const viewportWidth = window.innerWidth;
|
|
87
|
+
if (left + menuWidth > viewportWidth - 10) {
|
|
88
|
+
left = viewportWidth - menuWidth - 10;
|
|
89
|
+
}
|
|
90
|
+
if (left < 10) {
|
|
91
|
+
left = 10;
|
|
92
|
+
}
|
|
93
|
+
setMenuPosition({
|
|
94
|
+
top: triggerRect.bottom + menuTop,
|
|
95
|
+
left: left
|
|
96
|
+
});
|
|
97
|
+
}, [menuAlign, menuTop, minWidth]);
|
|
98
|
+
|
|
99
|
+
// Update position when menu opens and on scroll/resize
|
|
100
|
+
(0, _react.useEffect)(() => {
|
|
101
|
+
if (isOpen) {
|
|
102
|
+
updateMenuPosition();
|
|
103
|
+
const handleScrollOrResize = () => {
|
|
104
|
+
updateMenuPosition();
|
|
105
|
+
};
|
|
106
|
+
window.addEventListener('scroll', handleScrollOrResize, true);
|
|
107
|
+
window.addEventListener('resize', handleScrollOrResize);
|
|
108
|
+
return () => {
|
|
109
|
+
window.removeEventListener('scroll', handleScrollOrResize, true);
|
|
110
|
+
window.removeEventListener('resize', handleScrollOrResize);
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
}, [isOpen, updateMenuPosition]);
|
|
114
|
+
|
|
115
|
+
// Close dropdown when clicking outside or pressing Escape
|
|
116
|
+
(0, _react.useEffect)(() => {
|
|
117
|
+
if (!isOpen) return;
|
|
118
|
+
const handleClickOutside = event => {
|
|
119
|
+
const clickedOutsideContainer = containerRef.current && !containerRef.current.contains(event.target);
|
|
120
|
+
const clickedOutsideMenu = menuRef.current && !menuRef.current.contains(event.target);
|
|
121
|
+
if (clickedOutsideContainer && clickedOutsideMenu) {
|
|
122
|
+
setIsOpen(false);
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
const handleEscape = event => {
|
|
126
|
+
if (event.key === 'Escape') {
|
|
127
|
+
setIsOpen(false);
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
document.addEventListener('mousedown', handleClickOutside);
|
|
131
|
+
document.addEventListener('keydown', handleEscape);
|
|
132
|
+
return () => {
|
|
133
|
+
document.removeEventListener('mousedown', handleClickOutside);
|
|
134
|
+
document.removeEventListener('keydown', handleEscape);
|
|
135
|
+
};
|
|
136
|
+
}, [isOpen]);
|
|
137
|
+
const handleTriggerClick = (0, _react.useCallback)(e => {
|
|
138
|
+
e.stopPropagation();
|
|
139
|
+
setIsOpen(prev => !prev);
|
|
140
|
+
}, []);
|
|
141
|
+
const handleOptionClick = (0, _react.useCallback)((optionValue, e) => {
|
|
142
|
+
e.stopPropagation();
|
|
143
|
+
const newValue = value.includes(optionValue) ? value.filter(v => v !== optionValue) : [...value, optionValue];
|
|
144
|
+
onChange === null || onChange === void 0 || onChange(newValue);
|
|
145
|
+
}, [value, onChange]);
|
|
146
|
+
const IconComponent = CustomIcon || _filterIcon.ReactComponent;
|
|
147
|
+
|
|
148
|
+
// Render menu in portal
|
|
149
|
+
const renderMenu = () => {
|
|
150
|
+
if (!isOpen) return null;
|
|
151
|
+
const menu = /*#__PURE__*/_react.default.createElement(DropdownMenu, {
|
|
152
|
+
ref: menuRef,
|
|
153
|
+
style: {
|
|
154
|
+
top: menuPosition.top,
|
|
155
|
+
left: menuPosition.left,
|
|
156
|
+
minWidth: minWidth || 150,
|
|
157
|
+
maxWidth: maxWidth || 300
|
|
158
|
+
}
|
|
159
|
+
}, /*#__PURE__*/_react.default.createElement(OptionsList, null, options.map(option => {
|
|
160
|
+
const isSelected = value.includes(option.value);
|
|
161
|
+
return /*#__PURE__*/_react.default.createElement(_MultiSelect.CheckboxWrapperDiv, {
|
|
162
|
+
key: option.value,
|
|
163
|
+
onClick: e => handleOptionClick(option.value, e)
|
|
164
|
+
}, /*#__PURE__*/_react.default.createElement(_MultiSelect.CheckboxDiv, {
|
|
165
|
+
isSelected: isSelected
|
|
166
|
+
}, /*#__PURE__*/_react.default.createElement(_checkIcon.ReactComponent, null)), /*#__PURE__*/_react.default.createElement(_MultiSelect.OptionLabel, null, option.label));
|
|
167
|
+
})));
|
|
168
|
+
return /*#__PURE__*/(0, _reactDom.createPortal)(menu, document.body);
|
|
169
|
+
};
|
|
170
|
+
return /*#__PURE__*/_react.default.createElement(DropdownContainer, _extends({
|
|
171
|
+
ref: containerRef
|
|
172
|
+
}, props), /*#__PURE__*/_react.default.createElement(TriggerContainer, {
|
|
173
|
+
ref: triggerRef,
|
|
174
|
+
onClick: handleTriggerClick,
|
|
175
|
+
"data-clickable": "true"
|
|
176
|
+
}, label && /*#__PURE__*/_react.default.createElement("span", null, label), /*#__PURE__*/_react.default.createElement(IconWrapper, null, /*#__PURE__*/_react.default.createElement(IconComponent, null), hasActiveFilters && /*#__PURE__*/_react.default.createElement(ActiveDot, null))), renderMenu());
|
|
177
|
+
};
|
|
178
|
+
exports.TableFilterDropdown = TableFilterDropdown;
|
|
179
|
+
TableFilterDropdown.propTypes = {
|
|
180
|
+
/** Label text displayed next to the filter icon */
|
|
181
|
+
label: _propTypes.default.string,
|
|
182
|
+
/** Array of options to display */
|
|
183
|
+
options: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
184
|
+
value: _propTypes.default.string.isRequired,
|
|
185
|
+
label: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.node]).isRequired
|
|
186
|
+
})).isRequired,
|
|
187
|
+
/** Array of selected values */
|
|
188
|
+
value: _propTypes.default.arrayOf(_propTypes.default.string),
|
|
189
|
+
/** Callback when selection changes: (newValues) => void */
|
|
190
|
+
onChange: _propTypes.default.func,
|
|
191
|
+
/** Custom icon component (defaults to FilterIcon) */
|
|
192
|
+
icon: _propTypes.default.elementType,
|
|
193
|
+
/** Minimum width of the dropdown menu */
|
|
194
|
+
minWidth: _propTypes.default.number,
|
|
195
|
+
/** Maximum width of the dropdown menu */
|
|
196
|
+
maxWidth: _propTypes.default.number,
|
|
197
|
+
/** Alignment of the dropdown menu */
|
|
198
|
+
menuAlign: _propTypes.default.oneOf(['left', 'right']),
|
|
199
|
+
/** Top offset for the dropdown menu in pixels (default: 8) */
|
|
200
|
+
menuTop: _propTypes.default.number
|
|
201
|
+
};
|
|
202
|
+
TableFilterDropdown.defaultProps = {
|
|
203
|
+
value: [],
|
|
204
|
+
onChange: () => {},
|
|
205
|
+
minWidth: 150,
|
|
206
|
+
maxWidth: 300,
|
|
207
|
+
menuAlign: 'left',
|
|
208
|
+
menuTop: 8
|
|
209
|
+
};
|
|
210
|
+
var _default = exports.default = TableFilterDropdown;
|
|
@@ -123,7 +123,8 @@ const PaymentDetailsCard = _ref2 => {
|
|
|
123
123
|
amountSection,
|
|
124
124
|
details,
|
|
125
125
|
infoSection,
|
|
126
|
-
showSeparators = true
|
|
126
|
+
showSeparators = true,
|
|
127
|
+
containerStyle
|
|
127
128
|
} = _ref2;
|
|
128
129
|
// Render amount section
|
|
129
130
|
const renderAmountSection = () => {
|
|
@@ -183,7 +184,9 @@ const PaymentDetailsCard = _ref2 => {
|
|
|
183
184
|
if (!infoSection) return null;
|
|
184
185
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, showSeparators && /*#__PURE__*/_react.default.createElement(Separator, null), /*#__PURE__*/_react.default.createElement(InfoSectionContainer, null, infoSection));
|
|
185
186
|
};
|
|
186
|
-
return /*#__PURE__*/_react.default.createElement(CardContainer,
|
|
187
|
+
return /*#__PURE__*/_react.default.createElement(CardContainer, {
|
|
188
|
+
style: containerStyle
|
|
189
|
+
}, title && /*#__PURE__*/_react.default.createElement(CardTitle, null, title), renderAmountSection(), renderDetailsSection(), renderInfoSection());
|
|
187
190
|
};
|
|
188
191
|
exports.PaymentDetailsCard = PaymentDetailsCard;
|
|
189
192
|
var _default = exports.default = PaymentDetailsCard;
|
|
@@ -123,10 +123,13 @@ const SnackbarItem = _ref => {
|
|
|
123
123
|
}
|
|
124
124
|
};
|
|
125
125
|
const displayIcon = icon !== undefined ? icon : defaultIcons[variant];
|
|
126
|
+
const isPermanent = duration === 'permanent' || duration === 0;
|
|
126
127
|
return /*#__PURE__*/_react.default.createElement(_Snackbar.SnackbarWrapper, {
|
|
127
128
|
$variant: variant,
|
|
128
129
|
$isExiting: isExiting,
|
|
129
130
|
$hasClick: !!onClick,
|
|
131
|
+
$duration: duration,
|
|
132
|
+
$isPermanent: isPermanent,
|
|
130
133
|
onClick: onClick ? handleClick : undefined
|
|
131
134
|
}, displayIcon && /*#__PURE__*/_react.default.createElement(_Snackbar.IconWrapper, {
|
|
132
135
|
$variant: variant
|
|
@@ -14,6 +14,9 @@ const slideInLeft = (0, _styledComponents.keyframes)(["from{opacity:0;transform:
|
|
|
14
14
|
const slideInUp = (0, _styledComponents.keyframes)(["from{opacity:0;transform:translateY(100%);}to{opacity:1;transform:translateY(0);}"]);
|
|
15
15
|
const slideInDown = (0, _styledComponents.keyframes)(["from{opacity:0;transform:translateY(-100%);}to{opacity:1;transform:translateY(0);}"]);
|
|
16
16
|
|
|
17
|
+
// Progress bar animation - shrinks from 100% to 0%
|
|
18
|
+
const progressExpire = (0, _styledComponents.keyframes)(["from{width:100%;}to{width:0%;}"]);
|
|
19
|
+
|
|
17
20
|
// Variant configurations
|
|
18
21
|
const variantStyles = exports.variantStyles = {
|
|
19
22
|
info: {
|
|
@@ -60,31 +63,37 @@ const SnackbarContainer = exports.SnackbarContainer = _styledComponents.default.
|
|
|
60
63
|
const SnackbarWrapper = exports.SnackbarWrapper = _styledComponents.default.div.withConfig({
|
|
61
64
|
displayName: "Snackbarstyles__SnackbarWrapper",
|
|
62
65
|
componentId: "sc-xf2wxi-1"
|
|
63
|
-
})(["display:flex;align-items:center;gap:12px;min-width:320px;max-width:480px;padding:12px 16px;background-color:", ";box-shadow:0 1px 2px -1px rgba(0,0,0,0.12);border-radius:6px;border:1px solid ", ";
|
|
64
|
-
var _variantStyles$$varia;
|
|
66
|
+
})(["position:relative;display:flex;align-items:center;gap:12px;min-width:320px;max-width:480px;padding:12px 16px;background-color:", ";box-shadow:0 1px 2px -1px rgba(0,0,0,0.12);border-radius:6px;border:1px solid ", ";pointer-events:auto;overflow:hidden;animation:", " 0.3s ease-out forwards;&::after{content:'';position:absolute;bottom:0;left:0;height:3px;background-color:", ";border-radius:0 0 0 6px;", "}", ""], _colors.default.white, _colors.default.grey, _ref3 => {
|
|
65
67
|
let {
|
|
66
|
-
$
|
|
68
|
+
$isExiting
|
|
67
69
|
} = _ref3;
|
|
68
|
-
return
|
|
70
|
+
return $isExiting ? slideOut : 'none';
|
|
69
71
|
}, _ref4 => {
|
|
72
|
+
var _variantStyles$$varia;
|
|
70
73
|
let {
|
|
71
|
-
$
|
|
74
|
+
$variant
|
|
72
75
|
} = _ref4;
|
|
73
|
-
return $
|
|
76
|
+
return ((_variantStyles$$varia = variantStyles[$variant]) === null || _variantStyles$$varia === void 0 ? void 0 : _variantStyles$$varia.borderColor) || _colors.default.blue;
|
|
74
77
|
}, _ref5 => {
|
|
75
78
|
let {
|
|
76
|
-
$
|
|
79
|
+
$duration,
|
|
80
|
+
$isPermanent
|
|
77
81
|
} = _ref5;
|
|
82
|
+
return $isPermanent ? (0, _styledComponents.css)(["width:100%;"]) : (0, _styledComponents.css)(["animation:", " ", "ms linear forwards;"], progressExpire, $duration);
|
|
83
|
+
}, _ref6 => {
|
|
84
|
+
let {
|
|
85
|
+
$hasClick
|
|
86
|
+
} = _ref6;
|
|
78
87
|
return $hasClick && (0, _styledComponents.css)(["cursor:pointer;&:hover{box-shadow:0 4px 24px rgba(0,0,0,0.16);}"]);
|
|
79
88
|
});
|
|
80
89
|
const IconWrapper = exports.IconWrapper = _styledComponents.default.div.withConfig({
|
|
81
90
|
displayName: "Snackbarstyles__IconWrapper",
|
|
82
91
|
componentId: "sc-xf2wxi-2"
|
|
83
|
-
})(["flex-shrink:0;display:flex;align-items:center;justify-content:center;width:20px;height:20px;color:", ";svg{width:100%;height:100%;}"],
|
|
92
|
+
})(["flex-shrink:0;display:flex;align-items:center;justify-content:center;width:20px;height:20px;color:", ";svg{width:100%;height:100%;}"], _ref7 => {
|
|
84
93
|
var _variantStyles$$varia2;
|
|
85
94
|
let {
|
|
86
95
|
$variant
|
|
87
|
-
} =
|
|
96
|
+
} = _ref7;
|
|
88
97
|
return ((_variantStyles$$varia2 = variantStyles[$variant]) === null || _variantStyles$$varia2 === void 0 ? void 0 : _variantStyles$$varia2.iconColor) || _colors.default.blue;
|
|
89
98
|
});
|
|
90
99
|
const Message = exports.Message = _styledComponents.default.div.withConfig({
|
|
@@ -14,7 +14,7 @@ var _documentIcon = require("../../static/images/document-icon.svg");
|
|
|
14
14
|
var _transferIcon = require("../../static/images/transfer-icon.svg");
|
|
15
15
|
var _colors = _interopRequireDefault(require("../../styles/colors"));
|
|
16
16
|
var _StatusTag = require("./StatusTag.styles");
|
|
17
|
-
const _excluded = ["variant", "icon", "text", "tooltip", "tooltipProps", "iconColor", "hoverColor", "disableHoverColor", "minWidth", "className", "containerStyle", "iconStyle", "textStyle", "onClick", "center"];
|
|
17
|
+
const _excluded = ["variant", "icon", "text", "tooltip", "tooltipProps", "iconColor", "hoverColor", "disableHoverColor", "colorActive", "minWidth", "className", "containerStyle", "iconStyle", "textStyle", "onClick", "center"];
|
|
18
18
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
19
19
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
20
20
|
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
@@ -23,24 +23,28 @@ const PaidIcon = _ref => {
|
|
|
23
23
|
let {
|
|
24
24
|
iconColor,
|
|
25
25
|
hoverColor,
|
|
26
|
-
disableHoverColor
|
|
26
|
+
disableHoverColor,
|
|
27
|
+
colorActive
|
|
27
28
|
} = _ref;
|
|
28
29
|
return /*#__PURE__*/_react.default.createElement(_StatusTag.PaidIconWrapper, {
|
|
29
30
|
iconColor: iconColor,
|
|
30
31
|
hoverColor: hoverColor,
|
|
31
|
-
disableHoverColor: disableHoverColor
|
|
32
|
+
disableHoverColor: disableHoverColor,
|
|
33
|
+
colorActive: colorActive
|
|
32
34
|
}, /*#__PURE__*/_react.default.createElement(_checkIcon.ReactComponent, null));
|
|
33
35
|
};
|
|
34
36
|
const DeclinedIcon = _ref2 => {
|
|
35
37
|
let {
|
|
36
38
|
iconColor,
|
|
37
39
|
hoverColor,
|
|
38
|
-
disableHoverColor
|
|
40
|
+
disableHoverColor,
|
|
41
|
+
colorActive
|
|
39
42
|
} = _ref2;
|
|
40
43
|
return /*#__PURE__*/_react.default.createElement(_StatusTag.DeclinedIconWrapper, {
|
|
41
44
|
iconColor: iconColor,
|
|
42
45
|
hoverColor: hoverColor,
|
|
43
|
-
disableHoverColor: disableHoverColor
|
|
46
|
+
disableHoverColor: disableHoverColor,
|
|
47
|
+
colorActive: colorActive
|
|
44
48
|
}, /*#__PURE__*/_react.default.createElement(_crossIcon.ReactComponent, null));
|
|
45
49
|
};
|
|
46
50
|
|
|
@@ -74,10 +78,11 @@ const variantConfig = {
|
|
|
74
78
|
disableHoverColor: false
|
|
75
79
|
},
|
|
76
80
|
declined: {
|
|
77
|
-
icon: (iconColor, hoverColor, disableHoverColor) => /*#__PURE__*/_react.default.createElement(DeclinedIcon, {
|
|
81
|
+
icon: (iconColor, hoverColor, disableHoverColor, colorActive) => /*#__PURE__*/_react.default.createElement(DeclinedIcon, {
|
|
78
82
|
iconColor: iconColor,
|
|
79
83
|
hoverColor: hoverColor,
|
|
80
|
-
disableHoverColor: disableHoverColor
|
|
84
|
+
disableHoverColor: disableHoverColor,
|
|
85
|
+
colorActive: colorActive
|
|
81
86
|
}),
|
|
82
87
|
iconColor: _colors.default.grey2,
|
|
83
88
|
hoverColor: _colors.default.darkRed,
|
|
@@ -111,6 +116,7 @@ const StatusTag = _ref3 => {
|
|
|
111
116
|
iconColor,
|
|
112
117
|
hoverColor,
|
|
113
118
|
disableHoverColor,
|
|
119
|
+
colorActive,
|
|
114
120
|
minWidth,
|
|
115
121
|
className,
|
|
116
122
|
containerStyle,
|
|
@@ -135,7 +141,7 @@ const StatusTag = _ref3 => {
|
|
|
135
141
|
} else if (variantData !== null && variantData !== void 0 && variantData.icon) {
|
|
136
142
|
if (typeof variantData.icon === 'function') {
|
|
137
143
|
// Icon is a function (paid/declined) - pass color props
|
|
138
|
-
finalIcon = variantData.icon(finalIconColor, finalHoverColor, finalDisableHoverColor);
|
|
144
|
+
finalIcon = variantData.icon(finalIconColor, finalHoverColor, finalDisableHoverColor, colorActive);
|
|
139
145
|
} else {
|
|
140
146
|
// Icon is a React element (pending/initiated/confirmed)
|
|
141
147
|
finalIcon = variantData.icon;
|
|
@@ -153,10 +159,14 @@ const StatusTag = _ref3 => {
|
|
|
153
159
|
iconColor: finalIconColor,
|
|
154
160
|
hoverColor: finalHoverColor,
|
|
155
161
|
disableHoverColor: finalDisableHoverColor,
|
|
162
|
+
colorActive: colorActive,
|
|
156
163
|
style: iconStyle,
|
|
157
164
|
isCustomIcon: typeof (variantData === null || variantData === void 0 ? void 0 : variantData.icon) === 'function'
|
|
158
165
|
}, finalIcon), text && /*#__PURE__*/_react.default.createElement(_StatusTag.StatusText, {
|
|
159
|
-
style: textStyle
|
|
166
|
+
style: textStyle,
|
|
167
|
+
hoverColor: finalHoverColor,
|
|
168
|
+
disableHoverColor: finalDisableHoverColor,
|
|
169
|
+
colorActive: colorActive
|
|
160
170
|
}, text)));
|
|
161
171
|
|
|
162
172
|
// Wrap with InfoIcon tooltip if tooltip is provided
|
|
@@ -18,20 +18,20 @@ const StatusTagWrapper = exports.StatusTagWrapper = _styledComponents.default.di
|
|
|
18
18
|
const IconWrapper = exports.IconWrapper = _styledComponents.default.div.withConfig({
|
|
19
19
|
displayName: "StatusTagstyles__IconWrapper",
|
|
20
20
|
componentId: "sc-24azs1-2"
|
|
21
|
-
})(["display:flex;align-items:center;justify-content:center;flex-shrink:0;width:12px;height:12px;color:", ";transition:color 0.2s ease;svg{width:100%;height:100%;display:block;}", " ", ""], props => props.iconColor || _colors.default.grey2, props => !props.isCustomIcon && "\n svg path,\n svg circle,\n svg rect,\n svg line {\n ".concat(!props.disableHoverColor ? "fill: currentColor;" : '', "\n }\n "), props => !props.disableHoverColor && props.hoverColor && "\n ".concat(StatusTagContainer, ":hover & {\n color: ").concat(props.hoverColor, ";\n }\n "));
|
|
21
|
+
})(["display:flex;align-items:center;justify-content:center;flex-shrink:0;width:12px;height:12px;color:", ";transition:color 0.2s ease;svg{width:100%;height:100%;display:block;}", " ", ""], props => props.colorActive && props.hoverColor ? props.hoverColor : props.iconColor || _colors.default.grey2, props => !props.isCustomIcon && "\n svg path,\n svg circle,\n svg rect,\n svg line {\n ".concat(!props.disableHoverColor ? "fill: currentColor;" : '', "\n }\n "), props => !props.disableHoverColor && !props.colorActive && props.hoverColor && "\n ".concat(StatusTagContainer, ":hover & {\n color: ").concat(props.hoverColor, ";\n }\n "));
|
|
22
22
|
const StatusText = exports.StatusText = _styledComponents.default.span.withConfig({
|
|
23
23
|
displayName: "StatusTagstyles__StatusText",
|
|
24
24
|
componentId: "sc-24azs1-3"
|
|
25
|
-
})(["font-size:12px;font-weight:600;line-height:18px;color:", ";letter-spacing:0.6px;"], _colors.default.black);
|
|
25
|
+
})(["font-size:12px;font-weight:600;line-height:18px;color:", ";letter-spacing:0.6px;transition:color 0.2s ease;", ""], props => props.colorActive && props.hoverColor ? props.hoverColor : _colors.default.black, props => !props.disableHoverColor && !props.colorActive && props.hoverColor && "\n ".concat(StatusTagContainer, ":hover & {\n color: ").concat(props.hoverColor, ";\n }\n "));
|
|
26
26
|
|
|
27
27
|
// Paid icon wrapper (check + green circle)
|
|
28
28
|
const PaidIconWrapper = exports.PaidIconWrapper = _styledComponents.default.div.withConfig({
|
|
29
29
|
displayName: "StatusTagstyles__PaidIconWrapper",
|
|
30
30
|
componentId: "sc-24azs1-4"
|
|
31
|
-
})(["width:12px;height:12px;border-radius:50%;background-color:", ";display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:background-color 0.2s ease;svg{width:8px;height:8px;}svg path{stroke:", ";}", ""], props => props.iconColor || _colors.default.grey2, _colors.default.white, props => !props.disableHoverColor && props.hoverColor && "\n ".concat(StatusTagContainer, ":hover & {\n background-color: ").concat(props.hoverColor, ";\n }\n "));
|
|
31
|
+
})(["width:12px;height:12px;border-radius:50%;background-color:", ";display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:background-color 0.2s ease;svg{width:8px;height:8px;}svg path{stroke:", ";}", ""], props => props.colorActive && props.hoverColor ? props.hoverColor : props.iconColor || _colors.default.grey2, _colors.default.white, props => !props.disableHoverColor && !props.colorActive && props.hoverColor && "\n ".concat(StatusTagContainer, ":hover & {\n background-color: ").concat(props.hoverColor, ";\n }\n "));
|
|
32
32
|
|
|
33
33
|
// Declined icon wrapper (cross + red circle)
|
|
34
34
|
const DeclinedIconWrapper = exports.DeclinedIconWrapper = _styledComponents.default.div.withConfig({
|
|
35
35
|
displayName: "StatusTagstyles__DeclinedIconWrapper",
|
|
36
36
|
componentId: "sc-24azs1-5"
|
|
37
|
-
})(["width:12px;height:12px;border-radius:50%;background-color:", ";display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:background-color 0.2s ease;svg{width:6px;height:6px;}svg path{stroke:", ";}", ""], props => props.iconColor || _colors.default.grey2, _colors.default.white, props => !props.disableHoverColor && props.hoverColor && "\n ".concat(StatusTagContainer, ":hover & {\n background-color: ").concat(props.hoverColor, ";\n }\n "));
|
|
37
|
+
})(["width:12px;height:12px;border-radius:50%;background-color:", ";display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:background-color 0.2s ease;svg{width:6px;height:6px;}svg path{stroke:", ";}", ""], props => props.colorActive && props.hoverColor ? props.hoverColor : props.iconColor || _colors.default.grey2, _colors.default.white, props => !props.disableHoverColor && !props.colorActive && props.hoverColor && "\n ".concat(StatusTagContainer, ":hover & {\n background-color: ").concat(props.hoverColor, ";\n }\n "));
|
|
@@ -48,7 +48,7 @@ const ConnectingLine = exports.ConnectingLine = _styledComponents.default.div.wi
|
|
|
48
48
|
const StepContent = exports.StepContent = _styledComponents.default.div.withConfig({
|
|
49
49
|
displayName: "Timelinestyles__StepContent",
|
|
50
50
|
componentId: "sc-1anwsc5-5"
|
|
51
|
-
})(["flex:1;padding-bottom:
|
|
51
|
+
})(["flex:1;padding-bottom:8px;display:flex;flex-direction:column;gap:4px;"]);
|
|
52
52
|
const StepHeader = exports.StepHeader = _styledComponents.default.div.withConfig({
|
|
53
53
|
displayName: "Timelinestyles__StepHeader",
|
|
54
54
|
componentId: "sc-1anwsc5-6"
|
|
@@ -70,7 +70,6 @@ const TimelineStep = _ref => {
|
|
|
70
70
|
state: state,
|
|
71
71
|
nextState: nextState
|
|
72
72
|
})), /*#__PURE__*/_react.default.createElement(_Timeline.StepContent, {
|
|
73
|
-
hasCaption: !!caption,
|
|
74
73
|
style: contentStyle
|
|
75
74
|
}, formattedDate && /*#__PURE__*/_react.default.createElement(_Timeline.StepDate, null, formattedDate), /*#__PURE__*/_react.default.createElement(_Timeline.StepHeader, null, /*#__PURE__*/_react.default.createElement(_Timeline.StepTitle, {
|
|
76
75
|
state: state,
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M1.75 3.5H12.25" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
|
|
3
|
+
<path d="M3.5 7H10.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
|
|
4
|
+
<path d="M5.25 10.5H8.75" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
|
|
5
|
+
</svg>
|
|
6
|
+
|