@citygross/components 0.8.149 → 0.8.151

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/build/@types/components/FormElements/Input/Input.d.ts +3 -3
  2. package/build/@types/components/FormElements/Radio/Radio.d.ts +1 -2
  3. package/build/@types/components/RadioBox/RadioBoxItem.d.ts +1 -3
  4. package/build/@types/components/RadioBox/RadioBoxItem.styles.d.ts +5 -9
  5. package/build/cjs/components/src/components/FormElements/FormElement.styles.js +2 -2
  6. package/build/cjs/components/src/components/FormElements/Input/Input.js +8 -13
  7. package/build/cjs/components/src/components/FormElements/Input/Input.js.map +1 -1
  8. package/build/cjs/components/src/components/FormElements/Radio/Radio.js +1 -4
  9. package/build/cjs/components/src/components/FormElements/Radio/Radio.js.map +1 -1
  10. package/build/cjs/components/src/components/FormElements/Select/Select.styles.js +5 -1
  11. package/build/cjs/components/src/components/FormElements/Select/Select.styles.js.map +1 -1
  12. package/build/cjs/components/src/components/RadioBox/RadioBoxItem.js +12 -5
  13. package/build/cjs/components/src/components/RadioBox/RadioBoxItem.js.map +1 -1
  14. package/build/cjs/components/src/components/RadioBox/RadioBoxItem.styles.js +4 -19
  15. package/build/cjs/components/src/components/RadioBox/RadioBoxItem.styles.js.map +1 -1
  16. package/build/cjs/components/src/components/RadioBox/RadioBoxList.js +1 -1
  17. package/build/es/components/src/components/FormElements/FormElement.styles.js +2 -2
  18. package/build/es/components/src/components/FormElements/Input/Input.js +8 -13
  19. package/build/es/components/src/components/FormElements/Input/Input.js.map +1 -1
  20. package/build/es/components/src/components/FormElements/Radio/Radio.js +2 -5
  21. package/build/es/components/src/components/FormElements/Radio/Radio.js.map +1 -1
  22. package/build/es/components/src/components/FormElements/Select/Select.styles.js +5 -1
  23. package/build/es/components/src/components/FormElements/Select/Select.styles.js.map +1 -1
  24. package/build/es/components/src/components/RadioBox/RadioBoxItem.js +13 -6
  25. package/build/es/components/src/components/RadioBox/RadioBoxItem.js.map +1 -1
  26. package/build/es/components/src/components/RadioBox/RadioBoxItem.styles.js +5 -18
  27. package/build/es/components/src/components/RadioBox/RadioBoxItem.styles.js.map +1 -1
  28. package/build/es/components/src/components/RadioBox/RadioBoxList.js +1 -1
  29. package/package.json +2 -2
@@ -1,11 +1,11 @@
1
1
  import React from 'react';
2
2
  import { TFormElement } from '../FormElement.types';
3
3
  export declare type TInput = {
4
- clearFunction?: () => void;
4
+ elementLeft?: React.ReactElement;
5
+ elementRight?: React.ReactElement;
5
6
  hideLabel?: boolean;
6
- icon?: React.ReactElement;
7
7
  label: string;
8
8
  paddingLeft?: number;
9
9
  unit?: string;
10
10
  } & TFormElement & Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'>;
11
- export declare const Input: ({ clearFunction, hideLabel, icon, error, errorLabel, label, paddingLeft, size, unit, ...props }: TInput) => JSX.Element;
11
+ export declare const Input: ({ elementLeft, elementRight, hideLabel, error, errorLabel, label, paddingLeft, size, unit, ...props }: TInput) => JSX.Element;
@@ -1,7 +1,6 @@
1
1
  import { InputHTMLAttributes } from 'react';
2
2
  export declare type TRadio = {
3
- hideRadioButton?: boolean;
4
3
  label: string;
5
4
  showLabel?: boolean;
6
5
  } & InputHTMLAttributes<HTMLInputElement>;
7
- export declare const Radio: ({ hideRadioButton, label, showLabel, ...props }: TRadio) => JSX.Element;
6
+ export declare const Radio: ({ label, showLabel, ...props }: TRadio) => JSX.Element;
@@ -1,15 +1,13 @@
1
1
  import React from 'react';
2
2
  import * as styles from './RadioBoxItem.styles';
3
3
  export declare type TRadioBox = styles.TBaseRadioBox & {
4
- ariaLabel: string;
5
4
  background?: string;
6
5
  border?: string;
7
6
  children: React.ReactNode;
8
7
  hideRadioButton?: boolean;
9
8
  flexDirection?: string;
10
- id: string;
11
9
  name: string;
12
10
  padding?: number;
13
11
  setActive?: () => void;
14
12
  };
15
- export declare const RadioBoxItem: ({ align, ariaLabel, background, border, boxShadow, checked, children, hideRadioButton, flexDirection, id, isDisabled, name, padding, setActive }: TRadioBox) => JSX.Element;
13
+ export declare const RadioBoxItem: ({ align, background, border, boxShadow, checked, children, hideRadioButton, flexDirection, isDisabled, name, padding, setActive }: TRadioBox) => JSX.Element;
@@ -1,22 +1,18 @@
1
+ import React from 'react';
1
2
  export declare enum Alignment {
2
3
  'flex-start' = 0,
3
4
  'center' = 1
4
5
  }
