@capillarytech/blaze-ui 6.1.1 → 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.
Files changed (81) hide show
  1. package/.npmrc +3 -0
  2. package/CapCustomCheckboxList/styles.css +3 -3
  3. package/CapCustomCheckboxList/styles.scss +7 -8
  4. package/CapMobileDatePicker/index.d.ts +14 -3
  5. package/CapMobileDatePicker/index.d.ts.map +1 -1
  6. package/CapMobileDatePicker/index.js +20 -28
  7. package/CapMobileDatePicker/styles.css +11 -28
  8. package/CapMobileDatePicker/styles.scss +16 -37
  9. package/CapPopoverTree/index.d.ts +40 -3
  10. package/CapPopoverTree/index.d.ts.map +1 -1
  11. package/CapPopoverTree/index.js +82 -72
  12. package/CapPopoverTree/style.d.ts +1 -5
  13. package/CapPopoverTree/style.d.ts.map +1 -1
  14. package/CapPopoverTree/styles.css +18 -119
  15. package/CapPopoverTree/styles.scss +31 -179
  16. package/CapProductSelection/index.d.ts +7 -29
  17. package/CapProductSelection/index.d.ts.map +1 -1
  18. package/CapProductSelection/index.js +52 -89
  19. package/CapProductSelection/messages.d.ts +76 -0
  20. package/CapProductSelection/messages.d.ts.map +1 -0
  21. package/CapProductSelection/messages.js +79 -0
  22. package/CapProductSelection/styles.css +81 -0
  23. package/CapProductSelection/styles.module.scss.js +8 -0
  24. package/CapProductSelection/styles.scss +82 -40
  25. package/CapProductSelection/tests/CapProductSelection.mockData.d.ts +36 -0
  26. package/CapProductSelection/tests/CapProductSelection.mockData.d.ts.map +1 -0
  27. package/CapProductSelection/types.d.ts +34 -0
  28. package/CapProductSelection/types.d.ts.map +1 -0
  29. package/CapRadioCard/index.d.ts.map +1 -1
  30. package/CapRadioCard/index.js +52 -20
  31. package/CapRadioCard/styles.css +25 -25
  32. package/CapRadioCard/styles.module.scss.js +14 -40
  33. package/CapRadioCard/styles.scss +20 -20
  34. package/CapRadioCard/types.d.ts +20 -0
  35. package/CapRadioCard/types.d.ts.map +1 -1
  36. package/CapSelectFilter/index.d.ts.map +1 -1
  37. package/CapSelectFilter/index.js +10 -11
  38. package/CapSelectFilter/styles.css +11 -10
  39. package/CapSelectFilter/styles.module.scss.js +8 -10
  40. package/CapSelectFilter/styles.scss +11 -8
  41. package/CapSelectFilter/types.d.ts +1 -1
  42. package/CapSelectFilter/types.d.ts.map +1 -1
  43. package/CapStaticTemplates/index.d.ts +3 -1
  44. package/CapStaticTemplates/index.d.ts.map +1 -1
  45. package/CapStaticTemplates/index.js +185 -144
  46. package/CapStaticTemplates/messages.d.ts +32 -0
  47. package/CapStaticTemplates/messages.d.ts.map +1 -0
  48. package/CapStaticTemplates/messages.js +35 -0
  49. package/CapStaticTemplates/styles.css +220 -0
  50. package/CapStaticTemplates/styles.module.scss.js +55 -0
  51. package/CapStaticTemplates/styles.scss +291 -0
  52. package/CapStaticTemplates/tests/CapStaticTemplates.mockData.d.ts +54 -0
  53. package/CapStaticTemplates/tests/CapStaticTemplates.mockData.d.ts.map +1 -0
  54. package/CapStaticTemplates/types.d.ts +97 -0
  55. package/CapStaticTemplates/types.d.ts.map +1 -0
  56. package/index.d.ts +4 -4
  57. package/index.d.ts.map +1 -1
  58. package/index.js +56 -56
  59. package/package.json +1 -1
  60. package/styles/_variables.scss +2 -0
  61. package/utils/dayjs.d.ts +0 -1
  62. package/utils/dayjs.d.ts.map +1 -1
  63. package/utils/dayjs.js +0 -1
  64. package/CapMobileDatePicker/styles.module.scss.js +0 -10
  65. package/CapMobileDatePicker/tests/CapMobileDatePicker.mockData.d.ts +0 -41
  66. package/CapMobileDatePicker/tests/CapMobileDatePicker.mockData.d.ts.map +0 -1
  67. package/CapMobileDatePicker/types.d.ts +0 -17
  68. package/CapMobileDatePicker/types.d.ts.map +0 -1
  69. package/CapPopoverTree/styles.module.scss.js +0 -26
  70. package/CapPopoverTree/tests/CapPopoverTree.mockData.d.ts +0 -22
  71. package/CapPopoverTree/tests/CapPopoverTree.mockData.d.ts.map +0 -1
  72. package/CapPopoverTree/types.d.ts +0 -62
  73. package/CapPopoverTree/types.d.ts.map +0 -1
  74. package/CapProductSelection/style.d.ts +0 -3
  75. package/CapProductSelection/style.d.ts.map +0 -1
  76. package/CapProductSelection/style.js +0 -38
  77. package/CapStaticTemplates/style.d.ts +0 -13
  78. package/CapStaticTemplates/style.d.ts.map +0 -1
  79. package/CapStaticTemplates/style.js +0 -216
  80. /package/{CapMobileDatePicker → CapProductSelection}/types.js +0 -0
  81. /package/{CapPopoverTree → CapStaticTemplates}/types.js +0 -0
