@synerise/ds-list-item 1.4.8 → 1.4.10

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 (71) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +27 -9
  3. package/dist/ListItem.const.d.ts +1 -1
  4. package/dist/ListItem.const.js +6 -3
  5. package/dist/ListItem.d.ts +14 -14
  6. package/dist/ListItem.js +33 -50
  7. package/dist/ListItem.styles.js +1 -0
  8. package/dist/ListItem.types.d.ts +5 -5
  9. package/dist/ListItem.types.js +13 -14
  10. package/dist/components/Danger/Danger.d.ts +4 -4
  11. package/dist/components/Danger/Danger.js +11 -12
  12. package/dist/components/Danger/Danger.styles.d.ts +3 -3
  13. package/dist/components/Danger/Danger.styles.js +23 -18
  14. package/dist/components/Divider/Divider.d.ts +2 -2
  15. package/dist/components/Divider/Divider.js +8 -9
  16. package/dist/components/Divider/Divider.styles.d.ts +2 -2
  17. package/dist/components/Divider/Divider.styles.js +7 -8
  18. package/dist/components/Divider/Divider.types.d.ts +1 -1
  19. package/dist/components/Divider/Divider.types.js +1 -1
  20. package/dist/components/GroupItem/GroupItem.d.ts +2 -2
  21. package/dist/components/GroupItem/GroupItem.js +17 -9
  22. package/dist/components/GroupItem/GroupItem.styles.d.ts +1 -1
  23. package/dist/components/GroupItem/GroupItem.styles.js +6 -5
  24. package/dist/components/Header/Header.d.ts +2 -2
  25. package/dist/components/Header/Header.js +19 -22
  26. package/dist/components/Header/Header.styles.d.ts +2 -2
  27. package/dist/components/Header/Header.styles.js +9 -9
  28. package/dist/components/Header/Header.types.d.ts +2 -2
  29. package/dist/components/Header/Header.types.js +1 -1
  30. package/dist/components/HoverTooltip/HoverTooltip.const.d.ts +1 -1
  31. package/dist/components/HoverTooltip/HoverTooltip.const.js +13 -6
  32. package/dist/components/HoverTooltip/HoverTooltip.d.ts +2 -2
  33. package/dist/components/HoverTooltip/HoverTooltip.js +26 -44
  34. package/dist/components/HoverTooltip/HoverTooltip.styles.d.ts +1 -1
  35. package/dist/components/HoverTooltip/HoverTooltip.styles.js +6 -3
  36. package/dist/components/HoverTooltip/HoverTooltip.types.d.ts +2 -2
  37. package/dist/components/HoverTooltip/HoverTooltip.types.js +1 -1
  38. package/dist/components/ListContext/ListContext.d.ts +3 -3
  39. package/dist/components/ListContext/ListContext.js +8 -4
  40. package/dist/components/ListContext/ListContextProvider.d.ts +2 -2
  41. package/dist/components/ListContext/ListContextProvider.js +16 -19
  42. package/dist/components/ListWrapper/ListWrapper.d.ts +3 -3
  43. package/dist/components/ListWrapper/ListWrapper.js +13 -13
  44. package/dist/components/ListWrapper/ListWrapper.styles.d.ts +1 -1
  45. package/dist/components/ListWrapper/ListWrapper.styles.js +6 -5
  46. package/dist/components/Select/Select.d.ts +4 -5
  47. package/dist/components/Select/Select.js +12 -16
  48. package/dist/components/Select/Select.styles.d.ts +3 -3
  49. package/dist/components/Select/Select.styles.js +8 -7
  50. package/dist/components/SubMenu/SubMenu.d.ts +2 -2
  51. package/dist/components/SubMenu/SubMenu.js +16 -22
  52. package/dist/components/SubMenu/SubMenu.styles.d.ts +2 -2
  53. package/dist/components/SubMenu/SubMenu.styles.js +9 -7
  54. package/dist/components/Text/DynamicLabel.d.ts +1 -1
  55. package/dist/components/Text/DynamicLabel.js +15 -10
  56. package/dist/components/Text/ItemLabel.const.js +4 -1
  57. package/dist/components/Text/ItemLabel.d.ts +3 -3
  58. package/dist/components/Text/ItemLabel.js +81 -82
  59. package/dist/components/Text/Text.d.ts +4 -4
  60. package/dist/components/Text/Text.js +119 -159
  61. package/dist/components/Text/Text.styles.d.ts +14 -14
  62. package/dist/components/Text/Text.styles.js +49 -85
  63. package/dist/components/Text/utils.d.ts +2 -2
  64. package/dist/components/Text/utils.js +27 -27
  65. package/dist/components/index.js +12 -5
  66. package/dist/hooks/useTemporaryLabel.d.ts +1 -1
  67. package/dist/hooks/useTemporaryLabel.js +12 -13
  68. package/dist/index.js +22 -7
  69. package/dist/modules.d.js +1 -1
  70. package/dist/modules.d.ts +0 -0
  71. package/package.json +9 -9
