@bodynarf/react.components 1.6.2 → 1.6.4

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 (172) hide show
  1. package/components/accordion/component/index.d.ts +6 -0
  2. package/components/accordion/component/index.d.ts.map +1 -0
  3. package/components/accordion/component/index.js +35 -0
  4. package/components/accordion/component/style.scss +31 -0
  5. package/components/accordion/index.d.ts +3 -0
  6. package/components/accordion/index.d.ts.map +1 -0
  7. package/components/accordion/index.js +2 -0
  8. package/components/accordion/types.d.ts +18 -0
  9. package/components/accordion/types.d.ts.map +1 -0
  10. package/components/accordion/types.js +1 -0
  11. package/components/anchor/component/index.d.ts +6 -0
  12. package/components/anchor/component/index.d.ts.map +1 -0
  13. package/components/anchor/component/index.js +20 -0
  14. package/components/anchor/{anchor.scss → component/style.scss} +15 -15
  15. package/components/anchor/index.d.ts +2 -23
  16. package/components/anchor/index.d.ts.map +1 -1
  17. package/components/anchor/index.js +2 -20
  18. package/components/anchor/types.d.ts +23 -4
  19. package/components/anchor/types.d.ts.map +1 -1
  20. package/components/button/component/index.d.ts +9 -0
  21. package/components/button/component/index.d.ts.map +1 -0
  22. package/components/button/component/index.js +36 -0
  23. package/components/button/{button.scss → component/style.scss} +12 -12
  24. package/components/button/index.d.ts +2 -33
  25. package/components/button/index.d.ts.map +1 -1
  26. package/components/button/index.js +2 -37
  27. package/components/button/types.d.ts +25 -2
  28. package/components/button/types.d.ts.map +1 -1
  29. package/components/button/types.js +1 -0
  30. package/components/dropdown/component/index.d.ts +7 -0
  31. package/components/dropdown/component/index.d.ts.map +1 -0
  32. package/components/dropdown/component/index.js +15 -0
  33. package/components/dropdown/index.d.ts +2 -42
  34. package/components/dropdown/index.d.ts.map +1 -1
  35. package/components/dropdown/index.js +2 -15
  36. package/components/dropdown/types.d.ts +38 -2
  37. package/components/dropdown/types.d.ts.map +1 -1
  38. package/components/icon/component/index.d.ts +8 -0
  39. package/components/icon/component/index.d.ts.map +1 -0
  40. package/components/icon/component/index.js +23 -0
  41. package/components/icon/{icon.scss → component/style.scss} +21 -21
  42. package/components/icon/index.d.ts +2 -21
  43. package/components/icon/index.d.ts.map +1 -1
  44. package/components/icon/index.js +2 -23
  45. package/components/icon/types.d.ts +16 -0
  46. package/components/icon/types.d.ts.map +1 -0
  47. package/components/icon/types.js +1 -0
  48. package/components/index.d.ts +4 -3
  49. package/components/index.d.ts.map +1 -1
  50. package/components/index.js +4 -3
  51. package/components/paginator/component/index.d.ts +8 -0
  52. package/components/paginator/component/index.d.ts.map +1 -0
  53. package/components/paginator/component/index.js +47 -0
  54. package/components/paginator/index.d.ts +3 -33
  55. package/components/paginator/index.d.ts.map +1 -1
  56. package/components/paginator/index.js +3 -47
  57. package/components/paginator/types.d.ts +28 -0
  58. package/components/paginator/types.d.ts.map +1 -0
  59. package/components/paginator/types.js +1 -0
  60. package/components/primitives/checkbox/component/index.d.ts +7 -0
  61. package/components/primitives/checkbox/component/index.d.ts.map +1 -0
  62. package/components/primitives/checkbox/component/index.js +37 -0
  63. package/components/primitives/checkbox/index.d.ts +2 -28
  64. package/components/primitives/checkbox/index.d.ts.map +1 -1
  65. package/components/primitives/checkbox/index.js +2 -38
  66. package/components/primitives/checkbox/types.d.ts +25 -0
  67. package/components/primitives/checkbox/types.d.ts.map +1 -0
  68. package/components/primitives/checkbox/types.js +1 -0
  69. package/components/primitives/date/component/index.d.ts +6 -0
  70. package/components/primitives/date/component/index.d.ts.map +1 -0
  71. package/components/primitives/date/component/index.js +48 -0
  72. package/components/primitives/date/index.d.ts +2 -13
  73. package/components/primitives/date/index.d.ts.map +1 -1
  74. package/components/primitives/date/index.js +2 -48
  75. package/components/primitives/date/types.d.ts +9 -0
  76. package/components/primitives/date/types.d.ts.map +1 -0
  77. package/components/primitives/date/types.js +1 -0
  78. package/components/primitives/index.d.ts +3 -1
  79. package/components/primitives/index.d.ts.map +1 -1
  80. package/components/primitives/index.js +3 -1
  81. package/components/primitives/multiline/component/index.d.ts +7 -0
  82. package/components/primitives/multiline/component/index.d.ts.map +1 -0
  83. package/components/primitives/multiline/component/index.js +15 -0
  84. package/components/primitives/multiline/components/multilineWithLabel/index.d.ts +0 -1
  85. package/components/primitives/multiline/components/multilineWithLabel/index.d.ts.map +1 -1
  86. package/components/primitives/multiline/components/multilineWithoutLabel/index.d.ts +0 -1
  87. package/components/primitives/multiline/components/multilineWithoutLabel/index.d.ts.map +1 -1
  88. package/components/primitives/multiline/index.d.ts +2 -15
  89. package/components/primitives/multiline/index.d.ts.map +1 -1
  90. package/components/primitives/multiline/index.js +2 -15
  91. package/components/primitives/multiline/types.d.ts +11 -0
  92. package/components/primitives/multiline/types.d.ts.map +1 -0
  93. package/components/primitives/multiline/types.js +1 -0
  94. package/components/primitives/number/component/index.d.ts +6 -0
  95. package/components/primitives/number/component/index.d.ts.map +1 -0
  96. package/components/primitives/number/component/index.js +14 -0
  97. package/components/primitives/number/components/withLabel/index.d.ts +0 -1
  98. package/components/primitives/number/components/withLabel/index.d.ts.map +1 -1
  99. package/components/primitives/number/components/withoutLabel/index.d.ts +0 -1
  100. package/components/primitives/number/components/withoutLabel/index.d.ts.map +1 -1
  101. package/components/primitives/number/index.d.ts +2 -16
  102. package/components/primitives/number/index.d.ts.map +1 -1
  103. package/components/primitives/number/index.js +2 -14
  104. package/components/primitives/number/types.d.ts +13 -0
  105. package/components/primitives/number/types.d.ts.map +1 -0
  106. package/components/primitives/number/types.js +1 -0
  107. package/components/primitives/password/component/index.d.ts +7 -0
  108. package/components/primitives/password/component/index.d.ts.map +1 -0
  109. package/components/primitives/password/component/index.js +13 -0
  110. package/components/primitives/password/components/withLabel/index.d.ts +0 -1
  111. package/components/primitives/password/components/withLabel/index.d.ts.map +1 -1
  112. package/components/primitives/password/components/withoutLabel/index.d.ts +0 -1
  113. package/components/primitives/password/components/withoutLabel/index.d.ts.map +1 -1
  114. package/components/primitives/password/index.d.ts +2 -14
  115. package/components/primitives/password/index.d.ts.map +1 -1
  116. package/components/primitives/password/index.js +2 -13
  117. package/components/primitives/password/types.d.ts +10 -0
  118. package/components/primitives/password/types.d.ts.map +1 -0
  119. package/components/primitives/password/types.js +1 -0
  120. package/components/primitives/text/component/index.d.ts +7 -0
  121. package/components/primitives/text/component/index.d.ts.map +1 -0
  122. package/components/primitives/text/component/index.js +15 -0
  123. package/components/primitives/text/components/textWithLabel/index.d.ts +0 -1
  124. package/components/primitives/text/components/textWithLabel/index.d.ts.map +1 -1
  125. package/components/primitives/text/components/textWithoutLabel/index.d.ts +0 -1
  126. package/components/primitives/text/components/textWithoutLabel/index.d.ts.map +1 -1
  127. package/components/primitives/text/index.d.ts +2 -11
  128. package/components/primitives/text/index.d.ts.map +1 -1
  129. package/components/primitives/text/index.js +2 -15
  130. package/components/primitives/text/types.d.ts +7 -0
  131. package/components/primitives/text/types.d.ts.map +1 -0
  132. package/components/primitives/text/types.js +1 -0
  133. package/components/primitives/types/baseProps.d.ts +2 -2
  134. package/components/primitives/types/baseProps.d.ts.map +1 -1
  135. package/components/primitives/types/label.d.ts +2 -2
  136. package/components/primitives/types/label.d.ts.map +1 -1
  137. package/components/search/component/index.d.ts +6 -0
  138. package/components/search/component/index.d.ts.map +1 -0
  139. package/components/search/component/index.js +37 -0
  140. package/components/search/index.d.ts +2 -29
  141. package/components/search/index.d.ts.map +1 -1
  142. package/components/search/index.js +2 -37
  143. package/components/search/types.d.ts +27 -0
  144. package/components/search/types.d.ts.map +1 -0
  145. package/components/search/types.js +1 -0
  146. package/components/tabs/component/index.d.ts +0 -1
  147. package/components/tabs/component/index.d.ts.map +1 -1
  148. package/components/tag/component/index.d.ts +6 -0
  149. package/components/tag/component/index.d.ts.map +1 -0
  150. package/components/tag/component/index.js +28 -0
  151. package/components/tag/index.d.ts +2 -31
  152. package/components/tag/index.d.ts.map +1 -1
  153. package/components/tag/index.js +2 -28
  154. package/components/tag/types.d.ts +27 -0
  155. package/components/tag/types.d.ts.map +1 -0
  156. package/components/tag/types.js +1 -0
  157. package/components/types.d.ts +4 -4
  158. package/components/types.d.ts.map +1 -1
  159. package/hooks/usePagination.d.ts.map +1 -1
  160. package/index.d.ts +2 -12
  161. package/index.d.ts.map +1 -1
  162. package/index.js +2 -12
  163. package/package.json +1 -1
  164. package/tsconfig.tsbuildinfo +1 -0
  165. package/components/primitives/types/enums.d.ts +0 -29
  166. package/components/primitives/types/enums.d.ts.map +0 -1
  167. package/components/primitives/types/enums.js +0 -31
  168. /package/components/dropdown/{dropdown.scss → component/style.scss} +0 -0
  169. /package/components/primitives/checkbox/{checkbox.scss → component/style.scss} +0 -0
  170. /package/components/primitives/password/{style.scss → component/style.scss} +0 -0
  171. /package/components/search/{search.scss → component/style.scss} +0 -0
  172. /package/components/tag/{style.scss → component/style.scss} +0 -0
