@capillarytech/blaze-ui 0.1.6-alpha.35 → 0.1.6-alpha.37

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.
@@ -1,361 +0,0 @@
1
- "use strict";
2
-
3
- exports.__esModule = true;
4
- exports.default = void 0;
5
- var _react = _interopRequireWildcard(require("react"));
6
- var _propTypes = _interopRequireDefault(require("prop-types"));
7
- var _classnames = _interopRequireDefault(require("classnames"));
8
- var _antd = require("antd");
9
- var _styledComponents = _interopRequireDefault(require("styled-components"));
10
- var _upload = _interopRequireDefault(require("../assets/upload.svg"));
11
- var _icons = require("@ant-design/icons");
12
- var _withStyles = _interopRequireDefault(require("../../utils/withStyles"));
13
- var _styles = require("./styles");
14
- var _jsxRuntime = require("react/jsx-runtime");
15
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
16
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
17
- const CapUnifiedSelect = _ref => {
18
- let {
19
- type,
20
- options = [],
21
- value,
22
- onChange,
23
- placeholder = 'Select an option',
24
- className,
25
- style,
26
- isError = false,
27
- errorMessage,
28
- popupClassName,
29
- allowClear = false,
30
- headerLabel,
31
- tooltip,
32
- bylineText,
33
- disabled = false,
34
- showUpload = false,
35
- customPopupRender = true,
36
- showSearch = true,
37
- searchBasedOn = 'label',
38
- onConfirm,
39
- onCancel,
40
- ...rest
41
- } = _ref;
42
- const StyledTreeSelect = (0, _styledComponents.default)(_antd.TreeSelect).withConfig({
43
- displayName: "StyledTreeSelect",
44
- componentId: "sc-wsphu8-0"
45
- })(["", ""], _styles.selectStyles);
46
- const [searchText, setSearchText] = (0, _react.useState)('');
47
- const [tempValue, setTempValue] = (0, _react.useState)(value);
48
- const [allSelected, setAllSelected] = (0, _react.useState)(false);
49
- (0, _react.useEffect)(() => {
50
- setTempValue(value);
51
- }, [value]);
52
- const treeSelectVirtualizationProps = {
53
- listHeight: 256,
54
- listItemHeight: 32
55
- };
56
- const NoResult = () => (0, _jsxRuntime.jsxs)("div", {
57
- style: {
58
- display: 'flex',
59
- flexDirection: 'column',
60
- alignItems: 'center',
61
- justifyContent: 'center',
62
- height: 200,
63
- color: '#8c8c8c',
64
- fontSize: 14
65
- },
66
- children: [(0, _jsxRuntime.jsx)(_icons.WarningFilled, {
67
- style: {
68
- fontSize: 36,
69
- marginBottom: 8,
70
- color: '#bfbfbf'
71
- }
72
- }), (0, _jsxRuntime.jsx)("div", {
73
- style: {
74
- fontWeight: 500
75
- },
76
- children: "No results found"
77
- })]
78
- });
79
- const getFilteredTreeData = (data, search) => {
80
- if (!search) return data;
81
- const filterNode = node => {
82
- if (searchBasedOn === 'value') {
83
- const valueText = String(node.value || '').toLowerCase();
84
- return valueText.includes(search.toLowerCase());
85
- } else if (searchBasedOn === 'key') {
86
- const keyText = String(node.key || '').toLowerCase();
87
- return keyText.includes(search.toLowerCase());
88
- } else {
89
- var _node$label;
90
- const labelText = ((_node$label = node.label) == null ? void 0 : _node$label.toLowerCase()) || '';
91
- return labelText.includes(search.toLowerCase());
92
- }
93
- };
94
- const loop = data => data.map(item => {
95
- const children = item.children ? loop(item.children) : [];
96
- if (filterNode(item) || children.length) {
97
- return {
98
- ...item,
99
- children
100
- };
101
- }
102
- return null;
103
- }).filter(Boolean);
104
- return loop(data);
105
- };
106
- const flattenLeafValues = nodes => (nodes == null ? void 0 : nodes.flatMap(node => node.children ? flattenLeafValues(node.children) : [node.value])) || [];
107
- const isMulti = type === 'multiSelect' || type === 'multiTreeSelect';
108
- const isTree = type === 'treeSelect' || type === 'multiTreeSelect';
109
- const dataSource = isTree ? options : options.map(opt => ({
110
- title: opt.label,
111
- value: opt.value,
112
- key: opt.key || opt.value
113
- }));
114
- const filteredTree = getFilteredTreeData(dataSource, searchText);
115
- const leafValues = flattenLeafValues(filteredTree);
116
- const handleSelectAll = () => {
117
- const availableValues = leafValues;
118
- setTempValue(allSelected ? [] : availableValues);
119
- setAllSelected(!allSelected);
120
- };
121
- (0, _react.useEffect)(() => {
122
- if (isMulti && Array.isArray(tempValue)) {
123
- setAllSelected(tempValue.length > 0 && tempValue.length === leafValues.length);
124
- }
125
- }, [tempValue, leafValues, isMulti]);
126
- const handleConfirm = () => {
127
- if (onConfirm) onConfirm(tempValue);else onChange(tempValue);
128
- setSearchText('');
129
- };
130
- const handleCancel = () => {
131
- if (onCancel) onCancel();
132
- setTempValue(value);
133
- setSearchText('');
134
- };
135
- const handleTempChange = newValue => {
136
- setTempValue(newValue);
137
- };
138
- const suffix = isMulti && Array.isArray(value) && (value == null ? void 0 : value.length) > 1 ? (0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
139
- children: (0, _jsxRuntime.jsxs)("span", {
140
- children: ["+", value.length - 1, " more ", (0, _jsxRuntime.jsx)(_icons.DownOutlined, {})]
141
- })
142
- }) : (0, _jsxRuntime.jsx)(_icons.DownOutlined, {});
143
- const prefix = () => {
144
- if (isMulti && Array.isArray(value) && (value == null ? void 0 : value.length) > 0) {
145
- const selectedLabels = options.filter(opt => value.includes(opt.value)).map(opt => opt.label);
146
- return selectedLabels[0];
147
- }
148
- return null;
149
- };
150
- const renderHeader = () => {
151
- if (!headerLabel && !tooltip) return null;
152
- return (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
153
- children: [(0, _jsxRuntime.jsxs)(_styles.HeaderWrapper, {
154
- className: (0, _classnames.default)(disabled ? 'disabled' : '', 'cap-unified-select-header'),
155
- children: [headerLabel && (0, _jsxRuntime.jsx)("label", {
156
- type: "label16",
157
- className: (0, _classnames.default)(disabled ? 'disabled' : '', 'cap-unified-select-header-label'),
158
- children: headerLabel
159
- }), tooltip && (0, _jsxRuntime.jsx)(_antd.Tooltip, {
160
- title: tooltip,
161
- rootClassName: "cap-unified-tooltip",
162
- className: (0, _classnames.default)(disabled ? 'disabled' : '', 'cap-unified-select-header-tooltip'),
163
- children: (0, _jsxRuntime.jsx)(_icons.InfoCircleOutlined, {})
164
- })]
165
- }), (0, _jsxRuntime.jsx)("div", {
166
- className: "cap-unified-select-header-byline-text",
167
- children: bylineText && (0, _jsxRuntime.jsx)("label", {
168
- className: (0, _classnames.default)(disabled ? 'disabled' : '', 'cap-unified-select-header-byline-text'),
169
- children: bylineText
170
- })
171
- })]
172
- });
173
- };
174
- const renderDropdown = () => {
175
- const currentItems = filteredTree;
176
- const selectedCount = Array.isArray(tempValue) ? tempValue.length : tempValue ? 1 : 0;
177
- const renderCustomDropdown = menu => {
178
- if (!customPopupRender) return menu;
179
- return (0, _jsxRuntime.jsxs)("div", {
180
- className: (0, _classnames.default)(popupClassName, `${type}-popup-container`),
181
- children: [showSearch && (0, _jsxRuntime.jsx)("div", {
182
- style: {
183
- borderBottom: '1px solid #f0f0f0'
184
- },
185
- children: (0, _jsxRuntime.jsx)(_antd.Input, {
186
- prefix: (0, _jsxRuntime.jsx)(_icons.SearchOutlined, {
187
- style: {
188
- color: '#B3BAC5'
189
- }
190
- }),
191
- placeholder: "Search",
192
- variant: "borderless",
193
- value: searchText,
194
- onChange: e => setSearchText(e.target.value),
195
- onKeyDown: e => e.stopPropagation()
196
- })
197
- }), isMulti && showUpload && (0, _jsxRuntime.jsx)("div", {
198
- style: {
199
- cursor: 'pointer',
200
- display: 'flex',
201
- alignItems: 'center',
202
- borderBottom: '1px solid #f0f0f0',
203
- height: '36px'
204
- },
205
- children: (0, _jsxRuntime.jsx)(_antd.Button, {
206
- type: "link",
207
- icon: (0, _jsxRuntime.jsx)("img", {
208
- src: _upload.default,
209
- alt: "upload",
210
- style: {
211
- width: "16px",
212
- height: "20px"
213
- }
214
- }),
215
- onClick: () => {},
216
- style: {
217
- color: '#2466EA',
218
- display: 'flex',
219
- alignItems: 'center',
220
- fontSize: '14px',
221
- fontWeight: '400',
222
- lineHeight: '20px'
223
- },
224
- children: "Upload"
225
- })
226
- }), isMulti && currentItems.length > 0 && (0, _jsxRuntime.jsxs)("div", {
227
- style: {
228
- padding: '8px 12px',
229
- cursor: 'pointer',
230
- display: 'flex',
231
- alignItems: 'center',
232
- borderBottom: '1px solid #f0f0f0'
233
- },
234
- onClick: e => {
235
- e.stopPropagation();
236
- handleSelectAll();
237
- },
238
- children: [(0, _jsxRuntime.jsx)("input", {
239
- type: "checkbox",
240
- checked: allSelected,
241
- readOnly: true,
242
- style: {
243
- cursor: 'pointer'
244
- },
245
- onClick: e => e.stopPropagation()
246
- }), (0, _jsxRuntime.jsx)("label", {
247
- style: {
248
- marginLeft: 8,
249
- cursor: 'pointer'
250
- },
251
- children: "Select all"
252
- })]
253
- }), currentItems.length === 0 ? (0, _jsxRuntime.jsx)(NoResult, {}) : menu, currentItems.length > 0 && isMulti && (0, _jsxRuntime.jsxs)("div", {
254
- style: {
255
- display: 'flex',
256
- justifyContent: 'space-between',
257
- alignItems: 'center',
258
- padding: '8px 12px',
259
- borderTop: '1px solid #f0f0f0'
260
- },
261
- children: [(0, _jsxRuntime.jsxs)("div", {
262
- children: [(0, _jsxRuntime.jsx)(_antd.Button, {
263
- type: "primary",
264
- size: "small",
265
- style: {
266
- marginRight: 8
267
- },
268
- onClick: e => {
269
- e.stopPropagation();
270
- handleConfirm();
271
- },
272
- children: "Confirm"
273
- }), (0, _jsxRuntime.jsx)(_antd.Button, {
274
- type: "text",
275
- size: "small",
276
- onClick: e => {
277
- e.stopPropagation();
278
- handleCancel();
279
- },
280
- children: "Cancel"
281
- })]
282
- }), selectedCount > 0 && (0, _jsxRuntime.jsxs)("span", {
283
- style: {
284
- color: '#8c8c8c',
285
- fontSize: '14px'
286
- },
287
- children: [selectedCount, " selected"]
288
- })]
289
- })]
290
- });
291
- };
292
- return (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
293
- children: [(0, _jsxRuntime.jsx)(StyledTreeSelect, {
294
- ...rest,
295
- type: type,
296
- treeData: filteredTree,
297
- value: customPopupRender ? tempValue : value,
298
- onChange: customPopupRender ? handleTempChange : onChange,
299
- placeholder: placeholder,
300
- maxTagCount: 0,
301
- maxTagPlaceholder: () => null,
302
- prefix: isMulti && value.length > 0 && prefix(),
303
- suffixIcon: suffix,
304
- className: (0, _classnames.default)(`cap-unified-tree-select ${className || ''}`),
305
- style: style,
306
- status: isError ? 'error' : '',
307
- allowClear: allowClear,
308
- multiple: isMulti,
309
- treeCheckable: isMulti,
310
- showCheckedStrategy: _antd.TreeSelect.SHOW_PARENT,
311
- virtual: true,
312
- disabled: disabled,
313
- filterTreeNode: false,
314
- ...treeSelectVirtualizationProps,
315
- popupRender: renderCustomDropdown
316
- }), isError && (0, _jsxRuntime.jsx)("div", {
317
- style: {
318
- color: '#E83135'
319
- },
320
- className: "cap-unified-select-status",
321
- children: errorMessage
322
- })]
323
- });
324
- };
325
- return (0, _jsxRuntime.jsxs)(_styles.SelectWrapper, {
326
- className: (0, _classnames.default)(`cap-unified-select-container ${className || ''}`),
327
- children: [renderHeader(), renderDropdown()]
328
- });
329
- };
330
- CapUnifiedSelect.propTypes = {
331
- type: _propTypes.default.oneOf(['select', 'multiSelect', 'treeSelect', 'multiTreeSelect']),
332
- options: _propTypes.default.array,
333
- value: _propTypes.default.any,
334
- onChange: _propTypes.default.func,
335
- placeholder: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.node]),
336
- className: _propTypes.default.string,
337
- style: _propTypes.default.object,
338
- allowClear: _propTypes.default.bool,
339
- headerLabel: _propTypes.default.string,
340
- tooltip: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.node]),
341
- disabled: _propTypes.default.bool,
342
- customPopupRender: _propTypes.default.bool,
343
- showSearch: _propTypes.default.bool,
344
- searchBasedOn: _propTypes.default.oneOf(['label', 'value', 'key']),
345
- onConfirm: _propTypes.default.func,
346
- onCancel: _propTypes.default.func,
347
- isError: _propTypes.default.bool,
348
- errorMessage: _propTypes.default.string,
349
- popupClassName: _propTypes.default.string,
350
- showUpload: _propTypes.default.bool
351
- };
352
- CapUnifiedSelect.defaultProps = {
353
- type: 'select',
354
- allowClear: false,
355
- customPopupRender: false,
356
- showSearch: true,
357
- searchBasedOn: 'label',
358
- className: '',
359
- popupClassName: ''
360
- };
361
- var _default = exports.default = (0, _withStyles.default)(CapUnifiedSelect, _styles.selectStyles);
@@ -1,7 +0,0 @@
1
- "use strict";
2
-
3
- exports.__esModule = true;
4
- exports.default = void 0;
5
- var _CapUnifiedSelect = _interopRequireDefault(require("./CapUnifiedSelect"));
6
- exports.default = _CapUnifiedSelect.default;
7
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
@@ -1,27 +0,0 @@
1
- "use strict";
2
-
3
- exports.__esModule = true;
4
- exports.default = void 0;
5
- var _reactIntl = require("react-intl");
6
- var _default = exports.default = (0, _reactIntl.defineMessages)({
7
- selectPlaceholder: {
8
- id: 'cap.unified.select.placeholder',
9
- defaultMessage: 'Select an option'
10
- },
11
- searchPlaceholder: {
12
- id: 'cap.unified.select.search.placeholder',
13
- defaultMessage: 'Search...'
14
- },
15
- noData: {
16
- id: 'cap.unified.select.no.data',
17
- defaultMessage: 'No data'
18
- },
19
- loading: {
20
- id: 'cap.unified.select.loading',
21
- defaultMessage: 'Loading...'
22
- },
23
- selected: {
24
- id: 'cap.unified.select.selected',
25
- defaultMessage: '{count} items selected'
26
- }
27
- });
@@ -1,36 +0,0 @@
1
- "use strict";
2
-
3
- exports.__esModule = true;
4
- exports.selectStyles = exports.StyledInfoIcon = exports.SelectWrapper = exports.SelectAllCheckbox = exports.SearchInputWrapper = exports.NoResultWrapper = exports.HeaderWrapper = exports.DropdownFooter = void 0;
5
- var _styledComponents = _interopRequireWildcard(require("styled-components"));
6
- var styledVars = _interopRequireWildcard(require("../styled/variables"));
7
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
8
- const SelectWrapper = exports.SelectWrapper = _styledComponents.default.div.withConfig({
9
- displayName: "SelectWrapper",
10
- componentId: "sc-3v7xpu-0"
11
- })(["display:flex;flex-direction:column;gap:8px;width:100%;&.disabled{cursor:not-allowed;}"]);
12
- const HeaderWrapper = exports.HeaderWrapper = _styledComponents.default.div.withConfig({
13
- displayName: "HeaderWrapper",
14
- componentId: "sc-3v7xpu-1"
15
- })(["display:flex;align-items:center;gap:4px;&.disabled{opacity:0.5;cursor:not-allowed;}"]);
16
- const DropdownFooter = exports.DropdownFooter = _styledComponents.default.div.withConfig({
17
- displayName: "DropdownFooter",
18
- componentId: "sc-3v7xpu-2"
19
- })(["display:flex;justify-content:space-between;align-items:center;padding:8px;border-top:1px solid #f0f0f0;.footer-buttons{display:flex;align-items:center;gap:8px;}.total-count{color:#8c8c8c;font-size:12px;}"]);
20
- const SearchInputWrapper = exports.SearchInputWrapper = _styledComponents.default.div.withConfig({
21
- displayName: "SearchInputWrapper",
22
- componentId: "sc-3v7xpu-3"
23
- })(["padding:8px;border-bottom:1px solid #f0f0f0;"]);
24
- const SelectAllCheckbox = exports.SelectAllCheckbox = _styledComponents.default.div.withConfig({
25
- displayName: "SelectAllCheckbox",
26
- componentId: "sc-3v7xpu-4"
27
- })(["display:flex;align-items:center;padding:8px 12px;cursor:pointer;font-weight:500;border-bottom:1px solid #f0f0f0;user-select:none;input[type=\"checkbox\"]{cursor:pointer;}"]);
28
- const NoResultWrapper = exports.NoResultWrapper = _styledComponents.default.div.withConfig({
29
- displayName: "NoResultWrapper",
30
- componentId: "sc-3v7xpu-5"
31
- })(["display:flex;flex-direction:column;align-items:center;justify-content:center;height:200px;color:#8c8c8c;font-size:14px;"]);
32
- const StyledInfoIcon = exports.StyledInfoIcon = _styledComponents.default.span.withConfig({
33
- displayName: "StyledInfoIcon",
34
- componentId: "sc-3v7xpu-6"
35
- })(["color:", ";font-size:16px;cursor:help;margin-left:4px;display:flex;align-items:center;&:hover{color:", ";}&.disabled{cursor:not-allowed;&:hover{color:", ";}}"], styledVars.CAP_G05, styledVars.CAP_G03, styledVars.CAP_G05);
36
- const selectStyles = exports.selectStyles = (0, _styledComponents.css)(["&.cap-unified-select-container{.cap-unified-tree-select{height:32px !important;width:340px !important;}.ant-select-prefix{font-size:14px !important;font-weight:400 !important;color:#091E42 !important;line-height:20px !important;}.cap-unified-select-header-label{font-family:", " !important;font-weight:500 !important;font-size:14px !important;line-height:20px !important;letter-spacing:0px !important;}.cap-unified-select-header-tooltip{width:16px !important;height:16px !important;color:#B3BAC5 !important;}.cap-unified-select-header-byline-text{font-family:", " !important;font-weight:400 !important;font-size:12px !important;margin-top:-10px;letter-spacing:0px !important;color:#97A0AF !important;}.cap-unified-tree-select .ant-select-selector:hover{border:1px solid #7A869A !important;}.cap-unified-tree-select .select-popup-container .ant-select-tree-switcher-noop,.cap-unified-tree-select .multiSelect-popup-container .ant-select-tree-switcher-noop{display:none !important;}.ant-tree-select-dropdown .treeSelect-popup-container .ant-select-tree .ant-select-tree-treenode{margin:0px !important;}.cap-unified-tree-select .multiSelect-popup-container .ant-tree-select-dropdown .ant-select-tree .ant-select-tree-treenode{margin-left:10px !important;}.multiSelect-popup-container .ant-select-tree-treenode{margin-left:10px !important;}}&.cap-unified-select{width:100%;font-family:", ";.ant-select-selector{border-radius:", ";transition:", ";padding:0 12px;min-height:32px;display:flex;align-items:center;&:hover{border-color:", ";}}.cap-unified-select-right-slot{display:flex;align-items:center;gap:8px;margin-left:8px;}&.ant-select-focused{.ant-select-selector{border-color:", " !important;box-shadow:none !important;}}&.ant-select-status-error{.ant-select-selector{border-color:", ";}}&.ant-select-disabled{.ant-select-selector{background-color:", ";cursor:not-allowed;}}.ant-select-dropdown,&.ant-select-dropdown,&.ant-select-dropdown-placement-bottomLeft{padding:0;border-radius:12px !important;box-shadow:0 4px 12px rgba(0,0,0,0.08);overflow:hidden;.ant-select-item-option{padding:10px 16px;font-size:14px;color:#1c2530;font-weight:500;background-color:transparent !important;&:not(.ant-select-item-option-disabled):hover{background-color:#fffbe6 !important;border-radius:4px;color:#1c2530 !important;}&:hover:not(.ant-select-item-option-disabled):not(.ant-select-item-option-selected){background-color:#fffbe6 !important;color:#1c2530 !important;border-radius:4px;}&-selected:not(.ant-select-item-option-disabled){background-color:#e9f0fe !important;color:#1c2530 !important;font-weight:500;}&-active:not(:hover):not(.ant-select-item-option-disabled){background-color:transparent !important;}}.ant-select-dropdown-search,.ant-select-search{padding:8px 12px;border-bottom:1px solid #f0f0f0;input{border-radius:", ";transition:", ";&:focus{border-color:", ";box-shadow:none;}}}.rc-virtual-list-scrollbar-thumb{background-color:#dcdcdc;border-radius:4px;}.ant-divider-horizontal{margin:0;}.no-result{display:flex;flex-direction:column;align-items:center;justify-content:center;height:200px;color:#8c8c8c;font-size:14px;}.dropdown-search{padding:8px;border-bottom:1px solid #f0f0f0;}.select-all-checkbox{display:flex;align-items:center;padding:8px 12px;cursor:pointer;font-weight:500;border-bottom:1px solid #f0f0f0;user-select:none;input[type=\"checkbox\"]{cursor:pointer;}}.dropdown-footer{display:flex;justify-content:space-between;align-items:center;padding:8px;border-top:1px solid #f0f0f0;}.selected-count{color:#8c8c8c;font-size:12px;}.ant-checkbox-inner{border-color:#42b040;}.ant-checkbox-checked .ant-checkbox-inner{background-color:#42b040;border-color:#42b040;}.ant-checkbox-checked .ant-checkbox-inner::after{border-color:#42b040;}}&.ant-select-multiple{.ant-select-selection-item{background-color:#e9f0fe !important;border:none;border-radius:", ";color:#1c2530;font-weight:500;margin:2px 4px 2px 0;padding:0 8px;height:24px;line-height:22px;&-remove{color:", ";&:hover{color:", ";}}}.ant-select-selection-overflow{flex-wrap:wrap;gap:4px;}}.ant-select-tree{padding:4px 0;.ant-select-tree-node-content-wrapper{padding:4px 8px;border-radius:", ";background-color:transparent !important;transition:background 0.3s;&:hover{background-color:#fffbe6 !important;color:#1c2530 !important;border-radius:4px;}&.ant-select-tree-node-selected{color:#1c2530;font-weight:500;}}.ant-select-tree-switcher{width:24px;height:24px;line-height:24px;}.ant-select-tree-checkbox{margin:4px 8px 4px 0;}.ant-select-tree-treenode{padding:2px 0;&:hover{background-color:transparent;}}.ant-select-tree-checkbox-checked .ant-select-tree-checkbox-inner{background-color:#42b040;border-color:#42b040;}.ant-select-tree-checkbox-checked .ant-select-tree-node-content-wrapper{background-color:#e9f0fe !important;color:#1c2530 !important;font-weight:500;}}&.ant-select-lg{.ant-select-selector{height:40px;padding:0 16px;}.ant-select-selection-item{height:28px;line-height:26px;}}&.ant-select-sm{.ant-select-selector{height:24px;padding:0 8px;}.ant-select-selection-item{height:20px;line-height:18px;}}&.ant-select-loading{.ant-select-arrow{.anticon-loading{color:", ";}}}&.cap-unified-tree-select .ant-select-selection-overflow{display:none;}&.cap-unified-tree-select .suffix-counter{color:#1c2530;font-weight:500;margin-right:12px;}}"], styledVars.FONT_FAMILY, styledVars.FONT_FAMILY, styledVars.FONT_FAMILY, styledVars.RADIUS_04, styledVars.TRANSITION_ALL, styledVars.CAP_G11, styledVars.CAP_G01, styledVars.CAP_RED, styledVars.CAP_G08, styledVars.RADIUS_04, styledVars.TRANSITION_ALL, styledVars.CAP_G01, styledVars.RADIUS_04, styledVars.CAP_PRIMARY.base, styledVars.CAP_PRIMARY.hover, styledVars.RADIUS_04, styledVars.CAP_PRIMARY.base);
@@ -1,42 +0,0 @@
1
- "use strict";
2
-
3
- exports.__esModule = true;
4
- exports.default = void 0;
5
- var _react = _interopRequireWildcard(require("react"));
6
- var _reactIntl = require("react-intl");
7
- var _en = _interopRequireDefault(require("../translations/en"));
8
- var _jsxRuntime = require("react/jsx-runtime");
9
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
11
- const prefix = `blaze.components`;
12
- const LocaleHoc = (WrapperComponent, customProps) => {
13
- const Wrapper = props => {
14
- const componentName = customProps.key;
15
- const translatedDefaults = _en.default[componentName];
16
- const {
17
- intl
18
- } = props;
19
- const translatedProps = (0, _react.useMemo)(() => {
20
- if (!translatedDefaults) return {};
21
- return Object.keys(translatedDefaults).reduce((acc, key) => {
22
- const id = `${prefix}.${componentName}.${key}`;
23
- const defaultMessage = translatedDefaults[key];
24
- try {
25
- acc[key] = intl.formatMessage({
26
- id,
27
- defaultMessage
28
- });
29
- } catch (err) {
30
- acc[key] = defaultMessage;
31
- }
32
- return acc;
33
- }, {});
34
- }, [translatedDefaults, intl]);
35
- return (0, _jsxRuntime.jsx)(WrapperComponent, {
36
- ...translatedProps,
37
- ...props
38
- });
39
- };
40
- return (0, _reactIntl.injectIntl)(Wrapper);
41
- };
42
- var _default = exports.default = LocaleHoc;
@@ -1,3 +0,0 @@
1
- <svg width="16" height="18" viewBox="0 0 16 18" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path fill-rule="evenodd" clip-rule="evenodd" d="M7.00031 13.0631V3.79511L4.46431 6.33111C4.07431 6.72111 3.44131 6.72111 3.05031 6.33111C2.65931 5.94011 2.65931 5.30711 3.05031 4.91611L7.29331 0.674109C7.68331 0.283109 8.31631 0.283109 8.70731 0.674109L12.9493 4.91611C13.3403 5.30711 13.3403 5.94011 12.9493 6.33111C12.5593 6.72111 11.9263 6.72111 11.5353 6.33111L9.00031 3.79511V13.0631C9.00031 13.5761 8.55231 13.9911 8.00031 13.9911C7.44731 13.9911 7.00031 13.5761 7.00031 13.0631ZM14.9975 12.9942C15.5495 12.9942 15.9975 13.4412 15.9975 13.9942V16.9302C15.9985 16.9502 15.9995 16.9712 15.9995 16.9912C15.9995 17.0342 15.9965 17.0772 15.9895 17.1192C15.9285 17.6122 15.5075 17.9942 14.9975 17.9942C14.9565 17.9942 14.9175 17.9922 14.8785 17.9872C14.8405 17.9902 14.8015 17.9912 14.7625 17.9912H1.23751C1.21394 17.9912 1.19217 17.9861 1.1704 17.981C1.15245 17.9768 1.13449 17.9726 1.11551 17.9712C1.10076 17.9725 1.0868 17.9767 1.07275 17.9809C1.05538 17.986 1.03786 17.9912 1.01851 17.9912C0.606512 17.9912 0.253512 17.7412 0.101512 17.3852C0.0365117 17.2642 -0.000488281 17.1312 -0.000488281 16.9912C-0.000488281 16.9769 0.00426292 16.9638 0.00903728 16.9506C0.013294 16.9388 0.017569 16.9269 0.0185117 16.9142V13.9912C0.0185117 13.4382 0.466512 12.9912 1.01851 12.9912C1.57151 12.9912 2.01851 13.4382 2.01851 13.9912V15.9912H13.9975V13.9942C13.9975 13.4412 14.4455 12.9942 14.9975 12.9942Z" fill="#2466EA"/>
3
- </svg>
@@ -1,22 +0,0 @@
1
- "use strict";
2
-
3
- exports.__esModule = true;
4
- exports.styledVars = exports.styled = exports.Utils = exports.LocaleHoc = exports.CapUnifiedSelect = exports.CapTestSelect = exports.CapTable = exports.CapInput = void 0;
5
- var _CapInput = _interopRequireDefault(require("./CapInput"));
6
- exports.CapInput = _CapInput.default;
7
- var _CapTable = _interopRequireDefault(require("./CapTable"));
8
- exports.CapTable = _CapTable.default;
9
- var _CapTestSelect = _interopRequireDefault(require("./CapTestSelect"));
10
- exports.CapTestSelect = _CapTestSelect.default;
11
- var _CapUnifiedSelect = _interopRequireDefault(require("./CapUnifiedSelect"));
12
- exports.CapUnifiedSelect = _CapUnifiedSelect.default;
13
- var _LocaleHoc = _interopRequireDefault(require("./LocaleHoc"));
14
- exports.LocaleHoc = _LocaleHoc.default;
15
- var _styledVars = _interopRequireWildcard(require("./styled/variables"));
16
- exports.styledVars = _styledVars;
17
- var _styled = _interopRequireDefault(require("./styled"));
18
- exports.styled = _styled.default;
19
- var _Utils = _interopRequireWildcard(require("../utils"));
20
- exports.Utils = _Utils;
21
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
22
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
@@ -1,14 +0,0 @@
1
- "use strict";
2
-
3
- exports.__esModule = true;
4
- var _exportNames = {};
5
- exports.default = void 0;
6
- var styledVars = _interopRequireWildcard(require("./variables"));
7
- Object.keys(styledVars).forEach(function (key) {
8
- if (key === "default" || key === "__esModule") return;
9
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
10
- if (key in exports && exports[key] === styledVars[key]) return;
11
- exports[key] = styledVars[key];
12
- });
13
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
14
- var _default = exports.default = styledVars;
@@ -1,70 +0,0 @@
1
- "use strict";
2
-
3
- exports.__esModule = true;
4
- exports.TRANSITION_ALL = exports.SPACING_32 = exports.SPACING_24 = exports.SPACING_16 = exports.SPACING_12 = exports.SPACING_08 = exports.SPACING_04 = exports.RADIUS_08 = exports.RADIUS_04 = exports.FONT_WEIGHT_REGULAR = exports.FONT_WEIGHT_MEDIUM = exports.FONT_FAMILY = exports.CAP_YELLOW02 = exports.CAP_YELLOW01 = exports.CAP_YELLOW = exports.CAP_WHITE = exports.CAP_SECONDARY = exports.CAP_RED03 = exports.CAP_RED02 = exports.CAP_RED01 = exports.CAP_RED = exports.CAP_PURPLE04 = exports.CAP_PURPLE03 = exports.CAP_PURPLE02 = exports.CAP_PURPLE01 = exports.CAP_PURPLE = exports.CAP_PRIMARY = exports.CAP_PINK = exports.CAP_PALE_GREY = exports.CAP_ORANGE02 = exports.CAP_ORANGE01 = exports.CAP_ORANGE = exports.CAP_ICON = exports.CAP_GREEN02 = exports.CAP_GREEN01 = exports.CAP_G20 = exports.CAP_G19 = exports.CAP_G18 = exports.CAP_G17 = exports.CAP_G16 = exports.CAP_G15 = exports.CAP_G14 = exports.CAP_G13 = exports.CAP_G12 = exports.CAP_G11 = exports.CAP_G10 = exports.CAP_G09 = exports.CAP_G08 = exports.CAP_G07 = exports.CAP_G06 = exports.CAP_G05 = exports.CAP_G04 = exports.CAP_G03 = exports.CAP_G02 = exports.CAP_G01 = exports.CAP_BLUE02 = exports.CAP_BLUE01 = exports.CAP_BLUE = exports.CAP_BLACK = void 0;
5
- const CAP_PRIMARY = exports.CAP_PRIMARY = {
6
- base: "#47af46",
7
- hover: "#1f9a1d",
8
- disabled: "#a1d8a0"
9
- };
10
- const CAP_SECONDARY = exports.CAP_SECONDARY = {
11
- base: "#2466ea",
12
- light: 'rgba("#2466ea", 0.1)'
13
- };
14
- const CAP_ORANGE = exports.CAP_ORANGE = "#f87d23";
15
- const CAP_ORANGE01 = exports.CAP_ORANGE01 = "#ffe5d2";
16
- const CAP_ORANGE02 = exports.CAP_ORANGE02 = "#fa7d02";
17
- const CAP_YELLOW = exports.CAP_YELLOW = "#fec52e";
18
- const CAP_YELLOW01 = exports.CAP_YELLOW01 = "#e8bc25";
19
- const CAP_YELLOW02 = exports.CAP_YELLOW02 = "#f9d438";
20
- const CAP_BLUE = exports.CAP_BLUE = "#23cccc";
21
- const CAP_PURPLE = exports.CAP_PURPLE = "#8517e5";
22
- const CAP_PINK = exports.CAP_PINK = "#e51fa3";
23
- const CAP_RED = exports.CAP_RED = "#ea213a";
24
- const CAP_ICON = exports.CAP_ICON = "#7a869a";
25
- const CAP_PALE_GREY = exports.CAP_PALE_GREY = "#e9f0fe";
26
- const CAP_BLUE01 = exports.CAP_BLUE01 = "#2466eb";
27
- const CAP_BLUE02 = exports.CAP_BLUE02 = "#1d61ee";
28
- const CAP_RED01 = exports.CAP_RED01 = "#e51fa3";
29
- const CAP_RED02 = exports.CAP_RED02 = "#f5222d";
30
- const CAP_RED03 = exports.CAP_RED03 = "#ed1b34";
31
- const CAP_PURPLE01 = exports.CAP_PURPLE01 = "#6563ff";
32
- const CAP_PURPLE02 = exports.CAP_PURPLE02 = "#a451ff";
33
- const CAP_PURPLE03 = exports.CAP_PURPLE03 = "#f2e7fe";
34
- const CAP_PURPLE04 = exports.CAP_PURPLE04 = "#d4e1fc";
35
- const CAP_GREEN01 = exports.CAP_GREEN01 = "#6bb56b";
36
- const CAP_GREEN02 = exports.CAP_GREEN02 = "#ecf7ec";
37
- const CAP_G01 = exports.CAP_G01 = "#091e42";
38
- const CAP_G02 = exports.CAP_G02 = "#253858";
39
- const CAP_G03 = exports.CAP_G03 = "#42526e";
40
- const CAP_G04 = exports.CAP_G04 = "#5e6c84";
41
- const CAP_G05 = exports.CAP_G05 = "#97a0af";
42
- const CAP_G06 = exports.CAP_G06 = "#b3bac5";
43
- const CAP_G07 = exports.CAP_G07 = "#dfe2e7";
44
- const CAP_G08 = exports.CAP_G08 = "#ebecf0";
45
- const CAP_G09 = exports.CAP_G09 = "#f4f5f7";
46
- const CAP_G10 = exports.CAP_G10 = "#fafbfc";
47
- const CAP_G11 = exports.CAP_G11 = "#7a869a";
48
- const CAP_G12 = exports.CAP_G12 = "#e8e8e8";
49
- const CAP_G13 = exports.CAP_G13 = "#ecece7";
50
- const CAP_G14 = exports.CAP_G14 = "#e9f0fd";
51
- const CAP_G15 = exports.CAP_G15 = "#efefef";
52
- const CAP_G16 = exports.CAP_G16 = "#2a2a2a";
53
- const CAP_G17 = exports.CAP_G17 = "#7F8185";
54
- const CAP_G18 = exports.CAP_G18 = "#dcdee2";
55
- const CAP_G19 = exports.CAP_G19 = "#8a9ab2";
56
- const CAP_G20 = exports.CAP_G20 = "#c2c2c2";
57
- const CAP_WHITE = exports.CAP_WHITE = "#ffffff";
58
- const CAP_BLACK = exports.CAP_BLACK = "#000000";
59
- const FONT_FAMILY = exports.FONT_FAMILY = '"Roboto", sans-serif';
60
- const FONT_WEIGHT_REGULAR = exports.FONT_WEIGHT_REGULAR = 400;
61
- const FONT_WEIGHT_MEDIUM = exports.FONT_WEIGHT_MEDIUM = 500;
62
- const SPACING_04 = exports.SPACING_04 = "4px";
63
- const SPACING_08 = exports.SPACING_08 = "8px";
64
- const SPACING_12 = exports.SPACING_12 = "12px";
65
- const SPACING_16 = exports.SPACING_16 = "16px";
66
- const SPACING_24 = exports.SPACING_24 = "24px";
67
- const SPACING_32 = exports.SPACING_32 = "32px";
68
- const RADIUS_04 = exports.RADIUS_04 = "4px";
69
- const RADIUS_08 = exports.RADIUS_08 = "8px";
70
- const TRANSITION_ALL = exports.TRANSITION_ALL = "all 0.3s ease";