@@ -0,0 +1,76 @@
1
+ declare const _default: {
2
+ lineItem: {
3
+ id: string;
4
+ defaultMessage: string;
5
+ };
6
+ selectAttribute: {
7
+ id: string;
8
+ defaultMessage: string;
9
+ };
10
+ brand: {
11
+ id: string;
12
+ defaultMessage: string;
13
+ };
14
+ brandInfo: {
15
+ id: string;
16
+ defaultMessage: string;
17
+ };
18
+ category: {
19
+ id: string;
20
+ defaultMessage: string;
21
+ };
22
+ categoryInfo: {
23
+ id: string;
24
+ defaultMessage: string;
25
+ };
26
+ product: {
27
+ id: string;
28
+ defaultMessage: string;
29
+ };
30
+ productInfo: {
31
+ id: string;
32
+ defaultMessage: string;
33
+ };
34
+ SKU: {
35
+ id: string;
36
+ defaultMessage: string;
37
+ };
38
+ uploadSKU: {
39
+ id: string;
40
+ defaultMessage: string;
41
+ };
42
+ uploadSKUInfo: {
43
+ id: string;
44
+ defaultMessage: string;
45
+ };
46
+ changeSelection: {
47
+ id: string;
48
+ defaultMessage: string;
49
+ };
50
+ description: {
51
+ id: string;
52
+ defaultMessage: string;
53
+ };
54
+ okText: {
55
+ id: string;
56
+ defaultMessage: string;
57
+ };
58
+ cancelText: {
59
+ id: string;
60
+ defaultMessage: string;
61
+ };
62
+ comingSoon: {
63
+ id: string;
64
+ defaultMessage: string;
65
+ };
66
+ selectValues: {
67
+ id: string;
68
+ defaultMessage: string;
69
+ };
70
+ atleast1Attribute: {
71
+ id: string;
72
+ defaultMessage: string;
73
+ };
74
+ };
75
+ export default _default;
76
+ //# sourceMappingURL=messages.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../components/CapProductSelection/messages.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,wBA0EG"}
@@ -0,0 +1,79 @@
1
+ import { defineMessages } from "react-intl";
2
+ const scope = "blaze.components.CapProductSelection";
3
+ const messages = defineMessages({
4
+ lineItem: {
5
+ id: `${scope}.lineItem`,
6
+ defaultMessage: "Line items"
7
+ },
8
+ selectAttribute: {
9
+ id: `${scope}.selectAttribute`,
10
+ defaultMessage: "Select Attribute"
11
+ },
12
+ brand: {
13
+ id: `${scope}.brand`,
14
+ defaultMessage: "Brand"
15
+ },
16
+ brandInfo: {
17
+ id: `${scope}.brandInfo`,
18
+ defaultMessage: "Brand"
19
+ },
20
+ category: {
21
+ id: `${scope}.category`,
22
+ defaultMessage: "Category"
23
+ },
24
+ categoryInfo: {
25
+ id: `${scope}.categoryInfo`,
26
+ defaultMessage: "Category"
27
+ },
28
+ product: {
29
+ id: `${scope}.product`,
30
+ defaultMessage: "Product"
31
+ },
32
+ productInfo: {
33
+ id: `${scope}.productInfo`,
34
+ defaultMessage: "Product"
35
+ },
36
+ SKU: {
37
+ id: `${scope}.SKU`,
38
+ defaultMessage: "SKU"
39
+ },
40
+ uploadSKU: {
41
+ id: `${scope}.uploadSKU`,
42
+ defaultMessage: "Upload SKU"
43
+ },
44
+ uploadSKUInfo: {
45
+ id: `${scope}.uploadSKUInfo`,
46
+ defaultMessage: "Upload SKU"
47
+ },
48
+ changeSelection: {
49
+ id: `${scope}.changeSelection`,
50
+ defaultMessage: "Change the selection"
51
+ },
52
+ description: {
53
+ id: `${scope}.description`,
54
+ defaultMessage: "Changing the attribute of additional condition will result in lose of previously defined additional condition"
55
+ },
56
+ okText: {
57
+ id: `${scope}.okText`,
58
+ defaultMessage: "Yes, change"
59
+ },
60
+ cancelText: {
61
+ id: `${scope}.cancelText`,
62
+ defaultMessage: "Cancel"
63
+ },
64
+ comingSoon: {
65
+ id: `${scope}.comingSoon`,
66
+ defaultMessage: "Coming soon"
67
+ },
68
+ selectValues: {
69
+ id: `${scope}.selectValues`,
70
+ defaultMessage: "Select value(s)"
71
+ },
72
+ atleast1Attribute: {
73
+ id: `${scope}.atleast1Attribute`,
74
+ defaultMessage: "At least 1 attribute is required"
75
+ }
76
+ });
77
+ export {
78
+ messages as default
79
+ };
@@ -0,0 +1,81 @@
1
+ /* Color Palette */
2
+ /* Fonts */
3
+ /* Backward Compatibility Aliases */
4
+ /* Component Heights */
5
+ /* Border Radius */
6
+ /* Border Width */
7
+ /* Transition */
8
+ /* Timezones Footer */
9
+ .changeSelectionCard {
10
+ position: absolute;
11
+ top: 2.857rem;
12
+ left: 0.857rem;
13
+ width: 21.428rem;
14
+ }
15
+ .changeSelectionCard .card-title {
16
+ font-size: 1rem;
17
+ line-height: 1.714rem;
18
+ padding-bottom: 0.857rem;
19
+ padding-top: 0.571rem;
20
+ }
21
+ .changeSelectionCard .card-description {
22
+ font-size: 0.857rem;
23
+ }
24
+ .changeSelectionCard .card-buttons {
25
+ padding-top: 1.142rem;
26
+ }
27
+ .changeSelectionCard .card-buttons-primary {
28
+ margin-right: 0.857rem;
29
+ }
30
+ .ant-popover.cap-product-selection-v2.greyed .ant-popover-arrow {
31
+ border-top-color: #f4f5f7;
32
+ border-left-color: #f4f5f7;
33
+ }
34
+ .ant-popover.cap-product-selection-v2.greyed .ant-popover-container {
35
+ background-color: #f4f5f7;
36
+ }
37
+ .ant-popover.cap-product-selection-v2 .ant-popover-container {
38
+ padding: 0;
39
+ }
40
+ .ant-popover.cap-product-selection-v2 .ant-tree {
41
+ background-color: inherit;
42
+ }
43
+ .ant-popover.cap-product-selection-v2 .ant-tree .ant-tree-list {
44
+ padding: 0.5rem 0;
45
+ }
46
+ .ant-popover.cap-product-selection-v2 .ant-tree li ul {
47
+ padding-left: 2.143rem;
48
+ }
49
+ .ant-popover.cap-product-selection-v2 .ant-popover-content {
50
+ width: 23.143rem;
51
+ padding: 0;
52
+ min-height: 12.571rem;
53
+ font-size: 1rem;
54
+ line-height: 1.428rem;
55
+ color: #091e42;
56
+ }
57
+ .ant-popover.cap-product-selection-v2 .divider {
58
+ border-top: 0.071rem solid #dfe2e7;
59
+ }
60
+ .ant-popover.cap-product-selection-v2 .empty-data-text {
61
+ text-align: center;
62
+ margin-top: 0.857rem;
63
+ padding: 0.714rem 0;
64
+ }
65
+ .ant-popover.cap-product-selection-v2 .ant-popover-content {
66
+ padding: 0 0.285rem 0.857rem 0.285rem;
67
+ }
68
+ .ant-popover.cap-product-selection-v2 .ant-tree-child-tree > li:first-child {
69
+ margin-top: 0.285rem;
70
+ }
71
+ .ant-popover.cap-product-selection-v2 .ant-tree-treenode-switcher-open, .ant-popover.cap-product-selection-v2 .ant-tree-treenode-switcher-close {
72
+ position: relative;
73
+ }
74
+ .ant-popover.cap-product-selection-v2 .ant-tree-treenode-switcher-open .info-tooltip, .ant-popover.cap-product-selection-v2 .ant-tree-treenode-switcher-close .info-tooltip {
75
+ position: absolute;
76
+ right: 0.714rem;
77
+ top: 0.428rem;
78
+ }
79
+ .ant-popover.cap-product-selection-v2 .tree-node-title .cap-radio-v2 .ant-radio-wrapper .title {
80
+ font-weight: normal !important;
81
+ }
@@ -0,0 +1,8 @@
1
+ import './styles.css';const changeSelectionCard = "changeSelectionCard";
2
+ const styles = {
3
+ changeSelectionCard
4
+ };
5
+ export {
6
+ changeSelectionCard,
7
+ styles as default
8
+ };
@@ -2,55 +2,97 @@
2
2
 
