@sebgroup/green-react 1.0.0-beta.37 → 1.0.0-beta.39
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 +38 -28
- package/index.umd.js +38 -28
- package/package.json +3 -3
package/index.esm.js
CHANGED
|
@@ -2158,19 +2158,25 @@ const Checkbox = _a => {
|
|
|
2158
2158
|
|
|
2159
2159
|
const inputProps = useInput(props, onChange);
|
|
2160
2160
|
const validatorClassName = validateClassName(validator === null || validator === void 0 ? void 0 : validator.indicator);
|
|
2161
|
-
return
|
|
2162
|
-
children:
|
|
2163
|
-
|
|
2164
|
-
className: `form-control ${validatorClassName}`
|
|
2161
|
+
return jsx(Fragment, {
|
|
2162
|
+
children: jsxs("div", Object.assign({
|
|
2163
|
+
className: "form-group"
|
|
2165
2164
|
}, {
|
|
2166
|
-
children: [
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2165
|
+
children: [jsxs("label", Object.assign({
|
|
2166
|
+
htmlFor: inputProps.id,
|
|
2167
|
+
className: `form-control ${validatorClassName}`
|
|
2168
|
+
}, {
|
|
2169
|
+
children: [label, jsx("input", Object.assign({
|
|
2170
|
+
type: "checkbox"
|
|
2171
|
+
}, inputProps, {
|
|
2172
|
+
className: validatorClassName
|
|
2173
|
+
})), jsx("i", {})]
|
|
2174
|
+
})), validator && jsx("span", Object.assign({
|
|
2175
|
+
className: "form-info"
|
|
2176
|
+
}, {
|
|
2177
|
+
children: validator.message
|
|
2178
|
+
}))]
|
|
2179
|
+
}))
|
|
2174
2180
|
});
|
|
2175
2181
|
};
|
|
2176
2182
|
const RadioButton = /*#__PURE__*/React.forwardRef((_a, ref) => {
|
|
@@ -2358,20 +2364,22 @@ const RadioGroup = ({
|
|
|
2358
2364
|
children: [jsxs("fieldset", Object.assign({
|
|
2359
2365
|
className: validatorClassName
|
|
2360
2366
|
}, {
|
|
2361
|
-
children: [jsx("legend", {
|
|
2367
|
+
children: [title && jsx("legend", {
|
|
2362
2368
|
children: title
|
|
2363
|
-
}), jsx("span", Object.assign({
|
|
2369
|
+
}), description && jsx("span", Object.assign({
|
|
2364
2370
|
className: "form-info"
|
|
2365
2371
|
}, {
|
|
2366
2372
|
children: description
|
|
2367
|
-
})),
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2373
|
+
})), jsx("div", {
|
|
2374
|
+
children: React.Children.map(children, Child => {
|
|
2375
|
+
return /*#__PURE__*/React.isValidElement(Child) ? /*#__PURE__*/React.cloneElement(Child, {
|
|
2376
|
+
validator: validatorClassName,
|
|
2377
|
+
onChange: onChanges,
|
|
2378
|
+
checked: checked === Child.props.value,
|
|
2379
|
+
name,
|
|
2380
|
+
ref: radioBtnRef
|
|
2381
|
+
}) : Child;
|
|
2382
|
+
})
|
|
2375
2383
|
})]
|
|
2376
2384
|
})), (validator === null || validator === void 0 ? void 0 : validator.message) && jsx("span", Object.assign({
|
|
2377
2385
|
className: "form-info"
|
|
@@ -2884,23 +2892,25 @@ const Dropdown = ({
|
|
|
2884
2892
|
})), jsxs("div", Object.assign({}, getListBoxProps(listboxProps), {
|
|
2885
2893
|
ref: listboxRef
|
|
2886
2894
|
}, {
|
|
2887
|
-
children: [
|
|
2895
|
+
children: [jsxs("button", Object.assign({
|
|
2888
2896
|
type: "button",
|
|
2889
2897
|
className: "close m-4 m-sm-2 d-block d-sm-none",
|
|
2890
2898
|
onClick: dropdown === null || dropdown === void 0 ? void 0 : dropdown.close
|
|
2891
2899
|
}, {
|
|
2892
|
-
children: jsx("span", Object.assign({
|
|
2900
|
+
children: [jsx("span", Object.assign({
|
|
2893
2901
|
className: "sr-only"
|
|
2894
2902
|
}, {
|
|
2895
2903
|
children: dropdown === null || dropdown === void 0 ? void 0 : dropdown.dropdown.texts.close
|
|
2896
|
-
}))
|
|
2904
|
+
})), jsx("i", {})]
|
|
2897
2905
|
})), (dropdown === null || dropdown === void 0 ? void 0 : dropdown.dropdown.isMultiSelect) ? jsx("div", Object.assign({
|
|
2898
2906
|
className: "sg-fieldset-container"
|
|
2899
2907
|
}, {
|
|
2900
2908
|
children: jsxs("fieldset", Object.assign({}, multiSelectProps.fieldsetProps, {
|
|
2901
|
-
children: [jsx("legend", Object.assign({}, multiSelectProps.legendProps)), (
|
|
2902
|
-
children:
|
|
2903
|
-
|
|
2909
|
+
children: [jsx("legend", Object.assign({}, multiSelectProps.legendProps)), jsx("div", {
|
|
2910
|
+
children: (_a = multiSelectProps.checkboxes) === null || _a === void 0 ? void 0 : _a.map(checkboxItem => jsxs("label", Object.assign({}, checkboxItem.labelProps, {
|
|
2911
|
+
children: [jsx("input", Object.assign({}, checkboxItem.inputProps)), jsx("span", Object.assign({}, checkboxItem.spanProps)), jsx("i", {})]
|
|
2912
|
+
}), checkboxItem.labelProps.id))
|
|
2913
|
+
})]
|
|
2904
2914
|
}))
|
|
2905
2915
|
})) : jsx("ul", Object.assign({
|
|
2906
2916
|
role: "listbox"
|
package/index.umd.js
CHANGED
|
@@ -2164,19 +2164,25 @@
|
|
|
2164
2164
|
|
|
2165
2165
|
const inputProps = useInput(props, onChange);
|
|
2166
2166
|
const validatorClassName = extract.validateClassName(validator === null || validator === void 0 ? void 0 : validator.indicator);
|
|
2167
|
-
return jsxRuntime.
|
|
2168
|
-
children:
|
|
2169
|
-
|
|
2170
|
-
className: `form-control ${validatorClassName}`
|
|
2167
|
+
return jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
2168
|
+
children: jsxRuntime.jsxs("div", Object.assign({
|
|
2169
|
+
className: "form-group"
|
|
2171
2170
|
}, {
|
|
2172
|
-
children: [
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2171
|
+
children: [jsxRuntime.jsxs("label", Object.assign({
|
|
2172
|
+
htmlFor: inputProps.id,
|
|
2173
|
+
className: `form-control ${validatorClassName}`
|
|
2174
|
+
}, {
|
|
2175
|
+
children: [label, jsxRuntime.jsx("input", Object.assign({
|
|
2176
|
+
type: "checkbox"
|
|
2177
|
+
}, inputProps, {
|
|
2178
|
+
className: validatorClassName
|
|
2179
|
+
})), jsxRuntime.jsx("i", {})]
|
|
2180
|
+
})), validator && jsxRuntime.jsx("span", Object.assign({
|
|
2181
|
+
className: "form-info"
|
|
2182
|
+
}, {
|
|
2183
|
+
children: validator.message
|
|
2184
|
+
}))]
|
|
2185
|
+
}))
|
|
2180
2186
|
});
|
|
2181
2187
|
};
|
|
2182
2188
|
const RadioButton = /*#__PURE__*/React__default["default"].forwardRef((_a, ref) => {
|
|
@@ -2364,20 +2370,22 @@
|
|
|
2364
2370
|
children: [jsxRuntime.jsxs("fieldset", Object.assign({
|
|
2365
2371
|
className: validatorClassName
|
|
2366
2372
|
}, {
|
|
2367
|
-
children: [jsxRuntime.jsx("legend", {
|
|
2373
|
+
children: [title && jsxRuntime.jsx("legend", {
|
|
2368
2374
|
children: title
|
|
2369
|
-
}), jsxRuntime.jsx("span", Object.assign({
|
|
2375
|
+
}), description && jsxRuntime.jsx("span", Object.assign({
|
|
2370
2376
|
className: "form-info"
|
|
2371
2377
|
}, {
|
|
2372
2378
|
children: description
|
|
2373
|
-
})),
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2379
|
+
})), jsxRuntime.jsx("div", {
|
|
2380
|
+
children: React__default["default"].Children.map(children, Child => {
|
|
2381
|
+
return /*#__PURE__*/React__default["default"].isValidElement(Child) ? /*#__PURE__*/React__default["default"].cloneElement(Child, {
|
|
2382
|
+
validator: validatorClassName,
|
|
2383
|
+
onChange: onChanges,
|
|
2384
|
+
checked: checked === Child.props.value,
|
|
2385
|
+
name,
|
|
2386
|
+
ref: radioBtnRef
|
|
2387
|
+
}) : Child;
|
|
2388
|
+
})
|
|
2381
2389
|
})]
|
|
2382
2390
|
})), (validator === null || validator === void 0 ? void 0 : validator.message) && jsxRuntime.jsx("span", Object.assign({
|
|
2383
2391
|
className: "form-info"
|
|
@@ -2890,23 +2898,25 @@
|
|
|
2890
2898
|
})), jsxRuntime.jsxs("div", Object.assign({}, getListBoxProps(listboxProps), {
|
|
2891
2899
|
ref: listboxRef
|
|
2892
2900
|
}, {
|
|
2893
|
-
children: [jsxRuntime.
|
|
2901
|
+
children: [jsxRuntime.jsxs("button", Object.assign({
|
|
2894
2902
|
type: "button",
|
|
2895
2903
|
className: "close m-4 m-sm-2 d-block d-sm-none",
|
|
2896
2904
|
onClick: dropdown === null || dropdown === void 0 ? void 0 : dropdown.close
|
|
2897
2905
|
}, {
|
|
2898
|
-
children: jsxRuntime.jsx("span", Object.assign({
|
|
2906
|
+
children: [jsxRuntime.jsx("span", Object.assign({
|
|
2899
2907
|
className: "sr-only"
|
|
2900
2908
|
}, {
|
|
2901
2909
|
children: dropdown === null || dropdown === void 0 ? void 0 : dropdown.dropdown.texts.close
|
|
2902
|
-
}))
|
|
2910
|
+
})), jsxRuntime.jsx("i", {})]
|
|
2903
2911
|
})), (dropdown === null || dropdown === void 0 ? void 0 : dropdown.dropdown.isMultiSelect) ? jsxRuntime.jsx("div", Object.assign({
|
|
2904
2912
|
className: "sg-fieldset-container"
|
|
2905
2913
|
}, {
|
|
2906
2914
|
children: jsxRuntime.jsxs("fieldset", Object.assign({}, multiSelectProps.fieldsetProps, {
|
|
2907
|
-
children: [jsxRuntime.jsx("legend", Object.assign({}, multiSelectProps.legendProps)),
|
|
2908
|
-
children:
|
|
2909
|
-
|
|
2915
|
+
children: [jsxRuntime.jsx("legend", Object.assign({}, multiSelectProps.legendProps)), jsxRuntime.jsx("div", {
|
|
2916
|
+
children: (_a = multiSelectProps.checkboxes) === null || _a === void 0 ? void 0 : _a.map(checkboxItem => jsxRuntime.jsxs("label", Object.assign({}, checkboxItem.labelProps, {
|
|
2917
|
+
children: [jsxRuntime.jsx("input", Object.assign({}, checkboxItem.inputProps)), jsxRuntime.jsx("span", Object.assign({}, checkboxItem.spanProps)), jsxRuntime.jsx("i", {})]
|
|
2918
|
+
}), checkboxItem.labelProps.id))
|
|
2919
|
+
})]
|
|
2910
2920
|
}))
|
|
2911
2921
|
})) : jsxRuntime.jsx("ul", Object.assign({
|
|
2912
2922
|
role: "listbox"
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sebgroup/green-react",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.39",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"react": "^17 || ^18",
|
|
6
6
|
"react-dom": "^17 || ^18"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@sebgroup/chlorophyll": "^1.0.0-beta.
|
|
10
|
-
"@sebgroup/extract": "^1.0.0-beta.
|
|
9
|
+
"@sebgroup/chlorophyll": "^1.0.0-beta.40",
|
|
10
|
+
"@sebgroup/extract": "^1.0.0-beta.39"
|
|
11
11
|
},
|
|
12
12
|
"description": "React components built on top of @sebgroup/chlorophyll.",
|
|
13
13
|
"repository": {
|