@synerise/ds-manageable-list 1.7.11 → 1.7.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.
Files changed (82) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/AddBlankItem/AddBlankItem.d.ts +2 -2
  3. package/dist/AddBlankItem/AddBlankItem.js +19 -22
  4. package/dist/AddBlankItem/AddBlankItem.styles.d.ts +2 -2
  5. package/dist/AddBlankItem/AddBlankItem.styles.js +9 -5
  6. package/dist/AddBlankItem/AddBlankItem.types.d.ts +1 -1
  7. package/dist/AddBlankItem/AddBlankItem.types.js +1 -1
  8. package/dist/AddItem/AddItem.d.ts +3 -3
  9. package/dist/AddItem/AddItem.js +14 -18
  10. package/dist/AddItem/AddItem.styles.d.ts +1 -1
  11. package/dist/AddItem/AddItem.styles.js +6 -3
  12. package/dist/AddItem/AddItem.types.d.ts +1 -1
  13. package/dist/AddItem/AddItem.types.js +1 -1
  14. package/dist/AddItemWithName/AddItemWithName.d.ts +2 -2
  15. package/dist/AddItemWithName/AddItemWithName.js +30 -43
  16. package/dist/AddItemWithName/AddItemWithName.styles.d.ts +2 -2
  17. package/dist/AddItemWithName/AddItemWithName.styles.js +9 -5
  18. package/dist/AddItemWithName/AddItemWithName.types.d.ts +1 -1
  19. package/dist/AddItemWithName/AddItemWithName.types.js +1 -1
  20. package/dist/Item/BlankItem/BlankItem.d.ts +2 -2
  21. package/dist/Item/BlankItem/BlankItem.js +43 -61
  22. package/dist/Item/BlankItem/BlankItem.styles.d.ts +4 -4
  23. package/dist/Item/BlankItem/BlankItem.styles.js +26 -21
  24. package/dist/Item/BlankItem/BlankItem.types.d.ts +3 -3
  25. package/dist/Item/BlankItem/BlankItem.types.js +1 -1
  26. package/dist/Item/ContentItem/ContentItem.d.ts +43 -43
  27. package/dist/Item/ContentItem/ContentItem.js +58 -99
  28. package/dist/Item/ContentItem/ContentItem.styles.d.ts +45 -45
  29. package/dist/Item/ContentItem/ContentItem.styles.js +76 -85
  30. package/dist/Item/ContentItem/ContentItem.types.d.ts +4 -4
  31. package/dist/Item/ContentItem/ContentItem.types.js +1 -1
  32. package/dist/Item/ContentItem/ContentItemHeader.d.ts +2 -2
  33. package/dist/Item/ContentItem/ContentItemHeader.js +88 -134
  34. package/dist/Item/DraggableItem.d.ts +2 -2
  35. package/dist/Item/DraggableItem.js +26 -27
  36. package/dist/Item/FilterItem/FilterItem.d.ts +43 -43
  37. package/dist/Item/FilterItem/FilterItem.js +74 -140
  38. package/dist/Item/FilterItem/FilterItem.styles.d.ts +3 -3
  39. package/dist/Item/FilterItem/FilterItem.styles.js +17 -27
  40. package/dist/Item/FilterItem/FilterItem.types.d.ts +2 -2
  41. package/dist/Item/FilterItem/FilterItem.types.js +1 -1
  42. package/dist/Item/Item.d.ts +2 -2
  43. package/dist/Item/Item.js +39 -90
  44. package/dist/Item/Item.styles.d.ts +9 -9
  45. package/dist/Item/Item.styles.js +50 -48
  46. package/dist/Item/Item.types.d.ts +1 -1
  47. package/dist/Item/Item.types.js +1 -1
  48. package/dist/Item/ItemActions/ItemActions.d.ts +2 -2
  49. package/dist/Item/ItemActions/ItemActions.js +41 -43
  50. package/dist/Item/ItemActions/ItemActions.styles.d.ts +1 -1
  51. package/dist/Item/ItemActions/ItemActions.styles.js +9 -7
  52. package/dist/Item/ItemActions/ItemActions.types.d.ts +2 -2
  53. package/dist/Item/ItemActions/ItemActions.types.js +1 -1
  54. package/dist/Item/ItemMeta/ItemMeta.d.ts +2 -2
  55. package/dist/Item/ItemMeta/ItemMeta.js +27 -22
  56. package/dist/Item/ItemMeta/ItemMeta.styles.d.ts +2 -2
  57. package/dist/Item/ItemMeta/ItemMeta.styles.js +9 -7
  58. package/dist/Item/ItemMeta/ItemMeta.types.js +1 -1
  59. package/dist/Item/ItemName/ItemName.d.ts +2 -2
  60. package/dist/Item/ItemName/ItemName.js +36 -55
  61. package/dist/Item/ItemName/ItemName.types.d.ts +2 -2
  62. package/dist/Item/ItemName/ItemName.types.js +1 -1
  63. package/dist/Item/ItemNameLarge/ItemNameLarge.d.ts +2 -2
  64. package/dist/Item/ItemNameLarge/ItemNameLarge.js +17 -13
  65. package/dist/Item/ItemNameLarge/ItemNameLarge.types.d.ts +1 -1
  66. package/dist/Item/ItemNameLarge/ItemNameLarge.types.js +1 -1
  67. package/dist/Item/SimpleItem/SimpleItem.d.ts +7 -7
  68. package/dist/Item/SimpleItem/SimpleItem.js +34 -56
  69. package/dist/Item/SimpleItem/SimpleItem.types.d.ts +2 -2
  70. package/dist/Item/SimpleItem/SimpleItem.types.js +1 -1
  71. package/dist/ManageableList.d.ts +4 -4
  72. package/dist/ManageableList.js +106 -164
  73. package/dist/ManageableList.styles.d.ts +2 -2
  74. package/dist/ManageableList.styles.js +12 -11
  75. package/dist/ManageableList.types.d.ts +2 -2
  76. package/dist/ManageableList.types.js +18 -14
  77. package/dist/hooks/useTexts.d.ts +1 -1
  78. package/dist/hooks/useTexts.js +31 -89
  79. package/dist/index.js +12 -5
  80. package/dist/modules.d.js +1 -1
  81. package/dist/modules.d.ts +0 -0
  82. package/package.json +21 -21
