1
0
mirror of https://gitlab.nic.cz/turris/reforis/foris-js.git synced 2024-12-26 00:21:36 +01:00

Merge branch 'dev' into 'master'

Dev

See merge request turris/reforis/foris-js!225
This commit is contained in:
Aleksandr Gumroian 2024-06-28 14:22:41 +02:00
commit 8e0c60a576
7 changed files with 25 additions and 15 deletions

View File

@ -8,15 +8,21 @@ and this project adheres to
## [Unreleased] ## [Unreleased]
## [6.0.2] - 2024-06-28
### Added
- Added className prop to CheckBox and Radio components
## [6.0.1] - 2024-06-26 ## [6.0.1] - 2024-06-26
### Added ### Added
- Add className prop to Switch component - Added className prop to Switch component
### Changed ### Changed
- Update dependencies in package.json - Updated dependencies in package.json
- NPM audit fix - NPM audit fix
## [6.0.0] - 2024-06-11 ## [6.0.0] - 2024-06-11
@ -325,7 +331,8 @@ and this project adheres to
## [0.0.7] - 2019-09-02 ## [0.0.7] - 2019-09-02
[unreleased]: [unreleased]:
https://gitlab.nic.cz/turris/reforis/foris-js/-/compare/v6.0.1...master https://gitlab.nic.cz/turris/reforis/foris-js/-/compare/v6.0.2...master
[6.0.2]: https://gitlab.nic.cz/turris/reforis/foris-js/-/compare/v6.0.1...v6.0.2
[6.0.1]: https://gitlab.nic.cz/turris/reforis/foris-js/-/compare/v6.0.0...v6.0.1 [6.0.1]: https://gitlab.nic.cz/turris/reforis/foris-js/-/compare/v6.0.0...v6.0.1
[6.0.0]: https://gitlab.nic.cz/turris/reforis/foris-js/-/compare/v5.6.1...v6.0.0 [6.0.0]: https://gitlab.nic.cz/turris/reforis/foris-js/-/compare/v5.6.1...v6.0.0
[5.6.1]: https://gitlab.nic.cz/turris/reforis/foris-js/-/compare/v5.6.0...v5.6.1 [5.6.1]: https://gitlab.nic.cz/turris/reforis/foris-js/-/compare/v5.6.0...v5.6.1

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "foris", "name": "foris",
"version": "6.0.1", "version": "6.0.2",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "foris", "name": "foris",
"version": "6.0.1", "version": "6.0.2",
"license": "GPL-3.0", "license": "GPL-3.0",
"dependencies": { "dependencies": {
"axios": "^1.7.2", "axios": "^1.7.2",

View File

@ -1,6 +1,6 @@
{ {
"name": "foris", "name": "foris",
"version": "6.0.1", "version": "6.0.2",
"description": "Foris JS library is a set of components and utils for reForis application and plugins.", "description": "Foris JS library is a set of components and utils for reForis application and plugins.",
"author": "CZ.NIC, z.s.p.o.", "author": "CZ.NIC, z.s.p.o.",
"repository": { "repository": {

View File

@ -17,17 +17,19 @@ CheckBox.propTypes = {
helpText: PropTypes.string, helpText: PropTypes.string,
/** Control if checkbox is clickable */ /** Control if checkbox is clickable */
disabled: PropTypes.bool, disabled: PropTypes.bool,
/** Additional class name */
className: PropTypes.string,
}; };
CheckBox.defaultProps = { CheckBox.defaultProps = {
disabled: false, disabled: false,
}; };
function CheckBox({ label, helpText, disabled, ...props }) { function CheckBox({ label, helpText, disabled, className, ...props }) {
const uid = useUID(); const uid = useUID();
return ( return (
<div className="mb-3 form-check"> <div className={`${className || "mb-3"} form-check`.trim()}>
<input <input
className="form-check-input" className="form-check-input"
type="checkbox" type="checkbox"

View File

@ -83,12 +83,13 @@ Radio.propTypes = {
id: PropTypes.string.isRequired, id: PropTypes.string.isRequired,
inline: PropTypes.bool, inline: PropTypes.bool,
helpText: PropTypes.string, helpText: PropTypes.string,
className: PropTypes.string,
}; };
export function Radio({ label, id, helpText, inline, ...props }) { export function Radio({ label, id, helpText, inline, className, ...props }) {
return ( return (
<div <div
className={`mb-2 ${inline ? "form-check form-check-inline" : ""}`.trim()} className={`${className || "mb-3"} ${inline ? "form-check form-check-inline" : ""}`.trim()}
> >
<input <input
id={id} id={id}

View File

@ -11,7 +11,7 @@ exports[`<RadioSet/> Render radio set 1`] = `
Radios set label Radios set label
</label> </label>
<div <div
class="mb-2" class="mb-3"
> >
<input <input
checked="" checked=""
@ -29,7 +29,7 @@ exports[`<RadioSet/> Render radio set 1`] = `
</label> </label>
</div> </div>
<div <div
class="mb-2" class="mb-3"
> >
<input <input
class="form-check-input me-2" class="form-check-input me-2"
@ -46,7 +46,7 @@ exports[`<RadioSet/> Render radio set 1`] = `
</label> </label>
</div> </div>
<div <div
class="mb-2" class="mb-3"
> >
<input <input
class="form-check-input me-2" class="form-check-input me-2"

View File

@ -568,7 +568,7 @@ exports[`<WiFiSettings/> Snapshot one module enabled. 1`] = `
+ GHz + GHz
+ </label> + </label>
+ <div + <div
+ class="mb-2 form-check form-check-inline" + class="mb-3 form-check form-check-inline"
+ > + >
+ <input + <input
+ class="form-check-input me-2" + class="form-check-input me-2"
@ -585,7 +585,7 @@ exports[`<WiFiSettings/> Snapshot one module enabled. 1`] = `
+ </label> + </label>
+ </div> + </div>
+ <div + <div
+ class="mb-2 form-check form-check-inline" + class="mb-3 form-check form-check-inline"
+ > + >
+ <input + <input
+ checked="" + checked=""