@wireapp/react-ui-kit 9.18.0 → 9.18.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (183) hide show
  1. package/lib/Form/Button.js +1 -15
  2. package/lib/Form/Button.styles.js +157 -110
  3. package/lib/Form/ButtonLink.d.ts.map +1 -1
  4. package/lib/Form/ButtonLink.js +5 -16
  5. package/lib/Form/Checkbox.js +75 -45
  6. package/lib/Form/CodeInput.js +17 -6
  7. package/lib/Form/DropFileInput.js +5 -14
  8. package/lib/Form/ErrorMessage.js +8 -19
  9. package/lib/Form/Form.d.ts.map +1 -1
  10. package/lib/Form/Form.js +2 -2
  11. package/lib/Form/IndicatorRangeInput.js +6 -19
  12. package/lib/Form/IndicatorRangeInput.styles.js +36 -6
  13. package/lib/Form/Input.js +21 -18
  14. package/lib/Form/InputBlock.d.ts +1 -1
  15. package/lib/Form/InputBlock.d.ts.map +1 -1
  16. package/lib/Form/InputBlock.js +1 -1
  17. package/lib/Form/InputLabel.js +6 -20
  18. package/lib/Form/InputSubmitCombo.js +22 -25
  19. package/lib/Form/RangeInput.d.ts +0 -1
  20. package/lib/Form/RangeInput.d.ts.map +1 -1
  21. package/lib/Form/RangeInput.js +2 -14
  22. package/lib/Form/RangeInput.styles.js +26 -14
  23. package/lib/Form/RoundIconButton.js +14 -16
  24. package/lib/Form/Select.d.ts.map +1 -1
  25. package/lib/Form/Select.js +9 -16
  26. package/lib/Form/SelectComponents.d.ts.map +1 -1
  27. package/lib/Form/SelectComponents.js +21 -35
  28. package/lib/Form/SelectStyles.js +164 -82
  29. package/lib/Form/TextArea.js +11 -4
  30. package/lib/Form/Tooltip.js +2 -14
  31. package/lib/GlobalStyle.d.ts +0 -1
  32. package/lib/GlobalStyle.d.ts.map +1 -1
  33. package/lib/GlobalStyle.js +17 -3
  34. package/lib/Icon/AddPeopleIcon.js +1 -15
  35. package/lib/Icon/ArchiveIcon.js +1 -1
  36. package/lib/Icon/ArrowDown.js +1 -15
  37. package/lib/Icon/ArrowIcon.js +1 -15
  38. package/lib/Icon/AttachmentIcon.js +1 -1
  39. package/lib/Icon/AudioVideoIcon.js +1 -1
  40. package/lib/Icon/BlockIcon.js +1 -1
  41. package/lib/Icon/Brand/AndroidIcon.js +1 -1
  42. package/lib/Icon/Brand/AppleIcon.js +1 -1
  43. package/lib/Icon/Brand/ChromeIcon.js +1 -1
  44. package/lib/Icon/Brand/FacebookIcon.js +1 -1
  45. package/lib/Icon/Brand/GitHubIcon.js +1 -1
  46. package/lib/Icon/Brand/LinkedInIcon.js +1 -1
  47. package/lib/Icon/Brand/LinuxIcon.js +1 -1
  48. package/lib/Icon/Brand/MicrosoftIcon.js +1 -1
  49. package/lib/Icon/Brand/TwitterIcon.js +1 -1
  50. package/lib/Icon/CallIcon.js +1 -1
  51. package/lib/Icon/CamIcon.js +1 -1
  52. package/lib/Icon/CameraIcon.js +1 -15
  53. package/lib/Icon/CertificateExpired.js +1 -1
  54. package/lib/Icon/CertificateRevoked.js +1 -1
  55. package/lib/Icon/CheckIcon.js +1 -1
  56. package/lib/Icon/CheckRoundIcon.js +1 -1
  57. package/lib/Icon/ChevronIcon.js +1 -15
  58. package/lib/Icon/CircleCloseIcon.js +1 -1
  59. package/lib/Icon/CloseIcon.js +1 -1
  60. package/lib/Icon/CopyIcon.js +1 -1
  61. package/lib/Icon/DeviceIcon.js +1 -1
  62. package/lib/Icon/DownloadIcon.js +1 -1
  63. package/lib/Icon/EditDocumentIcon.js +1 -15
  64. package/lib/Icon/EditIcon.js +1 -1
  65. package/lib/Icon/EnterIcon.js +1 -1
  66. package/lib/Icon/ErrorIcon.js +1 -1
  67. package/lib/Icon/ExpiresSoon.js +1 -1
  68. package/lib/Icon/FileIcon.js +1 -1
  69. package/lib/Icon/GifIcon.js +1 -1
  70. package/lib/Icon/GridIcon.js +1 -15
  71. package/lib/Icon/GroupIcon.js +1 -1
  72. package/lib/Icon/HangupIcon.js +1 -1
  73. package/lib/Icon/HideIcon.js +1 -1
  74. package/lib/Icon/ImageIcon.js +1 -1
  75. package/lib/Icon/InfoIcon.js +1 -1
  76. package/lib/Icon/InviteIcon.js +1 -1
  77. package/lib/Icon/LeaveIcon.js +1 -1
  78. package/lib/Icon/LinkIcon.js +1 -15
  79. package/lib/Icon/ListIcon.js +1 -1
  80. package/lib/Icon/LockIcon.js +1 -1
  81. package/lib/Icon/MLSVerified.js +1 -1
  82. package/lib/Icon/MessageIcon.js +1 -1
  83. package/lib/Icon/MinusIcon.js +1 -1
  84. package/lib/Icon/MoreIcon.js +1 -1
  85. package/lib/Icon/MuteIcon.js +1 -1
  86. package/lib/Icon/NotificationIcon.js +1 -1
  87. package/lib/Icon/NotificationOffIcon.js +1 -1
  88. package/lib/Icon/OptionsIcon.js +1 -1
  89. package/lib/Icon/OutlineCheck.js +1 -1
  90. package/lib/Icon/PeopleIcon.js +1 -15
  91. package/lib/Icon/PingIcon.js +1 -1
  92. package/lib/Icon/PlaneIcon.js +1 -1
  93. package/lib/Icon/PlusIcon.js +1 -1
  94. package/lib/Icon/ProfileIcon.js +1 -1
  95. package/lib/Icon/ProteusVerified.js +1 -1
  96. package/lib/Icon/RecordBoldIcon.js +4 -18
  97. package/lib/Icon/RecordIcon.js +1 -1
  98. package/lib/Icon/RecordPendingIcon.js +1 -1
  99. package/lib/Icon/ReloadIcon.js +1 -1
  100. package/lib/Icon/SVGIcon.js +2 -14
  101. package/lib/Icon/ScreenshareIcon.js +1 -1
  102. package/lib/Icon/SearchIcon.js +1 -1
  103. package/lib/Icon/ServicesIcon.js +1 -1
  104. package/lib/Icon/SettingsIcon.js +1 -1
  105. package/lib/Icon/ShowIcon.js +1 -1
  106. package/lib/Icon/SignIcon.js +1 -1
  107. package/lib/Icon/SpeakerIcon.js +1 -1
  108. package/lib/Icon/StarIcon.js +1 -1
  109. package/lib/Icon/SupportIcon.js +1 -1
  110. package/lib/Icon/TeamIcon.js +1 -1
  111. package/lib/Icon/TimedIcon.js +1 -1
  112. package/lib/Icon/TrashCrossIcon.js +1 -1
  113. package/lib/Icon/TrashIcon.js +1 -1
  114. package/lib/Icon/TriangleIcon.js +1 -15
  115. package/lib/Icon/UploadIcon.js +1 -1
  116. package/lib/Icon/VerificationShieldIcon.js +1 -4
  117. package/lib/Icon/WireIcon.js +1 -1
  118. package/lib/Identity/Animation.js +62 -88
  119. package/lib/Identity/Avatar.js +2 -2
  120. package/lib/Identity/AvatarGrid.js +4 -16
  121. package/lib/Identity/Logo.js +1 -15
  122. package/lib/Identity/colors-v2.js +25 -3
  123. package/lib/Identity/colors.js +11 -2
  124. package/lib/Layout/Box.d.ts +1 -1
  125. package/lib/Layout/Box.d.ts.map +1 -1
  126. package/lib/Layout/Box.js +1 -1
  127. package/lib/Layout/Column.d.ts +1 -1
  128. package/lib/Layout/Column.d.ts.map +1 -1
  129. package/lib/Layout/Column.js +2 -2
  130. package/lib/Layout/Container.js +6 -20
  131. package/lib/Layout/Content.d.ts +1 -1
  132. package/lib/Layout/Content.d.ts.map +1 -1
  133. package/lib/Layout/Content.js +1 -1
  134. package/lib/Layout/FlexBox.js +1 -1
  135. package/lib/Layout/Footer.d.ts.map +1 -1
  136. package/lib/Layout/Footer.js +1 -1
  137. package/lib/Layout/Header.d.ts +1 -1
  138. package/lib/Layout/Header.d.ts.map +1 -1
  139. package/lib/Layout/Header.js +1 -1
  140. package/lib/Layout/MatchMedia.js +8 -8
  141. package/lib/Layout/Spacer.js +1 -2
  142. package/lib/Layout/StyledApp.js +2 -16
  143. package/lib/Layout/headerMenu/HeaderMenu.js +2 -14
  144. package/lib/Layout/headerMenu/HeaderSubMenu.d.ts +1 -1
  145. package/lib/Layout/headerMenu/HeaderSubMenu.d.ts.map +1 -1
  146. package/lib/Layout/headerMenu/HeaderSubMenu.js +4 -16
  147. package/lib/Layout/headerMenu/MenuContent.js +14 -2
  148. package/lib/Layout/headerMenu/MenuItems.js +1 -1
  149. package/lib/Layout/headerMenu/MenuLink.js +28 -35
  150. package/lib/Layout/headerMenu/MenuOpenButton.js +1 -1
  151. package/lib/Layout/headerMenu/MenuScrollableItems.js +1 -1
  152. package/lib/Layout/headerMenu/MenuSubLink.js +15 -5
  153. package/lib/Menu/MenuModal.d.ts.map +1 -1
  154. package/lib/Menu/MenuModal.js +28 -35
  155. package/lib/Menu/TabBar.d.ts +1 -1
  156. package/lib/Menu/TabBar.d.ts.map +1 -1
  157. package/lib/Menu/TabBar.js +13 -22
  158. package/lib/Misc/ButtonGroup.js +38 -35
  159. package/lib/Misc/IconButton.js +63 -50
  160. package/lib/Misc/IsInViewport.js +2 -14
  161. package/lib/Misc/Loading.js +3 -15
  162. package/lib/Misc/Pagination.js +2 -14
  163. package/lib/Misc/Pill.js +1 -1
  164. package/lib/Misc/childrenWithDefaultProps.d.ts.map +1 -1
  165. package/lib/Misc/childrenWithDefaultProps.js +1 -1
  166. package/lib/Modal/Modal.js +11 -22
  167. package/lib/Modal/Overlay.d.ts +2 -2
  168. package/lib/Modal/Overlay.d.ts.map +1 -1
  169. package/lib/Modal/Overlay.js +5 -19
  170. package/lib/Text/Heading.js +49 -45
  171. package/lib/Text/Label.d.ts.map +1 -1
  172. package/lib/Text/Label.js +13 -23
  173. package/lib/Text/Line.js +1 -1
  174. package/lib/Text/Link.js +26 -31
  175. package/lib/Text/Paragraph.js +15 -23
  176. package/lib/Text/Text.js +6 -6
  177. package/lib/Text/TextLink.d.ts.map +1 -1
  178. package/lib/Text/TextLink.js +4 -16
  179. package/lib/Text/Title.js +5 -16
  180. package/lib/Theme/Theme.js +1 -1
  181. package/lib/mediaQueries.js +1 -1
  182. package/lib/util.js +1 -1
  183. package/package.json +3 -3
