@citygross/components 0.8.163 → 0.8.164
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/CgButton/ButtonAsLink/ButtonAsLink.d.ts +2 -1
- package/build/@types/components/CgButton/CgButton.styles.d.ts +3 -0
- package/build/@types/components/CgButton/CgButton.types.d.ts +1 -0
- package/build/@types/components/FormElements/FormElement.styles.d.ts +1 -0
- package/build/cjs/components/src/components/CgButton/ButtonAsLink/ButtonAsLink.js +2 -2
- package/build/cjs/components/src/components/CgButton/CgButton.js +4 -1
- package/build/cjs/components/src/components/CgButton/CgButton.js.map +1 -1
- package/build/cjs/components/src/components/CgButton/CgButton.styles.js +10 -3
- package/build/cjs/components/src/components/CgButton/CgButton.styles.js.map +1 -1
- package/build/cjs/components/src/components/FormElements/FormElement.styles.js +5 -2
- package/build/cjs/components/src/components/FormElements/FormElement.styles.js.map +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/es/components/src/components/CgButton/ButtonAsLink/ButtonAsLink.js +2 -2
- package/build/es/components/src/components/CgButton/CgButton.js +5 -2
- package/build/es/components/src/components/CgButton/CgButton.js.map +1 -1
- package/build/es/components/src/components/CgButton/CgButton.styles.js +9 -4
- package/build/es/components/src/components/CgButton/CgButton.styles.js.map +1 -1
- package/build/es/components/src/components/FormElements/FormElement.styles.js +5 -3
- package/build/es/components/src/components/FormElements/FormElement.styles.js.map +1 -1
- package/build/es/components/src/components/FormElements/Input/Input.js +4 -5
- package/build/es/components/src/components/FormElements/Input/Input.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export declare type TButtonAsLink = {
|
|
3
3
|
children: React.ReactNode;
|
|
4
|
+
type?: 'button' | 'submit' | 'reset';
|
|
4
5
|
} & React.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
5
|
-
export declare const ButtonAsLink: ({ children, ...props }: TButtonAsLink) => JSX.Element;
|
|
6
|
+
export declare const ButtonAsLink: ({ children, type, ...props }: TButtonAsLink) => JSX.Element;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import { TChildrenContainer } from './CgButton.types';
|
|
1
2
|
export declare const ButtonStyle: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, Omit<import("./CgButton.types").TCgButtonRoot, "children" | "loading" | "variant"> & {
|
|
2
3
|
sizeAttributes: import("./CgButton.types").TButtonSizeAttributes;
|
|
3
4
|
variantAttributes: import("./CgButton.types").TButtonVariantAttributes;
|
|
4
5
|
}, never>;
|
|
6
|
+
export declare const ChildrenContainer: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, TChildrenContainer, never>;
|
|
7
|
+
export declare const SpinnerContainer: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
|
|
5
8
|
export declare const DivAsButton: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, Omit<import("./CgButton.types").TCgButtonRoot, "children" | "loading" | "variant"> & {
|
|
6
9
|
sizeAttributes: import("./CgButton.types").TButtonSizeAttributes;
|
|
7
10
|
variantAttributes: import("./CgButton.types").TButtonVariantAttributes;
|
|
@@ -9,4 +9,5 @@ declare type TOptionInputWrapper = {
|
|
|
9
9
|
};
|
|
10
10
|
export declare const OptionInputWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, TOptionInputWrapper, never>;
|
|
11
11
|
export declare const HiddenInput: import("styled-components").StyledComponent<"input", import("styled-components").DefaultTheme, {}, never>;
|
|
12
|
+
export declare const HiddenLabel: import("styled-components").StyledComponent<"label", import("styled-components").DefaultTheme, {}, never>;
|
|
12
13
|
export {};
|
|
@@ -11,8 +11,8 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
11
11
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
12
12
|
|
|
13
13
|
var ButtonAsLink = function (_a) {
|
|
14
|
-
var children = _a.children, props = _tslib.__rest(_a, ["children"]);
|
|
15
|
-
return (React__default["default"].createElement(ButtonAsLink_styles.ButtonAsLink, _tslib.__assign({}, props), children));
|
|
14
|
+
var children = _a.children, _b = _a.type, type = _b === void 0 ? 'button' : _b, props = _tslib.__rest(_a, ["children", "type"]);
|
|
15
|
+
return (React__default["default"].createElement(ButtonAsLink_styles.ButtonAsLink, _tslib.__assign({ type: type }, props), children));
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
exports.ButtonAsLink = ButtonAsLink;
|
|
@@ -18,7 +18,10 @@ var CgButton = React.forwardRef(function (_a, ref) {
|
|
|
18
18
|
var _b;
|
|
19
19
|
var boxShadow = _a.boxShadow, children = _a.children, circle = _a.circle, fullWidth = _a.fullWidth, loading = _a.loading, rounded = _a.rounded, _c = _a.size, size = _c === void 0 ? CgButton_types.EButtonSize.medium : _c, _d = _a.type, type = _d === void 0 ? 'button' : _d, _e = _a.variant, variant = _e === void 0 ? CgButton_types.EButtonVariant.primary : _e, props = _tslib.__rest(_a, ["boxShadow", "children", "circle", "fullWidth", "loading", "rounded", "size", "type", "variant"]);
|
|
20
20
|
var _f = button.getButtonAttributes(size, variant), sizeAttributes = _f.sizeAttributes, variantAttributes = _f.variantAttributes;
|
|
21
|
-
return (React__default["default"].createElement(CgButton_styles.ButtonStyle, _tslib.__assign({ boxShadow: boxShadow, circle: circle, disabled: loading, fullWidth: fullWidth, ref: ref, rounded: rounded, size: size, sizeAttributes: sizeAttributes, type: type, variantAttributes: variantAttributes }, props),
|
|
21
|
+
return (React__default["default"].createElement(CgButton_styles.ButtonStyle, _tslib.__assign({ boxShadow: boxShadow, circle: circle, disabled: loading, fullWidth: fullWidth, ref: ref, rounded: rounded, size: size, sizeAttributes: sizeAttributes, type: type, variantAttributes: variantAttributes }, props),
|
|
22
|
+
React__default["default"].createElement(CgButton_styles.ChildrenContainer, { loading: loading }, children),
|
|
23
|
+
loading && (React__default["default"].createElement(CgButton_styles.SpinnerContainer, null,
|
|
24
|
+
React__default["default"].createElement(Spinner.Spinner, { animationSpeedMs: 1000, size: sizeAttributes.loadingSpinner, spinnerColor: (_b = designTokens.theme.palette) === null || _b === void 0 ? void 0 : _b.disabledDarkGray })))));
|
|
22
25
|
});
|
|
23
26
|
CgButton.displayName = 'CgButton';
|
|
24
27
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CgButton.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CgButton.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -72,7 +72,7 @@ var sharedButtonStyles = styled.css(templateObject_1 || (templateObject_1 = _tsl
|
|
|
72
72
|
var variantAttributes = _a.variantAttributes;
|
|
73
73
|
return variantAttributes.backgroundActive;
|
|
74
74
|
}, global_styles.focusVisible);
|
|
75
|
-
var ButtonStyle = styled__default["default"].button(templateObject_2 || (templateObject_2 = _tslib.__makeTemplateObject(["\n ", "\n cursor: pointer;\n\n &:disabled {\n background-color: ", ";\n color: ", ";\n cursor: not-allowed;\n }\n"], ["\n ", "\n cursor: pointer;\n\n &:disabled {\n background-color: ", ";\n color: ", ";\n cursor: not-allowed;\n }\n"])), sharedButtonStyles, function (_a) {
|
|
75
|
+
var ButtonStyle = styled__default["default"].button(templateObject_2 || (templateObject_2 = _tslib.__makeTemplateObject(["\n ", "\n cursor: pointer;\n position: relative;\n\n svg {\n display: block;\n }\n\n &:disabled {\n background-color: ", ";\n color: ", ";\n cursor: not-allowed;\n }\n"], ["\n ", "\n cursor: pointer;\n position: relative;\n\n svg {\n display: block;\n }\n\n &:disabled {\n background-color: ", ";\n color: ", ";\n cursor: not-allowed;\n }\n"])), sharedButtonStyles, function (_a) {
|
|
76
76
|
var variantAttributes = _a.variantAttributes;
|
|
77
77
|
return variantAttributes.backgroundDisabled;
|
|
78
78
|
}, function (_a) {
|
|
@@ -80,9 +80,16 @@ var ButtonStyle = styled__default["default"].button(templateObject_2 || (templat
|
|
|
80
80
|
var theme = _a.theme;
|
|
81
81
|
return (_b = theme.palette) === null || _b === void 0 ? void 0 : _b.placeholder;
|
|
82
82
|
});
|
|
83
|
-
var
|
|
84
|
-
var
|
|
83
|
+
var ChildrenContainer = styled__default["default"].span(templateObject_3 || (templateObject_3 = _tslib.__makeTemplateObject(["\n opacity: ", ";\n"], ["\n opacity: ", ";\n"])), function (_a) {
|
|
84
|
+
var loading = _a.loading;
|
|
85
|
+
return (loading ? 0 : 1);
|
|
86
|
+
});
|
|
87
|
+
var SpinnerContainer = styled__default["default"].span(templateObject_4 || (templateObject_4 = _tslib.__makeTemplateObject(["\n position: absolute;\n"], ["\n position: absolute;\n"])));
|
|
88
|
+
var DivAsButton = styled__default["default"].div(templateObject_5 || (templateObject_5 = _tslib.__makeTemplateObject(["\n ", "\n cursor: pointer;\n"], ["\n ", "\n cursor: pointer;\n"])), sharedButtonStyles);
|
|
89
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
|
|
85
90
|
|
|
86
91
|
exports.ButtonStyle = ButtonStyle;
|
|
92
|
+
exports.ChildrenContainer = ChildrenContainer;
|
|
87
93
|
exports.DivAsButton = DivAsButton;
|
|
94
|
+
exports.SpinnerContainer = SpinnerContainer;
|
|
88
95
|
//# sourceMappingURL=CgButton.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CgButton.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CgButton.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -102,11 +102,14 @@ var OptionInputWrapper = styled__default["default"].div(templateObject_5 || (tem
|
|
|
102
102
|
var theme = _a.theme;
|
|
103
103
|
return (_b = theme.attributes) === null || _b === void 0 ? void 0 : _b.boxShadow.focusVisible;
|
|
104
104
|
});
|
|
105
|
-
var
|
|
106
|
-
var
|
|
105
|
+
var hiddenStyles = styled.css(templateObject_6 || (templateObject_6 = _tslib.__makeTemplateObject(["\n border: 0;\n clip: rect(0 0 0 0);\n clip-path: inset(100%);\n height: 1px;\n width: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n white-space: nowrap;\n"], ["\n border: 0;\n clip: rect(0 0 0 0);\n clip-path: inset(100%);\n height: 1px;\n width: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n white-space: nowrap;\n"])));
|
|
106
|
+
var HiddenInput = styled__default["default"].input(templateObject_7 || (templateObject_7 = _tslib.__makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), hiddenStyles);
|
|
107
|
+
var HiddenLabel = styled__default["default"].label(templateObject_8 || (templateObject_8 = _tslib.__makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), hiddenStyles);
|
|
108
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8;
|
|
107
109
|
|
|
108
110
|
exports.ErrorLabel = ErrorLabel;
|
|
109
111
|
exports.HiddenInput = HiddenInput;
|
|
112
|
+
exports.HiddenLabel = HiddenLabel;
|
|
110
113
|
exports.Label = Label;
|
|
111
114
|
exports.OptionInputWrapper = OptionInputWrapper;
|
|
112
115
|
exports.Wrapper = Wrapper;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormElement.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FormElement.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -7,7 +7,6 @@ var React = require('react');
|
|
|
7
7
|
var designTokens = require('@citygross/design-tokens');
|
|
8
8
|
var typography = require('@citygross/typography');
|
|
9
9
|
var formElement = require('../../../helpers/form-element.js');
|
|
10
|
-
var ScreenReader = require('../../ScreenReader/ScreenReader.js');
|
|
11
10
|
var FormElement_styles = require('../FormElement.styles.js');
|
|
12
11
|
var Input_styles = require('./Input.styles.js');
|
|
13
12
|
var FormElement_types = require('../FormElement.types.js');
|
|
@@ -23,9 +22,9 @@ var Input = function (_a) {
|
|
|
23
22
|
var sizeAttributes = formElement.getSizeAttributes(size);
|
|
24
23
|
var errorId = "".concat(id, "-error");
|
|
25
24
|
return (React__default["default"].createElement(FormElement_styles.Wrapper, null,
|
|
26
|
-
React__default["default"].createElement(FormElement_styles.
|
|
25
|
+
hideLabel ? (React__default["default"].createElement(FormElement_styles.HiddenLabel, { htmlFor: id }, label)) : (React__default["default"].createElement(FormElement_styles.Label, { htmlFor: id },
|
|
27
26
|
label,
|
|
28
|
-
required ? ' *' : ''))
|
|
27
|
+
required ? ' *' : '')),
|
|
29
28
|
React__default["default"].createElement(Input_styles.InputWrapper, null,
|
|
30
29
|
React__default["default"].createElement(Input_styles.InputContainer, { fullWidth: fullWidth },
|
|
31
30
|
elementLeft && (React__default["default"].createElement(Input_styles.AbsoluteContainer, null, elementLeft)),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Input.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -3,8 +3,8 @@ import React from 'react';
|
|
|
3
3
|
import { ButtonAsLink as ButtonAsLink$1 } from './ButtonAsLink.styles.js';
|
|
4
4
|
|
|
5
5
|
var ButtonAsLink = function (_a) {
|
|
6
|
-
var children = _a.children, props = __rest(_a, ["children"]);
|
|
7
|
-
return (React.createElement(ButtonAsLink$1, __assign({}, props), children));
|
|
6
|
+
var children = _a.children, _b = _a.type, type = _b === void 0 ? 'button' : _b, props = __rest(_a, ["children", "type"]);
|
|
7
|
+
return (React.createElement(ButtonAsLink$1, __assign({ type: type }, props), children));
|
|
8
8
|
};
|
|
9
9
|
|
|
10
10
|
export { ButtonAsLink };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __rest, __assign } from '../../../../_virtual/_tslib.js';
|
|
2
2
|
import React, { forwardRef } from 'react';
|
|
3
|
-
import { ButtonStyle } from './CgButton.styles.js';
|
|
3
|
+
import { ButtonStyle, ChildrenContainer, SpinnerContainer } from './CgButton.styles.js';
|
|
4
4
|
import { Spinner } from '../Spinner/Spinner.js';
|
|
5
5
|
import { EButtonSize, EButtonVariant } from './CgButton.types.js';
|
|
6
6
|
import { getButtonAttributes } from '../../helpers/button.js';
|
|
@@ -10,7 +10,10 @@ var CgButton = forwardRef(function (_a, ref) {
|
|
|
10
10
|
var _b;
|
|
11
11
|
var boxShadow = _a.boxShadow, children = _a.children, circle = _a.circle, fullWidth = _a.fullWidth, loading = _a.loading, rounded = _a.rounded, _c = _a.size, size = _c === void 0 ? EButtonSize.medium : _c, _d = _a.type, type = _d === void 0 ? 'button' : _d, _e = _a.variant, variant = _e === void 0 ? EButtonVariant.primary : _e, props = __rest(_a, ["boxShadow", "children", "circle", "fullWidth", "loading", "rounded", "size", "type", "variant"]);
|
|
12
12
|
var _f = getButtonAttributes(size, variant), sizeAttributes = _f.sizeAttributes, variantAttributes = _f.variantAttributes;
|
|
13
|
-
return (React.createElement(ButtonStyle, __assign({ boxShadow: boxShadow, circle: circle, disabled: loading, fullWidth: fullWidth, ref: ref, rounded: rounded, size: size, sizeAttributes: sizeAttributes, type: type, variantAttributes: variantAttributes }, props),
|
|
13
|
+
return (React.createElement(ButtonStyle, __assign({ boxShadow: boxShadow, circle: circle, disabled: loading, fullWidth: fullWidth, ref: ref, rounded: rounded, size: size, sizeAttributes: sizeAttributes, type: type, variantAttributes: variantAttributes }, props),
|
|
14
|
+
React.createElement(ChildrenContainer, { loading: loading }, children),
|
|
15
|
+
loading && (React.createElement(SpinnerContainer, null,
|
|
16
|
+
React.createElement(Spinner, { animationSpeedMs: 1000, size: sizeAttributes.loadingSpinner, spinnerColor: (_b = theme.palette) === null || _b === void 0 ? void 0 : _b.disabledDarkGray })))));
|
|
14
17
|
});
|
|
15
18
|
CgButton.displayName = 'CgButton';
|
|
16
19
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CgButton.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CgButton.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -64,7 +64,7 @@ var sharedButtonStyles = css(templateObject_1 || (templateObject_1 = __makeTempl
|
|
|
64
64
|
var variantAttributes = _a.variantAttributes;
|
|
65
65
|
return variantAttributes.backgroundActive;
|
|
66
66
|
}, focusVisible);
|
|
67
|
-
var ButtonStyle = styled.button(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", "\n cursor: pointer;\n\n &:disabled {\n background-color: ", ";\n color: ", ";\n cursor: not-allowed;\n }\n"], ["\n ", "\n cursor: pointer;\n\n &:disabled {\n background-color: ", ";\n color: ", ";\n cursor: not-allowed;\n }\n"])), sharedButtonStyles, function (_a) {
|
|
67
|
+
var ButtonStyle = styled.button(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", "\n cursor: pointer;\n position: relative;\n\n svg {\n display: block;\n }\n\n &:disabled {\n background-color: ", ";\n color: ", ";\n cursor: not-allowed;\n }\n"], ["\n ", "\n cursor: pointer;\n position: relative;\n\n svg {\n display: block;\n }\n\n &:disabled {\n background-color: ", ";\n color: ", ";\n cursor: not-allowed;\n }\n"])), sharedButtonStyles, function (_a) {
|
|
68
68
|
var variantAttributes = _a.variantAttributes;
|
|
69
69
|
return variantAttributes.backgroundDisabled;
|
|
70
70
|
}, function (_a) {
|
|
@@ -72,8 +72,13 @@ var ButtonStyle = styled.button(templateObject_2 || (templateObject_2 = __makeTe
|
|
|
72
72
|
var theme = _a.theme;
|
|
73
73
|
return (_b = theme.palette) === null || _b === void 0 ? void 0 : _b.placeholder;
|
|
74
74
|
});
|
|
75
|
-
var
|
|
76
|
-
var
|
|
75
|
+
var ChildrenContainer = styled.span(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n opacity: ", ";\n"], ["\n opacity: ", ";\n"])), function (_a) {
|
|
76
|
+
var loading = _a.loading;
|
|
77
|
+
return (loading ? 0 : 1);
|
|
78
|
+
});
|
|
79
|
+
var SpinnerContainer = styled.span(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n position: absolute;\n"], ["\n position: absolute;\n"])));
|
|
80
|
+
var DivAsButton = styled.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n ", "\n cursor: pointer;\n"], ["\n ", "\n cursor: pointer;\n"])), sharedButtonStyles);
|
|
81
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
|
|
77
82
|
|
|
78
|
-
export { ButtonStyle, DivAsButton };
|
|
83
|
+
export { ButtonStyle, ChildrenContainer, DivAsButton, SpinnerContainer };
|
|
79
84
|
//# sourceMappingURL=CgButton.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CgButton.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CgButton.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -94,8 +94,10 @@ var OptionInputWrapper = styled.div(templateObject_5 || (templateObject_5 = __ma
|
|
|
94
94
|
var theme = _a.theme;
|
|
95
95
|
return (_b = theme.attributes) === null || _b === void 0 ? void 0 : _b.boxShadow.focusVisible;
|
|
96
96
|
});
|
|
97
|
-
var
|
|
98
|
-
var
|
|
97
|
+
var hiddenStyles = css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n border: 0;\n clip: rect(0 0 0 0);\n clip-path: inset(100%);\n height: 1px;\n width: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n white-space: nowrap;\n"], ["\n border: 0;\n clip: rect(0 0 0 0);\n clip-path: inset(100%);\n height: 1px;\n width: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n white-space: nowrap;\n"])));
|
|
98
|
+
var HiddenInput = styled.input(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), hiddenStyles);
|
|
99
|
+
var HiddenLabel = styled.label(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), hiddenStyles);
|
|
100
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8;
|
|
99
101
|
|
|
100
|
-
export { ErrorLabel, HiddenInput, Label, OptionInputWrapper, Wrapper, sharedFormElementStyles };
|
|
102
|
+
export { ErrorLabel, HiddenInput, HiddenLabel, Label, OptionInputWrapper, Wrapper, sharedFormElementStyles };
|
|
101
103
|
//# sourceMappingURL=FormElement.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormElement.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FormElement.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { __rest, __assign } from '../../../../../_virtual/_tslib.js';
|
|
2
|
-
import React
|
|
2
|
+
import React from 'react';
|
|
3
3
|
import { theme } from '@citygross/design-tokens';
|
|
4
4
|
import { BodyText } from '@citygross/typography';
|
|
5
5
|
import { getSizeAttributes } from '../../../helpers/form-element.js';
|
|
6
|
-
import {
|
|
7
|
-
import { Wrapper, Label, ErrorLabel } from '../FormElement.styles.js';
|
|
6
|
+
import { Wrapper, HiddenLabel, Label, ErrorLabel } from '../FormElement.styles.js';
|
|
8
7
|
import { InputWrapper, InputContainer, AbsoluteContainer, InputElement } from './Input.styles.js';
|
|
9
8
|
import { EFormElementSize } from '../FormElement.types.js';
|
|
10
9
|
|
|
@@ -15,9 +14,9 @@ var Input = function (_a) {
|
|
|
15
14
|
var sizeAttributes = getSizeAttributes(size);
|
|
16
15
|
var errorId = "".concat(id, "-error");
|
|
17
16
|
return (React.createElement(Wrapper, null,
|
|
18
|
-
React.createElement(
|
|
17
|
+
hideLabel ? (React.createElement(HiddenLabel, { htmlFor: id }, label)) : (React.createElement(Label, { htmlFor: id },
|
|
19
18
|
label,
|
|
20
|
-
required ? ' *' : ''))
|
|
19
|
+
required ? ' *' : '')),
|
|
21
20
|
React.createElement(InputWrapper, null,
|
|
22
21
|
React.createElement(InputContainer, { fullWidth: fullWidth },
|
|
23
22
|
elementLeft && (React.createElement(AbsoluteContainer, null, elementLeft)),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Input.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@citygross/components",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.164",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./build/cjs/components/src/index.js",
|
|
@@ -74,5 +74,5 @@
|
|
|
74
74
|
"react-slick": "^0.30.1",
|
|
75
75
|
"slick-carousel": "^1.8.1"
|
|
76
76
|
},
|
|
77
|
-
"gitHead": "
|
|
77
|
+
"gitHead": "2ceba690548259d29b0271499880d6f8614a8764"
|
|
78
78
|
}
|