@bigbluebutton/bbb-ui-components-react 0.5.0 → 0.6.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 (83) hide show
  1. package/README.md +11 -10
  2. package/dist/components/Accordion.js +53 -1
  3. package/dist/components/Button.js +144 -1
  4. package/dist/components/Checkbox.js +20 -1
  5. package/dist/components/Divider.js +9 -1
  6. package/dist/components/Hint.js +51 -1
  7. package/dist/components/Input.js +220 -0
  8. package/dist/components/Modal.js +222 -1
  9. package/dist/components/Navigation.js +74 -1
  10. package/dist/components/Search.js +130 -1
  11. package/dist/components/Select.js +46 -1
  12. package/dist/components/Spinner.js +34 -1
  13. package/dist/components/TextAreaInput.js +23 -1
  14. package/dist/components/TextInput.js +52 -1
  15. package/dist/components/Toggle.js +42 -1
  16. package/dist/components/Typography.js +42 -1
  17. package/dist/components/index.js +739 -1
  18. package/dist/esm/components/Accordion/component.js +6 -7
  19. package/dist/esm/components/Accordion/constants.js +3 -3
  20. package/dist/esm/components/Accordion/styles.js +58 -17
  21. package/dist/esm/components/Button/component.js +52 -35
  22. package/dist/esm/components/Button/constants.js +21 -20
  23. package/dist/esm/components/Button/styles.js +187 -45
  24. package/dist/esm/components/Checkbox/component.js +3 -14
  25. package/dist/esm/components/Checkbox/constants.js +3 -3
  26. package/dist/esm/components/Checkbox/styles.js +23 -9
  27. package/dist/esm/components/Divider/styles.js +10 -7
  28. package/dist/esm/components/Hint/component.js +3 -14
  29. package/dist/esm/components/Hint/constants.js +3 -3
  30. package/dist/esm/components/Hint/styles.js +58 -13
  31. package/dist/esm/components/Input/component.js +111 -0
  32. package/dist/esm/components/Input/index.js +1 -0
  33. package/dist/esm/components/Input/styles.js +89 -0
  34. package/dist/esm/components/Input/types.js +1 -0
  35. package/dist/esm/components/Modal/component.js +8 -19
  36. package/dist/esm/components/Modal/styles.js +41 -19
  37. package/dist/esm/components/Navigation/component.js +3 -4
  38. package/dist/esm/components/Navigation/styles.js +36 -12
  39. package/dist/esm/components/Search/component.js +16 -17
  40. package/dist/esm/components/Search/styles.js +103 -14
  41. package/dist/esm/components/Select/component.js +5 -16
  42. package/dist/esm/components/Select/styles.js +51 -11
  43. package/dist/esm/components/Spinner/component.js +1 -2
  44. package/dist/esm/components/Spinner/styles.js +39 -29
  45. package/dist/esm/components/TextAreaInput/component.js +4 -15
  46. package/dist/esm/components/TextAreaInput/styles.js +24 -7
  47. package/dist/esm/components/TextInput/component.js +2 -13
  48. package/dist/esm/components/TextInput/styles.js +58 -16
  49. package/dist/esm/components/Toggle/component.js +6 -17
  50. package/dist/esm/components/Toggle/constants.js +3 -3
  51. package/dist/esm/components/Toggle/styles.js +88 -72
  52. package/dist/esm/components/Typography/component.js +3 -14
  53. package/dist/esm/components/Typography/constants.js +1 -1
  54. package/dist/esm/components/Typography/styles.js +50 -17
  55. package/dist/esm/components/index.js +1 -0
  56. package/dist/esm/index.js +1 -1
  57. package/dist/esm/stylesheets/palette.js +49 -0
  58. package/dist/esm/stylesheets/sizing.js +9 -9
  59. package/dist/esm/stylesheets/typography.js +7 -7
  60. package/dist/types/components/Accordion/types.d.ts +8 -0
  61. package/dist/types/components/Button/constants.d.ts +3 -2
  62. package/dist/types/components/Button/styles.d.ts +1 -0
  63. package/dist/types/components/Button/type.d.ts +42 -1
  64. package/dist/types/components/Checkbox/types.d.ts +4 -0
  65. package/dist/types/components/Hint/types.d.ts +5 -0
  66. package/dist/types/components/Input/component.d.ts +12 -0
  67. package/dist/types/components/Input/index.d.ts +1 -0
  68. package/dist/types/components/Input/styles.d.ts +6 -0
  69. package/dist/types/components/Input/types.d.ts +69 -0
  70. package/dist/types/components/Modal/types.d.ts +11 -0
  71. package/dist/types/components/Navigation/types.d.ts +9 -0
  72. package/dist/types/components/Search/types.d.ts +6 -24
  73. package/dist/types/components/Select/types.d.ts +4 -0
  74. package/dist/types/components/Spinner/types.d.ts +3 -0
  75. package/dist/types/components/TextAreaInput/types.d.ts +7 -0
  76. package/dist/types/components/TextInput/types.d.ts +3 -0
  77. package/dist/types/components/Toggle/types.d.ts +6 -0
  78. package/dist/types/components/Typography/types.d.ts +3 -0
  79. package/dist/types/components/index.d.ts +1 -0
  80. package/dist/types/index.d.ts +1 -1
  81. package/dist/types/stylesheets/{pallete.d.ts → palette.d.ts} +9 -9
  82. package/package.json +15 -2
  83. package/dist/esm/stylesheets/pallete.js +0 -46
