@citygross/components 0.13.13 → 0.13.14
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/build/@types/components/FormElements/Checkbox/Checkbox.d.ts +1 -1
- package/build/@types/components/FormElements/FormElement.types.d.ts +3 -1
- package/build/@types/components/FormElements/Input/Input.d.ts +0 -6
- package/build/@types/components/FormElements/Radio/Radio.d.ts +1 -1
- package/build/@types/components/FormElements/Select/Select.d.ts +1 -4
- package/build/cjs/components/src/components/FormElements/Checkbox/Checkbox.js +1 -2
- package/build/cjs/components/src/components/FormElements/Checkbox/Checkbox.js.map +1 -1
- package/build/cjs/components/src/components/FormElements/FormElement.styles.js +1 -1
- package/build/cjs/components/src/components/FormElements/Input/Input.js +2 -3
- package/build/cjs/components/src/components/FormElements/Input/Input.js.map +1 -1
- package/build/cjs/components/src/components/FormElements/Radio/Radio.js +1 -2
- package/build/cjs/components/src/components/FormElements/Radio/Radio.js.map +1 -1
- package/build/cjs/components/src/components/FormElements/Select/Select.js +1 -2
- package/build/cjs/components/src/components/FormElements/Select/Select.js.map +1 -1
- package/build/cjs/components/src/components/FormElements/Select/Select.styles.js +1 -1
- package/build/es/components/src/components/FormElements/Checkbox/Checkbox.js +1 -2
- package/build/es/components/src/components/FormElements/Checkbox/Checkbox.js.map +1 -1
- package/build/es/components/src/components/FormElements/FormElement.styles.js +1 -1
- package/build/es/components/src/components/FormElements/Input/Input.js +2 -3
- package/build/es/components/src/components/FormElements/Input/Input.js.map +1 -1
- package/build/es/components/src/components/FormElements/Radio/Radio.js +1 -2
- package/build/es/components/src/components/FormElements/Radio/Radio.js.map +1 -1
- package/build/es/components/src/components/FormElements/Select/Select.js +1 -2
- package/build/es/components/src/components/FormElements/Select/Select.js.map +1 -1
- package/build/es/components/src/components/FormElements/Select/Select.styles.js +1 -1
- package/package.json +2 -2
|
@@ -3,4 +3,4 @@ export declare type TCheckbox = {
|
|
|
3
3
|
hideLabel?: boolean;
|
|
4
4
|
label: string;
|
|
5
5
|
} & InputHTMLAttributes<HTMLInputElement>;
|
|
6
|
-
export declare const Checkbox: ({ hideLabel, label, ...props }: TCheckbox) => JSX.Element;
|
|
6
|
+
export declare const Checkbox: ({ checked, disabled, hideLabel, label, ...props }: TCheckbox) => JSX.Element;
|
|
@@ -5,7 +5,9 @@ export declare enum EFormElementSize {
|
|
|
5
5
|
export declare type TFormElement = {
|
|
6
6
|
error?: boolean;
|
|
7
7
|
errorLabel?: string;
|
|
8
|
-
|
|
8
|
+
hideLabel?: boolean;
|
|
9
|
+
label: string;
|
|
10
|
+
id: string;
|
|
9
11
|
size?: EFormElementSize;
|
|
10
12
|
};
|
|
11
13
|
export declare type TFormElementSizeAttributes = {
|
|
@@ -4,9 +4,6 @@ export declare type TInput = {
|
|
|
4
4
|
elementLeft?: React.ReactElement;
|
|
5
5
|
elementRight?: React.ReactElement;
|
|
6
6
|
fullWidth?: boolean;
|
|
7
|
-
hideLabel?: boolean;
|
|
8
|
-
id: string;
|
|
9
|
-
label: string;
|
|
10
7
|
paddingLeft?: number;
|
|
11
8
|
unit?: string;
|
|
12
9
|
} & TFormElement & Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'>;
|
|
@@ -14,9 +11,6 @@ export declare const Input: React.ForwardRefExoticComponent<{
|
|
|
14
11
|
elementLeft?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
|
|
15
12
|
elementRight?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
|
|
16
13
|
fullWidth?: boolean | undefined;
|
|
17
|
-
hideLabel?: boolean | undefined;
|
|
18
|
-
id: string;
|
|
19
|
-
label: string;
|
|
20
14
|
paddingLeft?: number | undefined;
|
|
21
15
|
unit?: string | undefined;
|
|
22
16
|
} & TFormElement & Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -3,4 +3,4 @@ export declare type TRadio = {
|
|
|
3
3
|
label: string;
|
|
4
4
|
showLabel?: boolean;
|
|
5
5
|
} & InputHTMLAttributes<HTMLInputElement>;
|
|
6
|
-
export declare const Radio: ({ label, showLabel, ...props }: TRadio) => JSX.Element;
|
|
6
|
+
export declare const Radio: ({ checked, disabled, label, showLabel, ...props }: TRadio) => JSX.Element;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TFormElement } from '../FormElement.types';
|
|
3
3
|
export declare type TSelect = {
|
|
4
|
-
children?: React.ReactNode;
|
|
5
|
-
hideLabel?: boolean;
|
|
6
4
|
isOpen?: boolean;
|
|
7
|
-
label: string;
|
|
8
5
|
} & TFormElement & Omit<React.SelectHTMLAttributes<HTMLSelectElement>, 'size'>;
|
|
9
|
-
export declare const Select: ({ children, error, errorLabel, hideLabel, isOpen, label, size, ...props }: TSelect) => JSX.Element;
|
|
6
|
+
export declare const Select: ({ children, error, errorLabel, hideLabel, id, isOpen, label, required, size, ...props }: TSelect) => JSX.Element;
|
|
@@ -16,8 +16,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
16
16
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
17
17
|
|
|
18
18
|
var Checkbox = function (_a) {
|
|
19
|
-
var hideLabel = _a.hideLabel, label = _a.label, props = _tslib.__rest(_a, ["hideLabel", "label"]);
|
|
20
|
-
var checked = props.checked, disabled = props.disabled;
|
|
19
|
+
var checked = _a.checked, disabled = _a.disabled, hideLabel = _a.hideLabel, label = _a.label, props = _tslib.__rest(_a, ["checked", "disabled", "hideLabel", "label"]);
|
|
21
20
|
var _b = formElement.getColorAttributes(checked, disabled), iconColor = _b.iconColor, labelColor = _b.labelColor, attributes = _tslib.__rest(_b, ["iconColor", "labelColor"]);
|
|
22
21
|
return (React__default["default"].createElement(FormElement_styles.OptionInputWrapper, { as: "label", disabled: disabled },
|
|
23
22
|
React__default["default"].createElement(FormElement_styles.HiddenInput, _tslib.__assign({ type: "checkbox" }, props)),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Checkbox.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -31,7 +31,7 @@ var Label = styled__default["default"].label(templateObject_2 || (templateObject
|
|
|
31
31
|
var theme = _a.theme;
|
|
32
32
|
return (_b = theme.spacings) === null || _b === void 0 ? void 0 : _b.xxs;
|
|
33
33
|
});
|
|
34
|
-
var sharedFormElementStyles = styled.css(templateObject_3 || (templateObject_3 = _tslib.__makeTemplateObject(["\n appearance: none;\n border: 1px solid\n ", ";\n border-radius: ", "px;\n color: ", ";\n font-family: ", ";\n font-size: ", "px;\n height: ", "px;\n overflow: hidden;\n padding: 0 ", "px;\n text-overflow: ellipsis;\n width: 100%;\n\n &:not(:disabled):focus,\n &:not(:disabled):active {\n outline: 1px solid\n ", ";\n border: 1px solid\n ", ";\n }\n\n &:hover {\n border-color: ", ";\n }\n\n &:disabled {\n background-color: ", ";\n cursor: not-allowed;\n }\n"], ["\n appearance: none;\n border: 1px solid\n ", ";\n border-radius: ", "px;\n color: ", ";\n font-family: ", ";\n font-size: ", "px;\n height: ", "px;\n overflow: hidden;\n padding: 0 ", "px;\n text-overflow: ellipsis;\n width: 100%;\n\n &:not(:disabled):focus,\n &:not(:disabled):active {\n outline: 1px solid\n ", ";\n border: 1px solid\n ", ";\n }\n\n &:hover {\n border-color: ", ";\n }\n\n &:disabled {\n background-color: ", ";\n cursor: not-allowed;\n }\n"])), function (_a) {
|
|
34
|
+
var sharedFormElementStyles = styled.css(templateObject_3 || (templateObject_3 = _tslib.__makeTemplateObject(["\n appearance: none;\n border: 1px solid\n ", ";\n border-radius: ", "px;\n color: ", ";\n font-family: ", ";\n font-size: ", "px;\n height: ", "px;\n overflow: hidden;\n padding: 0 ", "px;\n text-overflow: ellipsis;\n width: 100%;\n\n &:not(:disabled):focus,\n &:not(:disabled):active {\n outline: 1px solid\n ", ";\n border: 1px solid\n ", ";\n }\n\n &:not(:disabled):hover {\n border-color: ", ";\n }\n\n &:disabled {\n background-color: ", ";\n cursor: not-allowed;\n }\n"], ["\n appearance: none;\n border: 1px solid\n ", ";\n border-radius: ", "px;\n color: ", ";\n font-family: ", ";\n font-size: ", "px;\n height: ", "px;\n overflow: hidden;\n padding: 0 ", "px;\n text-overflow: ellipsis;\n width: 100%;\n\n &:not(:disabled):focus,\n &:not(:disabled):active {\n outline: 1px solid\n ", ";\n border: 1px solid\n ", ";\n }\n\n &:not(:disabled):hover {\n border-color: ", ";\n }\n\n &:disabled {\n background-color: ", ";\n cursor: not-allowed;\n }\n"])), function (_a) {
|
|
35
35
|
var _b, _c;
|
|
36
36
|
var error = _a.error, theme = _a.theme;
|
|
37
37
|
return error ? (_b = theme.palette) === null || _b === void 0 ? void 0 : _b.alertRed : (_c = theme.palette) === null || _c === void 0 ? void 0 : _c.placeholder;
|
|
@@ -17,8 +17,7 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
|
17
17
|
|
|
18
18
|
var Input = React__default["default"].forwardRef(function (_a, ref) {
|
|
19
19
|
var _b;
|
|
20
|
-
var elementLeft = _a.elementLeft, elementRight = _a.elementRight,
|
|
21
|
-
var required = props.required;
|
|
20
|
+
var elementLeft = _a.elementLeft, elementRight = _a.elementRight, error = _a.error, errorLabel = _a.errorLabel, fullWidth = _a.fullWidth, id = _a.id, hideLabel = _a.hideLabel, label = _a.label, required = _a.required, paddingLeft = _a.paddingLeft, _c = _a.size, size = _c === void 0 ? FormElement_types.EFormElementSize.large : _c, unit = _a.unit, props = _tslib.__rest(_a, ["elementLeft", "elementRight", "error", "errorLabel", "fullWidth", "id", "hideLabel", "label", "required", "paddingLeft", "size", "unit"]);
|
|
22
21
|
var sizeAttributes = formElement.getSizeAttributes(size);
|
|
23
22
|
var errorId = "".concat(id, "-error");
|
|
24
23
|
return (React__default["default"].createElement(FormElement_styles.Wrapper, null,
|
|
@@ -28,7 +27,7 @@ var Input = React__default["default"].forwardRef(function (_a, ref) {
|
|
|
28
27
|
React__default["default"].createElement(Input_styles.InputWrapper, null,
|
|
29
28
|
React__default["default"].createElement(Input_styles.InputContainer, { fullWidth: fullWidth },
|
|
30
29
|
elementLeft && (React__default["default"].createElement(Input_styles.AbsoluteContainer, null, elementLeft)),
|
|
31
|
-
React__default["default"].createElement(Input_styles.InputElement, _tslib.__assign({ "aria-describedby": error && errorLabel ? errorId : undefined, "aria-invalid": !!error, error: error,
|
|
30
|
+
React__default["default"].createElement(Input_styles.InputElement, _tslib.__assign({ "aria-describedby": error && errorLabel ? errorId : undefined, "aria-invalid": !!error, error: error, paddingLeft: paddingLeft, ref: ref, sizeAttributes: sizeAttributes }, props)),
|
|
32
31
|
elementRight && (React__default["default"].createElement(Input_styles.AbsoluteContainer, { right: true }, elementRight))),
|
|
33
32
|
unit && React__default["default"].createElement(typography.BodyText, { color: (_b = designTokens.theme.palette) === null || _b === void 0 ? void 0 : _b.darkest }, unit)),
|
|
34
33
|
error && errorLabel && (React__default["default"].createElement(FormElement_styles.ErrorLabel, { id: errorId }, errorLabel))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Input.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -15,8 +15,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
15
15
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
16
16
|
|
|
17
17
|
var Radio = function (_a) {
|
|
18
|
-
var label = _a.label, showLabel = _a.showLabel, props = _tslib.__rest(_a, ["label", "showLabel"]);
|
|
19
|
-
var checked = props.checked, disabled = props.disabled;
|
|
18
|
+
var checked = _a.checked, disabled = _a.disabled, label = _a.label, showLabel = _a.showLabel, props = _tslib.__rest(_a, ["checked", "disabled", "label", "showLabel"]);
|
|
20
19
|
var borderSize = formElement.getBorderSize(checked, disabled);
|
|
21
20
|
var _b = formElement.getColorAttributes(checked, disabled, true), labelColor = _b.labelColor, attributes = _tslib.__rest(_b, ["labelColor"]);
|
|
22
21
|
return (React__default["default"].createElement(FormElement_styles.OptionInputWrapper, { as: "label", disabled: disabled },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Radio.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Radio.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -15,8 +15,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
15
15
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
16
16
|
|
|
17
17
|
var Select = function (_a) {
|
|
18
|
-
var children = _a.children, error = _a.error, errorLabel = _a.errorLabel, hideLabel = _a.hideLabel, isOpen = _a.isOpen, label = _a.label, _b = _a.size, size = _b === void 0 ? FormElement_types.EFormElementSize.large : _b, props = _tslib.__rest(_a, ["children", "error", "errorLabel", "hideLabel", "isOpen", "label", "size"]);
|
|
19
|
-
var id = props.id, required = props.required;
|
|
18
|
+
var children = _a.children, error = _a.error, errorLabel = _a.errorLabel, hideLabel = _a.hideLabel, id = _a.id, isOpen = _a.isOpen, label = _a.label, required = _a.required, _b = _a.size, size = _b === void 0 ? FormElement_types.EFormElementSize.large : _b, props = _tslib.__rest(_a, ["children", "error", "errorLabel", "hideLabel", "id", "isOpen", "label", "required", "size"]);
|
|
20
19
|
var _c = formElement.getSizeAttributes(size), iconSize = _c.iconSize, restSizeAttributes = _tslib.__rest(_c, ["iconSize"]);
|
|
21
20
|
var errorId = "".concat(id, "-error");
|
|
22
21
|
return (React__default["default"].createElement(FormElement_styles.Wrapper, null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Select.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -11,7 +11,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
11
11
|
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
12
12
|
|
|
13
13
|
var SelectContainer = styled__default["default"].div(templateObject_1 || (templateObject_1 = _tslib.__makeTemplateObject(["\n position: relative;\n"], ["\n position: relative;\n"])));
|
|
14
|
-
var SelectElement = styled__default["default"].select(templateObject_2 || (templateObject_2 = _tslib.__makeTemplateObject(["\n ", "\n cursor: pointer;\n\n &:hover {\n background-color: ", ";\n }\n"], ["\n ", "\n cursor: pointer;\n\n &:hover {\n background-color: ", ";\n }\n"])), FormElement_styles.sharedFormElementStyles, function (_a) {
|
|
14
|
+
var SelectElement = styled__default["default"].select(templateObject_2 || (templateObject_2 = _tslib.__makeTemplateObject(["\n ", "\n cursor: pointer;\n\n &:not(:disabled):hover {\n background-color: ", ";\n }\n"], ["\n ", "\n cursor: pointer;\n\n &:not(:disabled):hover {\n background-color: ", ";\n }\n"])), FormElement_styles.sharedFormElementStyles, function (_a) {
|
|
15
15
|
var _b;
|
|
16
16
|
var theme = _a.theme;
|
|
17
17
|
return (_b = theme.palette) === null || _b === void 0 ? void 0 : _b.lightest;
|
|
@@ -8,8 +8,7 @@ import { CheckboxContainer, IconContainer } from './Checkbox.styles.js';
|
|
|
8
8
|
import { OptionInputWrapper, HiddenInput } from '../FormElement.styles.js';
|
|
9
9
|
|
|
10
10
|
var Checkbox = function (_a) {
|
|
11
|
-
var hideLabel = _a.hideLabel, label = _a.label, props = __rest(_a, ["hideLabel", "label"]);
|
|
12
|
-
var checked = props.checked, disabled = props.disabled;
|
|
11
|
+
var checked = _a.checked, disabled = _a.disabled, hideLabel = _a.hideLabel, label = _a.label, props = __rest(_a, ["checked", "disabled", "hideLabel", "label"]);
|
|
13
12
|
var _b = getColorAttributes(checked, disabled), iconColor = _b.iconColor, labelColor = _b.labelColor, attributes = __rest(_b, ["iconColor", "labelColor"]);
|
|
14
13
|
return (React.createElement(OptionInputWrapper, { as: "label", disabled: disabled },
|
|
15
14
|
React.createElement(HiddenInput, __assign({ type: "checkbox" }, props)),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Checkbox.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -23,7 +23,7 @@ var Label = styled.label(templateObject_2 || (templateObject_2 = __makeTemplateO
|
|
|
23
23
|
var theme = _a.theme;
|
|
24
24
|
return (_b = theme.spacings) === null || _b === void 0 ? void 0 : _b.xxs;
|
|
25
25
|
});
|
|
26
|
-
var sharedFormElementStyles = css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n appearance: none;\n border: 1px solid\n ", ";\n border-radius: ", "px;\n color: ", ";\n font-family: ", ";\n font-size: ", "px;\n height: ", "px;\n overflow: hidden;\n padding: 0 ", "px;\n text-overflow: ellipsis;\n width: 100%;\n\n &:not(:disabled):focus,\n &:not(:disabled):active {\n outline: 1px solid\n ", ";\n border: 1px solid\n ", ";\n }\n\n &:hover {\n border-color: ", ";\n }\n\n &:disabled {\n background-color: ", ";\n cursor: not-allowed;\n }\n"], ["\n appearance: none;\n border: 1px solid\n ", ";\n border-radius: ", "px;\n color: ", ";\n font-family: ", ";\n font-size: ", "px;\n height: ", "px;\n overflow: hidden;\n padding: 0 ", "px;\n text-overflow: ellipsis;\n width: 100%;\n\n &:not(:disabled):focus,\n &:not(:disabled):active {\n outline: 1px solid\n ", ";\n border: 1px solid\n ", ";\n }\n\n &:hover {\n border-color: ", ";\n }\n\n &:disabled {\n background-color: ", ";\n cursor: not-allowed;\n }\n"])), function (_a) {
|
|
26
|
+
var sharedFormElementStyles = css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n appearance: none;\n border: 1px solid\n ", ";\n border-radius: ", "px;\n color: ", ";\n font-family: ", ";\n font-size: ", "px;\n height: ", "px;\n overflow: hidden;\n padding: 0 ", "px;\n text-overflow: ellipsis;\n width: 100%;\n\n &:not(:disabled):focus,\n &:not(:disabled):active {\n outline: 1px solid\n ", ";\n border: 1px solid\n ", ";\n }\n\n &:not(:disabled):hover {\n border-color: ", ";\n }\n\n &:disabled {\n background-color: ", ";\n cursor: not-allowed;\n }\n"], ["\n appearance: none;\n border: 1px solid\n ", ";\n border-radius: ", "px;\n color: ", ";\n font-family: ", ";\n font-size: ", "px;\n height: ", "px;\n overflow: hidden;\n padding: 0 ", "px;\n text-overflow: ellipsis;\n width: 100%;\n\n &:not(:disabled):focus,\n &:not(:disabled):active {\n outline: 1px solid\n ", ";\n border: 1px solid\n ", ";\n }\n\n &:not(:disabled):hover {\n border-color: ", ";\n }\n\n &:disabled {\n background-color: ", ";\n cursor: not-allowed;\n }\n"])), function (_a) {
|
|
27
27
|
var _b, _c;
|
|
28
28
|
var error = _a.error, theme = _a.theme;
|
|
29
29
|
return error ? (_b = theme.palette) === null || _b === void 0 ? void 0 : _b.alertRed : (_c = theme.palette) === null || _c === void 0 ? void 0 : _c.placeholder;
|
|
@@ -9,8 +9,7 @@ import { EFormElementSize } from '../FormElement.types.js';
|
|
|
9
9
|
|
|
10
10
|
var Input = React.forwardRef(function (_a, ref) {
|
|
11
11
|
var _b;
|
|
12
|
-
var elementLeft = _a.elementLeft, elementRight = _a.elementRight,
|
|
13
|
-
var required = props.required;
|
|
12
|
+
var elementLeft = _a.elementLeft, elementRight = _a.elementRight, error = _a.error, errorLabel = _a.errorLabel, fullWidth = _a.fullWidth, id = _a.id, hideLabel = _a.hideLabel, label = _a.label, required = _a.required, paddingLeft = _a.paddingLeft, _c = _a.size, size = _c === void 0 ? EFormElementSize.large : _c, unit = _a.unit, props = __rest(_a, ["elementLeft", "elementRight", "error", "errorLabel", "fullWidth", "id", "hideLabel", "label", "required", "paddingLeft", "size", "unit"]);
|
|
14
13
|
var sizeAttributes = getSizeAttributes(size);
|
|
15
14
|
var errorId = "".concat(id, "-error");
|
|
16
15
|
return (React.createElement(Wrapper, null,
|
|
@@ -20,7 +19,7 @@ var Input = React.forwardRef(function (_a, ref) {
|
|
|
20
19
|
React.createElement(InputWrapper, null,
|
|
21
20
|
React.createElement(InputContainer, { fullWidth: fullWidth },
|
|
22
21
|
elementLeft && (React.createElement(AbsoluteContainer, null, elementLeft)),
|
|
23
|
-
React.createElement(InputElement, __assign({ "aria-describedby": error && errorLabel ? errorId : undefined, "aria-invalid": !!error, error: error,
|
|
22
|
+
React.createElement(InputElement, __assign({ "aria-describedby": error && errorLabel ? errorId : undefined, "aria-invalid": !!error, error: error, paddingLeft: paddingLeft, ref: ref, sizeAttributes: sizeAttributes }, props)),
|
|
24
23
|
elementRight && (React.createElement(AbsoluteContainer, { right: true }, elementRight))),
|
|
25
24
|
unit && React.createElement(BodyText, { color: (_b = theme.palette) === null || _b === void 0 ? void 0 : _b.darkest }, unit)),
|
|
26
25
|
error && errorLabel && (React.createElement(ErrorLabel, { id: errorId }, errorLabel))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Input.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -7,8 +7,7 @@ import { RadioContainer } from './Radio.styles.js';
|
|
|
7
7
|
import { OptionInputWrapper, HiddenInput } from '../FormElement.styles.js';
|
|
8
8
|
|
|
9
9
|
var Radio = function (_a) {
|
|
10
|
-
var label = _a.label, showLabel = _a.showLabel, props = __rest(_a, ["label", "showLabel"]);
|
|
11
|
-
var checked = props.checked, disabled = props.disabled;
|
|
10
|
+
var checked = _a.checked, disabled = _a.disabled, label = _a.label, showLabel = _a.showLabel, props = __rest(_a, ["checked", "disabled", "label", "showLabel"]);
|
|
12
11
|
var borderSize = getBorderSize(checked, disabled);
|
|
13
12
|
var _b = getColorAttributes(checked, disabled, true), labelColor = _b.labelColor, attributes = __rest(_b, ["labelColor"]);
|
|
14
13
|
return (React.createElement(OptionInputWrapper, { as: "label", disabled: disabled },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Radio.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Radio.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -7,8 +7,7 @@ import { SelectContainer, SelectElement, SelectIcon } from './Select.styles.js';
|
|
|
7
7
|
import { EFormElementSize } from '../FormElement.types.js';
|
|
8
8
|
|
|
9
9
|
var Select = function (_a) {
|
|
10
|
-
var children = _a.children, error = _a.error, errorLabel = _a.errorLabel, hideLabel = _a.hideLabel, isOpen = _a.isOpen, label = _a.label, _b = _a.size, size = _b === void 0 ? EFormElementSize.large : _b, props = __rest(_a, ["children", "error", "errorLabel", "hideLabel", "isOpen", "label", "size"]);
|
|
11
|
-
var id = props.id, required = props.required;
|
|
10
|
+
var children = _a.children, error = _a.error, errorLabel = _a.errorLabel, hideLabel = _a.hideLabel, id = _a.id, isOpen = _a.isOpen, label = _a.label, required = _a.required, _b = _a.size, size = _b === void 0 ? EFormElementSize.large : _b, props = __rest(_a, ["children", "error", "errorLabel", "hideLabel", "id", "isOpen", "label", "required", "size"]);
|
|
12
11
|
var _c = getSizeAttributes(size), iconSize = _c.iconSize, restSizeAttributes = __rest(_c, ["iconSize"]);
|
|
13
12
|
var errorId = "".concat(id, "-error");
|
|
14
13
|
return (React.createElement(Wrapper, null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Select.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -3,7 +3,7 @@ import styled from 'styled-components';
|
|
|
3
3
|
import { sharedFormElementStyles } from '../FormElement.styles.js';
|
|
4
4
|
|
|
5
5
|
var SelectContainer = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n"], ["\n position: relative;\n"])));
|
|
6
|
-
var SelectElement = styled.select(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", "\n cursor: pointer;\n\n &:hover {\n background-color: ", ";\n }\n"], ["\n ", "\n cursor: pointer;\n\n &:hover {\n background-color: ", ";\n }\n"])), sharedFormElementStyles, function (_a) {
|
|
6
|
+
var SelectElement = styled.select(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", "\n cursor: pointer;\n\n &:not(:disabled):hover {\n background-color: ", ";\n }\n"], ["\n ", "\n cursor: pointer;\n\n &:not(:disabled):hover {\n background-color: ", ";\n }\n"])), sharedFormElementStyles, function (_a) {
|
|
7
7
|
var _b;
|
|
8
8
|
var theme = _a.theme;
|
|
9
9
|
return (_b = theme.palette) === null || _b === void 0 ? void 0 : _b.lightest;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@citygross/components",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.14",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./build/cjs/components/src/index.js",
|
|
@@ -75,5 +75,5 @@
|
|
|
75
75
|
"react-slick": "^0.30.1",
|
|
76
76
|
"slick-carousel": "^1.8.1"
|
|
77
77
|
},
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "5425bd3f7725b7976dfe5481bc8423f5ab2f6fc3"
|
|
79
79
|
}
|