package/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
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.4.10](https://github.com/Synerise/synerise-design/compare/@synerise/ds-list-item@1.4.9...@synerise/ds-list-item@1.4.10) (2026-03-24)
7
+
8
+ **Note:** Version bump only for package @synerise/ds-list-item
9
+
10
+ ## [1.4.9](https://github.com/Synerise/synerise-design/compare/@synerise/ds-list-item@1.4.8...@synerise/ds-list-item@1.4.9) (2026-03-20)
11
+
12
+ **Note:** Version bump only for package @synerise/ds-list-item
13
+
6
14
  ## [1.4.8](https://github.com/Synerise/synerise-design/compare/@synerise/ds-list-item@1.4.7...@synerise/ds-list-item@1.4.8) (2026-03-09)
7
15
 
8
16
  **Note:** Version bump only for package @synerise/ds-list-item
package/README.md CHANGED
@@ -11,6 +11,8 @@ ListItem UI Component
11
11
  npm i @synerise/ds-list-item
12
12
  or
13
13
  yarn add @synerise/ds-list-item
14
+ or
15
+ pnpm add @synerise/ds-list-item
14
16
  ```
15
17
 
16
18
  ## Usage
@@ -33,19 +35,19 @@ import ListItem from '@synerise/ds-list-item'
33
35
  | className | Extra styles | string | - |
34
36
  | children | ListItem content | React.ReactNode | - |
35
37
  | checked | for type="select" it renders a check icon as suffix, for other types only an additional classname | `boolean` | - |
36
- | copyable | Allow copying value by clicking | `boolean` | - |
37
- | copyHint | Content that disaplys on hover if copyable | `ReactNode` | - |
38
- | copyValue | Value that gets copied to clipboard | `string` | - |
39
- | copyTooltip | Content displayed in tooltip after copying | `ReactNode` | - |
38
+ | copyable | Allow copying value by clicking. Prefer object form `{ copyValue, copiedLabel?, timeToReset?, delayClickEvent? }` | `boolean` | `Copyable` | - |
39
+ | copyHint | **Deprecated** no longer rendered | `ReactNode` | - |
40
+ | copyValue | **Deprecated** use `copyable: { copyValue }` instead | `string` | - |
41
+ | copyTooltip | **Deprecated** no longer rendered | `ReactNode` | - |
40
42
  | description | 2nd line of content in item | `ReactNode` | - |
41
43
  | disabled | renders disabled / unclickable item | `boolean` | - |
42
44
  | higher | Applies to `type "divider"` only | `boolean` | - |
43
45
  | highlight | string to highlight in items | `string` | - |
44
- | hoverTooltipProps | Props for hover tooltip. see rc-trigger for details | `TriggerProps & { ref?: React.LegacyRef<TriggerHandle> }` | - |
46
+ | popoverProps | Options for the hover tooltip popover (used with `renderHoverTooltip`) | `{ placement?, getPopupContainer?, offsetConfig?, flipConfig?, shiftConfig?, initialOpen? }` | - |
45
47
  | key | unique key | `string / number` | - |
46
48
  | level | Applies to `type "divider"` only | `number` | - |
47
49
  | onItemHover | hoverHandler | `(item: ItemData<MouseEvent<HTMLDivElement>>) => void` | - |
48
- | onClick | onClick handler | `(item: ItemData<MouseEvent<HTMLDivElement>>) => void` | - |
50
+ | onClick | onClick/onKeyDown handler | `(item: ItemData<MouseEvent<HTMLDivElement> \| KeyboardEvent<HTMLDivElement>>) => void` | - |
49
51
  | ordered | renders ordinal numbers in items | `boolean` | - |
50
52
  | parent | if true will display an arrow icon next to label | `boolean` | - |
51
53
  | prefixel | prefix element | `ReactNode` &#124; `AddonRenderer` | - |
@@ -55,12 +57,28 @@ import ListItem from '@synerise/ds-list-item'
55
57
  | suffixel | suffix element. Item with type="select" and checked also displays a check icon | `ReactNode` &#124; `AddonRenderer` | - |
56
58
  | suffixVisibilityTrigger | drives suffix visibility | `'hover'` &#124; `'default'` | - |
57
59
  | text | prop alternative to `children` | `ReactNode` | - |
58
- | timeToHideTooltip | copy tooltip delay | `number` | - |
60
+ | timeToHideTooltip | **Deprecated** no longer rendered | `number` | - |
59
61
  | title | title attribute (a11y prop) | `string` | - |
60
- | tooltipProps | Tooltip props for "copied" tooltip. See @synerise/ds-tooltip | `TooltipProps` | - |
61
- | type | Type of the list item | `"default"` &#124; `"danger"` &#124; `"divider"` &#124; `"select"` | - |
62
+ | tooltipProps | **Deprecated** no longer rendered | `TooltipProps` | - |
63
+ | type | Type of the list item | `"default"` &#124; `"danger"` &#124; `"divider"` &#124; `"select"` &#124; `"header"` | - |
62
64
  | featured | featured item will have a blue label and blue prefixel / suffixel icons | `boolean` | - |
65
+ | selected | additional selected state | `boolean` | - |
66
+ | itemKey | stable key used in `ItemData` callback payload; falls back to a stable UUID | `string \| number` | - |
67
+ | subMenu | inline collapsible sub-list; clicking the item toggles it open/closed | `ListItemProps[]` | - |
68
+ | indentLevel | left indent depth; each level adds 20px | `number` | - |
69
+ | direction | text direction | `'ltr'` &#124; `'rtl'` | - |
70
+
71
+
72
+ ### Copyable
63
73
 
74
+ ```typescript
75
+ type Copyable = {
76
+ copyValue: string;
77
+ copiedLabel?: ReactNode; // label shown temporarily after copy
78
+ timeToReset?: number; // ms to show copiedLabel (default 1000)
79
+ delayClickEvent?: number | false; // ms to delay onClick after copy (default 700)
80
+ };
81
+ ```
64
82
 
65
83
  ### AddonRenderer
66
84
 
@@ -1,2 +1,2 @@
1
- import { type ItemSize } from './ListItem.types';
1
+ import { ItemSize } from './ListItem.types';
2
2
  export declare const LIST_ITEM_SIZE_MAPPING: Record<ItemSize, number>;
@@ -1,4 +1,7 @@
1
- export var LIST_ITEM_SIZE_MAPPING = {
2
- "default": 32,
1
+ const LIST_ITEM_SIZE_MAPPING = {
2
+ default: 32,
3
3
  large: 50
4
- };
4
+ };
5
+ export {
6
+ LIST_ITEM_SIZE_MAPPING
7
+ };
@@ -1,40 +1,40 @@
1
- import React, { type KeyboardEvent, type MouseEvent } from 'react';
2
- import { type ListItemProps } from './ListItem.types';
3
- declare const ListItem: React.ForwardRefExoticComponent<import("./ListItem.types").ListItemDividerProps & {
1
+ import { default as React, KeyboardEvent, MouseEvent } from 'react';
2
+ import { ListItemProps } from './ListItem.types';
3
+ declare const ListItem: React.ForwardRefExoticComponent<import('./ListItem.types').ListItemDividerProps & {
4
4
  checked?: boolean;
5
5
  selected?: boolean;
6
6
  children?: React.ReactNode;
7
7
  className?: string;
8
- copyable?: boolean | import("./ListItem.types").Copyable;
8
+ copyable?: boolean | import('./ListItem.types').Copyable;
9
9
  copyValue?: string;
10
10
  copyHint?: React.ReactNode;
11
11
  copyTooltip?: React.ReactNode;
12
12
  timeToHideTooltip?: number;
13
- tooltipProps?: import("@synerise/ds-tooltip").TooltipProps;
13
+ tooltipProps?: import('@synerise/ds-tooltip').TooltipProps;
14
14
  description?: React.ReactNode;
15
15
  direction?: "ltr" | "rtl";
16
16
  disabled?: boolean;
17
17
  highlight?: string;
18
- popoverProps?: Pick<import("@synerise/ds-popover").PopoverOptions, "getPopupContainer" | "offsetConfig" | "flipConfig" | "shiftConfig" | "initialOpen"> & {
19
- placement?: import("@synerise/ds-popover").LegacyPlacement;
18
+ popoverProps?: Pick<import('@synerise/ds-popover').PopoverOptions, "getPopupContainer" | "offsetConfig" | "flipConfig" | "shiftConfig" | "initialOpen"> & {
19
+ placement?: import('@synerise/ds-popover').LegacyPlacement;
20
20
  };
21
21
  key?: React.Key;
22
22
  itemKey?: React.Key;
23
23
  noHover?: boolean;
24
- onItemHover?: import("./ListItem.types").ListItemEventHandler<MouseEvent<HTMLDivElement>>;
25
- onClick?: import("./ListItem.types").ListItemEventHandler<MouseEvent<HTMLDivElement> | KeyboardEvent<HTMLDivElement>>;
24
+ onItemHover?: import('./ListItem.types').ListItemEventHandler<MouseEvent<HTMLDivElement>>;
25
+ onClick?: import('./ListItem.types').ListItemEventHandler<MouseEvent<HTMLDivElement> | KeyboardEvent<HTMLDivElement>>;
26
26
  ordered?: boolean;
27
27
  parent?: boolean;
28
- prefixel?: React.ReactNode | import("./ListItem.types").AddonRenderer;
28
+ prefixel?: React.ReactNode | import('./ListItem.types').AddonRenderer;
29
29
  prefixVisibilityTrigger?: "hover" | "default";
30
30
  renderHoverTooltip?: () => JSX.Element;
31
- size?: import("./ListItem.types").ItemSize;
32
- suffixel?: React.ReactNode | import("./ListItem.types").AddonRenderer;
31
+ size?: import('./ListItem.types').ItemSize;
32
+ suffixel?: React.ReactNode | import('./ListItem.types').AddonRenderer;
33
33
  suffixVisibilityTrigger?: "hover" | "default";
34
34
  text?: React.ReactNode;
35
- type?: import("./ListItem.types").ItemType;
35
+ type?: import('./ListItem.types').ItemType;
36
36
  subMenu?: ListItemProps[];
37
37
  indentLevel?: number;
38
38
  featured?: boolean;
39
- } & Omit<React.HTMLAttributes<HTMLDivElement>, "className" | "children" | "onClick" | keyof import("./ListItem.types").ListItemDividerProps | "checked" | "selected" | "copyable" | "copyValue" | "copyHint" | "copyTooltip" | "timeToHideTooltip" | "tooltipProps" | "description" | "direction" | "disabled" | "highlight" | "popoverProps" | "key" | "itemKey" | "noHover" | "onItemHover" | "ordered" | "parent" | "prefixel" | "prefixVisibilityTrigger" | "renderHoverTooltip" | "size" | "suffixel" | "suffixVisibilityTrigger" | "text" | "type" | "subMenu" | "indentLevel" | "featured"> & import("@synerise/ds-utils").DataAttributes & React.RefAttributes<HTMLDivElement>>;
39
+ } & Omit<React.HTMLAttributes<HTMLDivElement>, "className" | "children" | "onClick" | keyof import('./ListItem.types').ListItemDividerProps | "checked" | "selected" | "copyable" | "copyValue" | "copyHint" | "copyTooltip" | "timeToHideTooltip" | "tooltipProps" | "description" | "direction" | "disabled" | "highlight" | "popoverProps" | "key" | "itemKey" | "noHover" | "onItemHover" | "ordered" | "parent" | "prefixel" | "prefixVisibilityTrigger" | "renderHoverTooltip" | "size" | "suffixel" | "suffixVisibilityTrigger" | "text" | "type" | "subMenu" | "indentLevel" | "featured"> & import('@synerise/ds-utils').DataAttributes & React.RefAttributes<HTMLDivElement>>;
40
40
  export default ListItem;
package/dist/ListItem.js CHANGED
@@ -1,60 +1,43 @@
1
- var _excluded = ["text", "children", "type", "onClick"];
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, { forwardRef, useContext } from 'react';
5
- import { useDropdown } from '@synerise/ds-core';
6
- import { itemTypes } from './ListItem.types';
7
- import Danger from './components/Danger/Danger';
8
- import { Divider } from './components/Divider/Divider';
9
- import { Header } from './components/Header/Header';
10
- import { ListContext } from './components/ListContext/ListContext';
11
- import Select from './components/Select/Select';
12
- import Text from './components/Text/Text';
13
- var ListItem = /*#__PURE__*/forwardRef(function (props, forwardedRef) {
14
- var text = props.text,
15
- children = props.children,
16
- type = props.type,
17
- onClickProp = props.onClick,
18
- rest = _objectWithoutPropertiesLoose(props, _excluded);
19
- var listItemContext = useContext(ListContext);
20
- var dropdownContext = useDropdown();
21
- var handleClick = function handleClick(itemData) {
22
- listItemContext == null || listItemContext.onClick == null || listItemContext.onClick(itemData);
23
- onClickProp == null || onClickProp(itemData);
24
- if ((dropdownContext == null ? void 0 : dropdownContext.hideOnItemClick) === true) {
25
- dropdownContext == null || dropdownContext.setIsOpen(false);
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { forwardRef, useContext } from "react";
3
+ import { useDropdown } from "@synerise/ds-core";
4
+ import { itemTypes } from "./ListItem.types.js";
5
+ import Danger from "./components/Danger/Danger.js";
6
+ import { Divider } from "./components/Divider/Divider.js";
7
+ import { Header } from "./components/Header/Header.js";
8
+ import { ListContext } from "./components/ListContext/ListContext.js";
9
+ import Select from "./components/Select/Select.js";
10
+ import Text from "./components/Text/Text.js";
11
+ const ListItem = forwardRef((props, forwardedRef) => {
12
+ const {
13
+ text,
14
+ children,
15
+ type,
16
+ onClick: onClickProp,
17
+ ...rest
18
+ } = props;
19
+ const listItemContext = useContext(ListContext);
20
+ const dropdownContext = useDropdown();
21
+ const handleClick = (itemData) => {
22
+ listItemContext?.onClick?.(itemData);
23
+ onClickProp?.(itemData);
24
+ if (dropdownContext?.hideOnItemClick === true) {
25
+ dropdownContext?.setIsOpen(false);
26
26
  }
27
27
  };
28
28
  switch (type) {
29
29
  case itemTypes.DANGER:
30
- return /*#__PURE__*/React.createElement(Danger, _extends({
31
- ref: forwardedRef,
32
- onClick: handleClick,
33
- ItemComponent: ListItem
34
- }, rest), text || children);
30
+ return /* @__PURE__ */ jsx(Danger, { ref: forwardedRef, onClick: handleClick, ItemComponent: ListItem, ...rest, children: text || children });
35
31
  case itemTypes.SELECT:
36
- return /*#__PURE__*/React.createElement(Select, _extends({
37
- ref: forwardedRef,
38
- onClick: handleClick,
39
- ItemComponent: ListItem
40
- }, rest), text || children);
32
+ return /* @__PURE__ */ jsx(Select, { ref: forwardedRef, onClick: handleClick, ItemComponent: ListItem, ...rest, children: text || children });
41
33
  case itemTypes.DIVIDER:
42
- return /*#__PURE__*/React.createElement(Divider, {
43
- level: rest.level
44
- });
34
+ return /* @__PURE__ */ jsx(Divider, { level: rest.level });
45
35
  case itemTypes.HEADER:
46
- return /*#__PURE__*/React.createElement(Header, {
47
- ref: forwardedRef,
48
- style: rest.style,
49
- className: rest.className
50
- }, text || children);
36
+ return /* @__PURE__ */ jsx(Header, { ref: forwardedRef, style: rest.style, className: rest.className, children: text || children });
51
37
  default:
52
- return /*#__PURE__*/React.createElement(Text, _extends({
53
- ref: forwardedRef,
54
- onClick: handleClick
55
- }, rest, {
56
- ItemComponent: ListItem
57
- }), text || children);
38
+ return /* @__PURE__ */ jsx(Text, { ref: forwardedRef, onClick: handleClick, ...rest, ItemComponent: ListItem, children: text || children });
58
39
  }
59
40
  });
60
- export default ListItem;
41
+ export {
42
+ ListItem as default
43
+ };
@@ -0,0 +1 @@
1
+
@@ -1,8 +1,8 @@
1
- import type { ComponentType, ForwardRefExoticComponent, Key, KeyboardEvent, MouseEvent, ReactNode, RefAttributes } from 'react';
2
- import { type StyledComponent } from 'styled-components';
3
- import { type LegacyPlacement, type PopoverOptions } from '@synerise/ds-popover';
4
- import type { TooltipProps } from '@synerise/ds-tooltip';
5
- import type { WithHTMLAttributes } from '@synerise/ds-utils';
1
+ import { ComponentType, ForwardRefExoticComponent, Key, KeyboardEvent, MouseEvent, ReactNode, RefAttributes } from 'react';
2
+ import { StyledComponent } from 'styled-components';
3
+ import { LegacyPlacement, PopoverOptions } from '@synerise/ds-popover';
4
+ import { TooltipProps } from '@synerise/ds-tooltip';
5
+ import { WithHTMLAttributes } from '@synerise/ds-utils';
6
6
  export type AddonRenderer = (hovered: boolean) => ReactNode;
7
7
  export declare const itemTypes: {
8
8
  readonly DEFAULT: "default";
@@ -1,16 +1,15 @@
1
- export var itemTypes = {
2
- DEFAULT: 'default',
3
- DANGER: 'danger',
4
- DIVIDER: 'divider',
5
- SELECT: 'select',
6
- HEADER: 'header'
1
+ const itemTypes = {
2
+ DEFAULT: "default",
3
+ DANGER: "danger",
4
+ DIVIDER: "divider",
5
+ SELECT: "select",
6
+ HEADER: "header"
7
7
  };
8
- export var itemSizes = {
9
- DEFAULT: 'default',
10
- LARGE: 'large'
8
+ const itemSizes = {
9
+ DEFAULT: "default",
10
+ LARGE: "large"
11
+ };
12
+ export {
13
+ itemSizes,
14
+ itemTypes
11
15
  };
12
-
13
- /**
14
- * @deprecated
15
- * provide Copyable type instead
16
- */
@@ -1,6 +1,6 @@
1
- import React from 'react';
2
- import type { NestedItemProps } from '../../ListItem.types';
3
- declare const Danger: React.ForwardRefExoticComponent<Omit<import("../../ListItem.types").ListItemProps, "level" | "higher" | "text" | "type"> & {
4
- ItemComponent: React.ComponentType<import("../../ListItem.types").ListItemProps>;
1
+ import { default as React } from 'react';
2
+ import { NestedItemProps } from '../../ListItem.types';
3
+ declare const Danger: React.ForwardRefExoticComponent<Omit<import('../../ListItem.types').ListItemProps, "level" | "higher" | "text" | "type"> & {
4
+ ItemComponent: React.ComponentType<import('../../ListItem.types').ListItemProps>;
5
5
  } & NestedItemProps & React.RefAttributes<HTMLDivElement>>;
6
6
  export default Danger;
@@ -1,13 +1,12 @@
1
- var _excluded = ["children"];
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, { forwardRef } from 'react';
5
- import * as S from './Danger.styles';
6
- var Danger = /*#__PURE__*/forwardRef(function (_ref, ref) {
7
- var children = _ref.children,
8
- rest = _objectWithoutPropertiesLoose(_ref, _excluded);
9
- return /*#__PURE__*/React.createElement(S.DangerItem, _extends({}, rest, {
10
- ref: ref
11
- }), children);
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from "react";
3
+ import { DangerItem } from "./Danger.styles.js";
4
+ const Danger = forwardRef(({
5
+ children,
6
+ ...rest
7
+ }, ref) => {
8
+ return /* @__PURE__ */ jsx(DangerItem, { ...rest, ref, children });
12
9
  });
13
- export default Danger;
10
+ export {
11
+ Danger as default
12
+ };
@@ -1,3 +1,3 @@
1
- export declare const DangerItem: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<Omit<import("../..").ListItemProps, "level" | "higher" | "text" | "type"> & {
2
- ItemComponent: import("react").ComponentType<import("../..").ListItemProps>;
3
- } & import("../../ListItem.types").NestedItemProps & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
1
+ export declare const DangerItem: import('styled-components').StyledComponent<import('react').ForwardRefExoticComponent<Omit<import('../..').ListItemProps, "level" | "higher" | "text" | "type"> & {
2
+ ItemComponent: import('react').ComponentType<import('../..').ListItemProps>;
3
+ } & import('../../ListItem.types').NestedItemProps & import('react').RefAttributes<HTMLDivElement>>, any, {}, never>;
@@ -1,20 +1,25 @@
1
- import styled from 'styled-components';
2
- import { IconContainer } from '@synerise/ds-icon';
3
- import Text from '../Text/Text';
4
- import { Inner, PrefixWrapper, Wrapper } from '../Text/Text.styles';
5
- export var DangerItem = styled(Text).withConfig({
1
+ import styled from "styled-components";
2
+ import { IconContainer } from "@synerise/ds-icon";
3
+ import Text from "../Text/Text.js";
4
+ import { Inner, Wrapper, PrefixWrapper } from "../Text/Text.styles.js";
5
+ const DangerItem = /* @__PURE__ */ styled(Text).withConfig({
6
6
  displayName: "Dangerstyles__DangerItem",
7
7
  componentId: "sc-1v6qv1-0"
8
- })(["&&&{", "{color:", ";", "{color:", ";}", "{.ds-icon > svg{", "}}&:hover{", "}&:focus-visible{", "}&:focus-visible:active{", "}}}"], Inner, function (props) {
9
- return props.theme.palette['red-600'];
10
- }, Wrapper, function (props) {
11
- return props.theme.palette['red-600'];
12
- }, PrefixWrapper, function (props) {
13
- return "\n fill: " + props.theme.palette['red-600'] + ";\n ";
14
- }, function (props) {
15
- return !props.disabled && "\n " + PrefixWrapper + " > " + IconContainer + " > svg {\n fill: " + props.theme.palette['red-600'] + " !important;\n }\n background: " + props.theme.palette['red-050'] + ";\n ";
16
- }, function (props) {
17
- return !props.disabled && "\n " + PrefixWrapper + " > " + IconContainer + " > svg {\n fill: " + props.theme.palette['red-600'] + " !important;\n }\n background: " + props.theme.palette['red-050'] + " !important;\n ";
18
- }, function (props) {
19
- return !props.disabled && "\n background: " + props.theme.palette['red-100'] + " !important;\n ";
20
- });
8
+ })(["&&&{", "{color:", ";", "{color:", ";}", "{.ds-icon > svg{", "}}&:hover{", "}&:focus-visible{", "}&:focus-visible:active{", "}}}"], Inner, (props) => props.theme.palette["red-600"], Wrapper, (props) => props.theme.palette["red-600"], PrefixWrapper, (props) => `
9
+ fill: ${props.theme.palette["red-600"]};
10
+ `, (props) => !props.disabled && `
11
+ ${PrefixWrapper} > ${IconContainer} > svg {
12
+ fill: ${props.theme.palette["red-600"]} !important;
13
+ }
14
+ background: ${props.theme.palette["red-050"]};
15
+ `, (props) => !props.disabled && `
16
+ ${PrefixWrapper} > ${IconContainer} > svg {
17
+ fill: ${props.theme.palette["red-600"]} !important;
18
+ }
19
+ background: ${props.theme.palette["red-050"]} !important;
20
+ `, (props) => !props.disabled && `
21
+ background: ${props.theme.palette["red-100"]} !important;
22
+ `);
23
+ export {
24
+ DangerItem
25
+ };
@@ -1,3 +1,3 @@
1
- import React from 'react';
2
- import { type DividerProps } from './Divider.types';
1
+ import { default as React } from 'react';
2
+ import { DividerProps } from './Divider.types';
3
3
  export declare const Divider: (props: DividerProps) => React.JSX.Element;
@@ -1,9 +1,8 @@
1
- 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); }
2
- import React from 'react';
3
- import * as S from './Divider.styles';
4
- export var Divider = function Divider(props) {
5
- return /*#__PURE__*/React.createElement(S.MenuDivider, _extends({
6
- withSideMargin: true,
7
- dashed: true
8
- }, props));
9
- };
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { MenuDivider } from "./Divider.styles.js";
3
+ const Divider = (props) => {
4
+ return /* @__PURE__ */ jsx(MenuDivider, { withSideMargin: true, dashed: true, ...props });
5
+ };
6
+ export {
7
+ Divider
8
+ };
@@ -1,2 +1,2 @@
1
- import { type DividerProps } from './Divider.types';
2
- export declare const MenuDivider: import("styled-components").StyledComponent<(props: import("@synerise/ds-divider").DividerProps) => React.JSX.Element, any, DividerProps, never>;
1
+ import { DividerProps } from './Divider.types';
2
+ export declare const MenuDivider: import('styled-components').StyledComponent<(props: import('@synerise/ds-divider').DividerProps) => React.JSX.Element, any, DividerProps, never>;
@@ -1,10 +1,9 @@
1
- import styled from 'styled-components';
2
- import DSDivider from '@synerise/ds-divider';
3
- export var MenuDivider = styled(DSDivider).withConfig({
1
+ import styled from "styled-components";
2
+ import DSDivider from "@synerise/ds-divider";
3
+ const MenuDivider = /* @__PURE__ */ styled(DSDivider).withConfig({
4
4
  displayName: "Dividerstyles__MenuDivider",
5
5
  componentId: "sc-nbfv08-0"
6
- })(["height:1px;width:auto;display:flex;margin:", " ", ";"], function (props) {
7
- return props.higher ? '16px' : '8px';
8
- }, function (props) {
9
- return props != null && props.level && (props == null ? void 0 : props.level) > 1 ? '35px' : '12px';
10
- });
6
+ })(["height:1px;width:auto;display:flex;margin:", " ", ";"], (props) => props.higher ? "16px" : "8px", (props) => props?.level && props?.level > 1 ? "35px" : "12px");
7
+ export {
8
+ MenuDivider
9
+ };
@@ -1,4 +1,4 @@
1
- import { type WithHTMLAttributes } from '@synerise/ds-utils';
1
+ import { WithHTMLAttributes } from '@synerise/ds-utils';
2
2
  export type DividerProps = WithHTMLAttributes<HTMLDivElement, {
3
3
  higher?: boolean;
4
4
  level?: number;
@@ -1 +1 @@
1
- export {};
1
+
@@ -1,5 +1,5 @@
1
- import React, { type ReactNode } from 'react';
2
- import { type ListItemProps } from '../../ListItem.types';
1
+ import { default as React, ReactNode } from 'react';
2
+ import { ListItemProps } from '../../ListItem.types';
3
3
  type GroupItemProps = {
4
4
  title: ReactNode;
5
5
  children?: ReactNode;
@@ -1,9 +1,17 @@
1
- import React from 'react';
2
- import ListItem from '../../ListItem';
3
- import * as S from './GroupItem.styles';
4
- export var GroupItem = function GroupItem(_ref) {
5
- var title = _ref.title,
6
- items = _ref.items,
7
- children = _ref.children;
8
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(S.Title, null, title), items == null ? void 0 : items.map(ListItem), children);
9
- };
1
+ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
+ import ListItem from "../../ListItem.js";
3
+ import { Title } from "./GroupItem.styles.js";
4
+ const GroupItem = ({
5
+ title,
6
+ items,
7
+ children
8
+ }) => {
9
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
10
+ /* @__PURE__ */ jsx(Title, { children: title }),
11
+ items?.map(ListItem),
12
+ children
13
+ ] });
14
+ };
15
+ export {
16
+ GroupItem
17
+ };
@@ -1 +1 @@
1
- export declare const Title: import("styled-components").StyledComponent<"div", any, {}, never>;
1
+ export declare const Title: import('styled-components').StyledComponent<"div", any, {}, never>;
@@ -1,7 +1,8 @@
1
- import styled from 'styled-components';
2
- export var Title = styled.div.withConfig({
1
+ import styled from "styled-components";
2
+ const Title = /* @__PURE__ */ styled.div.withConfig({
3
3
  displayName: "GroupItemstyles__Title",
4
4
  componentId: "sc-1ut24k3-0"
5
- })(["font-size:10px;line-height:1.6;font-weight:500;text-transform:uppercase;color:", ";padding:8px 0;"], function (props) {
6
- return props.theme.palette['grey-500'];
7
- });
5
+ })(["font-size:10px;line-height:1.6;font-weight:500;text-transform:uppercase;color:", ";padding:8px 0;"], (props) => props.theme.palette["grey-500"]);
6
+ export {
7
+ Title
8
+ };
@@ -1,6 +1,6 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
2
  export declare const Header: React.ForwardRefExoticComponent<{
3
3
  text?: React.ReactNode;
4
4
  children?: React.ReactNode;
5
5
  tooltip?: string;
6
- } & Omit<React.HTMLAttributes<HTMLDivElement>, "children" | "text" | "tooltip"> & import("@synerise/ds-utils").DataAttributes & React.RefAttributes<HTMLDivElement>>;
6
+ } & Omit<React.HTMLAttributes<HTMLDivElement>, "children" | "text" | "tooltip"> & import('@synerise/ds-utils').DataAttributes & React.RefAttributes<HTMLDivElement>>;
@@ -1,22 +1,19 @@
1
- var _excluded = ["text", "children", "tooltip"];
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, { forwardRef } from 'react';
5
- import Icon, { InfoFillS } from '@synerise/ds-icon';
6
- import Tooltip from '@synerise/ds-tooltip';
7
- import * as S from './Header.styles';
8
- export var Header = /*#__PURE__*/forwardRef(function (_ref, ref) {
9
- var text = _ref.text,
10
- children = _ref.children,
11
- tooltip = _ref.tooltip,
12
- htmlAttributes = _objectWithoutPropertiesLoose(_ref, _excluded);
13
- return /*#__PURE__*/React.createElement(S.MenuHeader, _extends({
14
- ref: ref
15
- }, htmlAttributes), text || children, tooltip && /*#__PURE__*/React.createElement(Tooltip, {
16
- type: "default",
17
- trigger: "hover",
18
- title: tooltip
19
- }, /*#__PURE__*/React.createElement(S.HeaderIconWrapper, null, /*#__PURE__*/React.createElement(Icon, {
20
- component: /*#__PURE__*/React.createElement(InfoFillS, null)
21
- }))));
22
- });
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from "react";
3
+ import Icon, { InfoFillS } from "@synerise/ds-icon";
4
+ import Tooltip from "@synerise/ds-tooltip";
5
+ import { MenuHeader, HeaderIconWrapper } from "./Header.styles.js";
6
+ const Header = forwardRef(({
7
+ text,
8
+ children,
9
+ tooltip,
10
+ ...htmlAttributes
11
+ }, ref) => {
12
+ return /* @__PURE__ */ jsxs(MenuHeader, { ref, ...htmlAttributes, children: [
13
+ text || children,
14
+ tooltip && /* @__PURE__ */ jsx(Tooltip, { type: "default", trigger: "hover", title: tooltip, children: /* @__PURE__ */ jsx(HeaderIconWrapper, { children: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(InfoFillS, {}) }) }) })
15
+ ] });
16
+ });
17
+ export {
18
+ Header
19
+ };
@@ -1,2 +1,2 @@
1
- export declare const MenuHeader: import("styled-components").StyledComponent<"div", any, {}, never>;
2
- export declare const HeaderIconWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
1
+ export declare const MenuHeader: import('styled-components').StyledComponent<"div", any, {}, never>;
2
+ export declare const HeaderIconWrapper: import('styled-components').StyledComponent<"div", any, {}, never>;