@bodynarf/react.components 1.5.7 → 1.6.1

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.
Files changed (76) hide show
  1. package/components/anchor/components/anchorWithIcon/index.d.ts +1 -0
  2. package/components/anchor/components/anchorWithIcon/index.d.ts.map +1 -1
  3. package/components/anchor/components/simpleAnchor/index.d.ts +1 -0
  4. package/components/anchor/components/simpleAnchor/index.d.ts.map +1 -1
  5. package/components/button/components/buttonWithIcon/index.d.ts +2 -1
  6. package/components/button/components/buttonWithIcon/index.d.ts.map +1 -1
  7. package/components/button/components/buttonWithIcon/index.js +3 -3
  8. package/components/button/components/simpleButton/index.d.ts +2 -1
  9. package/components/button/components/simpleButton/index.d.ts.map +1 -1
  10. package/components/button/components/simpleButton/index.js +2 -2
  11. package/components/button/index.d.ts +5 -5
  12. package/components/button/index.d.ts.map +1 -1
  13. package/components/button/index.js +9 -2
  14. package/components/button/types.d.ts +6 -12
  15. package/components/button/types.d.ts.map +1 -1
  16. package/components/button/types.js +2 -0
  17. package/components/dropdown/components/compact/index.d.ts +1 -0
  18. package/components/dropdown/components/compact/index.d.ts.map +1 -1
  19. package/components/dropdown/components/withLabel/index.d.ts +1 -0
  20. package/components/dropdown/components/withLabel/index.d.ts.map +1 -1
  21. package/components/dropdown/index.d.ts +1 -0
  22. package/components/dropdown/index.d.ts.map +1 -1
  23. package/components/index.d.ts +1 -0
  24. package/components/index.d.ts.map +1 -1
  25. package/components/index.js +1 -0
  26. package/components/primitives/checkbox/index.d.ts +1 -0
  27. package/components/primitives/checkbox/index.d.ts.map +1 -1
  28. package/components/primitives/date/index.d.ts +1 -0
  29. package/components/primitives/date/index.d.ts.map +1 -1
  30. package/components/primitives/multiline/components/multilineWithLabel/index.d.ts +1 -0
  31. package/components/primitives/multiline/components/multilineWithLabel/index.d.ts.map +1 -1
  32. package/components/primitives/multiline/components/multilineWithoutLabel/index.d.ts +1 -0
  33. package/components/primitives/multiline/components/multilineWithoutLabel/index.d.ts.map +1 -1
  34. package/components/primitives/multiline/index.d.ts +1 -0
  35. package/components/primitives/multiline/index.d.ts.map +1 -1
  36. package/components/primitives/number/components/withLabel/index.d.ts +1 -0
  37. package/components/primitives/number/components/withLabel/index.d.ts.map +1 -1
  38. package/components/primitives/number/components/withoutLabel/index.d.ts +1 -0
  39. package/components/primitives/number/components/withoutLabel/index.d.ts.map +1 -1
  40. package/components/primitives/password/components/withLabel/index.d.ts +1 -0
  41. package/components/primitives/password/components/withLabel/index.d.ts.map +1 -1
  42. package/components/primitives/password/components/withoutLabel/index.d.ts +1 -0
  43. package/components/primitives/password/components/withoutLabel/index.d.ts.map +1 -1
  44. package/components/primitives/password/index.d.ts +1 -0
  45. package/components/primitives/password/index.d.ts.map +1 -1
  46. package/components/primitives/text/components/textWithLabel/index.d.ts +1 -0
  47. package/components/primitives/text/components/textWithLabel/index.d.ts.map +1 -1
  48. package/components/primitives/text/components/textWithoutLabel/index.d.ts +1 -0
  49. package/components/primitives/text/components/textWithoutLabel/index.d.ts.map +1 -1
  50. package/components/primitives/text/index.d.ts +1 -0
  51. package/components/primitives/text/index.d.ts.map +1 -1
  52. package/components/tabs/component/index.d.ts +33 -0
  53. package/components/tabs/component/index.d.ts.map +1 -0
  54. package/components/tabs/component/index.js +68 -0
  55. package/components/tabs/component/style.scss +12 -0
  56. package/components/tabs/components/item/index.d.ts +13 -0
  57. package/components/tabs/components/item/index.d.ts.map +1 -0
  58. package/components/tabs/components/item/index.js +27 -0
  59. package/components/tabs/index.d.ts +3 -0
  60. package/components/tabs/index.d.ts.map +1 -0
  61. package/components/tabs/index.js +2 -0
  62. package/components/tabs/types.d.ts +43 -0
  63. package/components/tabs/types.d.ts.map +1 -0
  64. package/components/tabs/types.js +34 -0
  65. package/components/tag/index.d.ts +1 -0
  66. package/components/tag/index.d.ts.map +1 -1
  67. package/components/types.d.ts +9 -4
  68. package/components/types.d.ts.map +1 -1
  69. package/package.json +1 -1
  70. package/utils/dataAttributes.d.ts +8 -0
  71. package/utils/dataAttributes.d.ts.map +1 -0
  72. package/utils/dataAttributes.js +19 -0
  73. package/utils/index.d.ts +1 -0
  74. package/utils/index.d.ts.map +1 -1
  75. package/utils/index.js +1 -0
  76. package/dist +0 -32
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { AnchorWithIconProps } from "../../types";
2
3
  /** Anchor with icon component */
3
4
  export declare const AnchorWithIcon: ({ href, className, onClick, caption, title, target, icon }: AnchorWithIconProps) => JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/anchor/components/anchorWithIcon/index.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAElD,iCAAiC;AACjC,eAAO,MAAM,cAAc,+DAAgE,mBAAmB,KAAG,WAqChH,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/anchor/components/anchorWithIcon/index.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAElD,iCAAiC;AACjC,eAAO,MAAM,cAAc,+DAAgE,mBAAmB,KAAG,WAqChH,CAAC"}
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { SimpleAnchorProps } from "../../types";
2
3
  /** Simple anchor component, without icon */
