@unbxd-ui/unbxd-react-components 0.3.2 → 0.3.3-beta.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 (83) hide show
  1. package/assets/desktop.svg +6 -0
  2. package/assets/map-pin.svg +6 -0
  3. package/assets/p1.svg +20 -0
  4. package/assets/p2.svg +22 -0
  5. package/assets/p3.svg +19 -0
  6. package/assets/p4.svg +22 -0
  7. package/assets/p5.svg +23 -0
  8. package/components/Accordian/accordianCore.scss +8 -0
  9. package/components/Accordian/accordianTheme.scss +6 -0
  10. package/components/Button/button.css +1 -0
  11. package/components/Button/buttonTheme.scss +94 -0
  12. package/components/Form/Checkbox.js +4 -3
  13. package/components/Form/Dropdown.js +82 -10
  14. package/components/Form/Input.js +11 -3
  15. package/components/Form/SearchableDropdown.js +22 -15
  16. package/components/Form/SelectedPills.js +128 -0
  17. package/components/Form/SummarySelection.js +46 -0
  18. package/components/Form/Textarea.js +13 -3
  19. package/components/Form/form.css +1 -0
  20. package/components/Form/formCore.css +1 -1
  21. package/components/Form/formCore.scss +713 -0
  22. package/components/Form/formTheme.scss +33 -0
  23. package/components/Form/stories/Dropdown.stories.js +249 -2
  24. package/components/Form/stories/SearchableDropdown.stories.js +173 -3
  25. package/components/Form/stories/ServerPaginatedDropdown.stories.js +166 -94
  26. package/components/Form/summarySelection.css +1 -0
  27. package/components/Form/summarySelection.scss +106 -0
  28. package/components/Form/variables.scss +116 -0
  29. package/components/InlineModal/inlineModal.css +1 -0
  30. package/components/InlineModal/inlineModalCore.scss +40 -0
  31. package/components/InlineModal/inlineModalTheme.scss +16 -0
  32. package/components/Link/linkCore.scss +66 -0
  33. package/components/Link/linkTheme.scss +79 -0
  34. package/components/List/list.css +1 -0
  35. package/components/List/listCore.scss +6 -0
  36. package/components/List/listTheme.scss +0 -0
  37. package/components/MetricCard/MetricCard.css +1 -0
  38. package/components/MetricCard/MetricCard.js +77 -0
  39. package/components/MetricCard/MetricCard.scss +120 -0
  40. package/components/MetricCard/MetriicCard.stories.js +192 -0
  41. package/components/MetricCard/index.js +9 -0
  42. package/components/Modal/modal.css +1 -0
  43. package/components/Modal/modalCore.scss +58 -0
  44. package/components/Modal/modalTheme.scss +0 -0
  45. package/components/NoDataPlaceholder/noDataPlaceholderCore.scss +33 -0
  46. package/components/NotificationComponent/notificationComponent.css +1 -0
  47. package/components/NotificationComponent/notificationTheme.scss +38 -0
  48. package/components/PIDItemComponent/PIDItemComponent.js +83 -0
  49. package/components/PIDItemComponent/PIDItemComponent.stories.js +175 -0
  50. package/components/PIDItemComponent/PIDItemComponentCore.css +1 -0
  51. package/components/PIDItemComponent/PIDItemComponentCore.scss +37 -0
  52. package/components/PIDItemComponent/index.js +9 -0
  53. package/components/PageLoader/pageLoaderCore.scss +34 -0
  54. package/components/ProgressBar/ProgressBar.scss +0 -0
  55. package/components/ProgressBar/progressBar.css +0 -0
  56. package/components/ProgressBar/progressBarCore.scss +22 -0
  57. package/components/ProgressBar/progressBarTheme.scss +0 -0
  58. package/components/Table/tableCore.scss +547 -0
  59. package/components/Table/tableTheme.scss +34 -0
  60. package/components/TabsComponent/tabs.css +1 -0
  61. package/components/TabsComponent/tabsCore.scss +59 -0
  62. package/components/TabsComponent/tabsTheme.scss +0 -0
  63. package/components/ToastNotification/toastNotificationCore.scss +273 -0
  64. package/components/Tooltip/tooltipCore.scss +207 -0
  65. package/components/Tooltip/tooltipTheme.scss +20 -0
  66. package/components/UIDItemComponent/UIDItemComponent.js +145 -0
  67. package/components/UIDItemComponent/UIDItemComponent.stories.js +51 -0
  68. package/components/UIDItemComponent/UIDItemComponentCore.css +1 -0
  69. package/components/UIDItemComponent/UIDItemComponentCore.scss +57 -0
  70. package/components/UIDItemComponent/index.js +9 -0
  71. package/components/common/common.scss +14 -0
  72. package/components/core.css +3 -2
  73. package/components/core.scss +13 -10
  74. package/components/index.js +32 -11
  75. package/components/theme.css +3 -2
  76. package/components/theme.scss +2 -1
  77. package/core/icon.js +17 -0
  78. package/core/index.js +14 -0
  79. package/core/lazyLoadImage.js +56 -0
  80. package/core/selection.json +1 -0
  81. package/core/utils.js +6 -1
  82. package/index.js +30 -0
  83. package/package.json +10 -5