@@ -1,15 +1,4 @@
1
1
  "use strict";
2
- var __rest = (this && this.__rest) || function (s, e) {
3
- var t = {};
4
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
- t[p] = s[p];
6
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
- t[p[i]] = s[p[i]];
10
- }
11
- return t;
12
- };
13
2
  Object.defineProperty(exports, "__esModule", { value: true });
14
3
  exports.ErrorMessage = exports.filterErrorMessageProps = exports.errorMessageStyle = void 0;
15
4
  const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
@@ -17,17 +6,17 @@ const Identity_1 = require("../Identity");
17
6
  const Layout_1 = require("../Layout");
18
7
  const Text_1 = require("../Text");
19
8
  const util_1 = require("../util");
20
- const errorMessageStyle = (theme, _a) => {
21
- var { justify = 'flex-start', align = 'center' } = _a, props = __rest(_a, ["justify", "align"]);
22
- return (Object.assign(Object.assign({}, (0, Layout_1.flexBoxStyle)(Object.assign({ align, justify }, props))), { a: Object.assign({}, (0, Text_1.linkStyle)(theme, Object.assign({ bold: false, fontSize: theme.fontSizes.small, textTransform: 'none' }, props))), marginBottom: '12px' }));
23
- };
9
+ const errorMessageStyle = (theme, { justify = 'flex-start', align = 'center', ...props }) => ({
10
+ ...(0, Layout_1.flexBoxStyle)({ align, justify, ...props }),
11
+ a: {
12
+ ...(0, Text_1.linkStyle)(theme, { bold: false, fontSize: theme.fontSizes.small, textTransform: 'none', ...props }),
13
+ },
14
+ marginBottom: '12px',
15
+ });
24
16
  exports.errorMessageStyle = errorMessageStyle;
25
17
  const filterErrorMessageProps = (props) => {
26
18
  return (0, util_1.filterProps)((0, Layout_1.filterFlexBoxProps)(props), []);
27
19
  };
28
20
  exports.filterErrorMessageProps = filterErrorMessageProps;
29
- const ErrorMessage = (_a) => {
30
- var { children } = _a, props = __rest(_a, ["children"]);
31
- return ((0, jsx_runtime_1.jsx)(Layout_1.FlexBox, Object.assign({ css: (theme) => (0, exports.errorMessageStyle)(theme, props) }, props, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { color: Identity_1.COLOR_V2.RED_LIGHT_500, fontSize: '12px', css: { fontWeight: 400 }, children: children }) })));
32
- };
21
+ const ErrorMessage = ({ children, ...props }) => ((0, jsx_runtime_1.jsx)(Layout_1.FlexBox, { css: (theme) => (0, exports.errorMessageStyle)(theme, props), ...props, children: (0, jsx_runtime_1.jsx)(Text_1.Text, { color: Identity_1.COLOR_V2.RED_LIGHT_500, fontSize: '12px', css: { fontWeight: 400 }, children: children }) }));
33
22
  exports.ErrorMessage = ErrorMessage;
