@toptal/picasso-radio 5.0.13 → 5.0.14-alpha-1757603192867.0

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/package.json +14 -13
  2. package/dist-package/src/Radio/Radio.d.ts +0 -18
  3. package/dist-package/src/Radio/Radio.d.ts.map +0 -1
  4. package/dist-package/src/Radio/Radio.js +0 -49
  5. package/dist-package/src/Radio/Radio.js.map +0 -1
  6. package/dist-package/src/Radio/index.d.ts +0 -5
  7. package/dist-package/src/Radio/index.d.ts.map +0 -1
  8. package/dist-package/src/Radio/index.js +0 -2
  9. package/dist-package/src/Radio/index.js.map +0 -1
  10. package/dist-package/src/Radio/styles.d.ts +0 -4
  11. package/dist-package/src/Radio/styles.d.ts.map +0 -1
  12. package/dist-package/src/Radio/styles.js +0 -98
  13. package/dist-package/src/Radio/styles.js.map +0 -1
  14. package/dist-package/src/RadioCompound/index.d.ts +0 -10
  15. package/dist-package/src/RadioCompound/index.d.ts.map +0 -1
  16. package/dist-package/src/RadioCompound/index.js +0 -6
  17. package/dist-package/src/RadioCompound/index.js.map +0 -1
  18. package/dist-package/src/RadioGroup/RadioGroup.d.ts +0 -18
  19. package/dist-package/src/RadioGroup/RadioGroup.d.ts.map +0 -1
  20. package/dist-package/src/RadioGroup/RadioGroup.js +0 -30
  21. package/dist-package/src/RadioGroup/RadioGroup.js.map +0 -1
  22. package/dist-package/src/RadioGroup/index.d.ts +0 -5
  23. package/dist-package/src/RadioGroup/index.d.ts.map +0 -1
  24. package/dist-package/src/RadioGroup/index.js +0 -2
  25. package/dist-package/src/RadioGroup/index.js.map +0 -1
  26. package/dist-package/src/index.d.ts +0 -4
  27. package/dist-package/src/index.d.ts.map +0 -1
  28. package/dist-package/src/index.js +0 -4
  29. package/dist-package/src/index.js.map +0 -1
package/package.json CHANGED
@@ -1,15 +1,16 @@
1
1
  {
2
2
  "name": "@toptal/picasso-radio",
3
- "version": "5.0.13",
3
+ "version": "5.0.14-alpha-1757603192867.0",
4
4
  "description": "Toptal UI components library - Radio",
5
5
  "publishConfig": {
6
- "access": "public"
6
+ "access": "public",
7
+ "provenance": true
7
8
  },
8
9
  "main": "./dist-package/src/index.js",
9
10
  "module": "./dist-package/src/index.js",
10
11
  "scripts": {
11
12
  "build:package": "tsc -b tsconfig.json",
12
- "prepublishOnly": "yarn build:package"
13
+ "prepublishOnly": "echo 0"
13
14
  },
14
15
  "repository": {
15
16
  "type": "git",
@@ -22,10 +23,10 @@
22
23
  },
23
24
  "homepage": "https://github.com/toptal/picasso/tree/master/packages/picasso#readme",
24
25
  "dependencies": {
25
- "@toptal/picasso-form-label": "1.0.2",
26
- "@toptal/picasso-grid": "5.0.10",
27
- "@toptal/picasso-shared": "15.0.0",
28
- "@toptal/picasso-utils": "3.1.0",
26
+ "@toptal/picasso-form-label": "1.0.3-alpha-1757603192867.0",
27
+ "@toptal/picasso-grid": "5.0.11-alpha-1757603192867.0",
28
+ "@toptal/picasso-shared": "15.0.1-alpha-1757603192867.0",
29
+ "@toptal/picasso-utils": "3.1.1-alpha-1757603192867.0",
29
30
  "ap-style-title-case": "^1.1.2",
30
31
  "classnames": "^2.5.1"
31
32
  },
@@ -35,15 +36,15 @@
35
36
  ],
