@synerise/ds-manageable-list 2.1.8 → 2.2.0
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 +19 -0
- package/dist/Item/BlankItem/BlankItem.js +2 -4
- package/dist/Item/BlankItem/BlankItem.styles.js +7 -6
- package/dist/Item/ContentItem/ContentItem.styles.js +15 -29
- package/dist/Item/ContentItem/ContentItemHeader.js +2 -4
- package/dist/Item/FilterItem/FilterItem.js +6 -8
- package/dist/Item/FilterItem/FilterItem.styles.js +3 -5
- package/dist/Item/Item.styles.js +7 -19
- package/dist/Item/ItemActions/ItemActions.js +4 -6
- package/dist/Item/ItemActions/ItemActions.styles.js +1 -3
- package/dist/Item/ItemMeta/ItemMeta.styles.js +1 -1
- package/dist/Item/ItemName/ItemName.js +1 -1
- package/dist/ManageableList.styles.js +1 -1
- package/package.json +18 -18
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [2.2.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-manageable-list@2.1.9...@synerise/ds-manageable-list@2.2.0) (2026-10-29)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* integrate Token Studio design tokens across the design system ([aabb447](https://github.com/Synerise/synerise-design/commit/aabb447edfb2d0c85e3de1f07e809ef84083453b))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [2.1.9](https://github.com/Synerise/synerise-design/compare/@synerise/ds-manageable-list@2.1.8...@synerise/ds-manageable-list@2.1.9) (2026-10-28)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @synerise/ds-manageable-list
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
## [2.1.8](https://github.com/Synerise/synerise-design/compare/@synerise/ds-manageable-list@2.1.7...@synerise/ds-manageable-list@2.1.8) (2026-10-26)
|
|
7
26
|
|
|
8
27
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback } from "react";
|
|
3
|
-
import { useTheme } from "@synerise/ds-core";
|
|
4
3
|
import Icon, { DragHandleM, DuplicateS, CloseS } from "@synerise/ds-icon";
|
|
5
4
|
import Tooltip from "@synerise/ds-tooltip";
|
|
6
5
|
import { useTexts } from "../../hooks/useTexts.js";
|
|
@@ -18,7 +17,6 @@ const BlankItem = ({
|
|
|
18
17
|
dragHandleProps,
|
|
19
18
|
...rest
|
|
20
19
|
}) => {
|
|
21
|
-
const theme = useTheme();
|
|
22
20
|
const allTexts = useTexts(texts);
|
|
23
21
|
const handleRemove = useCallback((event) => {
|
|
24
22
|
event.stopPropagation();
|
|
@@ -42,8 +40,8 @@ const BlankItem = ({
|
|
|
42
40
|
(draggable || isDragOverlay) && /* @__PURE__ */ jsx(DragHandle, { ...dragHandleProps, children: /* @__PURE__ */ jsx(Icon, { size: 24, component: /* @__PURE__ */ jsx(DragHandleM, { color: "currentColor" }) }) }),
|
|
43
41
|
/* @__PURE__ */ jsx(BlankItemContent, { children: renderItem(item) }),
|
|
44
42
|
(onRemove || onDuplicate) && /* @__PURE__ */ jsxs(BlankItemActions, { children: [
|
|
45
|
-
onDuplicate && /* @__PURE__ */ jsx(Tooltip, { type: "default", trigger: "hover", title: allTexts.itemActionDuplicateTooltip, children: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(DuplicateS, {}),
|
|
46
|
-
onRemove && /* @__PURE__ */ jsx(Tooltip, { type: "default", trigger: "hover", title: allTexts.itemActionDeleteTooltip, children: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(CloseS, {}), size: 24, color:
|
|
43
|
+
onDuplicate && /* @__PURE__ */ jsx(Tooltip, { type: "default", trigger: "hover", title: allTexts.itemActionDuplicateTooltip, children: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(DuplicateS, {}), size: 24, onClick: handleDuplicate }) }),
|
|
44
|
+
onRemove && /* @__PURE__ */ jsx(Tooltip, { type: "default", trigger: "hover", title: allTexts.itemActionDeleteTooltip, children: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(CloseS, {}), size: 24, color: "var(--ds-color-icon-danger-default)", onClick: handleRemove }) })
|
|
47
45
|
] })
|
|
48
46
|
] }, item.id);
|
|
49
47
|
};
|
|
@@ -1,26 +1,27 @@
|
|
|
1
1
|
import styled from "styled-components";
|
|
2
|
+
import { IconContainer } from "@synerise/ds-icon";
|
|
2
3
|
const BlankItemActions = /* @__PURE__ */ styled.div.withConfig({
|
|
3
4
|
displayName: "BlankItemstyles__BlankItemActions",
|
|
4
5
|
componentId: "sc-19vgbbk-0"
|
|
5
|
-
})(["opacity:0;flex:0 1 auto;transition:opacity 0.2s;
|
|
6
|
+
})(["opacity:0;flex:0 1 auto;transition:opacity 0.2s;", "{color:var(--ds-color-icon-base-default);&:hover{color:var(--ds-color-icon-brand-default);}}"], IconContainer);
|
|
6
7
|
const DragHandle = /* @__PURE__ */ styled.div.withConfig({
|
|
7
8
|
displayName: "BlankItemstyles__DragHandle",
|
|
8
9
|
componentId: "sc-19vgbbk-1"
|
|
9
|
-
})(["flex:0 1 auto;cursor:grab;
|
|
10
|
+
})(["flex:0 1 auto;cursor:grab;color:var(--ds-color-icon-base-muted);&:hover{color:var(--ds-color-icon-base-default);}"]);
|
|
10
11
|
const BlankItemWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
11
12
|
displayName: "BlankItemstyles__BlankItemWrapper",
|
|
12
13
|
componentId: "sc-19vgbbk-2"
|
|
13
14
|
})(["", " ", " display:flex;align-items:center;justify-content:space-between;margin-bottom:", "px;&:hover{", "{opacity:1;}}"], (props) => props.isDragPlaceholder && `
|
|
14
|
-
background:
|
|
15
|
-
border: 1px dashed
|
|
15
|
+
background: var(--ds-color-background-brand-subtle);
|
|
16
|
+
border: 1px dashed var(--ds-color-border-brand-strong);
|
|
16
17
|
border-radius: 3px;
|
|
17
18
|
${BlankItemContent}, ${BlankItemActions}, ${DragHandle} {
|
|
18
19
|
visibility: hidden;
|
|
19
20
|
opacity: 0;
|
|
20
21
|
}
|
|
21
22
|
`, (props) => props.isDragOverlay && `
|
|
22
|
-
box-shadow:
|
|
23
|
-
background:
|
|
23
|
+
box-shadow: var(--ds-shadows-shadow-2);
|
|
24
|
+
background: var(--ds-color-background-base-default);
|
|
24
25
|
`, (props) => props.rowGap, BlankItemActions);
|
|
25
26
|
const BlankItemContent = /* @__PURE__ */ styled.div.withConfig({
|
|
26
27
|
displayName: "BlankItemstyles__BlankItemContent",
|
|
@@ -4,7 +4,7 @@ import { Tag } from "@synerise/ds-tag/dist/Tag.styles";
|
|
|
4
4
|
import { ItemLabel } from "../Item.styles.js";
|
|
5
5
|
import { ItemActionsWrapper } from "../ItemActions/ItemActions.styles.js";
|
|
6
6
|
import { ItemMeta } from "../ItemMeta/ItemMeta.styles.js";
|
|
7
|
-
const dashedStyle = (
|
|
7
|
+
const dashedStyle = () => css(["&&{box-shadow:0 0 0 0 transparent;border:1px dashed var(--ds-color-border-base-strong);}&&:hover{border:1px dashed var(--ds-color-border-base-stronghover);}"]);
|
|
8
8
|
const AdditionalSuffix = /* @__PURE__ */ styled.div.withConfig({
|
|
9
9
|
displayName: "ContentItemstyles__AdditionalSuffix",
|
|
10
10
|
componentId: "sc-13pyu4r-0"
|
|
@@ -14,7 +14,7 @@ const DraggerWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
|
14
14
|
componentId: "sc-13pyu4r-1"
|
|
15
15
|
})(["cursor:pointer;display:flex;opacity:", ";"], ({
|
|
16
16
|
disabled
|
|
17
|
-
}) => disabled ? "
|
|
17
|
+
}) => disabled ? "var(--ds-opacity-disabled)" : "1");
|
|
18
18
|
const IconWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
19
19
|
displayName: "ContentItemstyles__IconWrapper",
|
|
20
20
|
componentId: "sc-13pyu4r-2"
|
|
@@ -26,56 +26,42 @@ const MoveItemButtons = /* @__PURE__ */ styled.div.withConfig({
|
|
|
26
26
|
const ItemHeaderPrefix = /* @__PURE__ */ styled.div.withConfig({
|
|
27
27
|
displayName: "ContentItemstyles__ItemHeaderPrefix",
|
|
28
28
|
componentId: "sc-13pyu4r-4"
|
|
29
|
-
})(["display:flex;flex-direction:row;align-items:center;justify-content:flex-start;", "{margin:0;}", "{
|
|
30
|
-
theme
|
|
31
|
-
}) => theme.palette["grey-400"], ({
|
|
32
|
-
theme
|
|
33
|
-
}) => theme.palette["grey-400"]);
|
|
29
|
+
})(["display:flex;flex-direction:row;align-items:center;justify-content:flex-start;", "{margin:0;}", "{color:var(--ds-color-icon-base-muted);}"], Tag, DraggerWrapper);
|
|
34
30
|
const ItemHeaderSuffix = /* @__PURE__ */ styled.div.withConfig({
|
|
35
31
|
displayName: "ContentItemstyles__ItemHeaderSuffix",
|
|
36
32
|
componentId: "sc-13pyu4r-5"
|
|
37
|
-
})(["display:flex;flex-direction:row;align-items:center;justify-content:flex-start;.ds-dropdown-trigger{cursor:pointer;
|
|
33
|
+
})(["display:flex;flex-direction:row;align-items:center;justify-content:flex-start;.ds-dropdown-trigger{cursor:pointer;.ds-icon{color:var(--ds-color-icon-base-default);transition:color 0.3s ease;}&:hover{.ds-icon{color:var(--ds-color-icon-brand-default);}}}"]);
|
|
38
34
|
const ItemHeader = /* @__PURE__ */ styled.div.withConfig({
|
|
39
35
|
displayName: "ContentItemstyles__ItemHeader",
|
|
40
36
|
componentId: "sc-13pyu4r-6"
|
|
41
|
-
})(["display:flex;flex-direction:row;align-items:center;justify-content:stretch;width:100%;padding:12px;cursor:pointer;max-height:48px;position:relative;", " ", "{gap:", "px;}gap:", "px;", " ", "{padding:0;}&:hover{.suffix--hide-on-hover{display:none;}", "{color:
|
|
42
|
-
theme
|
|
43
|
-
}) => theme.palette["grey-800"], ItemActionsWrapper, DraggerWrapper, ({
|
|
44
|
-
theme
|
|
45
|
-
}) => theme.palette["grey-600"], ({
|
|
46
|
-
theme
|
|
47
|
-
}) => theme.palette["grey-600"], MoveItemButtons);
|
|
37
|
+
})(["display:flex;flex-direction:row;align-items:center;justify-content:stretch;width:100%;padding:12px;cursor:pointer;max-height:48px;position:relative;", " ", "{gap:", "px;}gap:", "px;", " ", "{padding:0;}&:hover{.suffix--hide-on-hover{display:none;}", "{color:var(--ds-color-text-base-default);}", "{display:flex;}", "{color:var(--ds-color-icon-base-default);}", "{display:flex;}}"], (props) => props.size === "large" && css(["", " ", "{position:absolute;left:0;}"], props.hasDescription && "align-items: flex-start;", DraggerWrapper), ItemHeaderPrefix, (props) => props.size === "large" ? 16 : 12, (props) => props.size === "large" ? 16 : 12, (props) => !props.hasPrefix && `padding-left:16px;`, ItemMeta, ItemLabel, ItemActionsWrapper, DraggerWrapper, MoveItemButtons);
|
|
48
38
|
const ContentWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
49
39
|
displayName: "ContentItemstyles__ContentWrapper",
|
|
50
40
|
componentId: "sc-13pyu4r-7"
|
|
51
|
-
})(["padding:", ";width:100%;border-top:1px solid
|
|
52
|
-
theme
|
|
53
|
-
}) => theme.palette["grey-200"]);
|
|
41
|
+
})(["padding:", ";width:100%;border-top:1px solid var(--ds-color-border-base-default);opacity:1;"], (props) => props.withoutPadding ? "0px" : "16px 24px 24px");
|
|
54
42
|
const standardShadow = ({
|
|
55
|
-
greyBackground
|
|
56
|
-
theme
|
|
43
|
+
greyBackground
|
|
57
44
|
}) => {
|
|
58
|
-
return greyBackground ? "
|
|
45
|
+
return greyBackground ? "var(--ds-shadows-shadow-1)" : `0 0 0 1px var(--ds-color-border-base-default)`;
|
|
59
46
|
};
|
|
60
47
|
const ItemContainer = /* @__PURE__ */ styled.div.withConfig({
|
|
61
48
|
displayName: "ContentItemstyles__ItemContainer",
|
|
62
49
|
componentId: "sc-13pyu4r-8"
|
|
63
50
|
})(["width:100%;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;margin-bottom:16px;border-radius:3px;position:relative;", " ", " ", " ", " ", " && .item-content-animation{width:100%;}", " ", ""], (props) => props.selected && `
|
|
64
|
-
outline: 2px solid
|
|
65
|
-
`, (props) => props.isDragOverlay ? `box-shadow: ${standardShadow(props)},
|
|
66
|
-
` : css(["box-shadow:", ";"], standardShadow(props)), (props) => props.isDragPlaceholder ? css(["background-color:
|
|
67
|
-
opacity:
|
|
51
|
+
outline: 2px solid var(--ds-color-border-brand-default) !important;
|
|
52
|
+
`, (props) => props.isDragOverlay ? `box-shadow: ${standardShadow(props)}, var(--ds-shadows-shadow-2);
|
|
53
|
+
` : css(["box-shadow:", ";"], standardShadow(props)), (props) => props.isDragPlaceholder ? css(["background-color:var(--ds-color-background-brand-subtle);outline:1px dashed var(--ds-color-border-brand-strong) !important;box-shadow:0;box-sizing:border-box;border-radius:3px;", "{visibility:hidden;opacity:0;}", "{display:none;}"], ItemHeader, ContentWrapper) : css(["background-color:var(--ds-color-background-base-default);"]), (props) => props.isDisabled && `
|
|
54
|
+
opacity: var(--ds-opacity-disabled);
|
|
68
55
|
cursor: default;
|
|
69
56
|
pointer-events: none;
|
|
70
57
|
`, ({
|
|
71
58
|
greyBackground,
|
|
72
|
-
isDragOverlay
|
|
73
|
-
theme
|
|
59
|
+
isDragOverlay
|
|
74
60
|
}) => !greyBackground && !isDragOverlay && `
|
|
75
61
|
&:hover {
|
|
76
|
-
box-shadow: 0 0 0 1px
|
|
62
|
+
box-shadow: 0 0 0 1px var(--ds-color-border-base-strong);
|
|
77
63
|
}
|
|
78
|
-
`, (props) => !!props.dashed && dashedStyle(
|
|
64
|
+
`, (props) => !!props.dashed && dashedStyle(), (props) => props.size === "large" && css(["", "{max-height:none;padding:24px;}"], ItemHeader));
|
|
79
65
|
const ToggleContentWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
80
66
|
displayName: "ContentItemstyles__ToggleContentWrapper",
|
|
81
67
|
componentId: "sc-13pyu4r-9"
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useState, useCallback, useMemo } from "react";
|
|
3
3
|
import Button from "@synerise/ds-button";
|
|
4
|
-
import { useTheme } from "@synerise/ds-core";
|
|
5
4
|
import Dropdown from "@synerise/ds-dropdown";
|
|
6
5
|
import Icon, { AngleTopS, AngleBottomS, DragHandleM, OptionHorizontalM } from "@synerise/ds-icon";
|
|
7
6
|
import Tooltip from "@synerise/ds-tooltip";
|
|
@@ -33,7 +32,6 @@ const ContentItemHeader = ({
|
|
|
33
32
|
setIsExpanded,
|
|
34
33
|
size = "default"
|
|
35
34
|
}) => {
|
|
36
|
-
const theme = useTheme();
|
|
37
35
|
const [editMode, setEditMode] = useState(false);
|
|
38
36
|
const updateName = useCallback((updateParams) => {
|
|
39
37
|
setEditMode(false);
|
|
@@ -77,7 +75,7 @@ const ContentItemHeader = ({
|
|
|
77
75
|
(draggable || isDragOverlay) && /* @__PURE__ */ jsx(DraggerWrapper, { ...dragHandleProps, disabled: Boolean(changeOrderDisabled), children: /* @__PURE__ */ jsx(Icon, { size: 24, component: /* @__PURE__ */ jsx(DragHandleM, {}) }) }),
|
|
78
76
|
item.headerPrefix ? item.headerPrefix : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
79
77
|
item.tag && item.tag,
|
|
80
|
-
item.icon && /* @__PURE__ */ jsx(IconWrapper, { children: /* @__PURE__ */ jsx(Icon, { size: 24, component: item.icon, color:
|
|
78
|
+
item.icon && /* @__PURE__ */ jsx(IconWrapper, { children: /* @__PURE__ */ jsx(Icon, { size: 24, component: item.icon, color: "var(--ds-color-icon-base-default)" }) })
|
|
81
79
|
] }),
|
|
82
80
|
!!headerPrefix && headerPrefix
|
|
83
81
|
] }),
|
|
@@ -94,7 +92,7 @@ const ContentItemHeader = ({
|
|
|
94
92
|
}, expanded: isExpanded }) }),
|
|
95
93
|
item.dropdown && /* @__PURE__ */ jsx(DropdownWrapper, { onClick: stopPropagationHandler, children: /* @__PURE__ */ jsx(Dropdown, { trigger: ["click"], overlay: item.dropdown, placement: "bottomRight", hideOnItemClick: true, popoverProps: {
|
|
96
94
|
testId: "manageable-list-content-item"
|
|
97
|
-
}, children: /* @__PURE__ */ jsx(DropdownTrigger, { className: "ds-dropdown-trigger", mode: "single-icon", type: "ghost", children: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(OptionHorizontalM, {})
|
|
95
|
+
}, children: /* @__PURE__ */ jsx(DropdownTrigger, { className: "ds-dropdown-trigger", mode: "single-icon", type: "ghost", children: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(OptionHorizontalM, {}) }) }) }) }),
|
|
98
96
|
item.additionalSuffix && /* @__PURE__ */ jsx(AdditionalSuffix, { children: item.additionalSuffix }),
|
|
99
97
|
(item.user || item.created) && /* @__PURE__ */ jsx(ItemMeta, { user: item.user, created: item.created })
|
|
100
98
|
] })
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useState, useCallback, useMemo } from "react";
|
|
3
3
|
import Button from "@synerise/ds-button";
|
|
4
|
-
import { useTheme } from "@synerise/ds-core";
|
|
5
4
|
import { DropdownMenu } from "@synerise/ds-dropdown";
|
|
6
5
|
import Icon, { EditM, DuplicateM, TrashM, CheckS, CircleShapeM, WarningFillM, OptionHorizontalM } from "@synerise/ds-icon";
|
|
7
6
|
import ModalProxy from "@synerise/ds-modal";
|
|
@@ -25,7 +24,6 @@ const FilterItemComponent = ({
|
|
|
25
24
|
}) => {
|
|
26
25
|
const [editMode, setEditMode] = useState(false);
|
|
27
26
|
const [confirmDeleteVisible, setConfirmDeleteVisible] = useState(false);
|
|
28
|
-
const theme = useTheme();
|
|
29
27
|
const updateName = useCallback((updateParams) => {
|
|
30
28
|
setEditMode(false);
|
|
31
29
|
onUpdate && onUpdate(updateParams);
|
|
@@ -46,14 +44,14 @@ const FilterItemComponent = ({
|
|
|
46
44
|
if (item.canUpdate) {
|
|
47
45
|
menuItems.push({
|
|
48
46
|
onClick: enterEditMode,
|
|
49
|
-
prefixel: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(EditM, {})
|
|
47
|
+
prefixel: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(EditM, {}) }),
|
|
50
48
|
text: texts.itemActionRename
|
|
51
49
|
});
|
|
52
50
|
}
|
|
53
51
|
if (item.canDuplicate) {
|
|
54
52
|
menuItems.push({
|
|
55
53
|
onClick: handleDuplicate,
|
|
56
|
-
prefixel: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(DuplicateM, {})
|
|
54
|
+
prefixel: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(DuplicateM, {}) }),
|
|
57
55
|
text: texts.itemActionDuplicate
|
|
58
56
|
});
|
|
59
57
|
}
|
|
@@ -66,18 +64,18 @@ const FilterItemComponent = ({
|
|
|
66
64
|
});
|
|
67
65
|
}
|
|
68
66
|
return menuItems;
|
|
69
|
-
}, [enterEditMode, handleDuplicate, handleRemove, item.canDelete, item.canDuplicate, item.canUpdate, texts.itemActionDelete, texts.itemActionDuplicate, texts.itemActionRename
|
|
67
|
+
}, [enterEditMode, handleDuplicate, handleRemove, item.canDelete, item.canDuplicate, item.canUpdate, texts.itemActionDelete, texts.itemActionDuplicate, texts.itemActionRename]);
|
|
70
68
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
71
69
|
/* @__PURE__ */ jsx(ItemContainer, { opened: false, greyBackground, "data-testid": "filter-item", style, children: /* @__PURE__ */ jsxs(ItemHeader$1, { children: [
|
|
72
|
-
/* @__PURE__ */ jsx(ItemHeaderPrefix, { children: /* @__PURE__ */ jsx(SelectFilterItem, { "data-testid": selected && "filter-item-selected", children: selected ? /* @__PURE__ */ jsx(Icon, { className: "selected-item-icon", component: /* @__PURE__ */ jsx(CheckS, {}), color:
|
|
70
|
+
/* @__PURE__ */ jsx(ItemHeaderPrefix, { children: /* @__PURE__ */ jsx(SelectFilterItem, { "data-testid": selected && "filter-item-selected", children: selected ? /* @__PURE__ */ jsx(Icon, { className: "selected-item-icon", component: /* @__PURE__ */ jsx(CheckS, {}), color: "var(--ds-color-icon-success-onsolid)" }) : /* @__PURE__ */ jsx(Popconfirm, { okText: texts.activate, cancelText: texts.cancel, okType: "primary", placement: "top", onConfirm: () => onSelect?.({
|
|
73
71
|
id: item.id
|
|
74
|
-
}), title: texts.activateItemTitle, icon: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(WarningFillM, {}), color:
|
|
72
|
+
}), title: texts.activateItemTitle, icon: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(WarningFillM, {}), color: "var(--ds-color-icon-warning-default)" }), children: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(CircleShapeM, {}), color: "var(--ds-color-icon-base-muted)" }) }) }) }),
|
|
75
73
|
/* @__PURE__ */ jsx(ItemName, { item, editMode, onUpdate: updateName, searchQuery }),
|
|
76
74
|
/* @__PURE__ */ jsxs(ItemHeaderSuffix, { children: [
|
|
77
75
|
(item.user || item.created) && /* @__PURE__ */ jsx(ItemMeta, { user: item.user, created: item.created }),
|
|
78
76
|
/* @__PURE__ */ jsx(DropdownMenu, { trigger: ["click"], dataSource: dropdownMenuDataSource, placement: "bottomRight", popoverProps: {
|
|
79
77
|
testId: "manageable-list-filter-item"
|
|
80
|
-
}, children: /* @__PURE__ */ jsx(FilterDropdownTrigger, { className: "ds-dropdown-trigger", mode: "single-icon", type: "ghost", children: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(OptionHorizontalM, {})
|
|
78
|
+
}, children: /* @__PURE__ */ jsx(FilterDropdownTrigger, { className: "ds-dropdown-trigger", mode: "single-icon", type: "ghost", children: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(OptionHorizontalM, {}) }) }) })
|
|
81
79
|
] })
|
|
82
80
|
] }) }, item.id),
|
|
83
81
|
/* @__PURE__ */ jsx(ModalProxy, { blank: true, onCancel: () => setConfirmDeleteVisible(false), open: confirmDeleteVisible, size: "small", footer: null, children: /* @__PURE__ */ jsx(Result, { type: "warning", title: texts.deleteConfirmationTitle, description: texts.deleteConfirmationDescription, buttons: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -5,17 +5,15 @@ import { ItemMeta } from "../ItemMeta/ItemMeta.styles.js";
|
|
|
5
5
|
const SelectFilterItem = /* @__PURE__ */ styled.div.withConfig({
|
|
6
6
|
displayName: "FilterItemstyles__SelectFilterItem",
|
|
7
7
|
componentId: "sc-omg0gg-0"
|
|
8
|
-
})(["margin-right:12px;cursor:pointer;.selected-item-icon{position:relative;svg{position:relative;}&::before{display:flex;content:'';border-radius:50%;background-color:
|
|
8
|
+
})(["margin-right:12px;cursor:pointer;.selected-item-icon{position:relative;svg{position:relative;}&::before{display:flex;content:'';border-radius:50%;background-color:var(--ds-color-background-success-solid);width:16px;height:16px;position:absolute;z-index:0;top:4px;left:4px;}}"]);
|
|
9
9
|
const MenuItem = /* @__PURE__ */ styled.div.withConfig({
|
|
10
10
|
displayName: "FilterItemstyles__MenuItem",
|
|
11
11
|
componentId: "sc-omg0gg-1"
|
|
12
|
-
})(["&&{display:flex;align-items:center;justify-content:flex-start;border-radius:3px;height:32px;width:100%;font-size:13px;line-height:1.38;font-weight:500;cursor:pointer;padding:0 8px;background-color:", ";color:", ";&:hover{background-color:
|
|
12
|
+
})(["&&{display:flex;align-items:center;justify-content:flex-start;border-radius:3px;height:32px;width:100%;font-size:13px;line-height:1.38;font-weight:500;cursor:pointer;padding:0 8px;background-color:", ";color:", ";&:hover{background-color:", ";color:", ";}", "{margin-right:12px;svg{color:", ";fill:", ";}}}"], (props) => props.danger ? "var(--ds-color-background-danger-subtle)" : "var(--ds-color-background-base-default)", (props) => props.danger ? "var(--ds-color-text-danger-default)" : "var(--ds-color-text-base-subtle)", (props) => props.danger ? "var(--ds-color-background-danger-subtle)" : "var(--ds-color-background-base-default)", (props) => props.danger ? "var(--ds-color-text-danger-default)" : "var(--ds-color-text-base-subtle)", IconContainer, (props) => props.danger ? "var(--ds-color-icon-danger-default)" : "var(--ds-color-icon-base-default)", (props) => props.danger ? "var(--ds-color-icon-danger-default)" : "var(--ds-color-icon-base-default)");
|
|
13
13
|
const ItemHeader = /* @__PURE__ */ styled.div.withConfig({
|
|
14
14
|
displayName: "FilterItemstyles__ItemHeader",
|
|
15
15
|
componentId: "sc-omg0gg-2"
|
|
16
|
-
})(["display:flex;flex-direction:row;align-items:center;justify-content:stretch;width:100%;padding:12px;max-height:48px;&:hover{", "{color:
|
|
17
|
-
theme
|
|
18
|
-
}) => theme.palette["grey-800"], ItemMeta);
|
|
16
|
+
})(["display:flex;flex-direction:row;align-items:center;justify-content:stretch;width:100%;padding:12px;max-height:48px;&:hover{", "{color:var(--ds-color-text-base-default);}}", "{margin-right:12px;}"], ItemLabel, ItemMeta);
|
|
19
17
|
export {
|
|
20
18
|
ItemHeader,
|
|
21
19
|
MenuItem,
|
package/dist/Item/Item.styles.js
CHANGED
|
@@ -5,13 +5,11 @@ import { ItemActionsWrapper } from "./ItemActions/ItemActions.styles.js";
|
|
|
5
5
|
const ItemLabel = /* @__PURE__ */ styled.span.withConfig({
|
|
6
6
|
displayName: "Itemstyles__ItemLabel",
|
|
7
7
|
componentId: "sc-1an9szf-0"
|
|
8
|
-
})(["", ";color:
|
|
9
|
-
theme
|
|
10
|
-
}) => theme.palette["grey-600"], (props) => props.theme.palette["grey-800"]);
|
|
8
|
+
})(["", ";color:var(--ds-color-text-base-muted);height:24px;display:inline-block;align-items:center;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;line-height:24px;user-select:none;flex-shrink:0;max-width:100%;&.full-width{max-width:unset;}.search-highlight{font-weight:500;color:var(--ds-color-text-base-default);}"], macro.h300);
|
|
11
9
|
const ItemTagList = /* @__PURE__ */ styled.div.withConfig({
|
|
12
10
|
displayName: "Itemstyles__ItemTagList",
|
|
13
11
|
componentId: "sc-1an9szf-1"
|
|
14
|
-
})(["margin-left:8px;max-width:100%;overflow:hidden;position:relative;flex-grow:1;&:after{content:'';position:absolute;right:0;top:0;bottom:0;width:20px;background:linear-gradient( 90deg,
|
|
12
|
+
})(["margin-left:8px;max-width:100%;overflow:hidden;position:relative;flex-grow:1;&:after{content:'';position:absolute;right:0;top:0;bottom:0;width:20px;background:linear-gradient( 90deg,transparent 0%,var(--ds-color-background-base-default) 100% );}"]);
|
|
15
13
|
const ItemLabelWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
16
14
|
displayName: "Itemstyles__ItemLabelWrapper",
|
|
17
15
|
componentId: "sc-1an9szf-2"
|
|
@@ -19,27 +17,17 @@ const ItemLabelWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
|
19
17
|
const ItemContainer = /* @__PURE__ */ styled.div.withConfig({
|
|
20
18
|
displayName: "Itemstyles__ItemContainer",
|
|
21
19
|
componentId: "sc-1an9szf-3"
|
|
22
|
-
})(["width:100%;display:flex;flex-direction:row;align-items:center;justify-content:stretch;", " background-color:", ";li{width:100%;.title{color:", ";}& > div{height:24px;&:nth-child(2){overflow:hidden;}}}.ds-manageable-list-item-icon{
|
|
23
|
-
opacity:
|
|
20
|
+
})(["width:100%;display:flex;flex-direction:row;align-items:center;justify-content:stretch;", " background-color:", ";li{width:100%;.title{color:", ";}& > div{height:24px;&:nth-child(2){overflow:hidden;}}}.ds-manageable-list-item-icon{color:", ";}&:hover{", "{display:flex;}.ds-manageable-list-item-icon{color:var(--ds-color-icon-brand-default);}}"], (props) => props.isDisabled && `
|
|
21
|
+
opacity: var(--ds-opacity-disabled);
|
|
24
22
|
cursor: default;
|
|
25
23
|
pointer-events: none;
|
|
26
24
|
`, ({
|
|
27
|
-
theme,
|
|
28
25
|
isSelected
|
|
29
|
-
}) => isSelected ?
|
|
30
|
-
theme,
|
|
26
|
+
}) => isSelected ? "var(--ds-color-background-brand-subtle)" : "var(--ds-color-background-base-default)", ({
|
|
31
27
|
isSelected
|
|
32
|
-
}) => isSelected ?
|
|
33
|
-
theme,
|
|
28
|
+
}) => isSelected ? "var(--ds-color-text-brand-default)" : "var(--ds-color-text-base-muted)", ({
|
|
34
29
|
isSelected
|
|
35
|
-
}) => isSelected ?
|
|
36
|
-
theme,
|
|
37
|
-
isSelected
|
|
38
|
-
}) => isSelected ? theme.palette["blue-600"] : theme.palette["grey-600"], ItemActionsWrapper, ({
|
|
39
|
-
theme
|
|
40
|
-
}) => theme.palette["blue-600"], ({
|
|
41
|
-
theme
|
|
42
|
-
}) => theme.palette["blue-600"]);
|
|
30
|
+
}) => isSelected ? "var(--ds-color-icon-brand-default)" : "var(--ds-color-icon-base-default)", ItemActionsWrapper);
|
|
43
31
|
const DescriptionIcon = /* @__PURE__ */ styled(Icon).withConfig({
|
|
44
32
|
displayName: "Itemstyles__DescriptionIcon",
|
|
45
33
|
componentId: "sc-1an9szf-4"
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React from "react";
|
|
3
|
-
import { theme } from "@synerise/ds-core";
|
|
4
3
|
import Icon, { EditS, DuplicateS, CloseS } from "@synerise/ds-icon";
|
|
5
4
|
import Tooltip from "@synerise/ds-tooltip";
|
|
6
5
|
import { ItemActionsWrapper } from "./ItemActions.styles.js";
|
|
7
|
-
const DEFAULT_COLOR = theme.palette["grey-500"];
|
|
8
6
|
const ItemActions = ({
|
|
9
7
|
item,
|
|
10
8
|
duplicateAction,
|
|
@@ -41,13 +39,13 @@ const ItemActions = ({
|
|
|
41
39
|
return condition && /* @__PURE__ */ jsx(Tooltip, { type: "default", trigger: "hover", title: tooltip, children: /* @__PURE__ */ jsx("div", { "data-testid": testId, children: /* @__PURE__ */ jsx(Icon, { component: icon, size: 24, color, onClick: handleClick }) }) });
|
|
42
40
|
}, []);
|
|
43
41
|
const renderAdditionalActions = React.useMemo(() => {
|
|
44
|
-
return additionalActions && additionalActions.map((action, index) => renderIcon(true, action.icon, action.color
|
|
42
|
+
return additionalActions && additionalActions.map((action, index) => renderIcon(true, action.icon, action.color, () => action.onClick(item), `additional-action-${index}`, action.tooltip));
|
|
45
43
|
}, [additionalActions, item, renderIcon]);
|
|
46
44
|
return /* @__PURE__ */ jsxs(ItemActionsWrapper, { children: [
|
|
47
45
|
additionalActions && renderAdditionalActions,
|
|
48
|
-
renderIcon(Boolean(item.canUpdate), /* @__PURE__ */ jsx(EditS, {}),
|
|
49
|
-
renderIcon(Boolean(item.canDuplicate), /* @__PURE__ */ jsx(DuplicateS, {}),
|
|
50
|
-
renderIcon(Boolean(item.canDelete), /* @__PURE__ */ jsx(CloseS, {}),
|
|
46
|
+
renderIcon(Boolean(item.canUpdate), /* @__PURE__ */ jsx(EditS, {}), void 0, handleEdit, "list-item-edit", editActionTooltip),
|
|
47
|
+
renderIcon(Boolean(item.canDuplicate), /* @__PURE__ */ jsx(DuplicateS, {}), void 0, handleDuplicate, "list-item-duplicate", duplicateActionTooltip),
|
|
48
|
+
renderIcon(Boolean(item.canDelete), /* @__PURE__ */ jsx(CloseS, {}), "var(--ds-color-icon-danger-default)", handleRemove, "list-item-remove", removeActionTooltip)
|
|
51
49
|
] });
|
|
52
50
|
};
|
|
53
51
|
export {
|
|
@@ -3,9 +3,7 @@ import { IconContainer } from "@synerise/ds-icon";
|
|
|
3
3
|
const ItemActionsWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
4
4
|
displayName: "ItemActionsstyles__ItemActionsWrapper",
|
|
5
5
|
componentId: "sc-1n2bgbl-0"
|
|
6
|
-
})(["display:none;flex-direction:row;align-items:center;justify-content:flex-end;span{margin:0 0 0 8px;}", ":hover{
|
|
7
|
-
theme
|
|
8
|
-
}) => theme.palette["blue-600"]);
|
|
6
|
+
})(["display:none;flex-direction:row;align-items:center;justify-content:flex-end;span{margin:0 0 0 8px;}", "{color:var(--ds-color-icon-base-subtle);&:hover{color:var(--ds-color-icon-brand-default);}}"], IconContainer);
|
|
9
7
|
export {
|
|
10
8
|
ItemActionsWrapper
|
|
11
9
|
};
|
|
@@ -2,7 +2,7 @@ import styled from "styled-components";
|
|
|
2
2
|
const ItemMetaCreated = /* @__PURE__ */ styled.span.withConfig({
|
|
3
3
|
displayName: "ItemMetastyles__ItemMetaCreated",
|
|
4
4
|
componentId: "sc-1jx08et-0"
|
|
5
|
-
})(["color:
|
|
5
|
+
})(["color:var(--ds-color-text-neutral-default);font-size:13px;line-height:18px;"]);
|
|
6
6
|
const ItemMeta = /* @__PURE__ */ styled.div.withConfig({
|
|
7
7
|
displayName: "ItemMetastyles__ItemMeta",
|
|
8
8
|
componentId: "sc-1jx08et-1"
|
|
@@ -50,7 +50,7 @@ const ItemName = ({
|
|
|
50
50
|
lineHeight: "24px"
|
|
51
51
|
}, input: inputProps, "data-testid": "list-item-name-input", autoFocus: true }) : /* @__PURE__ */ jsxs(ItemLabelWithIcon, { children: [
|
|
52
52
|
/* @__PURE__ */ jsx(ItemLabel, { "data-testid": "list-item-name", className: classes.join(" "), children: name }),
|
|
53
|
-
item.description && /* @__PURE__ */ jsx(Tooltip, { description: item.description, placement: "top", trigger: "hover", type: "largeSimple", children: /* @__PURE__ */ jsx("span", { children: /* @__PURE__ */ jsx(DescriptionIcon, { component: /* @__PURE__ */ jsx(InfoFillS, {}), color: "
|
|
53
|
+
item.description && /* @__PURE__ */ jsx(Tooltip, { description: item.description, placement: "top", trigger: "hover", type: "largeSimple", children: /* @__PURE__ */ jsx("span", { children: /* @__PURE__ */ jsx(DescriptionIcon, { component: /* @__PURE__ */ jsx(InfoFillS, {}), color: "var(--ds-color-icon-base-muted)" }) }) }),
|
|
54
54
|
item.tags && /* @__PURE__ */ jsx(ItemTagList, { children: item.tags })
|
|
55
55
|
] }) });
|
|
56
56
|
};
|
|
@@ -9,7 +9,7 @@ const ManageableListContainer = /* @__PURE__ */ styled.div.withConfig({
|
|
|
9
9
|
const ShowMoreButton = /* @__PURE__ */ styled.div.withConfig({
|
|
10
10
|
displayName: "ManageableListstyles__ShowMoreButton",
|
|
11
11
|
componentId: "sc-1pshmn-1"
|
|
12
|
-
})(["background:transparent;outline:0;cursor:pointer;&&{padding:16px 8px;margin:0;}&:hover{color:
|
|
12
|
+
})(["background:transparent;outline:0;cursor:pointer;&&{padding:16px 8px;margin:0;}&:hover{color:var(--ds-color-text-brand-default);}strong{font-weight:500;}"]);
|
|
13
13
|
export {
|
|
14
14
|
ManageableListContainer,
|
|
15
15
|
ShowMoreButton
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-manageable-list",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "ManageableList UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -42,22 +42,22 @@
|
|
|
42
42
|
],
|
|
43
43
|
"types": "dist/index.d.ts",
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@synerise/ds-avatar": "^2.0
|
|
46
|
-
"@synerise/ds-button": "^2.
|
|
47
|
-
"@synerise/ds-divider": "^2.0
|
|
48
|
-
"@synerise/ds-dropdown": "^2.
|
|
49
|
-
"@synerise/ds-icon": "^2.
|
|
50
|
-
"@synerise/ds-inline-edit": "^2.0
|
|
51
|
-
"@synerise/ds-input": "^2.0
|
|
52
|
-
"@synerise/ds-list": "^2.0
|
|
53
|
-
"@synerise/ds-modal": "^2.
|
|
54
|
-
"@synerise/ds-popconfirm": "^2.0
|
|
55
|
-
"@synerise/ds-result": "^2.0
|
|
56
|
-
"@synerise/ds-sortable": "^2.0
|
|
57
|
-
"@synerise/ds-tag": "^2.0
|
|
58
|
-
"@synerise/ds-tooltip": "^2.0
|
|
59
|
-
"@synerise/ds-typography": "^2.0
|
|
60
|
-
"@synerise/ds-utils": "^2.
|
|
45
|
+
"@synerise/ds-avatar": "^2.1.0",
|
|
46
|
+
"@synerise/ds-button": "^2.2.0",
|
|
47
|
+
"@synerise/ds-divider": "^2.1.0",
|
|
48
|
+
"@synerise/ds-dropdown": "^2.2.0",
|
|
49
|
+
"@synerise/ds-icon": "^2.3.0",
|
|
50
|
+
"@synerise/ds-inline-edit": "^2.1.0",
|
|
51
|
+
"@synerise/ds-input": "^2.1.0",
|
|
52
|
+
"@synerise/ds-list": "^2.1.0",
|
|
53
|
+
"@synerise/ds-modal": "^2.2.0",
|
|
54
|
+
"@synerise/ds-popconfirm": "^2.1.0",
|
|
55
|
+
"@synerise/ds-result": "^2.1.0",
|
|
56
|
+
"@synerise/ds-sortable": "^2.1.0",
|
|
57
|
+
"@synerise/ds-tag": "^2.1.0",
|
|
58
|
+
"@synerise/ds-tooltip": "^2.1.0",
|
|
59
|
+
"@synerise/ds-typography": "^2.1.0",
|
|
60
|
+
"@synerise/ds-utils": "^2.3.0",
|
|
61
61
|
"dayjs": "^1.8.36",
|
|
62
62
|
"react-animate-height": "^2.0.23"
|
|
63
63
|
},
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"react-intl": ">=3.12.0 <= 6.8",
|
|
71
71
|
"styled-components": "^5.3.3"
|
|
72
72
|
},
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "5c3d61e30289486d14c7d6becb682e2d4a08ce41"
|
|
74
74
|
}
|