@bigbluebutton/bbb-ui-components-react 0.5.0 → 0.7.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 (101) hide show
  1. package/README.md +38 -10
  2. package/dist/components/Accordion.js +57 -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/ScrollArea.js +42 -0
  11. package/dist/components/Search.js +130 -1
  12. package/dist/components/Select.js +46 -1
  13. package/dist/components/Spinner.js +34 -1
  14. package/dist/components/TextAreaInput.js +28 -1
  15. package/dist/components/TextInput.js +52 -1
  16. package/dist/components/Toggle.js +42 -1
  17. package/dist/components/Typography.js +42 -1
  18. package/dist/components/colors.js +1 -0
  19. package/dist/components/index.js +789 -1
  20. package/dist/esm/components/Accordion/component.js +8 -9
  21. package/dist/esm/components/Accordion/constants.js +10 -4
  22. package/dist/esm/components/Accordion/styles.js +63 -17
  23. package/dist/esm/components/Button/component.js +52 -35
  24. package/dist/esm/components/Button/constants.js +21 -20
  25. package/dist/esm/components/Button/styles.js +187 -45
  26. package/dist/esm/components/Checkbox/component.js +3 -14
  27. package/dist/esm/components/Checkbox/constants.js +3 -3
  28. package/dist/esm/components/Checkbox/styles.js +23 -9
  29. package/dist/esm/components/Divider/styles.js +10 -7
  30. package/dist/esm/components/Hint/component.js +16 -16
  31. package/dist/esm/components/Hint/constants.js +3 -3
  32. package/dist/esm/components/Hint/styles.js +58 -13
  33. package/dist/esm/components/Input/component.js +111 -0
  34. package/dist/esm/components/Input/index.js +1 -0
  35. package/dist/esm/components/Input/styles.js +89 -0
  36. package/dist/esm/components/Input/types.js +1 -0
  37. package/dist/esm/components/Modal/component.js +8 -19
  38. package/dist/esm/components/Modal/styles.js +42 -20
  39. package/dist/esm/components/Navigation/component.js +3 -4
  40. package/dist/esm/components/Navigation/styles.js +36 -12
  41. package/dist/esm/components/ScrollArea/component.js +15 -0
  42. package/dist/esm/components/ScrollArea/constants.js +3 -0
  43. package/dist/esm/components/ScrollArea/index.js +1 -0
  44. package/dist/esm/components/ScrollArea/styles.js +69 -0
  45. package/dist/esm/components/ScrollArea/types.js +1 -0
  46. package/dist/esm/components/Search/component.js +16 -17
  47. package/dist/esm/components/Search/styles.js +103 -14
  48. package/dist/esm/components/Select/component.js +5 -16
  49. package/dist/esm/components/Select/styles.js +51 -11
  50. package/dist/esm/components/Spinner/component.js +1 -2
  51. package/dist/esm/components/Spinner/styles.js +39 -29
  52. package/dist/esm/components/TextAreaInput/component.js +4 -15
  53. package/dist/esm/components/TextAreaInput/styles.js +29 -7
  54. package/dist/esm/components/TextInput/component.js +2 -13
  55. package/dist/esm/components/TextInput/styles.js +58 -16
  56. package/dist/esm/components/Toggle/component.js +6 -17
  57. package/dist/esm/components/Toggle/constants.js +3 -3
  58. package/dist/esm/components/Toggle/styles.js +88 -72
  59. package/dist/esm/components/Typography/component.js +3 -14
  60. package/dist/esm/components/Typography/constants.js +1 -1
  61. package/dist/esm/components/Typography/styles.js +50 -17
  62. package/dist/esm/components/index.js +2 -0
  63. package/dist/esm/index.js +2 -1
  64. package/dist/esm/stylesheets/colors.js +57 -0
  65. package/dist/esm/stylesheets/palette.js +55 -0
  66. package/dist/esm/stylesheets/sizing.js +9 -9
  67. package/dist/esm/stylesheets/typography.js +7 -7
  68. package/dist/types/components/Accordion/component.d.ts +1 -1
  69. package/dist/types/components/Accordion/constants.d.ts +7 -1
  70. package/dist/types/components/Accordion/styles.d.ts +2 -1
  71. package/dist/types/components/Accordion/types.d.ts +15 -1
  72. package/dist/types/components/Button/constants.d.ts +3 -2
  73. package/dist/types/components/Button/styles.d.ts +1 -0
  74. package/dist/types/components/Button/type.d.ts +42 -1
  75. package/dist/types/components/Checkbox/types.d.ts +4 -0
  76. package/dist/types/components/Hint/component.d.ts +2 -1
  77. package/dist/types/components/Hint/types.d.ts +9 -0
  78. package/dist/types/components/Input/component.d.ts +12 -0
  79. package/dist/types/components/Input/index.d.ts +1 -0
  80. package/dist/types/components/Input/styles.d.ts +6 -0
  81. package/dist/types/components/Input/types.d.ts +69 -0
  82. package/dist/types/components/Modal/types.d.ts +11 -0
  83. package/dist/types/components/Navigation/types.d.ts +9 -0
  84. package/dist/types/components/ScrollArea/component.d.ts +11 -0
  85. package/dist/types/components/ScrollArea/constants.d.ts +3 -0
  86. package/dist/types/components/ScrollArea/index.d.ts +1 -0
  87. package/dist/types/components/ScrollArea/styles.d.ts +2 -0
  88. package/dist/types/components/ScrollArea/types.d.ts +37 -0
  89. package/dist/types/components/Search/types.d.ts +6 -24
  90. package/dist/types/components/Select/types.d.ts +4 -0
  91. package/dist/types/components/Spinner/types.d.ts +3 -0
  92. package/dist/types/components/TextAreaInput/types.d.ts +7 -0
  93. package/dist/types/components/TextInput/types.d.ts +3 -0
  94. package/dist/types/components/Toggle/types.d.ts +6 -0
  95. package/dist/types/components/Typography/types.d.ts +3 -0
  96. package/dist/types/components/index.d.ts +2 -0
  97. package/dist/types/index.d.ts +2 -1
  98. package/dist/types/stylesheets/colors.d.ts +57 -0
  99. package/dist/types/stylesheets/{pallete.d.ts → palette.d.ts} +13 -9
  100. package/package.json +35 -2
  101. package/dist/esm/stylesheets/pallete.js +0 -46