@@ -1,91 +1,107 @@
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
1
  import { Switch } from '@mui/material';
17
2
  import { styled as materialStyled } from '@mui/material/styles';
18
3
  import styled, { css } from 'styled-components';
19
- import { colorBrand1, colorIconDefault, colorTextDefault, colorTextLight, colorWhite } from '../../stylesheets/pallete';
4
+ import { colorBrand1, colorIconDefault, colorTextDefault, colorTextLight, colorWhite } from '../../stylesheets/palette';
20
5
  import { TEXT_POSITIONS } from './constants';
21
6
  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;
7
+ export const ToggleWrapper = styled.div `
8
+ display: flex;
9
+ ${({ $textPosition }) => {
24
10
  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 "])));
11
+ return css `
12
+ flex-direction: column;
13
+ gap: .1rem;
14
+ `;
26
15
  }
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 "])));
16
+ const horizontalStyles = css `
17
+ flex-direction: row;
18
+ gap: 1rem;
19
+ `;
28
20
  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);
21
+ return css `
22
+ ${horizontalStyles}
23
+ justify-content: end;
24
+ `;
30
25
  }
31
26
  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;
27
+ }};
28
+ `;
29
+ export const ToggleSwitchWrapper = styled.div `
30
+ display: flex;
31
+ flex-direction: row;
32
+ align-items: start;
33
+ justify-content: center;
34
+ padding: 0.3rem 0px;
35
+ `;
36
+ export const TextWrapper = styled.label `
37
+ display: flex;
38
+ flex-direction: column;
39
+ order: ${({ $textPosition }) => {
36
40
  if ($textPosition === TEXT_POSITIONS.LEFT || $textPosition === TEXT_POSITIONS.TOP) {
37
41
  return -1;
38
42
  }
39
43
  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;
44
+ }};
45
+ cursor: pointer;
46
+ ${({ $hasLabel, $hasHelperText }) => (!$hasLabel || !$hasHelperText) && `justify-content: center;`}
47
+ ${({ $textPosition }) => {
45
48
  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 "])));
49
+ return css `
50
+ align-items: center;
51
+ `;
47
52
  }
48
53
  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
- },
54
+ return css `align-items: end;`;
55
+ return css `
56
+ align-items: start;
57
+ `;
58
+ }};
59
+ `;
60
+ export const Title = styled.span `
61
+ color: ${colorTextDefault};
62
+ font-size: ${fontSizeBig};
63
+ font-style: normal;
64
+ font-weight: 400;
65
+ line-height: normal;
66
+ `;
67
+ export const HelperText = styled.span `
68
+ color: ${colorTextLight};
69
+ font-size: ${fontSizeDefault};
70
+ font-style: normal;
71
+ font-weight: 400;
72
+ line-height: normal;
73
+ `;
74
+ export const MaterialToggle = materialStyled(Switch)(({ theme }) => ({
75
+ width: '2.3rem',
76
+ height: '1.2rem',
77
+ padding: 0,
78
+ display: 'flex',
79
+ '&:active': {
80
+ '& .MuiSwitch-switchBase.Mui-checked': {
81
+ transform: 'translateX(1.2rem)',
65
82
  },
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
- },
83
+ },
84
+ '& .MuiSwitch-switchBase': {
85
+ padding: '0.2rem',
86
+ '&.Mui-checked': {
87
+ transform: 'translateX(1.2rem)',
88
+ color: colorWhite,
89
+ '& + .MuiSwitch-track': Object.assign({ opacity: 1, backgroundColor: colorBrand1 }, theme.applyStyles('dark', {
90
+ backgroundColor: colorBrand1,
91
+ })),
75
92
  },
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;
93
+ },
94
+ '& .MuiSwitch-thumb': {
95
+ boxShadow: '0 2px 4px 0 rgb(0 35 11 / 20%)',
96
+ width: '0.6rem',
97
+ height: '0.6rem',
98
+ borderRadius: '0.5rem',
99
+ transition: theme.transitions.create(['width'], {
100
+ duration: 200,
101
+ }),
102
+ transform: 'translateY(1px)',
103
+ },
104
+ '& .MuiSwitch-track': Object.assign({ borderRadius: '0.6rem', opacity: 1, backgroundColor: colorIconDefault, boxSizing: 'border-box' }, theme.applyStyles('dark', {
105
+ backgroundColor: 'rgba(255,255,255,.35)',
106
+ })),
107
+ }));
@@ -1,14 +1,3 @@
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
1
  var __rest = (this && this.__rest) || function (s, e) {
13
2
  var t = {};
14
3
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
@@ -29,8 +18,8 @@ import { TypographyStyled } from './styles';
29
18
  * and allows overriding the rendered HTML element via the `as` prop.
30
19
  *
31
20
  */
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));
21
+ const Typography = (_a) => {
22
+ var { children, variant = 'default', as } = _a, props = __rest(_a, ["children", "variant", "as"]);
23
+ return (React.createElement(TypographyStyled, Object.assign({ as: as, "$variant": variant }, props), children));
35
24
  };
