@bodynarf/react.components 1.13.5 → 1.13.7
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.map +1 -1
- package/components/accordion/component/index.js +7 -9
- package/components/accordion/types.d.ts +2 -2
- package/components/accordion/types.d.ts.map +1 -1
- package/components/anchor/types.d.ts +1 -1
- package/components/breadcrumbs/component/index.d.ts.map +1 -1
- package/components/breadcrumbs/component/index.js +9 -11
- package/components/breadcrumbs/types.d.ts +16 -16
- package/components/breadcrumbs/types.d.ts.map +1 -1
- package/components/button/component/index.js +3 -3
- package/components/button/components/buttonWithIcon/index.d.ts.map +1 -1
- package/components/button/components/buttonWithIcon/index.js +4 -6
- package/components/button/components/simpleButton/index.d.ts.map +1 -1
- package/components/button/components/simpleButton/index.js +2 -5
- package/components/button/types.d.ts +2 -2
- package/components/button/types.d.ts.map +1 -1
- package/components/dropdown/component/index.d.ts.map +1 -1
- package/components/dropdown/component/index.js +6 -3
- package/components/dropdown/component/style.scss +13 -0
- package/components/dropdown/components/compact/index.d.ts.map +1 -1
- package/components/dropdown/components/compact/index.js +22 -11
- package/components/dropdown/components/item/index.js +6 -6
- package/components/dropdown/components/label/component/index.d.ts +4 -4
- package/components/dropdown/components/label/component/index.d.ts.map +1 -1
- package/components/dropdown/components/label/component/index.js +4 -4
- package/components/dropdown/components/label/components/selected/index.d.ts +1 -1
- package/components/dropdown/components/label/components/selected/index.d.ts.map +1 -1
- package/components/dropdown/components/label/components/selected/index.js +5 -5
- package/components/dropdown/components/label/components/selectedWithIcon/index.d.ts +1 -1
- package/components/dropdown/components/label/components/selectedWithIcon/index.d.ts.map +1 -1
- package/components/dropdown/components/label/components/selectedWithIcon/index.js +4 -4
- package/components/dropdown/components/label/components/withSearch/index.js +3 -3
- package/components/dropdown/components/withLabel/index.d.ts +2 -1
- package/components/dropdown/components/withLabel/index.d.ts.map +1 -1
- package/components/dropdown/components/withLabel/index.js +3 -1
- package/components/file/component/index.d.ts.map +1 -1
- package/components/file/component/index.js +6 -8
- package/components/icon/component/index.d.ts.map +1 -1
- package/components/icon/component/index.js +2 -4
- package/components/index.d.ts +33 -1
- package/components/index.d.ts.map +1 -1
- package/components/index.js +35 -1
- package/components/multiselect/component/index.d.ts.map +1 -1
- package/components/multiselect/component/index.js +6 -3
- package/components/multiselect/component/style.scss +13 -0
- package/components/multiselect/components/item/index.d.ts.map +1 -1
- package/components/multiselect/components/item/index.js +5 -5
- package/components/multiselect/components/label/components/empty/index.js +1 -1
- package/components/multiselect/components/label/components/nonEmpty/index.js +1 -1
- package/components/multiselect/components/withLabel/index.d.ts +2 -1
- package/components/multiselect/components/withLabel/index.d.ts.map +1 -1
- package/components/multiselect/components/withLabel/index.js +3 -1
- package/components/multiselect/components/withoutLabel/index.d.ts.map +1 -1
- package/components/multiselect/components/withoutLabel/index.js +23 -9
- package/components/multiselect/types.d.ts +8 -8
- package/components/multiselect/types.d.ts.map +1 -1
- package/components/paginator/component/index.d.ts.map +1 -1
- package/components/paginator/component/index.js +10 -12
- package/components/paginator/types.d.ts +2 -2
- package/components/paginator/types.d.ts.map +1 -1
- package/components/primitives/checkbox/component/index.d.ts.map +1 -1
- package/components/primitives/checkbox/component/index.js +9 -11
- package/components/primitives/color/component/index.d.ts.map +1 -1
- package/components/primitives/color/component/index.js +7 -3
- package/components/primitives/color/components/picker/index.d.ts +3 -3
- package/components/primitives/color/components/picker/index.d.ts.map +1 -1
- package/components/primitives/color/components/picker/index.js +9 -10
- package/components/primitives/color/components/withLabel/index.d.ts +2 -1
- package/components/primitives/color/components/withLabel/index.d.ts.map +1 -1
- package/components/primitives/color/components/withLabel/index.js +5 -5
- package/components/primitives/color/components/withoutLabel/index.d.ts.map +1 -1
- package/components/primitives/color/components/withoutLabel/index.js +5 -4
- package/components/primitives/color/types.d.ts +1 -1
- package/components/primitives/color/types.d.ts.map +1 -1
- package/components/primitives/date/component/index.d.ts +2 -1
- package/components/primitives/date/component/index.d.ts.map +1 -1
- package/components/primitives/date/component/index.js +6 -6
- package/components/primitives/date/types.d.ts +2 -2
- package/components/primitives/date/types.d.ts.map +1 -1
- package/components/primitives/internal/componentWithLabel/index.d.ts.map +1 -1
- package/components/primitives/internal/componentWithLabel/index.js +2 -2
- package/components/primitives/internal/hint/index.d.ts.map +1 -1
- package/components/primitives/internal/hint/index.js +6 -6
- package/components/primitives/multiline/component/index.d.ts.map +1 -1
- package/components/primitives/multiline/component/index.js +6 -3
- package/components/primitives/multiline/components/withLabel/index.d.ts +2 -1
- package/components/primitives/multiline/components/withLabel/index.d.ts.map +1 -1
- package/components/primitives/multiline/components/withLabel/index.js +6 -6
- package/components/primitives/multiline/components/withoutLabel/index.d.ts.map +1 -1
- package/components/primitives/multiline/components/withoutLabel/index.js +6 -8
- package/components/primitives/multiline/types.d.ts +2 -2
- package/components/primitives/multiline/types.d.ts.map +1 -1
- package/components/primitives/number/component/index.d.ts.map +1 -1
- package/components/primitives/number/component/index.js +6 -3
- package/components/primitives/number/components/withLabel/index.d.ts +2 -1
- package/components/primitives/number/components/withLabel/index.d.ts.map +1 -1
- package/components/primitives/number/components/withLabel/index.js +6 -6
- package/components/primitives/number/components/withoutLabel/index.js +6 -8
- package/components/primitives/number/types.d.ts +2 -2
- package/components/primitives/number/types.d.ts.map +1 -1
- package/components/primitives/password/component/index.d.ts.map +1 -1
- package/components/primitives/password/component/index.js +6 -3
- package/components/primitives/password/components/withLabel/index.d.ts +2 -1
- package/components/primitives/password/components/withLabel/index.d.ts.map +1 -1
- package/components/primitives/password/components/withLabel/index.js +5 -7
- package/components/primitives/password/components/withoutLabel/index.d.ts.map +1 -1
- package/components/primitives/password/components/withoutLabel/index.js +5 -7
- package/components/primitives/password/types.d.ts +3 -3
- package/components/primitives/password/types.d.ts.map +1 -1
- package/components/primitives/text/component/index.d.ts.map +1 -1
- package/components/primitives/text/component/index.js +6 -3
- package/components/primitives/text/components/withLabel/index.d.ts +2 -1
- package/components/primitives/text/components/withLabel/index.d.ts.map +1 -1
- package/components/primitives/text/components/withLabel/index.js +6 -8
- package/components/primitives/text/components/withoutLabel/index.js +6 -8
- package/components/primitives/text/index.d.ts.map +1 -1
- package/components/primitives/text/types.d.ts +2 -2
- package/components/primitives/text/types.d.ts.map +1 -1
- package/components/progress/component/index.d.ts +7 -0
- package/components/progress/component/index.d.ts.map +1 -0
- package/components/progress/component/index.js +34 -0
- package/components/progress/component/style.scss +211 -0
- package/components/progress/index.d.ts +3 -0
- package/components/progress/index.d.ts.map +1 -0
- package/components/progress/index.js +2 -0
- package/components/progress/types.d.ts +23 -0
- package/components/progress/types.d.ts.map +1 -0
- package/components/progress/types.js +1 -0
- package/components/search/component/index.d.ts.map +1 -1
- package/components/search/component/index.js +7 -9
- package/components/search/types.d.ts +2 -2
- package/components/search/types.d.ts.map +1 -1
- package/components/table/component/index.d.ts.map +1 -1
- package/components/table/component/index.js +3 -5
- package/components/table/components/heading/index.js +4 -4
- package/components/tabs/component/index.d.ts.map +1 -1
- package/components/tabs/component/index.js +10 -31
- package/components/tabs/components/item/index.d.ts.map +1 -1
- package/components/tabs/components/item/index.js +2 -2
- package/components/tabs/types.d.ts +2 -2
- package/components/tabs/types.d.ts.map +1 -1
- package/components/tag/component/index.d.ts.map +1 -1
- package/components/tag/component/index.js +11 -13
- package/components/tag/component/style.scss +1 -1
- package/hooks/useComponentOutsideClick.d.ts.map +1 -1
- package/hooks/useComponentOutsideClick.js +3 -2
- package/hooks/useEventListener.d.ts.map +1 -1
- package/hooks/useEventListener.js +5 -2
- package/hooks/useMount.js +1 -1
- package/hooks/usePagination.d.ts +1 -1
- package/hooks/usePagination.d.ts.map +1 -1
- package/package.json +4 -5
- package/tsconfig.tsbuildinfo +1 -1
- package/types/base/baseInputElementProps.d.ts +5 -4
- package/types/base/baseInputElementProps.d.ts.map +1 -1
- package/types/base/index.d.ts +2 -0
- package/types/base/index.d.ts.map +1 -1
- package/types/base/index.js +2 -0
- package/types/base/keyboardElement.d.ts +9 -0
- package/types/base/keyboardElement.d.ts.map +1 -0
- package/types/base/keyboardElement.js +1 -0
- package/types/base/labeledElement.d.ts +7 -0
- package/types/base/labeledElement.d.ts.map +1 -0
- package/types/base/labeledElement.js +1 -0
- package/utils/dataAttributes.d.ts +2 -1
- package/utils/dataAttributes.d.ts.map +1 -1
- package/utils/dataAttributes.js +5 -2
- package/utils/styles.d.ts +64 -8
- package/utils/styles.d.ts.map +1 -1
- package/utils/styles.js +93 -11
- package/utils/validation.js +3 -3
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { BaseElementProps, ElementColor, ElementSize } from "../../types";
|
|
2
|
+
/** Progress component props */
|
|
3
|
+
export type ProgressProps = BaseElementProps & {
|
|
4
|
+
/** Current progress value (0-100) */
|
|
5
|
+
value?: number;
|
|
6
|
+
/** Maximum value (100 by default) */
|
|
7
|
+
max?: number;
|
|
8
|
+
/** Minimum value (0 by default) */
|
|
9
|
+
min?: number;
|
|
10
|
+
/** Element size */
|
|
11
|
+
size?: ElementSize;
|
|
12
|
+
/** Element color */
|
|
13
|
+
color?: ElementColor;
|
|
14
|
+
/** Show percentage text (true by default) */
|
|
15
|
+
showValue?: boolean;
|
|
16
|
+
/** Is indeterminate loader */
|
|
17
|
+
indeterminate?: boolean;
|
|
18
|
+
/** Loading text for indeterminate state */
|
|
19
|
+
loadingText?: string;
|
|
20
|
+
/** Animate progress bar within current value range (true by default) */
|
|
21
|
+
animated?: boolean;
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/progress/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzE,+BAA+B;AAC/B,MAAM,MAAM,aAAa,GACnB,gBAAgB,GAChB;IACE,qCAAqC;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,qCAAqC;IACrC,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb,mCAAmC;IACnC,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb,mBAAmB;IACnB,IAAI,CAAC,EAAE,WAAW,CAAC;IAEnB,oBAAoB;IACpB,KAAK,CAAC,EAAE,YAAY,CAAC;IAErB,6CAA6C;IAC7C,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,8BAA8B;IAC9B,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB,2CAA2C;IAC3C,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,wEAAwE;IACxE,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/search/component/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAe,EAAE,EAAyB,MAAM,OAAO,CAAC;AAQ/D,OAAO,cAAc,CAAC;AACtB,OAAO,EAAE,WAAW,EAAE,MAAM,IAAI,CAAC;AAEjC,uBAAuB;AACvB,QAAA,MAAM,MAAM,EAAE,EAAE,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/search/component/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAe,EAAE,EAAyB,MAAM,OAAO,CAAC;AAQ/D,OAAO,cAAc,CAAC;AACtB,OAAO,EAAE,WAAW,EAAE,MAAM,IAAI,CAAC;AAEjC,uBAAuB;AACvB,QAAA,MAAM,MAAM,EAAE,EAAE,CAAC,WAAW,CA8F3B,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useState } from "react";
|
|
3
|
-
import { getClassName
|
|
3
|
+
import { getClassName } from "@bodynarf/utils";
|
|
4
4
|
import { ElementSize } from "../../../types";
|
|
5
|
-
import { mapDataAttributes } from "../../../utils";
|
|
5
|
+
import { getSizeClassName, mapDataAttributes } from "../../../utils";
|
|
6
6
|
import Button, { ButtonStyle } from "../../button";
|
|
7
7
|
import "./style.scss";
|
|
8
8
|
/** Search component */
|
|
@@ -20,22 +20,20 @@ const Search = ({ searchType, onSearch, caption, defaultValue = "", size = Eleme
|
|
|
20
20
|
"bbr-search",
|
|
21
21
|
"control",
|
|
22
22
|
className,
|
|
23
|
-
|
|
23
|
+
getSizeClassName(size),
|
|
24
24
|
isLoading ? "is-loading" : "",
|
|
25
25
|
searchType === "byButton" ? "is-expanded" : "",
|
|
26
26
|
]);
|
|
27
27
|
const inputClassName = getClassName([
|
|
28
28
|
"input",
|
|
29
29
|
"is-unselectable",
|
|
30
|
-
|
|
30
|
+
getSizeClassName(size),
|
|
31
31
|
rounded ? "is-rounded" : "",
|
|
32
32
|
]);
|
|
33
|
-
const dataAttributes =
|
|
34
|
-
? undefined
|
|
35
|
-
: mapDataAttributes(data);
|
|
33
|
+
const dataAttributes = mapDataAttributes(data);
|
|
36
34
|
if (searchType === "byButton") {
|
|
37
|
-
return (_jsxs("div", { className: "field has-addons", children: [_jsx("div", { className: elClassName, children: _jsx("input", { type: "search", disabled: disabled, onChange: onChange, placeholder: caption, autoFocus: autoFocus, defaultValue: searchValue, className: inputClassName
|
|
35
|
+
return (_jsxs("div", { className: "field has-addons", children: [_jsx("div", { className: elClassName, children: _jsx("input", { type: "search", title: title, disabled: disabled, onChange: onChange, ...dataAttributes, placeholder: caption, autoFocus: autoFocus, defaultValue: searchValue, className: inputClassName }) }), _jsx("div", { className: "control", children: _jsx(Button, { size: size, rounded: rounded, disabled: disabled, isLoading: isLoading, style: ButtonStyle.Info, title: searchButtonTitle, caption: searchButtonCaption, onClick: onSearchButtonClick }) })] }));
|
|
38
36
|
}
|
|
39
|
-
return (_jsx("div", { className: elClassName, children: _jsx("input", { type: "search", disabled: disabled, onChange: onChange, placeholder: caption, autoFocus: autoFocus, defaultValue: searchValue, className: inputClassName
|
|
37
|
+
return (_jsx("div", { className: elClassName, children: _jsx("input", { type: "search", title: title, disabled: disabled, onChange: onChange, ...dataAttributes, placeholder: caption, autoFocus: autoFocus, defaultValue: searchValue, className: inputClassName }) }));
|
|
40
38
|
};
|
|
41
39
|
export default Search;
|
|
@@ -9,8 +9,6 @@ export type SearchProps = BaseElementProps & {
|
|
|
9
9
|
searchType: "byTyping" | "byButton";
|
|
10
10
|
/** Search caption */
|
|
11
11
|
caption: string;
|
|
12
|
-
/** Search handler */
|
|
13
|
-
onSearch: (searchPattern: string) => void;
|
|
14
12
|
/** Initial search value */
|
|
15
13
|
defaultValue?: string;
|
|
16
14
|
/** Size of search bar */
|
|
@@ -38,5 +36,7 @@ export type SearchProps = BaseElementProps & {
|
|
|
38
36
|
* Visible only in `searchType = "byButton"`
|
|
39
37
|
*/
|
|
40
38
|
searchButtonTitle?: string;
|
|
39
|
+
/** Search handler */
|
|
40
|
+
onSearch: (searchPattern: string) => void;
|
|
41
41
|
};
|
|
42
42
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/search/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE3D,kCAAkC;AAClC,MAAM,MAAM,WAAW,GAAG,gBAAgB,GAAG;IACzC;;;;MAIE;IACF,UAAU,EAAE,UAAU,GAAG,UAAU,CAAC;IAEpC,qBAAqB;IACrB,OAAO,EAAE,MAAM,CAAC;IAEhB,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/search/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE3D,kCAAkC;AAClC,MAAM,MAAM,WAAW,GAAG,gBAAgB,GAAG;IACzC;;;;MAIE;IACF,UAAU,EAAE,UAAU,GAAG,UAAU,CAAC;IAEpC,qBAAqB;IACrB,OAAO,EAAE,MAAM,CAAC;IAEhB,2BAA2B;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,yBAAyB;IACzB,IAAI,CAAC,EAAE,WAAW,CAAC;IAEnB,mCAAmC;IACnC,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,6BAA6B;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,qDAAqD;IACrD,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAE7B;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B,qBAAqB;IACrB,QAAQ,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/table/component/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAM3B,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAChC,OAAO,cAAc,CAAC;AAItB;;GAEG;AACH,QAAA,MAAM,KAAK,EAAE,EAAE,CAAC,UAAU,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/table/component/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAM3B,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAChC,OAAO,cAAc,CAAC;AAItB;;GAEG;AACH,QAAA,MAAM,KAAK,EAAE,EAAE,CAAC,UAAU,CAqDzB,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { getClassName
|
|
2
|
+
import { getClassName } from "@bodynarf/utils";
|
|
3
3
|
import { mapDataAttributes } from "../../../utils";
|
|
4
4
|
import "./style.scss";
|
|
5
5
|
import TableHeader from "../components/heading";
|
|
@@ -20,9 +20,7 @@ const Table = ({ headings, hasBorder = false, hoverable = false, narrow = false,
|
|
|
20
20
|
headerWithBorder ? "has-borderless-header has-shadow-bordered-header" : "",
|
|
21
21
|
headerBorderless ? "has-borderless-header" : "",
|
|
22
22
|
]);
|
|
23
|
-
const dataAttributes =
|
|
24
|
-
|
|
25
|
-
: mapDataAttributes(data);
|
|
26
|
-
return (_jsxs("table", { className: elClassName, title: title, ...dataAttributes, children: [_jsx("thead", { children: _jsx("tr", { children: headings.map((heading, i) => _jsx(TableHeader, { item: heading, onClick: onHeaderClick, sortColumn: currentSortColumn }, heading.name ?? i)) }) }), _jsx("tbody", { children: children })] }));
|
|
23
|
+
const dataAttributes = mapDataAttributes(data);
|
|
24
|
+
return (_jsxs("table", { title: title, ...dataAttributes, className: elClassName, children: [_jsx("thead", { children: _jsx("tr", { children: headings.map((heading, i) => _jsx(TableHeader, { item: heading, onClick: onHeaderClick, sortColumn: currentSortColumn }, heading.name ?? i)) }) }), _jsx("tbody", { children: children })] }));
|
|
27
25
|
};
|
|
28
26
|
export default Table;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback } from "react";
|
|
3
|
-
import { getClassName,
|
|
3
|
+
import { getClassName, isNotNullish, isNullOrEmpty } from "@bodynarf/utils";
|
|
4
4
|
import Icon from "../../../icon";
|
|
5
5
|
/** Table heading cell */
|
|
6
6
|
const TableHeader = ({ item, sortColumn, onClick }) => {
|
|
7
7
|
const { className, caption, name, sortable } = item;
|
|
8
8
|
const onHeaderClick = useCallback(() => {
|
|
9
|
-
if (sortable &&
|
|
9
|
+
if (sortable && isNotNullish(onClick)) {
|
|
10
10
|
onClick(item);
|
|
11
11
|
}
|
|
12
12
|
}, [onClick, item, sortable]);
|
|
13
13
|
const containerClassName = getClassName([
|
|
14
14
|
className,
|
|
15
|
-
sortable ? "is-clickable" :
|
|
15
|
+
sortable ? "is-clickable" : undefined,
|
|
16
16
|
]);
|
|
17
|
-
return (_jsxs("th", { onClick: onHeaderClick, className:
|
|
17
|
+
return (_jsxs("th", { onClick: onHeaderClick, className: isNullOrEmpty(containerClassName) ? undefined : containerClassName, children: [_jsx("span", { children: caption }), !!sortable && sortColumn?.columnName === name
|
|
18
18
|
&&
|
|
19
19
|
_jsx(Icon, { className: "ml-1", name: `sort-alpha-down${sortColumn.ascending ? "" : "-alt"}` })] }));
|
|
20
20
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/tabs/component/index.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/tabs/component/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqC,EAAE,EAAE,MAAM,OAAO,CAAC;AAQ9D,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAW,SAAS,EAAa,MAAM,IAAI,CAAC;AAGnD;;;GAGG;AACH,QAAA,MAAM,IAAI,EAAE,EAAE,CAAC,SAAS,CAyEvB,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useCallback, useState
|
|
3
|
-
import { getClassName, isNullOrEmpty,
|
|
2
|
+
import { useCallback, useState } from "react";
|
|
3
|
+
import { getClassName, isNullOrEmpty, isNullish } from "@bodynarf/utils";
|
|
4
4
|
import { ElementPosition, ElementSize } from "../../../types";
|
|
5
|
-
import {
|
|
5
|
+
import { useUpdateEffect } from "../../../hooks";
|
|
6
|
+
import { getPositionClassName, getSizeClassName, mapDataAttributes } from "../../../utils";
|
|
6
7
|
import "./style.scss";
|
|
7
8
|
import { TabsStyle } from "..";
|
|
8
9
|
import TabItemComponent from "../components/item";
|
|
@@ -15,10 +16,9 @@ const Tabs = ({ items, onActiveItemChange, defaultActive = items[0], size, posit
|
|
|
15
16
|
throw new Error("Invalid configuration. Tab items must be defined");
|
|
16
17
|
}
|
|
17
18
|
const [activeItem, setActiveItem] = useState(defaultActive);
|
|
18
|
-
const isFirstRun = useRef(true);
|
|
19
19
|
const onTabsClick = useCallback((event) => {
|
|
20
20
|
const closestTab = event.target.closest(".bbr-tabs__tab");
|
|
21
|
-
if (
|
|
21
|
+
if (isNullish(closestTab)) {
|
|
22
22
|
return;
|
|
23
23
|
}
|
|
24
24
|
const itemId = closestTab.attributes.getNamedItem("data-item-id")?.value ?? "";
|
|
@@ -26,43 +26,22 @@ const Tabs = ({ items, onActiveItemChange, defaultActive = items[0], size, posit
|
|
|
26
26
|
return;
|
|
27
27
|
}
|
|
28
28
|
const item = items.find(({ id }) => id === itemId);
|
|
29
|
-
if (
|
|
29
|
+
if (isNullish(item) || item === activeItem) {
|
|
30
30
|
return;
|
|
31
31
|
}
|
|
32
32
|
setActiveItem(item);
|
|
33
33
|
}, [activeItem, items]);
|
|
34
|
-
|
|
35
|
-
if (isFirstRun.current) {
|
|
36
|
-
isFirstRun.current = false;
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
onActiveItemChange(activeItem);
|
|
40
|
-
}, [activeItem, onActiveItemChange]);
|
|
34
|
+
useUpdateEffect(() => onActiveItemChange(activeItem));
|
|
41
35
|
const elClassName = getClassName([
|
|
42
36
|
"bbr-tabs",
|
|
43
37
|
"tabs",
|
|
44
38
|
className,
|
|
45
39
|
getPositionClassName(position),
|
|
46
|
-
getSizeClassName(size,
|
|
40
|
+
getSizeClassName(size, ElementSize.Normal),
|
|
47
41
|
style,
|
|
48
42
|
fullWidth ? "is-fullwidth" : "",
|
|
49
43
|
]);
|
|
50
|
-
const dataAttributes =
|
|
51
|
-
|
|
52
|
-
: mapDataAttributes(data);
|
|
53
|
-
return (_jsx("nav", { className: elClassName, title: title, ...dataAttributes, onClick: onTabsClick, children: _jsx("ul", { children: items.map(item => _jsx(TabItemComponent, { item: item, activeItem: activeItem.id }, item.id)) }) }));
|
|
44
|
+
const dataAttributes = mapDataAttributes(data);
|
|
45
|
+
return (_jsx("nav", { title: title, ...dataAttributes, onClick: onTabsClick, className: elClassName, children: _jsx("ul", { children: items.map(item => _jsx(TabItemComponent, { item: item, activeItem: activeItem.id }, item.id)) }) }));
|
|
54
46
|
};
|
|
55
47
|
export default Tabs;
|
|
56
|
-
/**
|
|
57
|
-
* Get class name for specified size and constraints
|
|
58
|
-
* @param size Component size
|
|
59
|
-
* @param notAllowedSizes Sizes that not applicable to component
|
|
60
|
-
* @returns Class name for react element
|
|
61
|
-
*/
|
|
62
|
-
const getSizeClassName = (size, notAllowedSizes) => {
|
|
63
|
-
notAllowedSizes ??= [];
|
|
64
|
-
if (isNullOrUndefined(size) || notAllowedSizes.includes(size)) {
|
|
65
|
-
return "";
|
|
66
|
-
}
|
|
67
|
-
return `is-${size}`;
|
|
68
|
-
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/tabs/components/item/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAO3B,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,OAAO,CAAC;AAExC,sDAAsD;AACtD,MAAM,MAAM,YAAY,GAAG;IACvB,eAAe;IACf,IAAI,EAAE,IAAI,CAAC;IAEX,6BAA6B;IAC7B,UAAU,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,2CAA2C;AAC3C,QAAA,MAAM,OAAO,EAAE,EAAE,CAAC,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/tabs/components/item/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAO3B,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,OAAO,CAAC;AAExC,sDAAsD;AACtD,MAAM,MAAM,YAAY,GAAG;IACvB,eAAe;IACf,IAAI,EAAE,IAAI,CAAC;IAEX,6BAA6B;IAC7B,UAAU,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,2CAA2C;AAC3C,QAAA,MAAM,OAAO,EAAE,EAAE,CAAC,YAAY,CA6B7B,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { getClassName,
|
|
2
|
+
import { getClassName, isNotNullish } from "@bodynarf/utils";
|
|
3
3
|
import { ElementPosition } from "../../../../types";
|
|
4
4
|
import Icon from "../../../icon";
|
|
5
5
|
/** Tabs panel single tab item component */
|
|
6
6
|
const TabItem = ({ item, activeItem }) => {
|
|
7
|
-
if (
|
|
7
|
+
if (isNotNullish(item.icon)) {
|
|
8
8
|
return (_jsx(TabItemWithIcon, { item: item, activeItem: activeItem }));
|
|
9
9
|
}
|
|
10
10
|
const className = getClassName([
|
|
@@ -33,8 +33,6 @@ export interface TabItem {
|
|
|
33
33
|
export interface TabsProps extends BaseElementProps {
|
|
34
34
|
/** Tabs */
|
|
35
35
|
items: Array<TabItem>;
|
|
36
|
-
/** Handler of changing current active item */
|
|
37
|
-
onActiveItemChange: (item: TabItem) => void;
|
|
38
36
|
/**
|
|
39
37
|
* Active item by default.
|
|
40
38
|
* If not set - first item will be active
|
|
@@ -51,5 +49,7 @@ export interface TabsProps extends BaseElementProps {
|
|
|
51
49
|
style?: TabsStyle;
|
|
52
50
|
/** Is component tabs should take all width of parent */
|
|
53
51
|
fullWidth?: boolean;
|
|
52
|
+
/** Handler of changing current active item */
|
|
53
|
+
onActiveItemChange: (item: TabItem) => void;
|
|
54
54
|
}
|
|
55
55
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/tabs/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzF,2BAA2B;AAC3B,oBAAY,SAAS;IACjB;;;OAGG;IACH,OAAO,KAAK;IAEZ;;;OAGG;IACH,KAAK,aAAa;IAElB;;OAEG;IACH,WAAW,cAAc;IAEzB;;OAEG;IACH,kBAAkB,gCAAgC;CACrD;AAED,eAAe;AACf,MAAM,WAAW,OAAO;IACpB,6CAA6C;IAC7C,EAAE,EAAE,MAAM,CAAC;IAEX,0BAA0B;IAC1B,OAAO,EAAE,MAAM,CAAC;IAEhB,yBAAyB;IACzB,IAAI,CAAC,EAAE,WAAW,CAAC;CACtB;AAED,gCAAgC;AAChC,MAAM,WAAW,SAAU,SAAQ,gBAAgB;IAC/C,WAAW;IACX,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IAEtB
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/tabs/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzF,2BAA2B;AAC3B,oBAAY,SAAS;IACjB;;;OAGG;IACH,OAAO,KAAK;IAEZ;;;OAGG;IACH,KAAK,aAAa;IAElB;;OAEG;IACH,WAAW,cAAc;IAEzB;;OAEG;IACH,kBAAkB,gCAAgC;CACrD;AAED,eAAe;AACf,MAAM,WAAW,OAAO;IACpB,6CAA6C;IAC7C,EAAE,EAAE,MAAM,CAAC;IAEX,0BAA0B;IAC1B,OAAO,EAAE,MAAM,CAAC;IAEhB,yBAAyB;IACzB,IAAI,CAAC,EAAE,WAAW,CAAC;CACtB;AAED,gCAAgC;AAChC,MAAM,WAAW,SAAU,SAAQ,gBAAgB;IAC/C,WAAW;IACX,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IAEtB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;OAGG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;IAEnB,yBAAyB;IACzB,QAAQ,CAAC,EAAE,eAAe,CAAC;IAE3B,sBAAsB;IACtB,KAAK,CAAC,EAAE,SAAS,CAAC;IAElB,wDAAwD;IACxD,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,8CAA8C;IAC9C,kBAAkB,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CAC/C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/tag/component/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAO3B,OAAO,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC;AAE9B,OAAO,cAAc,CAAC;AAEtB,sBAAsB;AACtB,QAAA,MAAM,GAAG,EAAE,EAAE,CAAC,QAAQ,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/tag/component/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAO3B,OAAO,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC;AAE9B,OAAO,cAAc,CAAC;AAEtB,sBAAsB;AACtB,QAAA,MAAM,GAAG,EAAE,EAAE,CAAC,QAAQ,CA4CrB,CAAC;AAEF,eAAe,GAAG,CAAC"}
|
|
@@ -1,32 +1,30 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { getClassName,
|
|
2
|
+
import { getClassName, isNotNullish, isNullish } from "@bodynarf/utils";
|
|
3
3
|
import { ElementColor, ElementSize } from "../../../types";
|
|
4
|
-
import { mapDataAttributes } from "../../../utils";
|
|
4
|
+
import { getElementColorClassName, getSizeClassName, mapDataAttributes } from "../../../utils";
|
|
5
5
|
import "./style.scss";
|
|
6
6
|
/** Single tag item */
|
|
7
7
|
const Tag = ({ content, size = ElementSize.Normal, style = ElementColor.Default, rounded = false, lightColor = false, customColor, onClick, className, title, data, }) => {
|
|
8
|
-
if (
|
|
8
|
+
if (isNotNullish(customColor)) {
|
|
9
9
|
style = ElementColor.Default;
|
|
10
10
|
}
|
|
11
11
|
const elClassName = getClassName([
|
|
12
12
|
"bbr-tag",
|
|
13
13
|
"tag",
|
|
14
14
|
className,
|
|
15
|
-
style
|
|
16
|
-
|
|
17
|
-
lightColor &&
|
|
15
|
+
getElementColorClassName(style),
|
|
16
|
+
isNotNullish(customColor) ? "bbr-tag--custom" : "",
|
|
17
|
+
lightColor && isNullish(customColor) ? "is-light" : "",
|
|
18
18
|
rounded ? "is-rounded" : "",
|
|
19
|
-
size
|
|
20
|
-
|
|
19
|
+
getSizeClassName(size, ElementSize.Normal),
|
|
20
|
+
isNullish(onClick) ? "" : "is-clickable",
|
|
21
21
|
]);
|
|
22
|
-
const dataAttributes =
|
|
23
|
-
|
|
24
|
-
: mapDataAttributes(data);
|
|
25
|
-
return (_jsx("span", { className: elClassName, style: isNullOrUndefined(customColor)
|
|
22
|
+
const dataAttributes = mapDataAttributes(data);
|
|
23
|
+
return (_jsx("span", { title: title, onClick: onClick, ...dataAttributes, className: elClassName, style: isNullish(customColor)
|
|
26
24
|
? undefined
|
|
27
25
|
: {
|
|
28
26
|
color: customColor?.color,
|
|
29
27
|
backgroundColor: customColor?.backgroundColor,
|
|
30
|
-
},
|
|
28
|
+
}, children: content }));
|
|
31
29
|
};
|
|
32
30
|
export default Tag;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useComponentOutsideClick.d.ts","sourceRoot":"","sources":["../../src/hooks/useComponentOutsideClick.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAA0B,MAAM,OAAO,CAAC;AAE/D,OAAO,
|
|
1
|
+
{"version":3,"file":"useComponentOutsideClick.d.ts","sourceRoot":"","sources":["../../src/hooks/useComponentOutsideClick.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAA0B,MAAM,OAAO,CAAC;AAE/D,OAAO,EAAqB,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE9D;;;;;;;GAOG;AACH,eAAO,MAAM,wBAAwB,GACjC,UAAU,MAAM,EAChB,sBAAsB,OAAO,EAC7B,mBAAmB,QAAQ,EAC3B,8BAA4B,EAC5B,eAAc,cAAmB,KAClC,IA6BF,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useCallback, useEffect } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { isNullish, isNull } from "@bodynarf/utils";
|
|
3
3
|
/**
|
|
4
4
|
* Subscribe to component outside click
|
|
5
5
|
* @param selector Component root selector
|
|
@@ -12,7 +12,7 @@ export const useComponentOutsideClick = (selector, clickHandleCondition, clickHa
|
|
|
12
12
|
const onDocumentClick = useCallback((event) => {
|
|
13
13
|
if (clickHandleCondition) {
|
|
14
14
|
const target = event.target;
|
|
15
|
-
if (
|
|
15
|
+
if (isNullish(target)) {
|
|
16
16
|
return;
|
|
17
17
|
}
|
|
18
18
|
const relatedComponent = target.closest(selector);
|
|
@@ -20,6 +20,7 @@ export const useComponentOutsideClick = (selector, clickHandleCondition, clickHa
|
|
|
20
20
|
clickHandleChange();
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
23
24
|
}, [clickHandleCondition, selector, clickHandleChange, dependencies]);
|
|
24
25
|
useEffect(() => {
|
|
25
26
|
if (clickListenCondition) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEventListener.d.ts","sourceRoot":"","sources":["../../src/hooks/useEventListener.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gBAAgB,GAAI,CAAC,SAAS,MAAM,cAAc,EAC3D,OAAO,CAAC,EACR,SAAS,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC,CAAC,KAAK,IAAI,EACvC,UAAS,MAAM,GAAG,QAAQ,GAAG,WAAoB,
|
|
1
|
+
{"version":3,"file":"useEventListener.d.ts","sourceRoot":"","sources":["../../src/hooks/useEventListener.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gBAAgB,GAAI,CAAC,SAAS,MAAM,cAAc,EAC3D,OAAO,CAAC,EACR,SAAS,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC,CAAC,KAAK,IAAI,EACvC,UAAS,MAAM,GAAG,QAAQ,GAAG,WAAoB,SAkBpD,CAAC"}
|
|
@@ -17,7 +17,10 @@ export const useEventListener = (event, handler, element = window) => {
|
|
|
17
17
|
}, [handler]);
|
|
18
18
|
useEffect(() => {
|
|
19
19
|
const eventListener = (e) => savedHandler.current(e);
|
|
20
|
-
element
|
|
21
|
-
|
|
20
|
+
if (element) {
|
|
21
|
+
element.addEventListener(event, eventListener);
|
|
22
|
+
return () => element.removeEventListener(event, eventListener);
|
|
23
|
+
}
|
|
24
|
+
return undefined;
|
|
22
25
|
}, [event, element]);
|
|
23
26
|
};
|
package/hooks/useMount.js
CHANGED
|
@@ -5,7 +5,7 @@ import { useEffect } from "react";
|
|
|
5
5
|
* @param fn Function to be called only on the initial render of the component
|
|
6
6
|
*/
|
|
7
7
|
export const useMount = (fn) => {
|
|
8
|
-
useEffect(fn, []);
|
|
8
|
+
useEffect(() => fn(), []);
|
|
9
9
|
};
|
|
10
10
|
/**
|
|
11
11
|
* Executes the provided function only once during the component's initial render (mount) with unsubscribe
|
package/hooks/usePagination.d.ts
CHANGED
|
@@ -16,5 +16,5 @@ export interface PaginationState {
|
|
|
16
16
|
* @param dependencies List of dependencies. On any dependency update current page will be set to 1
|
|
17
17
|
* @returns Pair of hook-stored state and handler for slicing current page items
|
|
18
18
|
*/
|
|
19
|
-
export declare const usePagination: (length: number, size?: number, initPage?: number, dependencies?: DependencyList) => [PaginationState, (data: Array<
|
|
19
|
+
export declare const usePagination: (length: number, size?: number, initPage?: number, dependencies?: DependencyList) => [PaginationState, (data: Array<unknown>) => Array<unknown>];
|
|
20
20
|
//# sourceMappingURL=usePagination.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePagination.d.ts","sourceRoot":"","sources":["../../src/hooks/usePagination.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAqD,MAAM,OAAO,CAAC;AAE1F,2BAA2B;AAC3B,MAAM,WAAW,eAAe;IAC5B,6BAA6B;IAC7B,WAAW,EAAE,MAAM,CAAC;IAEpB,sBAAsB;IACtB,UAAU,EAAE,MAAM,CAAC;IAEnB,6BAA6B;IAC7B,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACxC;AAKD;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,GACtB,QAAQ,MAAM,EACd,OAAM,MAAwB,EAC9B,WAAU,MAAU,EACpB,eAAc,cAAmB,KAClC,CAAC,eAAe,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"usePagination.d.ts","sourceRoot":"","sources":["../../src/hooks/usePagination.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAqD,MAAM,OAAO,CAAC;AAE1F,2BAA2B;AAC3B,MAAM,WAAW,eAAe;IAC5B,6BAA6B;IAC7B,WAAW,EAAE,MAAM,CAAC;IAEpB,sBAAsB;IACtB,UAAU,EAAE,MAAM,CAAC;IAEnB,6BAA6B;IAC7B,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACxC;AAKD;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,GACtB,QAAQ,MAAM,EACd,OAAM,MAAwB,EAC9B,WAAU,MAAU,EACpB,eAAc,cAAmB,KAClC,CAAC,eAAe,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,KAAK,CAAC,OAAO,CAAC,CAiC5D,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bodynarf/react.components",
|
|
3
|
-
"version": "1.13.
|
|
3
|
+
"version": "1.13.7",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "Artem",
|
|
6
6
|
"email": "bodynar@gmail.com"
|
|
@@ -28,21 +28,20 @@
|
|
|
28
28
|
"build_transfer": "npm run build && npm run transfer",
|
|
29
29
|
"prepublish": "npm run build_transfer && cd dist && npm pack",
|
|
30
30
|
"publish_pkg": "npm run build_transfer && cd dist && npm publish --access=public",
|
|
31
|
-
"lint": "npx eslint src/**/*.ts src/**/*.tsx"
|
|
32
|
-
"prep_dev": "copyfiles src/**/*.* demo/src/components"
|
|
31
|
+
"lint": "npx eslint src/**/*.ts src/**/*.tsx"
|
|
33
32
|
},
|
|
34
33
|
"devDependencies": {
|
|
34
|
+
"@eslint/js": "^9.30.1",
|
|
35
35
|
"@types/react": "^18.0.11",
|
|
36
36
|
"@types/react-dom": "^18.0.5",
|
|
37
37
|
"copyfiles": "^2.4.1",
|
|
38
|
-
"@eslint/js": "^9.30.1",
|
|
39
38
|
"eslint": "^9.32.0",
|
|
40
39
|
"eslint-plugin-import": "^2.32.0",
|
|
41
40
|
"eslint-plugin-react": "^7.37.5",
|
|
42
41
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
43
42
|
"eslint-plugin-react-refresh": "^0.4.20",
|
|
44
|
-
"tsc-alias": "^1.8.6",
|
|
45
43
|
"react": ">=18.1.0",
|
|
44
|
+
"tsc-alias": "^1.8.6",
|
|
46
45
|
"typescript": "~5.8.3",
|
|
47
46
|
"typescript-eslint": "^8.35.1"
|
|
48
47
|
},
|