3
4
  export declare const SimpleAnchor: ({ href, className, onClick, caption, title, target }: SimpleAnchorProps) => JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/anchor/components/simpleAnchor/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,4CAA4C;AAC5C,eAAO,MAAM,YAAY,yDAA0D,iBAAiB,KAAG,WAYtG,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/anchor/components/simpleAnchor/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,4CAA4C;AAC5C,eAAO,MAAM,YAAY,yDAA0D,iBAAiB,KAAG,WAYtG,CAAC"}
@@ -1,4 +1,5 @@
1
+ /// <reference types="react" />
1
2
  import { ButtonWithIconProps } from "../../types";
2
3
  /** Button with icon component */
3
- export declare const ButtonWithIcon: ({ className, disabled, onClick, caption, title, icon }: ButtonWithIconProps) => JSX.Element;
4
+ export declare const ButtonWithIcon: ({ className, disabled, onClick, caption, title, icon, data, }: ButtonWithIconProps) => JSX.Element;
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/button/components/buttonWithIcon/index.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAElD,iCAAiC;AACjC,eAAO,MAAM,cAAc,2DAA4D,mBAAmB,KAAG,WAsC5G,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/button/components/buttonWithIcon/index.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAElD,iCAAiC;AACjC,eAAO,MAAM,cAAc,kEAKxB,mBAAmB,KAAG,WAwCxB,CAAC"}
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { isNullOrEmpty } from "@bodynarf/utils";
3
3
  import Icon from "../../../icon";
4
4
  /** Button with icon component */