@@ -0,0 +1,79 @@
1
+ /**
2
+ Theme styles for Link component - visual appearance and branding
3
+ **/
4
+
5
+ .RCB-link {
6
+ // Primary appearance (default link styling)
7
+ &-primary {
8
+ color: #3e71f2;
9
+
10
+ &:hover {
11
+ color: #3865d9;
12
+ }
13
+
14
+ &:active {
15
+ color: #3e71f2;
16
+ }
17
+
18
+ &:visited {
19
+ color: #6f42c1;
20
+ }
21
+ }
22
+
23
+ // Secondary appearance
24
+ &-secondary {
25
+ color: #6c757d;
26
+ text-decoration: none;
27
+
28
+ &:hover {
29
+ color: #495057;
30
+ text-decoration: underline;
31
+ }
32
+
33
+ &:active {
34
+ color: #343a40;
35
+ }
36
+ }
37
+
38
+ // Danger appearance
39
+ &-danger {
40
+ color: #dc3545;
41
+ text-decoration: none;
42
+
43
+ &:hover {
44
+ color: #c82333;
45
+ text-decoration: underline;
46
+ }
47
+
48
+ &:active {
49
+ color: #bd2130;
50
+ }
51
+ }
52
+
53
+ // Success appearance
54
+ &-success {
55
+ color: #28a745;
56
+ text-decoration: none;
57
+
58
+ &:hover {
59
+ color: #218838;
60
+ text-decoration: underline;
61
+ }
62
+
63
+ &:active {
64
+ color: #1e7e34;
65
+ }
66
+ }
67
+
68
+ // External link styling
69
+ &-external {
70
+ .RCB-link-external-icon {
71
+ color: currentColor;
72
+ opacity: 0.7;
73
+ }
74
+
75
+ &:hover .RCB-link-external-icon {
76
+ opacity: 1;
77
+ }
78
+ }
79
+ }
@@ -0,0 +1 @@
1
+ .RCB-list{margin:0;padding:0}
@@ -0,0 +1,6 @@
1
+ .RCB {
2
+ &-list {
3
+ margin: 0;
4
+ padding: 0;
5
+ }
6
+ }
File without changes
@@ -0,0 +1 @@
1
+ .RCB-metric-card-wrapper{display:flex;gap:16px;margin-bottom:32px}.RCB-metric-card-wrapper .RCB-metric-card-item{flex:1;border-radius:12px;padding:10px;position:relative;overflow:hidden;transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;background:#fff;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border:1px solid #e1e7ef;animation:slide-up 0.5s ease-out;width:52px;height:fit-content}.RCB-metric-card-wrapper .RCB-metric-card-item:hover{box-shadow:0 10px 15px -3px rgba(0,0,0,0.1),0 4px 6px -2px rgba(0,0,0,0.05)}.RCB-metric-card-wrapper .RCB-metric-card-item .RCB-metric-data{position:relative;z-index:10;display:flex;align-items:center;gap:10px}.RCB-metric-card-wrapper .RCB-metric-card-item .RCB-metric-data .RCB-metric-title-icon{flex:0.2}.RCB-metric-card-wrapper .RCB-metric-card-item .RCB-metric-data .RCB-metric-title-icon .RCB-metric-title-icon-inner{width:35px;aspect-ratio:1;padding:8px;border-radius:12px;display:flex;align-items:center;justify-content:center}.RCB-metric-card-wrapper .RCB-metric-card-item .RCB-metric-data .RCB-metric-data-value-container{flex:1;display:flex;flex-direction:column;gap:4px}.RCB-metric-card-wrapper .RCB-metric-card-item .RCB-metric-data .RCB-metric-data-value-container .RCB-metric-title-container{display:flex;align-items:center;justify-content:space-between}.RCB-metric-card-wrapper .RCB-metric-card-item .RCB-metric-data .RCB-metric-data-value-container .RCB-metric-title-container .RCB-metric-title-text{font-size:0.875rem;line-height:1.25rem;color:#65758b}.RCB-metric-card-wrapper .RCB-metric-card-item .RCB-metric-data .RCB-metric-data-value-container .RCB-metric-title-container .RCB-metric-compare-text{display:flex;align-items:center;gap:4px;padding:2px 8px;border-radius:9999px;font-size:0.75rem;line-height:1rem;font-weight:500}.RCB-metric-card-wrapper .RCB-metric-card-item .RCB-metric-data .RCB-metric-data-value-container .RCB-metric-title-container .RCB-metric-compare-text.positive{background-color:#dcfce7;color:#15803d}.RCB-metric-card-wrapper .RCB-metric-card-item .RCB-metric-data .RCB-metric-data-value-container .RCB-metric-title-container .RCB-metric-compare-text.negative{background-color:#fee2e2;color:#b91c1c}.RCB-metric-card-wrapper .RCB-metric-card-item .RCB-metric-data .RCB-metric-data-value-container .RCB-metric-value-text{font-size:1.125rem;line-height:1.75rem;font-weight:700;color:#0f1729;letter-spacing:-0.025em}.RCB-metric-card-wrapper .RCB-metric-card-item .RCB-bottom-right-circle{position:absolute;right:-16px;bottom:-16px;width:80px;height:80px;border-radius:50%;opacity:0.1;background-color:var(--decorative-color, #06b6d4)}@keyframes slide-up{from{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = MetricCard;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _icon = _interopRequireDefault(require("../../core/icon"));
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
10
+ function MetricCard(props) {
11
+ var _props$metricConfigs = props.metricConfigs,
12
+ metricConfigs = _props$metricConfigs === void 0 ? [] : _props$metricConfigs,
13
+ _props$className = props.className,
14
+ className = _props$className === void 0 ? '' : _props$className;
15
+ return /*#__PURE__*/_react["default"].createElement("div", {
16
+ className: "RCB-metric-card-wrapper ".concat(className)
17
+ }, metricConfigs.map(function () {
18
+ var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
19
+ _ref$id = _ref.id,
20
+ id = _ref$id === void 0 ? '' : _ref$id,
21
+ _ref$name = _ref.name,
22
+ name = _ref$name === void 0 ? '' : _ref$name,
23
+ _ref$value = _ref.value,
24
+ value = _ref$value === void 0 ? '' : _ref$value,
25
+ _ref$icon = _ref.icon,
26
+ icon = _ref$icon === void 0 ? '' : _ref$icon,
27
+ _ref$iconBgColor = _ref.iconBgColor,
28
+ iconBgColor = _ref$iconBgColor === void 0 ? '#ccc' : _ref$iconBgColor,
29
+ _ref$iconColor = _ref.iconColor,
30
+ iconColor = _ref$iconColor === void 0 ? 'white' : _ref$iconColor,
31
+ _ref$hasDiff = _ref.hasDiff,
32
+ hasDiff = _ref$hasDiff === void 0 ? false : _ref$hasDiff,
33
+ _ref$comparePercentag = _ref.comparePercentage,
34
+ comparePercentage = _ref$comparePercentag === void 0 ? 0 : _ref$comparePercentag,
35
+ _ref$className = _ref.className,
36
+ cardClassName = _ref$className === void 0 ? '' : _ref$className,
37
+ _ref$diffPosition = _ref.diffPosition,
38
+ diffPosition = _ref$diffPosition === void 0 ? 'top' : _ref$diffPosition;
39
+ return /*#__PURE__*/_react["default"].createElement("div", {
40
+ className: "RCB-metric-card-item ".concat(cardClassName),
41
+ key: id
42
+ }, /*#__PURE__*/_react["default"].createElement("div", {
43
+ className: "RCB-metric-data"
44
+ }, /*#__PURE__*/_react["default"].createElement("div", {
45
+ className: "RCB-metric-title-icon"
46
+ }, /*#__PURE__*/_react["default"].createElement("div", {
47
+ className: "RCB-metric-title-icon-inner",
48
+ style: {
49
+ backgroundColor: iconBgColor
50
+ }
51
+ }, /*#__PURE__*/_react["default"].createElement(_icon["default"], {
52
+ icon: icon,
53
+ size: "20px",
54
+ color: iconColor
55
+ }))), /*#__PURE__*/_react["default"].createElement("div", {
56
+ className: "RCB-metric-data-value-container"
57
+ }, /*#__PURE__*/_react["default"].createElement("div", {
58
+ className: "RCB-metric-title-container"
59
+ }, /*#__PURE__*/_react["default"].createElement("div", {
60
+ className: "RCB-metric-title-text"
61
+ }, " ", name, " "), hasDiff && diffPosition === 'top' ? /*#__PURE__*/_react["default"].createElement("div", {
62
+ className: "RCB-metric-compare-text ".concat(comparePercentage < 0 ? 'negative' : 'positive')
63
+ }, /*#__PURE__*/_react["default"].createElement(_icon["default"], {
64
+ icon: comparePercentage < 0 ? 'arrow-down' : 'arrow-up',
65
+ size: "12px"
66
+ }), Math.abs(comparePercentage) + '%') : null), /*#__PURE__*/_react["default"].createElement("div", {
67
+ className: "RCB-metric-title-container"
68
+ }, /*#__PURE__*/_react["default"].createElement("div", {
69
+ className: "RCB-metric-value-text"
70
+ }, value), hasDiff && diffPosition === 'bottom' ? /*#__PURE__*/_react["default"].createElement("div", {
71
+ className: "RCB-metric-compare-text ".concat(comparePercentage < 0 ? 'negative' : 'positive')
72
+ }, /*#__PURE__*/_react["default"].createElement(_icon["default"], {
73
+ icon: comparePercentage < 0 ? 'arrow-down' : 'arrow-up',
74
+ size: "12px"
75
+ }), Math.abs(comparePercentage) + '%') : null))));
76
+ }));
77
+ }
@@ -0,0 +1,120 @@
1
+ .RCB-metric-card-wrapper {
2
+ display: flex;
3
+ gap: 16px;
4
+ margin-bottom: 32px;
5
+
6
+ .RCB-metric-card-item {
7
+ flex: 1;
8
+ border-radius: 12px;
9
+ padding: 10px;
10
+ position: relative;
11
+ overflow: hidden;
12
+ transition-property: all;
13
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
14
+ transition-duration: 150ms;
15
+ background: hsl(0, 0%, 100%);
16
+ backdrop-filter: blur(10px);
17
+ -webkit-backdrop-filter: blur(10px);
18
+ border: 1px solid hsl(214, 32%, 91%);
19
+ animation: slide-up 0.5s ease-out;
20
+ width: 52px;
21
+ height: fit-content;
22
+
23
+ &:hover {
24
+ box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
25
+ 0 4px 6px -2px rgba(0, 0, 0, 0.05);
26
+ }
27
+
28
+ .RCB-metric-data {
29
+ position: relative;
30
+ z-index: 10;
31
+ display: flex;
32
+ align-items: center;
33
+ gap: 10px;
34
+
35
+ .RCB-metric-title-icon {
36
+ flex: 0.2;
37
+
38
+ .RCB-metric-title-icon-inner {
39
+ width: 35px;
40
+ aspect-ratio: 1;
41
+ padding: 8px;
42
+ border-radius: 12px;
43
+ display: flex;
44
+ align-items: center;
45
+ justify-content: center;
46
+ }
47
+ }
48
+
49
+ .RCB-metric-data-value-container {
50
+ flex: 1;
51
+ display: flex;
52
+ flex-direction: column;
53
+ gap: 4px;
54
+
55
+ .RCB-metric-title-container {
56
+ display: flex;
57
+ align-items: center;
58
+ justify-content: space-between;
59
+
60
+ .RCB-metric-title-text {
61
+ font-size: 0.875rem;
62
+ line-height: 1.25rem;
63
+ color: hsl(215, 16%, 47%);
64
+ }
65
+
66
+ .RCB-metric-compare-text {
67
+ display: flex;
68
+ align-items: center;
69
+ gap: 4px;
70
+ padding: 2px 8px;
71
+ border-radius: 9999px;
72
+ font-size: 0.75rem;
73
+ line-height: 1rem;
74
+ font-weight: 500;
75
+
76
+ &.positive {
77
+ background-color: #dcfce7;
78
+ color: #15803d;
79
+ }
80
+
81
+ &.negative {
82
+ background-color: #fee2e2;
83
+ color: #b91c1c;
84
+ }
85
+ }
86
+ }
87
+
88
+ .RCB-metric-value-text {
89
+ font-size: 1.125rem;
90
+ line-height: 1.75rem;
91
+ font-weight: 700;
92
+ color: #0f1729;
93
+ letter-spacing: -0.025em;
94
+ }
95
+ }
96
+ }
97
+
98
+ .RCB-bottom-right-circle {
99
+ position: absolute;
100
+ right: -16px;
101
+ bottom: -16px;
102
+ width: 80px;
103
+ height: 80px;
104
+ border-radius: 50%;
105
+ opacity: 0.1;
106
+ background-color: var(--decorative-color, rgb(6, 182, 212));
107
+ }
108
+ }
109
+
110
+ @keyframes slide-up {
111
+ from {
112
+ opacity: 0;
113
+ transform: translateY(20px);
114
+ }
115
+ to {
116
+ opacity: 1;
117
+ transform: translateY(0);
118
+ }
119
+ }
120
+ }
@@ -0,0 +1,192 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = exports.WithDifferencePercentage = exports.WithCustomClassNames = exports.Default = void 0;
7
+ var _MetricCard = _interopRequireDefault(require("./MetricCard"));
8
+ require("./MetricCard.css");
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
10
+ var meta = {
11
+ title: 'Components/MetricCard',
12
+ component: _MetricCard["default"],
13
+ parameters: {
14
+ layout: 'padded',
15
+ docs: {
16
+ description: {
17
+ component: 'MetricCard displays key metrics in a grid layout.'
18
+ }
19
+ }
20
+ },
21
+ tags: ['autodocs'],
22
+ argTypes: {
23
+ className: {
24
+ description: 'Optional CSS class name for the parent wrapper element',
25
+ control: 'text'
26
+ },
27
+ metricConfigs: {
28
+ description: 'Array of metric configuration objects with id, name, value, icon, iconBgColor, iconColor, and optional className properties',
29
+ control: 'object'
30
+ }
31
+ }
32
+ };
33
+ var _default = exports["default"] = meta; // Sample metric data
34
+ var sampleMetrics = [{
35
+ icon: 'preview',
36
+ iconBgColor: 'rgba(67, 56, 202, 0.15)',
37
+ iconColor: 'rgba(67, 56, 202, 1)',
38
+ id: 'impressions',
39
+ name: 'Impressions',
40
+ value: '120,588,028'
41
+ }, {
42
+ icon: 'click-rate',
43
+ iconBgColor: 'rgba(124, 62, 173, 0.15)',
44
+ iconColor: 'rgba(124, 62, 173, 1)',
45
+ id: 'clicks',
46
+ name: 'Clicks',
47
+ value: '120'
48
+ }, {
49
+ icon: 'cart-rate',
50
+ iconBgColor: 'rgba(14, 116, 144, 0.15)',
51
+ iconColor: 'rgba(14, 116, 144, 1)',
52
+ id: 'carts',
53
+ name: 'Carts',
54
+ value: '120'
55
+ }, {
56
+ icon: 'package',
57
+ iconBgColor: 'rgba(29, 78, 216, 0.15)',
58
+ iconColor: 'rgba(29, 78, 216, 1)',
59
+ id: 'orders',
60
+ name: 'Orders',
61
+ value: '120'
62
+ }, {
63
+ icon: 'trending-up',
64
+ iconBgColor: 'rgba(162, 28, 175, 0.15)',
65
+ iconColor: 'rgba(162, 28, 175, 1)',
66
+ id: 'conversion-rate',
67
+ name: 'Conversion Rate',
68
+ value: '90%'
69
+ }, {
70
+ icon: 'revenue',
71
+ iconBgColor: 'rgba(0, 153, 102, 0.15)',
72
+ iconColor: 'rgba(0, 153, 102, 1)',
73
+ id: 'revenue',
74
+ name: 'Revenue',
75
+ value: '$91320'
76
+ }];
77
+
78
+ // Sample metric data with difference percentages
79
+ var metricsWithDiff = [{
80
+ icon: 'preview',
81
+ iconBgColor: 'rgba(67, 56, 202, 0.15)',
82
+ iconColor: 'rgba(67, 56, 202, 1)',
83
+ id: 'impressions',
84
+ name: 'Impressions',
85
+ value: '120,588,028',
86
+ hasDiff: true,
87
+ comparePercentage: 10,
88
+ diffPosition: 'top'
89
+ }, {
90
+ icon: 'click-rate',
91
+ iconBgColor: 'rgba(124, 62, 173, 0.15)',
92
+ iconColor: 'rgba(124, 62, 173, 1)',
93
+ id: 'clicks',
94
+ name: 'Clicks',
95
+ value: '120',
96
+ hasDiff: true,
97
+ comparePercentage: 10,
98
+ diffPosition: 'top'
99
+ }, {
100
+ icon: 'cart-rate',
101
+ iconBgColor: 'rgba(14, 116, 144, 0.15)',
102
+ iconColor: 'rgba(14, 116, 144, 1)',
103
+ id: 'carts',
104
+ name: 'Carts',
105
+ value: '120',
106
+ hasDiff: true,
107
+ comparePercentage: -10,
108
+ diffPosition: 'top'
109
+ }, {
110
+ icon: 'trending-up',
111
+ iconBgColor: 'rgba(162, 28, 175, 0.15)',
112
+ iconColor: 'rgba(162, 28, 175, 1)',
113
+ id: 'conversion-rate',
114
+ name: 'Conv Rate',
115
+ value: '90%',
116
+ hasDiff: true,
117
+ comparePercentage: -10,
118
+ diffPosition: 'top'
119
+ }, {
120
+ icon: 'revenue',
121
+ iconBgColor: 'rgba(0, 153, 102, 0.15)',
122
+ iconColor: 'rgba(0, 153, 102, 1)',
123
+ id: 'revenue',
124
+ name: 'Revenue',
125
+ value: '$91320',
126
+ hasDiff: true,
127
+ comparePercentage: 10,
128
+ diffPosition: 'bottom'
129
+ }];
130
+
131
+ // Default Story
132
+ var Default = exports.Default = {
133
+ args: {
134
+ metricConfigs: sampleMetrics
135
+ }
136
+ };
137
+
138
+ // Story with difference percentages
139
+ var WithDifferencePercentage = exports.WithDifferencePercentage = {
140
+ args: {
141
+ metricConfigs: metricsWithDiff
142
+ }
143
+ };
144
+
145
+ // Story with custom classNames
146
+ var WithCustomClassNames = exports.WithCustomClassNames = {
147
+ args: {
148
+ className: 'custom-metric-wrapper',
149
+ metricConfigs: [{
150
+ icon: 'preview',
151
+ iconBgColor: 'rgba(67, 56, 202, 0.15)',
152
+ iconColor: 'rgba(67, 56, 202, 1)',
153
+ id: 'impressions',
154
+ name: 'Impressions',
155
+ value: '120,588,028',
156
+ className: 'highlighted-card'
157
+ }, {
158
+ icon: 'click-rate',
159
+ iconBgColor: 'rgba(124, 62, 173, 0.15)',
160
+ iconColor: 'rgba(124, 62, 173, 1)',
161
+ id: 'clicks',
162
+ name: 'Clicks',
163
+ value: '120',
164
+ className: 'primary-metric'
165
+ }, {
166
+ icon: 'cart-rate',
167
+ iconBgColor: 'rgba(14, 116, 144, 0.15)',
168
+ iconColor: 'rgba(14, 116, 144, 1)',
169
+ id: 'carts',
170
+ name: 'Add to Carts',
171
+ value: '120'
172
+ }, {
173
+ icon: 'revenue',
174
+ iconBgColor: 'rgba(0, 153, 102, 0.15)',
175
+ iconColor: 'rgba(0, 153, 102, 1)',
176
+ id: 'revenue',
177
+ name: 'Revenue',
178
+ value: '$91320',
179
+ className: 'revenue-card'
180
+ }]
181
+ },
182
+ parameters: {
183
+ docs: {
184
+ description: {
185
+ story: "This story demonstrates the flexibility of adding custom CSS classes:\n\n**Parent className**: Add custom styles to the wrapper with the `className` prop\n**Individual card className**: Each metric config can have its own `className` property for card-specific styles\n\nExample usage:\n```jsx\n<MetricCard\n className=\"custom-metric-wrapper\"\n metricConfigs={[\n {\n id: 1,\n name: 'Impressions',\n value: '20M',\n icon: 'preview',\n iconBgColor: 'rgba(67, 56, 202, 0.15)',\n className: 'highlighted-card'\n }\n ]}\n/>\n```\n\n**Important Note on CSS Specificity:**\nTo override default styles, use either:\n1. Higher specificity selectors: `.RCB-metric-card-wrapper .your-class { }`\n2. The `!important` flag for specific properties\n\n```css\n/* Option 1: Higher specificity (recommended) */\n.RCB-metric-card-wrapper .highlighted-card {\n border: 2px solid gold;\n box-shadow: 0 4px 12px rgba(250, 204, 21, 0.3);\n}\n\n/* Option 2: Using !important */\n.highlighted-card {\n border: 2px solid gold !important;\n box-shadow: 0 4px 12px rgba(250, 204, 21, 0.3) !important;\n}\n```\n\nCustom styles applied in this example:\n- `.highlighted-card` - Gold border with shadow (Impressions)\n- `.primary-metric` - Reordered first with blue shadow (Clicks)\n- `.revenue-card` - Gradient background with green border (Revenue)\n "
186
+ }
187
+ }
188
+ },
189
+ render: function render(args) {
190
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(_MetricCard["default"], args), /*#__PURE__*/React.createElement("style", null, "\n .custom-metric-wrapper {\n flex-wrap: wrap;\n gap: 24px;\n }\n\n /* Use higher specificity to override default styles */\n .RCB-metric-card-wrapper .highlighted-card {\n border: 2px solid rgb(250, 204, 21) !important;\n box-shadow: 0 4px 12px rgba(250, 204, 21, 0.3) !important;\n }\n\n .RCB-metric-card-wrapper .primary-metric {\n order: -1;\n box-shadow: 0 8px 16px rgba(59, 130, 246, 0.2) !important;\n }\n\n .RCB-metric-card-wrapper .revenue-card {\n background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%) !important;\n border: 2px solid rgb(16, 185, 129) !important;\n }\n "));
191
+ }
192
+ };
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _MetricCard = _interopRequireDefault(require("./MetricCard"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
9
+ var _default = exports["default"] = _MetricCard["default"];
@@ -0,0 +1 @@
1
+ .RCB-modal{position:absolute;top:0;width:100%;height:100%;background:rgba(0,0,0,0.8);display:flex;justify-content:center;align-items:center}.RCB-modal-body{background:#FFF;padding:20px}.RCB-modal-header{display:flex;margin-bottom:10px}.RCB-modal-title{flex:1}.RCB-modal-close{cursor:pointer}
@@ -0,0 +1,58 @@
1
+ .RCB {
2
+ &-modal {
3
+ position: fixed;
4
+ top: 0;
5
+ width: 100%;
6
+ height: 100%;
7
+ background: rgba(0, 0, 0, 0.6);
8
+ display: flex;
9
+ justify-content: center;
10
+ align-items: center;
11
+ z-index: 2;
12
+
13
+ .modal-footer {
14
+ padding: 24px 24px;
15
+ margin: 20px -24px 0px;
16
+ border-radius: 0 0 8px 8px;
17
+ text-align: right;
18
+
19
+ .RCB-btn {
20
+ margin-right: 14px;
21
+
22
+ &:last-child {
23
+ margin-right: 0;
24
+ }
25
+ }
26
+ }
27
+ }
28
+
29
+ &-modal-body {
30
+ background: #FFF;
31
+ border-radius: 8px;
32
+ padding: 0px;
33
+ }
34
+
35
+ &-modal-header {
36
+ display: flex;
37
+ margin-bottom: 0px;
38
+ padding: 24px 24px 10px;
39
+ }
40
+
41
+ &-modal-title {
42
+ flex: 1;
43
+ font-size: 18px;
44
+ font-weight: 700;
45
+ line-height: normal;
46
+ }
47
+
48
+ &-modal-close {
49
+ cursor: pointer;
50
+ &:before {
51
+ content: "X";
52
+ }
53
+ }
54
+
55
+ &-modal-content {
56
+ padding: 24px 24px 0px;
57
+ }
58
+ }
File without changes
@@ -0,0 +1,33 @@
1
+ .RCB-no-data-placeholder {
2
+ display: flex;
3
+ flex-direction: column;
4
+ align-items: center;
5
+ justify-content: center;
6
+ padding: 40px 20px;
7
+ text-align: center;
8
+ }
9
+
10
+ .RCB-no-data-image {
11
+ margin-bottom: 16px;
12
+ }
13
+
14
+ .RCB-no-data-image img {
15
+ max-width: 120px;
16
+ max-height: 120px;
17
+ object-fit: contain;
18
+ }
19
+
20
+ .RCB-no-data-title {
21
+ font-size: 18px;
22
+ font-weight: 600;
23
+ color: #333;
24
+ margin-bottom: 8px;
25
+ }
26
+
27
+ .RCB-no-data-description {
28
+ font-size: 14px;
29
+ color: #666;
30
+ line-height: 1.5;
31
+ }
32
+
33
+
@@ -0,0 +1 @@
1
+ .RCB-notif{padding:10px}.RCB-notif-success{color:#129274;border:1px solid #2cb292;background-color:#b7d2cb}.RCB-notif-error{color:#d25b5b;border:solid 1px #e75190;background-color:#fff9fc}.RCB-notif-warning{color:#445870;border:solid 1px #f09c0a;background-color:#fffaf2}.RCB-notif-info{color:#509DB9;border:solid 1px #509DB9;background-color:#DFF6FF}
@@ -0,0 +1,38 @@
1
+ .RCB {
2
+ &-notif {
3
+ padding: 10px;
4
+ border-radius: 3px;
5
+
6
+ &-success {
7
+ color: #6DB886;
8
+ border: solid 1px #6DB886;
9
+ background-color: #DEF9E7;
10
+ }
11
+
12
+ &-error {
13
+ color: #CA4646;
14
+ border: solid 1px #CA4646;
15
+ background-color: #FFE4E4;
16
+ ;
17
+ }
18
+
19
+ &-warning {
20
+ color: #D5A555;
21
+ border: solid 1px #D5A555;
22
+ background-color: #FFF8EC;
23
+ }
24
+
25
+ &-info {
26
+ color: #3E71F2;
27
+ border: solid 1px #3E71F2;
28
+ background-color: #E7EDFF;
29
+ }
30
+ }
31
+ }
32
+
33
+ .notif-wrapper{
34
+ flex: 1;
35
+ display: flex;
36
+ align-items: center;
37
+ justify-content: space-between;
38
+ }