@sebgroup/green-react 3.5.2 → 3.5.4
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/index.esm.js +78 -6
- package/package.json +3 -3
- package/src/index.d.ts +1 -0
package/index.esm.js
CHANGED
|
@@ -1739,6 +1739,69 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
1739
1739
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
1740
1740
|
};
|
|
1741
1741
|
|
|
1742
|
+
const BankId = _a => {
|
|
1743
|
+
var {
|
|
1744
|
+
fill,
|
|
1745
|
+
focusable,
|
|
1746
|
+
title
|
|
1747
|
+
} = _a,
|
|
1748
|
+
props = __rest(_a, ["fill", "focusable", "title"]);
|
|
1749
|
+
let id;
|
|
1750
|
+
if (title) id = randomId();
|
|
1751
|
+
return jsxs("svg", Object.assign({
|
|
1752
|
+
width: "24",
|
|
1753
|
+
height: "24",
|
|
1754
|
+
version: "1.1",
|
|
1755
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1756
|
+
x: "0px",
|
|
1757
|
+
y: "0px",
|
|
1758
|
+
viewBox: "140 265 321 304",
|
|
1759
|
+
"enable-background": "new 140 265 321 304",
|
|
1760
|
+
"aria-hidden": props['aria-hidden'],
|
|
1761
|
+
focusable: focusable,
|
|
1762
|
+
"aria-labelledby": id
|
|
1763
|
+
}, {
|
|
1764
|
+
children: [title && jsx("title", Object.assign({
|
|
1765
|
+
id: id
|
|
1766
|
+
}, {
|
|
1767
|
+
children: title
|
|
1768
|
+
})), jsxs("g", {
|
|
1769
|
+
children: [jsx("path", {
|
|
1770
|
+
fill: fill ? fill : '#479CBE',
|
|
1771
|
+
d: "M241.9,423.6l13.2-83.2c-5.2,0-14.1,0-14.1,0c-6.6,0-15.1-3.7-17.6-10.5c-0.8-2.3-2.7-10.2,8.2-17.9\n\t\tc3.9-2.7,6.4-5.7,6.9-8c0.5-2.4-0.1-4.5-1.8-6.1c-2.4-2.3-7.1-3.6-13.1-3.6c-10.1,0-17.2,5.8-17.9,10c-0.5,3.1,1.9,5.6,4,7.2\n\t\tc6.3,4.7,7.8,11.5,3.9,17.9c-4,6.6-12.7,10.9-22,11c0,0-9.2,0-14.4,0c-1.2,8.1-20.8,132.3-22.3,142.1h78.1\n\t\tc0.7-4.4,4.3-27.9,9.2-58.9H241.9z"
|
|
1772
|
+
}), jsx("path", {
|
|
1773
|
+
fill: fill ? fill : '#00A5C3',
|
|
1774
|
+
d: "M346.5,267.6H267l-10.6,67.3l13.5,0c7.4,0,14.4-3.4,17.4-8.3c1-1.6,1.4-3,1.4-4.3c0-2.8-1.9-4.9-3.8-6.3\n\t\tc-5.2-3.9-6.3-8-6.3-10.9c0-0.6,0-1.1,0.1-1.6c1.1-7.1,10.7-14.8,23.4-14.8c7.6,0,13.4,1.8,16.9,5.1c3.1,2.9,4.3,7,3.4,11.3\n\t\tc-1.1,5.1-6.2,9.3-9.1,11.4c-7.7,5.4-6.7,10.1-6.2,11.5c1.6,4.2,7.7,6.9,12.4,6.9H340c0,0,0,0,0,0.1c28,0.2,43,13.1,38.3,43.1\n\t\tc-4.4,27.9-25.8,39.9-51.3,40.1l-10.1,64.4h14.9c62.9,0,114.3-40.4,124.4-104.2C468.7,299.2,418.5,267.6,346.5,267.6z"
|
|
1775
|
+
}), jsx("path", {
|
|
1776
|
+
fill: fill ? fill : '#235971',
|
|
1777
|
+
d: "M346.5,267.6H267l-10.6,67.3l13.5,0c7.4,0,14.4-3.4,17.4-8.3c1-1.6,1.4-3,1.4-4.3c0-2.8-1.9-4.9-3.8-6.3\n\t\tc-5.2-3.9-6.3-8-6.3-10.9c0-0.6,0-1.1,0.1-1.6c1.1-7.1,10.7-14.8,23.4-14.8c7.6,0,13.4,1.8,16.9,5.1c3.1,2.9,4.3,7,3.4,11.3\n\t\tc-1.1,5.1-6.2,9.3-9.1,11.4c-7.7,5.4-6.7,10.1-6.2,11.5c1.6,4.2,7.7,6.9,12.4,6.9H340c0,0,0,0,0,0.1c28,0.2,43,13.1,38.3,43.1\n\t\tc-4.4,27.9-25.8,39.9-51.3,40.1l-10.1,64.4h14.9c62.9,0,114.3-40.4,124.4-104.2C468.7,299.2,418.5,267.6,346.5,267.6z"
|
|
1778
|
+
}), jsxs("g", {
|
|
1779
|
+
children: [jsx("path", {
|
|
1780
|
+
fill: fill ? fill : '#235971',
|
|
1781
|
+
d: "M150.7,511.2h31.9c13.6,0,16.9,6.9,15.9,13.2c-0.8,5.1-4.3,8.9-10.3,11.4c7.6,2.9,10.6,7.4,9.5,14.5\n\t\t\tc-1.4,8.9-9.1,15.5-19.2,15.5h-36.3L150.7,511.2z M171.8,533.8c6.2,0,9.1-3.3,9.7-7.2c0.6-4.2-1.3-7.1-7.5-7.1h-5.5l-2.2,14.3\n\t\t\tH171.8z M168.4,557.4c6.4,0,10.1-2.6,11-7.9c0.7-4.6-1.9-7.3-8.1-7.3H165l-2.4,15.3H168.4z"
|
|
1782
|
+
}), jsx("path", {
|
|
1783
|
+
fill: fill ? fill : '#235971',
|
|
1784
|
+
d: "M242.4,566.2c-8.3,0.6-12.3-0.3-14.3-3.9c-4.4,2.7-9.3,4.1-14.5,4.1c-9.4,0-12.7-4.9-11.8-10.3\n\t\t\tc0.4-2.6,1.9-5.1,4.3-7.2c5.2-4.5,18-5.1,23-8.5c0.4-3.8-1.1-5.2-5.8-5.2c-5.5,0-10.1,1.8-18,7.2l1.9-12.4\n\t\t\tc6.8-4.9,13.4-7.2,21-7.2c9.7,0,18.3,4,16.7,14.6l-1.9,12c-0.7,4.2-0.5,5.5,4.2,5.6L242.4,566.2z M228,547.4\n\t\t\tc-4.4,2.8-12.6,2.3-13.5,8.1c-0.4,2.7,1.3,4.7,4,4.7c2.6,0,5.8-1.1,8.4-2.9c-0.2-1-0.1-2,0.2-3.9L228,547.4z"
|
|
1785
|
+
}), jsx("path", {
|
|
1786
|
+
fill: fill ? fill : '#235971',
|
|
1787
|
+
d: "M257.9,523.5h16.6l-0.9,5.5c5.3-4.5,9.3-6.2,14.5-6.2c9.3,0,13.6,5.7,12.1,15l-4.3,27.9h-16.6l3.6-23.1\n\t\t\tc0.7-4.2-0.6-6.2-3.8-6.2c-2.6,0-5,1.4-7.3,4.5l-3.8,24.7h-16.6L257.9,523.5z"
|
|
1788
|
+
}), jsx("path", {
|
|
1789
|
+
fill: fill ? fill : '#235971',
|
|
1790
|
+
d: "M313.1,511.2h16.6l-4.2,26.8l15.9-14.5h20.5l-20.4,18l16.4,24.2h-20.9l-12.6-19.5h-0.2l-3,19.5h-16.6\n\t\t\tL313.1,511.2z"
|
|
1791
|
+
})]
|
|
1792
|
+
}), jsxs("g", {
|
|
1793
|
+
children: [jsx("path", {
|
|
1794
|
+
fill: fill ? fill : '#479CBE',
|
|
1795
|
+
d: "M371.9,511.2H391l-8.4,54.5h-19.1L371.9,511.2z"
|
|
1796
|
+
}), jsx("path", {
|
|
1797
|
+
fill: fill ? fill : '#479CBE',
|
|
1798
|
+
d: "M400.3,511.2h27.3c21.1,0,27.2,15.3,25.2,28c-1.9,12.4-11.7,26.5-30.2,26.5h-30.8L400.3,511.2z M418,552.7\n\t\t\tc9.3,0,14.4-4.6,15.9-14.3c1.1-7.2-1.1-14.3-11.4-14.3h-5.1l-4.4,28.6H418z"
|
|
1799
|
+
})]
|
|
1800
|
+
})]
|
|
1801
|
+
})]
|
|
1802
|
+
}));
|
|
1803
|
+
};
|
|
1804
|
+
|
|
1742
1805
|
const Check = ({
|
|
1743
1806
|
focusable: _focusable = false,
|
|
1744
1807
|
title
|
|
@@ -4027,8 +4090,8 @@ const Input = _a => {
|
|
|
4027
4090
|
const showSimpleInput = !label && !info && !expandableInfo;
|
|
4028
4091
|
const describedBy = classNames(ariaDescribedBy, {
|
|
4029
4092
|
[`${uuid}_group-message`]: !showSimpleInput && (validator === null || validator === void 0 ? void 0 : validator.message) !== undefined && validator.message.length > 0,
|
|
4030
|
-
[
|
|
4031
|
-
[
|
|
4093
|
+
[`${uuid}_info`]: !showSimpleInput && info,
|
|
4094
|
+
[`gds-expandable-info-${uuid}`]: !showSimpleInput && expandableInfo
|
|
4032
4095
|
});
|
|
4033
4096
|
const inputClassName = classNames(className, {
|
|
4034
4097
|
[validateClassName(validator === null || validator === void 0 ? void 0 : validator.indicator)]: validator
|
|
@@ -4178,6 +4241,7 @@ const RadioGroup = ({
|
|
|
4178
4241
|
const [selected, setSelected] = useState(valueSelected !== null && valueSelected !== void 0 ? valueSelected : defaultSelected);
|
|
4179
4242
|
const [prevValueSelected, setPrevValueSelected] = useState(valueSelected);
|
|
4180
4243
|
const [name] = useState(propName);
|
|
4244
|
+
const [uniqueId] = useState(randomId());
|
|
4181
4245
|
if (valueSelected !== prevValueSelected) {
|
|
4182
4246
|
setSelected(valueSelected);
|
|
4183
4247
|
setPrevValueSelected(valueSelected);
|
|
@@ -4218,12 +4282,20 @@ const RadioGroup = ({
|
|
|
4218
4282
|
const radioGroupWrapperClassNames = classNames('gds-radio-group-wrapper', {
|
|
4219
4283
|
'gds-radio-group-wrapper--horizontal': horizontal
|
|
4220
4284
|
});
|
|
4285
|
+
const describedBy = classNames({
|
|
4286
|
+
[`${uniqueId}_message`]: (validator === null || validator === void 0 ? void 0 : validator.message) !== undefined && validator.message.length > 0,
|
|
4287
|
+
[`${uniqueId}_info`]: labelInformation,
|
|
4288
|
+
[`gds-expandable-info-${uniqueId}`]: expandableInfo
|
|
4289
|
+
});
|
|
4221
4290
|
return jsx(FormItem, Object.assign({}, formItemProps, {
|
|
4291
|
+
inputId: uniqueId
|
|
4292
|
+
}, {
|
|
4222
4293
|
children: jsx("div", Object.assign({
|
|
4223
4294
|
className: radioGroupWrapperClassNames
|
|
4224
4295
|
}, {
|
|
4225
4296
|
children: React.Children.map(children, radioButton => {
|
|
4226
4297
|
return /*#__PURE__*/React.isValidElement(radioButton) ? /*#__PURE__*/React.cloneElement(radioButton, {
|
|
4298
|
+
"aria-describedby": describedBy,
|
|
4227
4299
|
validator: validator,
|
|
4228
4300
|
onChange: handleOnChange,
|
|
4229
4301
|
checked: selected === radioButton.props.value,
|
|
@@ -4653,9 +4725,9 @@ const Select = /*#__PURE__*/React.forwardRef((_a, ref) => {
|
|
|
4653
4725
|
[`${validateClassName(validator === null || validator === void 0 ? void 0 : validator.indicator)}`]: validator
|
|
4654
4726
|
});
|
|
4655
4727
|
const describedBy = classNames(ariaDescribedBy, {
|
|
4656
|
-
[`${uuid}
|
|
4657
|
-
[
|
|
4658
|
-
[
|
|
4728
|
+
[`${uuid}_message`]: (validator === null || validator === void 0 ? void 0 : validator.message) !== undefined && validator.message.length > 0,
|
|
4729
|
+
[`${uuid}_info`]: info || props.labelInformation,
|
|
4730
|
+
[`gds-expandable-info-${uuid}`]: expandableInfo
|
|
4659
4731
|
});
|
|
4660
4732
|
return jsx(FormItem, Object.assign({
|
|
4661
4733
|
label: label,
|
|
@@ -6522,4 +6594,4 @@ const Table = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef((_a, ref) =
|
|
|
6522
6594
|
}));
|
|
6523
6595
|
}));
|
|
6524
6596
|
|
|
6525
|
-
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 };
|
|
6597
|
+
export { Accordion, AlertRibbon as Alert, AlertRibbon, Badge, BankId, Button, ButtonGroup, Card, Check, Checkbox, ChevronDown, ContextMenu, CoreDatepicker, CoreDropdown, CoreMenuHeading, CoreOption, Datepicker, Dropdown, Edit, EmailInput, Flexbox, Form, FormItem, FormItems, Group, GroupedList, IconButton, InPageWizardStepCard, InfoCircle, Input, Link, List$1 as List, ListItem, MenuItem, Modal, Navbar, NumberInput, Option, OptionGroup, RadioButton, RadioGroup, Select, Slider, SortDirection, SquareExclamation, SquareInfo, Stepper, Tab, Table, TableBody, TableCell, TableContext, TableHeader, TableHeaderCell, TableRow, Tabs, Text, TextArea, TextInput, Times, 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.5.
|
|
3
|
+
"version": "3.5.4",
|
|
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.
|
|
9
|
+
"@sebgroup/green-core": "^1.12.0",
|
|
10
|
+
"@sebgroup/chlorophyll": "^3.3.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