@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.
- package/CHANGELOG.md +8 -0
- package/README.md +27 -9
- package/dist/ListItem.const.d.ts +1 -1
- package/dist/ListItem.const.js +6 -3
- package/dist/ListItem.d.ts +14 -14
- package/dist/ListItem.js +33 -50
- package/dist/ListItem.styles.js +1 -0
- package/dist/ListItem.types.d.ts +5 -5
- package/dist/ListItem.types.js +13 -14
- package/dist/components/Danger/Danger.d.ts +4 -4
- package/dist/components/Danger/Danger.js +11 -12
- package/dist/components/Danger/Danger.styles.d.ts +3 -3
- package/dist/components/Danger/Danger.styles.js +23 -18
- package/dist/components/Divider/Divider.d.ts +2 -2
- package/dist/components/Divider/Divider.js +8 -9
- package/dist/components/Divider/Divider.styles.d.ts +2 -2
- package/dist/components/Divider/Divider.styles.js +7 -8
- package/dist/components/Divider/Divider.types.d.ts +1 -1
- package/dist/components/Divider/Divider.types.js +1 -1
- package/dist/components/GroupItem/GroupItem.d.ts +2 -2
- package/dist/components/GroupItem/GroupItem.js +17 -9
- package/dist/components/GroupItem/GroupItem.styles.d.ts +1 -1
- package/dist/components/GroupItem/GroupItem.styles.js +6 -5
- package/dist/components/Header/Header.d.ts +2 -2
- package/dist/components/Header/Header.js +19 -22
- package/dist/components/Header/Header.styles.d.ts +2 -2
- package/dist/components/Header/Header.styles.js +9 -9
- package/dist/components/Header/Header.types.d.ts +2 -2
- package/dist/components/Header/Header.types.js +1 -1
- package/dist/components/HoverTooltip/HoverTooltip.const.d.ts +1 -1
- package/dist/components/HoverTooltip/HoverTooltip.const.js +13 -6
- package/dist/components/HoverTooltip/HoverTooltip.d.ts +2 -2
- package/dist/components/HoverTooltip/HoverTooltip.js +26 -44
- package/dist/components/HoverTooltip/HoverTooltip.styles.d.ts +1 -1
- package/dist/components/HoverTooltip/HoverTooltip.styles.js +6 -3
- package/dist/components/HoverTooltip/HoverTooltip.types.d.ts +2 -2
- package/dist/components/HoverTooltip/HoverTooltip.types.js +1 -1
- package/dist/components/ListContext/ListContext.d.ts +3 -3
- package/dist/components/ListContext/ListContext.js +8 -4
- package/dist/components/ListContext/ListContextProvider.d.ts +2 -2
- package/dist/components/ListContext/ListContextProvider.js +16 -19
- package/dist/components/ListWrapper/ListWrapper.d.ts +3 -3
- package/dist/components/ListWrapper/ListWrapper.js +13 -13
- package/dist/components/ListWrapper/ListWrapper.styles.d.ts +1 -1
- package/dist/components/ListWrapper/ListWrapper.styles.js +6 -5
- package/dist/components/Select/Select.d.ts +4 -5
- package/dist/components/Select/Select.js +12 -16
- package/dist/components/Select/Select.styles.d.ts +3 -3
- package/dist/components/Select/Select.styles.js +8 -7
- package/dist/components/SubMenu/SubMenu.d.ts +2 -2
- package/dist/components/SubMenu/SubMenu.js +16 -22
- package/dist/components/SubMenu/SubMenu.styles.d.ts +2 -2
- package/dist/components/SubMenu/SubMenu.styles.js +9 -7
- package/dist/components/Text/DynamicLabel.d.ts +1 -1
- package/dist/components/Text/DynamicLabel.js +15 -10
- package/dist/components/Text/ItemLabel.const.js +4 -1
- package/dist/components/Text/ItemLabel.d.ts +3 -3
- package/dist/components/Text/ItemLabel.js +81 -82
- package/dist/components/Text/Text.d.ts +4 -4
- package/dist/components/Text/Text.js +119 -159
- package/dist/components/Text/Text.styles.d.ts +14 -14
- package/dist/components/Text/Text.styles.js +49 -85
- package/dist/components/Text/utils.d.ts +2 -2
- package/dist/components/Text/utils.js +27 -27
- package/dist/components/index.js +12 -5
- package/dist/hooks/useTemporaryLabel.d.ts +1 -1
- package/dist/hooks/useTemporaryLabel.js +12 -13
- package/dist/index.js +22 -7
- package/dist/modules.d.js +1 -1
- package/dist/modules.d.ts +0 -0
- 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
|
|
37
|
-
| copyHint |
|
|
38
|
-
| copyValue |
|
|
39
|
-
| copyTooltip |
|
|
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
|
-
|
|
|
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
|
|
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` | `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` | `AddonRenderer` | - |
|
|
56
58
|
| suffixVisibilityTrigger | drives suffix visibility | `'hover'` | `'default'` | - |
|
|
57
59
|
| text | prop alternative to `children` | `ReactNode` | - |
|
|
58
|
-
| timeToHideTooltip |
|
|
60
|
+
| timeToHideTooltip | **Deprecated** — no longer rendered | `number` | - |
|
|
59
61
|
| title | title attribute (a11y prop) | `string` | - |
|
|
60
|
-
| tooltipProps |
|
|
61
|
-
| type | Type of the list item | `"default"` | `"danger"` | `"divider"` | `"select"` | -
|
|
62
|
+
| tooltipProps | **Deprecated** — no longer rendered | `TooltipProps` | - |
|
|
63
|
+
| type | Type of the list item | `"default"` | `"danger"` | `"divider"` | `"select"` | `"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'` | `'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
|
|
package/dist/ListItem.const.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ItemSize } from './ListItem.types';
|
|
2
2
|
export declare const LIST_ITEM_SIZE_MAPPING: Record<ItemSize, number>;
|
package/dist/ListItem.const.js
CHANGED
package/dist/ListItem.d.ts
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import React,
|
|
2
|
-
import {
|
|
3
|
-
declare const ListItem: React.ForwardRefExoticComponent<import(
|
|
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(
|
|
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(
|
|
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(
|
|
19
|
-
placement?: import(
|
|
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(
|
|
25
|
-
onClick?: import(
|
|
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(
|
|
28
|
+
prefixel?: React.ReactNode | import('./ListItem.types').AddonRenderer;
|
|
29
29
|
prefixVisibilityTrigger?: "hover" | "default";
|
|
30
30
|
renderHoverTooltip?: () => JSX.Element;
|
|
31
|
-
size?: import(
|
|
32
|
-
suffixel?: React.ReactNode | import(
|
|
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(
|
|
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(
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
listItemContext
|
|
23
|
-
onClickProp
|
|
24
|
-
if (
|
|
25
|
-
dropdownContext
|
|
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
|
|
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
|
|
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
|
|
43
|
-
level: rest.level
|
|
44
|
-
});
|
|
34
|
+
return /* @__PURE__ */ jsx(Divider, { level: rest.level });
|
|
45
35
|
case itemTypes.HEADER:
|
|
46
|
-
return
|
|
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
|
|
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
|
|
41
|
+
export {
|
|
42
|
+
ListItem as default
|
|
43
|
+
};
|
package/dist/ListItem.styles.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
package/dist/ListItem.types.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
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";
|
package/dist/ListItem.types.js
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
DEFAULT:
|
|
3
|
-
DANGER:
|
|
4
|
-
DIVIDER:
|
|
5
|
-
SELECT:
|
|
6
|
-
HEADER:
|
|
1
|
+
const itemTypes = {
|
|
2
|
+
DEFAULT: "default",
|
|
3
|
+
DANGER: "danger",
|
|
4
|
+
DIVIDER: "divider",
|
|
5
|
+
SELECT: "select",
|
|
6
|
+
HEADER: "header"
|
|
7
7
|
};
|
|
8
|
-
|
|
9
|
-
DEFAULT:
|
|
10
|
-
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
|
|
3
|
-
declare const Danger: React.ForwardRefExoticComponent<Omit<import(
|
|
4
|
-
ItemComponent: React.ComponentType<import(
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
|
10
|
+
export {
|
|
11
|
+
Danger as default
|
|
12
|
+
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const DangerItem: import(
|
|
2
|
-
ItemComponent: import(
|
|
3
|
-
} & import(
|
|
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
|
|
2
|
-
import { IconContainer } from
|
|
3
|
-
import Text from
|
|
4
|
-
import { Inner,
|
|
5
|
-
|
|
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,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
|
|
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 {
|
|
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
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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 {
|
|
2
|
-
export declare const MenuDivider: import(
|
|
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
|
|
2
|
-
import DSDivider from
|
|
3
|
-
|
|
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:", " ", ";"],
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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 +1 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React,
|
|
2
|
-
import {
|
|
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
|
|
2
|
-
import ListItem from
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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(
|
|
1
|
+
export declare const Title: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import styled from
|
|
2
|
-
|
|
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;"],
|
|
6
|
-
|
|
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(
|
|
6
|
+
} & Omit<React.HTMLAttributes<HTMLDivElement>, "children" | "text" | "tooltip"> & import('@synerise/ds-utils').DataAttributes & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,22 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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(
|
|
2
|
-
export declare const HeaderIconWrapper: import(
|
|
1
|
+
export declare const MenuHeader: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
2
|
+
export declare const HeaderIconWrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
|