3
3
  $popoverTree: cap-product-selection-v2;
4
4
 
5
- .ant-popover.#{$popoverTree} {
6
- &.greyed {
7
- .ant-popover-arrow {
8
- border-top-color: $CAP_G09;
9
- border-left-color: $CAP_G09;
10
- }
11
- .ant-popover-inner {
12
- background-color: $CAP_G09;
13
- }
5
+ // Change-selection modal card (replaces StyledCapCard from style.ts)
6
+ .changeSelectionCard {
7
+ position: absolute;
8
+ top: $CAP_SPACE_40;
9
+ left: $CAP_SPACE_12;
10
+ width: 21.428rem; // 300px
11
+ .card-title {
12
+ font-size: $FONT_SIZE_M;
13
+ line-height: $CAP_SPACE_24;
14
+ padding-bottom: $CAP_SPACE_12;
15
+ padding-top: $CAP_SPACE_08;
16
+ }
17
+ .card-description {
18
+ font-size: $FONT_SIZE_S;
14
19
  }
15
- .ant-tree li ul {
16
- padding-left: 30px;
20
+ .card-buttons {
21
+ padding-top: $CAP_SPACE_16;
17
22
  }
18
- .ant-popover-content {
19
- width: 324px;
23
+ .card-buttons-primary {
24
+ margin-right: $CAP_SPACE_12;
25
+ }
26
+ }
27
+
28
+ // OVERRIDE: CapProductSelection uses a single global class for the popover overlay (cap-product-selection-v2).
29
+ // Antd Popover does not expose tokens for content width, inner padding, or greyed state; layout is component-specific.
30
+ :global {
31
+ .ant-popover.#{$popoverTree} {
32
+ &.greyed {
33
+ .ant-popover-arrow {
34
+ border-top-color: $CAP_G09;
35
+ border-left-color: $CAP_G09;
36
+ }
37
+ .ant-popover-container {
38
+ background-color: $CAP_G09;
39
+ }
40
+ }
41
+ .ant-popover-container {
20
42
  padding: 0;
21
- min-height: 176px;
22
- font-size: 14px;
23
- line-height: 20px;
43
+ }
44
+ // OVERRIDE: Tree indentation not exposed as design token
45
+ .ant-tree {
46
+ background-color: inherit;
47
+ .ant-tree-list {
48
+ padding: 0.5rem 0; // 7px
49
+ }
50
+ }
51
+ .ant-tree li ul {
52
+ padding-left: 2.143rem; // 30px
53
+ }
54
+ // OVERRIDE: Content dimensions and typography are component-specific; no token for popover content width
55
+ .ant-popover-content {
56
+ width: 23.143rem; // 324px
57
+ padding: 0;
58
+ min-height: 12.571rem; // 176px
59
+ font-size: $FONT_SIZE_M;
60
+ line-height: $CAP_SPACE_20;
24
61
  color: $CAP_G01;
25
- }
62
+ }
26
63
 
27
- .divider {
28
- border-top: 1px solid $CAP_G07;
29
- }
30
- .empty-data-text {
64
+ .divider {
65
+ border-top: $border-width-1 solid $CAP_G07;
66
+ }
67
+ .empty-data-text {
31
68
  text-align: center;
32
- margin-top: 12px;
33
- padding: 10px 0;
34
- }
35
- .ant-popover-inner-content {
36
- padding: 0 4px 12px 4px;
37
- }
69
+ margin-top: $CAP_SPACE_12;
70
+ padding: 0.714rem 0; // 10px
71
+ }
72
+ // OVERRIDE: Inner content padding is layout-specific
73
+ .ant-popover-content {
74
+ padding: 0 $CAP_SPACE_04 $CAP_SPACE_12 $CAP_SPACE_04;
75
+ }
38
76
 
39
- .ant-tree-child-tree > li:first-child {
40
- margin-top: 4px;
41
- }
77
+ // OVERRIDE: Tree node spacing not tokenized
78
+ .ant-tree-child-tree > li:first-child {
79
+ margin-top: $CAP_SPACE_04;
80
+ }
42
81
 
43
- .ant-tree-treenode-switcher-open{
44
- position: relative;
45
- .info-tooltip {
46
- position: absolute;
47
- right: 10px;
48
- top: 6px;
82
+ // OVERRIDE: Info tooltip position in tree node is custom layout
83
+ .ant-tree-treenode-switcher-open, .ant-tree-treenode-switcher-close {
84
+ position: relative;
85
+ .info-tooltip {
86
+ position: absolute;
87
+ right: 0.714rem; // 10px
88
+ top: $CAP_SPACE_06;
89
+ }
49
90
  }
50
- }
51
- .tree-node-title {
52
- .cap-radio-v2 .ant-radio-wrapper .title {
91
+ // OVERRIDE: Radio title font-weight in tree context; no token for nested radio in tree
92
+ .tree-node-title {
93
+ .cap-radio-v2 .ant-radio-wrapper .title {
53
94
  font-weight: normal !important;
95
+ }
54
96
  }
55
97
  }
56
- }
98
+ }
@@ -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"}
@@ -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,6CAyEtC;IAEF,MAAM;CAmCP;AAED,eAAe,YAAY,CAAC"}
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"}
@@ -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 { cardHeight, cardWidth, selected, defaultValue, size } = this.props;
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["radioButtonWrapper"],
64
+ styles["radio-button-wrapper"],
50
65
  {
51
- [styles["customDisableRadioButton"]]: customDisableClass,
52
- [styles["disabledWrapper"]]: disabled
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(CapIcon, { type: "check-filled", className: styles["radioCardChecked"] }),
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["radioCardIcon"], children: /* @__PURE__ */ jsx(
82
+ icon && /* @__PURE__ */ jsx("div", { className: classNames(styles["radio-card-icon"], iconWrapperClassName), children: /* @__PURE__ */ jsx(
61
83
  "div",
62
84
  {
63
- className: classNames(styles["iconContainer"], {
64
- [styles["greenColor"]]: isChecked && !isSmall && !disabled
65
- }),
66
- children: /* @__PURE__ */ jsx("div", { className: styles["divIcon"], children: icon })
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("div", { className: styles["radioCardContentContainer"], children: [
70
- /* @__PURE__ */ jsx("div", { className: styles["radioCardHeader"], children: /* @__PURE__ */ jsx(CapHeadingWithStatic, { type: "h4", className: classNames(titleClassName), children: title }) }),
71
- /* @__PURE__ */ jsxs("div", { className: styles["radioCardContent"], children: [
72
- " ",
73
- content
74
- ] })
75
- ] }),
76
- infoIconDescription && /* @__PURE__ */ jsx("div", { className: styles["infoIconWrapper"], children: /* @__PURE__ */ jsx(CapTooltipWithInfo, { title: infoIconDescription }) }),
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["capRadioCardV2"],
133
+ styles["cap-radioCard-v2"],
102
134
  {
103
135
  [styles["smallRadioCard"]]: size === "small"
104
136
  },