@bigbluebutton/bbb-ui-components-react 0.5.0

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 (150) hide show
  1. package/LICENSE +165 -0
  2. package/README.md +141 -0
  3. package/dist/components/Accordion.js +1 -0
  4. package/dist/components/Button.js +1 -0
  5. package/dist/components/Checkbox.js +1 -0
  6. package/dist/components/Divider.js +1 -0
  7. package/dist/components/Hint.js +1 -0
  8. package/dist/components/Modal.js +1 -0
  9. package/dist/components/Navigation.js +1 -0
  10. package/dist/components/Search.js +1 -0
  11. package/dist/components/Select.js +1 -0
  12. package/dist/components/Spinner.js +1 -0
  13. package/dist/components/TextAreaInput.js +1 -0
  14. package/dist/components/TextInput.js +1 -0
  15. package/dist/components/Toggle.js +1 -0
  16. package/dist/components/Typography.js +1 -0
  17. package/dist/components/index.js +1 -0
  18. package/dist/esm/components/Accordion/component.js +29 -0
  19. package/dist/esm/components/Accordion/constants.js +9 -0
  20. package/dist/esm/components/Accordion/index.js +1 -0
  21. package/dist/esm/components/Accordion/styles.js +20 -0
  22. package/dist/esm/components/Accordion/types.js +2 -0
  23. package/dist/esm/components/Button/component.js +73 -0
  24. package/dist/esm/components/Button/constants.js +174 -0
  25. package/dist/esm/components/Button/index.js +1 -0
  26. package/dist/esm/components/Button/styles.js +60 -0
  27. package/dist/esm/components/Button/type.js +1 -0
  28. package/dist/esm/components/Checkbox/component.js +47 -0
  29. package/dist/esm/components/Checkbox/constants.js +6 -0
  30. package/dist/esm/components/Checkbox/index.js +1 -0
  31. package/dist/esm/components/Checkbox/styles.js +13 -0
  32. package/dist/esm/components/Checkbox/types.js +1 -0
  33. package/dist/esm/components/Divider/component.js +12 -0
  34. package/dist/esm/components/Divider/index.js +1 -0
  35. package/dist/esm/components/Divider/styles.js +8 -0
  36. package/dist/esm/components/Hint/component.js +48 -0
  37. package/dist/esm/components/Hint/constants.js +6 -0
  38. package/dist/esm/components/Hint/index.js +1 -0
  39. package/dist/esm/components/Hint/styles.js +16 -0
  40. package/dist/esm/components/Hint/types.js +1 -0
  41. package/dist/esm/components/Modal/component.js +56 -0
  42. package/dist/esm/components/Modal/index.js +1 -0
  43. package/dist/esm/components/Modal/styles.js +52 -0
  44. package/dist/esm/components/Modal/types.js +1 -0
  45. package/dist/esm/components/Navigation/component.js +20 -0
  46. package/dist/esm/components/Navigation/index.js +1 -0
  47. package/dist/esm/components/Navigation/styles.js +14 -0
  48. package/dist/esm/components/Navigation/types.js +1 -0
  49. package/dist/esm/components/Search/component.js +75 -0
  50. package/dist/esm/components/Search/index.js +1 -0
  51. package/dist/esm/components/Search/styles.js +17 -0
  52. package/dist/esm/components/Search/types.js +1 -0
  53. package/dist/esm/components/Select/component.js +44 -0
  54. package/dist/esm/components/Select/index.js +1 -0
  55. package/dist/esm/components/Select/styles.js +15 -0
  56. package/dist/esm/components/Select/types.js +1 -0
  57. package/dist/esm/components/Spinner/component.js +15 -0
  58. package/dist/esm/components/Spinner/index.js +1 -0
  59. package/dist/esm/components/Spinner/styles.js +30 -0
  60. package/dist/esm/components/Spinner/types.js +1 -0
  61. package/dist/esm/components/TextAreaInput/component.js +50 -0
  62. package/dist/esm/components/TextAreaInput/index.js +1 -0
  63. package/dist/esm/components/TextAreaInput/styles.js +9 -0
  64. package/dist/esm/components/TextAreaInput/types.js +2 -0
  65. package/dist/esm/components/TextInput/component.js +39 -0
  66. package/dist/esm/components/TextInput/index.js +1 -0
  67. package/dist/esm/components/TextInput/styles.js +20 -0
  68. package/dist/esm/components/TextInput/types.js +1 -0
  69. package/dist/esm/components/Toggle/component.js +46 -0
  70. package/dist/esm/components/Toggle/constants.js +8 -0
  71. package/dist/esm/components/Toggle/index.js +1 -0
  72. package/dist/esm/components/Toggle/styles.js +91 -0
  73. package/dist/esm/components/Toggle/types.js +2 -0
  74. package/dist/esm/components/Typography/component.js +36 -0
  75. package/dist/esm/components/Typography/constants.js +8 -0
  76. package/dist/esm/components/Typography/index.js +1 -0
  77. package/dist/esm/components/Typography/styles.js +20 -0
  78. package/dist/esm/components/Typography/types.js +1 -0
  79. package/dist/esm/components/index.js +14 -0
  80. package/dist/esm/index.js +3 -0
  81. package/dist/esm/stylesheets/pallete.js +46 -0
  82. package/dist/esm/stylesheets/sizing.js +12 -0
  83. package/dist/esm/stylesheets/typography.js +8 -0
  84. package/dist/types/components/Accordion/component.d.ts +12 -0
  85. package/dist/types/components/Accordion/constants.d.ts +9 -0
  86. package/dist/types/components/Accordion/index.d.ts +1 -0
  87. package/dist/types/components/Accordion/styles.d.ts +6 -0
  88. package/dist/types/components/Accordion/types.d.ts +21 -0
  89. package/dist/types/components/Button/component.d.ts +13 -0
  90. package/dist/types/components/Button/constants.d.ts +41 -0
  91. package/dist/types/components/Button/index.d.ts +1 -0
  92. package/dist/types/components/Button/styles.d.ts +7 -0
  93. package/dist/types/components/Button/type.d.ts +80 -0
  94. package/dist/types/components/Checkbox/component.d.ts +12 -0
  95. package/dist/types/components/Checkbox/constants.d.ts +6 -0
  96. package/dist/types/components/Checkbox/index.d.ts +1 -0
  97. package/dist/types/components/Checkbox/styles.d.ts +4 -0
  98. package/dist/types/components/Checkbox/types.d.ts +10 -0
  99. package/dist/types/components/Divider/component.d.ts +9 -0
  100. package/dist/types/components/Divider/index.d.ts +1 -0
  101. package/dist/types/components/Divider/styles.d.ts +1 -0
  102. package/dist/types/components/Hint/component.d.ts +11 -0
  103. package/dist/types/components/Hint/constants.d.ts +6 -0
  104. package/dist/types/components/Hint/index.d.ts +1 -0
  105. package/dist/types/components/Hint/styles.d.ts +7 -0
  106. package/dist/types/components/Hint/types.d.ts +7 -0
  107. package/dist/types/components/Modal/component.d.ts +11 -0
  108. package/dist/types/components/Modal/index.d.ts +1 -0
  109. package/dist/types/components/Modal/styles.d.ts +9 -0
  110. package/dist/types/components/Modal/types.d.ts +21 -0
  111. package/dist/types/components/Navigation/component.d.ts +9 -0
  112. package/dist/types/components/Navigation/index.d.ts +1 -0
  113. package/dist/types/components/Navigation/styles.d.ts +4 -0
  114. package/dist/types/components/Navigation/types.d.ts +15 -0
  115. package/dist/types/components/Search/component.d.ts +8 -0
  116. package/dist/types/components/Search/index.d.ts +1 -0
  117. package/dist/types/components/Search/styles.d.ts +9 -0
  118. package/dist/types/components/Search/types.d.ts +42 -0
  119. package/dist/types/components/Select/component.d.ts +11 -0
  120. package/dist/types/components/Select/index.d.ts +1 -0
  121. package/dist/types/components/Select/styles.d.ts +7 -0
  122. package/dist/types/components/Select/types.d.ts +8 -0
  123. package/dist/types/components/Spinner/component.d.ts +10 -0
  124. package/dist/types/components/Spinner/index.d.ts +1 -0
  125. package/dist/types/components/Spinner/styles.d.ts +4 -0
  126. package/dist/types/components/Spinner/types.d.ts +15 -0
  127. package/dist/types/components/TextAreaInput/component.d.ts +11 -0
  128. package/dist/types/components/TextAreaInput/index.d.ts +1 -0
  129. package/dist/types/components/TextAreaInput/styles.d.ts +1 -0
  130. package/dist/types/components/TextAreaInput/types.d.ts +10 -0
  131. package/dist/types/components/TextInput/component.d.ts +11 -0
  132. package/dist/types/components/TextInput/index.d.ts +1 -0
  133. package/dist/types/components/TextInput/styles.d.ts +8 -0
  134. package/dist/types/components/TextInput/types.d.ts +9 -0
  135. package/dist/types/components/Toggle/component.d.ts +11 -0
  136. package/dist/types/components/Toggle/constants.d.ts +8 -0
  137. package/dist/types/components/Toggle/index.d.ts +1 -0
  138. package/dist/types/components/Toggle/styles.d.ts +7 -0
  139. package/dist/types/components/Toggle/types.d.ts +19 -0
  140. package/dist/types/components/Typography/component.d.ts +11 -0
  141. package/dist/types/components/Typography/constants.d.ts +1 -0
  142. package/dist/types/components/Typography/index.d.ts +1 -0
  143. package/dist/types/components/Typography/styles.d.ts +2 -0
  144. package/dist/types/components/Typography/types.d.ts +11 -0
  145. package/dist/types/components/index.d.ts +14 -0
  146. package/dist/types/index.d.ts +3 -0
  147. package/dist/types/stylesheets/pallete.d.ts +30 -0
  148. package/dist/types/stylesheets/sizing.d.ts +9 -0
  149. package/dist/types/stylesheets/typography.d.ts +7 -0
  150. package/package.json +290 -0
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import * as Styled from './styles';
3
+ /**
4
+ * A customizable spinner component.
5
+ *
6
+ * This component provides a small, configurable loading indicator for background activity or loading states.
7
+ *
8
+ */
9
+ var Spinner = function (_a) {
10
+ var _b = _a.size, size = _b === void 0 ? 48 : _b, _c = _a.strokeWidth, strokeWidth = _c === void 0 ? 4 : _c, _d = _a.animate, animate = _d === void 0 ? true : _d;
11
+ return (React.createElement(Styled.Wrapper, { "$size": size, role: "progressbar", "aria-label": "Loading", "aria-busy": animate },
12
+ React.createElement(Styled.StyledSvg, { viewBox: "0 0 50 50", "$animate": animate, focusable: "false", "aria-hidden": "true" },
13
+ React.createElement(Styled.Path, { className: "path", cx: "25", cy: "25", r: "20", "$animate": animate, "$strokeWidth": strokeWidth }))));
14
+ };
15
+ export default Spinner;
@@ -0,0 +1 @@
1
+ export { default as BBBSpinner } from './component';
@@ -0,0 +1,30 @@
1
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
+ return cooked;
4
+ };
5
+ import styled, { keyframes, css } from 'styled-components';
6
+ import { colorBrand1 } from '../../stylesheets/pallete';
7
+ var rotate = keyframes(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n"], ["\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n"])));
8
+ var dash = keyframes(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n 0% { stroke-dasharray: 1, 200; stroke-dashoffset: 0; }\n 50% { stroke-dasharray: 100, 200; stroke-dashoffset: -15; }\n 100% { stroke-dasharray: 100, 200; stroke-dashoffset: -125; }\n"], ["\n 0% { stroke-dasharray: 1, 200; stroke-dashoffset: 0; }\n 50% { stroke-dasharray: 100, 200; stroke-dashoffset: -15; }\n 100% { stroke-dasharray: 100, 200; stroke-dashoffset: -125; }\n"])));
9
+ export var Wrapper = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n width: ", ";\n height: ", ";\n display: inline-grid;\n place-items: center;\n"], ["\n width: ", ";\n height: ", ";\n display: inline-grid;\n place-items: center;\n"])), function (_a) {
10
+ var $size = _a.$size;
11
+ return typeof $size === 'number' ? "".concat($size, "px") : $size;
12
+ }, function (_a) {
13
+ var $size = _a.$size;
14
+ return typeof $size === 'number' ? "".concat($size, "px") : $size;
15
+ });
16
+ export var StyledSvg = styled.svg(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n width: 100%;\n height: 100%;\n transform-origin: center;\n overflow: visible;\n ", "\n"], ["\n width: 100%;\n height: 100%;\n transform-origin: center;\n overflow: visible;\n ", "\n"])), function (_a) {
17
+ var $animate = _a.$animate;
18
+ return $animate && css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n animation: ", " 1.4s linear infinite;\n "], ["\n animation: ", " 1.4s linear infinite;\n "])), rotate);
19
+ });
20
+ export var Path = styled.circle(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n fill: none;\n stroke: ", ";\n stroke-width: ", "px;\n stroke-linecap: round;\n ", "\n\n ", "\n"], ["\n fill: none;\n stroke: ", ";\n stroke-width: ", "px;\n stroke-linecap: round;\n ", "\n\n ", "\n"])), colorBrand1, function (_a) {
21
+ var $strokeWidth = _a.$strokeWidth;
22
+ return $strokeWidth;
23
+ }, function (_a) {
24
+ var $animate = _a.$animate;
25
+ return $animate && css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n animation: ", " 1.4s ease-in-out infinite;\n "], ["\n animation: ", " 1.4s ease-in-out infinite;\n "])), dash);
26
+ }, function (_a) {
27
+ var $animate = _a.$animate;
28
+ return !$animate && css(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n stroke-dasharray: 94.2 31.4;\n stroke-dashoffset: 0;\n "], ["\n stroke-dasharray: 94.2 31.4;\n stroke-dashoffset: 0;\n "])));
29
+ });
30
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,50 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
23
+ import React, { useRef, useEffect } from 'react';
24
+ import * as Styled from './styles';
25
+ /**
26
+ * A customizable text area input component.
27
+ *
28
+ * This component provides a styled, multi-line text input field that automatically
29
+ * focuses on render and supports all standard textarea attributes.
30
+ *
31
+ */
32
+ function TextAreaInput(_a) {
33
+ var _b = _a.placeholder, placeholder = _b === void 0 ? '' : _b, _c = _a.rows, rows = _c === void 0 ? 1 : _c, _d = _a.maxLength, maxLength = _d === void 0 ? 250 : _d, _e = _a.autoFocus, autoFocus = _e === void 0 ? true : _e, _f = _a.inputRef, inputRef = _f === void 0 ? undefined : _f, onChange = _a.onChange, onKeyDown = _a.onKeyDown, props = __rest(_a, ["placeholder", "rows", "maxLength", "autoFocus", "inputRef", "onChange", "onKeyDown"]);
34
+ var internalRef = useRef(null);
35
+ useEffect(function () {
36
+ if (autoFocus && internalRef.current) {
37
+ internalRef.current.focus();
38
+ }
39
+ }, [autoFocus]);
40
+ return (React.createElement(Styled.TextAreaInput, __assign({}, props, { rows: rows, maxLength: maxLength, ref: function (ref) {
41
+ internalRef.current = ref;
42
+ if (typeof inputRef === 'function') {
43
+ inputRef(ref);
44
+ }
45
+ else if (inputRef && 'current' in inputRef) {
46
+ inputRef.current = ref;
47
+ }
48
+ }, placeholder: placeholder, onChange: onChange, onKeyDown: onKeyDown })));
49
+ }
50
+ export default TextAreaInput;
@@ -0,0 +1 @@
1
+ export { default as BBBTextAreaInput } from './component';
@@ -0,0 +1,9 @@
1
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
+ return cooked;
4
+ };
5
+ import styled from 'styled-components';
6
+ import { colorBorderDefault, colorBrand1, colorBrand2, colorLightGray, colorWhite } from '../../stylesheets/pallete';
7
+ import { borderRadiusDefault } from '../../stylesheets/sizing';
8
+ export var TextAreaInput = styled.textarea(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n flex: 1;\n background: ", ";\n background-clip: padding-box;\n margin: 0;\n color: ", ";\n padding: calc(.3rem* 2.5) calc(.75rem* 1.25);\n resize: none;\n -webkit-transition: none;\n transition: none;\n border-radius: ", ";\n font-size: 1rem;\n line-height: 1;\n min-height: 2.5rem;\n max-height: 10rem;\n border: 1px solid ", ";\n overflow-y: hidden;\n margin: 0.3em;\n &:focus {\n outline: ", " solid 2px;\n box-shadow: 0 0 0 2px ", " inset 0 0 0 1px ", ";\n }\n"], ["\n flex: 1;\n background: ", ";\n background-clip: padding-box;\n margin: 0;\n color: ", ";\n padding: calc(.3rem* 2.5) calc(.75rem* 1.25);\n resize: none;\n -webkit-transition: none;\n transition: none;\n border-radius: ", ";\n font-size: 1rem;\n line-height: 1;\n min-height: 2.5rem;\n max-height: 10rem;\n border: 1px solid ", ";\n overflow-y: hidden;\n margin: 0.3em;\n &:focus {\n outline: ", " solid 2px;\n box-shadow: 0 0 0 2px ", " inset 0 0 0 1px ", ";\n }\n"])), colorWhite, colorLightGray, borderRadiusDefault, colorBorderDefault, colorBrand1, colorBrand2, colorBrand1);
9
+ var templateObject_1;
@@ -0,0 +1,2 @@
1
+ ;
2
+ export {};
@@ -0,0 +1,39 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
23
+ import React from 'react';
24
+ import * as Styled from './styles';
25
+ /**
26
+ * A customizable text input component.
27
+ *
28
+ * This component provides a styled, single-line text input field that supports
29
+ * icons, custom validation, and all standard input attributes.
30
+ *
31
+ */
32
+ function TextInput(_a) {
33
+ var label = _a.label, helperText = _a.helperText, error = _a.error, placeholder = _a.placeholder, props = __rest(_a, ["label", "helperText", "error", "placeholder"]);
34
+ return (React.createElement(Styled.Container, null,
35
+ label && React.createElement(Styled.Label, null, label),
36
+ React.createElement(Styled.StyledTextField, __assign({}, props, { "$error": error, placeholder: placeholder })),
37
+ helperText && React.createElement(Styled.HelperText, { "$error": error }, helperText)));
38
+ }
39
+ export default TextInput;
@@ -0,0 +1 @@
1
+ export { default as BBBTextInput } from './component';
@@ -0,0 +1,20 @@
1
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
+ return cooked;
4
+ };
5
+ import styled, { css } from 'styled-components';
6
+ import { TextField } from '@mui/material';
7
+ import { colorBorderDefault, colorBorderSelected, colorTextDefault, colorTextLight, colorBorderError, colorError, } from '../../stylesheets/pallete';
8
+ import { fontSizeSmall } from '../../stylesheets/typography';
9
+ import { borderRadiusDefault, spacingMedium, spacingSmall } from '../../stylesheets/sizing';
10
+ export var StyledTextField = styled(TextField)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n .MuiInputBase-root {\n display: flex;\n padding: ", ";\n align-items: center;\n gap: ", ";\n align-self: stretch;\n border-radius: ", ";\n border: 1px solid ", ";\n color: ", ";\n\n &.Mui-focused {\n border-color: ", ";\n color: ", ";\n }\n \n ", "\n }\n\n .MuiInputBase-input {\n padding: 0;\n height: auto;\n }\n\n .MuiOutlinedInput-notchedOutline {\n border: none;\n }\n"], ["\n .MuiInputBase-root {\n display: flex;\n padding: ", ";\n align-items: center;\n gap: ", ";\n align-self: stretch;\n border-radius: ", ";\n border: 1px solid ", ";\n color: ", ";\n\n &.Mui-focused {\n border-color: ", ";\n color: ", ";\n }\n \n ", "\n }\n\n .MuiInputBase-input {\n padding: 0;\n height: auto;\n }\n\n .MuiOutlinedInput-notchedOutline {\n border: none;\n }\n"])), spacingMedium, spacingSmall, borderRadiusDefault, colorBorderDefault, colorTextLight, colorBorderSelected, colorTextDefault, function (_a) {
11
+ var $error = _a.$error;
12
+ return $error && css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border-color: ", ";\n "], ["\n border-color: ", ";\n "])), colorBorderError);
13
+ });
14
+ export var Label = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n color: ", ";\n font-size: ", ";\n font-style: normal;\n font-weight: 400;\n line-height: normal;\n"], ["\n color: ", ";\n font-size: ", ";\n font-style: normal;\n font-weight: 400;\n line-height: normal;\n"])), colorTextDefault, fontSizeSmall);
15
+ export var HelperText = styled.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n color: ", ";\n font-size: ", ";\n font-style: normal;\n font-weight: 400;\n line-height: normal;\n padding: 0 ", "; \n\n ", "\n"], ["\n color: ", ";\n font-size: ", ";\n font-style: normal;\n font-weight: 400;\n line-height: normal;\n padding: 0 ", "; \n\n ", "\n"])), colorTextDefault, fontSizeSmall, spacingMedium, function (_a) {
16
+ var $error = _a.$error;
17
+ return $error && css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n color: ", ";\n "], ["\n color: ", ";\n "])), colorError);
18
+ });
19
+ export var Container = styled.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n width: 100%;\n gap: ", ";\n"], ["\n display: flex;\n flex-direction: column;\n width: 100%;\n gap: ", ";\n"])), spacingSmall);
20
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,46 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
23
+ import React, { useId } from 'react';
24
+ import * as Styled from './styles';
25
+ import { DEFAULT_TEXT_POSITION } from './constants';
26
+ /**
27
+ * A customizable Toggle switch component.
28
+ *
29
+ * This component provides a flexible toggle switch that can be used for binary state changes.
30
+ * It supports labels (label and helperText) and various textPosition configurations.
31
+ *
32
+ */
33
+ function Toggle(_a) {
34
+ var label = _a.label, helperText = _a.helperText, _b = _a.textPosition, textPosition = _b === void 0 ? DEFAULT_TEXT_POSITION : _b, onChange = _a.onChange, ariaLabel = _a.ariaLabel, ariaLabelledBy = _a.ariaLabelledBy, ariaDescribedBy = _a.ariaDescribedBy, providedId = _a.id, rest = __rest(_a, ["label", "helperText", "textPosition", "onChange", "ariaLabel", "ariaLabelledBy", "ariaDescribedBy", "id"]);
35
+ var generatedUniqueId = useId();
36
+ var id = providedId !== null && providedId !== void 0 ? providedId : generatedUniqueId;
37
+ var labelId = label ? "".concat(id, "-label") : undefined;
38
+ var helperTextId = helperText ? "".concat(id, "-helper") : undefined;
39
+ return (React.createElement(Styled.ToggleWrapper, { "$textPosition": textPosition },
40
+ (label || helperText) && (React.createElement(Styled.TextWrapper, { "$textPosition": textPosition, htmlFor: id, "$hasLabel": !!label, "$hasHelperText": !!helperText },
41
+ label && React.createElement(Styled.Title, { id: labelId }, label),
42
+ helperText && React.createElement(Styled.HelperText, { id: helperTextId }, helperText))),
43
+ React.createElement(Styled.ToggleSwitchWrapper, null,
44
+ React.createElement(Styled.MaterialToggle, __assign({}, rest, { id: id, onChange: onChange, "aria-label": ariaLabel, "aria-labelledby": ariaLabel ? undefined : ariaLabelledBy || labelId, "aria-describedby": ariaDescribedBy || helperTextId })))));
45
+ }
46
+ export default Toggle;
@@ -0,0 +1,8 @@
1
+ export var TEXT_POSITIONS = {
2
+ RIGHT: 'right',
3
+ LEFT: 'left',
4
+ TOP: 'top',
5
+ BOTTOM: 'bottom',
6
+ };
7
+ export var TEXT_POSITIONS_VALUES = Object.values(TEXT_POSITIONS);
8
+ export var DEFAULT_TEXT_POSITION = TEXT_POSITIONS_VALUES[0];
@@ -0,0 +1 @@
1
+ export { default as BBBToggle } from './component';
@@ -0,0 +1,91 @@
1
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
+ return cooked;
4
+ };
5
+ var __assign = (this && this.__assign) || function () {
6
+ __assign = Object.assign || function(t) {
7
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
8
+ s = arguments[i];
9
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
10
+ t[p] = s[p];
11
+ }
12
+ return t;
13
+ };
14
+ return __assign.apply(this, arguments);
15
+ };
16
+ import { Switch } from '@mui/material';
17
+ import { styled as materialStyled } from '@mui/material/styles';
18
+ import styled, { css } from 'styled-components';
19
+ import { colorBrand1, colorIconDefault, colorTextDefault, colorTextLight, colorWhite } from '../../stylesheets/pallete';
20
+ import { TEXT_POSITIONS } from './constants';
21
+ import { fontSizeBig, fontSizeDefault } from '../../stylesheets/typography';
22
+ export var ToggleWrapper = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n display: flex;\n ", ";\n"], ["\n display: flex;\n ", ";\n"])), function (_a) {
23
+ var $textPosition = _a.$textPosition;
24
+ if ($textPosition === TEXT_POSITIONS.TOP || $textPosition === TEXT_POSITIONS.BOTTOM) {
25
+ return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n flex-direction: column;\n gap: .1rem;\n "], ["\n flex-direction: column;\n gap: .1rem;\n "])));
26
+ }
27
+ var horizontalStyles = css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n flex-direction: row;\n gap: 1rem;\n "], ["\n flex-direction: row;\n gap: 1rem;\n "])));
28
+ if ($textPosition === TEXT_POSITIONS.LEFT) {
29
+ return css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n ", "\n justify-content: end; \n "], ["\n ", "\n justify-content: end; \n "])), horizontalStyles);
30
+ }
31
+ return horizontalStyles;
32
+ });
33
+ export var ToggleSwitchWrapper = styled.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n align-items: start;\n justify-content: center;\n padding: 0.3rem 0px;\n"], ["\n display: flex;\n flex-direction: row;\n align-items: start;\n justify-content: center;\n padding: 0.3rem 0px;\n"])));
34
+ export var TextWrapper = styled.label(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n order: ", ";\n cursor: pointer;\n ", "\n ", ";\n"], ["\n display: flex;\n flex-direction: column;\n order: ", ";\n cursor: pointer;\n ", "\n ", ";\n"])), function (_a) {
35
+ var $textPosition = _a.$textPosition;
36
+ if ($textPosition === TEXT_POSITIONS.LEFT || $textPosition === TEXT_POSITIONS.TOP) {
37
+ return -1;
38
+ }
39
+ return 1;
40
+ }, function (_a) {
41
+ var $hasLabel = _a.$hasLabel, $hasHelperText = _a.$hasHelperText;
42
+ return (!$hasLabel || !$hasHelperText) && "justify-content: center;";
43
+ }, function (_a) {
44
+ var $textPosition = _a.$textPosition;
45
+ if ($textPosition === TEXT_POSITIONS.TOP || $textPosition === TEXT_POSITIONS.BOTTOM) {
46
+ return css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n align-items: center;\n "], ["\n align-items: center;\n "])));
47
+ }
48
+ if ($textPosition === TEXT_POSITIONS.LEFT)
49
+ return css(templateObject_7 || (templateObject_7 = __makeTemplateObject(["align-items: end;"], ["align-items: end;"])));
50
+ return css(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n align-items: start;\n "], ["\n align-items: start;\n "])));
51
+ });
52
+ export var Title = styled.span(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n color: ", ";\n font-size: ", ";\n font-style: normal;\n font-weight: 400;\n line-height: normal;\n"], ["\n color: ", ";\n font-size: ", ";\n font-style: normal;\n font-weight: 400;\n line-height: normal;\n"])), colorTextDefault, fontSizeBig);
53
+ export var HelperText = styled.span(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n color: ", ";\n font-size: ", ";\n font-style: normal;\n font-weight: 400;\n line-height: normal;\n"], ["\n color: ", ";\n font-size: ", ";\n font-style: normal;\n font-weight: 400;\n line-height: normal;\n"])), colorTextLight, fontSizeDefault);
54
+ export var MaterialToggle = materialStyled(Switch)(function (_a) {
55
+ var theme = _a.theme;
56
+ return ({
57
+ width: '2.3rem',
58
+ height: '1.2rem',
59
+ padding: 0,
60
+ display: 'flex',
61
+ '&:active': {
62
+ '& .MuiSwitch-switchBase.Mui-checked': {
63
+ transform: 'translateX(1.2rem)',
64
+ },
65
+ },
66
+ '& .MuiSwitch-switchBase': {
67
+ padding: '0.2rem',
68
+ '&.Mui-checked': {
69
+ transform: 'translateX(1.2rem)',
70
+ color: colorWhite,
71
+ '& + .MuiSwitch-track': __assign({ opacity: 1, backgroundColor: colorBrand1 }, theme.applyStyles('dark', {
72
+ backgroundColor: colorBrand1,
73
+ })),
74
+ },
75
+ },
76
+ '& .MuiSwitch-thumb': {
77
+ boxShadow: '0 2px 4px 0 rgb(0 35 11 / 20%)',
78
+ width: '0.6rem',
79
+ height: '0.6rem',
80
+ borderRadius: '0.5rem',
81
+ transition: theme.transitions.create(['width'], {
82
+ duration: 200,
83
+ }),
84
+ transform: 'translateY(1px)',
85
+ },
86
+ '& .MuiSwitch-track': __assign({ borderRadius: '0.6rem', opacity: 1, backgroundColor: colorIconDefault, boxSizing: 'border-box' }, theme.applyStyles('dark', {
87
+ backgroundColor: 'rgba(255,255,255,.35)',
88
+ })),
89
+ });
90
+ });
91
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11;
@@ -0,0 +1,2 @@
1
+ ;
2
+ export {};
@@ -0,0 +1,36 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
23
+ import React from 'react';
24
+ import { TypographyStyled } from './styles';
25
+ /**
26
+ * A typography component that standardizes text styles across the app.
27
+ *
28
+ * This component provides multiple semantic variants (header, default, label, helper)
29
+ * and allows overriding the rendered HTML element via the `as` prop.
30
+ *
31
+ */
32
+ var Typography = function (_a) {
33
+ var children = _a.children, _b = _a.variant, variant = _b === void 0 ? 'default' : _b, as = _a.as, props = __rest(_a, ["children", "variant", "as"]);
34
+ return (React.createElement(TypographyStyled, __assign({ as: as, "$variant": variant }, props), children));
35
+ };
36
+ export default Typography;
@@ -0,0 +1,8 @@
1
+ export var TYPOGRAPHY_VARIANTS = [
2
+ 'default',
3
+ 'selected',
4
+ 'text2',
5
+ 'text3',
6
+ 'header',
7
+ 'button',
8
+ ];
@@ -0,0 +1 @@
1
+ export { default as BBBTypography } from './component';
@@ -0,0 +1,20 @@
1
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
+ return cooked;
4
+ };
5
+ import styled, { css } from 'styled-components';
6
+ import { colorTextDefault, colorTextLight } from '../../stylesheets/pallete';
7
+ import { fontSizeDefault, fontSizeSmall, fontSizeXSmall, fontWeightDefault, fontWeightHard, fontWeightLight, } from '../../stylesheets/typography';
8
+ var variants = {
9
+ default: css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n color: ", ";\n font-size: ", ";\n font-style: normal;\n font-weight: ", ";\n line-height: normal;\n "], ["\n color: ", ";\n font-size: ", ";\n font-style: normal;\n font-weight: ", ";\n line-height: normal;\n "])), colorTextDefault, fontSizeDefault, fontWeightLight),
10
+ selected: css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n color: ", ";\n font-size: ", ";\n font-style: normal;\n font-weight: ", ";\n line-height: normal;\n "], ["\n color: ", ";\n font-size: ", ";\n font-style: normal;\n font-weight: ", ";\n line-height: normal;\n "])), colorTextDefault, fontSizeDefault, fontWeightHard),
11
+ text2: css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n color: ", ";\n font-size: ", ";\n font-style: normal;\n font-weight: ", ";\n line-height: normal;\n "], ["\n color: ", ";\n font-size: ", ";\n font-style: normal;\n font-weight: ", ";\n line-height: normal;\n "])), colorTextLight, fontSizeSmall, fontWeightLight),
12
+ text3: css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n color: ", ";\n font-size: ", ";\n font-style: normal;\n font-weight: ", ";\n line-height: normal;\n "], ["\n color: ", ";\n font-size: ", ";\n font-style: normal;\n font-weight: ", ";\n line-height: normal;\n "])), colorTextLight, fontSizeXSmall, fontWeightLight),
13
+ header: css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n color: ", ";\n font-size: ", ";\n font-style: normal;\n font-weight: ", ";\n line-height: normal;\n text-transform: uppercase;\n "], ["\n color: ", ";\n font-size: ", ";\n font-style: normal;\n font-weight: ", ";\n line-height: normal;\n text-transform: uppercase;\n "])), colorTextDefault, fontSizeDefault, fontWeightHard),
14
+ button: css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n color: ", ";\n font-size: ", ";\n font-style: normal;\n font-weight: ", ";\n line-height: normal;\n "], ["\n color: ", ";\n font-size: ", ";\n font-style: normal;\n font-weight: ", ";\n line-height: normal;\n "])), colorTextDefault, fontSizeDefault, fontWeightDefault),
15
+ };
16
+ export var TypographyStyled = styled.p(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n margin: 0;\n padding: 0;\n ", "\n"], ["\n margin: 0;\n padding: 0;\n ", "\n"])), function (_a) {
17
+ var $variant = _a.$variant;
18
+ return variants[$variant];
19
+ });
20
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,14 @@
1
+ export { BBBAccordion } from './Accordion';
2
+ export { BBButton } from './Button';
3
+ export { BBBCheckbox } from './Checkbox';
4
+ export { BBBDivider } from './Divider';
5
+ export { BBBHint } from './Hint';
6
+ export { BBBModal } from './Modal';
7
+ export { BBBNavigation } from './Navigation';
8
+ export { BBBSearch } from './Search';
9
+ export { BBBSelect } from './Select';
10
+ export { BBBSpinner } from './Spinner';
11
+ export { BBBTextAreaInput } from './TextAreaInput';
12
+ export { BBBTextInput } from './TextInput';
13
+ export { BBBToggle } from './Toggle';
14
+ export { BBBTypography } from './Typography';
@@ -0,0 +1,3 @@
1
+ export * from './components';
2
+ export * from './stylesheets/pallete';
3
+ export * from './stylesheets/sizing';
@@ -0,0 +1,46 @@
1
+ // Neutral colors
2
+ export var colorNeutral2 = 'var(--color-neutral-2, #717C91)';
3
+ export var colorNeutral3 = 'var(--color-neutral-3, #B0BDC9)';
4
+ export var colorNeutral4 = 'var(--color-neutral-4, #DCE4EC)';
5
+ export var colorWhite = 'var(--color-neutral-white, #FFFFFF)';
6
+ export var colorLightGray = 'var(--color-light-gray, #F4F6FA)';
7
+ export var colorGray = 'var(--color-gray, #4E5A66)';
8
+ export var colorDarkGray = 'var(--color-dark-gray, #393C48)';
9
+ // Brand colors
10
+ var colorBrand1_base = 'var(--color-brand-1, #1D65D4)';
11
+ var colorBrandLight_base = 'var(--color-brand-light, #E5EFFB)';
12
+ export var colorBrand1 = "var(--color-primary, ".concat(colorBrand1_base, ")");
13
+ export var colorBrand2 = "var(--color-brand-2, ".concat(colorBrand1_base, ")");
14
+ export var colorBrand3 = "var(--color-brand-3, ".concat(colorBrand1_base, ")");
15
+ // Mapped to core css vars
16
+ export var colorBrandLight = "var(--color-blue-aux, ".concat(colorBrandLight_base, ")");
17
+ export var colorBrandAux = "var(--color-brand-aux, ".concat(colorBrandLight_base, ")");
18
+ // Semantic colors
19
+ var colorError_base = 'var(--color-error, #D6232D)';
20
+ var colorErrorDark_base = 'var(--color-error-dark, #B91C25)';
21
+ export var colorSuccess = 'var(--color-success, #2DD36F)';
22
+ export var colorWarning = 'var(--color-warning, #F59240)';
23
+ // Mapped to core css vars
24
+ export var colorError = "var(--color-danger, ".concat(colorError_base, ")");
25
+ export var colorErrorDark = "var(--color-danger-dark, ".concat(colorErrorDark_base, ")");
26
+ // Background colors
27
+ export var colorBackgroundWhite = "var(--color-background-white, ".concat(colorWhite, ")");
28
+ export var colorBackgroundLight = "var(--color-background-light, ".concat(colorLightGray, ")");
29
+ export var colorBackgroundBlue = "var(--color-background-blue, ".concat(colorBrandLight_base, ")");
30
+ // Border colors
31
+ var colorBorderDefault_base = "var(--color-border-default, ".concat(colorNeutral3, ")");
32
+ export var colorBorderSelected = "var(--color-border-selected, ".concat(colorBrand1_base, ")");
33
+ export var colorBorderError = "var(--color-border-error, ".concat(colorError_base, ")");
34
+ // Mapped to core css vars
35
+ export var colorBorderDefault = "var(--default-border, ".concat(colorBorderDefault_base, ")");
36
+ // Text colors
37
+ export var colorTextDefault = "var(--color-text-default, ".concat(colorDarkGray, ")");
38
+ export var colorTextLight = "var(--color-text-light, ".concat(colorNeutral2, ")");
39
+ //Icon colors
40
+ export var colorIconDefault = "var(--color-icon-default, ".concat(colorNeutral2, ")");
41
+ export var colorIconBlue = "var(--color-icon-blue, ".concat(colorBrand1_base, ")");
42
+ export var colorIconWhite = "var(--color-icon-white, ".concat(colorWhite, ")");
43
+ //Hover colors
44
+ export var colorHoverDark = 'var(--color-hover-dark, #1E53AF)';
45
+ export var colorHoverLight = 'var(--color-hover-light, #D4E5FA)';
46
+ export var colorHoverNeutral = "var(--color-hover-neutral, ".concat(colorNeutral4, ")");
@@ -0,0 +1,12 @@
1
+ // Comments are based on default font-size being 16px
2
+ // Spacing
3
+ export var spacingXSmall = '0.25rem'; //4px
4
+ export var spacingSmall = '0.5rem'; // 8px
5
+ export var spacingSmallMedium = '0.75rem'; // 12px
6
+ export var spacingMedium = '1rem'; // 16px
7
+ export var spacingMediumLarge = '1.25rem'; // 20px
8
+ export var spacingLarge = '1.5rem'; // 24px
9
+ export var spacingXLarge = '2rem'; // 32px
10
+ // Border sizes
11
+ export var borderRadiusDefault = '1rem'; //16px
12
+ export var borderRadiusSmall = '0.5rem'; //8px
@@ -0,0 +1,8 @@
1
+ // Comments are based on default font-size being 16px
2
+ export var fontSizeXSmall = '0.75rem'; //12px
3
+ export var fontSizeSmall = '0.875rem'; //14px
4
+ export var fontSizeDefault = '1rem'; //16px
5
+ export var fontSizeBig = '1.125rem'; //18px
6
+ export var fontWeightHard = '700';
7
+ export var fontWeightDefault = '600';
8
+ export var fontWeightLight = '400';
@@ -0,0 +1,12 @@
1
+ import { JSX } from 'react';
2
+ import { AccordionProps } from './types';
3
+ import 'tippy.js/dist/tippy.css';
4
+ /**
5
+ * A customizable Accordion component that allows expanding and collapsing content.
6
+ *
7
+ * This component provides a clickable header to toggle the visibility of its children content
8
+ * with a smooth animation. It also supports an optional tooltip on the header.
9
+ *
10
+ */
11
+ declare function Accordion({ title, tooltipLabel, tooltipPlacement, ariaLabel, ariaLabelledBy, ariaDescribedBy, buttonHeader, children, }: AccordionProps): JSX.Element;
12
+ export default Accordion;
@@ -0,0 +1,9 @@
1
+ declare const TOOLTIP_PLACEMENTS: {
2
+ readonly TOP: "top";
3
+ readonly BOTTOM: "bottom";
4
+ readonly LEFT: "left";
5
+ readonly RIGHT: "right";
6
+ };
7
+ declare const TOOLTIP_PLACEMENT_VALUES: ("top" | "bottom" | "left" | "right")[];
8
+ declare const DEFAULT_TOOLTIP_PLACEMENT: "top";
9
+ export { TOOLTIP_PLACEMENTS, TOOLTIP_PLACEMENT_VALUES, DEFAULT_TOOLTIP_PLACEMENT, };
@@ -0,0 +1 @@
1
+ export { default as BBBAccordion } from './component';
@@ -0,0 +1,6 @@
1
+ import { StyledAccordionContent, StyledExpandIcon } from './types';
2
+ export declare const ExpandButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
3
+ export declare const ButtonContent: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
4
+ export declare const ExpandIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyledExpandIcon>> & string;
5
+ export declare const TitleText: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
6
+ export declare const AccordionContent: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyledAccordionContent>> & string;
@@ -0,0 +1,21 @@
1
+ import { TOOLTIP_PLACEMENT_VALUES } from './constants';
2
+ import * as React from 'react';
3
+ export interface StyledExpandIcon {
4
+ $expanded: boolean;
5
+ }
6
+ export interface StyledAccordionContent {
7
+ $expanded: boolean;
8
+ $scrollHeight: number;
9
+ }
10
+ type TooltipPlacementType = typeof TOOLTIP_PLACEMENT_VALUES[number];
11
+ export interface AccordionProps {
12
+ title: string;
13
+ tooltipLabel?: string;
14
+ tooltipPlacement?: TooltipPlacementType;
15
+ ariaLabel?: string;
16
+ ariaLabelledBy?: string;
17
+ ariaDescribedBy?: string;
18
+ buttonHeader?: React.ReactNode;
19
+ children?: React.ReactNode;
20
+ }
21
+ export {};
@@ -0,0 +1,13 @@
1
+ import { JSX } from 'react';
2
+ import { ButtonProps } from './type';
3
+ import 'tippy.js/dist/tippy.css';
4
+ /**
5
+ * A versatile Button component.
6
+ *
7
+ * This component provides a configurable button that can be rendered as a default inline
8
+ * button, a circular icon button, or a stacked button with an icon and label. It is designed
9
+ * to be highly customizable and accessible, integrating with Tippy.js for tooltips.
10
+ *
11
+ */
12
+ declare function Button(props: ButtonProps): JSX.Element;
13
+ export default Button;