@spaced-out/ui-design-system 0.3.0 → 0.3.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
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
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.3.2](https://github.com/spaced-out/ui-design-system/compare/v0.3.1...v0.3.2) (2024-11-12)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* add status indicator on sub menu link ([#286](https://github.com/spaced-out/ui-design-system/issues/286)) ([325c1fe](https://github.com/spaced-out/ui-design-system/commit/325c1fec30151d9fbba39f85ddc72d6b4d2d9cfb))
|
|
11
|
+
|
|
12
|
+
### [0.3.1](https://github.com/spaced-out/ui-design-system/compare/v0.3.0...v0.3.1) (2024-11-11)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* padding of large chip ([#268](https://github.com/spaced-out/ui-design-system/issues/268)) ([e0fca89](https://github.com/spaced-out/ui-design-system/commit/e0fca89466992fa0cbe08e4557f32b518a12589b))
|
|
18
|
+
|
|
5
19
|
## [0.3.0](https://github.com/spaced-out/ui-design-system/compare/v0.2.10...v0.3.0) (2024-11-08)
|
|
6
20
|
|
|
7
21
|
|
|
@@ -10,6 +10,7 @@ var _Button = require("../Button");
|
|
|
10
10
|
var _ConditionalWrapper = require("../ConditionalWrapper");
|
|
11
11
|
var _Icon = require("../Icon");
|
|
12
12
|
var _Link = require("../Link");
|
|
13
|
+
var _StatusIndicator = require("../StatusIndicator");
|
|
13
14
|
var _Text = require("../Text");
|
|
14
15
|
var _Tooltip = require("../Tooltip");
|
|
15
16
|
var _SideMenuLinkModule = _interopRequireDefault(require("./SideMenuLink.module.css"));
|
|
@@ -182,6 +183,16 @@ const MENU_NAME_LIST = Object.freeze({
|
|
|
182
183
|
title: 'Voiceflow',
|
|
183
184
|
iconName: 'phone-volume',
|
|
184
185
|
iconType: 'duotone'
|
|
186
|
+
},
|
|
187
|
+
broadcast: {
|
|
188
|
+
title: 'Broadcast',
|
|
189
|
+
iconName: 'bullhorn',
|
|
190
|
+
iconType: 'duotone'
|
|
191
|
+
},
|
|
192
|
+
liveAgentTransfer: {
|
|
193
|
+
title: 'Live Agent Transfer',
|
|
194
|
+
iconName: 'user-headset',
|
|
195
|
+
iconType: 'duotone'
|
|
185
196
|
}
|
|
186
197
|
});
|
|
187
198
|
exports.MENU_NAME_LIST = MENU_NAME_LIST;
|
|
@@ -200,6 +211,7 @@ const SideMenuLink = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
200
211
|
rightSlot,
|
|
201
212
|
to,
|
|
202
213
|
customTitle,
|
|
214
|
+
status,
|
|
203
215
|
...restButtonProps
|
|
204
216
|
} = _ref;
|
|
205
217
|
const selected = selectedValue === pageNameKey;
|
|
@@ -236,13 +248,20 @@ const SideMenuLink = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
236
248
|
tabIndex: disabled || to !== undefined ? -1 : tabIndex,
|
|
237
249
|
disabled: disabled,
|
|
238
250
|
key: pageNameKey
|
|
239
|
-
}), pageNameKey && MENU_NAME_LIST[pageNameKey] ? /*#__PURE__*/React.createElement(
|
|
251
|
+
}), pageNameKey && MENU_NAME_LIST[pageNameKey] ? /*#__PURE__*/React.createElement("div", {
|
|
252
|
+
className: _SideMenuLinkModule.default.iconContainer
|
|
253
|
+
}, !opened && status && /*#__PURE__*/React.createElement(_StatusIndicator.StatusIndicator, {
|
|
254
|
+
status: status,
|
|
255
|
+
classNames: {
|
|
256
|
+
wrapper: _SideMenuLinkModule.default.statusIndicatorBlock
|
|
257
|
+
}
|
|
258
|
+
}), /*#__PURE__*/React.createElement(_Icon.Icon, {
|
|
240
259
|
type: MENU_NAME_LIST[pageNameKey].iconType,
|
|
241
260
|
name: MENU_NAME_LIST[pageNameKey].iconName,
|
|
242
261
|
size: "medium",
|
|
243
262
|
color: _Text.TEXT_COLORS.inverseSecondary,
|
|
244
263
|
className: _SideMenuLinkModule.default.menuIcon
|
|
245
|
-
}) : null, opened ? /*#__PURE__*/React.createElement("div", {
|
|
264
|
+
})) : null, opened ? /*#__PURE__*/React.createElement("div", {
|
|
246
265
|
className: _SideMenuLinkModule.default.menuLabelContainer
|
|
247
266
|
}, pageNameKey && MENU_NAME_LIST[pageNameKey] ? isGroupMenuLink ? /*#__PURE__*/React.createElement(_Text.SubTitleSmall, {
|
|
248
267
|
className: _SideMenuLinkModule.default.groupMenuLinkText
|
|
@@ -8,6 +8,8 @@ import {ConditionalWrapper} from '../ConditionalWrapper';
|
|
|
8
8
|
import {Icon} from '../Icon';
|
|
9
9
|
import type {BaseLinkProps} from '../Link';
|
|
10
10
|
import {Link} from '../Link';
|
|
11
|
+
import type {StatusSemanticType} from '../StatusIndicator';
|
|
12
|
+
import {StatusIndicator} from '../StatusIndicator';
|
|
11
13
|
import {BodyMedium, SubTitleSmall, TEXT_COLORS} from '../Text';
|
|
12
14
|
import type {BaseTooltipProps} from '../Tooltip';
|
|
13
15
|
import {Tooltip} from '../Tooltip';
|
|
@@ -181,6 +183,16 @@ export const MENU_NAME_LIST = Object.freeze({
|
|
|
181
183
|
iconName: 'phone-volume',
|
|
182
184
|
iconType: 'duotone',
|
|
183
185
|
},
|
|
186
|
+
broadcast: {
|
|
187
|
+
title: 'Broadcast',
|
|
188
|
+
iconName: 'bullhorn',
|
|
189
|
+
iconType: 'duotone',
|
|
190
|
+
},
|
|
191
|
+
liveAgentTransfer: {
|
|
192
|
+
title: 'Live Agent Transfer',
|
|
193
|
+
iconName: 'user-headset',
|
|
194
|
+
iconType: 'duotone',
|
|
195
|
+
},
|
|
184
196
|
});
|
|
185
197
|
|
|
186
198
|
type ClassNames = $ReadOnly<{wrapper?: string}>;
|
|
@@ -201,6 +213,7 @@ export type SideMenuLinkProps = {
|
|
|
201
213
|
to?: string,
|
|
202
214
|
rightSlot?: React.Node,
|
|
203
215
|
linkComponent?: React.AbstractComponent<BaseLinkProps, ?HTMLAnchorElement>,
|
|
216
|
+
status?: StatusSemanticType,
|
|
204
217
|
...
|
|
205
218
|
};
|
|
206
219
|
|
|
@@ -223,8 +236,10 @@ export const SideMenuLink: React$AbstractComponent<
|
|
|
223
236
|
rightSlot,
|
|
224
237
|
to,
|
|
225
238
|
customTitle,
|
|
239
|
+
status,
|
|
226
240
|
...restButtonProps
|
|
227
241
|
}: SideMenuLinkProps,
|
|
242
|
+
|
|
228
243
|
ref,
|
|
229
244
|
): React.Node => {
|
|
230
245
|
const selected = selectedValue === pageNameKey;
|
|
@@ -279,13 +294,23 @@ export const SideMenuLink: React$AbstractComponent<
|
|
|
279
294
|
key={pageNameKey}
|
|
280
295
|
>
|
|
281
296
|
{pageNameKey && MENU_NAME_LIST[pageNameKey] ? (
|
|
282
|
-
<
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
297
|
+
<div className={css.iconContainer}>
|
|
298
|
+
{!opened && status && (
|
|
299
|
+
<StatusIndicator
|
|
300
|
+
status={status}
|
|
301
|
+
classNames={{
|
|
302
|
+
wrapper: css.statusIndicatorBlock,
|
|
303
|
+
}}
|
|
304
|
+
/>
|
|
305
|
+
)}
|
|
306
|
+
<Icon
|
|
307
|
+
type={MENU_NAME_LIST[pageNameKey].iconType}
|
|
308
|
+
name={MENU_NAME_LIST[pageNameKey].iconName}
|
|
309
|
+
size="medium"
|
|
310
|
+
color={TEXT_COLORS.inverseSecondary}
|
|
311
|
+
className={css.menuIcon}
|
|
312
|
+
/>
|
|
313
|
+
</div>
|
|
289
314
|
) : null}
|
|
290
315
|
{opened ? (
|
|
291
316
|
<div className={css.menuLabelContainer}>
|
|
@@ -120,3 +120,14 @@
|
|
|
120
120
|
justify-content: space-between;
|
|
121
121
|
padding-right: spaceXSmall;
|
|
122
122
|
}
|
|
123
|
+
|
|
124
|
+
.iconContainer {
|
|
125
|
+
display: flex;
|
|
126
|
+
position: relative;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.statusIndicatorBlock {
|
|
130
|
+
position: absolute;
|
|
131
|
+
top: calc(spaceNone - (spaceXXSmall/2));
|
|
132
|
+
right: calc(spaceNone - (spaceXXSmall/2));
|
|
133
|
+
}
|