package/CHANGELOG.md CHANGED
@@ -3,6 +3,10 @@
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
+ ## [1.7.12](https://github.com/Synerise/synerise-design/compare/@synerise/ds-manageable-list@1.7.11...@synerise/ds-manageable-list@1.7.12) (2026-03-24)
7
+
8
+ **Note:** Version bump only for package @synerise/ds-manageable-list
9
+
6
10
  ## [1.7.11](https://github.com/Synerise/synerise-design/compare/@synerise/ds-manageable-list@1.7.10...@synerise/ds-manageable-list@1.7.11) (2026-03-20)
7
11
 
8
12
  **Note:** Version bump only for package @synerise/ds-manageable-list
@@ -1,4 +1,4 @@
1
- import React from 'react';
2
- import { type AddBlankItemProps } from './AddBlankItem.types';
1
+ import { default as React } from 'react';
2
+ import { AddBlankItemProps } from './AddBlankItem.types';
3
3
  declare const AddBlankItem: ({ disabled, onItemAdd, addItemLabel, }: AddBlankItemProps) => React.JSX.Element;
4
4
  export default AddBlankItem;
@@ -1,23 +1,20 @@
1
- import React from 'react';
2
- import Button from '@synerise/ds-button';
3
- import Icon, { Add3S } from '@synerise/ds-icon';
4
- import * as S from './AddBlankItem.styles';
5
- var AddBlankItem = function AddBlankItem(_ref) {
6
- var disabled = _ref.disabled,
7
- onItemAdd = _ref.onItemAdd,
8
- addItemLabel = _ref.addItemLabel;
9
- return /*#__PURE__*/React.createElement(S.AddContentButtonWrapper, {
10
- "data-testid": "add-item-button"
11
- }, /*#__PURE__*/React.createElement(S.StyledDivider, {
12
- dashed: true,
13
- marginTop: 8
14
- }), /*#__PURE__*/React.createElement(Button, {
15
- type: "ghost-primary",
16
- mode: "icon-label",
17
- onClick: onItemAdd,
18
- disabled: disabled
19
- }, /*#__PURE__*/React.createElement(Icon, {
20
- component: /*#__PURE__*/React.createElement(Add3S, null)
21
- }), addItemLabel));
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import Button from "@synerise/ds-button";
3
+ import Icon, { Add3S } from "@synerise/ds-icon";
4
+ import { AddContentButtonWrapper, StyledDivider } from "./AddBlankItem.styles.js";
5
+ const AddBlankItem = ({
6
+ disabled,
7
+ onItemAdd,
8
+ addItemLabel
9
+ }) => {
10
+ return /* @__PURE__ */ jsxs(AddContentButtonWrapper, { "data-testid": "add-item-button", children: [
11
+ /* @__PURE__ */ jsx(StyledDivider, { dashed: true, marginTop: 8 }),
12
+ /* @__PURE__ */ jsxs(Button, { type: "ghost-primary", mode: "icon-label", onClick: onItemAdd, disabled, children: [
13
+ /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(Add3S, {}) }),
14
+ addItemLabel
15
+ ] })
16
+ ] });
17
+ };
18
+ export {
19
+ AddBlankItem as default
22
20
  };
