@unbxd-ui/unbxd-react-components 0.3.1 → 0.3.2-beta.10
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/assets/desktop.svg +6 -0
- package/assets/map-pin.svg +6 -0
- package/assets/p1.svg +20 -0
- package/assets/p2.svg +22 -0
- package/assets/p3.svg +19 -0
- package/assets/p4.svg +22 -0
- package/assets/p5.svg +23 -0
- package/components/Accordian/accordianCore.scss +8 -0
- package/components/Accordian/accordianTheme.scss +6 -0
- package/components/Button/button.css +1 -0
- package/components/Button/buttonTheme.scss +94 -0
- package/components/Form/Dropdown.js +77 -10
- package/components/Form/Input.js +11 -3
- package/components/Form/SearchableDropdown.js +22 -15
- package/components/Form/SelectedPills.js +128 -0
- package/components/Form/SummarySelection.js +46 -0
- package/components/Form/Textarea.js +13 -3
- package/components/Form/form.css +1 -0
- package/components/Form/formCore.css +1 -1
- package/components/Form/formCore.scss +713 -0
- package/components/Form/formTheme.scss +33 -0
- package/components/Form/stories/Dropdown.stories.js +242 -2
- package/components/Form/stories/SearchableDropdown.stories.js +173 -3
- package/components/Form/stories/ServerPaginatedDropdown.stories.js +166 -94
- package/components/Form/summarySelection.css +1 -0
- package/components/Form/summarySelection.scss +106 -0
- package/components/Form/variables.scss +116 -0
- package/components/InlineModal/inlineModal.css +1 -0
- package/components/InlineModal/inlineModalCore.scss +40 -0
- package/components/InlineModal/inlineModalTheme.scss +16 -0
- package/components/Link/linkCore.css +1 -1
- package/components/Link/linkCore.scss +66 -0
- package/components/Link/linkTheme.scss +79 -0
- package/components/List/list.css +1 -0
- package/components/List/listCore.scss +6 -0
- package/components/List/listTheme.scss +0 -0
- package/components/MetricCard/MetricCard.css +1 -0
- package/components/MetricCard/MetricCard.js +65 -0
- package/components/MetricCard/MetricCard.scss +118 -0
- package/components/MetricCard/MetriicCard.stories.js +131 -0
- package/components/MetricCard/index.js +9 -0
- package/components/Modal/modal.css +1 -0
- package/components/Modal/modalCore.scss +58 -0
- package/components/Modal/modalTheme.scss +0 -0
- package/components/NoDataPlaceholder/noDataPlaceholderCore.scss +33 -0
- package/components/NotificationComponent/notificationComponent.css +1 -0
- package/components/NotificationComponent/notificationTheme.scss +38 -0
- package/components/PIDItemComponent/PIDItemComponent.js +82 -0
- package/components/PIDItemComponent/PIDItemComponent.stories.js +175 -0
- package/components/PIDItemComponent/PIDItemComponentCore.css +1 -0
- package/components/PIDItemComponent/PIDItemComponentCore.scss +36 -0
- package/components/PIDItemComponent/index.js +9 -0
- package/components/PageLoader/pageLoaderCore.scss +34 -0
- package/components/ProgressBar/ProgressBar.scss +0 -0
- package/components/ProgressBar/progressBar.css +0 -0
- package/components/ProgressBar/progressBarCore.scss +22 -0
- package/components/ProgressBar/progressBarTheme.scss +0 -0
- package/components/Table/tableCore.scss +547 -0
- package/components/Table/tableTheme.scss +34 -0
- package/components/TabsComponent/tabs.css +1 -0
- package/components/TabsComponent/tabsCore.scss +59 -0
- package/components/TabsComponent/tabsTheme.scss +0 -0
- package/components/ToastNotification/toastNotificationCore.scss +273 -0
- package/components/Tooltip/tooltipCore.scss +207 -0
- package/components/Tooltip/tooltipTheme.scss +20 -0
- package/components/UIDItemComponent/UIDItemComponent.js +148 -0
- package/components/UIDItemComponent/UIDItemComponent.stories.js +51 -0
- package/components/UIDItemComponent/UIDItemComponentCore.css +1 -0
- package/components/UIDItemComponent/UIDItemComponentCore.scss +57 -0
- package/components/UIDItemComponent/index.js +9 -0
- package/components/common/common.scss +14 -0
- package/components/core.css +3 -2
- package/components/core.scss +13 -10
- package/components/index.js +32 -11
- package/components/theme.css +3 -2
- package/components/theme.scss +2 -1
- package/core/icon.js +17 -0
- package/core/index.js +14 -0
- package/core/lazyLoadImage.js +56 -0
- package/core/selection.json +1 -0
- package/core/utils.js +6 -1
- package/index.js +60 -0
- package/package.json +9 -4
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = exports.WithoutTitle = exports.WithDefaultImage = exports.WithArrayImage = exports.MultipleProducts = exports.LongTitle = exports.Default = exports.CustomKeyMapping = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _PIDItemComponent = _interopRequireDefault(require("./PIDItemComponent"));
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
11
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
13
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
14
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
15
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
16
|
+
var meta = {
|
|
17
|
+
title: 'Components/PIDItemComponent',
|
|
18
|
+
component: _PIDItemComponent["default"],
|
|
19
|
+
parameters: {
|
|
20
|
+
layout: 'centered'
|
|
21
|
+
},
|
|
22
|
+
tags: ['autodocs'],
|
|
23
|
+
argTypes: {
|
|
24
|
+
props: {
|
|
25
|
+
description: 'Props object containing itemData and keysMap configuration'
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
var _default = exports["default"] = meta;
|
|
30
|
+
var Default = exports.Default = {
|
|
31
|
+
args: {
|
|
32
|
+
props: {
|
|
33
|
+
itemData: {
|
|
34
|
+
uniqueId: 'PROD-12345',
|
|
35
|
+
imageUrl: 'https://images.unsplash.com/photo-1505740420928-5e560c06d30e?w=300',
|
|
36
|
+
title: 'Premium Wireless Headphones with Noise Cancellation'
|
|
37
|
+
},
|
|
38
|
+
keysMap: {
|
|
39
|
+
uniqueIdMap: 'uniqueId',
|
|
40
|
+
imageUrlMap: 'imageUrl',
|
|
41
|
+
titleMap: 'title'
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
var WithArrayImage = exports.WithArrayImage = {
|
|
47
|
+
args: {
|
|
48
|
+
props: {
|
|
49
|
+
itemData: {
|
|
50
|
+
uniqueId: 'PROD-67890',
|
|
51
|
+
imageUrl: ['https://images.unsplash.com/photo-1523275335684-37898b6baf30?w=300', 'https://images.unsplash.com/photo-1505740420928-5e560c06d30e?w=300'],
|
|
52
|
+
title: 'Smartwatch with Fitness Tracking'
|
|
53
|
+
},
|
|
54
|
+
keysMap: {
|
|
55
|
+
uniqueIdMap: 'uniqueId',
|
|
56
|
+
imageUrlMap: 'imageUrl',
|
|
57
|
+
titleMap: 'title'
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
var WithDefaultImage = exports.WithDefaultImage = {
|
|
63
|
+
args: {
|
|
64
|
+
props: {
|
|
65
|
+
itemData: {
|
|
66
|
+
uniqueId: 'PROD-11111',
|
|
67
|
+
imageUrl: '',
|
|
68
|
+
title: 'Product Without Image'
|
|
69
|
+
},
|
|
70
|
+
keysMap: {
|
|
71
|
+
uniqueIdMap: 'uniqueId',
|
|
72
|
+
imageUrlMap: 'imageUrl',
|
|
73
|
+
titleMap: 'title'
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
var WithoutTitle = exports.WithoutTitle = {
|
|
79
|
+
args: {
|
|
80
|
+
props: {
|
|
81
|
+
itemData: {
|
|
82
|
+
uniqueId: 'PROD-22222',
|
|
83
|
+
imageUrl: 'https://images.unsplash.com/photo-1526170375885-4d8ecf77b99f?w=300',
|
|
84
|
+
title: ''
|
|
85
|
+
},
|
|
86
|
+
keysMap: {
|
|
87
|
+
uniqueIdMap: 'uniqueId',
|
|
88
|
+
imageUrlMap: 'imageUrl',
|
|
89
|
+
titleMap: 'title'
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
var LongTitle = exports.LongTitle = {
|
|
95
|
+
args: {
|
|
96
|
+
props: {
|
|
97
|
+
itemData: {
|
|
98
|
+
uniqueId: 'PROD-99999',
|
|
99
|
+
imageUrl: 'https://images.unsplash.com/photo-1572635196237-14b3f281503f?w=300',
|
|
100
|
+
title: 'This is a very long product title that should be clipped or truncated to fit within the available space without breaking the layout'
|
|
101
|
+
},
|
|
102
|
+
keysMap: {
|
|
103
|
+
uniqueIdMap: 'uniqueId',
|
|
104
|
+
imageUrlMap: 'imageUrl',
|
|
105
|
+
titleMap: 'title'
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
var CustomKeyMapping = exports.CustomKeyMapping = {
|
|
111
|
+
args: {
|
|
112
|
+
props: {
|
|
113
|
+
itemData: {
|
|
114
|
+
product_id: 'CUSTOM-001',
|
|
115
|
+
product_image: 'https://images.unsplash.com/photo-1560343090-f0409e92791a?w=300',
|
|
116
|
+
product_name: 'Laptop with Custom Key Mapping'
|
|
117
|
+
},
|
|
118
|
+
keysMap: {
|
|
119
|
+
uniqueIdMap: 'product_id',
|
|
120
|
+
imageUrlMap: 'product_image',
|
|
121
|
+
titleMap: 'product_name'
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
var MultipleProducts = exports.MultipleProducts = {
|
|
127
|
+
render: function render() {
|
|
128
|
+
var products = [{
|
|
129
|
+
itemData: {
|
|
130
|
+
uniqueId: 'PROD-001',
|
|
131
|
+
imageUrl: 'https://images.unsplash.com/photo-1505740420928-5e560c06d30e?w=300',
|
|
132
|
+
title: 'Premium Wireless Headphones'
|
|
133
|
+
}
|
|
134
|
+
}, {
|
|
135
|
+
itemData: {
|
|
136
|
+
uniqueId: 'PROD-002',
|
|
137
|
+
imageUrl: 'https://images.unsplash.com/photo-1523275335684-37898b6baf30?w=300',
|
|
138
|
+
title: 'Smart Watch'
|
|
139
|
+
}
|
|
140
|
+
}, {
|
|
141
|
+
itemData: {
|
|
142
|
+
uniqueId: 'PROD-003',
|
|
143
|
+
imageUrl: 'https://images.unsplash.com/photo-1572635196237-14b3f281503f?w=300',
|
|
144
|
+
title: 'Professional Camera'
|
|
145
|
+
}
|
|
146
|
+
}, {
|
|
147
|
+
itemData: {
|
|
148
|
+
uniqueId: 'PROD-004',
|
|
149
|
+
imageUrl: 'https://images.unsplash.com/photo-1560343090-f0409e92791a?w=300',
|
|
150
|
+
title: 'Gaming Laptop'
|
|
151
|
+
}
|
|
152
|
+
}];
|
|
153
|
+
var keysMap = {
|
|
154
|
+
uniqueIdMap: 'uniqueId',
|
|
155
|
+
imageUrlMap: 'imageUrl',
|
|
156
|
+
titleMap: 'title'
|
|
157
|
+
};
|
|
158
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
159
|
+
style: {
|
|
160
|
+
display: 'flex',
|
|
161
|
+
flexDirection: 'column',
|
|
162
|
+
width: '300px',
|
|
163
|
+
border: '1px solid #ddd',
|
|
164
|
+
borderRadius: '8px'
|
|
165
|
+
}
|
|
166
|
+
}, products.map(function (product, index) {
|
|
167
|
+
return /*#__PURE__*/_react["default"].createElement(_PIDItemComponent["default"], {
|
|
168
|
+
key: index,
|
|
169
|
+
props: _objectSpread(_objectSpread({}, product), {}, {
|
|
170
|
+
keysMap: keysMap
|
|
171
|
+
})
|
|
172
|
+
});
|
|
173
|
+
}));
|
|
174
|
+
}
|
|
175
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.RCB-pid-dd-item{display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;cursor:pointer;padding-bottom:8px;padding-left:13px;padding-top:8px;width:100%}.RCB-pid-dd-item .RCB-pid-product-image{height:35px;margin-right:5px;-o-object-fit:contain;object-fit:contain;width:30px}.RCB-pid-dd-item .RCB-title{font-size:12px;font-weight:600;-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.RCB-pid-dd-item .RCB-pid-id{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:240px;text-transform:none;font-size:12px}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
.RCB-pid-dd-item {
|
|
2
|
+
display: flex;
|
|
3
|
+
-webkit-box-align: center;
|
|
4
|
+
-ms-flex-align: center;
|
|
5
|
+
align-items: center;
|
|
6
|
+
cursor: pointer;
|
|
7
|
+
padding-bottom: 8px;
|
|
8
|
+
padding-left: 13px;
|
|
9
|
+
padding-top: 8px;
|
|
10
|
+
width: 100%;
|
|
11
|
+
|
|
12
|
+
.RCB-pid-product-image {
|
|
13
|
+
height: 35px;
|
|
14
|
+
margin-right: 5px;
|
|
15
|
+
-o-object-fit: contain;
|
|
16
|
+
object-fit: contain;
|
|
17
|
+
width: 30px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.RCB-title {
|
|
21
|
+
font-size: 12px;
|
|
22
|
+
font-weight: 600;
|
|
23
|
+
-webkit-line-clamp: 2;
|
|
24
|
+
-webkit-box-orient: vertical;
|
|
25
|
+
display: -webkit-box;
|
|
26
|
+
overflow: hidden;
|
|
27
|
+
}
|
|
28
|
+
.RCB-pid-id {
|
|
29
|
+
overflow: hidden;
|
|
30
|
+
text-overflow: ellipsis;
|
|
31
|
+
white-space: nowrap;
|
|
32
|
+
max-width: 240px;
|
|
33
|
+
text-transform: none;
|
|
34
|
+
font-size: 12px;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _PIDItemComponent = _interopRequireDefault(require("./PIDItemComponent"));
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
|
+
var _default = exports["default"] = _PIDItemComponent["default"];
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
.page-loader {
|
|
2
|
+
width: 100%;
|
|
3
|
+
height: fit-content;
|
|
4
|
+
display: flex;
|
|
5
|
+
justify-content: center;
|
|
6
|
+
align-items: center;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.loader-wrapper {
|
|
10
|
+
text-align: center;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.loader-header {
|
|
14
|
+
color: #17173A;
|
|
15
|
+
font-weight: 600;
|
|
16
|
+
font-size: 16px;
|
|
17
|
+
margin-top: 15px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.loader-messages {
|
|
21
|
+
color: #6F6F8D;
|
|
22
|
+
margin-top: 5px;
|
|
23
|
+
font-weight: 400;
|
|
24
|
+
font-size: 14px;
|
|
25
|
+
transition: opacity 0.4s ease-in-out;
|
|
26
|
+
|
|
27
|
+
&.fade-in {
|
|
28
|
+
opacity: 1;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&.fade-out {
|
|
32
|
+
opacity: 0;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
.RCB {
|
|
2
|
+
&-progress-bar {
|
|
3
|
+
width: 100%;
|
|
4
|
+
position: relative;
|
|
5
|
+
background: #ccc;
|
|
6
|
+
|
|
7
|
+
&.custom-warning {
|
|
8
|
+
background: #FFCF5C;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
&.custom-error {
|
|
12
|
+
background: #F05C5C;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&-progress-value {
|
|
17
|
+
height: 100%;
|
|
18
|
+
position: absolute;
|
|
19
|
+
top: 0;
|
|
20
|
+
background: #3d9565;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
File without changes
|