@capillarytech/blaze-ui 0.1.6-alpha.58 → 0.1.6-alpha.6

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 (101) hide show
  1. package/CapHeading/CapHeading.js +71 -0
  2. package/CapHeading/index.js +1 -0
  3. package/CapHeading/styles.js +125 -0
  4. package/CapInfoNote/CapInfoNote.js +54 -0
  5. package/CapInfoNote/index.js +1 -0
  6. package/CapInfoNote/styles.js +63 -0
  7. package/CapInput/CapInput.js +1 -1
  8. package/CapInput/Number.js +1 -1
  9. package/CapInput/Search.js +1 -1
  10. package/CapInput/TextArea.js +1 -1
  11. package/CapInput/loadable.js +9 -0
  12. package/CapLabel/CapLabel.js +81 -101
  13. package/CapLabel/index.js +1 -3
  14. package/CapLabel/styles.js +212 -250
  15. package/CapRow/CapRow.js +10 -111
  16. package/CapRow/index.js +1 -3
  17. package/CapRow/styles.js +6 -47
  18. package/CapTable/loadable.js +4 -4
  19. package/CapTable/styles.js +1 -1
  20. package/CapTooltip/CapTooltip.js +25 -87
  21. package/CapTooltip/index.js +1 -3
  22. package/CapTooltip/styles.js +27 -19
  23. package/CapUnifiedSelect/CapUnifiedSelect.js +68 -547
  24. package/CapUnifiedSelect/index.js +4 -1
  25. package/CapUnifiedSelect/loadable.js +3 -0
  26. package/CapUnifiedSelect/styles.js +168 -300
  27. package/dist/235.index.js +2 -0
  28. package/dist/235.index.js.LICENSE.txt +29 -0
  29. package/dist/603.index.js +1 -0
  30. package/dist/CapInput/CapInput.js +66 -0
  31. package/dist/CapInput/Number.js +42 -0
  32. package/dist/CapInput/Search.js +35 -0
  33. package/dist/CapInput/TextArea.js +42 -0
  34. package/dist/CapInput/index.js +15 -0
  35. package/dist/CapInput/messages.js +32 -0
  36. package/dist/CapInput/styles.js +11 -0
  37. package/dist/CapTable/CapTable.js +148 -0
  38. package/dist/CapTable/index.js +9 -0
  39. package/dist/CapTable/loadable.js +23 -0
  40. package/dist/CapTable/styles.js +26 -0
  41. package/dist/LocaleHoc/index.js +40 -0
  42. package/dist/esm/CapHeading/CapHeading.js +41 -0
  43. package/dist/esm/CapHeading/index.js +1 -0
  44. package/dist/esm/CapHeading/styles.js +123 -0
  45. package/dist/esm/CapInfoNote/CapInfoNote.js +62 -0
  46. package/dist/esm/CapInfoNote/index.js +1 -0
  47. package/dist/esm/CapInfoNote/styles.js +6 -0
  48. package/dist/esm/CapInput/CapInput.js +57 -0
  49. package/dist/esm/CapInput/Number.js +35 -0
  50. package/dist/esm/CapInput/Search.js +28 -0
  51. package/dist/esm/CapInput/TextArea.js +35 -0
  52. package/dist/esm/CapInput/index.js +8 -0
  53. package/dist/esm/CapInput/loadable.js +9 -0
  54. package/dist/esm/CapInput/messages.js +25 -0
  55. package/dist/esm/CapInput/styles.js +3 -0
  56. package/dist/esm/CapLabel/CapLabel.js +50 -0
  57. package/dist/esm/CapLabel/index.js +1 -0
  58. package/dist/esm/CapLabel/styles.js +219 -0
  59. package/dist/esm/CapRow/CapRow.js +22 -0
  60. package/dist/esm/CapRow/index.js +1 -0
  61. package/dist/esm/CapRow/styles.js +5 -0
  62. package/dist/esm/CapTable/CapTable.js +140 -0
  63. package/dist/esm/CapTable/index.js +2 -0
  64. package/dist/esm/CapTable/loadable.js +12 -0
  65. package/dist/esm/CapTable/styles.js +17 -0
  66. package/dist/esm/CapTooltip/CapTooltip.js +34 -0
  67. package/dist/esm/CapTooltip/index.js +1 -0
  68. package/dist/esm/CapTooltip/styles.js +6 -0
  69. package/dist/esm/CapUnifiedSelect/CapUnifiedSelect.js +101 -0
  70. package/dist/esm/CapUnifiedSelect/index.js +3 -0
  71. package/dist/esm/CapUnifiedSelect/loadable.js +4 -0
  72. package/dist/esm/CapUnifiedSelect/messages.js +23 -0
  73. package/dist/esm/CapUnifiedSelect/styles.js +15 -0
  74. package/dist/esm/LocaleHoc/index.js +31 -0
  75. package/dist/esm/index.js +11 -0
  76. package/dist/esm/styled/index.js +5 -0
  77. package/dist/esm/styled/variables.js +88 -0
  78. package/dist/esm/translations/en.js +329 -0
  79. package/dist/index.js +39 -0
  80. package/dist/index.js.LICENSE.txt +7 -0
  81. package/dist/styled/index.js +22 -0
  82. package/dist/styled/variables.js +94 -0
  83. package/dist/translations/en.js +335 -0
  84. package/index.js +1 -12
  85. package/package.json +11 -5
  86. package/.DS_Store +0 -0
  87. package/CapIcon/CapIcon.js +0 -183
  88. package/CapIcon/index.js +0 -3
  89. package/CapIcon/styles.js +0 -76
  90. package/CapSkeleton/CapSkeleton.js +0 -17
  91. package/CapSkeleton/index.js +0 -1
  92. package/CapSpin/CapSpin.js +0 -23
  93. package/CapSpin/index.js +0 -1
  94. package/CapTestSelect/CapTestSelect.js +0 -47
  95. package/CapTestSelect/index.js +0 -1
  96. package/CapTooltipWithInfo/CapTooltipWithInfo.js +0 -82
  97. package/CapTooltipWithInfo/index.js +0 -3
  98. package/CapTooltipWithInfo/styles.js +0 -22
  99. package/assets/upload.svg +0 -3
  100. package/utils/index.js +0 -1
  101. package/utils/withStyles.js +0 -24