@@ -1 +1 @@
1
- {"version":3,"file":"Form.d.ts","sourceRoot":"","sources":["../../src/Form/Form.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,eAAO,MAAM,IAAI,UAAW,MAAM,SAAS,CAAC,eAAe,CAAC,qDAW3D,CAAC"}
1
+ {"version":3,"file":"Form.d.ts","sourceRoot":"","sources":["../../src/Form/Form.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,eAAO,MAAM,IAAI,UAAW,KAAK,CAAC,SAAS,CAAC,eAAe,CAAC,qDAW3D,CAAC"}
package/lib/Form/Form.js CHANGED
@@ -2,11 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Form = void 0;
4
4
  const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
5
- const Form = (props) => ((0, jsx_runtime_1.jsx)("form", Object.assign({ css: {
5
+ const Form = (props) => ((0, jsx_runtime_1.jsx)("form", { css: {
6
6
  display: 'flex',
7
7
  flexDirection: 'column',
8
8
  justifyContent: 'space-between',
9
9
  marginBottom: 0,
10
10
  width: '100%',
11
- } }, props)));
11
+ }, ...props }));
12
12
  exports.Form = Form;
@@ -1,15 +1,4 @@
1
1
  "use strict";
2
- var __rest = (this && this.__rest) || function (s, e) {
3
- var t = {};
4
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
- t[p] = s[p];
6
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
- t[p[i]] = s[p[i]];
10
- }
11
- return t;
12
- };
13
2
  Object.defineProperty(exports, "__esModule", { value: true });
14
3
  exports.IndicatorRangeInput = void 0;
15
4
  const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
@@ -34,9 +23,7 @@ const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
34
23
  const react_1 = require("react");
35
24
  const IndicatorRangeInput_styles_1 = require("./IndicatorRangeInput.styles");
36
25
  const InputLabel_1 = require("./InputLabel");
37
- exports.IndicatorRangeInput = (0, react_1.forwardRef)((_a, ref) => {
38
- var _b;
39
- var { id = Math.random().toString(), label, min = '0', max = '100', value = '0', onChange, onOptionClick, wrapperCSS, dataListOptions = [] } = _a, inputProps = __rest(_a, ["id", "label", "min", "max", "value", "onChange", "onOptionClick", "wrapperCSS", "dataListOptions"]);
26
+ exports.IndicatorRangeInput = (0, react_1.forwardRef)(({ id = Math.random().toString(), label, min = '0', max = '100', value = '0', onChange, onOptionClick, wrapperCSS, dataListOptions = [], ...inputProps }, ref) => {
40
27
  const minNum = Number(min);
41
28
  const isCustomSlider = !!dataListOptions.length;
42
29
  const listLength = dataListOptions.length - 1;
@@ -49,15 +36,15 @@ exports.IndicatorRangeInput = (0, react_1.forwardRef)((_a, ref) => {
49
36
  }
50
37
  return `${((valueNum - minNum) * 100) / (maxNum - minNum)}% 100%`;
51
38
  }, [isCustomSlider, valueNum, minNum, maxNum, listLength]);
52
- const valueText = ((_b = dataListOptions[valueNum]) === null || _b === void 0 ? void 0 : _b.heading)
39
+ const valueText = dataListOptions[valueNum]?.heading
53
40
  ? `${dataListOptions[valueNum].label} (${dataListOptions[valueNum].heading})`
54
41
  : dataListOptions[valueNum].label;
55
42
  return ((0, jsx_runtime_1.jsxs)("div", { css: { wrapperCSS, width: '100%' }, children: [label && ((0, jsx_runtime_1.jsx)(InputLabel_1.InputLabel, { css: (theme) => ({ fontSize: theme.fontSizes.base }), htmlFor: id, children: label })), (0, jsx_runtime_1.jsxs)("div", { css: IndicatorRangeInput_styles_1.containerStyles, children: [isCustomSlider && ((0, jsx_runtime_1.jsx)("div", { css: { position: 'relative', display: 'flex', marginBottom: '20px' }, children: dataListOptions.map((dataListOption, index) => ((0, jsx_runtime_1.jsx)("div", { css: (theme) => (0, IndicatorRangeInput_styles_1.headingStyle)(listLength, theme), onClick: () => {
56
- if (dataListOption === null || dataListOption === void 0 ? void 0 : dataListOption.heading) {
43
+ if (dataListOption?.heading) {
57
44
  onOptionClick(index);
58
45
  }
59
- }, children: dataListOption === null || dataListOption === void 0 ? void 0 : dataListOption.heading }, dataListOption.value))) })), (0, jsx_runtime_1.jsx)("input", Object.assign({ ref: ref, css: (theme) => (0, IndicatorRangeInput_styles_1.rangeStyles)(backgroundSize, valueNum, listLength, isCustomSlider, theme), id: id, name: id, min: minNum, max: maxNum, value: value, onChange: onChange, type: "range", list: "tickMarks" }, (isCustomSlider && {
60
- 'aria-valuetext': valueText,
61
- }), inputProps)), isCustomSlider && ((0, jsx_runtime_1.jsx)("datalist", { id: "tickMarks", css: (theme) => (0, IndicatorRangeInput_styles_1.dataListOption)(listLength, theme), children: dataListOptions.map((dataListOption, index) => ((0, jsx_runtime_1.jsx)("option", { value: dataListOption.value, label: dataListOption.label, onClick: () => onOptionClick(index) }, index))) }))] })] }));
46
+ }, children: dataListOption?.heading }, dataListOption.value))) })), (0, jsx_runtime_1.jsx)("input", { ref: ref, css: (theme) => (0, IndicatorRangeInput_styles_1.rangeStyles)(backgroundSize, valueNum, listLength, isCustomSlider, theme), id: id, name: id, min: minNum, max: maxNum, value: value, onChange: onChange, type: "range", list: "tickMarks", ...(isCustomSlider && {
47
+ 'aria-valuetext': valueText,
48
+ }), ...inputProps }), isCustomSlider && ((0, jsx_runtime_1.jsx)("datalist", { id: "tickMarks", css: (theme) => (0, IndicatorRangeInput_styles_1.dataListOption)(listLength, theme), children: dataListOptions.map((dataListOption, index) => ((0, jsx_runtime_1.jsx)("option", { value: dataListOption.value, label: dataListOption.label, onClick: () => onOptionClick(index) }, index))) }))] })] }));
62
49
  });
63
50
  exports.IndicatorRangeInput.displayName = 'IndicatorRangeInput';
@@ -27,13 +27,43 @@ const rangeStyles = (backgroundSize, value, listLength, isCustomSlider, theme) =
27
27
  const lastOptionThumbPosition = `calc(((100% - 12px) / (${listLength} * 2) - 6px) / 2)`;
28
28
  const isFirstOption = value === 0;
29
29
  const isLastOption = value === listLength;