@@ -0,0 +1 @@
1
+ export { default as BBBScrollArea } from './component';
@@ -0,0 +1,69 @@
1
+ import styled, { css } from 'styled-components';
2
+ const FADE_MASK_SIZE = '40px';
3
+ const FADE_SHADOW_SIZE = '14px';
4
+ const FADE_SHADOW_COLOR = 'rgba(0, 0, 0, .2)';
5
+ const verticalFadeLayers = (color) => [
6
+ { image: `linear-gradient(${color} 30%, transparent)`, position: '0 0', size: `100% ${FADE_MASK_SIZE}`, attachment: 'local' },
7
+ { image: `linear-gradient(transparent, ${color} 70%)`, position: '0 100%', size: `100% ${FADE_MASK_SIZE}`, attachment: 'local' },
8
+ { image: `radial-gradient(farthest-side at 50% 0, ${FADE_SHADOW_COLOR}, transparent)`, position: '0 0', size: `100% ${FADE_SHADOW_SIZE}`, attachment: 'scroll' },
9
+ { image: `radial-gradient(farthest-side at 50% 100%, ${FADE_SHADOW_COLOR}, transparent)`, position: '0 100%', size: `100% ${FADE_SHADOW_SIZE}`, attachment: 'scroll' },
10
+ ];
11
+ const horizontalFadeLayers = (color) => [
12
+ { image: `linear-gradient(to right, ${color} 30%, transparent)`, position: '0 0', size: `${FADE_MASK_SIZE} 100%`, attachment: 'local' },
13
+ { image: `linear-gradient(to right, transparent, ${color} 70%)`, position: '100% 0', size: `${FADE_MASK_SIZE} 100%`, attachment: 'local' },
14
+ { image: `radial-gradient(farthest-side at 0 50%, ${FADE_SHADOW_COLOR}, transparent)`, position: '0 0', size: `${FADE_SHADOW_SIZE} 100%`, attachment: 'scroll' },
15
+ { image: `radial-gradient(farthest-side at 100% 50%, ${FADE_SHADOW_COLOR}, transparent)`, position: '100% 0', size: `${FADE_SHADOW_SIZE} 100%`, attachment: 'scroll' },
16
+ ];
17
+ const fadeBackground = ({ $verticalScroll, $horizontalScroll, $fadeEdges, $fadeColor, }) => {
18
+ if (!$fadeEdges || !$fadeColor)
19
+ return '';
20
+ const layers = [
21
+ ...($verticalScroll ? verticalFadeLayers($fadeColor) : []),
22
+ ...($horizontalScroll ? horizontalFadeLayers($fadeColor) : []),
23
+ ];
24
+ if (!layers.length)
25
+ return '';
26
+ return css `
27
+ background-image: ${layers.map((layer) => layer.image).join(', ')};
28
+ background-position: ${layers.map((layer) => layer.position).join(', ')};
29
+ background-size: ${layers.map((layer) => layer.size).join(', ')};
30
+ background-attachment: ${layers.map((layer) => layer.attachment).join(', ')};
31
+ background-repeat: no-repeat;
32
+ background-color: transparent;
33
+ `;
34
+ };
35
+ export const ScrollAreaWrapper = styled.div `
36
+ overflow-y: ${({ $verticalScroll }) => ($verticalScroll ? 'auto' : 'hidden')};
37
+ overflow-x: ${({ $horizontalScroll }) => ($horizontalScroll ? 'auto' : 'hidden')};
38
+ ${({ $maxHeight }) => $maxHeight && css `max-height: ${$maxHeight};`}
39
+ ${({ $maxWidth }) => $maxWidth && css `max-width: ${$maxWidth};`}
40
+ ${({ $paddingTop }) => $paddingTop && css `padding-top: ${$paddingTop};`}
41
+ ${({ $paddingRight }) => $paddingRight && css `padding-right: ${$paddingRight};`}
42
+ ${({ $paddingBottom }) => $paddingBottom && css `padding-bottom: ${$paddingBottom};`}
43
+ ${({ $paddingLeft }) => $paddingLeft && css `padding-left: ${$paddingLeft};`}
44
+ ${fadeBackground}
45
+
46
+ &::-webkit-scrollbar {
47
+ width: 5px;
48
+ height: 5px;
49
+ }
50
+ &::-webkit-scrollbar-button {
51
+ width: 0;
52
+ height: 0;
53
+ }
54
+ &::-webkit-scrollbar-thumb {
55
+ background: rgba(0, 0, 0, .25);
56
+ border: none;
57
+ border-radius: 50px;
58
+ }
59
+ &::-webkit-scrollbar-thumb:hover { background: rgba(0, 0, 0, .5); }
60
+ &::-webkit-scrollbar-thumb:active { background: rgba(0, 0, 0, .25); }
61
+ &::-webkit-scrollbar-track {
62
+ background: rgba(0, 0, 0, .25);
63
+ border: none;
64
+ border-radius: 50px;
65
+ }
66
+ &::-webkit-scrollbar-track:hover { background: rgba(0, 0, 0, .25); }
67
+ &::-webkit-scrollbar-track:active { background: rgba(0, 0, 0, .25); }
68
+ &::-webkit-scrollbar-corner { background: 0 0; }
69
+ `;
@@ -0,0 +1 @@
1
+ export {};
@@ -5,32 +5,31 @@ import * as Styled from './styles';
5
5
  * Search input with debounce, clear action, and optional loading state.