@@ -0,0 +1,335 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _default = exports["default"] = {
8
+ CapMultiSelect: {
9
+ noResultsFoundText: "No results found",
10
+ selectText: "Select",
11
+ closeText: "Close",
12
+ searchPlaceholder: "Search",
13
+ selectedText: "selected",
14
+ selectAllText: "Select all",
15
+ selectAllSearchResultsText: "Select all searched results",
16
+ moreText: "more"
17
+ },
18
+ CapModal: {
19
+ okText: 'Yes',
20
+ closeText: 'No'
21
+ },
22
+ CapMultiSelectWithTree: {
23
+ noResultsFoundText: "No results found",
24
+ selectText: "Select",
25
+ closeText: "Close",
26
+ searchPlaceholder: "Search",
27
+ selectedText: "selected",
28
+ selectAllText: "Select all",
29
+ selectAllSearchResultsText: "Select all searched results",
30
+ moreText: "more",
31
+ storeUploadsText: "Store IDs are uploaded already"
32
+ },
33
+ CapCustomSelect: {
34
+ searchPlaceholder: 'Search',
35
+ selectPlaceholder: 'Select Option'
36
+ },
37
+ CapMultiSelectDatePicker: {
38
+ lastDayText: 'Last day of month'
39
+ },
40
+ CapTable: {
41
+ loadMoreData: 'Loading more data...'
42
+ },
43
+ CapIllustration: {
44
+ accessForbiddenMsg: 'Action cannot be performed due to insufficient permission'
45
+ },
46
+ CapNavigation: {
47
+ businessProcesses: 'Workbench',
48
+ wecrm: 'Wecrm',
49
+ loyaltyProgram: 'Loyalty+',
50
+ storePerformance: 'Store Performance',
51
+ memberCare: 'Member Care',
52
+ storeCare: 'Store Care',
53
+ insights: 'Insights+',
54
+ connectPlus: 'Connect+',
55
+ settingsLabel: 'Settings',
56
+ campaign: 'Engage+',
57
+ selectOrganization: 'Select Organization',
58
+ organization: 'Organization',
59
+ noResultText: 'No results found',
60
+ selectProduct: 'Select Product'
61
+ },
62
+ InfoNote: {
63
+ noteText: 'Note'
64
+ },
65
+ SomethingWentWrong: {
66
+ title: 'Sorry, something went wrong.',
67
+ description: 'Please try again. If this issue occurs again, please reach out to Capillary support team.',
68
+ reloadText: 'Try refreshing again'
69
+ },
70
+ CapBlock: {
71
+ deleteBlockMsg: 'Delete',
72
+ expandBlockMsg: 'Expand',
73
+ collapseBlockMsg: 'Collapse'
74
+ },
75
+ CapMultiplePath: {
76
+ notUniqueMsg: 'Not Unique',
77
+ deleteConfirmationTitleMsg: 'Confirm delete path',
78
+ deleteConfirmationTextMsg: 'Are you sure you wish to delete path',
79
+ deleteConfirmationWarningMsg: 'This action cannot be undone.',
80
+ deleteButtonTextMsg: 'Yes, Delete',
81
+ yesMsg: 'Yes',
82
+ noMsg: 'No',
83
+ pathMsg: 'Path',
84
+ addPathMessage: 'Add Path'
85
+ },
86
+ CapCondition: {
87
+ includeMsg: 'include',
88
+ excludeMsg: 'exclude',
89
+ equalMsg: 'equal to',
90
+ greaterThanMsg: 'greater than',
91
+ lessThanMsg: 'less than',
92
+ greaterThanOrEqualMsg: 'greater than or equal to',
93
+ lessThanorEqualMsg: 'less than or equal',
94
+ inRangeMsg: 'in range',
95
+ notEqualMsg: 'not equal to',
96
+ whoseMsg: 'Whose',
97
+ isMsg: 'is',
98
+ andMsg: 'and',
99
+ ANDMsg: 'AND',
100
+ containsMsg: 'contains',
101
+ startsWithMsg: 'starts with',
102
+ endsWithMsg: 'ends with',
103
+ exactMsg: 'exact',
104
+ conditionStringInputPlaceholderMsg: 'Enter min. 3 characters',
105
+ lineItemMsg: 'only for lineitems with',
106
+ withMsg: 'with',
107
+ additionalFieldsMsg: 'Additional condition',
108
+ plusMinus: '+/-',
109
+ inMsg: 'in',
110
+ notInMsg: 'not in',
111
+ uploadFailedError: 'Upload failed',
112
+ uploadLimitExceeded: 'Please do not upload more than 1000 store codes',
113
+ uploadReqLoader: 'Uploading stores',
114
+ or: 'OR',
115
+ search: 'Search',
116
+ searchWithExact: 'Search with exact keyword',
117
+ customFieldsTag: 'custom fields',
118
+ storeSearchMsg: 'Enter min. 3 characters to search',
119
+ uploadInProgressMsg: 'Upload in progress',
120
+ unsupportedCsvHeaderMsg: "The CSV header must be 'Store code' or 'Store id'",
121
+ csvFileNoEntryTxt: "Please upload a file with atleast one entry",
122
+ downloadedMsg: "downloaded",
123
+ reuploadFileMsg: 'Reupload file',
124
+ storeIdsMsg: 'Store IDs',
125
+ downloadStoreIdMsg: 'Download Store ID',
126
+ downloadStoreIdCodeNameMsg: 'Download Store ID, code & name',
127
+ downloadInProgressMsg: 'Download in progress, might take a while'
128
+ },
129
+ CapConditionPreview: {
130
+ includeMsg: 'Include',
131
+ excludeMsg: 'Exclude',
132
+ equalMsg: 'equal to',
133
+ greaterThanMsg: 'greater than',
134
+ lessThanMsg: 'less than',
135
+ greaterThanOrEqualMsg: 'greater than or equal to',
136
+ lessThanorEqualMsg: 'less than or equal',
137
+ inRangeMsg: 'in range',
138
+ notEqualMsg: 'not equal to',
139
+ whoseMsg: 'whose',
140
+ isMsg: 'is',
141
+ andMsg: 'and',
142
+ ANDMsg: 'AND',
143
+ lineItemMsg: 'only for lineitems with',
144
+ withMsg: 'with',
145
+ addedSKUsMsg: 'Added SKUs',
146
+ skuFileName: 'SKU.csv',
147
+ uploadedMsg: 'uploaded',
148
+ inMsg: 'in',
149
+ notInMsg: 'not in',
150
+ storesMsg: 'Stores',
151
+ viewMoreMsg: 'View more',
152
+ uploadInProgressMsg: 'Upload in progress',
153
+ uploadFailedErrorMsg: 'Upload failed',
154
+ uploadInvalidErrorMsg: 'Invalid file uploaded'
155
+ },
156
+ CapPopoverTree: {
157
+ emptyDataMessage: 'No data found',
158
+ searchPlaceholder: 'Search'
159
+ },
160
+ CapGraphBlockNode: {
161
+ configureText: 'Configure',
162
+ replaceEngagementBlockMsg: 'Replace engagement block'
163
+ },
164
+ CapStaticTemplates: {
165
+ strategyTitleMsg: 'Select the strategy',
166
+ strategyDescriptionMsg: 'Use strategy driven pre-defined marketing use-cases or build your own strategy',
167
+ comingSoonMsg: 'Coming soon',
168
+ blankCategoryLabel: 'Custom',
169
+ blankTemplateLabel: 'Build from scratch',
170
+ blankTemplateDescription: 'Create your own journey from scratch',
171
+ searchPlaceholderMsg: 'Search strategy'
172
+ },
173
+ CapProductSelection: {
174
+ lineItem: 'Line items',
175
+ selectAttribute: 'Select Attribute',
176
+ brand: 'Brand',
177
+ brandInfo: 'Brand',
178
+ category: 'Category',
179
+ categoryInfo: 'Category',
180
+ product: 'Product',
181
+ productInfo: 'Product',
182
+ SKU: 'SKU',
183
+ uploadSKU: 'Upload SKU',
184
+ uploadSKUInfo: 'Upload SKU',
185
+ changeSelection: 'Change the selection',
186
+ description: 'Changing the attribute of additional condition will result in lose of previously defined additional condition',
187
+ okText: 'Yes, change',
188
+ cancelText: 'Cancel',
189
+ comingSoon: 'Coming soon',
190
+ selectValues: 'Select value(s)',
191
+ atleast1Attribute: 'At least 1 attribute is required'
192
+ },
193
+ CapTruncateList: {
194
+ more: 'more'
195
+ },
196
+ CapSKUUploader: {
197
+ validatingSKUs: 'Validating SKUs',
198
+ invalid: 'invalid',
199
+ invalidSKUs: 'Invalid SKUs',
200
+ valid: 'valid',
201
+ addedSKUsMsg: 'Added SKUs',
202
+ skuFileName: 'SKU.csv',
203
+ invalidSKUFilename: 'invalidSKU.csv',
204
+ uploadedMsg: 'uploaded'
205
+ },
206
+ CapDndGraph: {
207
+ deleteBlockModalHeaderText: 'Delete block',
208
+ deleteBlockModalDescriptionText: 'Are you sure you want to delete this block?',
209
+ yesDeleteButtonText: 'Yes, delete',
210
+ noButtonText: 'No',
211
+ joinDropErrorText: "Join block can only be added at the end of the path",
212
+ jumpDropErrorText: "Jump block can only be added at the end of the path",
213
+ theText: 'The',
214
+ endText: 'End',
215
+ blockIsLinkedText: 'block is linked to the',
216
+ blockText: 'block.',
217
+ disconnectText: 'Deleting this block will disconnect the join.',
218
+ areYouSureText: 'Are you sure?'
219
+ },
220
+ CapDragAndDrop: {
221
+ dropboxtext: 'Drop here!',
222
+ selectFilesText: 'Select files from your computer',
223
+ invalidFileSelectionText: 'Invalid file selection!',
224
+ or: 'OR',
225
+ droptext: 'Drag and drop files'
226
+ },
227
+ CapRoadMap: {
228
+ defaultRoadMapDisabledMessage: "Not configured yet"
229
+ },
230
+ CapTimelineCard: {
231
+ defaultConfiguringMessage: 'Configuring...',
232
+ defaultNotConfiguredMessage: 'Not configured yet...',
233
+ toConfigure: 'To configure ',
234
+ completePrevSteps: ' complete the previous steps.'
235
+ },
236
+ CapTimelineNestedCard: {
237
+ defaultConfiguringMessage: 'Configuring...',
238
+ defaultNotConfiguredMessage: 'Not configured yet...',
239
+ toConfigure: 'To configure ',
240
+ completePrevSteps: ' complete the previous steps.'
241
+ },
242
+ NestedCardParent: {
243
+ defaultNestedTitle: 'Triggers',
244
+ toConfigure: 'To configure ',
245
+ completePrevSteps: ' complete the previous steps.'
246
+ },
247
+ 'CapAskAira.DocumentationBot': {
248
+ textAskYourQuestion: "Ask your question here",
249
+ textVisitDocs: "Visit Capillary Documentation",
250
+ textNeedHelp: "Need more help?",
251
+ textHowMayIHelp: "How may AI help you?",
252
+ textAira: "AiRA Documentation Bot",
253
+ textLinks: "Links",
254
+ textWasHelpful: "Was this response helpful?",
255
+ textConfidence: "confidence",
256
+ textTooltip: "Need help? Ask Aira",
257
+ textCantConnect: "Can't connect to the server."
258
+ },
259
+ 'CapAskAira.RuleGenerationBot': {
260
+ textTypeAMessage: 'Type a message above and ask AiRA to recommend the best content',
261
+ textError: "An error occurred while generating rule. Try again.",
262
+ textAiraTitle: "AiRA Rule Generation",
263
+ textAiraTooltip: "AiRA, our proprietary AI tool, generates rule expressions based on text query.",
264
+ textCopy: "Copy",
265
+ textCopied: "Copied",
266
+ textRulePlaceholder: "Enter query...",
267
+ textRuleLoading: "Rule is loading... Hang tight!",
268
+ textThank: 'Thank you for your response!',
269
+ textWarn: 'Aira responses may be inaccurate or misleading. Help us to improve!',
270
+ textAddCommentPlaceholder: 'Add comment'
271
+ },
272
+ 'CapAskAira.ContentGenerationBot': {
273
+ textTypeAMessage: 'Type a message above and ask AiRA to recommend the best content',
274
+ textRecommendationsLoading: "Recommendations loading... Hang tight!",
275
+ textError: "An error occurred while loading recommendations. Try again.",
276
+ textAiraTitle: "AiRA Content Recommendations",
277
+ textAiraTooltip: "AiRA, our proprietary AI tool, recommends tailored language to effectively engage customers and prompt desired actions.",
278
+ textLoading: "loading...",
279
+ textCharacters: "characters",
280
+ textReplaceWithThis: "Replace with this",
281
+ textReplaced: 'Replaced',
282
+ textResetToDefault: "Reset to default",
283
+ textMoreLikeThis: "More like this",
284
+ textGenerateMore: "Generate more"
285
+ },
286
+ 'CapAskAira.ConfigurationBot': {
287
+ textAiraTitle: 'Aira Configuration Bot',
288
+ textAiraTooltip: "Aira, our proprietary AI tool, helps you configure promotions, campaigns, and more.",
289
+ textTypeAMessage: 'Type a message above and ask AiRA to recommend the best content',
290
+ textUser: 'Hello!',
291
+ textPilot: "I'm your Copilot. I can create all type of promotions (milestones, streaks, etc.) on your behalf. Meanwhile, you can sit back, relax, and enjoy a cup of chai.",
292
+ textCouponTile: 'Milestone on GS',
293
+ textCouponDescription: 'Customer has to do 1000/- gross sales in a month, and can get 100 points.',
294
+ textPromotionTitle: 'Milestone on count',
295
+ textPromotionDescription: 'Eligible customers get points on every 5 transactions.',
296
+ textStreakTitle: 'Reward on referral',
297
+ textStreakDescription: 'Award customer 150 points if they refer 3 users in a month. Promotion starts on July 1 and runs for 5 months.',
298
+ textPromptHere: 'Enter a prompt here...',
299
+ textCouponPrompt: 'If customer does 1000 gross sales in a month, award them 100 points that expire in 20 days. Promotion runs from 1 July to 1 December.',
300
+ textPromotionPrompt: 'After every 5 transactions I want to award customer with 200 points. Only customers with more than 2000 lifetime points are eligible. Promotion runs from 1 July to 1 December',
301
+ textStreakPrompt: 'Award customer 150 points if they refer 3 users in a month. Promotion starts on July 1 and runs for 5 months. ',
302
+ textCantConnect: "Can't connect to the server.",
303
+ textCreate: 'Create',
304
+ textCancel: 'Cancel',
305
+ textGeneratingResponse: 'Generating response'
306
+ },
307
+ 'CapAskAira.DocumentationChatBot': {
308
+ textBotPlaceholder: 'Ask Aira about anything on our CRM platform',
309
+ textChatBotLoader: 'Hang tight, analyzing your query...',
310
+ textChatBotDesc: 'Ask any doubts about our CRM platform and Aira will do its best to find answers',
311
+ textChatBot: 'Documentation Chat Bot'
312
+ },
313
+ 'CapAskAira.CapAiMediaGeneration': {
314
+ textImageBotPlaceholder: 'Ask Aira to generate an image',
315
+ textChatBotLoader: 'Hang tight, analyzing your query...',
316
+ textImageBotDesc: 'Enter a prompt that describes your image.',
317
+ textImageBot: 'Aira Media Generator',
318
+ textImageFooter: 'Dragging and dropping generated images is only supported in the basic email builder.',
319
+ textTipsGenerate: 'Tips to generate better images:',
320
+ textCopy: 'Copy image',
321
+ textCopied: 'Copied',
322
+ textDownload: 'Download',
323
+ textImageDownload: 'Image downloaded successfully!',
324
+ textComingSoon: 'Coming soon',
325
+ textGenerateMore: 'Generate more'
326
+ },
327
+ 'CapAskAira.RuleSummarizationBot': {
328
+ textRuleBotPlaceholder: 'Ask Aira to write an expression',
329
+ textSummarizeBotPlaceholder: 'Ask Aira to explain an expression',
330
+ textRuleChatBotLoader: 'Hang tight, analyzing your query...',
331
+ textRuleChatBotDesc: 'Write your detailed rule in simple english and Aira will write the expression for you',
332
+ textSummarizeChatBotDesc: 'Enter the expression and Aira will generate a summary in plain english',
333
+ textRuleChatBot: 'Aira Expression Translator'
334
+ }
335
+ };
package/index.js CHANGED
@@ -1,21 +1,10 @@
1
1
  // Import and export all components