36
25
  export default Typography;
@@ -1,4 +1,4 @@
1
- export var TYPOGRAPHY_VARIANTS = [
1
+ export const TYPOGRAPHY_VARIANTS = [
2
2
  'default',
3
3
  'selected',
4
4
  'text2',
@@ -1,20 +1,53 @@
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
1
  import styled, { css } from 'styled-components';
6
- import { colorTextDefault, colorTextLight } from '../../stylesheets/pallete';
2
+ import { colorTextDefault, colorTextLight } from '../../stylesheets/palette';
7
3
  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),
4
+ const variants = {
5
+ default: css `
6
+ color: ${colorTextDefault};
7
+ font-size: ${fontSizeDefault};
8
+ font-style: normal;
9
+ font-weight: ${fontWeightLight};
10
+ line-height: normal;
11
+ `,
12
+ selected: css `
13
+ color: ${colorTextDefault};
14
+ font-size: ${fontSizeDefault};
15
+ font-style: normal;
16
+ font-weight: ${fontWeightHard};
17
+ line-height: normal;
18
+ `,
19
+ text2: css `
20
+ color: ${colorTextLight};
21
+ font-size: ${fontSizeSmall};
22
+ font-style: normal;
23
+ font-weight: ${fontWeightLight};
24
+ line-height: normal;
25
+ `,
26
+ text3: css `
27
+ color: ${colorTextLight};
28
+ font-size: ${fontSizeXSmall};
29
+ font-style: normal;
30
+ font-weight: ${fontWeightLight};
31
+ line-height: normal;
32
+ `,
33
+ header: css `
34
+ color: ${colorTextDefault};
35
+ font-size: ${fontSizeDefault};
36
+ font-style: normal;
37
+ font-weight: ${fontWeightHard};
38
+ line-height: normal;
39
+ text-transform: uppercase;
40
+ `,
41
+ button: css `
42
+ color: ${colorTextDefault};
43
+ font-size: ${fontSizeDefault};
44
+ font-style: normal;
45
+ font-weight: ${fontWeightDefault};
46
+ line-height: normal;
47
+ `,
15
48
  };
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;
49
+ export const TypographyStyled = styled.p `
50
+ margin: 0;
51
+ padding: 0;
52
+ ${({ $variant }) => variants[$variant]}
53
+ `;
@@ -3,6 +3,7 @@ export { BBButton } from './Button';
3
3
  export { BBBCheckbox } from './Checkbox';
4
4
  export { BBBDivider } from './Divider';
5
5
  export { BBBHint } from './Hint';
6
+ export { BBBInput } from './Input';
6
7
  export { BBBModal } from './Modal';
7
8
  export { BBBNavigation } from './Navigation';
8
9
  export { BBBSearch } from './Search';
package/dist/esm/index.js CHANGED
@@ -1,3 +1,3 @@
1
1
  export * from './components';
2
- export * from './stylesheets/pallete';
2
+ export * from './stylesheets/palette';
3
3
  export * from './stylesheets/sizing';
@@ -0,0 +1,49 @@
1
+ // Neutral colors
2
+ export const colorNeutral2 = 'var(--color-neutral-2, #717C91)';
3
+ export const colorNeutral3 = 'var(--color-neutral-3, #B0BDC9)';
4
+ export const colorNeutral4 = 'var(--color-neutral-4, #DCE4EC)';
5
+ export const colorWhite = 'var(--color-neutral-white, #FFFFFF)';
6
+ export const colorLightGray = 'var(--color-light-gray, #F4F6FA)';
7
+ export const colorGray = 'var(--color-gray, #4E5A66)';
8
+ export const colorDarkGray = 'var(--color-dark-gray, #393C48)';
9
+ // Brand colors
10
+ // Last-resort fallbacks mirror bigbluebutton-html5's palette so that a client
11
+ // which doesn't override --color-primary renders library components with the
12
+ // same brand color as its own (non-library) components.
13
+ const colorBrand1_base = 'var(--color-brand-1, #0F70D7)';
14
+ const colorBrandLight_base = 'var(--color-brand-light, #E5EFFB)';
15
+ export const colorBrand1 = `var(--color-primary, ${colorBrand1_base})`;
16
+ export const colorBrand2 = `var(--color-brand-2, ${colorBrand1_base})`;
17
+ export const colorBrand3 = `var(--color-brand-3, ${colorBrand1_base})`;
18
+ // Mapped to core css vars
19
+ export const colorBrandLight = `var(--color-blue-aux, ${colorBrandLight_base})`;
20
+ export const colorBrandAux = `var(--color-brand-aux, ${colorBrandLight_base})`;
21
+ // Semantic colors
22
+ const colorError_base = 'var(--color-error, #DF2721)';
23
+ const colorErrorDark_base = 'var(--color-error-dark, #AE1010)';
24
+ export const colorSuccess = 'var(--color-success, #2DD36F)';
25
+ export const colorWarning = 'var(--color-warning, #F59240)';
26
+ // Mapped to core css vars
27
+ export const colorError = `var(--color-danger, ${colorError_base})`;
28
+ export const colorErrorDark = `var(--color-danger-dark, ${colorErrorDark_base})`;
29
+ // Background colors
30
+ export const colorBackgroundWhite = `var(--color-background-white, ${colorWhite})`;
31
+ export const colorBackgroundLight = `var(--color-background-light, ${colorLightGray})`;
32
+ export const colorBackgroundBlue = `var(--color-background-blue, ${colorBrandLight_base})`;
33
+ // Border colors
34
+ const colorBorderDefault_base = `var(--color-border-default, ${colorNeutral3})`;
35
+ export const colorBorderSelected = `var(--color-border-selected, ${colorBrand1_base})`;
36
+ export const colorBorderError = `var(--color-border-error, ${colorError_base})`;
37
+ // Mapped to core css vars
38
+ export const colorBorderDefault = `var(--default-border, ${colorBorderDefault_base})`;
39
+ // Text colors
40
+ export const colorTextDefault = `var(--color-text-default, ${colorDarkGray})`;
41
+ export const colorTextLight = `var(--color-text-light, ${colorNeutral2})`;
42
+ //Icon colors
43
+ export const colorIconDefault = `var(--color-icon-default, ${colorNeutral2})`;
44
+ export const colorIconBlue = `var(--color-icon-blue, ${colorBrand1_base})`;
45
+ export const colorIconWhite = `var(--color-icon-white, ${colorWhite})`;
46
+ //Hover colors
47
+ export const colorHoverDark = 'var(--color-hover-dark, #0C57A7)';
48
+ export const colorHoverLight = 'var(--color-hover-light, #D4E5FA)';
49
+ export const colorHoverNeutral = `var(--color-hover-neutral, ${colorNeutral4})`;
@@ -1,12 +1,12 @@
1
1
  // Comments are based on default font-size being 16px
2
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
3
+ export const spacingXSmall = '0.25rem'; //4px
4
+ export const spacingSmall = '0.5rem'; // 8px
5
+ export const spacingSmallMedium = '0.75rem'; // 12px
6
+ export const spacingMedium = '1rem'; // 16px
7
+ export const spacingMediumLarge = '1.25rem'; // 20px
8
+ export const spacingLarge = '1.5rem'; // 24px
9
+ export const spacingXLarge = '2rem'; // 32px
10
10
  // Border sizes
11
- export var borderRadiusDefault = '1rem'; //16px
12
- export var borderRadiusSmall = '0.5rem'; //8px
11
+ export const borderRadiusDefault = '1rem'; //16px
12
+ export const borderRadiusSmall = '0.5rem'; //8px
@@ -1,8 +1,8 @@
1
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';
2
+ export const fontSizeXSmall = '0.75rem'; //12px
3
+ export const fontSizeSmall = '0.875rem'; //14px
4
+ export const fontSizeDefault = '1rem'; //16px
5
+ export const fontSizeBig = '1.125rem'; //18px
6
+ export const fontWeightHard = '700';
7
+ export const fontWeightDefault = '600';
8
+ export const fontWeightLight = '400';
@@ -9,13 +9,21 @@ export interface StyledAccordionContent {
9
9
  }
10
10
  type TooltipPlacementType = typeof TOOLTIP_PLACEMENT_VALUES[number];
11
11
  export interface AccordionProps {
12
+ /** The text to be displayed in the accordion header. */
12
13
  title: string;
14
+ /** Optional label for a tooltip that appears when hovering the header; no tooltip is shown when omitted. */
13
15
  tooltipLabel?: string;
16
+ /** Placement of the tooltip when `tooltipLabel` is provided. @default 'top' */
14
17
  tooltipPlacement?: TooltipPlacementType;
18
+ /** Accessible name for the expand button. */
15
19
  ariaLabel?: string;
20
+ /** ID of the element that labels the expand button. */
16
21
  ariaLabelledBy?: string;
22
+ /** ID of the element that describes the expand button. */
17
23
  ariaDescribedBy?: string;
24
+ /** Optional React node rendered inside the button header, alongside the title. @default null */
18
25
  buttonHeader?: React.ReactNode;
26
+ /** Content shown when the accordion is expanded. */
19
27
  children?: React.ReactNode;
20
28
  }
21
29
  export {};
@@ -24,9 +24,10 @@ declare const LAYOUTS: {
24
24
  readonly DEFAULT: "default";
25
25
  readonly STACKED: "stacked";
26
26
  readonly CIRCLE: "circle";
27
+ readonly SQUARED: "squared";
27
28
  };
28
- declare const LAYOUT_VALUES: ("circle" | "default" | "stacked")[];
29
- declare const DEFAULT_LAYOUT: "circle" | "default" | "stacked";
29
+ declare const LAYOUT_VALUES: ("default" | "stacked" | "circle" | "squared")[];
30
+ declare const DEFAULT_LAYOUT: "default" | "stacked" | "circle" | "squared";
30
31
  declare const TOOLTIP_PLACEMENTS: {
31
32
  readonly TOP: "top";
32
33
  readonly BOTTOM: "bottom";
@@ -4,4 +4,5 @@ export declare const Button: import("styled-components/dist/types").IStyledCompo
4
4
  export declare const HelperIconContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyledHelperIconContainer>> & string;
5
5
  export declare const HelperIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
6
6
  export declare const IconWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
7
+ export declare const FeedbackContent: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
7
8
  export declare const ButtonText: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
@@ -44,37 +44,78 @@ export interface StyledButtonProps {
44
44
  disabled: boolean;
45
45
  }
46
46
  type BaseButtonProps = {
47
+ /** HTML `id` for the root element; auto-generated via `useId` when omitted, and used to derive the label's id and default `data-test` value. @default '' */
47
48
  id?: string;
49
+ /** Value for the `data-test` attribute, used for test selectors; falls back to an auto-generated id based on `id`/`label` when omitted. */
48
50
  dataTest?: string;
51
+ /** Text label for the button; rendered in layouts that display a label (e.g. `default`, `stacked`). */
49
52
  label?: string;
53
+ /** Text shown in a tooltip; the tooltip only renders when this is provided. */
50
54
  tooltipLabel?: string;
55
+ /** Placement of the tooltip relative to the button; only used when `tooltipLabel` is set. @default 'top' */
51
56
  tooltipPlacement?: TooltipPlacementType;
57
+ /** Click handler for the button's primary action (required); for the `stacked` layout this is distinct from `helperOnClick`. */
52
58
  onClick: React.MouseEventHandler<HTMLButtonElement>;
59
+ /** Keydown handler for the button element, for custom keyboard interactions. */
53
60
  onKeyDown?: React.KeyboardEventHandler<HTMLButtonElement>;
61
+ /** Id of the element that labels the button (`aria-labelledby`); when omitted, falls back to the id of the button's own rendered label element, if any. */
54
62
  ariaLabelledBy?: string;
63
+ /** Id of the element that describes the button, wired to `aria-describedby`, when provided. */
55
64
  ariaDescribedBy?: string;
65
+ /** Accessible name for the button (`aria-label`); falls back to `label` when not provided. */
56
66
  ariaLabel?: string;
67
+ /** Color theme for the button (affects background/border/text depending on `variant`). @default 'default' */
57
68
  color?: ColorType;
69
+ /** Visual variant controlling emphasis and background/border styling. @default 'primary' */
58
70
  variant?: VariantType;
71
+ /** Button size; affects padding and, for the `circle` layout, the overall diameter. @default 'md' */
59
72
  size?: SizeType;
73
+ /** Disables interaction and applies disabled styling. @default false */
60
74
  disabled?: boolean;
75
+ /** Additional content rendered inside the button, after the label (only used in the `default` layout). */
61
76
  children?: React.ReactNode;
77
+ /**
78
+ * When `true`, temporarily shows `feedbackContent` in place of the button's own
79
+ * label/icon for `feedbackDuration` after `onClick` fires.
80
+ * @default false
81
+ */
82
+ showFeedback?: boolean;
83
+ /** Content rendered while the click feedback is visible (e.g. a checkmark icon and "Copied"). @default <MdCheckCircle /> */
84
+ feedbackContent?: React.ReactNode;
85
+ /** How long, in milliseconds, the click feedback stays visible. @default 2000 */
86
+ feedbackDuration?: number;
62
87
  };
63
88
  type DefaultLayoutProps = BaseButtonProps & {
89
+ /** Layout mode for this variant — always `'default'`, the standard inline label/icon button; also the overall default. @default 'default' */
64
90
  layout?: typeof LAYOUTS.DEFAULT;
91
+ /** Icon rendered before the label (left side); effective when a label is present. */
65
92
  iconStart?: React.ReactNode;
93
+ /** Icon rendered after the label (right side); effective when a label is present. */
66
94
  iconEnd?: React.ReactNode;
67
95
  };
68
96
  type StackedLayoutProps = BaseButtonProps & {
97
+ /** Layout mode for this variant — must be `'stacked'`, rendering a main icon with a label underneath plus an optional helper icon. */
69
98
  layout: typeof LAYOUTS.STACKED;
99
+ /** Main icon for the button, shown above the label. */
70
100
  icon?: React.ReactNode;
101
+ /** Auxiliary icon for a secondary action, shown next to the main icon; clickable via `helperOnClick`. @default MdSettings icon */
71
102
  helperIcon?: React.ReactNode;
103
+ /** Hides the helper icon entirely when true. @default false */
72
104
  hideHelperIcon?: boolean;
105
+ /** Click handler for the helper icon, triggering a secondary action separate from `onClick`. @default null */
73
106
  helperOnClick?: React.MouseEventHandler<HTMLDivElement>;
74
107
  };
75
108
  type CircleLayoutProps = BaseButtonProps & {
109
+ /** Layout mode for this variant — must be `'circle'`, rendering an icon-only circular button. */
76
110
  layout: typeof LAYOUTS.CIRCLE;
111
+ /** Icon rendered inside the circular button (no label is shown in this layout). */
77
112
  icon?: React.ReactNode;
78
113
  };
79
- export type ButtonProps = DefaultLayoutProps | StackedLayoutProps | CircleLayoutProps;
114
+ type SquaredLayoutProps = BaseButtonProps & {
115
+ /** Layout mode for this variant — must be `'squared'`, rendering an icon-only square button. */
116
+ layout: typeof LAYOUTS.SQUARED;
117
+ /** Icon rendered inside the square button (no label is shown in this layout). */
118
+ icon?: React.ReactNode;
119
+ };
120
+ export type ButtonProps = DefaultLayoutProps | StackedLayoutProps | CircleLayoutProps | SquaredLayoutProps;
80
121
  export {};
@@ -2,9 +2,13 @@ import { CheckboxProps as MuiCheckboxProps } from '@mui/material';
2
2
  import { LAYOUTS } from './constants';
3
3
  type Layout = typeof LAYOUTS[keyof typeof LAYOUTS];
4
4
  export interface CheckboxProps extends MuiCheckboxProps {
5
+ /** Text label displayed next to the checkbox. */
5
6
  label?: string;
7
+ /** Position of the label relative to the checkbox. @default 'right' */
6
8
  layout?: Layout;
9
+ /** When true, renders the checkbox as a round radio-style control. @default false */
7
10
  round?: boolean;
11
+ /** Accessible name for the checkbox. */
8
12
  ariaLabel?: string;
9
13
  }
10
14
  export {};
@@ -1,7 +1,12 @@
1
1
  export interface HintProps extends React.HTMLAttributes<HTMLDivElement> {
2
+ /** Main text content of the hint. */
2
3
  label: string;
4
+ /** Optional title; if provided, shows a close button. */
3
5
  title?: string;
6
+ /** Optional icon node displayed next to the title or label. @default <MdInfo /> */
4
7
  icon?: React.ReactNode;
8
+ /** Callback fired when the close button is clicked. */
5
9
  onRequestClose?: () => void;
10
+ /** Optional additional content rendered under the label. */
6
11
  children?: React.ReactNode;
7
12
  }
@@ -0,0 +1,12 @@
1
+ import { JSX } from 'react';
2
+ import { BBBInputProps } from './types';
3
+ /**
4
+ * A labeled, auto-growing text field with an inline action button.
5
+ *
6
+ * Modeled after the core chat text input: unifies the recurring "text field +
7
+ * submit button" pattern used across chat, guest messages and breakouts.
8
+ * It supports both uncontrolled (default) and controlled usage, matching BBBSearch.
9
+ *
10
+ */
11
+ declare function Input({ label, placeholder, value, onChange, onSubmit, buttonIcon, buttonLabel, buttonAriaLabel, buttonVariant, dataTest, buttonDataTest, beforeButton, afterButton, submitOnEnter, showSentFeedback, sentFeedbackContent, sentFeedbackDuration, disabled, error, helperText, minRows, maxRows, maxLength, autoFocus, inputRef, id, 'aria-label': ariaLabel, 'aria-describedby': ariaDescribedBy, }: BBBInputProps): JSX.Element;
12
+ export default Input;
@@ -0,0 +1 @@
1
+ export { default as BBBInput } from './component';
@@ -0,0 +1,6 @@
1
+ import { StyledContainerProps, StyledHelperTextProps } from './types';
2
+ export declare const Wrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
3
+ export declare const Label: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, never>> & string;
4
+ export declare const FieldContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyledContainerProps>> & string;
5
+ export declare const TextArea: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, never>> & string;
6
+ export declare const HelperText: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyledHelperTextProps>> & string;