5
- export const ButtonWithIcon = ({ className, disabled, onClick, caption, title, icon }) => {
5
+ export const ButtonWithIcon = ({ className, disabled, onClick, caption, title, icon, data, }) => {
6
6
  const iconPosition = icon.position || "left";
7
7
  const iconClassName = isNullOrEmpty(caption)
8
8
  ? icon.className
@@ -13,7 +13,7 @@ export const ButtonWithIcon = ({ className, disabled, onClick, caption, title, i
13
13
  ? `${className} bbr-button--icon-only`
14
14
  : className;
15
15
  if (iconPosition === "left") {
16
- return (_jsxs("button", { className: className, disabled: disabled, onClick: onClick, title: title, children: [_jsx(Icon, { ...icon, className: iconClassName }), caption] }));
16
+ return (_jsxs("button", { className: className, disabled: disabled, onClick: onClick, title: title, ...data, children: [_jsx(Icon, { ...icon, className: iconClassName }), caption] }));
17
17
  }
18
- return (_jsxs("button", { className: className, disabled: disabled, onClick: onClick, title: title, children: [caption, _jsx(Icon, { ...icon, className: iconClassName })] }));
18
+ return (_jsxs("button", { className: className, disabled: disabled, onClick: onClick, title: title, ...data, children: [caption, _jsx(Icon, { ...icon, className: iconClassName })] }));
19
19
  };
@@ -1,4 +1,5 @@
1
+ /// <reference types="react" />
1
2
  import { SimpleButtonProps } from "../../types";
2
3
  /** Simple button component, without icon */
3
- export declare const SimpleButton: ({ className, disabled, onClick, caption, title }: SimpleButtonProps) => JSX.Element;
4
+ export declare const SimpleButton: ({ className, disabled, onClick, caption, title, data }: SimpleButtonProps) => JSX.Element;
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/button/components/simpleButton/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,4CAA4C;AAC5C,eAAO,MAAM,YAAY,qDAAsD,iBAAiB,KAAG,WAWlG,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/button/components/simpleButton/index.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,4CAA4C;AAC5C,eAAO,MAAM,YAAY,2DAKtB,iBAAiB,KAAG,WAYtB,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  /** Simple button component, without icon */
3
- export const SimpleButton = ({ className, disabled, onClick, caption, title }) => {
4
- return (_jsx("button", { className: className, disabled: disabled, onClick: onClick, title: title, children: caption }));
3
+ export const SimpleButton = ({ className, disabled, onClick, caption, title, data }) => {
4
+ return (_jsx("button", { className: className, disabled: disabled, onClick: onClick, title: title, ...data, children: caption }));
5
5
  };
@@ -1,8 +1,8 @@
1
1
  /// <reference types="react" />
2
2
  import "./button.scss";
3
- import { ElementIcon, ElementSize } from "..";
3
+ import { BaseElementProps, ElementIcon, ElementSize } from "..";
4
4
  import { ButtonType } from "./types";
5
- export declare type ButtonProps = {
5
+ export interface ButtonProps extends BaseElementProps {
6
6
  /** Button displaying text */
7
7
  caption?: string;
8
8
  /** Type of button (color) */
@@ -11,8 +11,6 @@ export declare type ButtonProps = {
11
11
  icon?: ElementIcon;
12
12
  /** Button size */
13
13
  size?: ElementSize;
14
- /** Title on hover */
15
- title?: string;
16
14
  /** Is button uses light version of color */
17
15
  light?: boolean;
18
16
  /** Is button outlined */
@@ -23,9 +21,11 @@ export declare type ButtonProps = {
23
21
  isLoading?: boolean;
24
22
  /** Is button disabled */
25
23
  disabled?: boolean;
24
+ /** Is non-interactive button */
25
+ static?: boolean;
26
26
  /** Click action handler */
27
27
  onClick?: () => void;
28
- };
28
+ }
29
29
  /**
30
30
  * Button component
31
31
  * @throws Caption is not defined and icon configuration is not defined at the same time
@@ -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,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
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/button/index.tsx"],"names":[],"mappings":";AAEA,OAAO,eAAe,CAAC;AAEvB,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,IAAI,CAAC;AAIhE,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAIrC,MAAM,WAAW,WAAY,SAAQ,gBAAgB;IACjD,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,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,gCAAgC;IAChC,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB,2BAA2B;IAC3B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB;AAED;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAK,EAAE,WAAW,GAAG,GAAG,CAAC,OAAO,CA0C9D"}
@@ -1,8 +1,10 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { isNullOrEmpty, isNullOrUndefined, getClassName } from "@bodynarf/utils";
3
3
  import "./button.scss";
4
+ import { mapDataAttributes } from "../../utils";
4
5
  import { ButtonWithIcon } from "./components/buttonWithIcon";
5
6
  import { SimpleButton } from "./components/simpleButton";
7
+ ;
6
8
  /**
7
9
  * Button component
8
10
  * @throws Caption is not defined and icon configuration is not defined at the same time
@@ -14,17 +16,22 @@ export default function Button(props) {
14
16
  const className = getClassName([
15
17
  "button",
16
18
  "bbr-button",
19
+ props.className,
17
20
  `is-${props.type}`,
18
21
  props.light === true ? "is-light" : "",
19
22
  !isNullOrUndefined(props.size) ? `is-${props.size}` : "",
20
23
  props.outlined === true ? "is-outlined" : "",
21
24
  props.rounded === true ? "is-rounded" : "",
22
25
  props.isLoading === true ? "is-loading" : "",
26
+ props.static === true ? "is-static" : "",
23
27
  ]);
28
+ const data = isNullOrUndefined(props.data)
29
+ ? undefined
30
+ : mapDataAttributes(props.data);
24
31
  if (!isNullOrUndefined(props.icon)) {
25
- return (_jsx(ButtonWithIcon, { ...props, className: className, onClick: props.onClick, icon: props.icon }));
32
+ return (_jsx(ButtonWithIcon, { ...props, className: className, onClick: props.onClick, icon: props.icon, data: data }));
26
33
  }
27
34
  else {
28
- return (_jsx(SimpleButton, { ...props, className: className, onClick: props.onClick }));
35
+ return (_jsx(SimpleButton, { ...props, className: className, onClick: props.onClick, data: data }));
29
36
  }
30
37
  }
@@ -1,20 +1,14 @@
1
+ import { ButtonProps } from ".";
1
2
  import { ElementIcon } from "../types";
2
3
  /** Button types according to Bulma framework */
3
4
  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
- export declare type SimpleButtonProps = {
5
+ /** Simple button props type */
6
+ export interface SimpleButtonProps extends Omit<ButtonProps, 'className'> {
5
7
  /** Button class name*/
6
8
  className: string;
7
- /** Button click handler */
8
- onClick?: () => void;
9
- /** Button caption */
10
- caption?: string;
11
- /** Disabled attribute value*/
12
- disabled?: boolean;
13
- /** Title on hover */
14
- title?: string;
15
- };
16
- export declare type ButtonWithIconProps = SimpleButtonProps & {
9
+ }
10
+ export interface ButtonWithIconProps extends SimpleButtonProps {
17
11
  /** Icon configuration */
18
12
  icon: ElementIcon;
19
- };
13
+ }
20
14
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/button/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC,gDAAgD;AAChD,oBAAY,UAAU,GAClB,SAAS,CAAC,yBAAyB,GACjC,SAAS,CAAC,2BAA2B,GACrC,MAAM,CAAC,yBAAyB,GAChC,MAAM,CAAC,sBAAsB,GAC7B,SAAS,CAAC,mBAAmB,GAC7B,SAAS,CAAC,oBAAoB,GAC9B,QAAQ,CAAC,iBAAiB,GAC1B,OAAO,CAAC,mBAAmB,GAC3B,OAAO,CAAC,wBAAwB,GAChC,MAAM,CAAC,uBAAuB,GAC9B,OAAO,CAAC,mBAAmB,GAC3B,MAAM,CAAC,sCAAsC,GAC7C,OAAO,CAAC,kDAAkD,CAC3D;AAEL,oBAAY,iBAAiB,GAAG;IAC5B,uBAAuB;IACvB,SAAS,EAAE,MAAM,CAAC;IAElB,2BAA2B;IAC3B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB,qBAAqB;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,8BAA8B;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,qBAAqB;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,oBAAY,mBAAmB,GAAG,iBAAiB,GAAG;IAClD,yBAAyB;IACzB,IAAI,EAAE,WAAW,CAAC;CACrB,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/button/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,GAAG,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC,gDAAgD;AAChD,oBAAY,UAAU,GAClB,SAAS,CAAC,yBAAyB,GACjC,SAAS,CAAC,2BAA2B,GACrC,MAAM,CAAC,yBAAyB,GAChC,MAAM,CAAC,sBAAsB,GAC7B,SAAS,CAAC,mBAAmB,GAC7B,SAAS,CAAC,oBAAoB,GAC9B,QAAQ,CAAC,iBAAiB,GAC1B,OAAO,CAAC,mBAAmB,GAC3B,OAAO,CAAC,wBAAwB,GAChC,MAAM,CAAC,uBAAuB,GAC9B,OAAO,CAAC,mBAAmB,GAC3B,MAAM,CAAC,sCAAsC,GAC7C,OAAO,CAAC,kDAAkD,CAC3D;AAEL,+BAA+B;AAC/B,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,WAAW,EAAE,WAAW,CAAC;IACrE,uBAAuB;IACvB,SAAS,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,mBAAoB,SAAQ,iBAAiB;IAC1D,yBAAyB;IACzB,IAAI,EAAE,WAAW,CAAC;CACrB"}
@@ -1 +1,3 @@
1
+ ;
2
+ ;
1
3
  export {};
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { DropdownProps } from "../..";
2
3
  declare const DropdownCompact: ({ items, value, onSelect, deselectable, className, hideOnOuterClick, listMaxHeight, placeholder, compact, disabled, }: DropdownProps) => JSX.Element;
3
4
  export default DropdownCompact;
@@ -1 +1 @@
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"}
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"}
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { DropdownProps } from "../..";
2
3
  declare const DropdownWithLabel: ({ items, value, onSelect, validationState, deselectable, className, hideOnOuterClick, listMaxHeight, label, placeholder, disabled }: DropdownProps) => JSX.Element;
3
4
  export default DropdownWithLabel;
@@ -1 +1 @@
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
+ {"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,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./dropdown.scss";
2
3
  import { BaseElementProps } from "..";
3
4
  import { InputLabel, ValidationState } from "../primitives";
@@ -1 +1 @@
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
+ {"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"}
@@ -7,4 +7,5 @@ export * from "./paginator";
7
7
  export * from "./primitives";
8
8
  export * from "./search";
9
9
  export * from "./tag";
10
+ export * from "./tabs";
10
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +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
+ {"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;AACtB,cAAc,QAAQ,CAAC"}
@@ -7,3 +7,4 @@ export * from "./paginator";
7
7
  export * from "./primitives";
8
8
  export * from "./search";
9
9
  export * from "./tag";
10
+ export * from "./tabs";
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./checkbox.scss";
2
3
  import { BaseInputElementProps } from "..";
3
4
  export interface CheckBoxProps extends BaseInputElementProps<boolean> {
@@ -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,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
+ {"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,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "../../../common.scss";
2
3
  import { BaseInputElementProps, InputLabel } from "../..";
3
4
  /** Date input conponent props type */
@@ -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,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"}
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"}
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { MultilineProps } from "../..";
2
3
  /** Multiline textual input component with describing label */
3
4
  declare const MultilineWithLabel: ({ defaultValue, onValueChange, validationState, readonly, disabled, name, className, size, style, rounded, loading, label, placeholder, fixed, rows, onBlur }: MultilineProps) => JSX.Element;
@@ -1 +1 @@
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
+ {"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,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { MultilineProps } from "../..";
2
3
  /** Multiline textual input component without describing label*/
3
4
  declare const MultilineWithoutLabel: ({ onValueChange, defaultValue, validationState, name, placeholder, onBlur, className, size, style, rounded, loading, fixed, rows, }: MultilineProps) => JSX.Element;
@@ -1 +1 @@
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,WA2CnB,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
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,WA2CnB,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "../../../common.scss";
2
3
  import { BaseInputElementProps } from "..";
3
4
  /** Multiline textual input conponent props type */
@@ -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,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
+ {"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,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { NumberProps } from "../..";
2
3
  /** Number component with label */
3
4
  declare const NumberWithLabel: ({ onValueChange, readonly, disabled, defaultValue, validationState, name, className, size, style, rounded, loading, label, placeholder, onBlur, step, }: NumberProps) => JSX.Element;
@@ -1 +1 @@
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"}
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"}
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { NumberProps } from "../..";
2
3
  /** Number component without label */
3
4
  declare const NumberWithoutLabel: ({ onValueChange, readonly, disabled, defaultValue, validationState, name, className, size, style, rounded, loading, placeholder, onBlur, step, }: NumberProps) => JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/primitives/number/components/withoutLabel/index.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAEpC,qCAAqC;AACrC,QAAA,MAAM,kBAAkB,qJAOrB,WAAW,KAAG,WA8ChB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/primitives/number/components/withoutLabel/index.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAEpC,qCAAqC;AACrC,QAAA,MAAM,kBAAkB,qJAOrB,WAAW,KAAG,WA8ChB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { PasswordProps } from "../..";
2
3
  declare const PasswordWithLabel: ({ onValueChange, disabled, validationState, name, className, size, style, rounded, loading, label, placeholder, canShowPassword, }: PasswordProps) => JSX.Element;
3
4
  export default PasswordWithLabel;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/primitives/password/components/withLabel/index.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,QAAA,MAAM,iBAAiB,uIAMpB,aAAa,KAAG,WAgIlB,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/primitives/password/components/withLabel/index.tsx"],"names":[],"mappings":";AASA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,QAAA,MAAM,iBAAiB,uIAMpB,aAAa,KAAG,WAgIlB,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { PasswordProps } from "../..";
2
3
  declare const PasswordWithoutLabel: ({ onValueChange, disabled, validationState, name, className, size, style, rounded, loading, placeholder, canShowPassword, }: PasswordProps) => JSX.Element;
3
4
  export default PasswordWithoutLabel;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/primitives/password/components/withoutLabel/index.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,QAAA,MAAM,oBAAoB,gIAMvB,aAAa,KAAG,WA4DlB,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/primitives/password/components/withoutLabel/index.tsx"],"names":[],"mappings":";AASA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,QAAA,MAAM,oBAAoB,gIAMvB,aAAa,KAAG,WA4DlB,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./style.scss";
2
3
  import { BaseInputElementProps } from "..";
3
4
  /** Password component props type */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/primitives/password/index.tsx"],"names":[],"mappings":"AAEA,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAE,qBAAqB,EAAE,MAAM,IAAI,CAAC;AAK3C,oCAAoC;AACpC,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC;IACnG;;;MAGE;IACF,eAAe,EAAE,OAAO,CAAC;CAC5B;AAED,+BAA+B;AAC/B,QAAA,MAAM,QAAQ,UAAW,aAAa,KAAG,WAMxC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/primitives/password/index.tsx"],"names":[],"mappings":";AAEA,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAE,qBAAqB,EAAE,MAAM,IAAI,CAAC;AAK3C,oCAAoC;AACpC,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC;IACnG;;;MAGE;IACF,eAAe,EAAE,OAAO,CAAC;CAC5B;AAED,+BAA+B;AAC/B,QAAA,MAAM,QAAQ,UAAW,aAAa,KAAG,WAMxC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { TextProps } from "../..";
2
3
  /** Textual input with describing label */
3
4
  declare const TextWithLabel: ({ onValueChange, readonly, disabled, defaultValue, validationState, name, className, size, style, rounded, loading, label, placeholder, onBlur, }: TextProps) => JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/primitives/text/components/textWithLabel/index.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,0CAA0C;AAC1C,QAAA,MAAM,aAAa,sJAMhB,SAAS,KAAG,WAwGd,CAAC;AAEF,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/primitives/text/components/textWithLabel/index.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,0CAA0C;AAC1C,QAAA,MAAM,aAAa,sJAMhB,SAAS,KAAG,WAwGd,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { TextProps } from "../..";
2
3
  /** Textual input without describing label */
3
4
  declare const TextWithoutLabel: ({ onValueChange, readonly, disabled, defaultValue, validationState, name, className, size, style, rounded, loading, placeholder, onBlur, }: TextProps) => JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/primitives/text/components/textWithoutLabel/index.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,6CAA6C;AAC7C,QAAA,MAAM,gBAAgB,+IAMnB,SAAS,KAAG,WA6Cd,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/primitives/text/components/textWithoutLabel/index.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,6CAA6C;AAC7C,QAAA,MAAM,gBAAgB,+IAMnB,SAAS,KAAG,WA6Cd,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "../../../common.scss";
2
3
  import { BaseInputElementProps } from "..";
3
4
  /** Text input conponent props type */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/primitives/text/index.tsx"],"names":[],"mappings":"AAEA,OAAO,sBAAsB,CAAC;AAE9B,OAAO,EAAE,qBAAqB,EAAE,MAAM,IAAI,CAAC;AAK3C,sCAAsC;AACtC,oBAAY,SAAS,GAAG,qBAAqB,CAAC,MAAM,CAAC,GAAG;IACpD,8BAA8B;IAC9B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB,CAAC;AAEF,8BAA8B;AAC9B,QAAA,MAAM,IAAI,UAAW,SAAS,KAAG,WAOhC,CAAC;AAEF,eAAe,IAAI,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/primitives/text/index.tsx"],"names":[],"mappings":";AAEA,OAAO,sBAAsB,CAAC;AAE9B,OAAO,EAAE,qBAAqB,EAAE,MAAM,IAAI,CAAC;AAK3C,sCAAsC;AACtC,oBAAY,SAAS,GAAG,qBAAqB,CAAC,MAAM,CAAC,GAAG;IACpD,8BAA8B;IAC9B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB,CAAC;AAEF,8BAA8B;AAC9B,QAAA,MAAM,IAAI,UAAW,SAAS,KAAG,WAOhC,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -0,0 +1,33 @@
1
+ import "./style.scss";
2
+ import { BaseElementProps, ElementSize } from "../..";
3
+ import { TabItem, TabsPosition, TabsStyle } from "..";
4
+ /** Tabs component props type */
5
+ export interface TabsProps extends BaseElementProps {
6
+ /** Tabs */
7
+ items: Array<TabItem>;
8
+ /** Handler of changing current active item */
9
+ onActiveItemChange: (item: TabItem) => void;
10
+ /**
11
+ * Active item by default.
12
+ * If not set - first item will be active
13
+ */
14
+ defaultActive?: TabItem;
15
+ /**
16
+ * Component size.
17
+ * Default is `normal`
18
+ */
19
+ size?: ElementSize;
20
+ /** Component position */
21
+ position?: TabsPosition;
22
+ /** Component style */
23
+ style?: TabsStyle;
24
+ /** Is component tabs should take all width of parent */
25
+ fullWidth?: boolean;
26
+ }
27
+ /**
28
+ * Tabs panel
29
+ * @throws Items are empty
30
+ */
31
+ declare const Tabs: ({ items, onActiveItemChange, defaultActive, size, position, style, fullWidth, className, title, data, }: TabsProps) => JSX.Element;
32
+ export default Tabs;
33
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/tabs/component/index.tsx"],"names":[],"mappings":"AAIA,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAGtD,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AAGtD,gCAAgC;AAChC,MAAM,WAAW,SAAU,SAAQ,gBAAgB;IAC/C,WAAW;IACX,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IAEtB,8CAA8C;IAC9C,kBAAkB,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAE5C;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;OAGG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;IAEnB,yBAAyB;IACzB,QAAQ,CAAC,EAAE,YAAY,CAAC;IAExB,sBAAsB;IACtB,KAAK,CAAC,EAAE,SAAS,CAAC;IAElB,wDAAwD;IACxD,SAAS,CAAC,EAAE,OAAO,CAAC;CACvB;AAED;;;GAGG;AACH,QAAA,MAAM,IAAI,4GAMP,SAAS,KAAG,WA6Ed,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -0,0 +1,68 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useCallback, useState, useEffect, useRef } from "react";
3
+ import { getClassName, isNullOrEmpty, isNullOrUndefined } from "@bodynarf/utils";
4
+ import "./style.scss";
5
+ import { ElementSize } from "../..";
6
+ import { mapDataAttributes } from "../../../utils";
7
+ import { TabsPosition, TabsStyle } from "..";
8
+ import TabItemComponent from "../components/item";
9
+ /**
10
+ * Tabs panel
11
+ * @throws Items are empty
12
+ */
13
+ const Tabs = ({ items, onActiveItemChange, defaultActive, size, position, style, fullWidth, className, title, data, }) => {
14
+ if (items.length === 0) {
15
+ throw new Error("Invalid configuration. Tab items must be defined");
16
+ }
17
+ const [activeItem, setActiveItem] = useState(defaultActive ?? items[0]);
18
+ const isFirstRun = useRef(true);
19
+ const onTabsClick = useCallback((container) => {
20
+ const closestTab = container.target.closest(".bbr-tabs__tab");
21
+ if (isNullOrUndefined(closestTab)) {
22
+ return;
23
+ }
24
+ const itemId = closestTab.attributes.getNamedItem("data-item-id")?.value ?? "";
25
+ if (isNullOrEmpty(itemId)) {
26
+ return;
27
+ }
28
+ const item = items.find(({ id }) => id === itemId);
29
+ if (isNullOrUndefined(item) || item === activeItem) {
30
+ return;
31
+ }
32
+ setActiveItem(item);
33
+ }, [activeItem, items]);
34
+ useEffect(() => {
35
+ if (isFirstRun.current) {
36
+ isFirstRun.current = false;
37
+ return;
38
+ }
39
+ onActiveItemChange(activeItem);
40
+ }, [activeItem, onActiveItemChange]);
41
+ const elClassName = getClassName([
42
+ "bbr-tabs",
43
+ "tabs",
44
+ position ?? TabsPosition.left,
45
+ getSizeClassName(size, [ElementSize.Normal]),
46
+ style ?? TabsStyle.default,
47
+ fullWidth === true ? "is-fullwidth" : "",
48
+ className,
49
+ ]);
50
+ const dataAttributes = isNullOrUndefined(data)
51
+ ? undefined
52
+ : mapDataAttributes(data);
53
+ return (_jsx("nav", { className: elClassName, onClick: onTabsClick, title: title, ...dataAttributes, children: _jsx("ul", { children: items.map(item => _jsx(TabItemComponent, { item: item, activeItem: activeItem.id }, item.id)) }) }));
54
+ };
55
+ 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
+ };
@@ -0,0 +1,12 @@
1
+ .bbr-tabs {
2
+ &__tab {
3
+ .bbr-icon {
4
+ &:first-child {
5
+ margin-right: 0.5rem;
6
+ }
7
+ &:last-child {
8
+ margin-left: 0.5rem;
9
+ }
10
+ }
11
+ }
12
+ }
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ import { TabItem as Item } from "../..";
3
+ /** Tabs panel single tab item component props type */
4
+ export interface TabItemProps {
5
+ /** Tab item */
6
+ item: Item;
7
+ /** Active item identifier */
8
+ activeItem: string;
9
+ }
10
+ /** Tabs panel single tab item component */
11
+ declare const TabItem: ({ item, activeItem }: TabItemProps) => JSX.Element;
12
+ export default TabItem;
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/tabs/components/item/index.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,OAAO,CAAC;AAGxC,sDAAsD;AACtD,MAAM,WAAW,YAAY;IACzB,eAAe;IACf,IAAI,EAAE,IAAI,CAAC;IAEX,6BAA6B;IAC7B,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,2CAA2C;AAC3C,QAAA,MAAM,OAAO,yBAEV,YAAY,KAAG,WAqBjB,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { getClassName, isNullOrUndefined } from "@bodynarf/utils";
3
+ import Icon from "../../../icon";
4
+ /** Tabs panel single tab item component */
5
+ const TabItem = ({ item, activeItem }) => {
6
+ if (!isNullOrUndefined(item.icon)) {
7
+ return _jsx(TabItemWithIcon, { item: item, activeItem: activeItem });
8
+ }
9
+ const className = getClassName([
10
+ "bbr-tabs__tab",
11
+ activeItem === item.id ? "is-active" : undefined,
12
+ ]);
13
+ return (_jsx("li", { className: className, "data-item-id": item.id, children: _jsx("a", { children: item.caption }) }, item.id));
14
+ };
15
+ export default TabItem;
16
+ /** Tabs panel single tab item with icon component */
17
+ const TabItemWithIcon = ({ item, activeItem }) => {
18
+ const iconConfig = item.icon;
19
+ const className = getClassName([
20
+ "bbr-tabs__tab",
21
+ activeItem === item.id ? "is-active" : undefined,
22
+ ]);
23
+ if (iconConfig.position === "left") {
24
+ return (_jsx("li", { className: className, "data-item-id": item.id, children: _jsxs("a", { children: [_jsx(Icon, { ...iconConfig }), _jsx("span", { children: item.caption })] }) }, item.id));
25
+ }
26
+ return (_jsx("li", { className: className, "data-item-id": item.id, children: _jsxs("a", { children: [_jsx("span", { children: item.caption }), _jsx(Icon, { ...iconConfig })] }) }, item.id));
27
+ };
@@ -0,0 +1,3 @@
1
+ export { default } from "./component";
2
+ export * from "./types";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/tabs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,cAAc,SAAS,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { default } from "./component";
2
+ export * from "./types";
@@ -0,0 +1,43 @@
1
+ import { ElementIcon } from "..";
2
+ /** Tabs component style */
3
+ export declare enum TabsStyle {
4
+ /**
5
+ * Default style.
6
+ * Single border at the bottom
7
+ */
8
+ default = "",
9
+ /**
10
+ * Classic style with borders.
11
+ * Borders all except bottom
12
+ */
13
+ boxed = "is-boxed",
14
+ /**
15
+ * Styled as buttons
16
+ */
17
+ radioButton = "is-toggle",
18
+ /**
19
+ * Styled as rounded buttons
20
+ */
21
+ radioButtonRounded = "is-toggle is-toggle-rounded"
22
+ }
23
+ /**
24
+ * Tabs items position on component
25
+ */
26
+ export declare enum TabsPosition {
27
+ /** On the left side. Default value */
28
+ "left" = "",
29
+ /** Center*/
30
+ "center" = "is-centered",
31
+ /** Pulled to right */
32
+ "right" = "is-right"
33
+ }
34
+ /** Tab item */
35
+ export interface TabItem {
36
+ /** Unique identifier across all tab items */
37
+ id: string;
38
+ /** Displayable caption */
39
+ caption: string;
40
+ /** Icon configuration */
41
+ icon?: ElementIcon;
42
+ }
43
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/tabs/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,IAAI,CAAC;AAEjC,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;;GAEG;AACH,oBAAY,YAAY;IACpB,sCAAsC;IACtC,MAAM,KAAK;IAEX,YAAY;IACZ,QAAQ,gBAAgB;IAExB,sBAAsB;IACtB,OAAO,aAAa;CACvB;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"}
@@ -0,0 +1,34 @@
1
+ /** Tabs component style */
2
+ export var TabsStyle;
3
+ (function (TabsStyle) {
4
+ /**
5
+ * Default style.
6
+ * Single border at the bottom
7
+ */
8
+ TabsStyle["default"] = "";
9
+ /**
10
+ * Classic style with borders.
11
+ * Borders all except bottom
12
+ */
13
+ TabsStyle["boxed"] = "is-boxed";
14
+ /**
15
+ * Styled as buttons
16
+ */
17
+ TabsStyle["radioButton"] = "is-toggle";
18
+ /**
19
+ * Styled as rounded buttons
20
+ */
21
+ TabsStyle["radioButtonRounded"] = "is-toggle is-toggle-rounded";
22
+ })(TabsStyle || (TabsStyle = {}));
23
+ /**
24
+ * Tabs items position on component
25
+ */
26
+ export var TabsPosition;
27
+ (function (TabsPosition) {
28
+ /** On the left side. Default value */
29
+ TabsPosition["left"] = "";
30
+ /** Center*/
31
+ TabsPosition["center"] = "is-centered";
32
+ /** Pulled to right */
33
+ TabsPosition["right"] = "is-right";
34
+ })(TabsPosition || (TabsPosition = {}));
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { ElementColor, ElementSize, BaseElementProps } from "..";
2
3
  import "./style.scss";
3
4
  /** Tag item prop types */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/tag/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,IAAI,CAAC;AAEjE,OAAO,cAAc,CAAC;AAEtB,0BAA0B;AAC1B,UAAU,QAAS,SAAQ,gBAAgB;IACvC,iBAAiB;IACjB,OAAO,EAAE,MAAM,CAAC;IAEhB;;;MAGE;IACF,IAAI,CAAC,EAAE,WAAW,CAAC;IAEnB,oBAAoB;IACpB,KAAK,CAAC,EAAE,YAAY,CAAC;IAErB,qCAAqC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,iCAAiC;IACjC,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,oBAAoB;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB,0BAA0B;IAC1B,WAAW,CAAC,EAAE;QACV,iBAAiB;QACjB,KAAK,EAAE,MAAM,CAAC;QAEd,uBAAuB;QACvB,eAAe,EAAE,MAAM,CAAC;KAC3B,CAAC;CACL;AAED,sBAAsB;AACtB,QAAA,MAAM,GAAG,2FAMN,QAAQ,KAAG,WAmCb,CAAC;AAEF,eAAe,GAAG,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/tag/index.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,IAAI,CAAC;AAEjE,OAAO,cAAc,CAAC;AAEtB,0BAA0B;AAC1B,UAAU,QAAS,SAAQ,gBAAgB;IACvC,iBAAiB;IACjB,OAAO,EAAE,MAAM,CAAC;IAEhB;;;MAGE;IACF,IAAI,CAAC,EAAE,WAAW,CAAC;IAEnB,oBAAoB;IACpB,KAAK,CAAC,EAAE,YAAY,CAAC;IAErB,qCAAqC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,iCAAiC;IACjC,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,oBAAoB;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB,0BAA0B;IAC1B,WAAW,CAAC,EAAE;QACV,iBAAiB;QACjB,KAAK,EAAE,MAAM,CAAC;QAEd,uBAAuB;QACvB,eAAe,EAAE,MAAM,CAAC;KAC3B,CAAC;CACL;AAED,sBAAsB;AACtB,QAAA,MAAM,GAAG,2FAMN,QAAQ,KAAG,WAmCb,CAAC;AAEF,eAAe,GAAG,CAAC"}
@@ -5,11 +5,16 @@ export declare type BaseElementProps = {
5
5
  /** Title */
6
6
  title?: string;
7
7
  /** Extra data-* attributes */
8
- data?: {
9
- /**Will add data-{key} attribute to element */
10
- [key: string]: any;
11
- };
8
+ data?: DataAttributes;
12
9
  };
10
+ /**
11
+ * Html data-* attributes
12
+ * @description All keys with defined values will be mapped injected into html element as data-{key} attributes
13
+ */
14
+ export interface DataAttributes {
15
+ /** Single data-* attribute value */
16
+ [key: string]: any;
17
+ }
13
18
  /** Input component size variety */
14
19
  export declare enum ElementSize {
15
20
  /** Font size is 0.75rem */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/components/types.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oBAAY,gBAAgB,GAAG;IAC3B,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,YAAY;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,8BAA8B;IAC9B,IAAI,CAAC,EAAE;QACH,8CAA8C;QAC9C,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;KACtB,CAAC;CACL,CAAC;AAEF,mCAAmC;AACnC,oBAAY,WAAW;IACnB,2BAA2B;IAC3B,KAAK,UAAU;IAEf,iCAAiC;IACjC,MAAM,WAAW;IAEjB,2BAA2B;IAC3B,MAAM,WAAW;IAEjB,0BAA0B;IAC1B,KAAK,UAAU;CAClB;AAED,wCAAwC;AACxC,oBAAY,YAAY;IACpB,yBAAyB;IACzB,OAAO,YAAY;IAEnB,2BAA2B;IAC3B,OAAO,YAAY;IAEnB,yBAAyB;IACzB,IAAI,SAAS;IAEb,sBAAsB;IACtB,IAAI,SAAS;IAEb,mBAAmB;IACnB,OAAO,YAAY;IAEnB,oBAAoB;IACpB,OAAO,YAAY;IAEnB,iBAAiB;IACjB,MAAM,WAAW;CACpB;AAED,4BAA4B;AAC5B,oBAAY,YAAY,GAClB,MAAM,GACN,OAAO,CAAC;AAEd,0BAA0B;AAC1B,oBAAY,WAAW,GAAG;IACtB;;;;;MAKE;IACF,IAAI,EAAE,MAAM,CAAC;IAEb,2BAA2B;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,gBAAgB;IAChB,IAAI,CAAC,EAAE,WAAW,CAAC;IAEnB;;;MAGE;IACF,QAAQ,CAAC,EAAE,YAAY,CAAC;CAC3B,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/components/types.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oBAAY,gBAAgB,GAAG;IAC3B,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,YAAY;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,8BAA8B;IAC9B,IAAI,CAAC,EAAE,cAAc,CAAC;CACzB,CAAC;AAEF;;;EAGE;AACF,MAAM,WAAW,cAAc;IAC3B,oCAAoC;IACpC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACtB;AAED,mCAAmC;AACnC,oBAAY,WAAW;IACnB,2BAA2B;IAC3B,KAAK,UAAU;IAEf,iCAAiC;IACjC,MAAM,WAAW;IAEjB,2BAA2B;IAC3B,MAAM,WAAW;IAEjB,0BAA0B;IAC1B,KAAK,UAAU;CAClB;AAED,wCAAwC;AACxC,oBAAY,YAAY;IACpB,yBAAyB;IACzB,OAAO,YAAY;IAEnB,2BAA2B;IAC3B,OAAO,YAAY;IAEnB,yBAAyB;IACzB,IAAI,SAAS;IAEb,sBAAsB;IACtB,IAAI,SAAS;IAEb,mBAAmB;IACnB,OAAO,YAAY;IAEnB,oBAAoB;IACpB,OAAO,YAAY;IAEnB,iBAAiB;IACjB,MAAM,WAAW;CACpB;AAED,4BAA4B;AAC5B,oBAAY,YAAY,GAClB,MAAM,GACN,OAAO,CAAC;AAEd,0BAA0B;AAC1B,oBAAY,WAAW,GAAG;IACtB;;;;;MAKE;IACF,IAAI,EAAE,MAAM,CAAC;IAEb,2BAA2B;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,gBAAgB;IAChB,IAAI,CAAC,EAAE,WAAW,CAAC;IAEnB;;;MAGE;IACF,QAAQ,CAAC,EAAE,YAAY,CAAC;CAC3B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bodynarf/react.components",
3
- "version": "1.5.7",
3
+ "version": "1.6.1",
4
4
  "author": {
5
5
  "name": "Artem",
6
6
  "email": "bodynar@gmail.com"
@@ -0,0 +1,8 @@
1
+ import { DataAttributes } from "..";
2
+ /**
3
+ * Map object with key-value pairs to html data attributes format
4
+ * @param dataAttributes Object with data attribute values
5
+ * @returns Object that could be injected into react html element as data-* attribute values
6
+ */
7
+ export declare const mapDataAttributes: (dataAttributes: DataAttributes) => object;
8
+ //# sourceMappingURL=dataAttributes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dataAttributes.d.ts","sourceRoot":"","sources":["../../src/utils/dataAttributes.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,IAAI,CAAC;AAEpC;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,mBAAoB,cAAc,KAAG,MAgBlE,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { isNullOrUndefined } from "@bodynarf/utils";
2
+ /**
3
+ * Map object with key-value pairs to html data attributes format
4
+ * @param dataAttributes Object with data attribute values
5
+ * @returns Object that could be injected into react html element as data-* attribute values
6
+ */
7
+ export const mapDataAttributes = (dataAttributes) => {
8
+ const mappedAttributes = Object
9
+ .entries(dataAttributes)
10
+ .reduce((result, [key, value]) => {
11
+ if (isNullOrUndefined(value)) {
12
+ return result;
13
+ }
14
+ const newKey = key.startsWith("data-") ? key : `data-${key}`;
15
+ result[newKey] = value;
16
+ return result;
17
+ }, {});
18
+ return mappedAttributes;
19
+ };
package/utils/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export * from "./formValidation";
2
+ export * from "./dataAttributes";
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC"}
package/utils/index.js CHANGED
@@ -1 +1,2 @@
1
1
  export * from "./formValidation";
2
+ export * from "./dataAttributes";
package/dist DELETED
@@ -1,32 +0,0 @@
1
- # About
2
- Small library with react components based on Bulma CSS framework&nbsp; <a href="https://bulma.io" title="Bulma css framework">
3
- <img
4
- src="https://bulma.io/images/made-with-bulma.png"
5
- alt="Made with Bulma"
6
- width="128"
7
- height="24"/>
8
- </a>
9
-
10
- ## Installation
11
- 1. Install [React](https://reactjs.org/)
12
- 2. Install [Bulma](https://bulma.io/)
13
- 3. Make sure you imported bulma styles in parent container
14
- 4. *(Optional)* To use **Icon** component - install [Bootstrap Icons](https://icons.getbootstrap.com/) and make sure you imported these styles in parent container
15
-
16
- ## Description
17
- ### Simple components
18
- Simple react components based on html elements.
19
-
20
- - **Date** - date input;
21
- - **Multiline** - multiline text input;
22
- - **Text**- single line text input;
23
- - **Anchor**
24
- - **Button**
25
- - **Icon** - *see p.4 of installation*
26
- - **Dropdown** - custom dropdown component, based on html div elements & css. Allows to use icon in elements
27
-
28
- ### Complex components
29
- Complex components is set of components built via combining simple components or represent complex logical component
30
- - **Search** - Search bar with optional button to perform search
31
- - **Paginator** - Pagination elements to navigate through paged list
32
-