5
6
  export declare type TBaseRadioBox = {
6
- align?: keyof typeof Alignment;
7
- boxShadow?: boolean;
8
7
  checked?: boolean;
9
8
  isDisabled?: boolean;
9
+ align?: keyof typeof Alignment;
10
+ onClick?: React.Dispatch<React.SetStateAction<undefined>> | (() => void);
11
+ boxShadow?: boolean;
10
12
  };
11
13
  export declare const BaseRadioBox: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, TBaseRadioBox & {
12
- background?: string | undefined;
13
14
  border?: string | undefined;
15
+ background?: string | undefined;
14
16
  flexDirection?: string | undefined;
15
17
  padding?: number | undefined;
16
18
  }, never>;
17
- declare type TRadioBoxWrapper = {
18
- disabled?: boolean;
19
- };
20
- export declare const RadioBoxWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, TRadioBoxWrapper, never>;
21
- export declare const RadioBoxLabel: import("styled-components").StyledComponent<"label", import("styled-components").DefaultTheme, {}, never>;
22
- export {};
@@ -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 cursor: pointer;\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 background-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 cursor: pointer;\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 background-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 &: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) {
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;
@@ -67,7 +67,7 @@ var sharedFormElementStyles = styled.css(templateObject_3 || (templateObject_3 =
67
67
  }, function (_a) {
68
68
  var _b;
69
69
  var theme = _a.theme;
70
- return (_b = theme.palette) === null || _b === void 0 ? void 0 : _b.lightest;
70
+ return (_b = theme.palette) === null || _b === void 0 ? void 0 : _b.darkest;
71
71
  }, function (_a) {
72
72
  var _b;
73
73
  var theme = _a.theme;
@@ -4,24 +4,21 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var _tslib = require('../../../../../_virtual/_tslib.js');
6
6
  var React = require('react');
7
+ var designTokens = require('@citygross/design-tokens');
8
+ var typography = require('@citygross/typography');
7
9
  var formElement = require('../../../helpers/form-element.js');
10
+ var ScreenReader = require('../../ScreenReader/ScreenReader.js');
8
11
  var FormElement_styles = require('../FormElement.styles.js');
9
12
  var Input_styles = require('./Input.styles.js');
10
13
  var FormElement_types = require('../FormElement.types.js');
11
- var designTokens = require('@citygross/design-tokens');
12
- var icons = require('@citygross/icons');
13
- var typography = require('@citygross/typography');
14
- var CgButton = require('../../CgButton/CgButton.js');
15
- var ScreenReader = require('../../ScreenReader/ScreenReader.js');
16
- var CgButton_types = require('../../CgButton/CgButton.types.js');
17
14
 
18
15
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
19
16
 
20
17
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
21
18
 
22
19
  var Input = function (_a) {
23
- var _b, _c, _d;
24
- var clearFunction = _a.clearFunction, hideLabel = _a.hideLabel, icon = _a.icon, error = _a.error, errorLabel = _a.errorLabel, label = _a.label, paddingLeft = _a.paddingLeft, _e = _a.size, size = _e === void 0 ? FormElement_types.EFormElementSize.large : _e, unit = _a.unit, props = _tslib.__rest(_a, ["clearFunction", "hideLabel", "icon", "error", "errorLabel", "label", "paddingLeft", "size", "unit"]);
20
+ var _b;
21
+ var elementLeft = _a.elementLeft, elementRight = _a.elementRight, hideLabel = _a.hideLabel, error = _a.error, errorLabel = _a.errorLabel, label = _a.label, paddingLeft = _a.paddingLeft, _c = _a.size, size = _c === void 0 ? FormElement_types.EFormElementSize.large : _c, unit = _a.unit, props = _tslib.__rest(_a, ["elementLeft", "elementRight", "hideLabel", "error", "errorLabel", "label", "paddingLeft", "size", "unit"]);
25
22
  var id = props.id, required = props.required;
26
23
  var sizeAttributes = formElement.getSizeAttributes(size);
27
24
  var errorId = "".concat(id, "-error");
@@ -31,12 +28,10 @@ var Input = function (_a) {
31
28
  required ? ' *' : '')),
32
29
  React__default["default"].createElement(Input_styles.InputWrapper, null,
33
30
  React__default["default"].createElement(Input_styles.InputContainer, null,
34
- icon && (React__default["default"].createElement(Input_styles.AbsoluteContainer, null, icon)),
31
+ elementLeft && (React__default["default"].createElement(Input_styles.AbsoluteContainer, null, elementLeft)),
35
32
  React__default["default"].createElement(Input_styles.InputElement, _tslib.__assign({ "aria-describedby": error && errorLabel ? errorId : undefined, "aria-invalid": !!error, error: error, paddingLeft: paddingLeft, sizeAttributes: sizeAttributes }, props)),
36
- clearFunction && (React__default["default"].createElement(Input_styles.AbsoluteContainer, { right: true },
37
- React__default["default"].createElement(CgButton.CgButton, { circle: true, onClick: clearFunction, size: CgButton_types.EButtonSize.small, variant: CgButton_types.EButtonVariant.ghost },
38
- React__default["default"].createElement(icons.Icons.Cross, { height: (_b = designTokens.theme.spacings) === null || _b === void 0 ? void 0 : _b.sm, width: (_c = designTokens.theme.spacings) === null || _c === void 0 ? void 0 : _c.sm }))))),
39
- unit && React__default["default"].createElement(typography.BodyText, { color: (_d = designTokens.theme.palette) === null || _d === void 0 ? void 0 : _d.darkest }, unit)),
33
+ elementRight && (React__default["default"].createElement(Input_styles.AbsoluteContainer, { right: true }, elementRight))),
34
+ unit && React__default["default"].createElement(typography.BodyText, { color: (_b = designTokens.theme.palette) === null || _b === void 0 ? void 0 : _b.darkest }, unit)),
40
35
  error && errorLabel && (React__default["default"].createElement(FormElement_styles.ErrorLabel, { id: errorId }, errorLabel))));