23
- export default AddBlankItem;
@@ -1,2 +1,2 @@
1
- export declare const AddContentButtonWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
2
- export declare const StyledDivider: import("styled-components").StyledComponent<(props: import("@synerise/ds-divider").DividerProps) => React.JSX.Element, any, {}, never>;
1
+ export declare const AddContentButtonWrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
2
+ export declare const StyledDivider: import('styled-components').StyledComponent<(props: import('@synerise/ds-divider').DividerProps) => React.JSX.Element, any, {}, never>;
@@ -1,10 +1,14 @@
1
- import styled from 'styled-components';
2
- import Divider from '@synerise/ds-divider';
3
- export var AddContentButtonWrapper = styled.div.withConfig({
1
+ import styled from "styled-components";
2
+ import Divider from "@synerise/ds-divider";
3
+ const AddContentButtonWrapper = /* @__PURE__ */ styled.div.withConfig({
4
4
  displayName: "AddBlankItemstyles__AddContentButtonWrapper",
5
5
  componentId: "sc-1cqa1jm-0"
6
6
  })(["display:flex;flex-direction:column;gap:16px;align-items:flex-start;"]);
7
- export var StyledDivider = styled(Divider).withConfig({
7
+ const StyledDivider = /* @__PURE__ */ styled(Divider).withConfig({
8
8
  displayName: "AddBlankItemstyles__StyledDivider",
9
9
  componentId: "sc-1cqa1jm-1"
10
- })(["width:100%;"]);
10
+ })(["width:100%;"]);
11
+ export {
12
+ AddContentButtonWrapper,
13
+ StyledDivider
14
+ };
@@ -1,4 +1,4 @@
1
- import type { ReactNode } from 'react';
1
+ import { ReactNode } from 'react';
2
2
  export type AddBlankItemProps = {
3
3
  onItemAdd: () => void;
4
4
  addItemLabel: ReactNode;
@@ -1 +1 @@
1
- export {};
1
+
@@ -1,6 +1,6 @@
1
- import React from 'react';
2
- import { type AddItemProps } from './AddItem.types';
1
+ import { default as React } from 'react';
2
+ import { AddItemProps } from './AddItem.types';
3
3
  declare const AddItem: (({ disabled, onItemAdd, addItemLabel, }: AddItemProps) => React.JSX.Element) & {
4
- AddContentButtonWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
4
+ AddContentButtonWrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
5
5
  };
6
6
  export default AddItem;
@@ -1,20 +1,16 @@
1
- import React from 'react';
2
- import Button from '@synerise/ds-button';
3
- import * as S from './AddItem.styles';
4
- var AddItemComponent = function AddItemComponent(_ref) {
5
- var disabled = _ref.disabled,
6
- onItemAdd = _ref.onItemAdd,
7
- addItemLabel = _ref.addItemLabel;
8
- return /*#__PURE__*/React.createElement(S.AddContentButtonWrapper, {
9
- "data-testid": "add-item-button"
10
- }, /*#__PURE__*/React.createElement(Button.Creator, {
11
- onClick: onItemAdd,
12
- block: true,
13
- label: addItemLabel,
14
- disabled: disabled
15
- }));
1
+ import { jsx } from "react/jsx-runtime";
2
+ import Button from "@synerise/ds-button";
3
+ import { AddContentButtonWrapper } from "./AddItem.styles.js";
4
+ const AddItemComponent = ({
5
+ disabled,
6
+ onItemAdd,
7
+ addItemLabel
8
+ }) => {
9
+ return /* @__PURE__ */ jsx(AddContentButtonWrapper, { "data-testid": "add-item-button", children: /* @__PURE__ */ jsx(Button.Creator, { onClick: onItemAdd, block: true, label: addItemLabel, disabled }) });
16
10
  };
17
- var AddItem = Object.assign(AddItemComponent, {
18
- AddContentButtonWrapper: S.AddContentButtonWrapper
11
+ const AddItem = Object.assign(AddItemComponent, {
12
+ AddContentButtonWrapper
19
13
  });
20
- export default AddItem;
14
+ export {
15
+ AddItem as default
16
+ };
@@ -1 +1 @@
1
- export declare const AddContentButtonWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
1
+ export declare const AddContentButtonWrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
@@ -1,5 +1,8 @@
1
- import styled from 'styled-components';
2
- export var AddContentButtonWrapper = styled.div.withConfig({
1
+ import styled from "styled-components";
2
+ const AddContentButtonWrapper = /* @__PURE__ */ styled.div.withConfig({
3
3
  displayName: "AddItemstyles__AddContentButtonWrapper",
4
4
  componentId: "sc-5vjj4u-0"
5
- })(["display:flex;width:100%;"]);
5
+ })(["display:flex;width:100%;"]);
6
+ export {
7
+ AddContentButtonWrapper
8
+ };
@@ -1,4 +1,4 @@
1
- import type React from 'react';
1
+ import { default as React } from 'react';
2
2
  export type AddItemProps = {
3
3
  onItemAdd: () => void;
4
4
  addItemLabel: string | React.ReactNode;
@@ -1 +1 @@
1
- export {};
1
+
@@ -1,4 +1,4 @@
1
- import React from 'react';
2
- import { type Props } from './AddItemWithName.types';
1
+ import { default as React } from 'react';
2
+ import { Props } from './AddItemWithName.types';
3
3
  declare const AddItemWithName: ({ onItemAdd, addItemLabel, disabled, placeholder, }: Props) => React.JSX.Element;
4
4
  export default AddItemWithName;
@@ -1,56 +1,43 @@
1
- import React, { useCallback, useState } from 'react';
2
- import Button from '@synerise/ds-button';
3
- import Icon, { Add3M } from '@synerise/ds-icon';
4
- import { Input } from '@synerise/ds-input';
5
- import * as S from './AddItemWithName.styles';
6
- var DEFAULT_NAME = '';
7
- var AddItemWithName = function AddItemWithName(_ref) {
8
- var onItemAdd = _ref.onItemAdd,
9
- addItemLabel = _ref.addItemLabel,
10
- disabled = _ref.disabled,
11
- placeholder = _ref.placeholder;
12
- var _useState = useState(false),
13
- active = _useState[0],
14
- setActive = _useState[1];
15
- var _useState2 = useState(DEFAULT_NAME),
16
- name = _useState2[0],
17
- setName = _useState2[1];
18
- var handleClickOutside = useCallback(function () {
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { useState, useCallback } from "react";
3
+ import Button from "@synerise/ds-button";
4
+ import Icon, { Add3M } from "@synerise/ds-icon";
5
+ import { Input } from "@synerise/ds-input";
6
+ import { AddItemLayout } from "./AddItemWithName.styles.js";
7
+ const DEFAULT_NAME = "";
8
+ const AddItemWithName = ({
9
+ onItemAdd,
10
+ addItemLabel,
11
+ disabled,
12
+ placeholder
13
+ }) => {
14
+ const [active, setActive] = useState(false);
15
+ const [name, setName] = useState(DEFAULT_NAME);
16
+ const handleClickOutside = useCallback(() => {
19
17
  setActive(false);
20
18
  setName(DEFAULT_NAME);
21
19
  }, []);
22
- var handleNameChange = useCallback(function (event) {
20
+ const handleNameChange = useCallback((event) => {
23
21
  setName(event.target.value);
24
22
  }, []);
25
- var toggleInput = useCallback(function () {
23
+ const toggleInput = useCallback(() => {
26
24
  setActive(!active);
27
25
  setName(DEFAULT_NAME);
28
26
  }, [active]);
29
- var createItem = useCallback(function () {
27
+ const createItem = useCallback(() => {
30
28
  onItemAdd && onItemAdd({
31
- name: name
29
+ name
32
30
  });
33
31
  toggleInput();
34
32
  }, [name, onItemAdd, toggleInput]);
35
- return /*#__PURE__*/React.createElement(S.AddItemLayout, {
36
- "data-testid": "add-item-with-name-button"
37
- }, /*#__PURE__*/React.createElement(Button, {
38
- type: "ghost-primary",
39
- mode: "icon-label",
40
- onClick: toggleInput,
41
- disabled: disabled
42
- }, /*#__PURE__*/React.createElement(Icon, {
43
- component: /*#__PURE__*/React.createElement(Add3M, null),
44
- size: 24
45
- }), addItemLabel), active && /*#__PURE__*/React.createElement(Input, {
46
- resetMargin: true,
47
- autoFocus: true,
48
- value: name,
49
- onBlur: handleClickOutside,
50
- onChange: handleNameChange,
51
- onPressEnter: createItem,
52
- "data-testid": "add-item-input",
53
- placeholder: placeholder
54
- }));
33
+ return /* @__PURE__ */ jsxs(AddItemLayout, { "data-testid": "add-item-with-name-button", children: [
34
+ /* @__PURE__ */ jsxs(Button, { type: "ghost-primary", mode: "icon-label", onClick: toggleInput, disabled, children: [
35
+ /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(Add3M, {}), size: 24 }),
36
+ addItemLabel
37
+ ] }),
38
+ active && /* @__PURE__ */ jsx(Input, { resetMargin: true, autoFocus: true, value: name, onBlur: handleClickOutside, onChange: handleNameChange, onPressEnter: createItem, "data-testid": "add-item-input", placeholder })
39
+ ] });
40
+ };
41
+ export {
42
+ AddItemWithName as default
55
43
  };
56
- export default AddItemWithName;
@@ -1,2 +1,2 @@
1
- export declare const AddItemLayout: import("styled-components").StyledComponent<"div", any, {}, never>;
2
- export declare const AddItemLabel: import("styled-components").StyledComponent<"span", any, {}, never>;
1
+ export declare const AddItemLayout: import('styled-components').StyledComponent<"div", any, {}, never>;
2
+ export declare const AddItemLabel: import('styled-components').StyledComponent<"span", any, {}, never>;
@@ -1,10 +1,14 @@
1
- import styled from 'styled-components';
2
- import { InputWrapper } from '@synerise/ds-input/dist/Input.styles';
3
- export var AddItemLayout = styled.div.withConfig({
1
+ import styled from "styled-components";
2
+ import { InputWrapper } from "@synerise/ds-input/dist/Input.styles";
3
+ const AddItemLayout = /* @__PURE__ */ styled.div.withConfig({
4
4
  displayName: "AddItemWithNamestyles__AddItemLayout",
5
5
  componentId: "sc-8u2fy8-0"
6
6
  })(["display:inline;flex-direction:column;align-items:stretch;justify-content:center;width:100%;padding:4px 12px;margin-bottom:8px;", "{margin-top:8px;}"], InputWrapper);
7
- export var AddItemLabel = styled.span.withConfig({
7
+ const AddItemLabel = /* @__PURE__ */ styled.span.withConfig({
8
8
  displayName: "AddItemWithNamestyles__AddItemLabel",
9
9
  componentId: "sc-8u2fy8-1"
10
- })(["margin-left:12px;"]);
10
+ })(["margin-left:12px;"]);
11
+ export {
12
+ AddItemLabel,
13
+ AddItemLayout
14
+ };
@@ -1,4 +1,4 @@
1
- import type { ReactNode } from 'react';
1
+ import { ReactNode } from 'react';
2
2
  export type Props = {
3
3
  onItemAdd?: (addParams: {
4
4
  name: string;
@@ -1 +1 @@
1
- export {};
1
+
@@ -1,4 +1,4 @@
1
- import React from 'react';
2
- import { type BlankItemProps } from './BlankItem.types';
1
+ import { default as React } from 'react';
2
+ import { BlankItemProps } from './BlankItem.types';
3
3
  declare const BlankItem: <T extends object>({ onRemove, onDuplicate, draggable, renderItem, item, texts, rowGap, isDragPlaceholder, isDragOverlay, dragHandleProps, ...rest }: BlankItemProps<T>) => React.JSX.Element;
4
4
  export default BlankItem;
@@ -1,70 +1,52 @@
1
- var _excluded = ["onRemove", "onDuplicate", "draggable", "renderItem", "item", "texts", "rowGap", "isDragPlaceholder", "isDragOverlay", "dragHandleProps"];
2
- 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); }
3
- 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; }
4
- import React, { useCallback } from 'react';
5
- import { useTheme } from '@synerise/ds-core';
6
- import Icon, { CloseS, DragHandleM, DuplicateS } from '@synerise/ds-icon';
7
- import Tooltip from '@synerise/ds-tooltip';
8
- import { useTexts } from '../../hooks/useTexts';
9
- import * as S from './BlankItem.styles';
10
- var BlankItem = function BlankItem(_ref) {
11
- var onRemove = _ref.onRemove,
12
- onDuplicate = _ref.onDuplicate,
13
- draggable = _ref.draggable,
14
- renderItem = _ref.renderItem,
15
- item = _ref.item,
16
- texts = _ref.texts,
17
- _ref$rowGap = _ref.rowGap,
18
- rowGap = _ref$rowGap === void 0 ? 16 : _ref$rowGap,
19
- isDragPlaceholder = _ref.isDragPlaceholder,
20
- isDragOverlay = _ref.isDragOverlay,
21
- dragHandleProps = _ref.dragHandleProps,
22
- rest = _objectWithoutPropertiesLoose(_ref, _excluded);
23
- var theme = useTheme();
24
- var allTexts = useTexts(texts);
25
- var handleRemove = useCallback(function (event) {
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { useCallback } from "react";
3
+ import { useTheme } from "@synerise/ds-core";
4
+ import Icon, { DragHandleM, DuplicateS, CloseS } from "@synerise/ds-icon";
5
+ import Tooltip from "@synerise/ds-tooltip";
6
+ import { useTexts } from "../../hooks/useTexts.js";
7
+ import { BlankItemWrapper, DragHandle, BlankItemContent, BlankItemActions } from "./BlankItem.styles.js";
8
+ const BlankItem = ({
9
+ onRemove,
10
+ onDuplicate,
11
+ draggable,
12
+ renderItem,
13
+ item,
14
+ texts,
15
+ rowGap = 16,
16
+ isDragPlaceholder,
17
+ isDragOverlay,
18
+ dragHandleProps,
19
+ ...rest
20
+ }) => {
21
+ const theme = useTheme();
22
+ const allTexts = useTexts(texts);
23
+ const handleRemove = useCallback((event) => {
26
24
  event.stopPropagation();
27
- var id = item.id;
25
+ const {
26
+ id
27
+ } = item;
28
28
  onRemove && onRemove({
29
- id: id
29
+ id
30
30
  });
31
31
  }, [item, onRemove]);
32
- var handleDuplicate = useCallback(function (event) {
32
+ const handleDuplicate = useCallback((event) => {
33
33
  event.stopPropagation();
34
- var id = item.id;
34
+ const {
35
+ id
36
+ } = item;
35
37
  onDuplicate && onDuplicate({
36
- id: id
38
+ id
37
39
  });
38
40
  }, [item, onDuplicate]);
39
- return /*#__PURE__*/React.createElement(S.BlankItemWrapper, _extends({
40
- isDragPlaceholder: isDragPlaceholder,
41
- isDragOverlay: isDragOverlay,
42
- key: item.id,
43
- "data-testid": "manageable-list-blank-item",
44
- rowGap: rowGap
45
- }, rest), (draggable || isDragOverlay) && /*#__PURE__*/React.createElement(S.DragHandle, dragHandleProps, /*#__PURE__*/React.createElement(Icon, {
46
- size: 24,
47
- component: /*#__PURE__*/React.createElement(DragHandleM, {
48
- color: "currentColor"
49
- })
50
- })), /*#__PURE__*/React.createElement(S.BlankItemContent, null, renderItem(item)), (onRemove || onDuplicate) && /*#__PURE__*/React.createElement(S.BlankItemActions, null, onDuplicate && /*#__PURE__*/React.createElement(Tooltip, {
51
- type: "default",
52
- trigger: "hover",
53
- title: allTexts.itemActionDuplicateTooltip
54
- }, /*#__PURE__*/React.createElement(Icon, {
55
- component: /*#__PURE__*/React.createElement(DuplicateS, null),
56
- color: theme.palette['grey-600'],
57
- size: 24,
58
- onClick: handleDuplicate
59
- })), onRemove && /*#__PURE__*/React.createElement(Tooltip, {
60
- type: "default",
61
- trigger: "hover",
62
- title: allTexts.itemActionDeleteTooltip
63
- }, /*#__PURE__*/React.createElement(Icon, {
64
- component: /*#__PURE__*/React.createElement(CloseS, null),
65
- size: 24,
66
- color: theme.palette['red-600'],
67
- onClick: handleRemove
68
- }))));
41
+ return /* @__PURE__ */ jsxs(BlankItemWrapper, { isDragPlaceholder, isDragOverlay, "data-testid": "manageable-list-blank-item", rowGap, ...rest, children: [
42
+ (draggable || isDragOverlay) && /* @__PURE__ */ jsx(DragHandle, { ...dragHandleProps, children: /* @__PURE__ */ jsx(Icon, { size: 24, component: /* @__PURE__ */ jsx(DragHandleM, { color: "currentColor" }) }) }),
43
+ /* @__PURE__ */ jsx(BlankItemContent, { children: renderItem(item) }),
44
+ (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, {}), color: theme.palette["grey-600"], size: 24, onClick: handleDuplicate }) }),
46
+ onRemove && /* @__PURE__ */ jsx(Tooltip, { type: "default", trigger: "hover", title: allTexts.itemActionDeleteTooltip, children: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(CloseS, {}), size: 24, color: theme.palette["red-600"], onClick: handleRemove }) })
47
+ ] })
48
+ ] }, item.id);
49
+ };
50
+ export {
51
+ BlankItem as default
69
52
  };
70
- export default BlankItem;
@@ -1,8 +1,8 @@
1
- export declare const BlankItemActions: import("styled-components").StyledComponent<"div", any, {}, never>;
2
- export declare const DragHandle: import("styled-components").StyledComponent<"div", any, {}, never>;
3
- export declare const BlankItemWrapper: import("styled-components").StyledComponent<"div", any, {
1
+ export declare const BlankItemActions: import('styled-components').StyledComponent<"div", any, {}, never>;
2
+ export declare const DragHandle: import('styled-components').StyledComponent<"div", any, {}, never>;
3
+ export declare const BlankItemWrapper: import('styled-components').StyledComponent<"div", any, {
4
4
  rowGap: number;
5
5
  isDragPlaceholder?: boolean;
6
6
  isDragOverlay?: boolean;
7
7
  }, never>;
8
- export declare const BlankItemContent: import("styled-components").StyledComponent<"div", any, {}, never>;
8
+ export declare const BlankItemContent: import('styled-components').StyledComponent<"div", any, {}, never>;
@@ -1,29 +1,34 @@
1
- import styled from 'styled-components';
2
- export var BlankItemActions = styled.div.withConfig({
1
+ import styled from "styled-components";
2
+ const BlankItemActions = /* @__PURE__ */ styled.div.withConfig({
3
3
  displayName: "BlankItemstyles__BlankItemActions",
4
4
  componentId: "sc-19vgbbk-0"
5
- })(["opacity:0;flex:0 1 auto;transition:opacity 0.2s;svg:hover{fill:", ";}"], function (props) {
6
- return props.theme.palette['blue-600'];
7
- });
8
- export var DragHandle = styled.div.withConfig({
5
+ })(["opacity:0;flex:0 1 auto;transition:opacity 0.2s;svg:hover{fill:", ";}"], (props) => props.theme.palette["blue-600"]);
6
+ const DragHandle = /* @__PURE__ */ styled.div.withConfig({
9
7
  displayName: "BlankItemstyles__DragHandle",
10
8
  componentId: "sc-19vgbbk-1"
11
- })(["flex:0 1 auto;cursor:grab;svg{fill:", ";}&:hover{svg{fill:", ";}}"], function (props) {
12
- return props.theme.palette['grey-400'];
13
- }, function (props) {
14
- return props.theme.palette['grey-600'];
15
- });
16
- export var BlankItemWrapper = styled.div.withConfig({
9
+ })(["flex:0 1 auto;cursor:grab;svg{fill:", ";}&:hover{svg{fill:", ";}}"], (props) => props.theme.palette["grey-400"], (props) => props.theme.palette["grey-600"]);
10
+ const BlankItemWrapper = /* @__PURE__ */ styled.div.withConfig({
17
11
  displayName: "BlankItemstyles__BlankItemWrapper",
18
12
  componentId: "sc-19vgbbk-2"
19
- })(["", " ", " display:flex;align-items:center;justify-content:space-between;margin-bottom:", "px;&:hover{", "{opacity:1;}}"], function (props) {
20
- return props.isDragPlaceholder && " \n background: " + props.theme.palette['blue-050'] + ";\n border: 1px dashed " + props.theme.palette['blue-300'] + ";\n border-radius: 3px;\n " + BlankItemContent + ", " + BlankItemActions + ", " + DragHandle + " {\n visibility: hidden;\n opacity: 0;\n }\n ";
21
- }, function (props) {
22
- return props.isDragOverlay && "\n box-shadow: 0px 16px 32px 0px " + props.theme.palette['grey-200'] + ";\n background: " + props.theme.palette.white + ";\n ";
23
- }, function (props) {
24
- return props.rowGap;
25
- }, BlankItemActions);
26
- export var BlankItemContent = styled.div.withConfig({
13
+ })(["", " ", " display:flex;align-items:center;justify-content:space-between;margin-bottom:", "px;&:hover{", "{opacity:1;}}"], (props) => props.isDragPlaceholder && `
14
+ background: ${props.theme.palette["blue-050"]};
15
+ border: 1px dashed ${props.theme.palette["blue-300"]};
16
+ border-radius: 3px;
17
+ ${BlankItemContent}, ${BlankItemActions}, ${DragHandle} {
18
+ visibility: hidden;
19
+ opacity: 0;
20
+ }
21
+ `, (props) => props.isDragOverlay && `
22
+ box-shadow: 0px 16px 32px 0px ${props.theme.palette["grey-200"]};
23
+ background: ${props.theme.palette.white};
24
+ `, (props) => props.rowGap, BlankItemActions);
25
+ const BlankItemContent = /* @__PURE__ */ styled.div.withConfig({
27
26
  displayName: "BlankItemstyles__BlankItemContent",
28
27
  componentId: "sc-19vgbbk-3"
29
- })(["flex:1 1 auto;"]);
28
+ })(["flex:1 1 auto;"]);
29
+ export {
30
+ BlankItemActions,
31
+ BlankItemContent,
32
+ BlankItemWrapper,
33
+ DragHandle
34
+ };
@@ -1,6 +1,6 @@
1
- import type { HTMLAttributes, ReactNode } from 'react';
2
- import type { WithHTMLAttributes } from '@synerise/ds-utils';
3
- import type { ItemProps, Texts } from '../../ManageableList.types';
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ import { WithHTMLAttributes } from '@synerise/ds-utils';
3
+ import { ItemProps, Texts } from '../../ManageableList.types';
4
4
  export type BlankItemBaseProps<T extends object> = Pick<ItemProps<T>, 'id' | 'name'>;
5
5
  export type BaseBlankItemProps<T extends object> = {
6
6
  texts?: Partial<Texts>;
@@ -1 +1 @@
1
- export {};
1
+