@citygross/components 0.8.149 → 0.8.150

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.
@@ -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 {};
@@ -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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -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))),
@@ -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":";;;;;;;;;;;;;;;;;;;;;"}
@@ -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.150",
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": "4e7057064778890726168d955f7c62cd37c44bf7"
78
78
  }