@capillarytech/blaze-ui 6.1.0 → 6.1.2
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/.npmrc +3 -0
- package/CapCustomCheckboxList/styles.css +3 -3
- package/CapCustomCheckboxList/styles.scss +7 -8
- package/CapEventCalendar/CalendarCanvas/calendarCanvasStyles.css +21 -0
- package/CapEventCalendar/CalendarCanvas/calendarCanvasStyles.module.scss.js +8 -0
- package/CapEventCalendar/CalendarCanvas/calendarCanvasStyles.scss +17 -0
- package/CapEventCalendar/CalendarCanvas/index.d.ts +3 -52
- package/CapEventCalendar/CalendarCanvas/index.d.ts.map +1 -1
- package/CapEventCalendar/CalendarCanvas/index.js +31 -50
- package/CapEventCalendar/CalendarCanvas/utils.d.ts +5 -9
- package/CapEventCalendar/CalendarCanvas/utils.d.ts.map +1 -1
- package/CapEventCalendar/CalendarCanvas/utils.js +6 -6
- package/CapEventCalendar/components/DayDropdown/index.d.ts +3 -13
- package/CapEventCalendar/components/DayDropdown/index.d.ts.map +1 -1
- package/CapEventCalendar/components/DayDropdown/index.js +32 -14
- package/CapEventCalendar/components/MonthHeader/index.d.ts +3 -9
- package/CapEventCalendar/components/MonthHeader/index.d.ts.map +1 -1
- package/CapEventCalendar/components/MonthHeader/index.js +4 -9
- package/CapEventCalendar/components/MonthHeader/monthHeaderStyles.css +20 -0
- package/CapEventCalendar/components/MonthHeader/monthHeaderStyles.module.scss.js +7 -0
- package/CapEventCalendar/components/MonthHeader/monthHeaderStyles.scss +15 -0
- package/CapEventCalendar/drawUtils.d.ts +9 -71
- package/CapEventCalendar/drawUtils.d.ts.map +1 -1
- package/CapEventCalendar/drawUtils.js +12 -4
- package/CapEventCalendar/index.d.ts +4 -80
- package/CapEventCalendar/index.d.ts.map +1 -1
- package/CapEventCalendar/index.js +60 -85
- package/CapEventCalendar/messages.d.ts +25 -0
- package/CapEventCalendar/messages.d.ts.map +1 -0
- package/CapEventCalendar/messages.js +28 -0
- package/CapEventCalendar/styles.css +9 -81
- package/CapEventCalendar/styles.module.scss.js +12 -0
- package/CapEventCalendar/styles.scss +34 -107
- package/CapEventCalendar/tests/types.d.ts +26 -0
- package/CapEventCalendar/tests/types.d.ts.map +1 -0
- package/CapEventCalendar/types.d.ts +188 -0
- package/CapEventCalendar/types.d.ts.map +1 -0
- package/CapEventCalendar/types.js +1 -0
- package/CapEventCalendar/utils.d.ts +11 -9
- package/CapEventCalendar/utils.d.ts.map +1 -1
- package/CapEventCalendar/utils.js +10 -7
- package/CapProductSelection/index.d.ts +7 -29
- package/CapProductSelection/index.d.ts.map +1 -1
- package/CapProductSelection/index.js +52 -89
- package/CapProductSelection/messages.d.ts +76 -0
- package/CapProductSelection/messages.d.ts.map +1 -0
- package/CapProductSelection/messages.js +79 -0
- package/CapProductSelection/styles.css +81 -0
- package/CapProductSelection/styles.module.scss.js +8 -0
- package/CapProductSelection/styles.scss +82 -40
- package/CapProductSelection/tests/CapProductSelection.mockData.d.ts +36 -0
- package/CapProductSelection/tests/CapProductSelection.mockData.d.ts.map +1 -0
- package/CapProductSelection/types.d.ts +34 -0
- package/CapProductSelection/types.d.ts.map +1 -0
- package/CapProductSelection/types.js +1 -0
- package/CapRadioCard/index.d.ts.map +1 -1
- package/CapRadioCard/index.js +52 -20
- package/CapRadioCard/styles.css +25 -25
- package/CapRadioCard/styles.module.scss.js +14 -40
- package/CapRadioCard/styles.scss +20 -20
- package/CapRadioCard/types.d.ts +20 -0
- package/CapRadioCard/types.d.ts.map +1 -1
- package/CapStaticTemplates/index.d.ts +3 -1
- package/CapStaticTemplates/index.d.ts.map +1 -1
- package/CapStaticTemplates/index.js +185 -144
- package/CapStaticTemplates/messages.d.ts +32 -0
- package/CapStaticTemplates/messages.d.ts.map +1 -0
- package/CapStaticTemplates/messages.js +35 -0
- package/CapStaticTemplates/styles.css +220 -0
- package/CapStaticTemplates/styles.module.scss.js +55 -0
- package/CapStaticTemplates/styles.scss +291 -0
- package/CapStaticTemplates/tests/CapStaticTemplates.mockData.d.ts +54 -0
- package/CapStaticTemplates/tests/CapStaticTemplates.mockData.d.ts.map +1 -0
- package/CapStaticTemplates/types.d.ts +97 -0
- package/CapStaticTemplates/types.d.ts.map +1 -0
- package/CapStaticTemplates/types.js +1 -0
- package/CapTabV3/tests/CapTabV3.mockData.d.ts +26 -26
- package/CapTabV3/tests/CapTabV3.mockData.d.ts.map +1 -1
- package/index.d.ts +6 -0
- package/index.d.ts.map +1 -1
- package/index.js +227 -221
- package/package.json +1 -1
- package/styles/_variables.scss +2 -0
- package/utils/dayjs.d.ts +1 -0
- package/utils/dayjs.d.ts.map +1 -1
- package/utils/dayjs.js +1 -0
- package/CapProductSelection/style.d.ts +0 -3
- package/CapProductSelection/style.d.ts.map +0 -1
- package/CapProductSelection/style.js +0 -38
- package/CapStaticTemplates/style.d.ts +0 -13
- package/CapStaticTemplates/style.d.ts.map +0 -1
- package/CapStaticTemplates/style.js +0 -216
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { CapProductSelectionProps } from '../types';
|
|
2
|
+
export declare const mockHandleSelect: jest.Mock<any, any, any>;
|
|
3
|
+
export declare const defaultLocale: {
|
|
4
|
+
lineItem: string;
|
|
5
|
+
selectAttribute: string;
|
|
6
|
+
brand: string;
|
|
7
|
+
brandInfo: string;
|
|
8
|
+
category: string;
|
|
9
|
+
categoryInfo: string;
|
|
10
|
+
product: string;
|
|
11
|
+
productInfo: string;
|
|
12
|
+
SKU: string;
|
|
13
|
+
uploadSKU: string;
|
|
14
|
+
uploadSKUInfo: string;
|
|
15
|
+
changeSelection: string;
|
|
16
|
+
description: string;
|
|
17
|
+
okText: string;
|
|
18
|
+
cancelText: string;
|
|
19
|
+
comingSoon: string;
|
|
20
|
+
selectValues: string;
|
|
21
|
+
atleast1Attribute: string;
|
|
22
|
+
};
|
|
23
|
+
export declare const defaultProps: CapProductSelectionProps;
|
|
24
|
+
export declare const propsWithSelectedBrand: CapProductSelectionProps;
|
|
25
|
+
export declare const propsWithSelectedSKU: CapProductSelectionProps;
|
|
26
|
+
export declare const propsWithProductMandatory: CapProductSelectionProps;
|
|
27
|
+
export declare const customTreeData: {
|
|
28
|
+
key: string;
|
|
29
|
+
title: string;
|
|
30
|
+
children: {
|
|
31
|
+
key: string;
|
|
32
|
+
title: string;
|
|
33
|
+
}[];
|
|
34
|
+
}[];
|
|
35
|
+
export declare const TRIGGER_TEXT = "Open product selection";
|
|
36
|
+
//# sourceMappingURL=CapProductSelection.mockData.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CapProductSelection.mockData.d.ts","sourceRoot":"","sources":["../../../components/CapProductSelection/tests/CapProductSelection.mockData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAEzD,eAAO,MAAM,gBAAgB,0BAAY,CAAC;AAE1C,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;CAoBzB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,wBAI1B,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,wBAGpC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,wBAGlC,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,wBAIvC,CAAC;AAEF,eAAO,MAAM,cAAc;;;;;;;GAM1B,CAAC;AAEF,eAAO,MAAM,YAAY,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Tree node item for custom treeData.
|
|
4
|
+
* Used when building tree structure for CapProductSelection.
|
|
5
|
+
*/
|
|
6
|
+
export interface TreeNodeItem {
|
|
7
|
+
title?: React.ReactNode;
|
|
8
|
+
key: string;
|
|
9
|
+
children?: TreeNodeItem[];
|
|
10
|
+
checkable?: boolean;
|
|
11
|
+
info?: string;
|
|
12
|
+
isHover?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface CapProductSelectionProps {
|
|
15
|
+
/** Trigger element (e.g. button or link) that opens the popover */
|
|
16
|
+
target?: React.ReactNode;
|
|
17
|
+
/** Custom tree data; when not provided, default Line Item / Attribute / SKU tree is used */
|
|
18
|
+
treeData?: TreeNodeItem[];
|
|
19
|
+
/** Popover trigger behavior */
|
|
20
|
+
trigger?: 'click' | 'hover';
|
|
21
|
+
/** Popover placement relative to target */
|
|
22
|
+
placement?: string;
|
|
23
|
+
/** Additional class name for the popover overlay */
|
|
24
|
+
overlayClassName?: string;
|
|
25
|
+
/** Called when popover closes with the current selection (array of attribute keys) */
|
|
26
|
+
handleSelect?: (selectedKeys: string[]) => void;
|
|
27
|
+
/** Controlled selected attribute keys (e.g. BRAND, CATEGORY, PRODUCT_ATTRIBUTE, SKU) */
|
|
28
|
+
selectedAttributes?: string[];
|
|
29
|
+
/** When true, at least one of Brand/Category/Product must be selected; disables unchecking the last one */
|
|
30
|
+
isProductMandatory?: boolean;
|
|
31
|
+
/** Additional props passed to CapPopover (e.g. getPopupContainer) */
|
|
32
|
+
[key: string]: unknown;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../components/CapProductSelection/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,wBAAwB;IACvC,mEAAmE;IACnE,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,4FAA4F;IAC5F,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAC;IAC1B,+BAA+B;IAC/B,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IAC5B,2CAA2C;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oDAAoD;IACpD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,sFAAsF;IACtF,YAAY,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAChD,wFAAwF;IACxF,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC9B,2GAA2G;IAC3G,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B,qEAAqE;IACrE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../components/CapRadioCard/index.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,KAAmB,MAAM,OAAO,CAAC;AAQxC,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAKvF,cAAM,YAAa,SAAQ,KAAK,CAAC,SAAS,CAAC,iBAAiB,CAAC;IAC3D,YAAY,GAAI,GAAG,uBAAuB,UAExC;IAEF,cAAc,GAAI,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../components/CapRadioCard/index.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,KAAmB,MAAM,OAAO,CAAC;AAQxC,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAKvF,cAAM,YAAa,SAAQ,KAAK,CAAC,SAAS,CAAC,iBAAiB,CAAC;IAC3D,YAAY,GAAI,GAAG,uBAAuB,UAExC;IAEF,cAAc,GAAI,MAAM,gBAAgB,6CAuGtC;IAEF,MAAM;CAmCP;AAED,eAAe,YAAY,CAAC"}
|
package/CapRadioCard/index.js
CHANGED
|
@@ -18,7 +18,22 @@ class CapRadioCard extends React.Component {
|
|
|
18
18
|
(_b = (_a = this.props).onChange) == null ? void 0 : _b.call(_a, e);
|
|
19
19
|
};
|
|
20
20
|
this.getRadioButton = (pane) => {
|
|
21
|
-
const {
|
|
21
|
+
const {
|
|
22
|
+
cardHeight,
|
|
23
|
+
cardWidth,
|
|
24
|
+
selected,
|
|
25
|
+
defaultValue,
|
|
26
|
+
size,
|
|
27
|
+
radioButtonWrapperClassName,
|
|
28
|
+
checkedIconClassName,
|
|
29
|
+
iconWrapperClassName,
|
|
30
|
+
iconContainerClassName,
|
|
31
|
+
divIconClassName,
|
|
32
|
+
contentContainerClassName,
|
|
33
|
+
headerClassName,
|
|
34
|
+
contentClassName,
|
|
35
|
+
infoIconWrapperClassName
|
|
36
|
+
} = this.props;
|
|
22
37
|
const {
|
|
23
38
|
content,
|
|
24
39
|
title,
|
|
@@ -46,34 +61,51 @@ class CapRadioCard extends React.Component {
|
|
|
46
61
|
disabled,
|
|
47
62
|
style: radioButtonStyle,
|
|
48
63
|
className: classNames(
|
|
49
|
-
styles["
|
|
64
|
+
styles["radio-button-wrapper"],
|
|
50
65
|
{
|
|
51
|
-
[styles["
|
|
52
|
-
[styles["
|
|
66
|
+
[styles["custom-disable-radio-button"]]: customDisableClass,
|
|
67
|
+
[styles["disabled-wrapper"]]: disabled
|
|
53
68
|
},
|
|
54
|
-
radioCardClassName
|
|
69
|
+
radioCardClassName,
|
|
70
|
+
radioButtonWrapperClassName
|
|
55
71
|
),
|
|
56
72
|
...restParams,
|
|
57
73
|
children: [
|
|
58
|
-
!customDisableClass && /* @__PURE__ */ jsx(
|
|
74
|
+
!customDisableClass && /* @__PURE__ */ jsx(
|
|
75
|
+
CapIcon,
|
|
76
|
+
{
|
|
77
|
+
type: "check-filled",
|
|
78
|
+
className: classNames(styles["radio-card-checked"], checkedIconClassName)
|
|
79
|
+
}
|
|
80
|
+
),
|
|
59
81
|
/* @__PURE__ */ jsxs(Card, { variant: "borderless", children: [
|
|
60
|
-
icon && /* @__PURE__ */ jsx("div", { className: styles["
|
|
82
|
+
icon && /* @__PURE__ */ jsx("div", { className: classNames(styles["radio-card-icon"], iconWrapperClassName), children: /* @__PURE__ */ jsx(
|
|
61
83
|
"div",
|
|
62
84
|
{
|
|
63
|
-
className: classNames(
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
85
|
+
className: classNames(
|
|
86
|
+
styles["icon-container"],
|
|
87
|
+
{
|
|
88
|
+
[styles["green-color"]]: isChecked && !isSmall && !disabled
|
|
89
|
+
},
|
|
90
|
+
iconContainerClassName
|
|
91
|
+
),
|
|
92
|
+
children: /* @__PURE__ */ jsx("div", { className: classNames(styles["div-icon"], divIconClassName), children: icon })
|
|
67
93
|
}
|
|
68
94
|
) }),
|
|
69
|
-
/* @__PURE__ */ jsxs(
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
95
|
+
/* @__PURE__ */ jsxs(
|
|
96
|
+
"div",
|
|
97
|
+
{
|
|
98
|
+
className: classNames(
|
|
99
|
+
styles["radio-card-content-container"],
|
|
100
|
+
contentContainerClassName
|
|
101
|
+
),
|
|
102
|
+
children: [
|
|
103
|
+
/* @__PURE__ */ jsx("div", { className: classNames(styles["radio-card-header"], headerClassName), children: /* @__PURE__ */ jsx(CapHeadingWithStatic, { type: "h4", className: classNames(titleClassName), children: title }) }),
|
|
104
|
+
/* @__PURE__ */ jsx("div", { className: classNames(styles["radio-card-content"], contentClassName), children: content })
|
|
105
|
+
]
|
|
106
|
+
}
|
|
107
|
+
),
|
|
108
|
+
infoIconDescription && /* @__PURE__ */ jsx("div", { className: classNames(styles["info-icon-wrapper"], infoIconWrapperClassName), children: /* @__PURE__ */ jsx(CapTooltipWithInfo, { title: infoIconDescription }) }),
|
|
77
109
|
customComponent
|
|
78
110
|
] })
|
|
79
111
|
]
|
|
@@ -98,7 +130,7 @@ class CapRadioCard extends React.Component {
|
|
|
98
130
|
...rest,
|
|
99
131
|
onChange: this.handleChange,
|
|
100
132
|
className: classNames(
|
|
101
|
-
styles["
|
|
133
|
+
styles["cap-radioCard-v2"],
|
|
102
134
|
{
|
|
103
135
|
[styles["smallRadioCard"]]: size === "small"
|
|
104
136
|
},
|
package/CapRadioCard/styles.css
CHANGED
|
@@ -6,39 +6,39 @@
|
|
|
6
6
|
/* Border Width */
|
|
7
7
|
/* Transition */
|
|
8
8
|
/* Timezones Footer */
|
|
9
|
-
.
|
|
9
|
+
.cap-radioCard-v2 .radio-card-content-container {
|
|
10
10
|
width: 100%;
|
|
11
11
|
}
|
|
12
|
-
.
|
|
13
|
-
.
|
|
12
|
+
.cap-radioCard-v2 .radio-card-content,
|
|
13
|
+
.cap-radioCard-v2 .radio-card-header {
|
|
14
14
|
font-size: 0.857rem;
|
|
15
15
|
line-height: 1.17;
|
|
16
16
|
letter-spacing: normal;
|
|
17
17
|
color: #5e6c84;
|
|
18
18
|
padding-top: 0.285rem;
|
|
19
19
|
}
|
|
20
|
-
.
|
|
20
|
+
.cap-radioCard-v2 .radio-card-icon {
|
|
21
21
|
width: 3.429rem;
|
|
22
22
|
height: 3.429rem;
|
|
23
23
|
object-fit: contain;
|
|
24
24
|
margin-right: 1.714rem;
|
|
25
25
|
}
|
|
26
|
-
.
|
|
26
|
+
.cap-radioCard-v2 .radio-card-checked {
|
|
27
27
|
position: absolute;
|
|
28
28
|
right: -0.429rem;
|
|
29
29
|
top: -0.857rem;
|
|
30
30
|
display: none;
|
|
31
31
|
}
|
|
32
|
-
.
|
|
32
|
+
.cap-radioCard-v2 .ant-radio-button-wrapper-checked .radio-card-checked {
|
|
33
33
|
display: block;
|
|
34
34
|
z-index: 1;
|
|
35
35
|
}
|
|
36
|
-
.
|
|
36
|
+
.cap-radioCard-v2 .div-icon {
|
|
37
37
|
position: absolute;
|
|
38
38
|
top: 25%;
|
|
39
39
|
left: 25%;
|
|
40
40
|
}
|
|
41
|
-
.
|
|
41
|
+
.cap-radioCard-v2 .icon-container {
|
|
42
42
|
padding-right: 1.714rem;
|
|
43
43
|
height: 3.429rem;
|
|
44
44
|
width: 3.429rem;
|
|
@@ -49,11 +49,11 @@
|
|
|
49
49
|
border-radius: 1.286rem;
|
|
50
50
|
position: relative;
|
|
51
51
|
}
|
|
52
|
-
.
|
|
52
|
+
.cap-radioCard-v2 .icon-container.green-color {
|
|
53
53
|
background-color: #47af46;
|
|
54
54
|
color: #ffffff;
|
|
55
55
|
}
|
|
56
|
-
.
|
|
56
|
+
.cap-radioCard-v2 .radio-button-wrapper {
|
|
57
57
|
position: relative;
|
|
58
58
|
height: 120px;
|
|
59
59
|
width: 372px;
|
|
@@ -64,60 +64,60 @@
|
|
|
64
64
|
border-top-width: 1px;
|
|
65
65
|
vertical-align: top;
|
|
66
66
|
}
|
|
67
|
-
.
|
|
67
|
+
.cap-radioCard-v2 .disabled-wrapper {
|
|
68
68
|
opacity: 0.5;
|
|
69
69
|
}
|
|
70
|
-
.
|
|
70
|
+
.cap-radioCard-v2 .disabled-wrapper.custom-disable-radio-button {
|
|
71
71
|
border: unset;
|
|
72
72
|
max-height: 5.357rem;
|
|
73
73
|
}
|
|
74
|
-
.
|
|
74
|
+
.cap-radioCard-v2 .disabled-wrapper.custom-disable-radio-button .radio-card-checked {
|
|
75
75
|
display: none;
|
|
76
76
|
}
|
|
77
|
-
.
|
|
77
|
+
.cap-radioCard-v2 .disabled-wrapper.custom-disable-radio-button .ant-card-body {
|
|
78
78
|
padding: unset;
|
|
79
79
|
}
|
|
80
|
-
.
|
|
80
|
+
.cap-radioCard-v2 .custom-disable-radio-button {
|
|
81
81
|
border: unset;
|
|
82
82
|
max-height: 5.357rem;
|
|
83
83
|
}
|
|
84
|
-
.
|
|
84
|
+
.cap-radioCard-v2 .custom-disable-radio-button .ant-card-body {
|
|
85
85
|
padding: unset;
|
|
86
86
|
}
|
|
87
|
-
.
|
|
87
|
+
.cap-radioCard-v2 .ant-card-body {
|
|
88
88
|
display: flex;
|
|
89
89
|
padding: 1.142rem;
|
|
90
90
|
height: 100%;
|
|
91
91
|
position: relative;
|
|
92
92
|
}
|
|
93
|
-
.
|
|
93
|
+
.cap-radioCard-v2 .info-icon-wrapper {
|
|
94
94
|
position: absolute;
|
|
95
95
|
top: 1.142rem;
|
|
96
96
|
right: 1.142rem;
|
|
97
97
|
}
|
|
98
|
-
.
|
|
98
|
+
.cap-radioCard-v2 .ant-card {
|
|
99
99
|
height: 100%;
|
|
100
100
|
border: none;
|
|
101
101
|
}
|
|
102
|
-
.
|
|
102
|
+
.cap-radioCard-v2.smallRadioCard .icon-container {
|
|
103
103
|
padding-right: unset;
|
|
104
104
|
background-color: unset;
|
|
105
105
|
}
|
|
106
|
-
.
|
|
106
|
+
.cap-radioCard-v2.smallRadioCard .radio-card-icon {
|
|
107
107
|
height: 1.428rem;
|
|
108
108
|
width: 1.714rem;
|
|
109
109
|
}
|
|
110
|
-
.
|
|
110
|
+
.cap-radioCard-v2.smallRadioCard .div-icon {
|
|
111
111
|
top: 0%;
|
|
112
112
|
left: 0%;
|
|
113
113
|
}
|
|
114
|
-
.
|
|
114
|
+
.cap-radioCard-v2.smallRadioCard .radio-button-wrapper {
|
|
115
115
|
margin: 0.428rem 0.857rem 0.428rem 0;
|
|
116
116
|
}
|
|
117
|
-
.
|
|
117
|
+
.cap-radioCard-v2.smallRadioCard .radio-button-wrapper:nth-child(3n) {
|
|
118
118
|
margin-right: 0;
|
|
119
119
|
}
|
|
120
|
-
.
|
|
120
|
+
.cap-radioCard-v2.smallRadioCard .ant-card-body {
|
|
121
121
|
padding: 0.857rem;
|
|
122
122
|
height: 48px;
|
|
123
123
|
}
|
|
@@ -1,47 +1,21 @@
|
|
|
1
|
-
import './styles.css';const
|
|
2
|
-
const radioCardContentContainer = "radioCardContentContainer";
|
|
3
|
-
const radioCardContent = "radioCardContent";
|
|
4
|
-
const radioCardHeader = "radioCardHeader";
|
|
5
|
-
const radioCardIcon = "radioCardIcon";
|
|
6
|
-
const radioCardChecked = "radioCardChecked";
|
|
7
|
-
const divIcon = "divIcon";
|
|
8
|
-
const iconContainer = "iconContainer";
|
|
9
|
-
const greenColor = "greenColor";
|
|
10
|
-
const radioButtonWrapper = "radioButtonWrapper";
|
|
11
|
-
const disabledWrapper = "disabledWrapper";
|
|
12
|
-
const customDisableRadioButton = "customDisableRadioButton";
|
|
13
|
-
const infoIconWrapper = "infoIconWrapper";
|
|
14
|
-
const smallRadioCard = "smallRadioCard";
|
|
1
|
+
import './styles.css';const smallRadioCard = "smallRadioCard";
|
|
15
2
|
const styles = {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
3
|
+
"cap-radioCard-v2": "cap-radioCard-v2",
|
|
4
|
+
"radio-card-content-container": "radio-card-content-container",
|
|
5
|
+
"radio-card-content": "radio-card-content",
|
|
6
|
+
"radio-card-header": "radio-card-header",
|
|
7
|
+
"radio-card-icon": "radio-card-icon",
|
|
8
|
+
"radio-card-checked": "radio-card-checked",
|
|
9
|
+
"div-icon": "div-icon",
|
|
10
|
+
"icon-container": "icon-container",
|
|
11
|
+
"green-color": "green-color",
|
|
12
|
+
"radio-button-wrapper": "radio-button-wrapper",
|
|
13
|
+
"disabled-wrapper": "disabled-wrapper",
|
|
14
|
+
"custom-disable-radio-button": "custom-disable-radio-button",
|
|
15
|
+
"info-icon-wrapper": "info-icon-wrapper",
|
|
29
16
|
smallRadioCard
|
|
30
17
|
};
|
|
31
18
|
export {
|
|
32
|
-
capRadioCardV2,
|
|
33
|
-
customDisableRadioButton,
|
|
34
19
|
styles as default,
|
|
35
|
-
disabledWrapper,
|
|
36
|
-
divIcon,
|
|
37
|
-
greenColor,
|
|
38
|
-
iconContainer,
|
|
39
|
-
infoIconWrapper,
|
|
40
|
-
radioButtonWrapper,
|
|
41
|
-
radioCardChecked,
|
|
42
|
-
radioCardContent,
|
|
43
|
-
radioCardContentContainer,
|
|
44
|
-
radioCardHeader,
|
|
45
|
-
radioCardIcon,
|
|
46
20
|
smallRadioCard
|
|
47
21
|
};
|
package/CapRadioCard/styles.scss
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
@import '../styles/_variables.scss';
|
|
2
2
|
|
|
3
|
-
.
|
|
4
|
-
.
|
|
3
|
+
.cap-radioCard-v2 {
|
|
4
|
+
.radio-card-content-container {
|
|
5
5
|
width: 100%;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
.
|
|
9
|
-
.
|
|
8
|
+
.radio-card-content,
|
|
9
|
+
.radio-card-header {
|
|
10
10
|
font-size: $FONT_SIZE_S;
|
|
11
11
|
line-height: 1.17;
|
|
12
12
|
letter-spacing: normal;
|
|
@@ -14,32 +14,32 @@
|
|
|
14
14
|
padding-top: $CAP_SPACE_04;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
.
|
|
17
|
+
.radio-card-icon {
|
|
18
18
|
width: 3.429rem;
|
|
19
19
|
height: 3.429rem;
|
|
20
20
|
object-fit: contain;
|
|
21
21
|
margin-right: $CAP_SPACE_24;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
.
|
|
24
|
+
.radio-card-checked {
|
|
25
25
|
position: absolute;
|
|
26
26
|
right: -0.429rem;
|
|
27
27
|
top: -0.857rem;
|
|
28
28
|
display: none;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
:global(.ant-radio-button-wrapper-checked) .
|
|
31
|
+
:global(.ant-radio-button-wrapper-checked) .radio-card-checked {
|
|
32
32
|
display: block;
|
|
33
33
|
z-index: 1;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
.
|
|
36
|
+
.div-icon {
|
|
37
37
|
position: absolute;
|
|
38
38
|
top: 25%;
|
|
39
39
|
left: 25%;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
.
|
|
42
|
+
.icon-container {
|
|
43
43
|
padding-right: $CAP_SPACE_24;
|
|
44
44
|
height: 3.429rem;
|
|
45
45
|
width: 3.429rem;
|
|
@@ -50,13 +50,13 @@
|
|
|
50
50
|
border-radius: 1.286rem;
|
|
51
51
|
position: relative;
|
|
52
52
|
|
|
53
|
-
&.
|
|
53
|
+
&.green-color {
|
|
54
54
|
background-color: map-get($CAP_PRIMARY, base);
|
|
55
55
|
color: $CAP_WHITE;
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
.
|
|
59
|
+
.radio-button-wrapper {
|
|
60
60
|
position: relative;
|
|
61
61
|
height: 120px;
|
|
62
62
|
width: 372px;
|
|
@@ -68,14 +68,14 @@
|
|
|
68
68
|
vertical-align: top;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
.
|
|
71
|
+
.disabled-wrapper {
|
|
72
72
|
opacity: 0.5;
|
|
73
73
|
|
|
74
|
-
&.
|
|
74
|
+
&.custom-disable-radio-button {
|
|
75
75
|
border: unset;
|
|
76
76
|
max-height: 5.357rem;
|
|
77
77
|
|
|
78
|
-
.
|
|
78
|
+
.radio-card-checked {
|
|
79
79
|
display: none;
|
|
80
80
|
}
|
|
81
81
|
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
.
|
|
88
|
+
.custom-disable-radio-button {
|
|
89
89
|
border: unset;
|
|
90
90
|
max-height: 5.357rem;
|
|
91
91
|
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
position: relative;
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
.
|
|
104
|
+
.info-icon-wrapper {
|
|
105
105
|
position: absolute;
|
|
106
106
|
top: $CAP_SPACE_16;
|
|
107
107
|
right: $CAP_SPACE_16;
|
|
@@ -113,22 +113,22 @@
|
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
&.smallRadioCard {
|
|
116
|
-
.
|
|
116
|
+
.icon-container {
|
|
117
117
|
padding-right: unset;
|
|
118
118
|
background-color: unset;
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
-
.
|
|
121
|
+
.radio-card-icon {
|
|
122
122
|
height: $CAP_SPACE_20;
|
|
123
123
|
width: $CAP_SPACE_24;
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
-
.
|
|
126
|
+
.div-icon {
|
|
127
127
|
top: 0%;
|
|
128
128
|
left: 0%;
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
-
.
|
|
131
|
+
.radio-button-wrapper {
|
|
132
132
|
margin: $CAP_SPACE_06 $CAP_SPACE_12 $CAP_SPACE_06 0;
|
|
133
133
|
|
|
134
134
|
&:nth-child(3n) {
|
package/CapRadioCard/types.d.ts
CHANGED
|
@@ -20,6 +20,26 @@ export interface CapRadioCardPane {
|
|
|
20
20
|
}
|
|
21
21
|
export interface CapRadioCardProps extends Omit<React.ComponentProps<typeof Radio.Group>, 'size'> {
|
|
22
22
|
className?: string;
|
|
23
|
+
/** Root (RadioGroup) */
|
|
24
|
+
rootClassName?: string;
|
|
25
|
+
/** RadioButton wrapper */
|
|
26
|
+
radioButtonWrapperClassName?: string;
|
|
27
|
+
/** Checked icon */
|
|
28
|
+
checkedIconClassName?: string;
|
|
29
|
+
/** Icon wrapper div */
|
|
30
|
+
iconWrapperClassName?: string;
|
|
31
|
+
/** Icon container div */
|
|
32
|
+
iconContainerClassName?: string;
|
|
33
|
+
/** Div wrapping icon content */
|
|
34
|
+
divIconClassName?: string;
|
|
35
|
+
/** Content container */
|
|
36
|
+
contentContainerClassName?: string;
|
|
37
|
+
/** Header div */
|
|
38
|
+
headerClassName?: string;
|
|
39
|
+
/** Content div */
|
|
40
|
+
contentClassName?: string;
|
|
41
|
+
/** Info icon wrapper */
|
|
42
|
+
infoIconWrapperClassName?: string;
|
|
23
43
|
panes?: CapRadioCardPane[];
|
|
24
44
|
cardHeight?: number | string;
|
|
25
45
|
cardWidth?: number | string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../components/CapRadioCard/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAClC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,YAAY,CAAC,EAAE;QACb,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;QACxB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACxB,CAAC;IACF,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,KAAK,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAC/F,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAChC;AAGD,MAAM,MAAM,uBAAuB,GAAG,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../components/CapRadioCard/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAClC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,YAAY,CAAC,EAAE;QACb,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;QACxB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACxB,CAAC;IACF,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,KAAK,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAC/F,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wBAAwB;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,0BAA0B;IAC1B,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC,mBAAmB;IACnB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,uBAAuB;IACvB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,yBAAyB;IACzB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,gCAAgC;IAChC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,wBAAwB;IACxB,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,iBAAiB;IACjB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,kBAAkB;IAClB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,wBAAwB;IACxB,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,KAAK,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAChC;AAGD,MAAM,MAAM,uBAAuB,GAAG,gBAAgB,CAAC"}
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
*
|
|
5
5
|
*/
|
|
6
6
|
import React from 'react';
|
|
7
|
-
|
|
7
|
+
import { WrappedComponentProps } from 'react-intl';
|
|
8
|
+
import type { CapStaticTemplatesProps } from './types';
|
|
9
|
+
declare const _default: React.FC<Omit<CapStaticTemplatesProps, keyof WrappedComponentProps>>;
|
|
8
10
|
export default _default;
|
|
9
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../components/CapStaticTemplates/index.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,KAA4B,MAAM,OAAO,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../components/CapStaticTemplates/index.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,KAA4B,MAAM,OAAO,CAAC;AACjD,OAAO,EAAc,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAsB/D,OAAO,KAAK,EAAE,uBAAuB,EAA0B,MAAM,SAAS,CAAC;wBAwYnB,KAAK,CAAC,EAAE,CAClE,IAAI,CAAC,uBAAuB,EAAE,MAAM,qBAAqB,CAAC,CAC3D;AAFD,wBAEE"}
|