@bodynarf/react.components 1.4.7 → 1.4.8
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/components/anchor/anchor.scss +2 -2
- package/components/anchor/components/anchorWithIcon/index.d.ts +0 -1
- package/components/anchor/components/anchorWithIcon/index.d.ts.map +1 -1
- package/components/anchor/components/anchorWithIcon/index.js +2 -2
- package/components/anchor/index.d.ts.map +1 -1
- package/components/anchor/index.js +6 -4
- package/components/button/button.scss +1 -1
- package/components/button/components/buttonWithIcon/index.d.ts +0 -1
- package/components/button/components/buttonWithIcon/index.d.ts.map +1 -1
- package/components/button/components/buttonWithIcon/index.js +3 -3
- package/components/button/index.d.ts.map +1 -1
- package/components/button/index.js +3 -1
- package/components/icon/icon.scss +1 -1
- package/components/icon/index.js +1 -1
- package/components/search/index.d.ts.map +1 -1
- package/components/search/index.js +4 -2
- package/components/search/search.scss +1 -1
- package/package.json +1 -1
- package/readme.md +2 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/anchor/components/anchorWithIcon/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/anchor/components/anchorWithIcon/index.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAElD,iCAAiC;AACjC,eAAO,MAAM,cAAc,+DAAgE,mBAAmB,KAAG,WAqChH,CAAC"}
|
|
@@ -7,8 +7,8 @@ export const AnchorWithIcon = ({ href, className, onClick, caption, title, targe
|
|
|
7
7
|
const iconClassName = isNullOrEmpty(caption)
|
|
8
8
|
? icon.className
|
|
9
9
|
: iconPosition === 'left'
|
|
10
|
-
? `${icon.className}
|
|
11
|
-
: `${icon.className}
|
|
10
|
+
? `${icon.className} bbr-icon--left`
|
|
11
|
+
: `${icon.className} bbr-icon--right`;
|
|
12
12
|
if (iconPosition === 'left') {
|
|
13
13
|
return (_jsxs("a", { href: href, className: className, title: title, target: target, onClick: onClick, children: [_jsx(Icon, { ...icon, className: iconClassName }), caption] }));
|
|
14
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/anchor/index.tsx"],"names":[],"mappings":";AAEA,OAAO,eAAe,CAAC;AAEvB,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAKvC,oBAAY,WAAW,GAAG;IACtB,uBAAuB;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,oBAAoB;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,oBAAoB;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB,kCAAkC;IAClC,IAAI,CAAC,EAAE,WAAW,CAAC;IAEnB,sBAAsB;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,wCAAwC;IACxC,MAAM,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;IAE3B,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,8CAA8C;IAC9C,eAAe,CAAC,EAAE,OAAO,CAAC;CAC7B,CAAC;AAEF,uBAAuB;AACvB,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAK,EAAE,WAAW,GAAG,GAAG,CAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/anchor/index.tsx"],"names":[],"mappings":";AAEA,OAAO,eAAe,CAAC;AAEvB,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAKvC,oBAAY,WAAW,GAAG;IACtB,uBAAuB;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,oBAAoB;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,oBAAoB;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB,kCAAkC;IAClC,IAAI,CAAC,EAAE,WAAW,CAAC;IAEnB,sBAAsB;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,wCAAwC;IACxC,MAAM,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;IAE3B,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,8CAA8C;IAC9C,eAAe,CAAC,EAAE,OAAO,CAAC;CAC7B,CAAC;AAEF,uBAAuB;AACvB,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAK,EAAE,WAAW,GAAG,GAAG,CAAC,OAAO,CA6B9D"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { isNullOrUndefined, isNullOrEmpty } from '@bodynarf/utils';
|
|
2
|
+
import { isNullOrUndefined, isNullOrEmpty, getClassName } from '@bodynarf/utils';
|
|
3
3
|
import './anchor.scss';
|
|
4
4
|
import { SimpleAnchor } from './components/simpleAnchor';
|
|
5
5
|
import { AnchorWithIcon } from './components/anchorWithIcon';
|
|
@@ -8,9 +8,11 @@ export default function Anchor(props) {
|
|
|
8
8
|
if (isNullOrUndefined(props.caption) && isNullOrUndefined(props.icon)) {
|
|
9
9
|
throw new Error("No anchor content provided");
|
|
10
10
|
}
|
|
11
|
-
const className =
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
const className = getClassName([
|
|
12
|
+
'bbr-anchor',
|
|
13
|
+
!isNullOrEmpty(props.className) ? ` ${props.className}` : '',
|
|
14
|
+
props.disableHovering === true ? ' bbr-anchor--unhoverable' : ''
|
|
15
|
+
]);
|
|
14
16
|
if (isNullOrUndefined(props.icon)) {
|
|
15
17
|
return (_jsx(SimpleAnchor, { ...props, className: className, onClick: props.onClick }));
|
|
16
18
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/button/components/buttonWithIcon/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/button/components/buttonWithIcon/index.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAElD,iCAAiC;AACjC,eAAO,MAAM,cAAc,2DAA4D,mBAAmB,KAAG,WAsC5G,CAAC"}
|
|
@@ -7,10 +7,10 @@ export const ButtonWithIcon = ({ className, disabled, onClick, caption, title, i
|
|
|
7
7
|
const iconClassName = isNullOrEmpty(caption)
|
|
8
8
|
? icon.className
|
|
9
9
|
: iconPosition === 'left'
|
|
10
|
-
? `${icon.className}
|
|
11
|
-
: `${icon.className}
|
|
10
|
+
? `${icon.className} bbr-icon--left`
|
|
11
|
+
: `${icon.className} bbr-icon--right`;
|
|
12
12
|
className = isNullOrEmpty(caption)
|
|
13
|
-
? `${className} button--icon-only`
|
|
13
|
+
? `${className} bbr-button--icon-only`
|
|
14
14
|
: className;
|
|
15
15
|
if (iconPosition === 'left') {
|
|
16
16
|
return (_jsxs("button", { className: className, disabled: disabled, onClick: onClick, title: title, children: [_jsx(Icon, { ...icon, className: iconClassName }), caption] }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/button/index.tsx"],"names":[],"mappings":";AAEA,OAAO,eAAe,CAAC;AAEvB,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEpD,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAIrC,oBAAY,WAAW,GAAG;IACtB,6BAA6B;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,8BAA8B;IAC9B,IAAI,EAAE,UAAU,CAAC;IAEjB,kCAAkC;IAClC,IAAI,CAAC,EAAE,WAAW,CAAC;IAEnB,mBAAmB;IACnB,IAAI,CAAC,EAAE,WAAW,CAAC;IAEnB,qBAAqB;IACrB,KAAK,CAAC,EAAE,MAAM,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E,MAAM,IAAI,CAAC;CACxB,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAK,EAAE,WAAW,GAAG,GAAG,CAAC,OAAO,CAkC9D"}
|
|
@@ -12,7 +12,9 @@ export default function Button(props) {
|
|
|
12
12
|
throw new Error("No button content provided.");
|
|
13
13
|
}
|
|
14
14
|
const className = getClassName([
|
|
15
|
-
|
|
15
|
+
"button",
|
|
16
|
+
"bbr-button",
|
|
17
|
+
`is-${props.type}`,
|
|
16
18
|
props.light === true ? 'is-light' : '',
|
|
17
19
|
!isNullOrUndefined(props.size) ? `is-${props.size}` : '',
|
|
18
20
|
props.outlined === true ? 'is-outlined' : '',
|
package/components/icon/index.js
CHANGED
|
@@ -11,7 +11,7 @@ const sizeToClassMap = new Map([
|
|
|
11
11
|
*/
|
|
12
12
|
export default function Icon({ size = 'medium', name, className }) {
|
|
13
13
|
const classNames = getClassName([
|
|
14
|
-
"
|
|
14
|
+
"bbr-icon",
|
|
15
15
|
"bi",
|
|
16
16
|
`bi-${name}`,
|
|
17
17
|
sizeToClassMap.has(size) ? sizeToClassMap.get(size) : "",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/search/index.tsx"],"names":[],"mappings":";AAIA,OAAO,eAAe,CAAC;AAGvB,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC,oBAAY,WAAW,GAAG;IACtB;;;;MAIE;IACF,UAAU,EAAE,UAAU,GAAG,UAAU,CAAC;IAEpC,qBAAqB;IACrB,OAAO,EAAE,MAAM,CAAC;IAEhB,qBAAqB;IACrB,QAAQ,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,IAAI,CAAC;IAE1C,2BAA2B;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,+DAA+D;IAC/D,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,yBAAyB;IACzB,IAAI,CAAC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AE,OAAO,EAAE,QAAQ,GACrC,EAAE,WAAW,GAAG,GAAG,CAAC,OAAO,CAwE3B"}
|
|
@@ -16,13 +16,15 @@ export default function Search({ searchType, onSearch, caption, name, defaultVal
|
|
|
16
16
|
}, [onSearch, searchType]);
|
|
17
17
|
const onSearchButtonClick = useCallback(() => onSearch(searchValue), [onSearch, searchValue]);
|
|
18
18
|
const className = getClassName([
|
|
19
|
-
|
|
19
|
+
"bbr-search",
|
|
20
|
+
"control",
|
|
20
21
|
`is-${(size || 'normal')}`,
|
|
21
22
|
isLoading === true ? 'is-loading' : '',
|
|
22
23
|
searchType === 'byButton' ? 'is-expanded' : '',
|
|
23
24
|
]);
|
|
24
25
|
const inputClassName = getClassName([
|
|
25
|
-
|
|
26
|
+
"input",
|
|
27
|
+
"is-unselectable",
|
|
26
28
|
`is-${(size || 'normal')}`,
|
|
27
29
|
rounded === true ? 'is-rounded' : '',
|
|
28
30
|
]);
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -23,6 +23,8 @@ Simple react components based on html elements.
|
|
|
23
23
|
- **Text**- single line text input;
|
|
24
24
|
- **Anchor**
|
|
25
25
|
- **Button**
|
|
26
|
+
- **Number**
|
|
27
|
+
- **Password** - single line password input (requires icon, see *p.4*)
|
|
26
28
|
- **Icon** - *see p.4 of installation*
|
|
27
29
|
- **Dropdown** - custom dropdown component, based on html div elements & css. Allows to use icon in elements
|
|
28
30
|
- **Checkbox** - (*see p.5 of installation*) Checkbox component based on [bulma-checkradio](https://wikiki.github.io/form/checkradio)
|