36
37
  "peerDependencies": {
37
38
  "@material-ui/core": "4.12.4",
38
- "@toptal/picasso-provider": "*",
39
- "@toptal/picasso-tailwind-merge": "^2.0.0",
39
+ "@toptal/picasso-provider": "5.0.2-alpha-1757603192867.0",
40
+ "@toptal/picasso-tailwind-merge": "2.0.4-alpha-1757603192867.0",
40
41
  "react": ">=16.12.0 < 19.0.0",
41
- "@toptal/picasso-tailwind": ">=2.4.0"
42
+ "@toptal/picasso-tailwind": "3.0.1-alpha-1757603192867.0"
42
43
  },
43
44
  "devDependencies": {
44
- "@toptal/picasso-provider": "5.0.1",
45
- "@toptal/picasso-test-utils": "1.1.1",
46
- "@toptal/picasso-tailwind-merge": "2.0.3",
45
+ "@toptal/picasso-provider": "5.0.2-alpha-1757603192867.0",
46
+ "@toptal/picasso-test-utils": "1.1.2-alpha-1757603192867.0",
47
+ "@toptal/picasso-tailwind-merge": "2.0.4-alpha-1757603192867.0",
47
48
  "styled-components": "^6.1.1"
48
49
  },
49
50
  "exports": {
@@ -1,18 +0,0 @@
1
- import type { ReactNode } from 'react';
2
- import React from 'react';
3
- import type { StandardProps, ButtonOrAnchorProps, TextLabelProps } from '@toptal/picasso-shared';
4
- export interface Props extends StandardProps, TextLabelProps, Omit<ButtonOrAnchorProps, 'onChange' | 'value'> {
5
- /** Text label for the `Radio` */
6
- label?: ReactNode;
7
- /** Value of the `Radio` component used with conjunction of `Radio.Group` */
8
- value?: string | number | boolean;
9
- /** Defines if `Radio` is disabled */
10
- disabled?: boolean;
11
- /** Defines if `Radio` is checked by default */
12
- checked?: boolean;
13
- /** Callback invoked when `Radio` changes its state */
14
- onChange?: (event: React.ChangeEvent<HTMLInputElement>, checked: boolean) => void;
15
- }
16
- export declare const Radio: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLButtonElement | HTMLLabelElement>>;
17
- export default Radio;
18
- //# sourceMappingURL=Radio.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Radio.d.ts","sourceRoot":"","sources":["../../../src/Radio/Radio.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAkB,SAAS,EAAE,MAAM,OAAO,CAAA;AACtD,OAAO,KAAqB,MAAM,OAAO,CAAA;AAIzC,OAAO,KAAK,EACV,aAAa,EACb,mBAAmB,EACnB,cAAc,EACf,MAAM,wBAAwB,CAAA;AAM/B,MAAM,WAAW,KACf,SAAQ,aAAa,EACnB,cAAc,EACd,IAAI,CAAC,mBAAmB,EAAE,UAAU,GAAG,OAAO,CAAC;IACjD,iCAAiC;IACjC,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,4EAA4E;IAC5E,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAA;IACjC,qCAAqC;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,+CAA+C;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,sDAAsD;IACtD,QAAQ,CAAC,EAAE,CACT,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,EAC1C,OAAO,EAAE,OAAO,KACb,IAAI,CAAA;CACV;AAOD,eAAO,MAAM,KAAK,oGAiEjB,CAAA;AAQD,eAAe,KAAK,CAAA"}
@@ -1,49 +0,0 @@
1
- var __rest = (this && this.__rest) || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
- t[p] = s[p];
5
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
- t[p[i]] = s[p[i]];
9
- }
10
- return t;
11
- };
12
- import React, { forwardRef } from 'react';
13
- import { Radio as MUIRadio } from '@material-ui/core';
14
- import { makeStyles } from '@material-ui/core/styles';
15
- import cx from 'classnames';
16
- import { FormControlLabel } from '@toptal/picasso-form-label';
17
- import styles from './styles';
18
- const useStyles = makeStyles(styles, {
19
- name: 'Radio',
20
- });
21
- // eslint-disable-next-line react/display-name
22
- export const Radio = forwardRef(function Radio(props, ref) {
23
- const { className, style, label, checked, disabled, value, onChange, titleCase, 'data-private': dataPrivate } = props, rest = __rest(props, ["className", "style", "label", "checked", "disabled", "value", "onChange", "titleCase", 'data-private']);
24
- const classes = useStyles(props);
25
- const rootClasses = {
26
- root: classes.root,
27
- disabled: classes.disabled,
28
- };
29
- const muiRadio = (React.createElement(MUIRadio, Object.assign({}, rest, { ref: label ? undefined : ref, checked: checked, disabled: disabled, onChange: onChange, value: value, icon: React.createElement("div", { className: classes.uncheckedIcon }), checkedIcon: React.createElement("div", { className: classes.checkedIcon }), color: 'default', classes: rootClasses, className: cx(className, {
30
- [classes.withLabel]: Boolean(label),
31
- }), style: style, focusVisibleClassName: classes.focused })));
32
- if (!label) {
33
- return muiRadio;
34
- }
35
- const externalEventListeners = {
36
- onMouseLeave: rest.onMouseLeave,
37
- onMouseOver: rest.onMouseOver,
38
- };
39
- return (React.createElement(FormControlLabel, Object.assign({}, externalEventListeners, { ref: ref, control: muiRadio, classes: {
40
- label: 'mt-[0.25em] max-w-[calc(100%_-_1.5em_+_1px)]',
41
- root: 'text-[1rem] items-start',
42
- }, style: style, label: label, "data-private": dataPrivate, disabled: disabled, titleCase: titleCase })));
43
- });
44
- Radio.defaultProps = {
45
- disabled: false,
46
- };
47
- Radio.displayName = 'Radio';
48
- export default Radio;
49
- //# sourceMappingURL=Radio.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Radio.js","sourceRoot":"","sources":["../../../src/Radio/Radio.tsx"],"names":[],"mappings":";;;;;;;;;;;AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,KAAK,IAAI,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAErD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAMrD,OAAO,EAAE,MAAM,YAAY,CAAA;AAC3B,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAE7D,OAAO,MAAM,MAAM,UAAU,CAAA;AAqB7B,MAAM,SAAS,GAAG,UAAU,CAAe,MAAM,EAAE;IACjD,IAAI,EAAE,OAAO;CACd,CAAC,CAAA;AAEF,8CAA8C;AAC9C,MAAM,CAAC,MAAM,KAAK,GAAG,UAAU,CAC7B,SAAS,KAAK,CAAC,KAAK,EAAE,GAAG;IACvB,MAAM,EACJ,SAAS,EACT,KAAK,EACL,KAAK,EACL,OAAO,EACP,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,SAAS,EACT,cAAc,EAAE,WAAW,KAEzB,KAAK,EADJ,IAAI,UACL,KA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AS,EAAE,SAAS,IACpB,CACH,CAAA;AACH,CAAC,CACF,CAAA;AAED,KAAK,CAAC,YAAY,GAAG;IACnB,QAAQ,EAAE,KAAK;CAChB,CAAA;AAED,KAAK,CAAC,WAAW,GAAG,OAAO,CAAA;AAE3B,eAAe,KAAK,CAAA"}
@@ -1,5 +0,0 @@
1
- import type { OmitInternalProps } from '@toptal/picasso-shared';
2
- import type { Props as InternalRadioProps } from './Radio';
3
- export { default as Radio } from './Radio';
4
- export declare type RadioProps = OmitInternalProps<InternalRadioProps>;
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Radio/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAE/D,OAAO,KAAK,EAAE,KAAK,IAAI,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAC1D,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAA;AAC1C,oBAAY,UAAU,GAAG,iBAAiB,CAAC,kBAAkB,CAAC,CAAA"}
@@ -1,2 +0,0 @@
1
- export { default as Radio } from './Radio';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/Radio/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAA"}
@@ -1,4 +0,0 @@
1
- import type { Theme } from '@material-ui/core/styles';
2
- declare const _default: ({ palette, sizes, transitions }: Theme) => import("@material-ui/styles").StyleRules<{}, "root" | "disabled" | "focused" | "withLabel" | "uncheckedIcon" | "checkedIcon">;
3
- export default _default;
4
- //# sourceMappingURL=styles.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/Radio/styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAA;0DA6FJ,KAAK;AAAtD,wBAkDI"}
@@ -1,98 +0,0 @@
1
- import { createStyles } from '@material-ui/core/styles';
2
- import { rem, outline, mix } from '@toptal/picasso-shared';
3
- import { PicassoProvider } from '@toptal/picasso-provider';
4
- const CONTROL_MARGIN_RIGHT = '0.5em';
5
- const RADIO_VERTICAL_MARGIN = '0.25em';
6
- PicassoProvider.override(({ palette, transitions }) => ({
7
- MuiRadio: {
8
- root: {
9
- color: palette.common.white,
10
- fontSize: '1rem',
11
- position: 'relative',
12
- width: '1em',
13
- height: '1em',
14
- padding: '0',
15
- margin: `${RADIO_VERTICAL_MARGIN} 0`,
16
- transition: `all ${transitions.duration.short}ms ${transitions.easing.easeInOut}`,
17
- '&$disabled': {
18
- opacity: 0.48,
19
- },
20
- },
21
- checked: {
22
- color: palette.primary.main,
23
- },
24
- },
25
- }));
26
- const centeredCircle = (backgroundColor) => ({
27
- position: 'absolute',
28
- width: '100%',
29
- height: '100%',
30
- top: '50%',
31
- left: '50%',
32
- borderRadius: '50%',
33
- transform: 'translate(-50%, -50%)',
34
- content: '""',
35
- background: backgroundColor,
36
- pointerEvents: 'none',
37
- transition: 'border-color',
38
- transitionDuration: 'inherit',
39
- transitionTimingFunction: 'inherit',
40
- });
41
- const iconStyles = ({ backgroundColor, borderColor, borderWidth, dotColor, dotOpacity, transition, }) => ({
42
- color: dotColor,
43
- transition,
44
- '&:before': iconBeforeStyles({
45
- borderWidth,
46
- borderColor,
47
- backgroundColor,
48
- }),
49
- '&:after': Object.assign(Object.assign({}, centeredCircle(dotColor)), { width: 'initial', height: 'initial', borderWidth: rem('2px'), borderStyle: 'solid', opacity: dotOpacity, transition }),
50
- });
51
- const iconBeforeStyles = ({ borderWidth, borderColor, backgroundColor, }) => (Object.assign(Object.assign({}, centeredCircle(backgroundColor)), { border: `${borderWidth} solid ${borderColor}` }));
52
- export default ({ palette, sizes, transitions }) => createStyles({
53
- root: {
54
- fontSize: '1rem',
55
- alignItems: 'flex-start',
56
- '&:hover $uncheckedIcon:before': iconBeforeStyles({
57
- borderWidth: sizes.borderWidth,
58
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
59
- borderColor: palette.grey.main2,
60
- backgroundColor: palette.common.white,
61
- }),
62
- '&:hover $checkedIcon:before': iconBeforeStyles({
63
- borderWidth: sizes.borderWidth,
64
- borderColor: mix(palette.primary.main, palette.common.white, 0.16),
65
- backgroundColor: mix(palette.primary.main, palette.common.white, 0.16),
66
- }),
67
- },
68
- focused: {
69
- '& $checkedIcon:before, & $uncheckedIcon:before': Object.assign({}, outline(palette.primary.main)),
70
- },
71
- disabled: {
72
- '$uncheckedIcon:before': {
73
- boxShadow: 'none !important',
74
- },
75
- },
76
- withLabel: {
77
- marginRight: CONTROL_MARGIN_RIGHT,
78
- },
79
- uncheckedIcon: iconStyles({
80
- backgroundColor: palette.common.white,
81
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
82
- borderColor: palette.grey.main,
83
- borderWidth: sizes.borderWidth,
84
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
85
- dotColor: palette.grey.main,
86
- dotOpacity: 0,
87
- transition: `all ${transitions.duration.short}ms ${transitions.easing.easeInOut}`,
88
- }),
89
- checkedIcon: iconStyles({
90
- backgroundColor: palette.primary.main,
91
- borderColor: palette.primary.main,
92
- borderWidth: sizes.borderWidth,
93
- dotColor: palette.common.white,
94
- dotOpacity: 1,
95
- transition: `all ${transitions.duration.short}ms ${transitions.easing.easeInOut}`,
96
- }),
97
- });
98
- //# sourceMappingURL=styles.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/Radio/styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AACvD,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,wBAAwB,CAAA;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,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,IAAI,CAAC,CACjC;KACF;IACD,QAAQ,EAAE;QACR,uBAAuB,EAAE;YACvB,SAAS,EAAE,iBAAiB;SAC7B;KACF;IACD,SAAS,EAAE;QACT,WAAW,EAAE,oBAAoB;KAClC;IACD,aAAa,EAAE,UAAU,CAAC;QACxB,eAAe,EAAE,OAAO,CAAC,MAAM,CAAC,KAAK;QACrC,oEAAoE;QACpE,WAAW,EAAE,OAAO,CAAC,IAAI,CAAC,IAAK;QAC/B,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,oEAAoE;QACpE,QAAQ,EAAE,OAAO,CAAC,IAAI,CAAC,IAAK;QAC5B,UAAU,EAAE,CAAC;QACb,UAAU,EAAE,OAAO,WAAW,CAAC,QAAQ,CAAC,KAAK,MAAM,WAAW,CAAC,MAAM,CAAC,SAAS,EAAE;KAClF,CAAC;IACF,WAAW,EAAE,UAAU,CAAC;QACtB,eAAe,EAAE,OAAO,CAAC,OAAO,CAAC,IAAI;QACrC,WAAW,EAAE,OAAO,CAAC,OAAO,CAAC,IAAI;QACjC,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,KAAK;QAC9B,UAAU,EAAE,CAAC;QACb,UAAU,EAAE,OAAO,WAAW,CAAC,QAAQ,CAAC,KAAK,MAAM,WAAW,CAAC,MAAM,CAAC,SAAS,EAAE;KAClF,CAAC;CACH,CAAC,CAAA"}
@@ -1,10 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const RadioCompound: import("react").ForwardRefExoticComponent<import("../Radio/Radio").Props & import("react").RefAttributes<HTMLButtonElement | HTMLLabelElement>> & {
3
- Group: {
4
- (props: import("../RadioGroup/RadioGroup").Props): JSX.Element;
5
- defaultProps: {
6
- horizontal: boolean;
7
- };
8
- };
9
- };
10
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/RadioCompound/index.ts"],"names":[],"mappings":";AAGA,eAAO,MAAM,aAAa;;;;;;;CAExB,CAAA"}
@@ -1,6 +0,0 @@
1
- import { Radio } from '../Radio';
2
- import { RadioGroup } from '../RadioGroup';
3
- export const RadioCompound = Object.assign(Radio, {
4
- Group: RadioGroup,
5
- });
6
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/RadioCompound/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AAChC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAE1C,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE;IAChD,KAAK,EAAE,UAAU;CAClB,CAAC,CAAA"}
@@ -1,18 +0,0 @@
1
- /// <reference types="react" />
2
- import type { RadioGroupProps } from '@material-ui/core';
3
- import type { GridSizeProps, GridProps } from '@toptal/picasso-grid';
4
- declare type GridSpacing = GridProps['spacing'];
5
- export interface Props extends RadioGroupProps, GridSizeProps {
6
- /** Align radios horizontally */
7
- horizontal?: boolean;
8
- /** Defines amount of space between radio buttons components (in px) */
9
- spacing?: GridSpacing;
10
- }
11
- declare const RadioGroup: {
12
- (props: Props): JSX.Element;
13
- defaultProps: {
14
- horizontal: boolean;
15
- };
16
- };
17
- export default RadioGroup;
18
- //# sourceMappingURL=RadioGroup.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RadioGroup.d.ts","sourceRoot":"","sources":["../../../src/RadioGroup/RadioGroup.tsx"],"names":[],"mappings":";AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAGxD,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAGpE,aAAK,WAAW,GAAG,SAAS,CAAC,SAAS,CAAC,CAAA;AAEvC,MAAM,WAAW,KAAM,SAAQ,eAAe,EAAE,aAAa;IAC3D,iCAAiC;IACjC,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,uEAAuE;IACvE,OAAO,CAAC,EAAE,WAAW,CAAA;CACtB;AAED,QAAA,MAAM,UAAU;YAAW,KAAK;;;;CAgC/B,CAAA;AAMD,eAAe,UAAU,CAAA"}
@@ -1,30 +0,0 @@
1
- var __rest = (this && this.__rest) || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
- t[p] = s[p];
5
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
- t[p[i]] = s[p[i]];
9
- }
10
- return t;
11
- };
12
- /* eslint-disable react/no-array-index-key */
13
- import React from 'react';
14
- import { RadioGroup as MUIRadioGroup } from '@material-ui/core';
15
- import { useTheme } from '@material-ui/core/styles';
16
- import { GridCompound as Grid } from '@toptal/picasso-grid';
17
- const RadioGroup = (props) => {
18
- const { horizontal, spacing, xs, sm, md, lg, xl } = props, rest = __rest(props, ["horizontal", "spacing", "xs", "sm", "md", "lg", "xl"]);
19
- const { spacing: themeSpacing } = useTheme();
20
- const direction = horizontal ? 'row' : 'column';
21
- const gridSpacing = (spacing !== null && spacing !== void 0 ? spacing : horizontal) ? themeSpacing(2) : 0;
22
- const children = React.Children.toArray(rest.children);
23
- return (React.createElement(MUIRadioGroup, Object.assign({}, rest),
24
- React.createElement(Grid, { direction: direction, spacing: gridSpacing, className: 'mt-0 mb-0' }, children.map((child, index) => (React.createElement(Grid.Item, { key: index, className: 'leading-none [&&]:pt-0 [&&]:pb-0', xs: xs, sm: sm, md: md, lg: lg, xl: xl }, child))))));
25
- };
26
- RadioGroup.defaultProps = {
27
- horizontal: false,
28
- };
29
- export default RadioGroup;
30
- //# sourceMappingURL=RadioGroup.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file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AAE,EACN,EAAE,EAAE,EAAE,EACN,EAAE,EAAE,EAAE,EACN,EAAE,EAAE,EAAE,EACN,EAAE,EAAE,EAAE,IAEL,KAAK,CACI,CACb,CAAC,CACG,CACO,CACjB,CAAA;AACH,CAAC,CAAA;AAED,UAAU,CAAC,YAAY,GAAG;IACxB,UAAU,EAAE,KAAK;CAClB,CAAA;AAED,eAAe,UAAU,CAAA"}
@@ -1,5 +0,0 @@
1
- import type { OmitInternalProps } from '@toptal/picasso-shared';
2
- import type { Props as InternalRadioGroupProps } from './RadioGroup';
3
- export { default as RadioGroup } from './RadioGroup';
4
- export declare type RadioGroupProps = OmitInternalProps<InternalRadioGroupProps>;
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/RadioGroup/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAE/D,OAAO,KAAK,EAAE,KAAK,IAAI,uBAAuB,EAAE,MAAM,cAAc,CAAA;AACpE,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAA;AACpD,oBAAY,eAAe,GAAG,iBAAiB,CAAC,uBAAuB,CAAC,CAAA"}
@@ -1,2 +0,0 @@
1
- export { default as RadioGroup } from './RadioGroup';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/RadioGroup/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAA"}
@@ -1,4 +0,0 @@
1
- export * from './RadioCompound';
2
- export * from './Radio';
3
- export { RadioGroupProps, RadioGroup } from './RadioGroup';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,SAAS,CAAA;AACvB,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA"}
@@ -1,4 +0,0 @@
1
- export * from './RadioCompound';
2
- export * from './Radio';
3
- export { RadioGroup } from './RadioGroup';
4
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,SAAS,CAAA;AACvB,OAAO,EAAmB,UAAU,EAAE,MAAM,cAAc,CAAA"}