30
- return Object.assign(Object.assign({ appearance: 'none', width: '100%', height: '8px', backgroundImage: `linear-gradient(${theme.general.primaryColor}, ${theme.general.primaryColor})`, backgroundColor: theme.IndicatorRangeInput.trackBg, backgroundSize: backgroundSize || '0% 100%', backgroundRepeat: 'no-repeat', display: 'flex', alignItems: 'center', borderRadius: '8px', marginBlock: '10px', zIndex: '1', position: 'relative' }, (0, util_1.manySelectors)(thumbSelectors, Object.assign(Object.assign({ '-webkit-appearance': 'none', height: '28px', width: '10px', borderRadius: '4px', background: theme.IndicatorRangeInput.thumb, cursor: 'pointer', border: 'none', boxShadow: '0px 2px 2px rgba(0, 0, 0, 0.25);', position: 'relative', top: '-9px', zIndex: '2' }, (isCustomSlider && isFirstOption && { left: firstOptionThumbPosition })), (isCustomSlider && isLastOption && { right: lastOptionThumbPosition })))), (0, util_1.manySelectors)(sliderSelectors, {
31
- '-webkit-appearance': 'none',
32
- boxShadow: 'none',
33
- background: 'transparent',
34
- height: '8px',
30
+ return {
31
+ appearance: 'none',
35
32
  width: '100%',
36
- }));
33
+ height: '8px',
34
+ backgroundImage: `linear-gradient(${theme.general.primaryColor}, ${theme.general.primaryColor})`,
35
+ backgroundColor: theme.IndicatorRangeInput.trackBg,
36
+ backgroundSize: backgroundSize || '0% 100%',
37
+ backgroundRepeat: 'no-repeat',
38
+ display: 'flex',
39
+ alignItems: 'center',
40
+ borderRadius: '8px',
41
+ marginBlock: '10px',
42
+ zIndex: '1',
43
+ position: 'relative',
44
+ ...(0, util_1.manySelectors)(thumbSelectors, {
45
+ '-webkit-appearance': 'none',
46
+ height: '28px',
47
+ width: '10px',
48
+ borderRadius: '4px',
49
+ background: theme.IndicatorRangeInput.thumb,
50
+ cursor: 'pointer',
51
+ border: 'none',
52
+ boxShadow: '0px 2px 2px rgba(0, 0, 0, 0.25);',
53
+ position: 'relative',
54
+ top: '-9px',
55
+ zIndex: '2',
56
+ ...(isCustomSlider && isFirstOption && { left: firstOptionThumbPosition }),
57
+ ...(isCustomSlider && isLastOption && { right: lastOptionThumbPosition }),
58
+ }),
59
+ ...(0, util_1.manySelectors)(sliderSelectors, {
60
+ '-webkit-appearance': 'none',
61
+ boxShadow: 'none',
62
+ background: 'transparent',
63
+ height: '8px',
64
+ width: '100%',
65
+ }),
66
+ };
37
67
  };
38
68
  exports.rangeStyles = rangeStyles;
39
69
  const headingStyle = (listLength, theme) => {
package/lib/Form/Input.js CHANGED
@@ -22,17 +22,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
22
22
  __setModuleDefault(result, mod);
23
23
  return result;
24
24
  };
25
- var __rest = (this && this.__rest) || function (s, e) {
26
- var t = {};
27
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
28
- t[p] = s[p];
29
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
30
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
31
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
32
- t[p[i]] = s[p[i]];
33
- }
34
- return t;
35
- };
36
25
  Object.defineProperty(exports, "__esModule", { value: true });
37
26
  exports.Input = exports.INPUT_GROUP = exports.INPUT_CLASSNAME = exports.inputStyle = void 0;
38
27
  const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