6
6
  * It supports both uncontrolled usage and controlled mode via `value` + `onChange`.
7
7
  */
8
- function BBBSearch(_a) {
9
- var _b;
10
- var placeholder = _a.placeholder, value = _a.value, onChange = _a.onChange, onSearch = _a.onSearch, onClear = _a.onClear, _c = _a.debounce, debounce = _c === void 0 ? 500 : _c, _d = _a.isLoading, isLoading = _d === void 0 ? false : _d, _e = _a.disabled, disabled = _e === void 0 ? false : _e, _f = _a.autoFocus, autoFocus = _f === void 0 ? false : _f, inputRef = _a.inputRef, ariaLabel = _a["aria-label"];
11
- var isControlled = value !== undefined;
12
- var _g = useState(''), internalValue = _g[0], setInternalValue = _g[1];
13
- var localInputRef = useRef(null);
14
- var resolvedRef = (_b = inputRef) !== null && _b !== void 0 ? _b : localInputRef;
15
- var currentValue = isControlled ? (value !== null && value !== void 0 ? value : '') : internalValue;
16
- var hasValue = currentValue.length > 0;
8
+ function BBBSearch({ placeholder, value, onChange, onSearch, onClear, debounce = 500, isLoading = false, disabled = false, autoFocus = false, inputRef, 'aria-label': ariaLabel, }) {
9
+ var _a;
10
+ const isControlled = value !== undefined;
11
+ const [internalValue, setInternalValue] = useState('');
12
+ const localInputRef = useRef(null);
13
+ const resolvedRef = (_a = inputRef) !== null && _a !== void 0 ? _a : localInputRef;
14
+ const currentValue = isControlled ? (value !== null && value !== void 0 ? value : '') : internalValue;
15
+ const hasValue = currentValue.length > 0;
17
16
  // Debounced onSearch (uncontrolled mode)
18
- useEffect(function () {
17
+ useEffect(() => {
19
18
  if (isControlled || !onSearch)
20
19
  return;
21
- var timeoutId = setTimeout(function () {
20
+ const timeoutId = setTimeout(() => {
22
21
  onSearch(internalValue);
23
22
  }, debounce);
24
- return function () { return clearTimeout(timeoutId); };
23
+ return () => clearTimeout(timeoutId);
25
24
  }, [internalValue, debounce, onSearch, isControlled]);
26
25
  // Handle autoFocus on mount
27
- useEffect(function () {
26
+ useEffect(() => {
28
27
  if (autoFocus && resolvedRef.current) {
29
28
  resolvedRef.current.focus();
30
29
  }
31
30
  }, [autoFocus, resolvedRef]);
32
- var handleChange = useCallback(function (e) {
33
- var next = e.target.value;
31
+ const handleChange = useCallback((e) => {
32
+ const next = e.target.value;
34
33
  if (isControlled) {
35
34
  onChange === null || onChange === void 0 ? void 0 : onChange(next);
36
35
  }
@@ -38,7 +37,7 @@ function BBBSearch(_a) {
38
37
  setInternalValue(next);
39
38
  }
40
39
  }, [isControlled, onChange]);
41
- var handleClear = useCallback(function () {
40
+ const handleClear = useCallback(() => {
42
41
  var _a;
43
42
  if (onClear) {
44
43
  onClear();
@@ -53,7 +52,7 @@ function BBBSearch(_a) {
53
52
  }
54
53
  (_a = resolvedRef.current) === null || _a === void 0 ? void 0 : _a.focus();
55
54
  }, [onClear, isControlled, onChange, onSearch, resolvedRef]);
56
- var handleContainerClick = useCallback(function (e) {
55
+ const handleContainerClick = useCallback((e) => {
57
56
  var _a;
58
57
  if (e.target === e.currentTarget) {
59
58
  (_a = resolvedRef.current) === null || _a === void 0 ? void 0 : _a.focus();
@@ -1,17 +1,106 @@
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 { colorBorderDefault, colorBorderSelected, colorTextDefault, colorTextLight, colorIconDefault, colorIconBlue, colorBrand1, } from '../../stylesheets/pallete';
2
+ import { colorBorderDefault, colorBorderSelected, colorBorderFocusRing, colorTextDefault, colorTextLight, colorIconDefault, colorIconBlue, colorBrand1, } from '../../stylesheets/palette';
7
3
  import { spacingSmall, spacingMedium, borderRadiusDefault, } from '../../stylesheets/sizing';
8
4
  import { fontSizeSmall } from '../../stylesheets/typography';
9
- export var Container = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n position: relative;\n width: 100%;\n height: 2.5rem;\n padding: ", " ", ";\n gap: ", ";\n border-radius: ", ";\n border: 1px solid ", ";\n background-color: transparent;\n box-sizing: border-box;\n cursor: text;\n transition: border-color 0.15s ease, box-shadow 0.15s ease;\n\n &:focus-within {\n border-color: ", ";\n box-shadow: 0 0 0 3px var(--color-border-focus-ring, rgba(29, 101, 212, 0.15));\n }\n\n ", "\n"], ["\n display: flex;\n align-items: center;\n position: relative;\n width: 100%;\n height: 2.5rem;\n padding: ", " ", ";\n gap: ", ";\n border-radius: ", ";\n border: 1px solid ", ";\n background-color: transparent;\n box-sizing: border-box;\n cursor: text;\n transition: border-color 0.15s ease, box-shadow 0.15s ease;\n\n &:focus-within {\n border-color: ", ";\n box-shadow: 0 0 0 3px var(--color-border-focus-ring, rgba(29, 101, 212, 0.15));\n }\n\n ", "\n"])), spacingSmall, spacingMedium, spacingSmall, borderRadiusDefault, colorBorderDefault, colorBorderSelected, function (_a) {
10
- var $disabled = _a.$disabled;
11
- return $disabled && css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n opacity: 0.5;\n cursor: not-allowed;\n pointer-events: none;\n "], ["\n opacity: 0.5;\n cursor: not-allowed;\n pointer-events: none;\n "])));
12
- });
13
- export var SearchIconWrapper = styled.span(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n color: ", ";\n width: 1rem;\n height: 1rem;\n"], ["\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n color: ", ";\n width: 1rem;\n height: 1rem;\n"])), colorIconDefault);
14
- export var StyledInput = styled.input(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n flex: 1;\n min-width: 0;\n border: none;\n outline: none;\n background: transparent;\n color: ", ";\n font-size: ", ";\n line-height: 1.5;\n padding: 0;\n\n &::placeholder {\n color: ", ";\n }\n\n &:disabled {\n cursor: not-allowed;\n }\n\n &::-webkit-search-decoration,\n &::-webkit-search-cancel-button,\n &::-webkit-search-results-button,\n &::-webkit-search-results-decoration {\n -webkit-appearance: none;\n appearance: none;\n display: none;\n }\n\n [dir='rtl'] & {\n text-align: right;\n }\n"], ["\n flex: 1;\n min-width: 0;\n border: none;\n outline: none;\n background: transparent;\n color: ", ";\n font-size: ", ";\n line-height: 1.5;\n padding: 0;\n\n &::placeholder {\n color: ", ";\n }\n\n &:disabled {\n cursor: not-allowed;\n }\n\n &::-webkit-search-decoration,\n &::-webkit-search-cancel-button,\n &::-webkit-search-results-button,\n &::-webkit-search-results-decoration {\n -webkit-appearance: none;\n appearance: none;\n display: none;\n }\n\n [dir='rtl'] & {\n text-align: right;\n }\n"])), colorTextDefault, fontSizeSmall, colorTextLight);
15
- export var ActionWrapper = styled.span(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n width: 1rem;\n height: 1rem;\n color: ", ";\n"], ["\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n width: 1rem;\n height: 1rem;\n color: ", ";\n"])), colorBrand1);
16
- export var ClearButton = styled.button(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n background: transparent;\n border: none;\n cursor: pointer;\n padding: 0;\n width: 1rem;\n height: 1rem;\n color: ", ";\n line-height: 1;\n transition: color 0.1s ease;\n\n &:hover {\n color: ", ";\n }\n\n &:focus-visible {\n outline: 2px solid ", ";\n outline-offset: 2px;\n border-radius: 2px;\n }\n"], ["\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n background: transparent;\n border: none;\n cursor: pointer;\n padding: 0;\n width: 1rem;\n height: 1rem;\n color: ", ";\n line-height: 1;\n transition: color 0.1s ease;\n\n &:hover {\n color: ", ";\n }\n\n &:focus-visible {\n outline: 2px solid ", ";\n outline-offset: 2px;\n border-radius: 2px;\n }\n"])), colorIconDefault, colorIconBlue, colorBorderSelected);
17
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
5
+ export const Container = styled.div `
6
+ display: flex;
7
+ align-items: center;
8
+ position: relative;
9
+ width: 100%;
10
+ height: 2.5rem;
11
+ padding: ${spacingSmall} ${spacingMedium};
12
+ gap: ${spacingSmall};
13
+ border-radius: ${borderRadiusDefault};
14
+ border: 1px solid ${colorBorderDefault};
15
+ background-color: transparent;
16
+ box-sizing: border-box;
17
+ cursor: text;
18
+ transition: border-color 0.15s ease, box-shadow 0.15s ease;
19
+
20
+ &:focus-within {
21
+ border-color: ${colorBorderSelected};
22
+ box-shadow: 0 0 0 3px ${colorBorderFocusRing};
23
+ }
24
+
25
+ ${({ $disabled }) => $disabled &&
26
+ css `
27
+ opacity: 0.5;
28
+ cursor: not-allowed;
29
+ pointer-events: none;
30
+ `}
31
+ `;
32
+ export const SearchIconWrapper = styled.span `
33
+ display: flex;
34
+ align-items: center;
35
+ justify-content: center;
36
+ flex-shrink: 0;
37
+ color: ${colorIconDefault};
38
+ width: 1rem;
39
+ height: 1rem;
40
+ `;
41
+ export const StyledInput = styled.input `
42
+ flex: 1;
43
+ min-width: 0;
44
+ border: none;
45
+ outline: none;
46
+ background: transparent;
47
+ color: ${colorTextDefault};
48
+ font-size: ${fontSizeSmall};
49
+ line-height: 1.5;
50
+ padding: 0;
51
+
52
+ &::placeholder {
53
+ color: ${colorTextLight};
54
+ }
55
+
56
+ &:disabled {
57
+ cursor: not-allowed;
58
+ }
59
+
60
+ &::-webkit-search-decoration,
61
+ &::-webkit-search-cancel-button,
62
+ &::-webkit-search-results-button,
63
+ &::-webkit-search-results-decoration {
64
+ -webkit-appearance: none;
65
+ appearance: none;
66
+ display: none;
67
+ }
68
+
69
+ [dir='rtl'] & {
70
+ text-align: right;
71
+ }
72
+ `;
73
+ export const ActionWrapper = styled.span `
74
+ display: flex;
75
+ align-items: center;
76
+ justify-content: center;
77
+ flex-shrink: 0;
78
+ width: 1rem;
79
+ height: 1rem;
80
+ color: ${colorBrand1};
81
+ `;
82
+ export const ClearButton = styled.button `
83
+ display: flex;
84
+ align-items: center;
85
+ justify-content: center;
86
+ flex-shrink: 0;
87
+ background: transparent;
88
+ border: none;
89
+ cursor: pointer;
90
+ padding: 0;
91
+ width: 1rem;
92
+ height: 1rem;
93
+ color: ${colorIconDefault};
94
+ line-height: 1;
95
+ transition: color 0.1s ease;
96
+
97
+ &:hover {
98
+ color: ${colorIconBlue};
99
+ }
100
+
101
+ &:focus-visible {
102
+ outline: 2px solid ${colorBorderSelected};
103
+ outline-offset: 2px;
104
+ border-radius: 2px;
105
+ }
106
+ `;
@@ -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)
@@ -31,14 +20,14 @@ import * as Styled from './styles';
31
20
  *
32
21
  */
33
22
  function Select(_a) {
34
- var _b = _a.title, title = _b === void 0 ? null : _b, _c = _a.icon, icon = _c === void 0 ? null : _c, children = _a.children, ariaLabel = _a.ariaLabel, props = __rest(_a, ["title", "icon", "children", "ariaLabel"]);
35
- var id = useId();
36
- var selectId = "select-".concat(id);
37
- var labelId = title ? "select-label-".concat(id) : undefined;
23
+ var { title = null, icon = null, children, ariaLabel } = _a, props = __rest(_a, ["title", "icon", "children", "ariaLabel"]);
24
+ const id = useId();
25
+ const selectId = `select-${id}`;
26
+ const labelId = title ? `select-label-${id}` : undefined;
38
27
  return (React.createElement(Styled.SelectContainer, null,
39
28
  title && React.createElement(Styled.Title, { id: labelId, htmlFor: selectId }, title),
40
29
  React.createElement(Styled.SelectWrapper, null,
41
30
  icon && (React.createElement(Styled.SelectorIcon, null, icon)),
42
- React.createElement(Styled.Selector, __assign({}, props, { id: selectId, labelId: labelId, "aria-label": ariaLabel, IconComponent: MdExpandMore }), children))));
31
+ React.createElement(Styled.Selector, Object.assign({}, props, { id: selectId, labelId: labelId, "aria-label": ariaLabel, IconComponent: MdExpandMore }), children))));
43
32
  }
44
33
  export default Select;
@@ -1,15 +1,55 @@
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 from 'styled-components';
6
2
  import { borderRadiusSmall, spacingMedium, spacingSmall } from '../../stylesheets/sizing';
7
3
  import Select from '@mui/material/Select';
8
- import { colorBorderDefault, colorBrand1, colorDarkGray } from '../../stylesheets/pallete';
4
+ import { colorBorderDefault, colorBorderSelected, colorBrand1, colorDarkGray } from '../../stylesheets/palette';
9
5
  import { fontSizeSmall } from '../../stylesheets/typography';
10
- export var SelectContainer = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n flex-shrink: 0;\n gap: ", ";\n justify-content: start;\n align-items: center;\n"], ["\n display: flex;\n flex-direction: column;\n flex-shrink: 0;\n gap: ", ";\n justify-content: start;\n align-items: center;\n"])), spacingSmall);
11
- export var SelectWrapper = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n justify-content: center;\n gap: ", "; \n padding: 1px;\n width: 100%;\n"], ["\n display: flex;\n flex-direction: row;\n justify-content: center;\n gap: ", "; \n padding: 1px;\n width: 100%;\n"])), spacingMedium);
12
- export var Selector = styled(Select)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n height: 3.5rem;\n flex: 1;\n border-radius: ", " !important;\n overflow: hidden;\n width: 100%;\n border: 1px solid ", ";\n"], ["\n height: 3.5rem;\n flex: 1;\n border-radius: ", " !important;\n overflow: hidden;\n width: 100%;\n border: 1px solid ", ";\n"])), borderRadiusSmall, colorBorderDefault);
13
- export var Title = styled.label(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n align-self: flex-start;\n color: ", ";\n font-size: ", ";\n font-style: normal;\n font-weight: 400;\n line-height: normal;\n"], ["\n align-self: flex-start;\n color: ", ";\n font-size: ", ";\n font-style: normal;\n font-weight: 400;\n line-height: normal;\n"])), colorDarkGray, fontSizeSmall);
14
- export var SelectorIcon = styled.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n color: ", ";\n"], ["\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n color: ", ";\n"])), colorBrand1);
15
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
6
+ export const SelectContainer = styled.div `
7
+ display: flex;
8
+ flex-direction: column;
9
+ flex-shrink: 0;
10
+ gap: ${spacingSmall};
11
+ justify-content: start;
12
+ align-items: center;
13
+ `;
14
+ export const SelectWrapper = styled.div `
15
+ display: flex;
16
+ flex-direction: row;
17
+ justify-content: center;
18
+ gap: ${spacingMedium};
19
+ padding: 1px;
20
+ width: 100%;
21
+ `;
22
+ export const Selector = styled(Select) `
23
+ height: 3.5rem;
24
+ flex: 1;
25
+ border-radius: ${borderRadiusSmall} !important;
26
+ overflow: hidden;
27
+ width: 100%;
28
+
29
+ & .MuiOutlinedInput-notchedOutline {
30
+ border-color: ${colorBorderDefault};
31
+ }
32
+
33
+ &:hover .MuiOutlinedInput-notchedOutline {
34
+ border-color: ${colorBorderSelected};
35
+ }
36
+
37
+ &.Mui-focused .MuiOutlinedInput-notchedOutline {
38
+ border-color: ${colorBorderSelected};
39
+ }
40
+ `;
41
+ export const Title = styled.label `
42
+ align-self: flex-start;
43
+ color: ${colorDarkGray};
44
+ font-size: ${fontSizeSmall};
45
+ font-style: normal;
46
+ font-weight: 400;
47
+ line-height: normal;
48
+ `;
49
+ export const SelectorIcon = styled.div `
50
+ display: flex;
51
+ align-items: center;
52
+ justify-content: center;
53
+ flex-shrink: 0;
54
+ color: ${colorBrand1};
55
+ `;
@@ -6,8 +6,7 @@ import * as Styled from './styles';
6
6
  * This component provides a small, configurable loading indicator for background activity or loading states.
7
7
  *
8
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;
9
+ const Spinner = ({ size = 48, strokeWidth = 4, animate = true, }) => {
11
10
  return (React.createElement(Styled.Wrapper, { "$size": size, role: "progressbar", "aria-label": "Loading", "aria-busy": animate },
12
11
  React.createElement(Styled.StyledSvg, { viewBox: "0 0 50 50", "$animate": animate, focusable: "false", "aria-hidden": "true" },
13
12
  React.createElement(Styled.Path, { className: "path", cx: "25", cy: "25", r: "20", "$animate": animate, "$strokeWidth": strokeWidth }))));
@@ -1,30 +1,40 @@
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, { 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;
2
+ import { colorBrand1 } from '../../stylesheets/palette';
3
+ const rotate = keyframes `
4
+ 0% { transform: rotate(0deg); }
5
+ 100% { transform: rotate(360deg); }
6
+ `;
7
+ const dash = keyframes `
8
+ 0% { stroke-dasharray: 1, 200; stroke-dashoffset: 0; }
9
+ 50% { stroke-dasharray: 100, 200; stroke-dashoffset: -15; }
10
+ 100% { stroke-dasharray: 100, 200; stroke-dashoffset: -125; }
11
+ `;
12
+ export const Wrapper = styled.div `
13
+ width: ${({ $size }) => typeof $size === 'number' ? `${$size}px` : $size};
14
+ height: ${({ $size }) => typeof $size === 'number' ? `${$size}px` : $size};
15
+ display: inline-grid;
16
+ place-items: center;
17
+ `;
18
+ export const StyledSvg = styled.svg `
19
+ width: 100%;
20
+ height: 100%;
21
+ transform-origin: center;
22
+ overflow: visible;
23
+ ${({ $animate }) => $animate && css `
24
+ animation: ${rotate} 1.4s linear infinite;
25
+ `}
26
+ `;
27
+ export const Path = styled.circle `
28
+ fill: none;
29
+ stroke: ${colorBrand1};
30
+ stroke-width: ${({ $strokeWidth }) => $strokeWidth}px;
31
+ stroke-linecap: round;
32
+ ${({ $animate }) => $animate && css `
33
+ animation: ${dash} 1.4s ease-in-out infinite;
34
+ `}
35
+
36
+ ${({ $animate }) => !$animate && css `
37
+ stroke-dasharray: 94.2 31.4;
38
+ stroke-dashoffset: 0;
39
+ `}
40
+ `;
@@ -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)
@@ -30,14 +19,14 @@ import * as Styled from './styles';
30
19
  *
31
20
  */
32
21
  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 () {
22
+ var { placeholder = '', rows = 1, maxLength = 250, autoFocus = true, inputRef = undefined, onChange, onKeyDown } = _a, props = __rest(_a, ["placeholder", "rows", "maxLength", "autoFocus", "inputRef", "onChange", "onKeyDown"]);
23
+ const internalRef = useRef(null);
24
+ useEffect(() => {
36
25
  if (autoFocus && internalRef.current) {
37
26
  internalRef.current.focus();
38
27
  }
39
28
  }, [autoFocus]);
40
- return (React.createElement(Styled.TextAreaInput, __assign({}, props, { rows: rows, maxLength: maxLength, ref: function (ref) {
29
+ return (React.createElement(Styled.TextAreaInput, Object.assign({}, props, { rows: rows, maxLength: maxLength, ref: (ref) => {
41
30
  internalRef.current = ref;
42
31
  if (typeof inputRef === 'function') {
43
32
  inputRef(ref);
@@ -1,9 +1,31 @@
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 from 'styled-components';
6
- import { colorBorderDefault, colorBrand1, colorBrand2, colorLightGray, colorWhite } from '../../stylesheets/pallete';
2
+ import { colorBorderDefault, colorBrand1, colorBrand2, colorTextDefault, colorTextLight, colorWhite, } from '../../stylesheets/palette';
7
3
  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;
4
+ export const TextAreaInput = styled.textarea `
5
+ flex: 1;
6
+ background: ${colorWhite};
7
+ background-clip: padding-box;
8
+ margin: 0;
9
+ color: ${colorTextDefault};
10
+ padding: calc(.3rem* 2.5) calc(.75rem* 1.25);
11
+ resize: none;
12
+ -webkit-transition: none;
13
+ transition: none;
14
+ border-radius: ${borderRadiusDefault};
15
+ font-size: 1rem;
16
+ line-height: 1;
17
+ min-height: 2.5rem;
18
+ max-height: 10rem;
19
+ border: 1px solid ${colorBorderDefault};
20
+ overflow-y: hidden;
21
+ margin: 0.3em;
22
+
23
+ &::placeholder {
24
+ color: ${colorTextLight};
25
+ }
26
+
27
+ &:focus {
28
+ outline: ${colorBrand1} solid 2px;
29
+ box-shadow: 0 0 0 2px ${colorBrand2} inset 0 0 0 1px ${colorBrand1};
30
+ }
31
+ `;
@@ -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)
@@ -30,10 +19,10 @@ import * as Styled from './styles';
30
19
  *
31
20
  */
32
21
  function TextInput(_a) {
33
- var label = _a.label, helperText = _a.helperText, error = _a.error, placeholder = _a.placeholder, props = __rest(_a, ["label", "helperText", "error", "placeholder"]);
22
+ var { label, helperText, error, placeholder } = _a, props = __rest(_a, ["label", "helperText", "error", "placeholder"]);
34
23
  return (React.createElement(Styled.Container, null,
35
24
  label && React.createElement(Styled.Label, null, label),
36
- React.createElement(Styled.StyledTextField, __assign({}, props, { "$error": error, placeholder: placeholder })),
25
+ React.createElement(Styled.StyledTextField, Object.assign({}, props, { "$error": error, placeholder: placeholder })),
37
26
  helperText && React.createElement(Styled.HelperText, { "$error": error }, helperText)));
38
27
  }
39
28
  export default TextInput;