@bodynarf/react.components 1.5.1 → 1.5.2
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/components/anchorWithIcon/index.js +5 -5
- package/components/anchor/index.d.ts +3 -3
- package/components/anchor/index.d.ts.map +1 -1
- package/components/anchor/index.js +7 -7
- package/components/anchor/types.d.ts +2 -2
- package/components/anchor/types.d.ts.map +1 -1
- package/components/button/components/buttonWithIcon/index.d.ts +1 -1
- package/components/button/components/buttonWithIcon/index.js +5 -5
- package/components/button/components/simpleButton/index.d.ts +1 -1
- package/components/button/index.d.ts +3 -3
- package/components/button/index.d.ts.map +1 -1
- package/components/button/index.js +9 -9
- package/components/button/types.d.ts +1 -1
- package/components/dropdown/components/compact/index.d.ts +0 -1
- package/components/dropdown/components/compact/index.d.ts.map +1 -1
- package/components/dropdown/components/compact/index.js +3 -3
- package/components/dropdown/components/label/index.d.ts +1 -1
- package/components/dropdown/components/label/index.js +1 -1
- package/components/dropdown/components/withLabel/index.d.ts +1 -2
- package/components/dropdown/components/withLabel/index.d.ts.map +1 -1
- package/components/dropdown/components/withLabel/index.js +7 -7
- package/components/dropdown/index.d.ts +4 -5
- package/components/dropdown/index.d.ts.map +1 -1
- package/components/dropdown/index.js +4 -4
- package/components/icon/index.d.ts +3 -3
- package/components/icon/index.d.ts.map +1 -1
- package/components/icon/index.js +8 -6
- package/components/index.d.ts +10 -0
- package/components/index.d.ts.map +1 -0
- package/components/index.js +9 -0
- package/components/paginator/index.d.ts +2 -2
- package/components/paginator/index.d.ts.map +1 -1
- package/components/paginator/index.js +4 -4
- package/components/primitives/checkbox/index.d.ts +2 -2
- package/components/primitives/checkbox/index.d.ts.map +1 -1
- package/components/primitives/date/index.d.ts +1 -1
- package/components/primitives/date/index.d.ts.map +1 -1
- package/components/primitives/date/index.js +2 -2
- package/components/primitives/index.d.ts +5 -5
- package/components/primitives/index.js +5 -5
- package/components/primitives/multiline/components/multilineWithLabel/index.d.ts.map +1 -1
- package/components/primitives/multiline/components/multilineWithLabel/index.js +2 -2
- package/components/primitives/multiline/components/multilineWithoutLabel/index.d.ts.map +1 -1
- package/components/primitives/multiline/components/multilineWithoutLabel/index.js +2 -2
- package/components/primitives/multiline/index.d.ts +1 -1
- package/components/primitives/multiline/index.d.ts.map +1 -1
- package/components/primitives/number/components/withLabel/index.d.ts.map +1 -1
- package/components/primitives/number/components/withLabel/index.js +2 -2
- package/components/primitives/number/components/withoutLabel/index.d.ts.map +1 -1
- package/components/primitives/number/components/withoutLabel/index.js +2 -2
- package/components/primitives/number/index.d.ts +1 -0
- package/components/primitives/number/index.d.ts.map +1 -1
- package/components/primitives/password/components/withLabel/index.js +2 -2
- package/components/primitives/password/components/withoutLabel/index.js +2 -2
- package/components/primitives/password/index.d.ts +2 -2
- package/components/primitives/password/index.d.ts.map +1 -1
- package/components/primitives/text/components/textWithLabel/index.d.ts.map +1 -1
- package/components/primitives/text/components/textWithLabel/index.js +2 -2
- package/components/primitives/text/components/textWithoutLabel/index.d.ts.map +1 -1
- package/components/primitives/text/components/textWithoutLabel/index.js +2 -2
- package/components/primitives/text/index.d.ts +1 -1
- package/components/primitives/text/index.d.ts.map +1 -1
- package/components/primitives/types/baseProps.d.ts +4 -4
- package/components/primitives/types/baseProps.d.ts.map +1 -1
- package/components/primitives/types/index.d.ts +3 -4
- package/components/primitives/types/index.d.ts.map +1 -1
- package/components/primitives/types/index.js +3 -4
- package/components/search/index.d.ts +3 -3
- package/components/search/index.js +14 -14
- package/components/tag/index.d.ts +4 -5
- package/components/tag/index.d.ts.map +1 -1
- package/components/tag/index.js +6 -6
- package/components/types.d.ts +29 -3
- package/components/types.d.ts.map +1 -1
- package/components/types.js +31 -1
- package/hooks/index.d.ts +2 -2
- package/hooks/index.js +2 -2
- package/hooks/useComponentOutsideClick.js +2 -2
- package/package.json +2 -2
- package/utils/formValidation.d.ts +3 -3
- package/utils/formValidation.d.ts.map +1 -1
- package/utils/formValidation.js +1 -1
- package/utils/index.d.ts +1 -1
- package/utils/index.js +1 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { isNullOrEmpty } from
|
|
3
|
-
import Icon from
|
|
2
|
+
import { isNullOrEmpty } from "@bodynarf/utils";
|
|
3
|
+
import Icon from "../../../icon";
|
|
4
4
|
/** Anchor with icon component */
|
|
5
5
|
export const AnchorWithIcon = ({ href, className, onClick, caption, title, target, icon }) => {
|
|
6
|
-
const iconPosition = icon.position ||
|
|
6
|
+
const iconPosition = icon.position || "left";
|
|
7
7
|
const iconClassName = isNullOrEmpty(caption)
|
|
8
8
|
? icon.className
|
|
9
|
-
: iconPosition ===
|
|
9
|
+
: iconPosition === "left"
|
|
10
10
|
? `${icon.className} bbr-icon--left`
|
|
11
11
|
: `${icon.className} bbr-icon--right`;
|
|
12
|
-
if (iconPosition ===
|
|
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
|
}
|
|
15
15
|
return (_jsxs("a", { href: href, className: className, title: title, target: target, onClick: onClick, children: [caption, _jsx(Icon, { ...icon, className: iconClassName })] }));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import
|
|
3
|
-
import { ElementIcon } from
|
|
2
|
+
import "./anchor.scss";
|
|
3
|
+
import { ElementIcon } from "..";
|
|
4
4
|
export declare type AnchorProps = {
|
|
5
5
|
/** Link destination */
|
|
6
6
|
href?: string;
|
|
@@ -13,7 +13,7 @@ export declare type AnchorProps = {
|
|
|
13
13
|
/** Title of anchor */
|
|
14
14
|
title?: string;
|
|
15
15
|
/** Where to open the linked document */
|
|
16
|
-
target?:
|
|
16
|
+
target?: "_blank" | "_top";
|
|
17
17
|
/** Additional class names */
|
|
18
18
|
className?: string;
|
|
19
19
|
/** Should css hovering effects be disabled */
|
|
@@ -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,
|
|
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,IAAI,CAAC;AAKjC,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,17 +1,17 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { isNullOrUndefined, isNullOrEmpty, getClassName } from
|
|
3
|
-
import
|
|
4
|
-
import { SimpleAnchor } from
|
|
5
|
-
import { AnchorWithIcon } from
|
|
2
|
+
import { isNullOrUndefined, isNullOrEmpty, getClassName } from "@bodynarf/utils";
|
|
3
|
+
import "./anchor.scss";
|
|
4
|
+
import { SimpleAnchor } from "./components/simpleAnchor";
|
|
5
|
+
import { AnchorWithIcon } from "./components/anchorWithIcon";
|
|
6
6
|
/** Anchor component */
|
|
7
7
|
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
11
|
const className = getClassName([
|
|
12
|
-
|
|
13
|
-
!isNullOrEmpty(props.className) ? ` ${props.className}` :
|
|
14
|
-
props.disableHovering === true ?
|
|
12
|
+
"bbr-anchor",
|
|
13
|
+
!isNullOrEmpty(props.className) ? ` ${props.className}` : "",
|
|
14
|
+
props.disableHovering === true ? " bbr-anchor--unhoverable" : ""
|
|
15
15
|
]);
|
|
16
16
|
if (isNullOrUndefined(props.icon)) {
|
|
17
17
|
return (_jsx(SimpleAnchor, { ...props, className: className, onClick: props.onClick }));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ElementIcon } from "
|
|
1
|
+
import { ElementIcon } from "..";
|
|
2
2
|
export declare type SimpleAnchorProps = {
|
|
3
3
|
/** Link destination */
|
|
4
4
|
href?: string;
|
|
@@ -11,7 +11,7 @@ export declare type SimpleAnchorProps = {
|
|
|
11
11
|
/** Title of anchor */
|
|
12
12
|
title?: string;
|
|
13
13
|
/** Where to open the linked document */
|
|
14
|
-
target?:
|
|
14
|
+
target?: "_blank" | "_top";
|
|
15
15
|
};
|
|
16
16
|
export declare type AnchorWithIconProps = SimpleAnchorProps & {
|
|
17
17
|
/** Configuration of icon */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/anchor/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/anchor/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,IAAI,CAAC;AAEjC,oBAAY,iBAAiB,GAAG;IAC5B,uBAAuB;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,kBAAkB;IAClB,SAAS,EAAE,MAAM,CAAC;IAElB,oBAAoB;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB,oBAAoB;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,sBAAsB;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,wCAAwC;IACxC,MAAM,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;CAC9B,CAAC;AAEF,oBAAY,mBAAmB,GAAG,iBAAiB,GAAG;IAClD,4BAA4B;IAC5B,IAAI,EAAE,WAAW,CAAC;CACrB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ButtonWithIconProps } from
|
|
1
|
+
import { ButtonWithIconProps } from "../../types";
|
|
2
2
|
/** Button with icon component */
|
|
3
3
|
export declare const ButtonWithIcon: ({ className, disabled, onClick, caption, title, icon }: ButtonWithIconProps) => JSX.Element;
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { isNullOrEmpty } from
|
|
3
|
-
import Icon from
|
|
2
|
+
import { isNullOrEmpty } from "@bodynarf/utils";
|
|
3
|
+
import Icon from "../../../icon";
|
|
4
4
|
/** Button with icon component */
|
|
5
5
|
export const ButtonWithIcon = ({ className, disabled, onClick, caption, title, icon }) => {
|
|
6
|
-
const iconPosition = icon.position ||
|
|
6
|
+
const iconPosition = icon.position || "left";
|
|
7
7
|
const iconClassName = isNullOrEmpty(caption)
|
|
8
8
|
? icon.className
|
|
9
|
-
: iconPosition ===
|
|
9
|
+
: iconPosition === "left"
|
|
10
10
|
? `${icon.className} bbr-icon--left`
|
|
11
11
|
: `${icon.className} bbr-icon--right`;
|
|
12
12
|
className = isNullOrEmpty(caption)
|
|
13
13
|
? `${className} bbr-button--icon-only`
|
|
14
14
|
: className;
|
|
15
|
-
if (iconPosition ===
|
|
15
|
+
if (iconPosition === "left") {
|
|
16
16
|
return (_jsxs("button", { className: className, disabled: disabled, onClick: onClick, title: title, children: [_jsx(Icon, { ...icon, className: iconClassName }), caption] }));
|
|
17
17
|
}
|
|
18
18
|
return (_jsxs("button", { className: className, disabled: disabled, onClick: onClick, title: title, children: [caption, _jsx(Icon, { ...icon, className: iconClassName })] }));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SimpleButtonProps } from
|
|
1
|
+
import { SimpleButtonProps } from "../../types";
|
|
2
2
|
/** Simple button component, without icon */
|
|
3
3
|
export declare const SimpleButton: ({ className, disabled, onClick, caption, title }: SimpleButtonProps) => JSX.Element;
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import
|
|
3
|
-
import { ElementIcon, ElementSize } from
|
|
4
|
-
import { ButtonType } from
|
|
2
|
+
import "./button.scss";
|
|
3
|
+
import { ElementIcon, ElementSize } from "..";
|
|
4
|
+
import { ButtonType } from "./types";
|
|
5
5
|
export declare type ButtonProps = {
|
|
6
6
|
/** Button displaying text */
|
|
7
7
|
caption?: string;
|
|
@@ -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,
|
|
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,IAAI,CAAC;AAE9C,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,CAAC;IAEf,6CAA6C;IAC7C,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB,yBAAyB;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,wCAAwC;IACxC,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,2BAA2B;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,yBAAyB;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,2BAA2B;IAC3B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAK,EAAE,WAAW,GAAG,GAAG,CAAC,OAAO,CAkC9D"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { isNullOrEmpty, isNullOrUndefined, getClassName } from
|
|
3
|
-
import
|
|
4
|
-
import { ButtonWithIcon } from
|
|
5
|
-
import { SimpleButton } from
|
|
2
|
+
import { isNullOrEmpty, isNullOrUndefined, getClassName } from "@bodynarf/utils";
|
|
3
|
+
import "./button.scss";
|
|
4
|
+
import { ButtonWithIcon } from "./components/buttonWithIcon";
|
|
5
|
+
import { SimpleButton } from "./components/simpleButton";
|
|
6
6
|
/**
|
|
7
7
|
* Button component
|
|
8
8
|
* @throws Caption is not defined and icon configuration is not defined at the same time
|
|
@@ -15,11 +15,11 @@ export default function Button(props) {
|
|
|
15
15
|
"button",
|
|
16
16
|
"bbr-button",
|
|
17
17
|
`is-${props.type}`,
|
|
18
|
-
props.light === true ?
|
|
19
|
-
!isNullOrUndefined(props.size) ? `is-${props.size}` :
|
|
20
|
-
props.outlined === true ?
|
|
21
|
-
props.rounded === true ?
|
|
22
|
-
props.isLoading === true ?
|
|
18
|
+
props.light === true ? "is-light" : "",
|
|
19
|
+
!isNullOrUndefined(props.size) ? `is-${props.size}` : "",
|
|
20
|
+
props.outlined === true ? "is-outlined" : "",
|
|
21
|
+
props.rounded === true ? "is-rounded" : "",
|
|
22
|
+
props.isLoading === true ? "is-loading" : "",
|
|
23
23
|
]);
|
|
24
24
|
if (!isNullOrUndefined(props.icon)) {
|
|
25
25
|
return (_jsx(ButtonWithIcon, { ...props, className: className, onClick: props.onClick, icon: props.icon }));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ElementIcon } from "../types";
|
|
2
2
|
/** Button types according to Bulma framework */
|
|
3
|
-
export declare type ButtonType =
|
|
3
|
+
export declare type ButtonType = "default" /** color: transparent */ | "primary" /** color: seawave green */ | "link" /** color: blue-violet */ | "info" /** color: sky-blue */ | "success" /** color: green */ | "warning" /** color: yellow */ | "danger" /** color: red */ | "white" /** color: white */ | "light" /** color: light-gray */ | "dark" /** color: dark-gray */ | "black" /** color: black */ | "text" /** Underline text with color: gray */ | "ghost" /** Blue underline text with color: transparent */;
|
|
4
4
|
export declare type SimpleButtonProps = {
|
|
5
5
|
/** Button class name*/
|
|
6
6
|
className: string;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { DropdownProps } from "../..";
|
|
3
2
|
declare const DropdownCompact: ({ items, value, onSelect, deselectable, className, hideOnOuterClick, listMaxHeight, placeholder, compact, disabled, }: DropdownProps) => JSX.Element;
|
|
4
3
|
export default DropdownCompact;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/dropdown/components/compact/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/dropdown/components/compact/index.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAKtC,QAAA,MAAM,eAAe,0HAMlB,aAAa,KAAG,WAsGlB,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -2,8 +2,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useCallback, useId, useState } from "react";
|
|
3
3
|
import { getClassName, isNullOrEmpty, isNullOrUndefined } from "@bodynarf/utils";
|
|
4
4
|
import { useComponentOutsideClick } from "../../../../hooks";
|
|
5
|
-
import DropdownItem from
|
|
6
|
-
import DropdownLabel from
|
|
5
|
+
import DropdownItem from "../item";
|
|
6
|
+
import DropdownLabel from "../label";
|
|
7
7
|
const DropdownCompact = ({ items, value, onSelect, deselectable, className, hideOnOuterClick, listMaxHeight, placeholder, compact, disabled, }) => {
|
|
8
8
|
const id = useId();
|
|
9
9
|
const [isListVisible, setListVisible] = useState(false);
|
|
@@ -15,7 +15,7 @@ const DropdownCompact = ({ items, value, onSelect, deselectable, className, hide
|
|
|
15
15
|
if (isNullOrUndefined(target)) {
|
|
16
16
|
return;
|
|
17
17
|
}
|
|
18
|
-
const dataValue = target.dataset[
|
|
18
|
+
const dataValue = target.dataset["dropdownItemValue"];
|
|
19
19
|
if (isNullOrEmpty(dataValue)) {
|
|
20
20
|
return;
|
|
21
21
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { getClassName, isNullOrEmpty, isNullOrUndefined } from "@bodynarf/utils";
|
|
3
|
-
import Icon from
|
|
3
|
+
import Icon from "../../../icon";
|
|
4
4
|
/** Label component */
|
|
5
5
|
const DropdownLabel = ({ caption, selectedItem, onClick, deselectable, className, }) => {
|
|
6
6
|
const itemSelected = !isNullOrUndefined(selectedItem);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { DropdownProps } from '../..';
|
|
1
|
+
import { DropdownProps } from "../..";
|
|
3
2
|
declare const DropdownWithLabel: ({ items, value, onSelect, validationState, deselectable, className, hideOnOuterClick, listMaxHeight, label, placeholder, disabled }: DropdownProps) => JSX.Element;
|
|
4
3
|
export default DropdownWithLabel;
|
|
5
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/dropdown/components/withLabel/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/dropdown/components/withLabel/index.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAKtC,QAAA,MAAM,iBAAiB,wIAOpB,aAAa,KAAG,WAoLlB,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useCallback, useId, useState } from
|
|
3
|
-
import { isNullOrUndefined, isNullOrEmpty, getClassName } from
|
|
4
|
-
import { getValidationValues } from
|
|
5
|
-
import { useComponentOutsideClick } from
|
|
6
|
-
import DropdownItem from
|
|
7
|
-
import DropdownLabel from
|
|
2
|
+
import { useCallback, useId, useState } from "react";
|
|
3
|
+
import { isNullOrUndefined, isNullOrEmpty, getClassName } from "@bodynarf/utils";
|
|
4
|
+
import { getValidationValues } from "../../../../utils";
|
|
5
|
+
import { useComponentOutsideClick } from "../../../../hooks";
|
|
6
|
+
import DropdownItem from "../item";
|
|
7
|
+
import DropdownLabel from "../label";
|
|
8
8
|
const DropdownWithLabel = ({ items, value, onSelect, validationState, deselectable, className, hideOnOuterClick, listMaxHeight, label, placeholder, disabled }) => {
|
|
9
9
|
const id = useId();
|
|
10
10
|
const [isListVisible, setListVisible] = useState(false);
|
|
@@ -17,7 +17,7 @@ const DropdownWithLabel = ({ items, value, onSelect, validationState, deselectab
|
|
|
17
17
|
if (isNullOrUndefined(target)) {
|
|
18
18
|
return;
|
|
19
19
|
}
|
|
20
|
-
const dataValue = target.dataset[
|
|
20
|
+
const dataValue = target.dataset["dropdownItemValue"];
|
|
21
21
|
if (isNullOrEmpty(dataValue)) {
|
|
22
22
|
return;
|
|
23
23
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { SelectableItem } from './types';
|
|
1
|
+
import "./dropdown.scss";
|
|
2
|
+
import { BaseElementProps } from "..";
|
|
3
|
+
import { InputLabel, ValidationState } from "../primitives";
|
|
4
|
+
import { SelectableItem } from "./types";
|
|
6
5
|
export declare type DropdownProps = BaseElementProps & {
|
|
7
6
|
/** Items which can be selected */
|
|
8
7
|
items: Array<SelectableItem>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/dropdown/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/dropdown/index.tsx"],"names":[],"mappings":"AAEA,OAAO,iBAAiB,CAAC;AAEzB,OAAO,EAAE,gBAAgB,EAAE,MAAM,IAAI,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAE5D,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAIzC,oBAAY,aAAa,GAAG,gBAAgB,GAAG;IAC3C,kCAAkC;IAClC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;IAE7B,gCAAgC;IAChC,WAAW,EAAE,MAAM,CAAC;IAEpB;;MAEE;IACF,QAAQ,EAAE,CAAC,IAAI,CAAC,EAAE,cAAc,KAAK,IAAI,CAAC;IAE1C;;;MAGE;IACF,KAAK,CAAC,EAAE,cAAc,CAAC;IAEvB,gEAAgE;IAChE,gBAAgB,EAAE,OAAO,CAAC;IAE1B,wBAAwB;IACxB,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB,+CAA+C;IAC/C,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,0BAA0B;IAC1B,KAAK,CAAC,EAAE,UAAU,CAAC;IAEnB,+BAA+B;IAC/B,eAAe,CAAC,EAAE,eAAe,CAAC;CACrC,CAAA;AAED,yBAAyB;AACzB,QAAA,MAAM,QAAQ,UAAW,aAAa,KAAG,WAMxC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { isNullOrUndefined } from
|
|
3
|
-
import
|
|
4
|
-
import DropdownWithLabel from
|
|
5
|
-
import DropdownCompact from
|
|
2
|
+
import { isNullOrUndefined } from "@bodynarf/utils";
|
|
3
|
+
import "./dropdown.scss";
|
|
4
|
+
import DropdownWithLabel from "./components/withLabel";
|
|
5
|
+
import DropdownCompact from "./components/compact";
|
|
6
6
|
/** Dropdown component */
|
|
7
7
|
const Dropdown = (props) => {
|
|
8
8
|
if (!isNullOrUndefined(props.label)) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import
|
|
3
|
-
import { ElementSize } from
|
|
2
|
+
import "./icon.scss";
|
|
3
|
+
import { ElementSize } from "..";
|
|
4
4
|
/** Icon component props */
|
|
5
5
|
export declare type IconProps = {
|
|
6
6
|
/**
|
|
@@ -18,5 +18,5 @@ export declare type IconProps = {
|
|
|
18
18
|
/**
|
|
19
19
|
* Icon component. Based on bootstrap icons
|
|
20
20
|
*/
|
|
21
|
-
export default function Icon({
|
|
21
|
+
export default function Icon({ name, size, className, }: IconProps): JSX.Element;
|
|
22
22
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/icon/index.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/icon/index.tsx"],"names":[],"mappings":";AAEA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,WAAW,EAAE,MAAM,IAAI,CAAC;AAEjC,2BAA2B;AAC3B,oBAAY,SAAS,GAAG;IACpB;;;;;MAKE;IACF,IAAI,EAAE,MAAM,CAAC;IAEb,2BAA2B;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,gBAAgB;IAChB,IAAI,CAAC,EAAE,WAAW,CAAC;CACtB,CAAA;AASD;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,EACzB,IAAI,EAAE,IAAyB,EAC/B,SAAS,GACZ,EAAE,SAAS,GAAG,GAAG,CAAC,OAAO,CAYzB"}
|
package/components/icon/index.js
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import { getClassName } from "@bodynarf/utils";
|
|
3
|
+
import "./icon.scss";
|
|
4
|
+
import { ElementSize } from "..";
|
|
4
5
|
const sizeToClassMap = new Map([
|
|
5
|
-
[
|
|
6
|
-
[
|
|
7
|
-
[
|
|
6
|
+
[ElementSize.Small, "bbr-icon--size-smal"],
|
|
7
|
+
[ElementSize.Normal, ""],
|
|
8
|
+
[ElementSize.Medium, "bbr-icon--size-medium"],
|
|
9
|
+
[ElementSize.Large, "bbr-icon--size-large"]
|
|
8
10
|
]);
|
|
9
11
|
/**
|
|
10
12
|
* Icon component. Based on bootstrap icons
|
|
11
13
|
*/
|
|
12
|
-
export default function Icon({ size =
|
|
14
|
+
export default function Icon({ name, size = ElementSize.Normal, className, }) {
|
|
13
15
|
const classNames = getClassName([
|
|
14
16
|
"bbr-icon",
|
|
15
17
|
"bi",
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from "./types";
|
|
2
|
+
export * from "./anchor";
|
|
3
|
+
export * from "./button";
|
|
4
|
+
export * from "./dropdown";
|
|
5
|
+
export * from "./icon";
|
|
6
|
+
export * from "./paginator";
|
|
7
|
+
export * from "./primitives";
|
|
8
|
+
export * from "./search";
|
|
9
|
+
export * from "./tag";
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ElementSize } from
|
|
2
|
+
import { ElementSize } from "..";
|
|
3
3
|
export declare type PaginatorProps = {
|
|
4
4
|
/** Amount of pages */
|
|
5
5
|
count: number;
|
|
@@ -11,7 +11,7 @@ export declare type PaginatorProps = {
|
|
|
11
11
|
* Page numbers position.
|
|
12
12
|
* Usefull with `showNextButtons = true`
|
|
13
13
|
*/
|
|
14
|
-
position?:
|
|
14
|
+
position?: "left" | "center" | "right";
|
|
15
15
|
/** Buttons should have rounded borders */
|
|
16
16
|
rounded?: boolean;
|
|
17
17
|
/** Size of paginator component elements */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/paginator/index.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/paginator/index.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,IAAI,CAAC;AAIjC,oBAAY,cAAc,GAAG;IACzB,sBAAsB;IACtB,KAAK,EAAE,MAAM,CAAC;IAEd,0BAA0B;IAC1B,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAErC,mBAAmB;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;MAGE;IACF,QAAQ,CAAC,EACP,MAAM,GACN,QAAQ,GACR,OAAO,CACR;IAED,0CAA0C;IAC1C,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,2CAA2C;IAC3C,IAAI,CAAC,EAAE,WAAW,CAAC;IAEnB,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,0CAA0C;IAC1C,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B;;;MAGE;IACF,cAAc,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAA;AAED;;;EAGE;AACF,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAC9B,KAAK,EAAE,YAAY,EAAE,WAAW,EAChC,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAClC,eAAe,EAAE,cAAc,EAClC,EAAE,cAAc,GAAG,GAAG,CAAC,OAAO,CA2G9B"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useCallback, useMemo } from
|
|
3
|
-
import { getClassName, isNullOrEmpty } from
|
|
4
|
-
import { generatePageNumbers } from
|
|
2
|
+
import { useCallback, useMemo } from "react";
|
|
3
|
+
import { getClassName, isNullOrEmpty } from "@bodynarf/utils";
|
|
4
|
+
import { generatePageNumbers } from "./utils";
|
|
5
5
|
/**
|
|
6
6
|
* Paginator component.
|
|
7
7
|
* Used for visualization of pagging configuration
|
|
@@ -10,7 +10,7 @@ export default function Paginator({ count, onPageChange, currentPage, position,
|
|
|
10
10
|
const page = currentPage || 0;
|
|
11
11
|
const pageChange = useCallback((event) => {
|
|
12
12
|
const target = event.target;
|
|
13
|
-
const pageRaw = target.dataset[
|
|
13
|
+
const pageRaw = target.dataset["page"];
|
|
14
14
|
if (isNullOrEmpty(pageRaw)) {
|
|
15
15
|
return;
|
|
16
16
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./checkbox.scss";
|
|
2
|
-
import { BaseInputElementProps } from "
|
|
2
|
+
import { BaseInputElementProps } from "..";
|
|
3
3
|
export interface CheckBoxProps extends BaseInputElementProps<boolean> {
|
|
4
4
|
/** Is full colored checkbox */
|
|
5
5
|
block?: boolean;
|
|
@@ -13,7 +13,7 @@ export interface CheckBoxProps extends BaseInputElementProps<boolean> {
|
|
|
13
13
|
/**
|
|
14
14
|
* Set unchecked background as transparent.
|
|
15
15
|
* Only used with `hasBackgroundColor` set as `true`
|
|
16
|
-
* @example `{ style:
|
|
16
|
+
* @example `{ style: ElementColor.Info, hasBackgrounColor: true, fixBackgroundColor: true }` -
|
|
17
17
|
*/
|
|
18
18
|
fixBackgroundColor?: boolean;
|
|
19
19
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/primitives/checkbox/index.tsx"],"names":[],"mappings":"AAIA,OAAO,iBAAiB,CAAC;AAEzB,OAAO,EAAE,qBAAqB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/primitives/checkbox/index.tsx"],"names":[],"mappings":"AAIA,OAAO,iBAAiB,CAAC;AAEzB,OAAO,EAAE,qBAAqB,EAAE,MAAM,IAAI,CAAC;AAE3C,MAAM,WAAW,aAAc,SAAQ,qBAAqB,CAAC,OAAO,CAAC;IACjE,+BAA+B;IAC/B,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB,iCAAiC;IACjC,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;MAGE;IACF,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B;;;;MAIE;IACF,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,8BAA8B;AAC9B,QAAA,MAAM,QAAQ,6JAMX,aAAa,KAAG,WAoFlB,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../../../common.scss";
|
|
2
|
-
import { BaseInputElementProps, InputLabel } from "
|
|
2
|
+
import { BaseInputElementProps, InputLabel } from "../..";
|
|
3
3
|
/** Date input conponent props type */
|
|
4
4
|
export declare type DateProps = Omit<BaseInputElementProps<Date | undefined>, "placeholder"> & {
|
|
5
5
|
/** Label configuration */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/primitives/date/index.tsx"],"names":[],"mappings":"AAIA,OAAO,sBAAsB,CAAC;AAE9B,OAAO,EAAE,qBAAqB,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/primitives/date/index.tsx"],"names":[],"mappings":"AAIA,OAAO,sBAAsB,CAAC;AAE9B,OAAO,EAAE,qBAAqB,EAAE,UAAU,EAAe,MAAM,OAAO,CAAC;AAGvE,sCAAsC;AACtC,oBAAY,SAAS,GAAG,IAAI,CAAC,qBAAqB,CAAC,IAAI,GAAG,SAAS,CAAC,EAAE,aAAa,CAAC,GAAG;IACnF,0BAA0B;IAC1B,KAAK,EAAE,UAAU,CAAC;IAElB,8BAA8B;IAC9B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB,CAAA;AAED,2BAA2B;AAC3B,QAAA,MAAM,UAAU,wIAMb,SAAS,KAAG,WA4Gd,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useCallback } from "react";
|
|
3
3
|
import { generateGuid, getClassName, getValueOrDefault, isStringEmpty } from "@bodynarf/utils";
|
|
4
4
|
import "../../../common.scss";
|
|
5
|
-
import {
|
|
5
|
+
import { ElementSize } from "../..";
|
|
6
6
|
import { getValidationValues } from "../../../utils";
|
|
7
7
|
/** Date input component */
|
|
8
8
|
const DatePicker = ({ defaultValue, onValueChange, readonly, disabled, validationState, name, size, className, rounded, loading, style, label, onBlur }) => {
|
|
@@ -10,7 +10,7 @@ const DatePicker = ({ defaultValue, onValueChange, readonly, disabled, validatio
|
|
|
10
10
|
? undefined
|
|
11
11
|
: new Date(event.target.value)), [onValueChange]);
|
|
12
12
|
const id = name || generateGuid();
|
|
13
|
-
const elSizeClassName = "is-{0}".format(getValueOrDefault(size,
|
|
13
|
+
const elSizeClassName = "is-{0}".format(getValueOrDefault(size, ElementSize.Normal));
|
|
14
14
|
const [isValidationDefined, styleClassName, validationMessages] = getValidationValues(style, validationState);
|
|
15
15
|
const elClassName = getClassName([
|
|
16
16
|
className,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
1
|
+
export * from "./date";
|
|
2
|
+
export * from "./multiline";
|
|
3
|
+
export * from "./text";
|
|
4
|
+
export * from "./checkbox";
|
|
5
|
+
export * from "./types";
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
1
|
+
export * from "./date";
|
|
2
|
+
export * from "./multiline";
|
|
3
|
+
export * from "./text";
|
|
4
|
+
export * from "./checkbox";
|
|
5
|
+
export * from "./types";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/primitives/multiline/components/multilineWithLabel/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/primitives/multiline/components/multilineWithLabel/index.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEvC,8DAA8D;AAC9D,QAAA,MAAM,kBAAkB,kKAOrB,cAAc,KAAG,WAyGnB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback } from "react";
|
|
3
3
|
import { generateGuid, getClassName, getValueOrDefault } from "@bodynarf/utils";
|
|
4
|
-
import {
|
|
4
|
+
import { ElementSize } from "../../../..";
|
|
5
5
|
import { getValidationValues } from "../../../../../utils";
|
|
6
6
|
/** Multiline textual input component with describing label */
|
|
7
7
|
const MultilineWithLabel = ({ defaultValue, onValueChange, validationState, readonly, disabled, name, className, size, style, rounded, loading, label, placeholder, fixed, rows, onBlur }) => {
|
|
8
8
|
const onChange = useCallback((event) => onValueChange(event.target.value), [onValueChange]);
|
|
9
9
|
const id = name || generateGuid();
|
|
10
|
-
const elSizeClassName = "is-{0}".format(getValueOrDefault(size,
|
|
10
|
+
const elSizeClassName = "is-{0}".format(getValueOrDefault(size, ElementSize.Normal));
|
|
11
11
|
const [isValidationDefined, styleClassName, validationMessages] = getValidationValues(style, validationState);
|
|
12
12
|
const elClassName = getClassName([
|
|
13
13
|
className,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/primitives/multiline/components/multilineWithoutLabel/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/primitives/multiline/components/multilineWithoutLabel/index.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEvC,gEAAgE;AAChE,QAAA,MAAM,qBAAqB,wIAMxB,cAAc,KAAG,WA0CnB,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback } from "react";
|
|
3
3
|
import { generateGuid, getClassName, getValueOrDefault } from "@bodynarf/utils";
|
|
4
|
-
import {
|
|
4
|
+
import { ElementSize } from "../../../../";
|
|
5
5
|
import { getValidationValues } from "../../../../../utils";
|
|
6
6
|
/** Multiline textual input component without describing label*/
|
|
7
7
|
const MultilineWithoutLabel = ({ onValueChange, defaultValue, validationState, name, placeholder, onBlur, className, size, style, rounded, loading, fixed, rows, }) => {
|
|
@@ -10,7 +10,7 @@ const MultilineWithoutLabel = ({ onValueChange, defaultValue, validationState, n
|
|
|
10
10
|
const [isValidationDefined, styleClassName, validationMessages] = getValidationValues(style, validationState);
|
|
11
11
|
const elClassName = getClassName([
|
|
12
12
|
className,
|
|
13
|
-
"is-{0}".format(getValueOrDefault(size,
|
|
13
|
+
"is-{0}".format(getValueOrDefault(size, ElementSize.Normal)),
|
|
14
14
|
rounded === true ? "is-rounded" : "",
|
|
15
15
|
styleClassName,
|
|
16
16
|
"textarea",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../../../common.scss";
|
|
2
|
-
import { BaseInputElementProps } from "
|
|
2
|
+
import { BaseInputElementProps } from "..";
|
|
3
3
|
/** Multiline textual input conponent props type */
|
|
4
4
|
export declare type MultilineProps = BaseInputElementProps<string> & {
|
|
5
5
|
/** Is input should be resizable */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/primitives/multiline/index.tsx"],"names":[],"mappings":"AAEA,OAAO,sBAAsB,CAAC;AAE9B,OAAO,EAAE,qBAAqB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/primitives/multiline/index.tsx"],"names":[],"mappings":"AAEA,OAAO,sBAAsB,CAAC;AAE9B,OAAO,EAAE,qBAAqB,EAAE,MAAM,IAAI,CAAC;AAK3C,mDAAmD;AACnD,oBAAY,cAAc,GAAG,qBAAqB,CAAC,MAAM,CAAC,GAAG;IACzD,mCAAmC;IACnC,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB,mCAAmC;IACnC,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,8BAA8B;IAC9B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB,CAAC;AAEF,wCAAwC;AACxC,QAAA,MAAM,SAAS,UAAW,cAAc,KAAG,WAQ1C,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/primitives/number/components/withLabel/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/primitives/number/components/withLabel/index.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAEpC,kCAAkC;AAClC,QAAA,MAAM,eAAe,4JAOlB,WAAW,KAAG,WA2GhB,CAAC;AAEF,eAAe,eAAe,CAAC"}
|