2
- export { default as CapIcon } from './CapIcon';
3
2
  export { default as CapInput } from './CapInput';
4
- export { default as CapLabel } from './CapLabel';
5
- export { default as CapRow } from './CapRow';
6
- export { default as CapSkeleton } from './CapSkeleton';
7
- export { default as CapSpin } from './CapSpin';
8
3
  export { default as CapTable } from './CapTable';
9
- export { default as CapTooltip } from './CapTooltip';
10
- export { default as CapTooltipWithInfo } from './CapTooltipWithInfo';
11
- export { default as CapUnifiedSelect } from './CapUnifiedSelect';
12
4
 
13
5
  // Export utilities
14
6
  export { default as LocaleHoc } from './LocaleHoc';
15
7
 
16
8
  // Export styled utilities
17
9
  export * as styledVars from './styled/variables';
18
- export { default as styled } from './styled';
19
-
20
- // Export utils
21
- export * as Utils from './utils';
10
+ export { default as styled } from './styled';
package/package.json CHANGED
@@ -1,9 +1,11 @@
1
1
  {
2
2
  "name": "@capillarytech/blaze-ui",
3
3
  "author": "Capillary Technologies",
4
- "version": "0.1.6-alpha.58",
4
+ "version": "0.1.6-alpha.6",
5
5
  "description": "Capillary UI component library with Ant Design v5",
6
- "main": "./index.js",
6
+ "main": "./dist/index.js",
7
+ "module": "./dist/esm/index.js",
8
+ "jsnext:main": "./dist/esm/index.js",
7
9
  "sideEffects": [
8
10
  "*.css",
9
11
  "*.less",
@@ -24,12 +26,16 @@
24
26
  "!**/tests"
25
27
  ],
26
28
  "homepage": "https://github.com/Capillary/blaze-ui",
29
+ "peerDependencies": {
30
+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0",
31
+ "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
32
+ },
27
33
  "dependencies": {
34
+ "antd": "^5.12.0",
28
35
  "@ant-design/icons": "^5.2.6",
29
36
  "@capillarytech/cap-ui-utils": "^3.0.4",
30
- "antd-v5": "npm:antd@^5.26.7",
31
37
  "prop-types": "^15.8.1",
32
- "react-intl": "2.7.2",
33
- "styled-components": "^5.3.11"
38
+ "styled-components": "^5.3.11",
39
+ "react-intl": "^6.5.0"
34
40
  }
35
41
  }
