@beequip/hexagon 0.24.0 → 0.25.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.
- package/dist/components/RadioCardGroup/index.d.ts +22 -0
- package/dist/components/RadioCardGroup/index.js +51 -0
- package/dist/components/RadioCardGroup/index.js.map +1 -0
- package/dist/components/RadioCardGroup/index.stories.d.ts +4 -0
- package/dist/components/RadioCardGroup/index.stories.js +52 -0
- package/dist/components/RadioCardGroup/index.stories.js.map +1 -0
- package/dist/components/RadioCardGroup/styles.d.ts +9 -0
- package/dist/components/RadioCardGroup/styles.js +70 -0
- package/dist/components/RadioCardGroup/styles.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
interface RadioCardGroupContextType {
|
|
3
|
+
setValue: React.Dispatch<React.SetStateAction<string>>;
|
|
4
|
+
value: string;
|
|
5
|
+
groupName: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const RadioCardGroupContext: React.Context<RadioCardGroupContextType | null>;
|
|
8
|
+
export interface RadioCardGroupProps extends React.PropsWithChildren {
|
|
9
|
+
initialValue: string;
|
|
10
|
+
groupName: string;
|
|
11
|
+
label?: string;
|
|
12
|
+
infoSlot?: React.ReactNode;
|
|
13
|
+
}
|
|
14
|
+
export declare const Root: ({ initialValue, children, groupName, label, infoSlot, }: RadioCardGroupProps) => JSX.Element;
|
|
15
|
+
export interface RadioCardGroupItemProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
16
|
+
hook?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare const Item: ({ id, children, hook, ...props }: RadioCardGroupItemProps) => JSX.Element | null;
|
|
19
|
+
export declare const ItemContent: ({ children, }: React.PropsWithChildren) => JSX.Element;
|
|
20
|
+
export declare const ItemCollapsableContent: ({ children, }: React.PropsWithChildren) => JSX.Element;
|
|
21
|
+
export declare const ItemIndicator: () => JSX.Element;
|
|
22
|
+
export * as RadioCardGroup from '.';
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RadioCardGroup = exports.ItemIndicator = exports.ItemCollapsableContent = exports.ItemContent = exports.Item = exports.Root = exports.RadioCardGroupContext = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var React = require("react");
|
|
6
|
+
var styles_1 = require("./styles");
|
|
7
|
+
var Text_1 = require("../Text");
|
|
8
|
+
exports.RadioCardGroupContext = React.createContext(null);
|
|
9
|
+
var Root = function (_a) {
|
|
10
|
+
var initialValue = _a.initialValue, children = _a.children, groupName = _a.groupName, label = _a.label, infoSlot = _a.infoSlot;
|
|
11
|
+
var _b = tslib_1.__read(React.useState(initialValue), 2), value = _b[0], setValue = _b[1];
|
|
12
|
+
return (React.createElement(styles_1.StyledRadioCardGroupFieldset, null,
|
|
13
|
+
label && (React.createElement(styles_1.StyledRadioCardGroupLegend, null,
|
|
14
|
+
React.createElement(Text_1.Text, { weight: "medium", size: "m" }, label))),
|
|
15
|
+
infoSlot,
|
|
16
|
+
React.createElement(exports.RadioCardGroupContext.Provider, { value: { value: value, setValue: setValue, groupName: groupName } },
|
|
17
|
+
React.createElement(styles_1.StyledRadioCardGroup, { role: "radiogroup" }, children))));
|
|
18
|
+
};
|
|
19
|
+
exports.Root = Root;
|
|
20
|
+
var Item = function RadioCardGroupItem(_a) {
|
|
21
|
+
var id = _a.id, children = _a.children, hook = _a.hook, props = tslib_1.__rest(_a, ["id", "children", "hook"]);
|
|
22
|
+
var context = React.useContext(exports.RadioCardGroupContext);
|
|
23
|
+
console.assert(context, 'RadioCardGroup.Item should only be used inside a RadioCardGroup.');
|
|
24
|
+
if (!context)
|
|
25
|
+
return null;
|
|
26
|
+
var setValue = context.setValue, value = context.value, groupName = context.groupName;
|
|
27
|
+
return (React.createElement(styles_1.StyledRadioCardGroupItemLabel, { "data-hook": hook, htmlFor: id },
|
|
28
|
+
React.createElement(styles_1.StyledRadioCardGroupItemInput, tslib_1.__assign({ onChange: function (_a) {
|
|
29
|
+
var target = _a.target;
|
|
30
|
+
return setValue(target.value);
|
|
31
|
+
}, checked: value === props.value }, props, { id: id, name: groupName, type: "radio" }, props)),
|
|
32
|
+
children));
|
|
33
|
+
};
|
|
34
|
+
exports.Item = Item;
|
|
35
|
+
var ItemContent = function RadioCardGroupItemContent(_a) {
|
|
36
|
+
var children = _a.children;
|
|
37
|
+
return React.createElement(React.Fragment, null, children);
|
|
38
|
+
};
|
|
39
|
+
exports.ItemContent = ItemContent;
|
|
40
|
+
var ItemCollapsableContent = function RadioCardGroupItemCollapsableContent(_a) {
|
|
41
|
+
var children = _a.children;
|
|
42
|
+
return (React.createElement(styles_1.StyledRadioCardGroupItemCollapsableContent, null, children));
|
|
43
|
+
};
|
|
44
|
+
exports.ItemCollapsableContent = ItemCollapsableContent;
|
|
45
|
+
var ItemIndicator = function RadioCardGroupItemIndicator() {
|
|
46
|
+
return (React.createElement(styles_1.StyledRadioCardGroupItemIndicator, null,
|
|
47
|
+
React.createElement(styles_1.StyledRadioCardGroupItemIndicatorInner, null)));
|
|
48
|
+
};
|
|
49
|
+
exports.ItemIndicator = ItemIndicator;
|
|
50
|
+
exports.RadioCardGroup = require(".");
|
|
51
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/RadioCardGroup/index.tsx"],"names":[],"mappings":";;;;AAAA,6BAA8B;AAC9B,mCASiB;AACjB,gCAA8B;AAQjB,QAAA,qBAAqB,GAC9B,KAAK,CAAC,aAAa,CAAmC,IAAI,CAAC,CAAA;AASxD,IAAM,IAAI,GAAG,UAAC,EAMC;QALlB,YAAY,kBAAA,EACZ,QAAQ,cAAA,EACR,SAAS,eAAA,EACT,KAAK,WAA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AAK,CAAC,KAAK,IAC1B,KAAK,IACT,EAAE,EAAE,EAAE,EACN,IAAI,EAAE,SAAS,EACf,IAAI,EAAC,OAAO,IACR,KAAK,EACX;QACD,QAAQ,CACmB,CACnC,CAAA;AACL,CAAC,CAAA;AA7BY,QAAA,IAAI,QA6BhB;AAEM,IAAM,WAAW,GAAG,SAAS,yBAAyB,CAAC,EAEpC;QADtB,QAAQ,cAAA;IAER,OAAO,0CAAG,QAAQ,CAAI,CAAA;AAC1B,CAAC,CAAA;AAJY,QAAA,WAAW,eAIvB;AAEM,IAAM,sBAAsB,GAC/B,SAAS,oCAAoC,CAAC,EAEpB;QADtB,QAAQ,cAAA;IAER,OAAO,CACH,oBAAC,mDAA0C,QACtC,QAAQ,CACgC,CAChD,CAAA;AACL,CAAC,CAAA;AATQ,QAAA,sBAAsB,0BAS9B;AAEE,IAAM,aAAa,GACtB,SAAS,2BAA2B;IAChC,OAAO,CACH,oBAAC,0CAAiC;QAC9B,oBAAC,+CAAsC,OAAG,CACV,CACvC,CAAA;AACL,CAAC,CAAA;AAPQ,QAAA,aAAa,iBAOrB;AAEL,sCAAmC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { RadioCardGroup } from '.';
|
|
2
|
+
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0fc72a6d").R, import("@storybook/types").Args>;
|
|
3
|
+
export default _default;
|
|
4
|
+
export declare const Default: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0fc72a6d").R, RadioCardGroup.RadioCardGroupProps>;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Default = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var react_1 = require("react");
|
|
6
|
+
var _1 = require(".");
|
|
7
|
+
var Text_1 = require("../Text");
|
|
8
|
+
exports.default = {
|
|
9
|
+
title: 'Hexagon/Form/RadioCardGroup',
|
|
10
|
+
component: _1.RadioCardGroup.Root,
|
|
11
|
+
decorators: [function (Story) { return Story(); }],
|
|
12
|
+
};
|
|
13
|
+
var Template = function (_a) {
|
|
14
|
+
var args = tslib_1.__rest(_a, []);
|
|
15
|
+
return (react_1.default.createElement(_1.RadioCardGroup.Root, { initialValue: args.initialValue, groupName: args.groupName, label: "Kies je leasevoorstel" },
|
|
16
|
+
react_1.default.createElement(_1.RadioCardGroup.Item, { value: "a" },
|
|
17
|
+
react_1.default.createElement(_1.RadioCardGroup.ItemIndicator, null),
|
|
18
|
+
react_1.default.createElement(_1.RadioCardGroup.ItemContent, null,
|
|
19
|
+
react_1.default.createElement(Text_1.Text, { weight: "bold", size: "m" }, "Aanbevolen"))),
|
|
20
|
+
react_1.default.createElement(_1.RadioCardGroup.Item, { value: "b" },
|
|
21
|
+
react_1.default.createElement(_1.RadioCardGroup.ItemIndicator, null),
|
|
22
|
+
react_1.default.createElement(_1.RadioCardGroup.ItemContent, null,
|
|
23
|
+
react_1.default.createElement(Text_1.Text, { weight: "bold", size: "m" }, "Kortste looptijd"))),
|
|
24
|
+
react_1.default.createElement(_1.RadioCardGroup.Item, { value: "c" },
|
|
25
|
+
react_1.default.createElement(_1.RadioCardGroup.ItemContent, null,
|
|
26
|
+
react_1.default.createElement("div", { style: {
|
|
27
|
+
display: 'flex',
|
|
28
|
+
width: '100%',
|
|
29
|
+
justifyContent: 'space-between',
|
|
30
|
+
alignItems: 'flex-start',
|
|
31
|
+
} },
|
|
32
|
+
react_1.default.createElement("div", { style: {
|
|
33
|
+
display: 'flex',
|
|
34
|
+
gap: '16px',
|
|
35
|
+
alignItems: 'center',
|
|
36
|
+
} },
|
|
37
|
+
react_1.default.createElement(_1.RadioCardGroup.ItemIndicator, null),
|
|
38
|
+
react_1.default.createElement(Text_1.Text, { weight: "bold", size: "m" }, "Laagste maandprijs")),
|
|
39
|
+
react_1.default.createElement("div", { style: {
|
|
40
|
+
display: 'flex',
|
|
41
|
+
flexDirection: 'column',
|
|
42
|
+
alignItems: 'flex-end',
|
|
43
|
+
} },
|
|
44
|
+
react_1.default.createElement(Text_1.Text, { weight: "bold", size: "m" }, "\u20AC 800,50"),
|
|
45
|
+
react_1.default.createElement(Text_1.Text, { weight: "normal", color: "grey", size: "xs" }, "/mnd")))))));
|
|
46
|
+
};
|
|
47
|
+
exports.Default = Template.bind({});
|
|
48
|
+
exports.Default.args = {
|
|
49
|
+
groupName: 'radio-group-test',
|
|
50
|
+
initialValue: 'c',
|
|
51
|
+
};
|
|
52
|
+
//# sourceMappingURL=index.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.stories.js","sourceRoot":"","sources":["../../../src/components/RadioCardGroup/index.stories.tsx"],"names":[],"mappings":";;;;AACA,+BAAyB;AACzB,sBAAuD;AACvD,gCAA8B;AAE9B,kBAAe;IACX,KAAK,EAAE,6BAA6B;IACpC,SAAS,EAAE,iBAAc,CAAC,IAAI;IAC9B,UAAU,EAAE,CAAC,UAAC,KAAK,IAAK,OAAA,KAAK,EAAE,EAAP,CAAO,CAAC;CAC3B,CAAA;AAET,IAAM,QAAQ,GAAiC,UAAC,EAAW;QAAN,IAAI,sBAAT,EAAW,CAAF;IACrD,OAAO,CACH,8BAAC,iBAAc,CAAC,IAAI,IAChB,YAAY,EAAE,IAAI,CAAC,YAAY,EAC/B,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,KAAK,EAAC,uBAAuB;QAE7B,8BAAC,iBAAc,CAAC,IAAI,IAAC,KAAK,EAAC,GAAG;YAC1B,8BAAC,iBAAc,CAAC,aAAa,OAAG;YAChC,8BAAC,iBAAc,CAAC,WAAW;gBACvB,8BAAC,WAAI,IAAC,MAAM,EAAC,MAAM,EAAC,IAAI,EAAC,GAAG,iBAErB,CACkB,CACX;QACtB,8BAAC,iBAAc,CAAC,IAAI,IAAC,KAAK,EAAC,GAAG;YAC1B,8BAAC,iBAAc,CAAC,aAAa,OAAG;YAChC,8BAAC,iBAAc,CAAC,WAAW;gBACvB,8BAAC,WAAI,IAAC,MAAM,EAAC,MAAM,EAAC,IAAI,EAAC,GAAG,uBAErB,CACkB,CACX;QACtB,8BAAC,iBAAc,CAAC,IAAI,IAAC,KAAK,EAAC,GAAG;YAC1B,8BAAC,iBAAc,CAAC,WAAW;gBACvB,uCACI,KAAK,EAAE;wBACH,OAAO,EAAE,MAAM;wBACf,KAAK,EAAE,MAAM;wBACb,cAAc,EAAE,eAAe;wBAC/B,UAAU,EAAE,YAAY;qBAC3B;oBAED,uCACI,KAAK,EAAE;4BACH,OAAO,EAAE,MAAM;4BACf,GAAG,EAAE,MAAM;4BACX,UAAU,EAAE,QAAQ;yBACvB;wBAED,8BAAC,iBAAc,CAAC,aAAa,OAAG;wBAChC,8BAAC,WAAI,IAAC,MAAM,EAAC,MAAM,EAAC,IAAI,EAAC,GAAG,yBAErB,CACL;oBACN,uCACI,KAAK,EAAE;4BACH,OAAO,EAAE,MAAM;4BACf,aAAa,EAAE,QAAQ;4BACvB,UAAU,EAAE,UAAU;yBACzB;wBAED,8BAAC,WAAI,IAAC,MAAM,EAAC,MAAM,EAAC,IAAI,EAAC,GAAG,oBAErB;wBACP,8BAAC,WAAI,IAAC,MAAM,EAAC,QAAQ,EAAC,KAAK,EAAC,MAAM,EAAC,IAAI,EAAC,IAAI,WAErC,CACL,CACJ,CACmB,CACX,CACJ,CACzB,CAAA;AACL,CAAC,CAAA;AAEY,QAAA,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxC,eAAO,CAAC,IAAI,GAAG;IACX,SAAS,EAAE,kBAAkB;IAC7B,YAAY,EAAE,GAAG;CACpB,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const StyledRadioCardGroup: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
3
|
+
export declare const StyledRadioCardGroupItemIndicator: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
|
|
4
|
+
export declare const StyledRadioCardGroupItemIndicatorInner: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
|
|
5
|
+
export declare const StyledRadioCardGroupItemCollapsableContent: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
6
|
+
export declare const StyledRadioCardGroupItemLabel: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, never>> & string;
|
|
7
|
+
export declare const StyledRadioCardGroupItemInput: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, never>> & string;
|
|
8
|
+
export declare const StyledRadioCardGroupFieldset: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").FieldsetHTMLAttributes<HTMLFieldSetElement>, HTMLFieldSetElement>, never>> & string;
|
|
9
|
+
export declare const StyledRadioCardGroupLegend: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").FieldsetHTMLAttributes<HTMLFieldSetElement>, HTMLFieldSetElement>, never>> & string;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StyledRadioCardGroupLegend = exports.StyledRadioCardGroupFieldset = exports.StyledRadioCardGroupItemInput = exports.StyledRadioCardGroupItemLabel = exports.StyledRadioCardGroupItemCollapsableContent = exports.StyledRadioCardGroupItemIndicatorInner = exports.StyledRadioCardGroupItemIndicator = exports.StyledRadioCardGroup = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var styled_components_1 = require("styled-components");
|
|
6
|
+
var theme_1 = require("../../theme");
|
|
7
|
+
exports.StyledRadioCardGroup = styled_components_1.default.div(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n gap: ", "px;\n"], ["\n display: flex;\n flex-direction: column;\n gap: ", "px;\n"])), function (_a) {
|
|
8
|
+
var theme = _a.theme;
|
|
9
|
+
return theme.spacing[2];
|
|
10
|
+
});
|
|
11
|
+
exports.StyledRadioCardGroupItemIndicator = styled_components_1.default.span(templateObject_2 || (templateObject_2 = tslib_1.__makeTemplateObject(["\n display: block;\n width: 20px;\n height: 20px;\n position: relative;\n flex-shrink: 0;\n box-shadow: 0 0 0 1px inset ", ";\n border-radius: 50%;\n"], ["\n display: block;\n width: 20px;\n height: 20px;\n position: relative;\n flex-shrink: 0;\n box-shadow: 0 0 0 1px inset ", ";\n border-radius: 50%;\n"])), function (_a) {
|
|
12
|
+
var theme = _a.theme;
|
|
13
|
+
return theme.colors.blueGrey[200];
|
|
14
|
+
});
|
|
15
|
+
exports.StyledRadioCardGroupItemIndicatorInner = styled_components_1.default.span(templateObject_3 || (templateObject_3 = tslib_1.__makeTemplateObject(["\n display: block;\n background-color: ", ";\n width: 12px;\n height: 12px;\n position: absolute;\n inset: 0;\n margin: auto;\n border-radius: 50%;\n transform: scale(0);\n transition: ", ";\n"], ["\n display: block;\n background-color: ", ";\n width: 12px;\n height: 12px;\n position: absolute;\n inset: 0;\n margin: auto;\n border-radius: 50%;\n transform: scale(0);\n transition: ", ";\n"])), function (_a) {
|
|
16
|
+
var theme = _a.theme;
|
|
17
|
+
return theme.colors.orange[500];
|
|
18
|
+
}, function (_a) {
|
|
19
|
+
var theme = _a.theme;
|
|
20
|
+
return theme.transition('transform');
|
|
21
|
+
});
|
|
22
|
+
exports.StyledRadioCardGroupItemCollapsableContent = styled_components_1.default.div(templateObject_4 || (templateObject_4 = tslib_1.__makeTemplateObject(["\n display: none;\n"], ["\n display: none;\n"])));
|
|
23
|
+
exports.StyledRadioCardGroupItemLabel = styled_components_1.default.label(templateObject_5 || (templateObject_5 = tslib_1.__makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: ", "px;\n padding: ", "px\n ", "px;\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n border-radius: ", "px;\n box-shadow: 0 0 0 1px ", ";\n user-select: none;\n cursor: pointer;\n transition: ", ";\n\n &:hover {\n box-shadow: 0 0 0 1px ", ",\n ", ";\n }\n\n &:focus-within {\n outline: solid 2px ", ";\n }\n\n &:has(:checked) {\n box-shadow: 0 0 0 2px ", ";\n\n ", " {\n transform: scale(1);\n }\n\n ", " {\n display: flex;\n }\n\n &:hover {\n box-shadow: 0 0 0 2px ", ",\n ", ";\n }\n }\n\n @media (min-width: ", "px) {\n padding: ", "px;\n }\n"], ["\n display: flex;\n align-items: center;\n gap: ", "px;\n padding: ", "px\n ", "px;\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n border-radius: ", "px;\n box-shadow: 0 0 0 1px ", ";\n user-select: none;\n cursor: pointer;\n transition: ", ";\n\n &:hover {\n box-shadow: 0 0 0 1px ", ",\n ", ";\n }\n\n &:focus-within {\n outline: solid 2px ", ";\n }\n\n &:has(:checked) {\n box-shadow: 0 0 0 2px ", ";\n\n ", " {\n transform: scale(1);\n }\n\n ", " {\n display: flex;\n }\n\n &:hover {\n box-shadow: 0 0 0 2px ", ",\n ", ";\n }\n }\n\n @media (min-width: ", "px) {\n padding: ", "px;\n }\n"])), function (_a) {
|
|
24
|
+
var theme = _a.theme;
|
|
25
|
+
return theme.spacing[2];
|
|
26
|
+
}, function (_a) {
|
|
27
|
+
var theme = _a.theme;
|
|
28
|
+
return theme.spacing[2];
|
|
29
|
+
}, function (_a) {
|
|
30
|
+
var theme = _a.theme;
|
|
31
|
+
return theme.spacing[3];
|
|
32
|
+
}, function (props) { return props.theme.font.default; }, function (props) { return props.theme.font.sizes.s; }, function (props) { return props.theme.font.lineHeight; }, function (props) { return props.theme.colors.text.default; }, function (_a) {
|
|
33
|
+
var theme = _a.theme;
|
|
34
|
+
return theme.borderRadius.large;
|
|
35
|
+
}, function (_a) {
|
|
36
|
+
var theme = _a.theme;
|
|
37
|
+
return theme.colors.blueGrey[200];
|
|
38
|
+
}, function (_a) {
|
|
39
|
+
var theme = _a.theme;
|
|
40
|
+
return theme.transition('box-shadow');
|
|
41
|
+
}, function (_a) {
|
|
42
|
+
var theme = _a.theme;
|
|
43
|
+
return theme.colors.blueGrey[200];
|
|
44
|
+
}, function (_a) {
|
|
45
|
+
var theme = _a.theme;
|
|
46
|
+
return theme.shadowHover;
|
|
47
|
+
}, function (_a) {
|
|
48
|
+
var theme = _a.theme;
|
|
49
|
+
return theme.colors.orange[200];
|
|
50
|
+
}, function (_a) {
|
|
51
|
+
var theme = _a.theme;
|
|
52
|
+
return theme.colors.orange[500];
|
|
53
|
+
}, exports.StyledRadioCardGroupItemIndicatorInner, exports.StyledRadioCardGroupItemCollapsableContent, function (_a) {
|
|
54
|
+
var theme = _a.theme;
|
|
55
|
+
return theme.colors.orange[500];
|
|
56
|
+
}, function (_a) {
|
|
57
|
+
var theme = _a.theme;
|
|
58
|
+
return theme.shadowHover;
|
|
59
|
+
}, theme_1.breakpoints.xs, function (_a) {
|
|
60
|
+
var theme = _a.theme;
|
|
61
|
+
return theme.spacing[2];
|
|
62
|
+
});
|
|
63
|
+
exports.StyledRadioCardGroupItemInput = styled_components_1.default.input(templateObject_6 || (templateObject_6 = tslib_1.__makeTemplateObject(["\n opacity: 0;\n position: absolute;\n"], ["\n opacity: 0;\n position: absolute;\n"])));
|
|
64
|
+
exports.StyledRadioCardGroupFieldset = styled_components_1.default.fieldset(templateObject_7 || (templateObject_7 = tslib_1.__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n border: none;\n padding: 0;\n margin: 0;\n"], ["\n display: flex;\n flex-direction: column;\n border: none;\n padding: 0;\n margin: 0;\n"])));
|
|
65
|
+
exports.StyledRadioCardGroupLegend = styled_components_1.default.fieldset(templateObject_8 || (templateObject_8 = tslib_1.__makeTemplateObject(["\n border: none;\n padding: 0;\n margin-bottom: ", "px;\n"], ["\n border: none;\n padding: 0;\n margin-bottom: ", "px;\n"])), function (_a) {
|
|
66
|
+
var theme = _a.theme;
|
|
67
|
+
return theme.spacing[2];
|
|
68
|
+
});
|
|
69
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8;
|
|
70
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/components/RadioCardGroup/styles.ts"],"names":[],"mappings":";;;;AAAA,uDAAsC;AACtC,qCAAyC;AAE5B,QAAA,oBAAoB,GAAG,2BAAM,CAAC,GAAG,kJAAA,8DAGnC,EAA+B,OACzC,KADU,UAAC,EAAS;QAAP,KAAK,WAAA;IAAO,OAAA,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;AAAhB,CAAgB,EACzC;AAEY,QAAA,iCAAiC,GAAG,2BAAM,CAAC,IAAI,uPAAA,4IAM1B,EAAyC,8BAE1E,KAFiC,UAAC,EAAS;QAAP,KAAK,WAAA;IAAO,OAAA,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC;AAA1B,CAA0B,EAE1E;AAEY,QAAA,sCAAsC,GAAG,2BAAM,CAAC,IAAI,2SAAA,+CAEzC,EAAuC,wKAQ7C,EAA4C,KAC7D,KATuB,UAAC,EAAS;QAAP,KAAK,WAAA;IAAO,OAAA,KA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,yGAM1D,KAAA;AAEY,QAAA,0BAA0B,GAAG,2BAAM,CAAC,QAAQ,+IAAA,2DAGpC,EAA+B,OACnD,KADoB,UAAC,EAAS;QAAP,KAAK,WAAA;IAAO,OAAA,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;AAAhB,CAAgB,EACnD"}
|
package/dist/index.d.ts
CHANGED
|
@@ -40,4 +40,5 @@ export { Text } from './components/Text';
|
|
|
40
40
|
export { TextArea } from './components/TextArea';
|
|
41
41
|
export { ToggleContainer } from './components/ToggleContainer';
|
|
42
42
|
export { Tooltip } from './components/Tooltip';
|
|
43
|
+
export { RadioCardGroup } from './components/RadioCardGroup';
|
|
43
44
|
export * from './theme';
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Tooltip = exports.ToggleContainer = exports.TextArea = exports.Text = exports.Tag = exports.Table = exports.Row = exports.Head = exports.Foot = exports.Cell = exports.Body = exports.Spinner = exports.Select = exports.RadioGroup = exports.Radio = exports.Portal = exports.PageLoader = exports.OrderedList = exports.Notification = exports.Modal = exports.ListItem = exports.List = exports.Link = exports.Label = exports.CurrencyInput = exports.Input = exports.Image = exports.HelpText = exports.Heading = exports.GridColumn = exports.Grid = exports.Form = exports.FieldGroup = exports.FieldError = exports.Field = exports.Error = exports.ExternalLink = exports.CounterTag = exports.Container = exports.Checkbox = exports.Card = exports.ButtonGroup = exports.Button = exports.Box = exports.Badge = exports.AutocompleteItem = exports.Autocomplete = void 0;
|
|
3
|
+
exports.RadioCardGroup = exports.Tooltip = exports.ToggleContainer = exports.TextArea = exports.Text = exports.Tag = exports.Table = exports.Row = exports.Head = exports.Foot = exports.Cell = exports.Body = exports.Spinner = exports.Select = exports.RadioGroup = exports.Radio = exports.Portal = exports.PageLoader = exports.OrderedList = exports.Notification = exports.Modal = exports.ListItem = exports.List = exports.Link = exports.Label = exports.CurrencyInput = exports.Input = exports.Image = exports.HelpText = exports.Heading = exports.GridColumn = exports.Grid = exports.Form = exports.FieldGroup = exports.FieldError = exports.Field = exports.Error = exports.ExternalLink = exports.CounterTag = exports.Container = exports.Checkbox = exports.Card = exports.ButtonGroup = exports.Button = exports.Box = exports.Badge = exports.AutocompleteItem = exports.Autocomplete = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
var Autocomplete_1 = require("./components/Autocomplete");
|
|
6
6
|
Object.defineProperty(exports, "Autocomplete", { enumerable: true, get: function () { return Autocomplete_1.Autocomplete; } });
|
|
@@ -91,5 +91,7 @@ var ToggleContainer_1 = require("./components/ToggleContainer");
|
|
|
91
91
|
Object.defineProperty(exports, "ToggleContainer", { enumerable: true, get: function () { return ToggleContainer_1.ToggleContainer; } });
|
|
92
92
|
var Tooltip_1 = require("./components/Tooltip");
|
|
93
93
|
Object.defineProperty(exports, "Tooltip", { enumerable: true, get: function () { return Tooltip_1.Tooltip; } });
|
|
94
|
+
var RadioCardGroup_1 = require("./components/RadioCardGroup");
|
|
95
|
+
Object.defineProperty(exports, "RadioCardGroup", { enumerable: true, get: function () { return RadioCardGroup_1.RadioCardGroup; } });
|
|
94
96
|
tslib_1.__exportStar(require("./theme"), exports);
|
|
95
97
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAAA,0DAAwD;AAA/C,4GAAA,YAAY,OAAA;AACrB,uDAAiE;AAAxD,wGAAA,gBAAgB,OAAA;AACzB,4CAA0C;AAAjC,8FAAA,KAAK,OAAA;AACd,wCAAsC;AAA7B,0FAAA,GAAG,OAAA;AACZ,8CAA4C;AAAnC,gGAAA,MAAM,OAAA;AACf,wDAAsD;AAA7C,0GAAA,WAAW,OAAA;AACpB,0CAAwC;AAA/B,4FAAA,IAAI,OAAA;AACb,kDAAgD;AAAvC,oG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