41
36
  };
42
37
 
@@ -1 +1 @@
1
- {"version":3,"file":"Input.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Input.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -15,13 +15,10 @@ 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 hideRadioButton = _a.hideRadioButton, label = _a.label, showLabel = _a.showLabel, props = _tslib.__rest(_a, ["hideRadioButton", "label", "showLabel"]);
18
+ var label = _a.label, showLabel = _a.showLabel, props = _tslib.__rest(_a, ["label", "showLabel"]);
19
19
  var checked = props.checked, disabled = props.disabled;
20
20
  var borderSize = formElement.getBorderSize(checked, disabled);
21
21
  var _b = formElement.getColorAttributes(checked, disabled, true), labelColor = _b.labelColor, attributes = _tslib.__rest(_b, ["labelColor"]);
22
- if (hideRadioButton) {
23
- return React__default["default"].createElement(FormElement_styles.HiddenInput, _tslib.__assign({ type: "radio" }, props));
24
- }
25
22
  return (React__default["default"].createElement(FormElement_styles.OptionInputWrapper, { as: "label", disabled: disabled },
26
23
  React__default["default"].createElement(FormElement_styles.HiddenInput, _tslib.__assign({ type: "radio" }, props)),
27
24
  React__default["default"].createElement(Radio_styles.RadioContainer, { attributes: attributes, borderSize: borderSize, checked: checked, disabled: disabled }),
@@ -1 +1 @@
1
- {"version":3,"file":"Radio.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Radio.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -11,7 +11,11 @@ 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"], ["\n ", "\n"])), FormElement_styles.sharedFormElementStyles);
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) {
15
+ var _b;
16
+ var theme = _a.theme;
17
+ return (_b = theme.palette) === null || _b === void 0 ? void 0 : _b.lightest;
18
+ });
15
19
  var SelectIcon = styled__default["default"].div(templateObject_3 || (templateObject_3 = _tslib.__makeTemplateObject(["\n position: absolute;\n top: 50%;\n right: ", "px;\n transform: translateY(-50%);\n pointer-events: none;\n\n svg {\n display: block;\n }\n"], ["\n position: absolute;\n top: 50%;\n right: ", "px;\n transform: translateY(-50%);\n pointer-events: none;\n\n svg {\n display: block;\n }\n"])), function (_a) {
16
20
  var _b;
17
21
  var theme = _a.theme;
@@ -1 +1 @@
1
- {"version":3,"file":"Select.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Select.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -13,11 +13,18 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
13
13
 
14
14
  var RadioBoxItem = function (_a) {
15
15
  var _b, _c, _d;
16
- var _e = _a.align, align = _e === void 0 ? 'flex-start' : _e, ariaLabel = _a.ariaLabel, _f = _a.background, background = _f === void 0 ? (_b = designTokens.theme === null || designTokens.theme === void 0 ? void 0 : designTokens.theme.palette) === null || _b === void 0 ? void 0 : _b.white : _f, _g = _a.border, border = _g === void 0 ? (_c = designTokens.theme === null || designTokens.theme === void 0 ? void 0 : designTokens.theme.palette) === null || _c === void 0 ? void 0 : _c.border : _g, _h = _a.boxShadow, boxShadow = _h === void 0 ? true : _h, checked = _a.checked, children = _a.children, _j = _a.hideRadioButton, hideRadioButton = _j === void 0 ? false : _j, flexDirection = _a.flexDirection, id = _a.id, isDisabled = _a.isDisabled, name = _a.name, _k = _a.padding, padding = _k === void 0 ? (_d = designTokens.theme.spacings) === null || _d === void 0 ? void 0 : _d.md : _k, setActive = _a.setActive;
17
- return (React__default["default"].createElement(RadioBoxItem_styles.RadioBoxWrapper, { disabled: isDisabled },
18
- React__default["default"].createElement(RadioBoxItem_styles.BaseRadioBox, { align: align, background: background, border: border, boxShadow: boxShadow, checked: checked, flexDirection: flexDirection, isDisabled: isDisabled, padding: padding },
19
- React__default["default"].createElement(Radio.Radio, { checked: checked, disabled: isDisabled, hideRadioButton: hideRadioButton, id: id, label: ariaLabel, name: name, onChange: setActive !== null && setActive !== void 0 ? setActive : undefined }),
20
- React__default["default"].createElement(RadioBoxItem_styles.RadioBoxLabel, { htmlFor: id }, children))));
16
+ var _e = _a.align, align = _e === void 0 ? 'flex-start' : _e, _f = _a.background, background = _f === void 0 ? (_b = designTokens.theme === null || designTokens.theme === void 0 ? void 0 : designTokens.theme.palette) === null || _b === void 0 ? void 0 : _b.white : _f, _g = _a.border, border = _g === void 0 ? (_c = designTokens.theme === null || designTokens.theme === void 0 ? void 0 : designTokens.theme.palette) === null || _c === void 0 ? void 0 : _c.border : _g, _h = _a.boxShadow, boxShadow = _h === void 0 ? true : _h, checked = _a.checked, children = _a.children, _j = _a.hideRadioButton, hideRadioButton = _j === void 0 ? false : _j, flexDirection = _a.flexDirection, isDisabled = _a.isDisabled, name = _a.name, _k = _a.padding, padding = _k === void 0 ? (_d = designTokens.theme.spacings) === null || _d === void 0 ? void 0 : _d.md : _k, setActive = _a.setActive;
17
+ return (React__default["default"].createElement(RadioBoxItem_styles.BaseRadioBox, { align: align, "aria-checked": checked, background: background, border: border, boxShadow: boxShadow, checked: checked, flexDirection: flexDirection, isDisabled: isDisabled, onClick: !isDisabled ? setActive : undefined, onKeyDown: !isDisabled && setActive
18
+ ? function (e) {
19
+ if (e.key === 'Enter' || e.key === ' ') {
20
+ if (e.key === ' ')
21
+ e.preventDefault();
22
+ setActive();
23
+ }
24
+ }
25
+ : undefined, padding: padding, role: "radio", tabIndex: 0 },
26
+ !hideRadioButton && (React__default["default"].createElement(Radio.Radio, { checked: checked, disabled: isDisabled, label: "", name: name, onChange: setActive !== null && setActive !== void 0 ? setActive : undefined })),
27
+ children));
21
28
  };
22
29
 
23
30
  exports.RadioBoxItem = RadioBoxItem;
@@ -1 +1 @@
1
- {"version":3,"file":"RadioBoxItem.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"RadioBoxItem.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -14,33 +14,18 @@ exports.Alignment = void 0;
14
14
  Alignment[Alignment["flex-start"] = 0] = "flex-start";
15
15
  Alignment[Alignment["center"] = 1] = "center";
16
16
  })(exports.Alignment || (exports.Alignment = {}));
17
- var BaseRadioBox = styled__default["default"].div(templateObject_1 || (templateObject_1 = _tslib.__makeTemplateObject(["\n display: flex;\n flex-direction: ", ";\n flex-basis: 100%;\n padding: ", "px;\n align-items: ", ";\n gap: ", "px;\n ", ";\n\n background: ", ";\n border: solid 1px ", ";\n ", ";\n border-radius: ", "px;\n ", ";\n -webkit-transition: background-color 400ms linear;\n -ms-transition: background-color 400ms linear;\n transition: background-color 400ms linear;\n"], ["\n display: flex;\n flex-direction: ", ";\n flex-basis: 100%;\n padding: ", "px;\n align-items: ", ";\n gap: ", "px;\n ", ";\n\n background: ", ";\n border: solid 1px ", ";\n ", ";\n border-radius: ", "px;\n ", ";\n -webkit-transition: background-color 400ms linear;\n -ms-transition: background-color 400ms linear;\n transition: background-color 400ms linear;\n"])), function (props) {
17
+ var BaseRadioBox = styled__default["default"].div(templateObject_1 || (templateObject_1 = _tslib.__makeTemplateObject(["\n display: flex;\n flex-direction: ", ";\n flex-basis: 100%;\n padding: ", "px;\n align-items: ", ";\n gap: ", "px;\n cursor: ", ";\n ", ";\n\n background: ", ";\n border: solid 1px ", ";\n ", ";\n border-radius: 5px;\n ", ";\n -webkit-transition: background-color 400ms linear;\n -ms-transition: background-color 400ms linear;\n transition: background-color 400ms linear;\n"], ["\n display: flex;\n flex-direction: ", ";\n flex-basis: 100%;\n padding: ", "px;\n align-items: ", ";\n gap: ", "px;\n cursor: ", ";\n ", ";\n\n background: ", ";\n border: solid 1px ", ";\n ", ";\n border-radius: 5px;\n ", ";\n -webkit-transition: background-color 400ms linear;\n -ms-transition: background-color 400ms linear;\n transition: background-color 400ms linear;\n"])), function (props) {
18
18
  return props.flexDirection ? props.flexDirection : 'row';
19
- }, function (props) { return props.padding; }, function (props) { return props.align; }, function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.sm; }, function (props) { return props.isDisabled && 'opacity: 0.4'; }, function (props) { var _a; return props.checked ? (_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.blueLight : props.background; }, function (props) { var _a; return (_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.medium; }, function (props) {
19
+ }, function (props) { return props.padding; }, function (props) { return props.align; }, function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.sm; }, function (props) { return (props.isDisabled ? 'default' : 'pointer'); }, function (props) { return props.isDisabled && 'opacity: 0.4'; }, function (props) { var _a; return props.checked ? (_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.blueLight : props.background; }, function (props) { var _a; return (_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.medium; }, function (props) {
20
20
  return props.checked &&
21
21
  props.border &&
22
22
  "border: 1px solid ".concat(props.border && props.border);
23
- }, function (props) { var _a; return (_a = props.theme.attributes) === null || _a === void 0 ? void 0 : _a.borderRadius.small; }, function (props) {
23
+ }, function (props) {
24
24
  return props.boxShadow &&
25
25
  props.checked &&
26
26
  'box-shadow: 0px 2px 5px rgba(7, 52, 99, 0.15)';
27
27
  });
28
- var RadioBoxWrapper = styled__default["default"].div(templateObject_2 || (templateObject_2 = _tslib.__makeTemplateObject(["\n width: 100%;\n cursor: ", ";\n\n &:hover {\n ", " {\n border: 1px solid ", ";\n }\n }\n\n &:active {\n ", " {\n background: ", ";\n }\n }\n"], ["\n width: 100%;\n cursor: ", ";\n\n &:hover {\n ", " {\n border: 1px solid ", ";\n }\n }\n\n &:active {\n ", " {\n background: ", ";\n }\n }\n"])), function (_a) {
29
- var disabled = _a.disabled;
30
- return (disabled ? 'not-allowed' : 'pointer');
31
- }, BaseRadioBox, function (_a) {
32
- var _b;
33
- var theme = _a.theme;
34
- return (_b = theme.palette) === null || _b === void 0 ? void 0 : _b.darkest;
35
- }, BaseRadioBox, function (_a) {
36
- var _b;
37
- var theme = _a.theme;
38
- return (_b = theme.palette) === null || _b === void 0 ? void 0 : _b.lightest;
39
- });
40
- var RadioBoxLabel = styled__default["default"].label(templateObject_3 || (templateObject_3 = _tslib.__makeTemplateObject(["\n flex: 1;\n"], ["\n flex: 1;\n"])));
41
- var templateObject_1, templateObject_2, templateObject_3;
28
+ var templateObject_1;
42
29
 
43
30
  exports.BaseRadioBox = BaseRadioBox;
44
- exports.RadioBoxLabel = RadioBoxLabel;
45
- exports.RadioBoxWrapper = RadioBoxWrapper;
46
31
  //# sourceMappingURL=RadioBoxItem.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RadioBoxItem.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"RadioBoxItem.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -17,7 +17,7 @@ function RadioBoxList(_a) {
17
17
  var _b, _c, _d;
18
18
  var isDisabled = _a.isDisabled, name = _a.name, _e = _a.align, align = _e === void 0 ? 'flex-start' : _e, setActive = _a.setActive, title = _a.title, text = _a.text, checked = _a.checked, children = _a.children;
19
19
  return (React__default["default"].createElement(RadioBoxList_styles.BaseRadioBoxList, { checked: checked },
20
- React__default["default"].createElement(RadioBoxItem.RadioBoxItem, { ariaLabel: title, id: "radio-box-list", checked: checked, align: align, isDisabled: isDisabled, border: (_b = designTokens.theme === null || designTokens.theme === void 0 ? void 0 : designTokens.theme.palette) === null || _b === void 0 ? void 0 : _b.none, boxShadow: false, setActive: setActive, name: name },
20
+ React__default["default"].createElement(RadioBoxItem.RadioBoxItem, { checked: checked, align: align, isDisabled: isDisabled, border: (_b = designTokens.theme === null || designTokens.theme === void 0 ? void 0 : designTokens.theme.palette) === null || _b === void 0 ? void 0 : _b.none, boxShadow: false, setActive: setActive, name: name },
21
21
  React__default["default"].createElement("div", null,
22
22
  React__default["default"].createElement(typography.H3, null, title),
23
23
  React__default["default"].createElement(RadioBoxList_styles.RadioBoxListParagraph, null, text))),
@@ -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 cursor: pointer;\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 background-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 cursor: pointer;\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 background-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 &: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) {
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;
@@ -59,7 +59,7 @@ var sharedFormElementStyles = css(templateObject_3 || (templateObject_3 = __make
59
59
  }, function (_a) {
60
60
  var _b;
61
61
  var theme = _a.theme;
62
- return (_b = theme.palette) === null || _b === void 0 ? void 0 : _b.lightest;
62
+ return (_b = theme.palette) === null || _b === void 0 ? void 0 : _b.darkest;
63
63
  }, function (_a) {
64
64
  var _b;
65
65
  var theme = _a.theme;
@@ -1,19 +1,16 @@
1
1
  import { __rest, __assign } from '../../../../../_virtual/_tslib.js';
2
2
  import React from 'react';
3
+ import { theme } from '@citygross/design-tokens';
4
+ import { BodyText } from '@citygross/typography';
3
5
  import { getSizeAttributes } from '../../../helpers/form-element.js';
6
+ import { ScreenReader } from '../../ScreenReader/ScreenReader.js';
4
7
  import { Wrapper, Label, ErrorLabel } from '../FormElement.styles.js';
5
8
  import { InputWrapper, InputContainer, AbsoluteContainer, InputElement } from './Input.styles.js';
6
9
  import { EFormElementSize } from '../FormElement.types.js';
7
- import { theme } from '@citygross/design-tokens';
8
- import { Icons } from '@citygross/icons';
9
- import { BodyText } from '@citygross/typography';
10
- import { CgButton } from '../../CgButton/CgButton.js';
11
- import { ScreenReader } from '../../ScreenReader/ScreenReader.js';
12
- import { EButtonSize, EButtonVariant } from '../../CgButton/CgButton.types.js';
13
10
 
14
11
  var Input = function (_a) {
15
- var _b, _c, _d;
16
- var clearFunction = _a.clearFunction, hideLabel = _a.hideLabel, icon = _a.icon, error = _a.error, errorLabel = _a.errorLabel, label = _a.label, paddingLeft = _a.paddingLeft, _e = _a.size, size = _e === void 0 ? EFormElementSize.large : _e, unit = _a.unit, props = __rest(_a, ["clearFunction", "hideLabel", "icon", "error", "errorLabel", "label", "paddingLeft", "size", "unit"]);
12
+ var _b;
13
+ var elementLeft = _a.elementLeft, elementRight = _a.elementRight, hideLabel = _a.hideLabel, error = _a.error, errorLabel = _a.errorLabel, label = _a.label, paddingLeft = _a.paddingLeft, _c = _a.size, size = _c === void 0 ? EFormElementSize.large : _c, unit = _a.unit, props = __rest(_a, ["elementLeft", "elementRight", "hideLabel", "error", "errorLabel", "label", "paddingLeft", "size", "unit"]);
17
14
  var id = props.id, required = props.required;
18
15
  var sizeAttributes = getSizeAttributes(size);
19
16
  var errorId = "".concat(id, "-error");
@@ -23,12 +20,10 @@ var Input = function (_a) {
23
20
  required ? ' *' : '')),
24
21
  React.createElement(InputWrapper, null,
25
22
  React.createElement(InputContainer, null,
26
- icon && (React.createElement(AbsoluteContainer, null, icon)),
23
+ elementLeft && (React.createElement(AbsoluteContainer, null, elementLeft)),
27
24
  React.createElement(InputElement, __assign({ "aria-describedby": error && errorLabel ? errorId : undefined, "aria-invalid": !!error, error: error, paddingLeft: paddingLeft, sizeAttributes: sizeAttributes }, props)),
28
- clearFunction && (React.createElement(AbsoluteContainer, { right: true },
29
- React.createElement(CgButton, { circle: true, onClick: clearFunction, size: EButtonSize.small, variant: EButtonVariant.ghost },
30
- React.createElement(Icons.Cross, { height: (_b = theme.spacings) === null || _b === void 0 ? void 0 : _b.sm, width: (_c = theme.spacings) === null || _c === void 0 ? void 0 : _c.sm }))))),
31
- unit && React.createElement(BodyText, { color: (_d = theme.palette) === null || _d === void 0 ? void 0 : _d.darkest }, unit)),
25
+ elementRight && (React.createElement(AbsoluteContainer, { right: true }, elementRight))),
26
+ unit && React.createElement(BodyText, { color: (_b = theme.palette) === null || _b === void 0 ? void 0 : _b.darkest }, unit)),
32
27
  error && errorLabel && (React.createElement(ErrorLabel, { id: errorId }, errorLabel))));
33
28
  };
34
29
 
@@ -1 +1 @@
1
- {"version":3,"file":"Input.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Input.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -4,16 +4,13 @@ import { ScreenReader } from '../../ScreenReader/ScreenReader.js';
4
4
  import { BodyText, TextTypes } from '@citygross/typography';
5
5
  import { getColorAttributes, getBorderSize } from '../../../helpers/form-element.js';
6
6
  import { RadioContainer } from './Radio.styles.js';
7
- import { HiddenInput, OptionInputWrapper } from '../FormElement.styles.js';
7
+ import { OptionInputWrapper, HiddenInput } from '../FormElement.styles.js';
8
8
 
9
9
  var Radio = function (_a) {
10
- var hideRadioButton = _a.hideRadioButton, label = _a.label, showLabel = _a.showLabel, props = __rest(_a, ["hideRadioButton", "label", "showLabel"]);
10
+ var label = _a.label, showLabel = _a.showLabel, props = __rest(_a, ["label", "showLabel"]);
11
11
  var checked = props.checked, disabled = props.disabled;
12
12
  var borderSize = getBorderSize(checked, disabled);
13
13
  var _b = getColorAttributes(checked, disabled, true), labelColor = _b.labelColor, attributes = __rest(_b, ["labelColor"]);
14
- if (hideRadioButton) {
15
- return React.createElement(HiddenInput, __assign({ type: "radio" }, props));
16
- }
17
14
  return (React.createElement(OptionInputWrapper, { as: "label", disabled: disabled },
18
15
  React.createElement(HiddenInput, __assign({ type: "radio" }, props)),
19
16
  React.createElement(RadioContainer, { attributes: attributes, borderSize: borderSize, checked: checked, disabled: disabled }),
@@ -1 +1 @@
1
- {"version":3,"file":"Radio.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Radio.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;"}
@@ -3,7 +3,11 @@ 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"], ["\n ", "\n"])), sharedFormElementStyles);
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) {
7
+ var _b;
8
+ var theme = _a.theme;
9
+ return (_b = theme.palette) === null || _b === void 0 ? void 0 : _b.lightest;
10
+ });
7
11
  var SelectIcon = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n position: absolute;\n top: 50%;\n right: ", "px;\n transform: translateY(-50%);\n pointer-events: none;\n\n svg {\n display: block;\n }\n"], ["\n position: absolute;\n top: 50%;\n right: ", "px;\n transform: translateY(-50%);\n pointer-events: none;\n\n svg {\n display: block;\n }\n"])), function (_a) {
8
12
  var _b;
9
13
  var theme = _a.theme;
@@ -1 +1 @@
1
- {"version":3,"file":"Select.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Select.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;"}
@@ -1,15 +1,22 @@
1
1
  import React from 'react';
2
2
  import { theme } from '@citygross/design-tokens';
3
3
  import { Radio } from '../FormElements/Radio/Radio.js';
4
- import { RadioBoxWrapper, BaseRadioBox, RadioBoxLabel } from './RadioBoxItem.styles.js';
4
+ import { BaseRadioBox } from './RadioBoxItem.styles.js';
5
5
 
6
6
  var RadioBoxItem = function (_a) {
7
7
  var _b, _c, _d;
8
- var _e = _a.align, align = _e === void 0 ? 'flex-start' : _e, ariaLabel = _a.ariaLabel, _f = _a.background, background = _f === void 0 ? (_b = theme === null || theme === void 0 ? void 0 : theme.palette) === null || _b === void 0 ? void 0 : _b.white : _f, _g = _a.border, border = _g === void 0 ? (_c = theme === null || theme === void 0 ? void 0 : theme.palette) === null || _c === void 0 ? void 0 : _c.border : _g, _h = _a.boxShadow, boxShadow = _h === void 0 ? true : _h, checked = _a.checked, children = _a.children, _j = _a.hideRadioButton, hideRadioButton = _j === void 0 ? false : _j, flexDirection = _a.flexDirection, id = _a.id, isDisabled = _a.isDisabled, name = _a.name, _k = _a.padding, padding = _k === void 0 ? (_d = theme.spacings) === null || _d === void 0 ? void 0 : _d.md : _k, setActive = _a.setActive;
9
- return (React.createElement(RadioBoxWrapper, { disabled: isDisabled },
10
- React.createElement(BaseRadioBox, { align: align, background: background, border: border, boxShadow: boxShadow, checked: checked, flexDirection: flexDirection, isDisabled: isDisabled, padding: padding },
11
- React.createElement(Radio, { checked: checked, disabled: isDisabled, hideRadioButton: hideRadioButton, id: id, label: ariaLabel, name: name, onChange: setActive !== null && setActive !== void 0 ? setActive : undefined }),
12
- React.createElement(RadioBoxLabel, { htmlFor: id }, children))));
8
+ var _e = _a.align, align = _e === void 0 ? 'flex-start' : _e, _f = _a.background, background = _f === void 0 ? (_b = theme === null || theme === void 0 ? void 0 : theme.palette) === null || _b === void 0 ? void 0 : _b.white : _f, _g = _a.border, border = _g === void 0 ? (_c = theme === null || theme === void 0 ? void 0 : theme.palette) === null || _c === void 0 ? void 0 : _c.border : _g, _h = _a.boxShadow, boxShadow = _h === void 0 ? true : _h, checked = _a.checked, children = _a.children, _j = _a.hideRadioButton, hideRadioButton = _j === void 0 ? false : _j, flexDirection = _a.flexDirection, isDisabled = _a.isDisabled, name = _a.name, _k = _a.padding, padding = _k === void 0 ? (_d = theme.spacings) === null || _d === void 0 ? void 0 : _d.md : _k, setActive = _a.setActive;
9
+ return (React.createElement(BaseRadioBox, { align: align, "aria-checked": checked, background: background, border: border, boxShadow: boxShadow, checked: checked, flexDirection: flexDirection, isDisabled: isDisabled, onClick: !isDisabled ? setActive : undefined, onKeyDown: !isDisabled && setActive
10
+ ? function (e) {
11
+ if (e.key === 'Enter' || e.key === ' ') {
12
+ if (e.key === ' ')
13
+ e.preventDefault();
14
+ setActive();
15
+ }
16
+ }
17
+ : undefined, padding: padding, role: "radio", tabIndex: 0 },
18
+ !hideRadioButton && (React.createElement(Radio, { checked: checked, disabled: isDisabled, label: "", name: name, onChange: setActive !== null && setActive !== void 0 ? setActive : undefined })),
19
+ children));
13
20
  };
14
21
 
15
22
  export { RadioBoxItem };
@@ -1 +1 @@
1
- {"version":3,"file":"RadioBoxItem.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"RadioBoxItem.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;"}
@@ -6,31 +6,18 @@ var Alignment;
6
6
  Alignment[Alignment["flex-start"] = 0] = "flex-start";
7
7
  Alignment[Alignment["center"] = 1] = "center";
8
8
  })(Alignment || (Alignment = {}));
9
- var BaseRadioBox = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n flex-direction: ", ";\n flex-basis: 100%;\n padding: ", "px;\n align-items: ", ";\n gap: ", "px;\n ", ";\n\n background: ", ";\n border: solid 1px ", ";\n ", ";\n border-radius: ", "px;\n ", ";\n -webkit-transition: background-color 400ms linear;\n -ms-transition: background-color 400ms linear;\n transition: background-color 400ms linear;\n"], ["\n display: flex;\n flex-direction: ", ";\n flex-basis: 100%;\n padding: ", "px;\n align-items: ", ";\n gap: ", "px;\n ", ";\n\n background: ", ";\n border: solid 1px ", ";\n ", ";\n border-radius: ", "px;\n ", ";\n -webkit-transition: background-color 400ms linear;\n -ms-transition: background-color 400ms linear;\n transition: background-color 400ms linear;\n"])), function (props) {
9
+ var BaseRadioBox = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n flex-direction: ", ";\n flex-basis: 100%;\n padding: ", "px;\n align-items: ", ";\n gap: ", "px;\n cursor: ", ";\n ", ";\n\n background: ", ";\n border: solid 1px ", ";\n ", ";\n border-radius: 5px;\n ", ";\n -webkit-transition: background-color 400ms linear;\n -ms-transition: background-color 400ms linear;\n transition: background-color 400ms linear;\n"], ["\n display: flex;\n flex-direction: ", ";\n flex-basis: 100%;\n padding: ", "px;\n align-items: ", ";\n gap: ", "px;\n cursor: ", ";\n ", ";\n\n background: ", ";\n border: solid 1px ", ";\n ", ";\n border-radius: 5px;\n ", ";\n -webkit-transition: background-color 400ms linear;\n -ms-transition: background-color 400ms linear;\n transition: background-color 400ms linear;\n"])), function (props) {
10
10
  return props.flexDirection ? props.flexDirection : 'row';
11
- }, function (props) { return props.padding; }, function (props) { return props.align; }, function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.sm; }, function (props) { return props.isDisabled && 'opacity: 0.4'; }, function (props) { var _a; return props.checked ? (_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.blueLight : props.background; }, function (props) { var _a; return (_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.medium; }, function (props) {
11
+ }, function (props) { return props.padding; }, function (props) { return props.align; }, function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.sm; }, function (props) { return (props.isDisabled ? 'default' : 'pointer'); }, function (props) { return props.isDisabled && 'opacity: 0.4'; }, function (props) { var _a; return props.checked ? (_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.blueLight : props.background; }, function (props) { var _a; return (_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.medium; }, function (props) {
12
12
  return props.checked &&
13
13
  props.border &&
14
14
  "border: 1px solid ".concat(props.border && props.border);
15
- }, function (props) { var _a; return (_a = props.theme.attributes) === null || _a === void 0 ? void 0 : _a.borderRadius.small; }, function (props) {
15
+ }, function (props) {
16
16
  return props.boxShadow &&
17
17
  props.checked &&
18
18
  'box-shadow: 0px 2px 5px rgba(7, 52, 99, 0.15)';
19
19
  });
20
- var RadioBoxWrapper = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n width: 100%;\n cursor: ", ";\n\n &:hover {\n ", " {\n border: 1px solid ", ";\n }\n }\n\n &:active {\n ", " {\n background: ", ";\n }\n }\n"], ["\n width: 100%;\n cursor: ", ";\n\n &:hover {\n ", " {\n border: 1px solid ", ";\n }\n }\n\n &:active {\n ", " {\n background: ", ";\n }\n }\n"])), function (_a) {
21
- var disabled = _a.disabled;
22
- return (disabled ? 'not-allowed' : 'pointer');
23
- }, BaseRadioBox, function (_a) {
24
- var _b;
25
- var theme = _a.theme;
26
- return (_b = theme.palette) === null || _b === void 0 ? void 0 : _b.darkest;
27
- }, BaseRadioBox, function (_a) {
28
- var _b;
29
- var theme = _a.theme;
30
- return (_b = theme.palette) === null || _b === void 0 ? void 0 : _b.lightest;
31
- });
32
- var RadioBoxLabel = styled.label(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n flex: 1;\n"], ["\n flex: 1;\n"])));
33
- var templateObject_1, templateObject_2, templateObject_3;
20
+ var templateObject_1;
34
21
 
35
- export { Alignment, BaseRadioBox, RadioBoxLabel, RadioBoxWrapper };
22
+ export { Alignment, BaseRadioBox };
36
23
  //# sourceMappingURL=RadioBoxItem.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RadioBoxItem.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"RadioBoxItem.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;"}
@@ -9,7 +9,7 @@ function RadioBoxList(_a) {
9
9
  var _b, _c, _d;
10
10
  var isDisabled = _a.isDisabled, name = _a.name, _e = _a.align, align = _e === void 0 ? 'flex-start' : _e, setActive = _a.setActive, title = _a.title, text = _a.text, checked = _a.checked, children = _a.children;
11
11
  return (React.createElement(BaseRadioBoxList, { checked: checked },
12
- React.createElement(RadioBoxItem, { ariaLabel: title, id: "radio-box-list", checked: checked, align: align, isDisabled: isDisabled, border: (_b = theme === null || theme === void 0 ? void 0 : theme.palette) === null || _b === void 0 ? void 0 : _b.none, boxShadow: false, setActive: setActive, name: name },
12
+ React.createElement(RadioBoxItem, { checked: checked, align: align, isDisabled: isDisabled, border: (_b = theme === null || theme === void 0 ? void 0 : theme.palette) === null || _b === void 0 ? void 0 : _b.none, boxShadow: false, setActive: setActive, name: name },
13
13
  React.createElement("div", null,
14
14
  React.createElement(H3, null, title),
15
15
  React.createElement(RadioBoxListParagraph, null, text))),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@citygross/components",
3
- "version": "0.8.149",
3
+ "version": "0.8.151",
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": "d5bed235b25278ed25df5511b658c02073f4b18b"
77
+ "gitHead": "bc7fd0c3968256a58419993dde7d4f6b412fd3f2"
78
78
  }