@@ -0,0 +1,6 @@
1
+ import "./style.scss";
2
+ import { AccordionProps } from "..";
3
+ /** Accordion panel */
4
+ declare const Accordion: ({ children, caption, style, size, defaultExpanded, onToggle, className, data, title, }: AccordionProps) => JSX.Element;
5
+ export default Accordion;
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/accordion/component/index.tsx"],"names":[],"mappings":"AAIA,OAAO,cAAc,CAAC;AAOtB,OAAO,EAAE,cAAc,EAAE,MAAM,IAAI,CAAC;AAEpC,sBAAsB;AACtB,QAAA,MAAM,SAAS,2FAKZ,cAAc,KAAG,WA8DnB,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -0,0 +1,35 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useCallback, useEffect, useRef, useState } from "react";
3
+ import { getClassName, isNullOrUndefined } from "@bodynarf/utils";
4
+ import "./style.scss";
5
+ import { ElementSize } from "../..";
6
+ import Icon from "../../icon";
7
+ import { mapDataAttributes } from "../../..";
8
+ /** Accordion panel */
9
+ const Accordion = ({ children, caption, style, size, defaultExpanded, onToggle, className, data, title, }) => {
10
+ const expandablePanelRef = useRef(null);
11
+ const [isExpanded, setIsExpanded] = useState(defaultExpanded ?? false);
12
+ const [maxHeight, setMaxHeight] = useState(defaultExpanded === true ? undefined : 0);
13
+ const toggleCollapse = useCallback(() => setMaxHeight(isExpanded ? 0 : expandablePanelRef.current.scrollHeight), [isExpanded]);
14
+ useEffect(() => {
15
+ if (defaultExpanded === true && !isNullOrUndefined(expandablePanelRef.current)) {
16
+ setMaxHeight(expandablePanelRef.current.scrollHeight);
17
+ }
18
+ }, [defaultExpanded]);
19
+ useEffect(() => setIsExpanded(maxHeight !== 0), [maxHeight]);
20
+ useEffect(() => {
21
+ onToggle?.call(undefined, !isExpanded);
22
+ }, [isExpanded, onToggle]);
23
+ const elClassName = getClassName([
24
+ "bbr-accordion",
25
+ "message",
26
+ isNullOrUndefined(style) ? "" : `is-${style}`,
27
+ isNullOrUndefined(size) ? "" : `is-${size}`,
28
+ className,
29
+ ]);
30
+ const dataAttributes = isNullOrUndefined(data)
31
+ ? undefined
32
+ : mapDataAttributes(data);
33
+ return (_jsxs("article", { className: elClassName, "aria-expanded": isExpanded, ...dataAttributes, children: [_jsxs("div", { className: "message-header is-unselectable", onClick: toggleCollapse, children: [_jsx("span", { title: title, children: caption }), _jsx(Icon, { name: "arrow-down", size: size ?? ElementSize.Medium })] }), _jsx("div", { className: "message-body", ref: expandablePanelRef, style: { maxHeight: `${maxHeight}px` }, children: _jsx("div", { className: "message-body__content", children: children }) })] }));
34
+ };
35
+ export default Accordion;
@@ -0,0 +1,31 @@
1
+ .bbr-accordion {
2
+ .message {
3
+ &-header {
4
+ cursor: pointer;
5
+
6
+ .bbr-icon {
7
+ transition: transform 0.125s ease-in-out;
8
+ }
9
+ }
10
+ &-body {
11
+ color: black !important;
12
+ transition: max-height 0.2s ease-out;
13
+ overflow-y: inherit;
14
+ padding: 0 1.5em;
15
+
16
+ &__content {
17
+ padding: 1.25em 0;
18
+ }
19
+ }
20
+ }
21
+ &[aria-expanded="true"] {
22
+ .message-header i {
23
+ transform: rotate(180deg);
24
+ }
25
+ }
26
+ &[aria-expanded="false"] {
27
+ .message-body {
28
+ overflow-y: hidden;
29
+ }
30
+ }
31
+ }
@@ -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/accordion/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,18 @@
1
+ /// <reference types="react" />
2
+ import { BaseElementProps, ElementColor, ElementSize } from "..";
3
+ /** Accordion panel props type */
4
+ export interface AccordionProps extends BaseElementProps {
5
+ /** Content that should be collapsed inside */
6
+ children: React.ReactNode;
7
+ /** Collapsible panel caption */
8
+ caption: string;
9
+ /** Default expandned state */
10
+ defaultExpanded?: boolean;
11
+ /** Panel size */
12
+ size?: ElementSize;
13
+ /** Color */
14
+ style?: ElementColor;
15
+ /** Extra handler for toggling visibility. Doesn't affect component logic */
16
+ onToggle?: (collapsed: boolean) => void;
17
+ }
18
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/accordion/types.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,IAAI,CAAC;AAEjE,iCAAiC;AACjC,MAAM,WAAW,cAAe,SAAQ,gBAAgB;IACpD,8CAA8C;IAC9C,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAE1B,gCAAgC;IAChC,OAAO,EAAE,MAAM,CAAC;IAEhB,8BAA8B;IAC9B,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B,iBAAiB;IACjB,IAAI,CAAC,EAAE,WAAW,CAAC;IAEnB,YAAY;IACZ,KAAK,CAAC,EAAE,YAAY,CAAC;IAErB,4EAA4E;IAC5E,QAAQ,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;CAC3C"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import "./style.scss";
3
+ import { AnchorProps } from "../..";
4
+ /** Anchor component */
5
+ export default function Anchor(props: AnchorProps): JSX.Element;
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/anchor/component/index.tsx"],"names":[],"mappings":";AAEA,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAE,WAAW,EAAe,MAAM,OAAO,CAAC;AAKjD,uBAAuB;AACvB,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAK,EAAE,WAAW,GAAG,GAAG,CAAC,OAAO,CA6B9D"}
@@ -0,0 +1,20 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { isNullOrUndefined, isNullOrEmpty, getClassName } from "@bodynarf/utils";
3
+ import "./style.scss";
4
+ import { SimpleAnchor } from "../components/simpleAnchor";
5
+ import { AnchorWithIcon } from "../components/anchorWithIcon";
6
+ /** Anchor component */
7
+ export default function Anchor(props) {
8
+ if (isNullOrUndefined(props.caption) && isNullOrUndefined(props.icon)) {
9
+ throw new Error("No anchor content provided");
10
+ }
11
+ const className = getClassName([
12
+ "bbr-anchor",
13
+ !isNullOrEmpty(props.className) ? ` ${props.className}` : "",
14
+ props.disableHovering === true ? " bbr-anchor--unhoverable" : ""
15
+ ]);
16
+ if (isNullOrUndefined(props.icon)) {
17
+ return (_jsx(SimpleAnchor, { ...props, className: className, onClick: props.onClick }));
18
+ }
19
+ return (_jsx(AnchorWithIcon, { ...props, className: className, onClick: props.onClick, icon: props.icon }));
20
+ }
@@ -1,15 +1,15 @@
1
- .bbr-anchor {
2
- text-decoration: none;
3
- color: inherit;
4
-
5
- transition: 0.15s ease-in-out color;
6
-
7
- &:not(&--unhoverable):hover {
8
- text-decoration: underline;
9
- color: #3273dc;
10
- }
11
-
12
- .bbr-icon {
13
- transition: none;
14
- }
15
- }
1
+ .bbr-anchor {
2
+ text-decoration: none;
3
+ color: inherit;
4
+
5
+ transition: 0.15s ease-in-out color;
6
+
7
+ &:not(&--unhoverable):hover {
8
+ text-decoration: underline;
9
+ color: #3273dc;
10
+ }
11
+
12
+ .bbr-icon {
13
+ transition: none;
14
+ }
15
+ }
@@ -1,24 +1,3 @@
1
- /// <reference types="react" />
2
- import "./anchor.scss";
3
- import { ElementIcon } from "..";
4
- export declare type AnchorProps = {
5
- /** Link destination */
6
- href?: string;
7
- /** Link caption */
8
- caption?: string;
9
- /** Click handler */
10
- onClick?: () => void;
11
- /** Configuration od inner icon */
12
- icon?: ElementIcon;
13
- /** Title of anchor */
14
- title?: string;
15
- /** Where to open the linked document */
16
- target?: "_blank" | "_top";
17
- /** Additional class names */
18
- className?: string;
19
- /** Should css hovering effects be disabled */
20
- disableHovering?: boolean;
21
- };
22
- /** Anchor component */
23
- export default function Anchor(props: AnchorProps): JSX.Element;
1
+ export { default } from "./component";
2
+ export * from "./types";
24
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/anchor/index.tsx"],"names":[],"mappings":";AAEA,OAAO,eAAe,CAAC;AAEvB,OAAO,EAAE,WAAW,EAAE,MAAM,IAAI,CAAC;AAKjC,oBAAY,WAAW,GAAG;IACtB,uBAAuB;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,oBAAoB;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,oBAAoB;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB,kCAAkC;IAClC,IAAI,CAAC,EAAE,WAAW,CAAC;IAEnB,sBAAsB;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,wCAAwC;IACxC,MAAM,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;IAE3B,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,8CAA8C;IAC9C,eAAe,CAAC,EAAE,OAAO,CAAC;CAC7B,CAAC;AAEF,uBAAuB;AACvB,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAK,EAAE,WAAW,GAAG,GAAG,CAAC,OAAO,CA6B9D"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/anchor/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,cAAc,SAAS,CAAC"}
@@ -1,20 +1,2 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { isNullOrUndefined, isNullOrEmpty, getClassName } from "@bodynarf/utils";
3
- import "./anchor.scss";
4
- import { SimpleAnchor } from "./components/simpleAnchor";
5
- import { AnchorWithIcon } from "./components/anchorWithIcon";
6
- /** Anchor component */
7
- export default function Anchor(props) {
8
- if (isNullOrUndefined(props.caption) && isNullOrUndefined(props.icon)) {
9
- throw new Error("No anchor content provided");
10
- }
11
- const className = getClassName([
12
- "bbr-anchor",
13
- !isNullOrEmpty(props.className) ? ` ${props.className}` : "",
14
- props.disableHovering === true ? " bbr-anchor--unhoverable" : ""
15
- ]);
16
- if (isNullOrUndefined(props.icon)) {
17
- return (_jsx(SimpleAnchor, { ...props, className: className, onClick: props.onClick }));
18
- }
19
- return (_jsx(AnchorWithIcon, { ...props, className: className, onClick: props.onClick, icon: props.icon }));
20
- }
1
+ export { default } from "./component";
2
+ export * from "./types";
@@ -1,5 +1,24 @@
1
1
  import { ElementIcon } from "..";