package/.DS_Store DELETED
Binary file
@@ -1,183 +0,0 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import classnames from 'classnames';
4
- import styled from 'styled-components';
5
- import * as AntdIcons from '@ant-design/icons';
6
- import { IconWrapper, BackgroundWrapper, iconStyles } from './styles';
7
- import withStyles from '../utils/withStyles';
8
-
9
- const StyledIcon = styled.span`
10
- ${iconStyles}
11
- `;
12
-
13
- const getSvgIcon = (type, svgProps = {}) => {
14
- const icons = {
15
- // Add your SVG icons here if needed
16
- };
17
-
18
- const IconComponent = icons[type];
19
- return IconComponent ? <IconComponent {...svgProps} /> : null;
20
- };
21
-
22
- const getAntIcon = (type) => {
23
- // Convert kebab-case to PascalCase for Ant Design icon naming
24
- const pascalCase = type
25
- .split('-')
26
- .map(part => part.charAt(0).toUpperCase() + part.slice(1))
27
- .join('');
28
-
29
- // Try different naming conventions
30
- const iconName = `${pascalCase}Outlined`;
31
- const iconNameFilled = `${pascalCase}Filled`;
32
- const iconNameTwoTone = `${pascalCase}TwoTone`;
33
-
34
- return AntdIcons[iconName] || AntdIcons[iconNameFilled] || AntdIcons[iconNameTwoTone];
35
- };
36
-
37
- const CapIcon = ({
38
- type,
39
- size = 'm',
40
- style = {},
41
- className = '',
42
- disabled = false,
43
- spin = false,
44
- rotate,
45
- withBackground = false,
46
- backgroundProps = {},
47
- onClick,
48
- textLabel,
49
- component,
50
- svgProps = {},
51
- allowSvg = true,
52
- ...rest
53
- }) => {
54
- const handleClick = (e) => {
55
- if (!disabled && onClick) {
56
- onClick(e);
57
- }
58
- };
59
-
60
- // Render custom component if provided
61
- if (component) {
62
- return (
63
- <IconWrapper
64
- className={classnames('cap-icon', size, { 'with-text-label': textLabel }, className)}
65
- style={style}
66
- disabled={disabled}
67
- onClick={handleClick}
68
- {...rest}
69
- >
70
- {component}
71
- {textLabel}
72
- </IconWrapper>
73
- );
74
- }
75
-
76
- // Try to get SVG icon if allowSvg is true
77
- const svgIcon = allowSvg && type ? getSvgIcon(type, svgProps) : null;
78
-
79
- // If SVG icon exists and allowSvg is true, use it
80
- if (svgIcon) {
81
- const iconComponent = (
82
- <IconWrapper
83
- className={classnames('cap-icon', size, { spin }, { 'with-text-label': textLabel }, className)}
84
- style={{
85
- ...style,
86
- transform: rotate ? `rotate(${rotate}deg)` : undefined
87
- }}
88
- disabled={disabled}
89
- onClick={handleClick}
90
- {...rest}
91
- >
92
- {svgIcon}
93
- {textLabel}
94
- </IconWrapper>
95
- );
96
-
97
- return withBackground ? (
98
- <BackgroundWrapper size={size} {...backgroundProps}>
99
- {iconComponent}
100
- </BackgroundWrapper>
101
- ) : iconComponent;
102
- }
103
-
104
- // Try to get Ant Design icon
105
- const AntIcon = type ? getAntIcon(type) : null;
106
-
107
- if (AntIcon) {
108
- const iconComponent = (
109
- <IconWrapper
110
- className={classnames('cap-icon', size, { 'with-text-label': textLabel }, className)}
111
- style={style}
112
- disabled={disabled}
113
- onClick={handleClick}
114
- {...rest}
115
- >
116
- <AntIcon
117
- spin={spin}
118
- rotate={rotate}
119
- />
120
- {textLabel}
121
- </IconWrapper>
122
- );
123
-
124
- return withBackground ? (
125
- <BackgroundWrapper size={size} {...backgroundProps}>
126
- {iconComponent}
127
- </BackgroundWrapper>
128
- ) : iconComponent;
129
- }
130
-
131
- // Fallback: render an empty icon container
132
- return (
133
- <IconWrapper
134
- className={classnames('cap-icon', size, { 'with-text-label': textLabel }, className)}
135
- style={style}
136
- disabled={disabled}
137
- onClick={handleClick}
138
- {...rest}
139
- >
140
- {textLabel}
141
- </IconWrapper>
142
- );
143
- };
144
-
145
- CapIcon.propTypes = {
146
- type: PropTypes.string,
147
- size: PropTypes.oneOf(['xs', 's', 'm', 'l']),
148
- style: PropTypes.object,
149
- className: PropTypes.string,
150
- disabled: PropTypes.bool,
151
- spin: PropTypes.bool,
152
- rotate: PropTypes.number,
153
- withBackground: PropTypes.bool,
154
- backgroundProps: PropTypes.object,
155
- onClick: PropTypes.func,
156
- textLabel: PropTypes.node,
157
- component: PropTypes.node,
158
- svgProps: PropTypes.object,
159
- allowSvg: PropTypes.bool,
160
- };
161
-
162
- CapIcon.defaultProps = {
163
- size: 'm',
164
- style: {},
165
- className: '',
166
- disabled: false,
167
- spin: false,
168
- withBackground: false,
169
- backgroundProps: {},
170
- svgProps: {},
171
- allowSvg: true,
172
- };
173
-
174
- // Create AntIcon subcomponent for backward compatibility
175
- const AntIcon = styled.i`
176
- display: inline-flex;
177
- align-items: center;
178
- justify-content: center;
179
- `;
180
-
181
- CapIcon.AntIcon = AntIcon;
182
-
183
- export default withStyles(CapIcon, iconStyles);
package/CapIcon/index.js DELETED
@@ -1,3 +0,0 @@
1
- import CapIcon from './CapIcon';
2
-
3
- export default CapIcon;
package/CapIcon/styles.js DELETED
@@ -1,76 +0,0 @@
1
- import styled, { css } from 'styled-components';
2
- import * as styledVars from '../styled/variables';
3
-
4
- export const IconWrapper = styled.span`
5
- display: inline-flex;
6
- align-items: center;
7
- justify-content: center;
8
- cursor: ${({ disabled }) => (disabled ? 'not-allowed' : 'pointer')};
9
- opacity: ${({ disabled }) => (disabled ? 0.5 : 1)};
10
-
11
- &.xs {
12
- font-size: 12px;
13
- width: 12px;
14
- height: 12px;
15
- }
16
-
17
- &.s {
18
- font-size: 16px;
19
- width: 16px;
20
- height: 16px;
21
- }
22
-
23
- &.m {
24
- font-size: 24px;
25
- width: 24px;
26
- height: 24px;
27
- }
28
-
29
- &.l {
30
- font-size: 32px;
31
- width: 32px;
32
- height: 32px;
33
- }
34
-
35
- &.with-text-label {
36
- display: inline-flex;
37
- align-items: center;
38
- gap: 8px;
39
- }
40
- `;
41
-
42
- export const BackgroundWrapper = styled.span`
43
- display: inline-flex;
44
- align-items: center;
45
- justify-content: center;
46
- border-radius: 50%;
47
- background-color: ${({ bgColor }) => bgColor || styledVars.CAP_G09};
48
- width: ${({ size }) => (size === 'xs' ? '20px' : size === 's' ? '24px' : size === 'l' ? '48px' : '36px')};
49
- height: ${({ size }) => (size === 'xs' ? '20px' : size === 's' ? '24px' : size === 'l' ? '48px' : '36px')};
50
- `;
51
-
52
- export const iconStyles = css`
53
- &.cap-icon {
54
- display: inline-flex;
55
- align-items: center;
56
-
57
- .anticon {
58
- display: flex;
59
- align-items: center;
60
- justify-content: center;
61
- }
62
-
63
- &.spin {
64
- animation: rotate 2s linear infinite;
65
- }
66
- }
67
-
68
- @keyframes rotate {
69
- from {
70
- transform: rotate(0deg);
71
- }
72
- to {
73
- transform: rotate(360deg);
74
- }
75
- }
76
- `;
@@ -1,17 +0,0 @@
1
- /**
2
- * CapSkeleton - Migrated to Ant Design v5
3
- */
4
- import React from 'react';
5
- import PropTypes from 'prop-types';
6
- import { Skeleton } from 'antd-v5';
7
-
8
- const CapSkeleton = ({ className, ...rest }) => {
9
- const combinedClassName = `cap-skeleton-v2 ${className || ''}`.trim();
10
- return <Skeleton className={combinedClassName} {...rest} />;
11
- };
12
-
13
- CapSkeleton.propTypes = {
14
- className: PropTypes.string
15
- };
16
-
17
- export default CapSkeleton;
@@ -1 +0,0 @@
1
- export { default } from './CapSkeleton';