@@ -66,9 +55,16 @@ const inputStyle = (theme, { markInvalid = false, placeholderTextTransform = 'no
66
55
  textTransform: placeholderTextTransform,
67
56
  };
68
57
  return {
69
- '&::-moz-placeholder': Object.assign(Object.assign({}, placeholderStyle), { opacity: 1 }),
70
- '&::-ms-input-placeholder': Object.assign({}, placeholderStyle),
71
- '&::-webkit-input-placeholder': Object.assign({}, placeholderStyle),
58
+ '&::-moz-placeholder': {
59
+ ...placeholderStyle,
60
+ opacity: 1,
61
+ },
62
+ '&::-ms-input-placeholder': {
63
+ ...placeholderStyle,
64
+ },
65
+ '&::-webkit-input-placeholder': {
66
+ ...placeholderStyle,
67
+ },
72
68
  '&:hover': {
73
69
  boxShadow: !disabled && `0 0 0 1px ${theme.Input.borderHover}`,
74
70
  },
@@ -104,16 +100,23 @@ const centerInputAction = {
104
100
  top: '50%',
105
101
  transform: 'translateY(-50%)',
106
102
  };
107
- exports.Input = React.forwardRef((_a, ref) => {
108
- var { type, label, error, helperText, startContent = null, endContent = null, inputCSS = {}, wrapperCSS = {}, className = '' } = _a, props = __rest(_a, ["type", "label", "error", "helperText", "startContent", "endContent", "inputCSS", "wrapperCSS", "className"]);
103
+ exports.Input = React.forwardRef(({ type, label, error, helperText, startContent = null, endContent = null, inputCSS = {}, wrapperCSS = {}, className = '', ...props }, ref) => {
109
104
  const [togglePassword, setTogglePassword] = (0, react_1.useState)(false);
110
105
  const hasError = !!error;
111
106
  const isPasswordInput = type === 'password';
112
107
  const toggledPasswordType = togglePassword ? 'text' : 'password';
113
108
  const toggleSetPassword = () => setTogglePassword(prevState => !prevState);
114
- return ((0, jsx_runtime_1.jsxs)("div", { className: exports.INPUT_GROUP, css: (theme) => (Object.assign({ marginBottom: hasError ? '2px' : '20px', width: '100%', '&:focus-within label': {
109
+ return ((0, jsx_runtime_1.jsxs)("div", { className: exports.INPUT_GROUP, css: (theme) => ({
110
+ marginBottom: hasError ? '2px' : '20px',
111
+ width: '100%',
112
+ '&:focus-within label': {
115
113
  color: theme.general.primaryColor,
116
- } }, wrapperCSS)), children: [label && ((0, jsx_runtime_1.jsx)(InputLabel_1.InputLabel, { htmlFor: props.id, isRequired: props.required, markInvalid: props.markInvalid, children: label })), (0, jsx_runtime_1.jsxs)("div", { css: { marginBottom: hasError && '8px', position: 'relative' }, children: [startContent, (0, jsx_runtime_1.jsx)("input", Object.assign({ className: exports.INPUT_CLASSNAME, css: (theme) => (Object.assign(Object.assign({}, (0, exports.inputStyle)(theme, props, hasError)), inputCSS)), ref: ref, type: isPasswordInput ? toggledPasswordType : type, "aria-required": props.required }, filterInputProps(props))), endContent, hasError && !isPasswordInput && ((0, jsx_runtime_1.jsx)(Icon_1.ErrorIcon, { css: centerInputAction, width: 16, height: 16, "aria-hidden": "true" })), isPasswordInput && ((0, jsx_runtime_1.jsx)("button", { type: "button", "data-uie-name": !togglePassword ? 'do-show-password' : 'do-hide-password', css: Object.assign(Object.assign({}, centerInputAction), { background: 'transparent', border: 'none', cursor: 'pointer', padding: 0 }), onClick: toggleSetPassword, title: "Toggle password visibility", "aria-controls": props.id, "aria-expanded": togglePassword, children: togglePassword ? (0, jsx_runtime_1.jsx)(Icon_1.HideIcon, {}) : (0, jsx_runtime_1.jsx)(Icon_1.ShowIcon, {}) }))] }), !hasError && helperText && ((0, jsx_runtime_1.jsx)("p", { css: (theme) => ({
114
+ },
115
+ ...wrapperCSS,
116
+ }), children: [label && ((0, jsx_runtime_1.jsx)(InputLabel_1.InputLabel, { htmlFor: props.id, isRequired: props.required, markInvalid: props.markInvalid, children: label })), (0, jsx_runtime_1.jsxs)("div", { css: { marginBottom: hasError && '8px', position: 'relative' }, children: [startContent, (0, jsx_runtime_1.jsx)("input", { className: exports.INPUT_CLASSNAME, css: (theme) => ({
117
+ ...(0, exports.inputStyle)(theme, props, hasError),
118
+ ...inputCSS,
119
+ }), ref: ref, type: isPasswordInput ? toggledPasswordType : type, "aria-required": props.required, ...filterInputProps(props) }), endContent, hasError && !isPasswordInput && ((0, jsx_runtime_1.jsx)(Icon_1.ErrorIcon, { css: centerInputAction, width: 16, height: 16, "aria-hidden": "true" })), isPasswordInput && ((0, jsx_runtime_1.jsx)("button", { type: "button", "data-uie-name": !togglePassword ? 'do-show-password' : 'do-hide-password', css: { ...centerInputAction, background: 'transparent', border: 'none', cursor: 'pointer', padding: 0 }, onClick: toggleSetPassword, title: "Toggle password visibility", "aria-controls": props.id, "aria-expanded": togglePassword, children: togglePassword ? (0, jsx_runtime_1.jsx)(Icon_1.HideIcon, {}) : (0, jsx_runtime_1.jsx)(Icon_1.ShowIcon, {}) }))] }), !hasError && helperText && ((0, jsx_runtime_1.jsx)("p", { css: (theme) => ({
117
120
  fontSize: theme.fontSizes.small,
118
121
  fontWeight: 400,
119
122
  color: theme.Input.placeholderColor,
@@ -1,4 +1,4 @@
1
1
  import * as React from 'react';
2
2
  export type InputBlockProps<T = HTMLDivElement> = React.HTMLProps<T>;
3
- export declare const InputBlock: (props: InputBlockProps<HTMLDivElement>) => import("@emotion/react/jsx-runtime").JSX.Element;
3
+ export declare const InputBlock: (props: InputBlockProps) => import("@emotion/react/jsx-runtime").JSX.Element;
4
4
  //# sourceMappingURL=InputBlock.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"InputBlock.d.ts","sourceRoot":"","sources":["../../src/Form/InputBlock.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAS/B,MAAM,MAAM,eAAe,CAAC,CAAC,GAAG,cAAc,IAAI,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;AAgBrE,eAAO,MAAM,UAAU,8FAA8E,CAAC"}
1
+ {"version":3,"file":"InputBlock.d.ts","sourceRoot":"","sources":["../../src/Form/InputBlock.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAS/B,MAAM,MAAM,eAAe,CAAC,CAAC,GAAG,cAAc,IAAI,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;AAgBrE,eAAO,MAAM,UAAU,UAAW,eAAe,qDAAoD,CAAC"}
@@ -18,5 +18,5 @@ const inputBlockStyle = _ => ({
18
18
  marginBottom: 0,
19
19
  },
20
20
  });
21
- const InputBlock = (props) => (0, jsx_runtime_1.jsx)("div", Object.assign({ css: inputBlockStyle(props) }, props));
21
+ const InputBlock = (props) => (0, jsx_runtime_1.jsx)("div", { css: inputBlockStyle(props), ...props });
22
22
  exports.InputBlock = InputBlock;
@@ -1,26 +1,12 @@
1
1
  "use strict";
2
- var __rest = (this && this.__rest) || function (s, e) {
3
- var t = {};
4
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
- t[p] = s[p];
6
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
- t[p[i]] = s[p[i]];
10
- }
11
- return t;
12
- };
13
2
  Object.defineProperty(exports, "__esModule", { value: true });
14
3
  exports.InputLabel = void 0;
15
4
  const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
16
5
  const Identity_1 = require("../Identity");
17
- const InputLabel = (_a) => {
18
- var { htmlFor, markInvalid, isRequired, children } = _a, props = __rest(_a, ["htmlFor", "markInvalid", "isRequired", "children"]);
19
- return ((0, jsx_runtime_1.jsxs)("label", Object.assign({ htmlFor: htmlFor, css: (theme) => ({
20
- fontSize: theme.fontSizes.medium,
21
- fontWeight: 400,
22
- lineHeight: '1rem',
23
- color: markInvalid ? Identity_1.COLOR_V2.RED_LIGHT_500 : theme.Input.labelColor,
24
- }) }, props, { children: [children, isRequired && ((0, jsx_runtime_1.jsx)("span", { css: (theme) => ({ fontSize: theme.fontSizes.base, marginLeft: '4px', color: Identity_1.COLOR_V2.RED_LIGHT_500 }), children: "*" }))] })));
25
- };
6
+ const InputLabel = ({ htmlFor, markInvalid, isRequired, children, ...props }) => ((0, jsx_runtime_1.jsxs)("label", { htmlFor: htmlFor, css: (theme) => ({
7
+ fontSize: theme.fontSizes.medium,
8
+ fontWeight: 400,
9
+ lineHeight: '1rem',
10
+ color: markInvalid ? Identity_1.COLOR_V2.RED_LIGHT_500 : theme.Input.labelColor,
11
+ }), ...props, children: [children, isRequired && ((0, jsx_runtime_1.jsx)("span", { css: (theme) => ({ fontSize: theme.fontSizes.base, marginLeft: '4px', color: Identity_1.COLOR_V2.RED_LIGHT_500 }), children: "*" }))] }));
26
12
  exports.InputLabel = InputLabel;
@@ -1,15 +1,4 @@
1
1
  "use strict";
2
- var __rest = (this && this.__rest) || function (s, e) {
3
- var t = {};
4
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
- t[p] = s[p];
6
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
- t[p[i]] = s[p[i]];
10
- }
11
- return t;
12
- };
13
2
  Object.defineProperty(exports, "__esModule", { value: true });
14
3
  exports.InputSubmitCombo = exports.INPUT_SUBMIT_COMBO_CLASSNAME = void 0;
15
4
  const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
@@ -34,19 +23,27 @@ const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
34
23
  const Input_1 = require("./Input");
35
24
  const Identity_1 = require("../Identity");
36
25
  exports.INPUT_SUBMIT_COMBO_CLASSNAME = 'inputSubmitCombo';
37
- const InputSubmitCombo = (_a) => {
38
- var { children } = _a, props = __rest(_a, ["children"]);
39
- return ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: exports.INPUT_SUBMIT_COMBO_CLASSNAME, css: (theme) => (Object.assign(Object.assign({}, (0, Input_1.inputStyle)(theme, props)), { '&:focus-within': {
40
- boxShadow: `0 0 0 1px ${Identity_1.COLOR_V2.BLUE}`,
41
- }, [`.${Input_1.INPUT_GROUP}`]: {
42
- flexGrow: 1,
43
- }, [`.${Input_1.INPUT_CLASSNAME}`]: {
44
- '&:focus, &:invalid:not(:focus)': {
45
- boxShadow: 'none',
46
- },
26
+ const InputSubmitCombo = ({ children, ...props }) => ((0, jsx_runtime_1.jsx)("div", { className: exports.INPUT_SUBMIT_COMBO_CLASSNAME, css: (theme) => ({
27
+ ...(0, Input_1.inputStyle)(theme, props),
28
+ '&:focus-within': {
29
+ boxShadow: `0 0 0 1px ${Identity_1.COLOR_V2.BLUE}`,
30
+ },
31
+ [`.${Input_1.INPUT_GROUP}`]: {
32
+ flexGrow: 1,
33
+ },
34
+ [`.${Input_1.INPUT_CLASSNAME}`]: {
35
+ '&:focus, &:invalid:not(:focus)': {
47
36
  boxShadow: 'none',
48
- margin: '0 8px 0 0',
49
- padding: '0 0 0 16px',
50
- }, alignItems: 'center', display: 'flex', height: '49px', justifyContent: 'space-between', marginBottom: '4px', paddingLeft: 0 })) }, props, { children: children })));
51
- };
37
+ },
38
+ boxShadow: 'none',
39
+ margin: '0 8px 0 0',
40
+ padding: '0 0 0 16px',
41
+ },
42
+ alignItems: 'center',
43
+ display: 'flex',
44
+ height: '49px', // needs a bit more space to not overlap with the `boxShadow` from `:focus`
45
+ justifyContent: 'space-between',
46
+ marginBottom: '4px',
47
+ paddingLeft: 0,
48
+ }), ...props, children: children }));
52
49
  exports.InputSubmitCombo = InputSubmitCombo;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { CSSObject } from '@emotion/react';
3
2
  import { TextProps } from '../Text';
4
3
  export interface RangeInputProps<T = HTMLInputElement> extends TextProps<T> {
@@ -1 +1 @@
1
- {"version":3,"file":"RangeInput.d.ts","sourceRoot":"","sources":["../../src/Form/RangeInput.tsx"],"names":[],"mappings":";AAqBA,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAWzC,OAAO,EAAC,SAAS,EAAC,MAAM,SAAS,CAAC;AAElC,MAAM,WAAW,eAAe,CAAC,CAAC,GAAG,gBAAgB,CAAE,SAAQ,SAAS,CAAC,CAAC,CAAC;IACzE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,SAAS,CAAC;CACxB;AAED,eAAO,MAAM,UAAU,6IAgDtB,CAAC"}
1
+ {"version":3,"file":"RangeInput.d.ts","sourceRoot":"","sources":["../../src/Form/RangeInput.tsx"],"names":[],"mappings":"AAqBA,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAWzC,OAAO,EAAC,SAAS,EAAC,MAAM,SAAS,CAAC;AAElC,MAAM,WAAW,eAAe,CAAC,CAAC,GAAG,gBAAgB,CAAE,SAAQ,SAAS,CAAC,CAAC,CAAC;IACzE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,SAAS,CAAC;CACxB;AAED,eAAO,MAAM,UAAU,6IAgDtB,CAAC"}
@@ -1,15 +1,4 @@
1
1
  "use strict";
2
- var __rest = (this && this.__rest) || function (s, e) {
3
- var t = {};
4
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
- t[p] = s[p];
6
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
- t[p[i]] = s[p[i]];
10
- }
11
- return t;
12
- };
13
2
  Object.defineProperty(exports, "__esModule", { value: true });
14
3
  exports.RangeInput = void 0;
15
4
  const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
@@ -34,12 +23,11 @@ const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
34
23
  const react_1 = require("react");
35
24
  const InputLabel_1 = require("./InputLabel");
36
25
  const RangeInput_styles_1 = require("./RangeInput.styles");
37
- exports.RangeInput = (0, react_1.forwardRef)((_a, ref) => {
38
- var { id = Math.random().toString(), label, minValueLabel, maxValueLabel, min = '0', max = '100', value = '0', onChange, wrapperCSS } = _a, inputProps = __rest(_a, ["id", "label", "minValueLabel", "maxValueLabel", "min", "max", "value", "onChange", "wrapperCSS"]);
26
+ exports.RangeInput = (0, react_1.forwardRef)(({ id = Math.random().toString(), label, minValueLabel, maxValueLabel, min = '0', max = '100', value = '0', onChange, wrapperCSS, ...inputProps }, ref) => {
39
27
  const minNum = Number(min);
40
28
  const maxNum = Number(max);
41
29
  const valueNum = Number(value);
42
30
  const backgroundSize = `${((valueNum - minNum) * 100) / (maxNum - minNum)}% 100%`;
43
- return ((0, jsx_runtime_1.jsxs)("div", { css: wrapperCSS, children: [label && (0, jsx_runtime_1.jsx)(InputLabel_1.InputLabel, { htmlFor: id, children: label }), (0, jsx_runtime_1.jsxs)("div", { css: RangeInput_styles_1.rangeInputWrapperStyles, children: [minValueLabel && ((0, jsx_runtime_1.jsx)("span", { css: (theme) => (0, RangeInput_styles_1.getValueLabelStyles)(theme, RangeInput_styles_1.ValueLabelPosition.LEFT), children: minValueLabel })), maxValueLabel && ((0, jsx_runtime_1.jsx)("span", { css: (theme) => (0, RangeInput_styles_1.getValueLabelStyles)(theme, RangeInput_styles_1.ValueLabelPosition.RIGHT), children: maxValueLabel })), (0, jsx_runtime_1.jsx)("input", Object.assign({ ref: ref, css: (theme) => (0, RangeInput_styles_1.getImageCropZoomInputStyles)(theme, backgroundSize), id: id, name: id, min: min, max: max, value: value, onChange: onChange, type: "range" }, inputProps))] })] }));
31
+ return ((0, jsx_runtime_1.jsxs)("div", { css: wrapperCSS, children: [label && (0, jsx_runtime_1.jsx)(InputLabel_1.InputLabel, { htmlFor: id, children: label }), (0, jsx_runtime_1.jsxs)("div", { css: RangeInput_styles_1.rangeInputWrapperStyles, children: [minValueLabel && ((0, jsx_runtime_1.jsx)("span", { css: (theme) => (0, RangeInput_styles_1.getValueLabelStyles)(theme, RangeInput_styles_1.ValueLabelPosition.LEFT), children: minValueLabel })), maxValueLabel && ((0, jsx_runtime_1.jsx)("span", { css: (theme) => (0, RangeInput_styles_1.getValueLabelStyles)(theme, RangeInput_styles_1.ValueLabelPosition.RIGHT), children: maxValueLabel })), (0, jsx_runtime_1.jsx)("input", { ref: ref, css: (theme) => (0, RangeInput_styles_1.getImageCropZoomInputStyles)(theme, backgroundSize), id: id, name: id, min: min, max: max, value: value, onChange: onChange, type: "range", ...inputProps })] })] }));
44
32
  });
45
33
  exports.RangeInput.displayName = 'RangeInput';
@@ -27,21 +27,33 @@ exports.rangeInputWrapperStyles = {
27
27
  };
28
28
  const thumbSelectors = ['&::-webkit-slider-thumb', '&::-moz-range-thumb', '&::-ms-thumb'];
29
29
  const sliderSelectors = ['&::-webkit-slider-runnable-track', '&::-moz-range-track', '&::-ms-track'];
30
- const getImageCropZoomInputStyles = (theme, backgroundSize) => (Object.assign(Object.assign({ display: 'block', '-webkit-appearance': 'none', width: '100%', height: '8px', background: Identity_1.COLOR_V2.GRAY_60, borderRadius: '4px', backgroundImage: `linear-gradient(${theme.general.primaryColor}, ${theme.general.primaryColor})`, backgroundSize: backgroundSize || '0% 100%', backgroundRepeat: 'no-repeat' }, (0, util_1.manySelectors)(thumbSelectors, {
30
+ const getImageCropZoomInputStyles = (theme, backgroundSize) => ({
31
+ display: 'block',
31
32
  '-webkit-appearance': 'none',
32
- height: '18px',
33
- width: '18px',
34
- borderRadius: '50%',
35
- background: Identity_1.COLOR_V2.GRAY_80,
36
- cursor: 'pointer',
37
- border: 'none',
38
- boxShadow: 'none',
39
- })), (0, util_1.manySelectors)(sliderSelectors, {
40
- '-webkit-appearance': 'none',
41
- boxShadow: 'none',
42
- border: 'none',
43
- background: 'transparent',
44
- })));
33
+ width: '100%',
34
+ height: '8px',
35
+ background: Identity_1.COLOR_V2.GRAY_60,
36
+ borderRadius: '4px',
37
+ backgroundImage: `linear-gradient(${theme.general.primaryColor}, ${theme.general.primaryColor})`,
38
+ backgroundSize: backgroundSize || '0% 100%',
39
+ backgroundRepeat: 'no-repeat',
40
+ ...(0, util_1.manySelectors)(thumbSelectors, {
41
+ '-webkit-appearance': 'none',
42
+ height: '18px',
43
+ width: '18px',
44
+ borderRadius: '50%',
45
+ background: Identity_1.COLOR_V2.GRAY_80,
46
+ cursor: 'pointer',
47
+ border: 'none',
48
+ boxShadow: 'none',
49
+ }),
50
+ ...(0, util_1.manySelectors)(sliderSelectors, {
51
+ '-webkit-appearance': 'none',
52
+ boxShadow: 'none',
53
+ border: 'none',
54
+ background: 'transparent',
55
+ }),
56
+ });
45
57
  exports.getImageCropZoomInputStyles = getImageCropZoomInputStyles;
46
58
  var ValueLabelPosition;
47
59
  (function (ValueLabelPosition) {
@@ -1,15 +1,4 @@
1
1
  "use strict";
2
- var __rest = (this && this.__rest) || function (s, e) {
3
- var t = {};
4
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
- t[p] = s[p];
6
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
- t[p[i]] = s[p[i]];
10
- }
11
- return t;
12
- };
13
2
  Object.defineProperty(exports, "__esModule", { value: true });
14
3
  exports.RoundIconButton = exports.roundIconButtonStyle = void 0;
15
4
  const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
@@ -17,12 +6,21 @@ const Button_1 = require("./Button");
17
6
  const Button_styles_1 = require("./Button.styles");
18
7
  const Identity_1 = require("../Identity");
19
8
  const Misc_1 = require("../Misc/");
20
- const roundIconButtonStyle = (theme, props) => (Object.assign(Object.assign({}, (0, Button_styles_1.buttonStyle)(theme, props)), { alignItems: 'center', borderRadius: '50%', display: 'flex', height: `${props.size}px`, justifyContent: 'center', lineHeight: 'initial', margin: '0 auto', minWidth: `${props.size}px`, padding: 0, width: `${props.size}px` }));
9
+ const roundIconButtonStyle = (theme, props) => ({
10
+ ...(0, Button_styles_1.buttonStyle)(theme, props),
11
+ alignItems: 'center',
12
+ borderRadius: '50%',
13
+ display: 'flex',
14
+ height: `${props.size}px`,
15
+ justifyContent: 'center',
16
+ lineHeight: 'initial',
17
+ margin: '0 auto',
18
+ minWidth: `${props.size}px`,
19
+ padding: 0,
20
+ width: `${props.size}px`,
21
+ });
21
22
  exports.roundIconButtonStyle = roundIconButtonStyle;
22
- const RoundIconButton = (_a) => {
23
- var { children } = _a, props = __rest(_a, ["children"]);
24
- return ((0, jsx_runtime_1.jsx)("button", Object.assign({ css: (theme) => (0, exports.roundIconButtonStyle)(theme, props) }, (0, Button_1.filterButtonProps)(props), { children: (0, Misc_1.childrenWithDefaultProps)({ children, defaultProps: { color: Identity_1.COLOR.WHITE } }) })));
25
- };
23
+ const RoundIconButton = ({ children, ...props }) => ((0, jsx_runtime_1.jsx)("button", { css: (theme) => (0, exports.roundIconButtonStyle)(theme, props), ...(0, Button_1.filterButtonProps)(props), children: (0, Misc_1.childrenWithDefaultProps)({ children, defaultProps: { color: Identity_1.COLOR.WHITE } }) }));
26
24
  exports.RoundIconButton = RoundIconButton;
27
25
  exports.RoundIconButton.defaultProps = {
28
26
  backgroundColor: Identity_1.COLOR.BLUE,
@@ -1 +1 @@
1
- {"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../src/Form/Select.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAC,YAAY,EAAC,MAAM,OAAO,CAAC;AAEnC,OAAO,EAAC,SAAS,EAAW,MAAM,gBAAgB,CAAC;AACnD,OAAoB,EAAC,SAAS,EAAe,MAAM,cAAc,CAAC;AAClE,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,iDAAiD,CAAC;AAiBvF,MAAM,MAAM,MAAM,GAAG;IACnB,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,UAAU,WAAW,CAAC,OAAO,SAAS,OAAO,EAAE,KAAK,SAAS,SAAS,CAAC,MAAM,CAAC,CAC5E,SAAQ,iBAAiB,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,CAAC;IACjD,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,CAAC;IAC5B,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,eAAO,MAAM,MAAM,4OAehB,YAAY,OAAO,EAAE,KAAK,CAAC,qDAoE7B,CAAC"}
1
+ {"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../src/Form/Select.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAC,YAAY,EAAC,MAAM,OAAO,CAAC;AAEnC,OAAO,EAAC,SAAS,EAAW,MAAM,gBAAgB,CAAC;AACnD,OAAoB,EAAC,SAAS,EAAe,MAAM,cAAc,CAAC;AAClE,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,iDAAiD,CAAC;AAiBvF,MAAM,MAAM,MAAM,GAAG;IACnB,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,UAAU,WAAW,CAAC,OAAO,SAAS,OAAO,EAAE,KAAK,SAAS,SAAS,CAAC,MAAM,CAAC,CAC5E,SAAQ,iBAAiB,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,CAAC;IACjD,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,CAAC;IAC5B,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,eAAO,MAAM,MAAM,GAAI,OAAO,SAAS,OAAO,UAAU,KAAK,SAAS,SAAS,CAAC,MAAM,CAAC,yKAepF,WAAW,CAAC,OAAO,EAAE,KAAK,CAAC,qDAoE7B,CAAC"}
@@ -1,15 +1,4 @@
1
1
  "use strict";
2
- var __rest = (this && this.__rest) || function (s, e) {
3
- var t = {};
4
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
- t[p] = s[p];
6
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
- t[p[i]] = s[p[i]];
10
- }
11
- return t;
12
- };
13
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
14
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
15
4
  };
@@ -22,15 +11,19 @@ const InputLabel_1 = require("./InputLabel");
22
11
  const SelectComponents_1 = require("./SelectComponents");
23
12
  const SelectStyles_1 = require("./SelectStyles");
24
13
  const enums_1 = require("../types/enums");
25
- const Select = (_a) => {
26
- var { id, label, error, helperText, disabled = false, dataUieName, options, isMulti, wrapperCSS = {}, markInvalid = false, required = false, isSearchable = false, overlayMenu = true } = _a, props = __rest(_a, ["id", "label", "error", "helperText", "disabled", "dataUieName", "options", "isMulti", "wrapperCSS", "markInvalid", "required", "isSearchable", "overlayMenu"]);
14
+ const Select = ({ id, label, error, helperText, disabled = false, dataUieName, options, isMulti, wrapperCSS = {}, markInvalid = false, required = false, isSearchable = false, overlayMenu = true, ...props }) => {
27
15
  const theme = (0, react_1.useTheme)();
28
16
  const hasError = !!error;
29
17
  return ((0, jsx_runtime_1.jsxs)("div", {
30
18
  // eslint-disable-next-line jsx-a11y/no-autofocus
31
- autoFocus: (0, SelectComponents_1.isGroup)(options), css: (theme) => (Object.assign({ marginBottom: markInvalid ? '2px' : '20px', width: '100%', '&:focus-within label': {
19
+ autoFocus: (0, SelectComponents_1.isGroup)(options), css: (theme) => ({
20
+ marginBottom: markInvalid ? '2px' : '20px',
21
+ width: '100%',
22
+ '&:focus-within label': {
32
23
  color: theme.general.primaryColor,
33
- } }, wrapperCSS)), "data-uie-name": dataUieName, children: [label && ((0, jsx_runtime_1.jsx)(InputLabel_1.InputLabel, { htmlFor: id, markInvalid: markInvalid, isRequired: required, children: label })), (0, jsx_runtime_1.jsx)(react_select_1.default, Object.assign({ id: id, styles: (0, SelectStyles_1.customStyles)({
24
+ },
25
+ ...wrapperCSS,
26
+ }), "data-uie-name": dataUieName, children: [label && ((0, jsx_runtime_1.jsx)(InputLabel_1.InputLabel, { htmlFor: id, markInvalid: markInvalid, isRequired: required, children: label })), (0, jsx_runtime_1.jsx)(react_select_1.default, { id: id, styles: (0, SelectStyles_1.customStyles)({
34
27
  theme: theme,
35
28
  markInvalid,
36
29
  menuPosition: overlayMenu ? 'absolute' : 'relative',
@@ -41,7 +34,7 @@ const Select = (_a) => {
41
34
  Menu: (0, SelectComponents_1.Menu)(dataUieName),
42
35
  ValueContainer: SelectComponents_1.ValueContainer,
43
36
  IndicatorsContainer: SelectComponents_1.IndicatorsContainer,
44
- }, tabIndex: enums_1.TabIndex.UNFOCUSABLE, isDisabled: disabled, hideSelectedOptions: false, isSearchable: isSearchable, isClearable: false, closeMenuOnSelect: !isMulti, isMulti: isMulti, options: options }, props)), !hasError && helperText && ((0, jsx_runtime_1.jsx)("p", { css: (theme) => ({
37
+ }, tabIndex: enums_1.TabIndex.UNFOCUSABLE, isDisabled: disabled, hideSelectedOptions: false, isSearchable: isSearchable, isClearable: false, closeMenuOnSelect: !isMulti, isMulti: isMulti, options: options, ...props }), !hasError && helperText && ((0, jsx_runtime_1.jsx)("p", { css: (theme) => ({
45
38
  fontSize: theme.fontSizes.small,
46
39
  fontWeight: 400,
47
40
  color: theme.Input.labelColor,
@@ -1 +1 @@
1
- {"version":3,"file":"SelectComponents.d.ts","sourceRoot":"","sources":["../../src/Form/SelectComponents.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAEL,cAAc,EACd,sBAAsB,EACtB,WAAW,EACX,mBAAmB,EACnB,wBAAwB,EACxB,SAAS,EACT,SAAS,EACT,eAAe,EAChB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;AAOhC,eAAO,MAAM,eAAe,UAAW,cAAc,qDAMpD,CAAC;AAEF,eAAO,MAAM,OAAO,YAAa,gBAAgB,MAAM,EAAE,UAAU,MAAM,CAAC,CAAC,mCAE1E,CAAC;AAEF,eAAO,MAAM,iBAAiB,UAAW,sBAAsB,qDAS9D,CAAC;AAGF,eAAO,MAAM,YAAY,gBAAiB,MAAM,aAAa,YAAY,MAAM,CAAC,qDAsD/E,CAAC;AAGF,eAAO,MAAM,IAAI,gBAAiB,MAAM,aAAa,SAAS,qDAc7D,CAAC;AAEF,eAAO,MAAM,WAAW,qBAqBvB,CAAC;AAEF,eAAO,MAAM,cAAc,+BAA8B,oBAAoB,MAAM,CAAC,qDAInF,CAAC;AAEF,eAAO,MAAM,mBAAmB,+BAA8B,yBAAyB,MAAM,CAAC,qDAW7F,CAAC"}
1
+ {"version":3,"file":"SelectComponents.d.ts","sourceRoot":"","sources":["../../src/Form/SelectComponents.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAEL,cAAc,EACd,sBAAsB,EACtB,WAAW,EACX,mBAAmB,EACnB,wBAAwB,EACxB,SAAS,EACT,SAAS,EACT,eAAe,EAChB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;AAOhC,eAAO,MAAM,eAAe,UAAW,cAAc,qDAMpD,CAAC;AAEF,eAAO,MAAM,OAAO,YAAa,eAAe,CAAC,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC,KAAG,OAAO,IAAI,SAAS,CAAC,MAAM,CAAC,EAEzG,CAAC;AAEF,eAAO,MAAM,iBAAiB,UAAW,sBAAsB,qDAS9D,CAAC;AAGF,eAAO,MAAM,YAAY,gBAAiB,MAAM,aAAa,WAAW,CAAC,MAAM,CAAC,qDAsD/E,CAAC;AAGF,eAAO,MAAM,IAAI,gBAAiB,MAAM,aAAa,SAAS,qDAc7D,CAAC;AAEF,eAAO,MAAM,WAAW,qBAqBvB,CAAC;AAEF,eAAO,MAAM,cAAc,+BAA8B,mBAAmB,CAAC,MAAM,CAAC,qDAInF,CAAC;AAEF,eAAO,MAAM,mBAAmB,+BAA8B,wBAAwB,CAAC,MAAM,CAAC,qDAW7F,CAAC"}