2
- export declare type SimpleAnchorProps = {
2
+ /** Anchor component props type */
3
+ export interface AnchorProps {
4
+ /** Link destination */
5
+ href?: string;
6
+ /** Link caption */
7
+ caption?: string;
8
+ /** Click handler */
9
+ onClick?: () => void;
10
+ /** Configuration od inner icon */
11
+ icon?: ElementIcon;
12
+ /** Title of anchor */
13
+ title?: string;
14
+ /** Where to open the linked document */
15
+ target?: "_blank" | "_top";
16
+ /** Additional class names */
17
+ className?: string;
18
+ /** Should css hovering effects be disabled */
19
+ disableHovering?: boolean;
20
+ }
21
+ export interface SimpleAnchorProps {
3
22
  /** Link destination */
4
23
  href?: string;
5
24
  /** Class names */
@@ -12,9 +31,9 @@ export declare type SimpleAnchorProps = {
12
31
  title?: string;
13
32
  /** Where to open the linked document */
14
33
  target?: "_blank" | "_top";
15
- };
16
- export declare type AnchorWithIconProps = SimpleAnchorProps & {
34
+ }
35
+ export interface AnchorWithIconProps extends SimpleAnchorProps {
17
36
  /** Configuration of icon */
18
37
  icon: ElementIcon;
19
- };
38
+ }
20
39
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/anchor/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,IAAI,CAAC;AAEjC,oBAAY,iBAAiB,GAAG;IAC5B,uBAAuB;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,kBAAkB;IAClB,SAAS,EAAE,MAAM,CAAC;IAElB,oBAAoB;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB,oBAAoB;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,sBAAsB;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,wCAAwC;IACxC,MAAM,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;CAC9B,CAAC;AAEF,oBAAY,mBAAmB,GAAG,iBAAiB,GAAG;IAClD,4BAA4B;IAC5B,IAAI,EAAE,WAAW,CAAC;CACrB,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/anchor/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,IAAI,CAAC;AAEjC,kCAAkC;AAClC,MAAM,WAAW,WAAW;IACxB,uBAAuB;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,oBAAoB;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,oBAAoB;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB,kCAAkC;IAClC,IAAI,CAAC,EAAE,WAAW,CAAC;IAEnB,sBAAsB;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,wCAAwC;IACxC,MAAM,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;IAE3B,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,8CAA8C;IAC9C,eAAe,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,MAAM,WAAW,iBAAiB;IAC9B,uBAAuB;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,kBAAkB;IAClB,SAAS,EAAE,MAAM,CAAC;IAElB,oBAAoB;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB,oBAAoB;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,sBAAsB;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,wCAAwC;IACxC,MAAM,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,mBAAoB,SAAQ,iBAAiB;IAC1D,4BAA4B;IAC5B,IAAI,EAAE,WAAW,CAAC;CACrB"}
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import "./style.scss";
3
+ import { ButtonProps } from "../..";
4
+ /**
5
+ * Button component
6
+ * @throws Caption is not defined and icon configuration is not defined at the same time
7
+ */
8
+ export default function Button(props: ButtonProps): JSX.Element;
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/button/component/index.tsx"],"names":[],"mappings":";AAEA,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAE,WAAW,EAAe,MAAM,OAAO,CAAC;AAOjD;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAK,EAAE,WAAW,GAAG,GAAG,CAAC,OAAO,CA0C9D"}
@@ -0,0 +1,36 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { isNullOrEmpty, isNullOrUndefined, getClassName } from "@bodynarf/utils";
3
+ import "./style.scss";
4
+ import { mapDataAttributes } from "../../../utils";
5
+ import { ButtonWithIcon } from "../components/buttonWithIcon";
6
+ import { SimpleButton } from "../components/simpleButton";
7
+ /**
8
+ * Button component
9
+ * @throws Caption is not defined and icon configuration is not defined at the same time
10
+ */
11
+ export default function Button(props) {
12
+ if (isNullOrEmpty(props.caption) && isNullOrUndefined(props.icon)) {
13
+ throw new Error("No button content provided.");
14
+ }
15
+ const className = getClassName([
16
+ "button",
17
+ "bbr-button",
18
+ props.className,
19
+ `is-${props.type}`,
20
+ props.light === true ? "is-light" : "",
21
+ !isNullOrUndefined(props.size) ? `is-${props.size}` : "",
22
+ props.outlined === true ? "is-outlined" : "",
23
+ props.rounded === true ? "is-rounded" : "",
24
+ props.isLoading === true ? "is-loading" : "",
25
+ props.static === true ? "is-static" : "",
26
+ ]);
27
+ const data = isNullOrUndefined(props.data)
28
+ ? undefined
29
+ : mapDataAttributes(props.data);
30
+ if (!isNullOrUndefined(props.icon)) {
31
+ return (_jsx(ButtonWithIcon, { ...props, className: className, onClick: props.onClick, icon: props.icon, data: data }));
32
+ }
33
+ else {
34
+ return (_jsx(SimpleButton, { ...props, className: className, onClick: props.onClick, data: data }));
35
+ }
36
+ }
@@ -1,12 +1,12 @@
1
- .bbr-button {
2
- transition: 0.15s ease-in-out;
3
- transition-property: background-color, border-color;
4
-
5
- &--icon-only {
6
- padding: 0.55rem !important;
7
- }
8
-
9
- &.is-warning.is-outlined:not([disabled]):hover {
10
- color: #000 !important;
11
- }
12
- }
1
+ .bbr-button {
2
+ transition: 0.15s ease-in-out;
3
+ transition-property: background-color, border-color;
4
+
5
+ &--icon-only {
6
+ padding: 0.55rem !important;
7
+ }
8
+
9
+ &.is-warning.is-outlined:not([disabled]):hover {
10
+ color: #000 !important;
11
+ }
12
+ }
@@ -1,34 +1,3 @@
1
- /// <reference types="react" />
2
- import "./button.scss";
3
- import { BaseElementProps, ElementIcon, ElementSize } from "..";
4
- import { ButtonType } from "./types";
5
- export interface ButtonProps extends BaseElementProps {
6
- /** Button displaying text */
7
- caption?: string;
8
- /** Type of button (color) */
9
- type: ButtonType;
10
- /** Configuration of inner icon */
11
- icon?: ElementIcon;
12
- /** Button size */
13
- size?: ElementSize;
14
- /** Is button uses light version of color */
15
- light?: boolean;
16
- /** Is button outlined */
17
- outlined?: boolean;
18
- /** Should button corners be rounded */
19
- rounded?: boolean;
20
- /** Display loading icon */
21
- isLoading?: boolean;
22
- /** Is button disabled */
23
- disabled?: boolean;
24
- /** Is non-interactive button */
25
- static?: boolean;
26
- /** Click action handler */
27
- onClick?: () => void;
28
- }
29
- /**
30
- * Button component
31
- * @throws Caption is not defined and icon configuration is not defined at the same time
32
- */
33
- export default function Button(props: ButtonProps): JSX.Element;
1
+ export { default } from "./component";
2
+ export * from "./types";
34
3
  //# sourceMappingURL=index.d.ts.map
@@ -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,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
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,cAAc,SAAS,CAAC"}
@@ -1,37 +1,2 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { isNullOrEmpty, isNullOrUndefined, getClassName } from "@bodynarf/utils";
3
- import "./button.scss";
4
- import { mapDataAttributes } from "../../utils";
5
- import { ButtonWithIcon } from "./components/buttonWithIcon";
6
- import { SimpleButton } from "./components/simpleButton";
7
- ;
8
- /**
9
- * Button component
10
- * @throws Caption is not defined and icon configuration is not defined at the same time
11
- */
12
- export default function Button(props) {
13
- if (isNullOrEmpty(props.caption) && isNullOrUndefined(props.icon)) {
14
- throw new Error("No button content provided.");
15
- }
16
- const className = getClassName([
17
- "button",
18
- "bbr-button",
19
- props.className,
20
- `is-${props.type}`,
21
- props.light === true ? "is-light" : "",
22
- !isNullOrUndefined(props.size) ? `is-${props.size}` : "",
23
- props.outlined === true ? "is-outlined" : "",
24
- props.rounded === true ? "is-rounded" : "",
25
- props.isLoading === true ? "is-loading" : "",
26
- props.static === true ? "is-static" : "",
27
- ]);
28
- const data = isNullOrUndefined(props.data)
29
- ? undefined
30
- : mapDataAttributes(props.data);
31
- if (!isNullOrUndefined(props.icon)) {
32
- return (_jsx(ButtonWithIcon, { ...props, className: className, onClick: props.onClick, icon: props.icon, data: data }));
33
- }
34
- else {
35
- return (_jsx(SimpleButton, { ...props, className: className, onClick: props.onClick, data: data }));
36
- }
37
- }
1
+ export { default } from "./component";
2
+ export * from "./types";
@@ -1,5 +1,28 @@
1
- import { ButtonProps } from ".";
2
- import { ElementIcon } from "../types";
1
+ import { BaseElementProps, ElementIcon, ElementSize } from "../types";
2
+ export interface ButtonProps extends BaseElementProps {
3
+ /** Button displaying text */
4
+ caption?: string;
5
+ /** Type of button (color) */
6
+ type: ButtonType;
7
+ /** Configuration of inner icon */
8
+ icon?: ElementIcon;
9
+ /** Button size */
10
+ size?: ElementSize;
11
+ /** Is button uses light version of color */
12
+ light?: boolean;
13
+ /** Is button outlined */
14
+ outlined?: boolean;
15
+ /** Should button corners be rounded */
16
+ rounded?: boolean;
17
+ /** Display loading icon */
18
+ isLoading?: boolean;
19
+ /** Is button disabled */
20
+ disabled?: boolean;
21
+ /** Is non-interactive button */
22
+ static?: boolean;
23
+ /** Click action handler */
24
+ onClick?: () => void;
25
+ }
3
26
  /** Button types according to Bulma framework */
4
27
  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 */;
5
28
  /** Simple button props type */
@@ -1 +1 @@
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
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/button/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEtE,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,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,3 +1,4 @@
1
1
  ;
2
2
  ;
3
+ ;
3
4
  export {};
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import "./style.scss";
3
+ import { DropdownProps } from "..";
4
+ /** Dropdown component */
5
+ declare const Dropdown: (props: DropdownProps) => JSX.Element;
6
+ export default Dropdown;
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/dropdown/component/index.tsx"],"names":[],"mappings":";AAEA,OAAO,cAAc,CAAC;AAKtB,OAAO,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AAEnC,yBAAyB;AACzB,QAAA,MAAM,QAAQ,UAAW,aAAa,KAAG,WAMxC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { isNullOrUndefined } from "@bodynarf/utils";
3
+ import "./style.scss";
4
+ import DropdownWithLabel from "../components/withLabel";
5
+ import DropdownCompact from "../components/compact";
6
+ /** Dropdown component */
7
+ const Dropdown = (props) => {
8
+ if (!isNullOrUndefined(props.label)) {
9
+ return _jsx(DropdownWithLabel, { ...props });
10
+ }
11
+ else {
12
+ return _jsx(DropdownCompact, { ...props });
13
+ }
14
+ };
15
+ export default Dropdown;
@@ -1,43 +1,3 @@
1
- /// <reference types="react" />
2
- import "./dropdown.scss";
3
- import { BaseElementProps } from "..";
4
- import { InputLabel, ValidationState } from "../primitives";
5
- import { SelectableItem } from "./types";
6
- export declare type DropdownProps = BaseElementProps & {
7
- /** Items which can be selected */
8
- items: Array<SelectableItem>;
9
- /** Input element placeholder */
10
- placeholder: string;
11
- /**
12
- * Action to update selected value, which stored outside
13
- */
14
- onSelect: (item?: SelectableItem) => void;
15
- /**
16
- * Selected value.
17
- * Must be stored outside
18
- */
19
- value?: SelectableItem;
20
- /** Hide dropdown list when its opened and user click outside */
21
- hideOnOuterClick: boolean;
22
- /** Can user deselect */
23
- deselectable?: boolean;
24
- /** Custom dropdown list max-height property */
25
- listMaxHeight?: string;
26
- /**
27
- * Should dropdown be compact
28
- * Will have width by maximum current selection item width
29
- */
30
- compact?: boolean;
31
- /**
32
- * Is element disabled
33
- */
34
- disabled?: boolean;
35
- /** Label configuration */
36
- label?: InputLabel;
37
- /** Current validation state */
38
- validationState?: ValidationState;
39
- };
40
- /** Dropdown component */
41
- declare const Dropdown: (props: DropdownProps) => JSX.Element;
42
- export default Dropdown;
1
+ export { default } from "./component";
2
+ export * from "./types";
43
3
  //# sourceMappingURL=index.d.ts.map
@@ -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.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,cAAc,SAAS,CAAC"}
@@ -1,15 +1,2 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { isNullOrUndefined } from "@bodynarf/utils";
3
- import "./dropdown.scss";
4
- import DropdownWithLabel from "./components/withLabel";
5
- import DropdownCompact from "./components/compact";
6
- /** Dropdown component */
7
- const Dropdown = (props) => {
8
- if (!isNullOrUndefined(props.label)) {
9
- return _jsx(DropdownWithLabel, { ...props });
10
- }
11
- else {
12
- return _jsx(DropdownCompact, { ...props });
13
- }
14
- };
15
- export default Dropdown;
1
+ export { default } from "./component";
2
+ export * from "./types";