@pedidopago/ui 1.1.4 → 1.1.5
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.
- package/dist/components/Badge/badge.test.js +22 -5
- package/dist/components/Badge/index.js +3 -5
- package/dist/components/Badge/styles.d.ts +0 -4
- package/dist/components/Badge/styles.d.ts.map +1 -1
- package/dist/components/Badge/styles.js +3 -11
- package/dist/components/Badge/types.d.ts +2 -1
- package/dist/components/Badge/types.d.ts.map +1 -1
- package/dist/components/Button/index.d.ts +2 -2
- package/dist/components/Button/index.d.ts.map +1 -1
- package/dist/components/Button/styles.d.ts.map +1 -1
- package/dist/components/Button/styles.js +10 -7
- package/dist/components/Icon/types.d.ts +1 -1
- package/dist/components/Icon/types.d.ts.map +1 -1
- package/dist/components/Input/styles.d.ts.map +1 -1
- package/dist/components/Input/styles.js +114 -31
- package/dist/components/List/styles.d.ts.map +1 -1
- package/dist/components/List/styles.js +8 -2
- package/dist/components/List/types.d.ts +1 -2
- package/dist/components/List/types.d.ts.map +1 -1
- package/dist/components/Modal/index.d.ts +1 -1
- package/dist/components/Modal/index.d.ts.map +1 -1
- package/dist/components/Modal/index.js +5 -1
- package/dist/components/Modal/modal.test.js +13 -0
- package/dist/components/Modal/styles.d.ts +2 -0
- package/dist/components/Modal/styles.d.ts.map +1 -1
- package/dist/components/Modal/styles.js +1 -1
- package/dist/components/Modal/types.d.ts +4 -0
- package/dist/components/Modal/types.d.ts.map +1 -1
- package/dist/components/Progress/style.d.ts.map +1 -1
- package/dist/components/Progress/style.js +1 -1
- package/dist/components/RadioInput/components/ChoiceList/index.d.ts.map +1 -1
- package/dist/components/RadioInput/components/ChoiceList/index.js +3 -0
- package/dist/components/RadioInput/styles.d.ts.map +1 -1
- package/dist/components/RadioInput/styles.js +4 -1
- package/dist/components/SelectInput/components/OptionsArea/OptionsArea.d.ts.map +1 -1
- package/dist/components/SelectInput/components/OptionsArea/OptionsArea.js +27 -9
- package/dist/components/SelectInput/components/OptionsArea/index.js +1 -1
- package/dist/components/SelectInput/components/SelectArea/ButtonsArea.d.ts.map +1 -1
- package/dist/components/SelectInput/components/SelectArea/ButtonsArea.js +2 -2
- package/dist/components/SelectInput/components/SelectArea/Label.d.ts.map +1 -1
- package/dist/components/SelectInput/components/SelectArea/Label.js +10 -10
- package/dist/components/SelectInput/components/SelectArea/SelectAreaWrapper.d.ts.map +1 -1
- package/dist/components/SelectInput/components/SelectArea/SelectAreaWrapper.js +5 -2
- package/dist/components/SelectInput/components/SelectArea/SelectedOptionsArea.d.ts +4 -0
- package/dist/components/SelectInput/components/SelectArea/SelectedOptionsArea.d.ts.map +1 -1
- package/dist/components/SelectInput/components/SelectArea/SelectedOptionsArea.js +35 -10
- package/dist/components/SelectInput/components/SelectArea/index.d.ts +2 -1
- package/dist/components/SelectInput/components/SelectArea/index.d.ts.map +1 -1
- package/dist/components/SelectInput/components/SelectArea/index.js +9 -2
- package/dist/components/SelectInput/index.d.ts.map +1 -1
- package/dist/components/SelectInput/index.js +9 -9
- package/dist/components/SelectInput/types.d.ts +1 -0
- package/dist/components/SelectInput/types.d.ts.map +1 -1
- package/dist/components/Slider/components/SliderPointer.js +2 -1
- package/dist/components/Switch/index.d.ts.map +1 -1
- package/dist/components/Switch/index.js +12 -8
- package/dist/components/Switch/styles.d.ts.map +1 -1
- package/dist/components/Switch/styles.js +14 -2
- package/dist/components/Switch/switch.test.d.ts +2 -0
- package/dist/components/Switch/switch.test.d.ts.map +1 -0
- package/dist/components/Switch/switch.test.js +276 -0
- package/dist/components/Switch/types.d.ts +4 -2
- package/dist/components/Switch/types.d.ts.map +1 -1
- package/dist/components/Table/index.d.ts +1 -1
- package/dist/components/Table/index.d.ts.map +1 -1
- package/dist/components/Table/index.js +17 -16
- package/dist/components/Table/styles.js +4 -2
- package/dist/components/Table/table.test.js +48 -16
- package/dist/components/Table/types.d.ts +6 -4
- package/dist/components/Table/types.d.ts.map +1 -1
- package/dist/components/TextAreaInput/index.d.ts +2 -2
- package/dist/components/TextAreaInput/index.d.ts.map +1 -1
- package/dist/components/TextAreaInput/index.js +19 -11
- package/dist/components/TextAreaInput/styles.d.ts.map +1 -1
- package/dist/components/TextAreaInput/styles.js +4 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/index.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/index.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC,wBAAgB,KAAK,CAAC,EACpB,IAAI,EACJ,IAAa,EACb,GAAY,EACZ,OAAkB,EAClB,OAAkB,EAClB,OAAe,EACf,OAAe,EACf,aAAqB,EACrB,QAAQ,EACR,SAAS,EACT,OAAO,EACP,QAAQ,GACT,EAAE,WAAW,eA8Eb"}
|
|
@@ -11,7 +11,6 @@ var _styles = require("./styles");
|
|
|
11
11
|
|
|
12
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
13
|
|
|
14
|
-
// Styles
|
|
15
14
|
function Modal(_ref) {
|
|
16
15
|
var open = _ref.open,
|
|
17
16
|
_ref$left = _ref.left,
|
|
@@ -26,7 +25,10 @@ function Modal(_ref) {
|
|
|
26
25
|
offsetX = _ref$offsetX === void 0 ? '0px' : _ref$offsetX,
|
|
27
26
|
_ref$offsetY = _ref.offsetY,
|
|
28
27
|
offsetY = _ref$offsetY === void 0 ? '0px' : _ref$offsetY,
|
|
28
|
+
_ref$hideScrollBar = _ref.hideScrollBar,
|
|
29
|
+
hideScrollBar = _ref$hideScrollBar === void 0 ? false : _ref$hideScrollBar,
|
|
29
30
|
maxWidth = _ref.maxWidth,
|
|
31
|
+
maxHeight = _ref.maxHeight,
|
|
30
32
|
onClose = _ref.onClose,
|
|
31
33
|
children = _ref.children;
|
|
32
34
|
// TODO
|
|
@@ -105,6 +107,8 @@ function Modal(_ref) {
|
|
|
105
107
|
pointerEvents: open ? 'auto' : 'none'
|
|
106
108
|
},
|
|
107
109
|
maxWidth: maxWidth,
|
|
110
|
+
maxHeight: maxHeight,
|
|
111
|
+
hideScrollBar: hideScrollBar,
|
|
108
112
|
children: children
|
|
109
113
|
})]
|
|
110
114
|
});
|
|
@@ -179,4 +179,17 @@ describe('Modal', function () {
|
|
|
179
179
|
maxWidth: '200px'
|
|
180
180
|
});
|
|
181
181
|
});
|
|
182
|
+
it('should display modal with maxHeight', function () {
|
|
183
|
+
var modal = setup({
|
|
184
|
+
open: true,
|
|
185
|
+
onClose: function onClose() {},
|
|
186
|
+
maxHeight: '200px',
|
|
187
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
188
|
+
children: "Hello world!"
|
|
189
|
+
})
|
|
190
|
+
});
|
|
191
|
+
expect(modal.modal).toHaveStyle({
|
|
192
|
+
maxHeight: '200px'
|
|
193
|
+
});
|
|
194
|
+
});
|
|
182
195
|
});
|
|
@@ -4,7 +4,9 @@ export declare const Container: import("@emotion/styled").StyledComponent<{
|
|
|
4
4
|
theme?: Theme | undefined;
|
|
5
5
|
as?: import("react").ElementType<any> | undefined;
|
|
6
6
|
} & {
|
|
7
|
+
maxHeight?: string | undefined;
|
|
7
8
|
maxWidth?: string | undefined;
|
|
9
|
+
hideScrollBar?: boolean | undefined;
|
|
8
10
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
9
11
|
export declare const Overlay: import("@emotion/styled").StyledComponent<{
|
|
10
12
|
theme?: Theme | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/styles.ts"],"names":[],"mappings":";AACA,OAAO,EAAO,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAE5C,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/styles.ts"],"names":[],"mappings":";AACA,OAAO,EAAO,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAE5C,eAAO,MAAM,SAAS;;;;;;;yGAwDpB,CAAC;AAEH,eAAO,MAAM,OAAO;;;yGAelB,CAAC"}
|
|
@@ -17,7 +17,7 @@ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(
|
|
|
17
17
|
|
|
18
18
|
var Container = _styled.default.div(function (props) {
|
|
19
19
|
var theme = props.theme;
|
|
20
|
-
return (0, _react.css)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n border-radius: ", ";\n\n width: calc(100% - 32px);\n\n max-width: ", ";\n
|
|
20
|
+
return (0, _react.css)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n border-radius: ", ";\n\n width: calc(100% - 32px);\n\n max-width: ", ";\n max-height: ", ";\n position: fixed;\n\n overflow-y: auto;\n overflow-x: hidden;\n\n &::-webkit-scrollbar {\n width: 6px;\n }\n\n &::-webkit-scrollbar-track {\n background: transparent;\n }\n\n &::-webkit-scrollbar-thumb {\n border-radius: ", ";\n background: ", ";\n }\n\n ", "\n\n background: ", ";\n box-shadow: ", ";\n\n transition: transform ease ", ", opacity linear ", ";\n\n z-index: ", ";\n\n &:focus {\n outline: 3px solid black;\n }\n "])), theme.borderRadius.default, props.maxWidth, props.maxHeight, props.theme.borderRadius.default, props.theme.colors.primary.default, props.hideScrollBar && "::-webkit-scrollbar {\n display: none;\n }\n \n scrollbar-width: none;\n \n -ms-overflow-style: none;", theme.colorMode === 'light' ? theme.colors.background.light : theme.colors.neutral.black, theme.colorMode === 'light' ? theme.shadow.level1 : "0 4px 8px ".concat(theme.colors.neutral.black), theme.transition.speed, theme.transition.speed, theme.zIndex.level24);
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
exports.Container = Container;
|
|
@@ -22,8 +22,12 @@ export interface IModalProps {
|
|
|
22
22
|
offsetY?: string;
|
|
23
23
|
/** The max width of the Modal. */
|
|
24
24
|
maxWidth?: string;
|
|
25
|
+
/** The max height of the Modal. */
|
|
26
|
+
maxHeight?: string;
|
|
25
27
|
/** Handler called once the Modal is triggered to close. */
|
|
26
28
|
onClose: () => void;
|
|
29
|
+
/** Optional. Will hide the scroll bar if the content inside a container is too big */
|
|
30
|
+
hideScrollBar?: boolean;
|
|
27
31
|
children: ReactNode;
|
|
28
32
|
}
|
|
29
33
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,oBAAY,OAAO,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;AAC3D,oBAAY,OAAO,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAAC;AAE3D,MAAM,WAAW,WAAW;IAC1B,mCAAmC;IACnC,IAAI,EAAE,OAAO,CAAC;IAEd,sEAAsE;IACtE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qEAAqE;IACrE,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;qCAEiC;IACjC,OAAO,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,oBAAY,OAAO,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;AAC3D,oBAAY,OAAO,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAAC;AAE3D,MAAM,WAAW,WAAW;IAC1B,mCAAmC;IACnC,IAAI,EAAE,OAAO,CAAC;IAEd,sEAAsE;IACtE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qEAAqE;IACrE,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;qCAEiC;IACjC,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;qCAEiC;IACjC,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,gDAAgD;IAChD,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,8CAA8C;IAC9C,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,kCAAkC;IAClC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,mCAAmC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,2DAA2D;IAC3D,OAAO,EAAE,MAAM,IAAI,CAAC;IAEpB,sFAAsF;IACtF,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB,QAAQ,EAAE,SAAS,CAAC;CACrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../src/components/Progress/style.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGpG,eAAO,MAAM,WAAW;;;
|
|
1
|
+
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../src/components/Progress/style.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGpG,eAAO,MAAM,WAAW;;;gIAYvB,CAAC;AAEF,eAAO,MAAM,WAAW;;;kHA2BvB,CAAC;AAEF,eAAO,MAAM,UAAU;;;+HAOtB,CAAC;AAIF,eAAO,MAAM,UAAU;;;;;yGAKtB,CAAC;AAEF,eAAO,MAAM,KAAK;;;kHA0BjB,CAAC;AAEF,eAAO,MAAM,OAAO;;;;;+CAGnB,CAAC;AACF,eAAO,MAAM,SAAS;;;gEAWrB,CAAC;AAEF,eAAO,MAAM,eAAe;;;+DAW3B,CAAC"}
|
|
@@ -16,7 +16,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
16
16
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
17
17
|
|
|
18
18
|
// Linear
|
|
19
|
-
var ProgressBar = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n background-color: ", ";\n height: ", "px;\n border-radius: 10px;\n"])), function (_ref) {
|
|
19
|
+
var ProgressBar = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n background-color: ", ";\n height: ", "px;\n border-radius: 10px;\n overflow: hidden;\n"])), function (_ref) {
|
|
20
20
|
var grayColor = _ref.grayColor,
|
|
21
21
|
theme = _ref.theme;
|
|
22
22
|
return grayColor ? (0, _colorToGray.parseHslColorToString)(theme.colorMode === 'light' ? grayColor.neutral1 : grayColor.neutral6) : theme.colorMode === 'light' ? theme.colors.neutral.neutral1 : theme.colors.neutral.neutral6;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/RadioInput/components/ChoiceList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA8B,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/RadioInput/components/ChoiceList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA8B,EAAE,EAAgC,MAAM,OAAO,CAAC;AAMrF,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEjE,eAAO,MAAM,UAAU,4CAA4D,CAAC;AAEpF,QAAA,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CAsDnC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -75,6 +75,9 @@ var ChoiceList = function ChoiceList(_ref) {
|
|
|
75
75
|
onChange(e.currentTarget.value);
|
|
76
76
|
};
|
|
77
77
|
|
|
78
|
+
(0, _react.useEffect)(function () {
|
|
79
|
+
!!value && setSelectedRadioBtn(value);
|
|
80
|
+
}, [value]);
|
|
78
81
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_react2.ThemeProvider, {
|
|
79
82
|
theme: theme,
|
|
80
83
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(RadioGroup.Provider, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/RadioInput/styles.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE5C,eAAO,MAAM,OAAO;;;yGAInB,CAAC;AAEF,eAAO,MAAM,KAAK;;;kHAGjB,CAAC;AAEF,eAAO,MAAM,KAAK;;;
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/RadioInput/styles.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE5C,eAAO,MAAM,OAAO;;;yGAInB,CAAC;AAEF,eAAO,MAAM,KAAK;;;kHAGjB,CAAC;AAEF,eAAO,MAAM,KAAK;;;sIAsEjB,CAAC;AAEF,eAAO,MAAM,aAAa;;;yGAAe,CAAC;AAE1C,eAAO,MAAM,WAAW;;;6HAOvB,CAAC;AAEF,eAAO,MAAM,WAAW;;;sIASvB,CAAC;AAEF,eAAO,MAAM,QAAQ;;;+HASpB,CAAC"}
|
|
@@ -27,7 +27,10 @@ var Input = _styled.default.input(_templateObject3 || (_templateObject3 = _tagge
|
|
|
27
27
|
var color = _ref.color,
|
|
28
28
|
colorProps = _ref.colorProps,
|
|
29
29
|
theme = _ref.theme;
|
|
30
|
-
return (0, _react.css)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n appearance: none;\n display: flex;\n justify-content: center;\n align-items: center;\n box-sizing: border-box;\n margin: 0;\n width: 20px;\n height: 20px;\n border-radius: 50%;\n border: 2px solid
|
|
30
|
+
return (0, _react.css)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n appearance: none;\n display: flex;\n justify-content: center;\n align-items: center;\n box-sizing: border-box;\n margin: 0;\n width: 20px;\n height: 20px;\n border-radius: 50%;\n border: 2px solid\n ", ";\n\n + label {\n color: ", ";\n line-height: 20px;\n }\n\n :hover {\n border-color: ", ";\n }\n :focus {\n border-color: ", ";\n box-shadow: 0 0 0 2px ", ";\n }\n :disabled {\n border-color: ", ";\n background-color: ", ";\n + label {\n color: ", ";\n }\n }\n\n :checked {\n background-color: ", ";\n border-color: ", ";\n &:focus {\n background-color: ", ";\n border-color: ", ";\n box-shadow: 0 0 0 2px ", ";\n }\n &:hover {\n background-color: ", ";\n border-color: ", ";\n }\n &:disabled {\n background-color: ", ";\n border-color: ", ";\n + label {\n color: ", ";\n }\n &::after {\n display: none;\n }\n }\n\n &::after {\n content: '';\n display: block;\n width: 6px;\n height: 6px;\n background: #fff;\n border-radius: 50%;\n }\n }\n "])), {
|
|
31
|
+
light: theme.colors.neutral.neutral2,
|
|
32
|
+
dark: theme.colors.neutral.neutral5
|
|
33
|
+
}[theme.colorMode], theme.colorMode === 'light' ? colorProps === null || colorProps === void 0 ? void 0 : colorProps.black : theme.colors.neutral.white, theme.colors.primary.hover, colorProps === null || colorProps === void 0 ? void 0 : colorProps.focus, colorProps === null || colorProps === void 0 ? void 0 : colorProps.grayLightness, colorProps === null || colorProps === void 0 ? void 0 : colorProps.grayLightness, colorProps === null || colorProps === void 0 ? void 0 : colorProps.grayLightness, colorProps === null || colorProps === void 0 ? void 0 : colorProps.gray, color, color, colorProps === null || colorProps === void 0 ? void 0 : colorProps.saturationFocus, colorProps === null || colorProps === void 0 ? void 0 : colorProps.saturationFocus, colorProps === null || colorProps === void 0 ? void 0 : colorProps.shadowLightness, colorProps === null || colorProps === void 0 ? void 0 : colorProps.saturation, colorProps === null || colorProps === void 0 ? void 0 : colorProps.saturation, colorProps === null || colorProps === void 0 ? void 0 : colorProps.gray, colorProps === null || colorProps === void 0 ? void 0 : colorProps.gray, colorProps === null || colorProps === void 0 ? void 0 : colorProps.graySaturation);
|
|
31
34
|
});
|
|
32
35
|
|
|
33
36
|
exports.Input = Input;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OptionsArea.d.ts","sourceRoot":"","sources":["../../../../../src/components/SelectInput/components/OptionsArea/OptionsArea.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,eAAO,MAAM,kBAAkB;;;
|
|
1
|
+
{"version":3,"file":"OptionsArea.d.ts","sourceRoot":"","sources":["../../../../../src/components/SelectInput/components/OptionsArea/OptionsArea.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,eAAO,MAAM,kBAAkB;;;uHAwC9B,CAAC;AA+BF,eAAO,MAAM,iBAAiB;;;gIAe7B,CAAC;AAEF,eAAO,MAAM,IAAI;;;yHAGhB,CAAC;AAEF,eAAO,MAAM,UAAU;;;mHAErB,CAAC"}
|
|
@@ -15,18 +15,27 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
15
15
|
|
|
16
16
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
17
17
|
|
|
18
|
-
var OptionsAreaWrapper = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n scroll-behavior: smooth;\n\n flex-direction: column;\n box-sizing: border-box;\n background-color: ", ";\n color: ", ";\n\n width: 100%;\n max-height: 248px;\n border-radius: ", ";\n\n
|
|
18
|
+
var OptionsAreaWrapper = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: absolute;\n top: 54px;\n left: 0;\n z-index: 2;\n\n display: flex;\n scroll-behavior: smooth;\n\n flex-direction: column;\n box-sizing: border-box;\n background-color: ", ";\n\n color: ", ";\n\n width: 100%;\n max-height: 248px;\n border-radius: ", ";\n\n overflow-y: auto;\n\n padding: 8px;\n\n box-shadow: ", ";\n\n &::-webkit-scrollbar {\n width: 6px;\n }\n\n &::-webkit-scrollbar-thumb {\n background-color: ", ";\n border-radius: ", ";\n }\n"])), function (_ref) {
|
|
19
19
|
var theme = _ref.theme;
|
|
20
|
-
return
|
|
20
|
+
return {
|
|
21
|
+
dark: theme.colors.neutral.neutral6,
|
|
22
|
+
light: theme.colors.body.light
|
|
23
|
+
}[theme.colorMode];
|
|
21
24
|
}, function (_ref2) {
|
|
22
25
|
var theme = _ref2.theme;
|
|
23
|
-
return
|
|
26
|
+
return {
|
|
27
|
+
dark: theme.colors.neutral.white,
|
|
28
|
+
light: theme.colors.neutral.black
|
|
29
|
+
}[theme.colorMode];
|
|
24
30
|
}, function (_ref3) {
|
|
25
31
|
var theme = _ref3.theme;
|
|
26
32
|
return theme.borderRadius.default;
|
|
27
33
|
}, function (_ref4) {
|
|
28
34
|
var theme = _ref4.theme;
|
|
29
|
-
return
|
|
35
|
+
return {
|
|
36
|
+
dark: "0px 16px 32px ".concat(theme.colors.neutral.black),
|
|
37
|
+
light: theme.shadow.level3
|
|
38
|
+
}[theme.colorMode];
|
|
30
39
|
}, function (_ref5) {
|
|
31
40
|
var theme = _ref5.theme,
|
|
32
41
|
selectType = _ref5.selectType;
|
|
@@ -38,7 +47,7 @@ var OptionsAreaWrapper = _styled.default.div(_templateObject || (_templateObject
|
|
|
38
47
|
|
|
39
48
|
exports.OptionsAreaWrapper = OptionsAreaWrapper;
|
|
40
49
|
|
|
41
|
-
var OptionItemStyle = _styled.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n box-sizing: border-box;\n\n height: 58px;\n\n padding: 16px 24px;\n\n outline: 0;\n background: none;\n border: 0;\n\n font-size: ", ";\n font-weight: ", ";\n\n cursor: pointer;\n\n :focus,\n :hover {\n background-color: ", ";\n border-radius: ", ";\n }\n"])), function (_ref7) {
|
|
50
|
+
var OptionItemStyle = _styled.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n box-sizing: border-box;\n\n height: 58px;\n\n padding: 16px 24px;\n\n outline: 0;\n background: none;\n border: 0;\n\n font-size: ", ";\n font-weight: ", ";\n\n cursor: pointer;\n\n :focus,\n :hover {\n background-color: ", ";\n\n border-radius: ", ";\n }\n"])), function (_ref7) {
|
|
42
51
|
var theme = _ref7.theme;
|
|
43
52
|
return theme.fontSizes.xs;
|
|
44
53
|
}, function (_ref8) {
|
|
@@ -46,18 +55,27 @@ var OptionItemStyle = _styled.default.div(_templateObject2 || (_templateObject2
|
|
|
46
55
|
return theme.fontWeight['500'];
|
|
47
56
|
}, function (_ref9) {
|
|
48
57
|
var theme = _ref9.theme;
|
|
49
|
-
return
|
|
58
|
+
return {
|
|
59
|
+
dark: theme.colors.neutral.neutral5,
|
|
60
|
+
light: theme.colors.neutral.neutral1
|
|
61
|
+
}[theme.colorMode];
|
|
50
62
|
}, function (_ref10) {
|
|
51
63
|
var theme = _ref10.theme;
|
|
52
64
|
return theme.borderRadius.default;
|
|
53
65
|
});
|
|
54
66
|
|
|
55
|
-
var AutoCompleteInput = _styled.default.input(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n padding: 8px;\n outline: 0;\n color: ", ";\n background: ", ";\n\n margin-bottom: 8px;\n\n border: 2px solid\n ", ";\n\n border-radius: ", "; ;\n"])), function (_ref11) {
|
|
67
|
+
var AutoCompleteInput = _styled.default.input(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n padding: 8px;\n outline: 0;\n color: ", ";\n\n background: ", ";\n\n margin-bottom: 8px;\n\n border: 2px solid\n ", ";\n\n border-radius: ", "; ;\n"])), function (_ref11) {
|
|
56
68
|
var theme = _ref11.theme;
|
|
57
|
-
return
|
|
69
|
+
return {
|
|
70
|
+
dark: theme.colors.neutral.white,
|
|
71
|
+
light: ''
|
|
72
|
+
}[theme.colorMode];
|
|
58
73
|
}, function (_ref12) {
|
|
59
74
|
var theme = _ref12.theme;
|
|
60
|
-
return
|
|
75
|
+
return {
|
|
76
|
+
dark: theme.colors.neutral.neutral3,
|
|
77
|
+
light: ''
|
|
78
|
+
}[theme.colorMode];
|
|
61
79
|
}, function (_ref13) {
|
|
62
80
|
var theme = _ref13.theme,
|
|
63
81
|
selectType = _ref13.selectType;
|
|
@@ -138,7 +138,7 @@ function OptionsArea(_ref) {
|
|
|
138
138
|
onKeyDown: function onKeyDown(e) {
|
|
139
139
|
return e.key === 'Enter' && chooseOption(option);
|
|
140
140
|
},
|
|
141
|
-
children: option.
|
|
141
|
+
children: option.name
|
|
142
142
|
}, "".concat(option.name).concat(index));
|
|
143
143
|
}), AutoCompleteState.length > 0 && dataToShow.length === 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_OptionsArea.Span, {
|
|
144
144
|
children: "Sem Resultados"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonsArea.d.ts","sourceRoot":"","sources":["../../../../../src/components/SelectInput/components/SelectArea/ButtonsArea.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,eAAO,MAAM,WAAW;;;uHA+BvB,CAAC;AAEF,eAAO,MAAM,MAAM;;;
|
|
1
|
+
{"version":3,"file":"ButtonsArea.d.ts","sourceRoot":"","sources":["../../../../../src/components/SelectInput/components/SelectArea/ButtonsArea.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,eAAO,MAAM,WAAW;;;uHA+BvB,CAAC;AAEF,eAAO,MAAM,MAAM;;;mIAOlB,CAAC"}
|
|
@@ -15,7 +15,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
15
15
|
|
|
16
16
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
17
17
|
|
|
18
|
-
var ButtonsArea = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n justify-content: flex-end;\n min-width: 64px;\n\n button {\n align-items: center;\n\n width: 24px;\n height: 24px;\n margin-left: 8px;\n padding: 0;\n\n background: none;\n border: 0;\n border-radius: 12px;\n outline: 0;\n\n cursor:
|
|
18
|
+
var ButtonsArea = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n justify-content: flex-end;\n min-width: 64px;\n\n button {\n align-items: center;\n\n width: 24px;\n height: 24px;\n margin-left: 8px;\n padding: 0;\n\n background: none;\n border: 0;\n border-radius: 12px;\n outline: 0;\n\n cursor: default;\n\n ", "\n\n :focus {\n box-shadow: 0 0 0 2px ", ";\n }\n }\n"])), function (_ref) {
|
|
19
19
|
var disabled = _ref.disabled;
|
|
20
20
|
return !disabled && (0, _react.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n cursor: pointer;\n "])));
|
|
21
21
|
}, function (_ref2) {
|
|
@@ -25,7 +25,7 @@ var ButtonsArea = _styled.default.div(_templateObject || (_templateObject = _tag
|
|
|
25
25
|
|
|
26
26
|
exports.ButtonsArea = ButtonsArea;
|
|
27
27
|
|
|
28
|
-
var Button = _styled.default.button(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: ", ";\n\n svg {\n color: ", ";\n }\n"])), function (_ref3) {
|
|
28
|
+
var Button = _styled.default.button(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: ", ";\n justify-content: center;\n\n svg {\n color: ", ";\n }\n"])), function (_ref3) {
|
|
29
29
|
var show = _ref3.show;
|
|
30
30
|
return show ? 'flex' : 'none';
|
|
31
31
|
}, function (_ref4) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Label.d.ts","sourceRoot":"","sources":["../../../../../src/components/SelectInput/components/SelectArea/Label.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,eAAO,MAAM,KAAK;;;
|
|
1
|
+
{"version":3,"file":"Label.d.ts","sourceRoot":"","sources":["../../../../../src/components/SelectInput/components/SelectArea/Label.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,eAAO,MAAM,KAAK;;;gIAyBjB,CAAC"}
|
|
@@ -15,22 +15,22 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
15
15
|
|
|
16
16
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
17
17
|
|
|
18
|
-
var Label = _styled.default.label(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: absolute;\n box-sizing: border-box;\n\n
|
|
18
|
+
var Label = _styled.default.label(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: absolute;\n box-sizing: border-box;\n\n color: ", ";\n transition: all ease-in-out 0.2s;\n\n font-weight: ", ";\n font-size: ", ";\n\n padding: 0 8px;\n\n ", ";\n"])), function (_ref) {
|
|
19
19
|
var theme = _ref.theme;
|
|
20
|
-
return
|
|
20
|
+
return {
|
|
21
|
+
dark: theme.colors.neutral.white,
|
|
22
|
+
light: theme.colors.neutral.neutral5
|
|
23
|
+
}[theme.colorMode];
|
|
21
24
|
}, function (_ref2) {
|
|
22
25
|
var theme = _ref2.theme;
|
|
23
|
-
return theme.
|
|
26
|
+
return theme.fontWeight['500'];
|
|
24
27
|
}, function (_ref3) {
|
|
25
28
|
var theme = _ref3.theme;
|
|
26
|
-
return theme.fontWeight['500'];
|
|
27
|
-
}, function (_ref4) {
|
|
28
|
-
var theme = _ref4.theme;
|
|
29
29
|
return theme.fontSizes.xs;
|
|
30
|
-
}, function (
|
|
31
|
-
var animate =
|
|
32
|
-
theme =
|
|
33
|
-
return animate ? (0, _react.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n
|
|
30
|
+
}, function (_ref4) {
|
|
31
|
+
var animate = _ref4.animate,
|
|
32
|
+
theme = _ref4.theme;
|
|
33
|
+
return animate ? (0, _react.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: absolute;\n top: 0;\n transform: translate(-12px, -11px) scale(0.8);\n background-color: ", ";\n height: 20px;\n "])), theme.colorMode === 'dark' ? theme.colors.neutral.black : theme.colors.neutral.white) : '';
|
|
34
34
|
});
|
|
35
35
|
|
|
36
36
|
exports.Label = Label;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectAreaWrapper.d.ts","sourceRoot":"","sources":["../../../../../src/components/SelectInput/components/SelectArea/SelectAreaWrapper.ts"],"names":[],"mappings":";AAGA,OAAO,EAAa,WAAW,EAAE,MAAM,aAAa,CAAC;AAGrD,eAAO,MAAM,iBAAiB;;;
|
|
1
|
+
{"version":3,"file":"SelectAreaWrapper.d.ts","sourceRoot":"","sources":["../../../../../src/components/SelectInput/components/SelectArea/SelectAreaWrapper.ts"],"names":[],"mappings":";AAGA,OAAO,EAAa,WAAW,EAAE,MAAM,aAAa,CAAC;AAGrD,eAAO,MAAM,iBAAiB;;;uHAoB7B,CAAC"}
|
|
@@ -15,9 +15,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
15
15
|
|
|
16
16
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
17
17
|
|
|
18
|
-
var SelectAreaWrapper = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n box-sizing: border-box;\n position: relative;\n\n min-height:
|
|
18
|
+
var SelectAreaWrapper = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n box-sizing: border-box;\n position: relative;\n\n min-height: 52px;\n padding: 4px 20px;\n\n border: 2px solid\n ", ";\n border-radius: 8px;\n\n transition: all ease-in-out 0.2s;\n\n ", "\n"])), function (_ref) {
|
|
19
19
|
var theme = _ref.theme;
|
|
20
|
-
return
|
|
20
|
+
return {
|
|
21
|
+
light: theme.colors.neutral.neutral2,
|
|
22
|
+
dark: theme.colors.neutral.neutral5
|
|
23
|
+
}[theme.colorMode];
|
|
21
24
|
}, InputWrapperDisabledTratamentFunction);
|
|
22
25
|
|
|
23
26
|
exports.SelectAreaWrapper = SelectAreaWrapper;
|
|
@@ -4,6 +4,10 @@ export declare const SelectedOptionsArea: import("@emotion/styled").StyledCompon
|
|
|
4
4
|
theme?: import("@emotion/react").Theme | undefined;
|
|
5
5
|
as?: import("react").ElementType<any> | undefined;
|
|
6
6
|
} & IStyleProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
7
|
+
export declare const SelectedSingleOption: import("@emotion/styled").StyledComponent<{
|
|
8
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
9
|
+
as?: import("react").ElementType<any> | undefined;
|
|
10
|
+
} & IStyleProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
7
11
|
export declare const SelectedOption: import("@emotion/styled").StyledComponent<{
|
|
8
12
|
theme?: import("@emotion/react").Theme | undefined;
|
|
9
13
|
as?: import("react").ElementType<any> | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectedOptionsArea.d.ts","sourceRoot":"","sources":["../../../../../src/components/SelectInput/components/SelectArea/SelectedOptionsArea.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,eAAO,MAAM,mBAAmB;;;uHAI/B,CAAC;AAEF,eAAO,MAAM,cAAc;;;
|
|
1
|
+
{"version":3,"file":"SelectedOptionsArea.d.ts","sourceRoot":"","sources":["../../../../../src/components/SelectInput/components/SelectArea/SelectedOptionsArea.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,eAAO,MAAM,mBAAmB;;;uHAI/B,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;uHAuBhC,CAAC;AAEF,eAAO,MAAM,cAAc;;;mIA4B1B,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;yHAI9B,CAAC"}
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.SelectedOptionsArea = exports.SelectedOptionText = exports.SelectedOption = void 0;
|
|
6
|
+
exports.SelectedSingleOption = exports.SelectedOptionsArea = exports.SelectedOptionText = exports.SelectedOption = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = require("@emotion/react");
|
|
9
9
|
|
|
10
10
|
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
11
11
|
|
|
12
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
12
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
|
13
13
|
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
15
|
|
|
@@ -19,24 +19,49 @@ var SelectedOptionsArea = _styled.default.div(_templateObject || (_templateObjec
|
|
|
19
19
|
|
|
20
20
|
exports.SelectedOptionsArea = SelectedOptionsArea;
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var SelectedSingleOption = _styled.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n\n min-width: 73px;\n height: 29px;\n padding: 4px 8px;\n border-radius: 6px;\n\n transition: all ease-in-out 0.2s;\n\n font-weight: ", ";\n font-size: ", ";\n\n color: ", ";\n\n ", ";\n"])), function (_ref) {
|
|
23
23
|
var theme = _ref.theme;
|
|
24
|
-
return theme.
|
|
24
|
+
return theme.fontWeight['400'];
|
|
25
25
|
}, function (_ref2) {
|
|
26
26
|
var theme = _ref2.theme;
|
|
27
|
-
return theme.
|
|
27
|
+
return theme.fontSizes.xs;
|
|
28
28
|
}, function (_ref3) {
|
|
29
|
-
var
|
|
29
|
+
var theme = _ref3.theme;
|
|
30
|
+
return {
|
|
31
|
+
dark: theme.colors.neutral.white,
|
|
32
|
+
light: theme.colors.neutral.neutral5
|
|
33
|
+
}[theme.colorMode];
|
|
34
|
+
}, function (_ref4) {
|
|
35
|
+
var disabled = _ref4.disabled;
|
|
30
36
|
return !disabled && (0, _react.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n cursor: pointer;\n "])));
|
|
31
37
|
});
|
|
32
38
|
|
|
39
|
+
exports.SelectedSingleOption = SelectedSingleOption;
|
|
40
|
+
|
|
41
|
+
var SelectedOption = _styled.default.button(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n\n min-width: 73px;\n height: 29px;\n padding: 4px 8px;\n border-radius: 6px;\n\n margin: 2px;\n\n transition: all ease-in-out 0.2s;\n\n background-color: ", ";\n\n border: 0;\n color: ", ";\n\n ", ";\n"])), function (_ref5) {
|
|
42
|
+
var theme = _ref5.theme;
|
|
43
|
+
return {
|
|
44
|
+
dark: theme.colors.neutral.neutral4,
|
|
45
|
+
light: theme.colors.neutral.neutral1
|
|
46
|
+
}[theme.colorMode];
|
|
47
|
+
}, function (_ref6) {
|
|
48
|
+
var theme = _ref6.theme;
|
|
49
|
+
return {
|
|
50
|
+
dark: theme.colors.neutral.white,
|
|
51
|
+
light: theme.colors.neutral.neutral6
|
|
52
|
+
}[theme.colorMode];
|
|
53
|
+
}, function (_ref7) {
|
|
54
|
+
var disabled = _ref7.disabled;
|
|
55
|
+
return !disabled && (0, _react.css)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n cursor: pointer;\n "])));
|
|
56
|
+
});
|
|
57
|
+
|
|
33
58
|
exports.SelectedOption = SelectedOption;
|
|
34
59
|
|
|
35
|
-
var SelectedOptionText = _styled.default.span(
|
|
36
|
-
var theme =
|
|
60
|
+
var SelectedOptionText = _styled.default.span(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n margin-right: 8px;\n font-weight: ", ";\n font-size: ", ";\n"])), function (_ref8) {
|
|
61
|
+
var theme = _ref8.theme;
|
|
37
62
|
return theme.fontWeight['400'];
|
|
38
|
-
}, function (
|
|
39
|
-
var theme =
|
|
63
|
+
}, function (_ref9) {
|
|
64
|
+
var theme = _ref9.theme;
|
|
40
65
|
return theme.fontSizes.xxs;
|
|
41
66
|
});
|
|
42
67
|
|
|
@@ -5,12 +5,13 @@ interface ISelectAreaProps {
|
|
|
5
5
|
label?: string;
|
|
6
6
|
inputAlert?: AlertType;
|
|
7
7
|
dropDownIcon?: ReactElement;
|
|
8
|
+
multiple?: boolean;
|
|
8
9
|
selectedOptions: SelectData[];
|
|
9
10
|
removeSelectedOption: (e: MouseEvent<HTMLElement>, option: SelectData) => void;
|
|
10
11
|
setShowOptionsArea: (show: boolean) => void;
|
|
11
12
|
setSelectedOptions: (array: SelectData[]) => void;
|
|
12
13
|
toggleOptionsAreaView: (e: MouseEvent<HTMLElement>) => void;
|
|
13
14
|
}
|
|
14
|
-
export declare function SelectArea({ disabled, label, setShowOptionsArea, toggleOptionsAreaView, inputAlert, removeSelectedOption, selectedOptions, setSelectedOptions, dropDownIcon, }: ISelectAreaProps): JSX.Element;
|
|
15
|
+
export declare function SelectArea({ disabled, label, setShowOptionsArea, toggleOptionsAreaView, inputAlert, multiple, removeSelectedOption, selectedOptions, setSelectedOptions, dropDownIcon, }: ISelectAreaProps): JSX.Element;
|
|
15
16
|
export {};
|
|
16
17
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/SelectInput/components/SelectArea/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/SelectInput/components/SelectArea/index.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAGjD,UAAU,gBAAgB;IACxB,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,eAAe,EAAE,UAAU,EAAE,CAAC;IAC9B,oBAAoB,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,WAAW,CAAC,EAAE,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;IAC/E,kBAAkB,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5C,kBAAkB,EAAE,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,IAAI,CAAC;IAClD,qBAAqB,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;CAC7D;AAED,wBAAgB,UAAU,CAAC,EACzB,QAAQ,EACR,KAAqB,EACrB,kBAAkB,EAClB,qBAAqB,EACrB,UAAU,EACV,QAAQ,EACR,oBAAoB,EACpB,eAAe,EACf,kBAAkB,EAClB,YAAY,GACb,EAAE,gBAAgB,eA8ClB"}
|
|
@@ -26,6 +26,7 @@ function SelectArea(_ref) {
|
|
|
26
26
|
setShowOptionsArea = _ref.setShowOptionsArea,
|
|
27
27
|
toggleOptionsAreaView = _ref.toggleOptionsAreaView,
|
|
28
28
|
inputAlert = _ref.inputAlert,
|
|
29
|
+
multiple = _ref.multiple,
|
|
29
30
|
removeSelectedOption = _ref.removeSelectedOption,
|
|
30
31
|
selectedOptions = _ref.selectedOptions,
|
|
31
32
|
setSelectedOptions = _ref.setSelectedOptions,
|
|
@@ -42,7 +43,7 @@ function SelectArea(_ref) {
|
|
|
42
43
|
animate: selectedOptions.length > 0,
|
|
43
44
|
children: label
|
|
44
45
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_SelectedOptionsArea.SelectedOptionsArea, {
|
|
45
|
-
children: selectedOptions.map(function (option) {
|
|
46
|
+
children: multiple ? selectedOptions.map(function (option) {
|
|
46
47
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_SelectedOptionsArea.SelectedOption, {
|
|
47
48
|
"data-testid": "select-area--selected-option",
|
|
48
49
|
disabled: disabled,
|
|
@@ -50,14 +51,20 @@ function SelectArea(_ref) {
|
|
|
50
51
|
return removeSelectedOption(e, option);
|
|
51
52
|
},
|
|
52
53
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_SelectedOptionsArea.SelectedOptionText, {
|
|
53
|
-
children: option.
|
|
54
|
+
children: option.name
|
|
54
55
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.default, {
|
|
55
56
|
name: "x-circle",
|
|
56
57
|
size: "12px"
|
|
57
58
|
})]
|
|
58
59
|
}, option.name);
|
|
60
|
+
}) : selectedOptions.map(function (option) {
|
|
61
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_SelectedOptionsArea.SelectedSingleOption, {
|
|
62
|
+
"data-testid": "select-area--selected-option",
|
|
63
|
+
children: option.name
|
|
64
|
+
}, option.name);
|
|
59
65
|
})
|
|
60
66
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ButtonsArea.ButtonsArea, {
|
|
67
|
+
disabled: disabled,
|
|
61
68
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ButtonsArea.Button, {
|
|
62
69
|
tabIndex: 0,
|
|
63
70
|
disabled: disabled,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SelectInput/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,EAAE,EAOH,MAAM,OAAO,CAAC;AAIf,OAAO,EAAa,iBAAiB,EAAc,MAAM,SAAS,CAAC;AAEnE,aAAK,KAAK,GAAG,wBAAwB,CAAC,GAAG,CAAC,CAAC;AAI3C,QAAA,MAAM,WAAW,EAAE,EAAE,CAAC,iBAAiB,GAAG,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SelectInput/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,EAAE,EAOH,MAAM,OAAO,CAAC;AAIf,OAAO,EAAa,iBAAiB,EAAc,MAAM,SAAS,CAAC;AAEnE,aAAK,KAAK,GAAG,wBAAwB,CAAC,GAAG,CAAC,CAAC;AAI3C,QAAA,MAAM,WAAW,EAAE,EAAE,CAAC,iBAAiB,GAAG,KAAK,CAuI9C,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -11,8 +11,6 @@ var _components = require("./components");
|
|
|
11
11
|
|
|
12
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
13
|
|
|
14
|
-
var _excluded = ["width", "fullWidth", "disabled", "multiple", "AutoComplete", "maxSelects", "onChangeValue", "onChangeSearch", "onFinished", "label", "selectType", "data", "children", "formRegister", "dropDownIcon", "defaultSelectedOptions"];
|
|
15
|
-
|
|
16
14
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
17
15
|
|
|
18
16
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -33,10 +31,6 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
33
31
|
|
|
34
32
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
35
33
|
|
|
36
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
37
|
-
|
|
38
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
39
|
-
|
|
40
34
|
var onFinishedTimerDebounce;
|
|
41
35
|
|
|
42
36
|
var SelectInput = function SelectInput(_ref) {
|
|
@@ -63,7 +57,7 @@ var SelectInput = function SelectInput(_ref) {
|
|
|
63
57
|
formRegister = _ref.formRegister,
|
|
64
58
|
dropDownIcon = _ref.dropDownIcon,
|
|
65
59
|
defaultSelectedOptions = _ref.defaultSelectedOptions,
|
|
66
|
-
|
|
60
|
+
value = _ref.value;
|
|
67
61
|
|
|
68
62
|
var _useState = (0, _react.useState)(selectType),
|
|
69
63
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -112,8 +106,11 @@ var SelectInput = function SelectInput(_ref) {
|
|
|
112
106
|
}
|
|
113
107
|
|
|
114
108
|
(0, _react.useEffect)(function () {
|
|
115
|
-
!!
|
|
116
|
-
}, [
|
|
109
|
+
!!value && setSelectedOptions(value);
|
|
110
|
+
}, [value]);
|
|
111
|
+
(0, _react.useEffect)(function () {
|
|
112
|
+
onChangeValue === null || onChangeValue === void 0 ? void 0 : onChangeValue(selectedOptions);
|
|
113
|
+
}, [onChangeValue]);
|
|
117
114
|
(0, _react.useEffect)(function () {
|
|
118
115
|
!!disabled && setShowOptionsArea(false);
|
|
119
116
|
}, [disabled]);
|
|
@@ -138,11 +135,13 @@ var SelectInput = function SelectInput(_ref) {
|
|
|
138
135
|
var chooseOption = (0, _react.useCallback)(function (option) {
|
|
139
136
|
if (multiple) {
|
|
140
137
|
if (!(selectedOptions.length >= maxSelects)) {
|
|
138
|
+
onChangeValue === null || onChangeValue === void 0 ? void 0 : onChangeValue([].concat(_toConsumableArray(selectedOptions), [option]));
|
|
141
139
|
setSelectedOptions(function (oldstate) {
|
|
142
140
|
return [].concat(_toConsumableArray(oldstate), [option]);
|
|
143
141
|
});
|
|
144
142
|
}
|
|
145
143
|
} else {
|
|
144
|
+
onChangeValue === null || onChangeValue === void 0 ? void 0 : onChangeValue([option]);
|
|
146
145
|
setSelectedOptions([option]);
|
|
147
146
|
setShowOptionsArea(false);
|
|
148
147
|
}
|
|
@@ -154,6 +153,7 @@ var SelectInput = function SelectInput(_ref) {
|
|
|
154
153
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.SelectArea, {
|
|
155
154
|
disabled: disabled,
|
|
156
155
|
label: label,
|
|
156
|
+
multiple: multiple,
|
|
157
157
|
setShowOptionsArea: setShowOptionsArea,
|
|
158
158
|
removeSelectedOption: removeSelectedOption,
|
|
159
159
|
selectedOptions: selectedOptions,
|
|
@@ -29,6 +29,7 @@ export interface ISelectInputProps {
|
|
|
29
29
|
formRegister?: unknown;
|
|
30
30
|
dropDownIcon?: ReactElement;
|
|
31
31
|
AutoComplete?: boolean;
|
|
32
|
+
value?: Array<SelectData>;
|
|
32
33
|
defaultSelectedOptions?: Array<SelectData>;
|
|
33
34
|
onChangeValue?: (data: Array<SelectData>) => void;
|
|
34
35
|
onChangeSearch?: (data: string) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/SelectInput/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,KAAK,CAAC;AAEvC,oBAAY,UAAU,GAAG;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,oBAAY,SAAS,GAAG,aAAa,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC;AAEpF,MAAM,WAAW,WAAW;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,sBAAsB,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;IAC3C,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC,UAAU,CAAC,KAAK,IAAI,CAAC;IAClD,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CACtC"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/SelectInput/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,KAAK,CAAC;AAEvC,oBAAY,UAAU,GAAG;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,oBAAY,SAAS,GAAG,aAAa,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC;AAEpF,MAAM,WAAW,WAAW;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,KAAK,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;IAC1B,sBAAsB,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;IAC3C,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC,UAAU,CAAC,KAAK,IAAI,CAAC;IAClD,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CACtC"}
|
|
@@ -34,7 +34,8 @@ var SliderPointer = function SliderPointer(_ref) {
|
|
|
34
34
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.SliderPointerIcon, {
|
|
35
35
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.default, {
|
|
36
36
|
name: "code",
|
|
37
|
-
size: "20px"
|
|
37
|
+
size: "20px",
|
|
38
|
+
color: "neutral.black"
|
|
38
39
|
})
|
|
39
40
|
})]
|
|
40
41
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Switch/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,EAAE,EAAkD,MAAM,OAAO,CAAC;AAIrF,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAItC,QAAA,MAAM,WAAW,EAAE,EAAE,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Switch/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,EAAE,EAAkD,MAAM,OAAO,CAAC;AAIrF,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAItC,QAAA,MAAM,WAAW,EAAE,EAAE,CAAC,WAAW,CAqFhC,CAAC;AAEF,eAAe,WAAW,CAAC"}
|