@bodynarf/react.components 1.7.2 → 1.7.3
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/accordion/component/index.d.ts +1 -1
- package/components/accordion/component/index.js +3 -3
- package/components/accordion/types.d.ts +1 -1
- package/components/anchor/component/index.d.ts +1 -1
- package/components/anchor/component/index.js +2 -2
- package/components/anchor/components/anchorWithIcon/index.d.ts +1 -1
- package/components/anchor/components/anchorWithIcon/index.js +1 -1
- package/components/anchor/components/simpleAnchor/index.d.ts +1 -1
- package/components/anchor/types.d.ts +1 -1
- package/components/button/component/index.d.ts +1 -1
- package/components/button/component/index.js +3 -3
- package/components/button/components/buttonWithIcon/index.d.ts +1 -1
- package/components/button/components/buttonWithIcon/index.js +1 -1
- package/components/button/components/simpleButton/index.d.ts +1 -1
- package/components/button/types.d.ts +1 -1
- package/components/dropdown/component/index.d.ts +1 -1
- package/components/dropdown/component/index.js +2 -2
- package/components/dropdown/components/compact/index.d.ts +1 -1
- package/components/dropdown/components/compact/index.js +3 -3
- package/components/dropdown/components/item/index.d.ts +1 -1
- package/components/dropdown/components/label/index.d.ts +1 -1
- package/components/dropdown/components/label/index.js +2 -2
- package/components/dropdown/components/withLabel/index.d.ts +1 -1
- package/components/dropdown/components/withLabel/index.js +4 -4
- package/components/dropdown/types.d.ts +1 -1
- package/components/icon/component/index.d.ts +1 -1
- package/components/icon/component/index.js +1 -1
- package/components/icon/types.d.ts +1 -1
- package/components/paginator/component/index.d.ts +1 -1
- package/components/paginator/component/index.js +1 -1
- package/components/paginator/types.d.ts +1 -1
- package/components/primitives/checkbox/component/index.d.ts +1 -1
- package/components/primitives/checkbox/types.d.ts +1 -1
- package/components/primitives/date/component/index.d.ts +1 -1
- package/components/primitives/date/component/index.js +2 -2
- package/components/primitives/date/types.d.ts +1 -1
- package/components/primitives/multiline/component/index.d.ts +1 -1
- package/components/primitives/multiline/component/index.js +2 -2
- package/components/primitives/multiline/components/multilineWithLabel/index.d.ts +1 -1
- package/components/primitives/multiline/components/multilineWithLabel/index.js +2 -2
- package/components/primitives/multiline/components/multilineWithoutLabel/index.d.ts +1 -1
- package/components/primitives/multiline/components/multilineWithoutLabel/index.js +2 -2
- package/components/primitives/multiline/types.d.ts +1 -1
- package/components/primitives/number/component/index.d.ts +1 -1
- package/components/primitives/number/component/index.js +2 -2
- package/components/primitives/number/components/withLabel/index.d.ts +1 -1
- package/components/primitives/number/components/withLabel/index.js +2 -2
- package/components/primitives/number/components/withoutLabel/index.d.ts +1 -1
- package/components/primitives/number/components/withoutLabel/index.js +2 -2
- package/components/primitives/number/types.d.ts +1 -1
- package/components/primitives/password/component/index.d.ts +1 -1
- package/components/primitives/password/component/index.js +2 -2
- package/components/primitives/password/components/withLabel/index.d.ts +1 -1
- package/components/primitives/password/components/withLabel/index.js +3 -3
- package/components/primitives/password/components/withoutLabel/index.d.ts +1 -1
- package/components/primitives/password/components/withoutLabel/index.js +3 -3
- package/components/primitives/password/types.d.ts +1 -1
- package/components/primitives/text/component/index.d.ts +1 -1
- package/components/primitives/text/component/index.js +2 -2
- package/components/primitives/text/components/textWithLabel/index.d.ts +1 -1
- package/components/primitives/text/components/textWithLabel/index.js +2 -2
- package/components/primitives/text/components/textWithoutLabel/index.d.ts +1 -1
- package/components/primitives/text/components/textWithoutLabel/index.js +2 -2
- package/components/primitives/text/types.d.ts +1 -1
- package/components/primitives/types/baseProps.d.ts +1 -1
- package/components/search/component/index.d.ts +1 -1
- package/components/search/component/index.js +1 -1
- package/components/search/types.d.ts +1 -1
- package/components/tabs/component/index.d.ts +2 -2
- package/components/tabs/component/index.js +4 -4
- package/components/tabs/components/item/index.d.ts +1 -1
- package/components/tabs/components/item/index.js +1 -1
- package/components/tabs/types.d.ts +1 -1
- package/components/tag/component/index.d.ts +1 -1
- package/components/tag/component/index.js +1 -1
- package/components/tag/types.d.ts +1 -1
- package/package.json +2 -2
- package/utils/dataAttributes.d.ts +1 -1
- package/utils/formValidation.d.ts +1 -1
- package/utils/formValidation.js +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import "./style.scss";
|
|
3
|
-
import { AccordionProps } from "
|
|
3
|
+
import { AccordionProps } from "@bbr/components/accordion";
|
|
4
4
|
/** Accordion panel */
|
|
5
5
|
declare const Accordion: ({ children, caption, style, size, defaultExpanded, onToggle, className, data, title, }: AccordionProps) => JSX.Element;
|
|
6
6
|
export default Accordion;
|
|
@@ -2,9 +2,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useCallback, useEffect, useRef, useState } from "react";
|
|
3
3
|
import { getClassName, isNullOrUndefined } from "@bodynarf/utils";
|
|
4
4
|
import "./style.scss";
|
|
5
|
-
import { ElementSize } from "
|
|
6
|
-
import Icon from "
|
|
7
|
-
import { mapDataAttributes } from "
|
|
5
|
+
import { ElementSize } from "@bbr/components";
|
|
6
|
+
import Icon from "@bbr/components/icon";
|
|
7
|
+
import { mapDataAttributes } from "@bbr/utils";
|
|
8
8
|
/** Accordion panel */
|
|
9
9
|
const Accordion = ({ children, caption, style, size, defaultExpanded, onToggle, className, data, title, }) => {
|
|
10
10
|
const expandablePanelRef = useRef(null);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { BaseElementProps, ElementColor, ElementSize } from "
|
|
2
|
+
import { BaseElementProps, ElementColor, ElementSize } from "@bbr/components";
|
|
3
3
|
/** Accordion panel props type */
|
|
4
4
|
export interface AccordionProps extends BaseElementProps {
|
|
5
5
|
/** Content that should be collapsed inside */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import "./style.scss";
|
|
3
|
-
import { AnchorProps } from "
|
|
3
|
+
import { AnchorProps } from "@bbr/components";
|
|
4
4
|
/** Anchor component */
|
|
5
5
|
export default function Anchor(props: AnchorProps): JSX.Element;
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { isNullOrUndefined, isNullOrEmpty, getClassName } from "@bodynarf/utils";
|
|
3
3
|
import "./style.scss";
|
|
4
|
-
import { SimpleAnchor } from "
|
|
5
|
-
import { AnchorWithIcon } from "
|
|
4
|
+
import { SimpleAnchor } from "@bbr/components/anchor/components/simpleAnchor";
|
|
5
|
+
import { AnchorWithIcon } from "@bbr/components/anchor/components/anchorWithIcon";
|
|
6
6
|
/** Anchor component */
|
|
7
7
|
export default function Anchor(props) {
|
|
8
8
|
if (isNullOrUndefined(props.caption) && isNullOrUndefined(props.icon)) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { AnchorWithIconProps } from "
|
|
2
|
+
import { AnchorWithIconProps } from "@bbr/components/anchor";
|
|
3
3
|
/** Anchor with icon component */
|
|
4
4
|
export declare const AnchorWithIcon: ({ href, className, onClick, caption, title, target, icon }: AnchorWithIconProps) => JSX.Element;
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { isNullOrEmpty } from "@bodynarf/utils";
|
|
3
|
-
import Icon from "
|
|
3
|
+
import Icon from "@bbr/components/icon";
|
|
4
4
|
/** Anchor with icon component */
|
|
5
5
|
export const AnchorWithIcon = ({ href, className, onClick, caption, title, target, icon }) => {
|
|
6
6
|
const iconPosition = icon.position || "left";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { SimpleAnchorProps } from "
|
|
2
|
+
import { SimpleAnchorProps } from "@bbr/components/anchor";
|
|
3
3
|
/** Simple anchor component, without icon */
|
|
4
4
|
export declare const SimpleAnchor: ({ href, className, onClick, caption, title, target }: SimpleAnchorProps) => JSX.Element;
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { isNullOrEmpty, isNullOrUndefined, getClassName } from "@bodynarf/utils";
|
|
3
3
|
import "./style.scss";
|
|
4
|
-
import { mapDataAttributes } from "
|
|
5
|
-
import { ButtonWithIcon } from "
|
|
6
|
-
import { SimpleButton } from "
|
|
4
|
+
import { mapDataAttributes } from "@bbr/utils";
|
|
5
|
+
import { ButtonWithIcon } from "@bbr/components/button/components/buttonWithIcon";
|
|
6
|
+
import { SimpleButton } from "@bbr/components/button/components/simpleButton";
|
|
7
7
|
/**
|
|
8
8
|
* Button component
|
|
9
9
|
* @throws Caption is not defined and icon configuration is not defined at the same time
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ButtonWithIconProps } from "
|
|
2
|
+
import { ButtonWithIconProps } from "@bbr/components/button";
|
|
3
3
|
/** Button with icon component */
|
|
4
4
|
export declare const ButtonWithIcon: ({ className, disabled, onClick, caption, title, icon, data, }: ButtonWithIconProps) => JSX.Element;
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { isNullOrEmpty } from "@bodynarf/utils";
|
|
3
|
-
import Icon from "
|
|
3
|
+
import Icon from "@bbr/components/icon";
|
|
4
4
|
/** Button with icon component */
|
|
5
5
|
export const ButtonWithIcon = ({ className, disabled, onClick, caption, title, icon, data, }) => {
|
|
6
6
|
const iconPosition = icon.position || "left";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { SimpleButtonProps } from "
|
|
2
|
+
import { SimpleButtonProps } from "@bbr/components/button";
|
|
3
3
|
/** Simple button component, without icon */
|
|
4
4
|
export declare const SimpleButton: ({ className, disabled, onClick, caption, title, data }: SimpleButtonProps) => JSX.Element;
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import "./style.scss";
|
|
3
|
-
import { DropdownProps } from "
|
|
3
|
+
import { DropdownProps } from "@bbr/components/dropdown";
|
|
4
4
|
/** Dropdown component */
|
|
5
5
|
declare const Dropdown: (props: DropdownProps) => JSX.Element;
|
|
6
6
|
export default Dropdown;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { isNullOrUndefined } from "@bodynarf/utils";
|
|
3
3
|
import "./style.scss";
|
|
4
|
-
import DropdownWithLabel from "
|
|
5
|
-
import DropdownCompact from "
|
|
4
|
+
import DropdownWithLabel from "@bbr/components/dropdown/components/withLabel";
|
|
5
|
+
import DropdownCompact from "@bbr/components/dropdown/components/compact";
|
|
6
6
|
/** Dropdown component */
|
|
7
7
|
const Dropdown = (props) => {
|
|
8
8
|
if (!isNullOrUndefined(props.label)) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { DropdownProps } from "
|
|
2
|
+
import { DropdownProps } from "@bbr/components/dropdown";
|
|
3
3
|
declare const DropdownCompact: ({ items, value, onSelect, deselectable, className, hideOnOuterClick, listMaxHeight, placeholder, compact, disabled, }: DropdownProps) => JSX.Element;
|
|
4
4
|
export default DropdownCompact;
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
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
|
-
import { useComponentOutsideClick } from "
|
|
5
|
-
import DropdownItem from "
|
|
6
|
-
import DropdownLabel from "
|
|
4
|
+
import { useComponentOutsideClick } from "@bbr/hooks";
|
|
5
|
+
import DropdownItem from "@bbr/components/dropdown/components/item";
|
|
6
|
+
import DropdownLabel from "@bbr/components/dropdown/components/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);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { getClassName, isNullOrEmpty, isNullOrUndefined } from "@bodynarf/utils";
|
|
3
|
-
import { ElementSize } from "
|
|
4
|
-
import Icon from "
|
|
3
|
+
import { ElementSize } from "@bbr/components";
|
|
4
|
+
import Icon from "@bbr/components/icon";
|
|
5
5
|
/** Label component */
|
|
6
6
|
const DropdownLabel = ({ caption, selectedItem, onClick, deselectable, className, }) => {
|
|
7
7
|
const itemSelected = !isNullOrUndefined(selectedItem);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { DropdownProps } from "
|
|
2
|
+
import { DropdownProps } from "@bbr/components/dropdown";
|
|
3
3
|
declare const DropdownWithLabel: ({ items, value, onSelect, validationState, deselectable, className, hideOnOuterClick, listMaxHeight, label, placeholder, disabled }: DropdownProps) => JSX.Element;
|
|
4
4
|
export default DropdownWithLabel;
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useId, useState } from "react";
|
|
3
3
|
import { isNullOrUndefined, isNullOrEmpty, getClassName } from "@bodynarf/utils";
|
|
4
|
-
import { getValidationValues } from "
|
|
5
|
-
import { useComponentOutsideClick } from "
|
|
6
|
-
import DropdownItem from "
|
|
7
|
-
import DropdownLabel from "
|
|
4
|
+
import { getValidationValues } from "@bbr/utils";
|
|
5
|
+
import { useComponentOutsideClick } from "@bbr/hooks";
|
|
6
|
+
import DropdownItem from "@bbr/components/dropdown/components/item";
|
|
7
|
+
import DropdownLabel from "@bbr/components/dropdown/components/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);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { getClassName } from "@bodynarf/utils";
|
|
3
3
|
import "./style.scss";
|
|
4
|
-
import { ElementSize } from "
|
|
4
|
+
import { ElementSize } from "@bbr/components";
|
|
5
5
|
const sizeToClassMap = new Map([
|
|
6
6
|
[ElementSize.Small, "bbr-icon--size-small"],
|
|
7
7
|
[ElementSize.Normal, ""],
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useMemo } from "react";
|
|
3
3
|
import { getClassName, isNullOrEmpty } from "@bodynarf/utils";
|
|
4
|
-
import { generatePageNumbers } from "
|
|
4
|
+
import { generatePageNumbers } from "@bbr/components/paginator";
|
|
5
5
|
/**
|
|
6
6
|
* Paginator component.
|
|
7
7
|
* Used for visualization of pagging configuration
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import "./style.scss";
|
|
3
|
-
import { CheckBoxProps } from "
|
|
3
|
+
import { CheckBoxProps } from "@bbr/components/checkbox";
|
|
4
4
|
/** Boolean input component */
|
|
5
5
|
declare const CheckBox: ({ label, onValueChange, defaultValue, name, disabled, rounded, size, style, block, withoutBorder, hasBackgroundColor, fixBackgroundColor, isFormLabel, }: CheckBoxProps) => JSX.Element;
|
|
6
6
|
export default CheckBox;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import "../../../../common.scss";
|
|
3
|
-
import { DateProps } from "
|
|
3
|
+
import { DateProps } from "@bbr/components/date";
|
|
4
4
|
/** Date input component */
|
|
5
5
|
declare const DatePicker: ({ defaultValue, onValueChange, readonly, disabled, validationState, name, size, className, rounded, loading, style, label, onBlur }: DateProps) => JSX.Element;
|
|
6
6
|
export default DatePicker;
|
|
@@ -2,8 +2,8 @@ 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 { ElementSize } from "
|
|
6
|
-
import { getValidationValues } from "
|
|
5
|
+
import { ElementSize } from "@bbr/components";
|
|
6
|
+
import { getValidationValues } from "@bbr/utils";
|
|
7
7
|
/** Date input component */
|
|
8
8
|
const DatePicker = ({ defaultValue, onValueChange, readonly, disabled, validationState, name, size, className, rounded, loading, style, label, onBlur }) => {
|
|
9
9
|
const onChange = useCallback((event) => onValueChange(isStringEmpty(event.target.value)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseInputElementProps, InputLabel } from "
|
|
1
|
+
import { BaseInputElementProps, InputLabel } from "@bbr/components";
|
|
2
2
|
/** Date input component props type */
|
|
3
3
|
export interface DateProps extends Omit<BaseInputElementProps<Date | undefined>, "placeholder"> {
|
|
4
4
|
/** Label configuration */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import "../../../../common.scss";
|
|
3
|
-
import { MultilineProps } from "
|
|
3
|
+
import { MultilineProps } from "@bbr/components/multiline";
|
|
4
4
|
/** Multiline textual input component */
|
|
5
5
|
declare const Multiline: (props: MultilineProps) => JSX.Element;
|
|
6
6
|
export default Multiline;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { isNullOrUndefined } from "@bodynarf/utils";
|
|
3
3
|
import "../../../../common.scss";
|
|
4
|
-
import MultilineWithoutLabel from "
|
|
5
|
-
import MultilineWithLabel from "
|
|
4
|
+
import MultilineWithoutLabel from "@bbr/components/multiline/components/multilineWithoutLabel";
|
|
5
|
+
import MultilineWithLabel from "@bbr/components/multiline/components/multilineWithLabel";
|
|
6
6
|
/** Multiline textual input component */
|
|
7
7
|
const Multiline = (props) => {
|
|
8
8
|
if (isNullOrUndefined(props.label)) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { MultilineProps } from "
|
|
2
|
+
import { MultilineProps } from "@bbr/components/multiline";
|
|
3
3
|
/** Multiline textual input component with describing label */
|
|
4
4
|
declare const MultilineWithLabel: ({ defaultValue, onValueChange, validationState, readonly, disabled, name, className, size, style, rounded, loading, label, placeholder, fixed, rows, onBlur }: MultilineProps) => JSX.Element;
|
|
5
5
|
export default MultilineWithLabel;
|
|
@@ -1,8 +1,8 @@
|
|
|
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 { ElementSize } from "
|
|
5
|
-
import { getValidationValues } from "
|
|
4
|
+
import { ElementSize } from "@bbr/components";
|
|
5
|
+
import { getValidationValues } from "@bbr/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]);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { MultilineProps } from "
|
|
2
|
+
import { MultilineProps } from "@bbr/components/multiline";
|
|
3
3
|
/** Multiline textual input component without describing label*/
|
|
4
4
|
declare const MultilineWithoutLabel: ({ onValueChange, defaultValue, validationState, name, placeholder, onBlur, className, size, style, rounded, loading, fixed, rows, }: MultilineProps) => JSX.Element;
|
|
5
5
|
export default MultilineWithoutLabel;
|
|
@@ -1,8 +1,8 @@
|
|
|
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 { ElementSize } from "
|
|
5
|
-
import { getValidationValues } from "
|
|
4
|
+
import { ElementSize } from "@bbr/components";
|
|
5
|
+
import { getValidationValues } from "@bbr/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, }) => {
|
|
8
8
|
const onChange = useCallback((event) => onValueChange(event.target.value), [onValueChange]);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { isNullOrUndefined } from "@bodynarf/utils";
|
|
3
|
-
import NumberWithLabel from "
|
|
4
|
-
import NumberWithoutLabel from "
|
|
3
|
+
import NumberWithLabel from "@bbr/components/number/components/withLabel";
|
|
4
|
+
import NumberWithoutLabel from "@bbr/components/number/components/withoutLabel";
|
|
5
5
|
/** Number input component */
|
|
6
6
|
const Number = (props) => {
|
|
7
7
|
if (isNullOrUndefined(props.label)) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { NumberProps } from "
|
|
2
|
+
import { NumberProps } from "@bbr/components/number";
|
|
3
3
|
/** Number component with label */
|
|
4
4
|
declare const NumberWithLabel: ({ onValueChange, readonly, disabled, defaultValue, validationState, name, className, size, style, rounded, loading, label, placeholder, onBlur, step, }: NumberProps) => JSX.Element;
|
|
5
5
|
export default NumberWithLabel;
|
|
@@ -1,8 +1,8 @@
|
|
|
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, isStringEmpty } from "@bodynarf/utils";
|
|
4
|
-
import { ElementSize } from "
|
|
5
|
-
import { getValidationValues } from "
|
|
4
|
+
import { ElementSize } from "@bbr/components";
|
|
5
|
+
import { getValidationValues } from "@bbr/utils";
|
|
6
6
|
/** Number component with label */
|
|
7
7
|
const NumberWithLabel = ({ onValueChange, readonly, disabled, defaultValue, validationState, name, className, size, style, rounded, loading, label, placeholder, onBlur, step, }) => {
|
|
8
8
|
const onChange = useCallback((event) => onValueChange(isStringEmpty(event.target.value) ? undefined : +event.target.value), [onValueChange]);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { NumberProps } from "
|
|
2
|
+
import { NumberProps } from "@bbr/components/number";
|
|
3
3
|
/** Number component without label */
|
|
4
4
|
declare const NumberWithoutLabel: ({ onValueChange, readonly, disabled, defaultValue, validationState, name, className, size, style, rounded, loading, placeholder, onBlur, step, }: NumberProps) => JSX.Element;
|
|
5
5
|
export default NumberWithoutLabel;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback } from "react";
|
|
3
3
|
import { generateGuid, getClassName, getValueOrDefault } from "@bodynarf/utils";
|
|
4
|
-
import { ElementSize } from "
|
|
5
|
-
import { getValidationValues } from "
|
|
4
|
+
import { ElementSize } from "@bbr/components";
|
|
5
|
+
import { getValidationValues } from "@bbr/utils";
|
|
6
6
|
/** Number component without label */
|
|
7
7
|
const NumberWithoutLabel = ({ onValueChange, readonly, disabled, defaultValue, validationState, name, className, size, style, rounded, loading, placeholder, onBlur, step, }) => {
|
|
8
8
|
const onChange = useCallback((event) => onValueChange(+event.target.value), [onValueChange]);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import "./style.scss";
|
|
3
|
-
import { PasswordProps } from "
|
|
3
|
+
import { PasswordProps } from "@bbr/components/password";
|
|
4
4
|
/** Password input component */
|
|
5
5
|
declare const Password: (props: PasswordProps) => JSX.Element;
|
|
6
6
|
export default Password;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { isNullOrUndefined } from "@bodynarf/utils";
|
|
3
3
|
import "./style.scss";
|
|
4
|
-
import PasswordWithLabel from "
|
|
5
|
-
import PasswordWithoutLabel from "
|
|
4
|
+
import PasswordWithLabel from "@bbr/components/password/components/withLabel";
|
|
5
|
+
import PasswordWithoutLabel from "@bbr/components/password/components/withoutLabel";
|
|
6
6
|
/** Password input component */
|
|
7
7
|
const Password = (props) => {
|
|
8
8
|
if (isNullOrUndefined(props.label)) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { PasswordProps } from "
|
|
2
|
+
import { PasswordProps } from "@bbr/components/password";
|
|
3
3
|
declare const PasswordWithLabel: ({ onValueChange, disabled, validationState, name, className, size, style, rounded, loading, label, placeholder, canShowPassword, }: PasswordProps) => JSX.Element;
|
|
4
4
|
export default PasswordWithLabel;
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useState } from "react";
|
|
3
3
|
import { generateGuid, getClassName, getValueOrDefault } from "@bodynarf/utils";
|
|
4
|
-
import { getValidationValues } from "
|
|
5
|
-
import { ElementSize } from "
|
|
6
|
-
import Icon from "
|
|
4
|
+
import { getValidationValues } from "@bbr/utils";
|
|
5
|
+
import { ElementSize } from "@bbr/components";
|
|
6
|
+
import Icon from "@bbr/components/icon";
|
|
7
7
|
const PasswordWithLabel = ({ onValueChange, disabled, validationState, name, className, size, style, rounded, loading, label, placeholder, canShowPassword, }) => {
|
|
8
8
|
const onChange = useCallback((event) => onValueChange(event.target.value), [onValueChange]);
|
|
9
9
|
const [contentIsHidden, setContentIsHidden] = useState(true);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { PasswordProps } from "
|
|
2
|
+
import { PasswordProps } from "@bbr/components/password";
|
|
3
3
|
declare const PasswordWithoutLabel: ({ onValueChange, disabled, validationState, name, className, size, style, rounded, loading, placeholder, canShowPassword, }: PasswordProps) => JSX.Element;
|
|
4
4
|
export default PasswordWithoutLabel;
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useState } from "react";
|
|
3
3
|
import { generateGuid, getClassName, getValueOrDefault } from "@bodynarf/utils";
|
|
4
|
-
import { ElementSize } from "
|
|
5
|
-
import { getValidationValues } from "
|
|
6
|
-
import Icon from "
|
|
4
|
+
import { ElementSize } from "@bbr/components";
|
|
5
|
+
import { getValidationValues } from "@bbr/utils";
|
|
6
|
+
import Icon from "@bbr/components/icon";
|
|
7
7
|
const PasswordWithoutLabel = ({ onValueChange, disabled, validationState, name, className, size, style, rounded, loading, placeholder, canShowPassword, }) => {
|
|
8
8
|
const onChange = useCallback((event) => onValueChange(event.target.value), [onValueChange]);
|
|
9
9
|
const [contentIsHidden, setContentIsHidden] = useState(true);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { isNullOrUndefined } from "@bodynarf/utils";
|
|
3
3
|
import "../../../../common.scss";
|
|
4
|
-
import TextWithLabel from "
|
|
5
|
-
import TextWithoutLabel from "
|
|
4
|
+
import TextWithLabel from "@bbr/components/text/components/textWithLabel";
|
|
5
|
+
import TextWithoutLabel from "@bbr/components/text/components/textWithoutLabel";
|
|
6
6
|
/** Textual input component */
|
|
7
7
|
const Text = (props) => {
|
|
8
8
|
if (isNullOrUndefined(props.label)) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { TextProps } from "
|
|
2
|
+
import { TextProps } from "@bbr/components/text";
|
|
3
3
|
/** Textual input with describing label */
|
|
4
4
|
declare const TextWithLabel: ({ onValueChange, readonly, disabled, defaultValue, validationState, name, className, size, style, rounded, loading, label, placeholder, onBlur, }: TextProps) => JSX.Element;
|
|
5
5
|
export default TextWithLabel;
|
|
@@ -1,8 +1,8 @@
|
|
|
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 { ElementSize } from "
|
|
5
|
-
import { getValidationValues } from "
|
|
4
|
+
import { ElementSize } from "@bbr/components";
|
|
5
|
+
import { getValidationValues } from "@bbr/utils";
|
|
6
6
|
/** Textual input with describing label */
|
|
7
7
|
const TextWithLabel = ({ onValueChange, readonly, disabled, defaultValue, validationState, name, className, size, style, rounded, loading, label, placeholder, onBlur, }) => {
|
|
8
8
|
const onChange = useCallback((event) => onValueChange(event.target.value), [onValueChange]);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { TextProps } from "
|
|
2
|
+
import { TextProps } from "@bbr/components/text";
|
|
3
3
|
/** Textual input without describing label */
|
|
4
4
|
declare const TextWithoutLabel: ({ onValueChange, readonly, disabled, defaultValue, validationState, name, className, size, style, rounded, loading, placeholder, onBlur, }: TextProps) => JSX.Element;
|
|
5
5
|
export default TextWithoutLabel;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback } from "react";
|
|
3
3
|
import { generateGuid, getClassName, getValueOrDefault } from "@bodynarf/utils";
|
|
4
|
-
import { ElementSize } from "
|
|
5
|
-
import { getValidationValues } from "
|
|
4
|
+
import { ElementSize } from "@bbr/components";
|
|
5
|
+
import { getValidationValues } from "@bbr/utils";
|
|
6
6
|
/** Textual input without describing label */
|
|
7
7
|
const TextWithoutLabel = ({ onValueChange, readonly, disabled, defaultValue, validationState, name, className, size, style, rounded, loading, placeholder, onBlur, }) => {
|
|
8
8
|
const onChange = useCallback((event) => onValueChange(event.target.value), [onValueChange]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseElementProps, ElementColor, ElementSize } from "
|
|
1
|
+
import { BaseElementProps, ElementColor, ElementSize } from "@bbr/components";
|
|
2
2
|
import { InputLabel, ValidationState } from ".";
|
|
3
3
|
/** Base properties for input components */
|
|
4
4
|
export interface BaseInputElementProps<TValue> extends BaseElementProps {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import "./style.scss";
|
|
3
|
-
import { SearchProps } from "
|
|
3
|
+
import { SearchProps } from "@bbr/components/search";
|
|
4
4
|
/** Search component */
|
|
5
5
|
export default function Search({ searchType, onSearch, caption, name, defaultValue, size, isLoading, rounded, disabled, }: SearchProps): JSX.Element;
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useCallback, useState } from "react";
|
|
3
3
|
import { generateGuid, getClassName } from "@bodynarf/utils";
|
|
4
4
|
import "./style.scss";
|
|
5
|
-
import Button from "
|
|
5
|
+
import Button from "@bbr/components/button";
|
|
6
6
|
/** Search component */
|
|
7
7
|
export default function Search({ searchType, onSearch, caption, name, defaultValue, size, isLoading, rounded, disabled, }) {
|
|
8
8
|
const [elementName] = useState(name || generateGuid());
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import "./style.scss";
|
|
3
|
-
import { BaseElementProps, ElementSize } from "
|
|
4
|
-
import { TabItem, TabsPosition, TabsStyle } from "
|
|
3
|
+
import { BaseElementProps, ElementSize } from "@bbr/components";
|
|
4
|
+
import { TabItem, TabsPosition, TabsStyle } from "@bbr/components/tabs";
|
|
5
5
|
/** Tabs component props type */
|
|
6
6
|
export interface TabsProps extends BaseElementProps {
|
|
7
7
|
/** Tabs */
|
|
@@ -2,10 +2,10 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { useCallback, useState, useEffect, useRef } from "react";
|
|
3
3
|
import { getClassName, isNullOrEmpty, isNullOrUndefined } from "@bodynarf/utils";
|
|
4
4
|
import "./style.scss";
|
|
5
|
-
import { ElementSize } from "
|
|
6
|
-
import { mapDataAttributes } from "
|
|
7
|
-
import { TabsPosition, TabsStyle } from "
|
|
8
|
-
import TabItemComponent from "
|
|
5
|
+
import { ElementSize } from "@bbr/components";
|
|
6
|
+
import { mapDataAttributes } from "@bbr/utils";
|
|
7
|
+
import { TabsPosition, TabsStyle } from "@bbr/components/tabs";
|
|
8
|
+
import TabItemComponent from "@bbr/components/tabs/components/item";
|
|
9
9
|
/**
|
|
10
10
|
* Tabs panel
|
|
11
11
|
* @throws Items are empty
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { getClassName, isNullOrUndefined } from "@bodynarf/utils";
|
|
3
|
-
import Icon from "
|
|
3
|
+
import Icon from "@bbr/components/icon";
|
|
4
4
|
/** Tabs panel single tab item component */
|
|
5
5
|
const TabItem = ({ item, activeItem }) => {
|
|
6
6
|
if (!isNullOrUndefined(item.icon)) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { TagProps } from "
|
|
2
|
+
import { TagProps } from "@bbr/components/tag";
|
|
3
3
|
import "./style.scss";
|
|
4
4
|
/** Single tag item */
|
|
5
5
|
declare const Tag: ({ content, size, style, rounded, lightColor, customColor, onClick, className, title, }: TagProps) => JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { getClassName, isNullOrUndefined } from "@bodynarf/utils";
|
|
3
|
-
import { ElementColor, ElementSize } from "
|
|
3
|
+
import { ElementColor, ElementSize } from "@bbr/components";
|
|
4
4
|
import "./style.scss";
|
|
5
5
|
/** Single tag item */
|
|
6
6
|
const Tag = ({ content, size, style, rounded, lightColor, customColor, onClick, className, title, }) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bodynarf/react.components",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.3",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "Artem",
|
|
6
6
|
"email": "bodynar@gmail.com"
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
],
|
|
23
23
|
"scripts": {
|
|
24
24
|
"build": "npx tsc && tsc-alias -p tsconfig.json",
|
|
25
|
-
"publish": "npx tsc && copy package.json dist && copy readme.md dist && cd dist && npm publish --access=public"
|
|
25
|
+
"publish": "npx tsc && copy package.json ./dist && copy readme.md ./dist && cd ./dist && npm publish --access=public"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@types/react": "^18.0.11",
|
package/utils/formValidation.js
CHANGED