@sebgroup/green-react 3.3.0 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -11
- package/index.esm.js +18 -6
- package/package.json +3 -3
- package/src/index.d.ts +1 -0
- package/src/lib/grouped-list/grouped-list.d.ts +3 -0
package/README.md
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
|
+
<img width="600" alt="green-react" src="https://github.com/sebgroup/green/assets/11420341/ad4c9fe3-137f-4230-9ea7-a4de87752aa9">
|
|
3
|
+
<h1>@sebgroup/green-react</h1>
|
|
4
|
+
<p>
|
|
5
|
+
React components with SEB's look and feel.
|
|
6
|
+
</p>
|
|
7
|
+
</div>
|
|
2
8
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
## Install \*
|
|
9
|
+
## Install
|
|
6
10
|
|
|
7
11
|
```bash
|
|
8
12
|
npm install --save @sebgroup/green-react
|
|
@@ -12,17 +16,18 @@ npm install --save @sebgroup/green-react
|
|
|
12
16
|
yarn add @sebgroup/green-react
|
|
13
17
|
```
|
|
14
18
|
|
|
15
|
-
##
|
|
19
|
+
## Use
|
|
16
20
|
|
|
17
|
-
```
|
|
18
|
-
|
|
21
|
+
```tsx
|
|
22
|
+
import { Button } from '@sebgroup/green-react'
|
|
19
23
|
|
|
20
|
-
//
|
|
24
|
+
// Use in your JSX
|
|
25
|
+
<Button>A Green React Button!</Button>
|
|
21
26
|
```
|
|
22
27
|
|
|
23
28
|
### Components
|
|
24
29
|
|
|
25
|
-
View all components in the Storybook
|
|
30
|
+
View all components in the [React Storybook](https://sebgroup.github.io/green/latest/react/)
|
|
26
31
|
|
|
27
32
|
## Develop \*
|
|
28
33
|
|
|
@@ -57,5 +62,3 @@ yarn test react --watch
|
|
|
57
62
|
1. Test
|
|
58
63
|
2. Code
|
|
59
64
|
3. Refactor
|
|
60
|
-
|
|
61
|
-
## Commands \*
|
package/index.esm.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
|
2
2
|
import React, { useState, useEffect, useRef, useLayoutEffect, useMemo, forwardRef, useCallback, useId } from 'react';
|
|
3
3
|
import { randomId, validateClassName, debounce, delay, sliderColors, getSliderTrackBackground } from '@sebgroup/extract';
|
|
4
4
|
import { createComponent } from '@lit/react';
|
|
5
|
-
import { getScopedTagName, GdsDatepicker, GdsContextMenu, GdsMenuItem, GdsMenuHeading, GdsDropdown, GdsOption } from '@sebgroup/green-core';
|
|
5
|
+
import { getScopedTagName, GdsDatepicker, GdsContextMenu, GdsMenuItem, GdsMenuHeading, GdsDropdown, GdsOption, GdsGroupedList } from '@sebgroup/green-core';
|
|
6
6
|
import { registerTransitionalStyles } from '@sebgroup/green-core/transitional-styles';
|
|
7
7
|
import classNames from 'classnames';
|
|
8
8
|
|
|
@@ -4446,7 +4446,7 @@ const Link = _a => {
|
|
|
4446
4446
|
}));
|
|
4447
4447
|
};
|
|
4448
4448
|
|
|
4449
|
-
const ListItem = _a => {
|
|
4449
|
+
const ListItem$1 = _a => {
|
|
4450
4450
|
var {
|
|
4451
4451
|
listType,
|
|
4452
4452
|
tableRowData,
|
|
@@ -4480,7 +4480,7 @@ const List$1 = _a => {
|
|
|
4480
4480
|
props = __rest(_a, ["listType", "tableCaption", "tableData", "children"]);
|
|
4481
4481
|
if (listType === 'ordered') {
|
|
4482
4482
|
return jsx("ol", Object.assign({}, props, {
|
|
4483
|
-
children: children === null || children === void 0 ? void 0 : children.map((child, index) => jsx(ListItem, {
|
|
4483
|
+
children: children === null || children === void 0 ? void 0 : children.map((child, index) => jsx(ListItem$1, {
|
|
4484
4484
|
children: child
|
|
4485
4485
|
}, index))
|
|
4486
4486
|
}));
|
|
@@ -4488,7 +4488,7 @@ const List$1 = _a => {
|
|
|
4488
4488
|
return jsx("ul", Object.assign({}, props, {
|
|
4489
4489
|
className: listType
|
|
4490
4490
|
}, {
|
|
4491
|
-
children: children === null || children === void 0 ? void 0 : children.map((child, index) => jsx(ListItem, {
|
|
4491
|
+
children: children === null || children === void 0 ? void 0 : children.map((child, index) => jsx(ListItem$1, {
|
|
4492
4492
|
children: child
|
|
4493
4493
|
}, index))
|
|
4494
4494
|
}));
|
|
@@ -4499,7 +4499,7 @@ const List$1 = _a => {
|
|
|
4499
4499
|
}, {
|
|
4500
4500
|
children: tableCaption
|
|
4501
4501
|
})), jsx("dl", {
|
|
4502
|
-
children: tableData === null || tableData === void 0 ? void 0 : tableData.map((data, index) => jsx(ListItem, {
|
|
4502
|
+
children: tableData === null || tableData === void 0 ? void 0 : tableData.map((data, index) => jsx(ListItem$1, {
|
|
4503
4503
|
listType: listType,
|
|
4504
4504
|
tableRowData: data
|
|
4505
4505
|
}, index))
|
|
@@ -4548,6 +4548,18 @@ var valueList$1 = /*#__PURE__*/Object.freeze({
|
|
|
4548
4548
|
'default': valueList
|
|
4549
4549
|
});
|
|
4550
4550
|
|
|
4551
|
+
registerTransitionalStyles();
|
|
4552
|
+
const GroupedList = createComponent({
|
|
4553
|
+
tagName: getScopedTagName('gds-grouped-list'),
|
|
4554
|
+
elementClass: GdsGroupedList,
|
|
4555
|
+
react: React
|
|
4556
|
+
});
|
|
4557
|
+
const ListItem = createComponent({
|
|
4558
|
+
tagName: getScopedTagName('gds-list-item'),
|
|
4559
|
+
elementClass: GdsGroupedList,
|
|
4560
|
+
react: React
|
|
4561
|
+
});
|
|
4562
|
+
|
|
4551
4563
|
//TODO: Add variants
|
|
4552
4564
|
const Navbar = ({
|
|
4553
4565
|
children,
|
|
@@ -6494,4 +6506,4 @@ const Table = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef((_a, ref) =
|
|
|
6494
6506
|
}));
|
|
6495
6507
|
}));
|
|
6496
6508
|
|
|
6497
|
-
export { Accordion, AlertRibbon as Alert, AlertRibbon, Badge, Button, ButtonGroup, Card, Checkbox, ContextMenu, CoreDatepicker, CoreDropdown, CoreMenuHeading, CoreOption, Datepicker, Dropdown, EmailInput, Flexbox, Form, FormItem, FormItems, Group, IconButton, InPageWizardStepCard, Input, Link, List$1 as List, MenuItem, Modal, Navbar, NumberInput, Option, OptionGroup, RadioButton, RadioGroup, Select, Slider, SortDirection, Stepper, Tab, Table, TableBody, TableCell, TableContext, TableHeader, TableHeaderCell, TableRow, Tabs, Text, TextArea, TextInput, valueList$1 as ValueList, filterArrayByColumns, onRowSelect, paginate, searchTextByColumns, sortArray, sumCols, useTableContext };
|
|
6509
|
+
export { Accordion, AlertRibbon as Alert, AlertRibbon, Badge, Button, ButtonGroup, Card, Checkbox, ContextMenu, CoreDatepicker, CoreDropdown, CoreMenuHeading, CoreOption, Datepicker, Dropdown, EmailInput, Flexbox, Form, FormItem, FormItems, Group, GroupedList, IconButton, InPageWizardStepCard, Input, Link, List$1 as List, ListItem, MenuItem, Modal, Navbar, NumberInput, Option, OptionGroup, RadioButton, RadioGroup, Select, Slider, SortDirection, Stepper, Tab, Table, TableBody, TableCell, TableContext, TableHeader, TableHeaderCell, TableRow, Tabs, Text, TextArea, TextInput, valueList$1 as ValueList, filterArrayByColumns, onRowSelect, paginate, searchTextByColumns, sortArray, sumCols, useTableContext };
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sebgroup/green-react",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"react": "^17 || ^18",
|
|
6
6
|
"react-dom": "^17 || ^18"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@sebgroup/green-core": "^1.
|
|
10
|
-
"@sebgroup/chlorophyll": "^3.1.
|
|
9
|
+
"@sebgroup/green-core": "^1.8.0",
|
|
10
|
+
"@sebgroup/chlorophyll": "^3.1.1",
|
|
11
11
|
"@sebgroup/extract": "^3.0.1",
|
|
12
12
|
"@lit/react": "^1.0.2",
|
|
13
13
|
"classnames": "^2.3.2"
|
package/src/index.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export * from './lib/layout';
|
|
|
10
10
|
export * from './lib/in-page-wizard';
|
|
11
11
|
export * from './lib/link/link';
|
|
12
12
|
export * from './lib/list';
|
|
13
|
+
export * from './lib/grouped-list/grouped-list';
|
|
13
14
|
export * from './lib/navbar/navbar';
|
|
14
15
|
export * from './lib/select';
|
|
15
16
|
export * from './lib/slider';
|