@synerise/ds-unordered-list 1.1.38 → 1.1.40
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 +21 -9
- package/dist/Elements/Item/Item.d.ts +2 -2
- package/dist/Elements/Item/Item.js +27 -19
- package/dist/Elements/Item/Item.styles.d.ts +2 -2
- package/dist/Elements/Item/Item.styles.js +8 -4
- package/dist/Unordered-list.d.ts +2 -2
- package/dist/Unordered-list.js +29 -29
- package/dist/Unordered-list.styles.d.ts +3 -3
- package/dist/Unordered-list.styles.js +12 -15
- package/dist/Unordered-list.types.d.ts +1 -1
- package/dist/Unordered-list.types.js +1 -1
- package/dist/index.js +4 -1
- package/dist/modules.d.js +1 -1
- package/dist/modules.d.ts +0 -0
- package/package.json +6 -6
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.1.40](https://github.com/Synerise/synerise-design/compare/@synerise/ds-unordered-list@1.1.39...@synerise/ds-unordered-list@1.1.40) (2026-03-24)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @synerise/ds-unordered-list
|
|
9
|
+
|
|
10
|
+
## [1.1.39](https://github.com/Synerise/synerise-design/compare/@synerise/ds-unordered-list@1.1.38...@synerise/ds-unordered-list@1.1.39) (2026-03-20)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @synerise/ds-unordered-list
|
|
13
|
+
|
|
6
14
|
## [1.1.38](https://github.com/Synerise/synerise-design/compare/@synerise/ds-unordered-list@1.1.37...@synerise/ds-unordered-list@1.1.38) (2026-03-09)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @synerise/ds-unordered-list
|
package/README.md
CHANGED
|
@@ -28,12 +28,24 @@ import UnorderedList from '@synerise/ds-unordered-list'
|
|
|
28
28
|
|
|
29
29
|
## API
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
|
34
|
-
|
|
|
35
|
-
|
|
|
36
|
-
|
|
|
37
|
-
|
|
|
38
|
-
|
|
|
39
|
-
|
|
31
|
+
### UnorderedList
|
|
32
|
+
|
|
33
|
+
| Property | Description | Type | Default |
|
|
34
|
+
| -------------- | -------------------------------------------------- | ------------------------------ | ------- |
|
|
35
|
+
| data | Items to render | `UnorderedListItem[]` | - |
|
|
36
|
+
| indexFormatter | Custom prefix renderer called with the item index | `(index: number) => ReactNode` | - |
|
|
37
|
+
| text | Optional section label rendered above the list | `React.ReactNode` | - |
|
|
38
|
+
| className | CSS class on the root element | `string` | - |
|
|
39
|
+
|
|
40
|
+
### UnorderedListItem
|
|
41
|
+
|
|
42
|
+
| Property | Description | Type | Default |
|
|
43
|
+
| ------------ | ----------------------------------------------------- | --------------------------------------- | ------- |
|
|
44
|
+
| id | Unique item identifier | `string` | - |
|
|
45
|
+
| label | Item display content | `React.ReactNode` | - |
|
|
46
|
+
| index | Numeric index passed to `indexFormatter` | `number` | - |
|
|
47
|
+
| prefixel | Rendered before the label | `React.ReactNode` | - |
|
|
48
|
+
| suffixel | Rendered after the label | `React.ReactNode` | - |
|
|
49
|
+
| subMenu | Child items; renders a nested list when present | `UnorderedListItem[]` | - |
|
|
50
|
+
| subMenuProps | Props forwarded to the nested `UnorderedList` | `Omit<UnorderedListProps, 'data'>` | - |
|
|
51
|
+
| text | Section label for the nested list | `React.ReactNode` | - |
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React,
|
|
2
|
-
import {
|
|
1
|
+
import { default as React, ReactElement } from 'react';
|
|
2
|
+
import { UnorderedListItem, UnorderedListProps } from '../../Unordered-list.types';
|
|
3
3
|
declare const _default: React.MemoExoticComponent<({ label, suffixel, prefixel, subMenu, indexFormatter, index, subMenuProps, text, NestedList, }: UnorderedListItem & Pick<UnorderedListProps, "indexFormatter"> & {
|
|
4
4
|
NestedList?: (props: UnorderedListProps) => ReactElement;
|
|
5
5
|
}) => React.JSX.Element>;
|
|
@@ -1,20 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
import React from
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { ItemWrapper, IndexFormatterWrapper } from "./Item.styles.js";
|
|
4
|
+
const Item = ({
|
|
5
|
+
label,
|
|
6
|
+
suffixel,
|
|
7
|
+
prefixel,
|
|
8
|
+
subMenu,
|
|
9
|
+
indexFormatter,
|
|
10
|
+
index,
|
|
11
|
+
subMenuProps,
|
|
12
|
+
text,
|
|
13
|
+
NestedList
|
|
14
|
+
}) => {
|
|
15
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
16
|
+
/* @__PURE__ */ jsxs(ItemWrapper, { children: [
|
|
17
|
+
indexFormatter && /* @__PURE__ */ jsx(IndexFormatterWrapper, { children: indexFormatter(index) }),
|
|
18
|
+
prefixel,
|
|
19
|
+
label,
|
|
20
|
+
suffixel
|
|
21
|
+
] }),
|
|
22
|
+
!!subMenu && subMenu?.length > 0 && NestedList && /* @__PURE__ */ jsx(NestedList, { text, indexFormatter, data: subMenu, ...subMenuProps })
|
|
23
|
+
] });
|
|
24
|
+
};
|
|
25
|
+
const Item$1 = React.memo(Item);
|
|
26
|
+
export {
|
|
27
|
+
Item$1 as default
|
|
19
28
|
};
|
|
20
|
-
export default /*#__PURE__*/React.memo(Item);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const ItemWrapper: import(
|
|
2
|
-
export declare const IndexFormatterWrapper: import(
|
|
1
|
+
export declare const ItemWrapper: import('styled-components').StyledComponent<"li", any, {}, never>;
|
|
2
|
+
export declare const IndexFormatterWrapper: import('styled-components').StyledComponent<"span", any, {
|
|
3
3
|
listStyle?: string;
|
|
4
4
|
}, never>;
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import styled from
|
|
2
|
-
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
const ItemWrapper = /* @__PURE__ */ styled.li.withConfig({
|
|
3
3
|
displayName: "Itemstyles__ItemWrapper",
|
|
4
4
|
componentId: "sc-1u5z6ql-0"
|
|
5
5
|
})(["margin:5px 0 5px 2px;display:list-item;justify-content:flex-start;align-items:center;"]);
|
|
6
|
-
|
|
6
|
+
const IndexFormatterWrapper = /* @__PURE__ */ styled.span.withConfig({
|
|
7
7
|
displayName: "Itemstyles__IndexFormatterWrapper",
|
|
8
8
|
componentId: "sc-1u5z6ql-1"
|
|
9
|
-
})(["margin-right:6px;"]);
|
|
9
|
+
})(["margin-right:6px;"]);
|
|
10
|
+
export {
|
|
11
|
+
IndexFormatterWrapper,
|
|
12
|
+
ItemWrapper
|
|
13
|
+
};
|
package/dist/Unordered-list.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { UnorderedListProps } from './Unordered-list.types';
|
|
3
3
|
declare const UnorderedList: ({ data, indexFormatter, text, className, }: UnorderedListProps) => React.JSX.Element;
|
|
4
4
|
export default UnorderedList;
|
package/dist/Unordered-list.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { FormFieldLabel } from "@synerise/ds-form-field";
|
|
3
|
+
import Item from "./Elements/Item/Item.js";
|
|
4
|
+
import { ContentAbove, UnorderedList as UnorderedList$1 } from "./Unordered-list.styles.js";
|
|
5
|
+
const UnorderedList = ({
|
|
6
|
+
data,
|
|
7
|
+
indexFormatter,
|
|
8
|
+
text,
|
|
9
|
+
className
|
|
10
|
+
}) => {
|
|
11
|
+
return /* @__PURE__ */ jsxs("div", { className, children: [
|
|
12
|
+
text && /* @__PURE__ */ jsx(ContentAbove, { children: /* @__PURE__ */ jsx(FormFieldLabel, { label: text }) }),
|
|
13
|
+
/* @__PURE__ */ jsx(UnorderedList$1, { children: data.map(({
|
|
14
|
+
index,
|
|
15
|
+
...item
|
|
16
|
+
}, i) => /* @__PURE__ */ jsx(
|
|
17
|
+
Item,
|
|
18
|
+
{
|
|
19
|
+
index: i,
|
|
20
|
+
indexFormatter,
|
|
21
|
+
...item,
|
|
22
|
+
NestedList: UnorderedList
|
|
23
|
+
},
|
|
24
|
+
String(item?.id)
|
|
25
|
+
)) })
|
|
26
|
+
] });
|
|
27
|
+
};
|
|
28
|
+
export {
|
|
29
|
+
UnorderedList as default
|
|
29
30
|
};
|
|
30
|
-
export default _UnorderedList;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare const UnorderedList: import(
|
|
1
|
+
export declare const UnorderedList: import('styled-components').StyledComponent<"ul", any, {
|
|
2
2
|
listStyle?: string;
|
|
3
3
|
}, never>;
|
|
4
|
-
export declare const Label: import(
|
|
5
|
-
export declare const ContentAbove: import(
|
|
4
|
+
export declare const Label: import('styled-components').StyledComponent<"label", any, {}, never>;
|
|
5
|
+
export declare const ContentAbove: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
@@ -1,21 +1,18 @@
|
|
|
1
|
-
import styled from
|
|
2
|
-
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
const UnorderedList = /* @__PURE__ */ styled.ul.withConfig({
|
|
3
3
|
displayName: "Unordered-liststyles__UnorderedList",
|
|
4
4
|
componentId: "sc-z2ys8z-0"
|
|
5
|
-
})(["display:flex;flex-direction:column;padding:0;list-style-type:", ";list-style-position:inside;ul{margin-left:20px;padding:5px 0 5px 0;list-style-type:", ";}li{margin-right:4px;list-style-type:", ";}"],
|
|
6
|
-
|
|
7
|
-
}, function (props) {
|
|
8
|
-
return props.listStyle ? props.listStyle : 'none';
|
|
9
|
-
}, function (props) {
|
|
10
|
-
return props.listStyle ? props.listStyle : 'none';
|
|
11
|
-
});
|
|
12
|
-
export var Label = styled.label.withConfig({
|
|
5
|
+
})(["display:flex;flex-direction:column;padding:0;list-style-type:", ";list-style-position:inside;ul{margin-left:20px;padding:5px 0 5px 0;list-style-type:", ";}li{margin-right:4px;list-style-type:", ";}"], (props) => props.listStyle ? props.listStyle : "none", (props) => props.listStyle ? props.listStyle : "none", (props) => props.listStyle ? props.listStyle : "none");
|
|
6
|
+
const Label = /* @__PURE__ */ styled.label.withConfig({
|
|
13
7
|
displayName: "Unordered-liststyles__Label",
|
|
14
8
|
componentId: "sc-z2ys8z-1"
|
|
15
|
-
})(["color:", ";font-weight:500;display:block;"],
|
|
16
|
-
|
|
17
|
-
});
|
|
18
|
-
export var ContentAbove = styled.div.withConfig({
|
|
9
|
+
})(["color:", ";font-weight:500;display:block;"], (props) => props.theme.palette["grey-800"]);
|
|
10
|
+
const ContentAbove = /* @__PURE__ */ styled.div.withConfig({
|
|
19
11
|
displayName: "Unordered-liststyles__ContentAbove",
|
|
20
12
|
componentId: "sc-z2ys8z-2"
|
|
21
|
-
})(["margin-bottom:8px;min-height:18px;"]);
|
|
13
|
+
})(["margin-bottom:8px;min-height:18px;"]);
|
|
14
|
+
export {
|
|
15
|
+
ContentAbove,
|
|
16
|
+
Label,
|
|
17
|
+
UnorderedList
|
|
18
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
|
package/dist/index.js
CHANGED
package/dist/modules.d.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "@testing-library/jest-dom";
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-unordered-list",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.40",
|
|
4
4
|
"description": "UnorderedList UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
"access": "public"
|
|
17
17
|
},
|
|
18
18
|
"scripts": {
|
|
19
|
-
"build": "
|
|
19
|
+
"build": "vite build",
|
|
20
20
|
"build:css": "node ../../../scripts/style/less.js",
|
|
21
21
|
"build:js": "babel --delete-dir-on-start --root-mode upward src --out-dir dist --extensions '.js,.ts,.tsx'",
|
|
22
|
-
"build:watch": "
|
|
22
|
+
"build:watch": "vite build --watch",
|
|
23
23
|
"defs": "tsc --declaration --outDir dist/ --emitDeclarationOnly",
|
|
24
24
|
"pack:ci": "pnpm pack --pack-destination ../../storybook/storybook-static/static",
|
|
25
25
|
"prepublish": "pnpm run build",
|
|
@@ -35,13 +35,13 @@
|
|
|
35
35
|
],
|
|
36
36
|
"types": "dist/index.d.ts",
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@synerise/ds-form-field": "^1.3.
|
|
39
|
-
"@synerise/ds-icon": "^1.
|
|
38
|
+
"@synerise/ds-form-field": "^1.3.10",
|
|
39
|
+
"@synerise/ds-icon": "^1.15.1"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"@synerise/ds-core": "*",
|
|
43
43
|
"react": ">=16.9.0 <= 18.3.1",
|
|
44
44
|
"styled-components": "^5.3.3"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "e4ecca8944fc9b41c1b9d59c8bcad5e5e2013225"
|
|
47
47
|
}
|