@capillarytech/blaze-ui 0.1.6-alpha.28 → 0.1.6-alpha.3

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 (158) 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/loadable.js +9 -0
  8. package/CapLabel/CapLabel.js +106 -0
  9. package/CapLabel/index.js +1 -0
  10. package/CapLabel/styles.js +221 -0
  11. package/CapRow/CapRow.js +22 -0
  12. package/CapRow/index.js +1 -0
  13. package/CapRow/styles.js +9 -0
  14. package/CapTable/loadable.js +4 -4
  15. package/CapTooltip/CapTooltip.js +36 -0
  16. package/CapTooltip/index.js +1 -0
  17. package/CapTooltip/styles.js +42 -0
  18. package/CapUnifiedSelect/CapUnifiedSelect.js +51 -304
  19. package/CapUnifiedSelect/index.js +4 -1
  20. package/CapUnifiedSelect/loadable.js +3 -0
  21. package/CapUnifiedSelect/styles.js +174 -62
  22. package/dist/235.index.js +2 -0
  23. package/dist/235.index.js.LICENSE.txt +29 -0
  24. package/dist/603.index.js +1 -0
  25. package/dist/CapTable/loadable.js +4 -4
  26. package/dist/esm/CapHeading/CapHeading.js +41 -0
  27. package/dist/esm/CapHeading/index.js +1 -0
  28. package/dist/esm/CapHeading/styles.js +123 -0
  29. package/dist/esm/CapInfoNote/CapInfoNote.js +62 -0
  30. package/dist/esm/CapInfoNote/index.js +1 -0
  31. package/dist/esm/CapInfoNote/styles.js +6 -0
  32. package/dist/esm/CapInput/loadable.js +9 -0
  33. package/dist/esm/CapLabel/CapLabel.js +50 -0
  34. package/dist/esm/CapLabel/index.js +1 -0
  35. package/dist/esm/CapLabel/styles.js +219 -0
  36. package/dist/esm/{CapSkeleton/CapSkeleton.js → CapRow/CapRow.js} +12 -12
  37. package/dist/esm/CapRow/index.js +1 -0
  38. package/dist/esm/CapRow/styles.js +5 -0
  39. package/dist/esm/CapTable/loadable.js +4 -4
  40. package/dist/esm/CapTooltip/CapTooltip.js +34 -0
  41. package/dist/esm/CapTooltip/index.js +1 -0
  42. package/dist/esm/CapTooltip/styles.js +6 -0
  43. package/dist/esm/CapUnifiedSelect/CapUnifiedSelect.js +38 -335
  44. package/dist/esm/CapUnifiedSelect/index.js +3 -1
  45. package/dist/esm/CapUnifiedSelect/loadable.js +4 -0
  46. package/dist/esm/CapUnifiedSelect/styles.js +3 -19
  47. package/dist/esm/index.js +1 -5
  48. package/dist/index.js +0 -27
  49. package/dist/index.js.LICENSE.txt +7 -0
  50. package/index.js +1 -5
  51. package/package.json +10 -8
  52. package/CapSkeleton/CapSkeleton.js +0 -17
  53. package/CapSkeleton/index.js +0 -1
  54. package/CapSpin/CapSpin.js +0 -23
  55. package/CapSpin/index.js +0 -1
  56. package/CapTestSelect/CapTestSelect.js +0 -47
  57. package/CapTestSelect/index.js +0 -1
  58. package/components/CapInput/CapInput.js +0 -67
  59. package/components/CapInput/Number.js +0 -38
  60. package/components/CapInput/Search.js +0 -32
  61. package/components/CapInput/TextArea.js +0 -45
  62. package/components/CapInput/index.js +0 -10
  63. package/components/CapInput/messages.js +0 -27
  64. package/components/CapInput/styles.js +0 -81
  65. package/components/CapSkeleton/CapSkeleton.js +0 -17
  66. package/components/CapSkeleton/index.js +0 -1
  67. package/components/CapSpin/CapSpin.js +0 -23
  68. package/components/CapSpin/index.js +0 -1
  69. package/components/CapTable/CapTable.js +0 -146
  70. package/components/CapTable/index.js +0 -3
  71. package/components/CapTable/loadable.js +0 -13
  72. package/components/CapTable/styles.js +0 -134
  73. package/components/CapTestSelect/CapTestSelect.js +0 -47
  74. package/components/CapTestSelect/index.js +0 -1
  75. package/components/CapUnifiedSelect/CapUnifiedSelect.js +0 -374
  76. package/components/CapUnifiedSelect/index.js +0 -1
  77. package/components/CapUnifiedSelect/messages.js +0 -24
  78. package/components/CapUnifiedSelect/styles.js +0 -111
  79. package/components/LocaleHoc/index.js +0 -38
  80. package/components/index.js +0 -14
  81. package/components/styled/index.js +0 -6
  82. package/components/styled/variables.js +0 -89
  83. package/components/translations/en.js +0 -331
  84. package/dist/CapSkeleton/CapSkeleton.js +0 -29
  85. package/dist/CapSkeleton/index.js +0 -13
  86. package/dist/CapSpin/CapSpin.js +0 -35
  87. package/dist/CapSpin/index.js +0 -13
  88. package/dist/CapTestSelect/CapTestSelect.js +0 -40
  89. package/dist/CapTestSelect/index.js +0 -13
  90. package/dist/CapUnifiedSelect/CapUnifiedSelect.js +0 -405
  91. package/dist/CapUnifiedSelect/index.js +0 -13
  92. package/dist/CapUnifiedSelect/messages.js +0 -29
  93. package/dist/CapUnifiedSelect/styles.js +0 -39
  94. package/dist/components/CapInput/CapInput.js +0 -66
  95. package/dist/components/CapInput/Number.js +0 -42
  96. package/dist/components/CapInput/Search.js +0 -35
  97. package/dist/components/CapInput/TextArea.js +0 -42
  98. package/dist/components/CapInput/index.js +0 -15
  99. package/dist/components/CapInput/messages.js +0 -32
  100. package/dist/components/CapInput/styles.js +0 -11
  101. package/dist/components/CapSkeleton/CapSkeleton.js +0 -29
  102. package/dist/components/CapSkeleton/index.js +0 -13
  103. package/dist/components/CapSpin/CapSpin.js +0 -35
  104. package/dist/components/CapSpin/index.js +0 -13
  105. package/dist/components/CapTable/CapTable.js +0 -148
  106. package/dist/components/CapTable/index.js +0 -9
  107. package/dist/components/CapTable/loadable.js +0 -23
  108. package/dist/components/CapTable/styles.js +0 -26
  109. package/dist/components/CapTestSelect/CapTestSelect.js +0 -40
  110. package/dist/components/CapTestSelect/index.js +0 -13
  111. package/dist/components/CapUnifiedSelect/CapUnifiedSelect.js +0 -406
  112. package/dist/components/CapUnifiedSelect/index.js +0 -13
  113. package/dist/components/CapUnifiedSelect/messages.js +0 -29
  114. package/dist/components/CapUnifiedSelect/styles.js +0 -39
  115. package/dist/components/LocaleHoc/index.js +0 -40
  116. package/dist/components/index.js +0 -66
  117. package/dist/components/styled/index.js +0 -22
  118. package/dist/components/styled/variables.js +0 -94
  119. package/dist/components/translations/en.js +0 -335
  120. package/dist/esm/CapSkeleton/index.js +0 -1
  121. package/dist/esm/CapSpin/CapSpin.js +0 -28
  122. package/dist/esm/CapSpin/index.js +0 -1
  123. package/dist/esm/CapTestSelect/CapTestSelect.js +0 -34
  124. package/dist/esm/CapTestSelect/index.js +0 -1
  125. package/dist/esm/components/CapInput/CapInput.js +0 -57
  126. package/dist/esm/components/CapInput/Number.js +0 -35
  127. package/dist/esm/components/CapInput/Search.js +0 -28
  128. package/dist/esm/components/CapInput/TextArea.js +0 -35
  129. package/dist/esm/components/CapInput/index.js +0 -8
  130. package/dist/esm/components/CapInput/messages.js +0 -25
  131. package/dist/esm/components/CapInput/styles.js +0 -3
  132. package/dist/esm/components/CapSkeleton/CapSkeleton.js +0 -22
  133. package/dist/esm/components/CapSkeleton/index.js +0 -1
  134. package/dist/esm/components/CapSpin/CapSpin.js +0 -28
  135. package/dist/esm/components/CapSpin/index.js +0 -1
  136. package/dist/esm/components/CapTable/CapTable.js +0 -140
  137. package/dist/esm/components/CapTable/index.js +0 -2
  138. package/dist/esm/components/CapTable/loadable.js +0 -12
  139. package/dist/esm/components/CapTable/styles.js +0 -17
  140. package/dist/esm/components/CapTestSelect/CapTestSelect.js +0 -34
  141. package/dist/esm/components/CapTestSelect/index.js +0 -1
  142. package/dist/esm/components/CapUnifiedSelect/CapUnifiedSelect.js +0 -398
  143. package/dist/esm/components/CapUnifiedSelect/index.js +0 -1
  144. package/dist/esm/components/CapUnifiedSelect/messages.js +0 -23
  145. package/dist/esm/components/CapUnifiedSelect/styles.js +0 -31
  146. package/dist/esm/components/LocaleHoc/index.js +0 -31
  147. package/dist/esm/components/index.js +0 -15
  148. package/dist/esm/components/styled/index.js +0 -5
  149. package/dist/esm/components/styled/variables.js +0 -88
  150. package/dist/esm/components/translations/en.js +0 -329
  151. package/dist/esm/utils/index.js +0 -1
  152. package/dist/esm/utils/withStyles.js +0 -23
  153. package/dist/esm/withStyles.js +0 -23
  154. package/dist/utils/index.js +0 -13
  155. package/dist/utils/withStyles.js +0 -29
  156. package/dist/withStyles.js +0 -29
  157. package/utils/index.js +0 -1
  158. package/utils/withStyles.js +0 -24
@@ -0,0 +1 @@
1
+ "use strict";(this.webpackChunk_capillarytech_blaze_ui=this.webpackChunk_capillarytech_blaze_ui||[]).push([[603],{603:(t,e,a)=>{a.r(e),a.d(e,{default:()=>G});var o=a(2015),n=a.n(o),l=a(9825),r=a.n(l),d=a(7825),i=a(3892),c=a.n(i),b=a(9266),s=a(6235),h=a(2770),p=a.n(h),u=a(4828);const{CAP_G09:g,CAP_G01:f,CAP_G06:y,CAP_G07:w,CAP_G10:v,SPACING_16:x,SPACING_24:m,FONT_SIZE_S:_}=u,C=p()(s.A).withConfig({displayName:"StyledTable",componentId:"sc-1ldu1k4-0"})(["&.cap-table-v2{.ant-table{border:1px solid ",";}}&.show-loader{.ant-table-body > table > tbody::after{content:'","';display:flex;justify-content:center;position:absolute;width:100%;align-items:center;height:60px;text-align:center;font-size:16px;color:gray;border-top:1px solid ",";}}"],w,t=>t.loadMoreData,w),S=(0,h.css)([".ant-table{border:1px solid ",";.ant-table-thead > tr > th{color:",";font-size:",";line-height:",";background-color:",";text-align:left;}.ant-table-thead > tr > th,.ant-table-tbody > tr > td{padding:"," ",";}.ant-table-tbody > tr > td{border-bottom:1px solid ",";}.ant-table-tbody > tr:last-child > td{border-bottom:none;}.ant-table-thead > tr.ant-table-row-hover:not(.ant-table-expanded-row) > td,.ant-table-tbody > tr.ant-table-row-hover:not(.ant-table-expanded-row) > td,.ant-table-thead > tr:hover:not(.ant-table-expanded-row) > td,.ant-table-tbody > tr:hover:not(.ant-table-expanded-row) > td{background-color:",";}.ant-table-thead > tr > th .ant-table-column-sorter-up,.ant-table-thead > tr > th .ant-table-column-sorter-down{&.active{color:",";}&:not(.active){color:",";}}.ant-table-thead{.table-children{padding:6px "," 16px;position:relative;}.table-parent{padding-bottom:0;padding-left:",";}.table-children.show-separator:not(:last-child)::after{content:'';height:8px;width:1px;right:0;top:30%;background-color:",";position:absolute;}}.ant-table-thead > tr > th .ant-table-column-sorter{vertical-align:unset;}.ant-table-body table{table-layout:fixed;width:100%;}}&.no-pagination-loader{.ant-table-body > table > tbody::after{content:'';height:unset;display:none;}}&.hide-hover{.ant-table{.ant-table-thead > tr.ant-table-row-hover:not(.ant-table-expanded-row) > td,.ant-table-tbody > tr.ant-table-row-hover:not(.ant-table-expanded-row) > td,.ant-table-thead > tr:hover:not(.ant-table-expanded-row) > td,.ant-table-tbody > tr:hover:not(.ant-table-expanded-row) > td{background:none;}}}a{color:",";}"],w,f,_,x,v,x,m,w,g,f,y,m,m,w,f);var k=a(2411);function P(){return P=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var o in a)({}).hasOwnProperty.call(a,o)&&(t[o]=a[o])}return t},P.apply(null,arguments)}const A=t=>{let{id:e,className:a,children:l,infiniteScroll:r,pagination:i,dataSource:b,offset_limit:s,setPagination:h,scroll:p,showLoader:u,...g}=t;const f=(0,o.useRef)(null),[y,w]=(0,o.useState)(!0),v=(0,o.useRef)(0),x=(0,o.useCallback)(()=>{if(!u&&y){const t=v.current+1,e={...s,offset:t};v.current=t,h(e)}},[u,y,h,s]),m=(0,o.useCallback)((0,d.debounce)(t=>{const e=t.target;e&&r&&y&&!u&&(Math.ceil(e.scrollTop)+e.clientHeight)/e.scrollHeight*100>=80&&x()},250),[r,u,y,x]);(0,o.useEffect)(()=>{const t=document.querySelector(`#${e} .ant-table-body`);if(t)return f.current=t,t.addEventListener("scroll",m,{passive:!0}),t.scrollHeight<=t.clientHeight&&!u&&y&&(v.current=0,x()),()=>{f.current?.removeEventListener("scroll",m),m.cancel()}},[e,m,u,y,x]),(0,o.useEffect)(()=>{b?.length||(v.current=0),w(!0)},[b]);const _=c()("cap-table-v2",a,{"show-loader":u,"infinite-scroll":r,"has-more":y});return n().createElement(C,P({id:e,className:_,dataSource:b,pagination:!1,scroll:{x:p?.x,y:p?.y||400,scrollToFirstRowOnChange:!1},virtual:r,rowHeight:54},g),l)};A.propTypes={id:r().string.isRequired,className:r().string,children:r().node,infiniteScroll:r().bool,pagination:r().oneOfType([r().object,r().bool]),dataSource:r().array,offset_limit:r().object,setPagination:r().func,scroll:r().object,showLoader:r().bool};const G=(0,k.A)((0,b.withStyles)(A,S),{key:"CapTable"})}}]);
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports["default"] = void 0;
7
- var _CapSkeleton = _interopRequireDefault(require("../CapSkeleton"));
7
+ var _CapSpin = _interopRequireDefault(require("@capillarytech/cap-ui-library/CapSpin"));
8
8
  var _capUiUtils = require("@capillarytech/cap-ui-utils");
9
9
  var _react = _interopRequireWildcard(require("react"));
10
10
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
@@ -15,9 +15,9 @@ var LoadableComponent = (0, _capUiUtils.loadable)(function () {
15
15
  return _interopRequireWildcard(require('./CapTable'));
16
16
  });
17
17
  });
18
- var CapTableLoadable = function CapTableLoadable(props) {
18
+ var CapTableLoadable = function CapTableLoadable() {
19
19
  return /*#__PURE__*/_react["default"].createElement(_react.Suspense, {
20
- fallback: /*#__PURE__*/_react["default"].createElement(_CapSkeleton["default"], null)
21
- }, /*#__PURE__*/_react["default"].createElement(LoadableComponent, props));
20
+ fallback: /*#__PURE__*/_react["default"].createElement(_CapSpin["default"], null)
21
+ }, /*#__PURE__*/_react["default"].createElement(LoadableComponent, null));
22
22
  };
23
23
  var _default = exports["default"] = CapTableLoadable;
@@ -0,0 +1,41 @@
1
+ var _excluded = ["type", "children", "as"],
2
+ _excluded2 = ["type", "children"];
3
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
4
+ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
5
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
6
+ import React from 'react';
7
+ import PropTypes from 'prop-types';
8
+ import { HeadingWrapper, HeadingSpan } from './styles';
9
+ var CapHeading = function CapHeading(_ref) {
10
+ var _ref$type = _ref.type,
11
+ type = _ref$type === void 0 ? 'h5' : _ref$type,
12
+ children = _ref.children,
13
+ as = _ref.as,
14
+ rest = _objectWithoutProperties(_ref, _excluded);
15
+ return /*#__PURE__*/React.createElement(HeadingWrapper, _extends({
16
+ type: type,
17
+ as: as || 'div'
18
+ }, rest), children);
19
+ };
20
+ CapHeading.propTypes = {
21
+ type: PropTypes.oneOf(['h0', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'h7', 'h8', 'h9', 'h10', 'label1', 'label2', 'label3', 'label4', 'label5', 'label6']),
22
+ children: PropTypes.node,
23
+ as: PropTypes.string
24
+ };
25
+
26
+ // Inline span version
27
+ var CapHeadingSpan = function CapHeadingSpan(_ref2) {
28
+ var _ref2$type = _ref2.type,
29
+ type = _ref2$type === void 0 ? 'h5' : _ref2$type,
30
+ children = _ref2.children,
31
+ rest = _objectWithoutProperties(_ref2, _excluded2);
32
+ return /*#__PURE__*/React.createElement(HeadingSpan, _extends({
33
+ type: type
34
+ }, rest), children);
35
+ };
36
+ CapHeadingSpan.propTypes = {
37
+ type: PropTypes.oneOf(['h0', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'h7', 'h8', 'h9', 'h10', 'label1', 'label2', 'label3', 'label4', 'label5', 'label6']),
38
+ children: PropTypes.node
39
+ };
40
+ CapHeading.Span = CapHeadingSpan;
41
+ export default CapHeading;
@@ -0,0 +1 @@
1
+ export { default } from './CapHeading';
@@ -0,0 +1,123 @@
1
+ import styled, { css } from 'styled-components';
2
+ import * as styledVars from '../styled/variables';
3
+ var headings = {
4
+ h0: {
5
+ fontSize: '28px',
6
+ fontWeight: '500',
7
+ color: styledVars.CAP_G01,
8
+ lineHeight: '36px'
9
+ },
10
+ h1: {
11
+ fontSize: '24px',
12
+ fontWeight: '500',
13
+ color: styledVars.CAP_G01,
14
+ lineHeight: '32px'
15
+ },
16
+ h2: {
17
+ fontSize: '20px',
18
+ fontWeight: '500',
19
+ color: styledVars.CAP_G01,
20
+ lineHeight: '28px'
21
+ },
22
+ h3: {
23
+ fontSize: '16px',
24
+ fontWeight: '500',
25
+ color: styledVars.CAP_G01,
26
+ lineHeight: '24px'
27
+ },
28
+ h4: {
29
+ fontSize: '14px',
30
+ fontWeight: '500',
31
+ color: styledVars.CAP_G01,
32
+ lineHeight: '20px'
33
+ },
34
+ h5: {
35
+ fontSize: '14px',
36
+ fontWeight: 'normal',
37
+ color: styledVars.CAP_G01,
38
+ lineHeight: '20px'
39
+ },
40
+ h6: {
41
+ color: styledVars.CAP_G04,
42
+ fontSize: '14px',
43
+ fontWeight: 'normal',
44
+ lineHeight: '20px'
45
+ },
46
+ h7: {
47
+ fontSize: '20px',
48
+ fontWeight: '500',
49
+ color: styledVars.CAP_G04,
50
+ lineHeight: '28px'
51
+ },
52
+ h8: {
53
+ fontSize: '14px',
54
+ fontWeight: '400',
55
+ color: styledVars.CAP_G01,
56
+ lineHeight: '20px'
57
+ },
58
+ h9: {
59
+ fontSize: '14px',
60
+ fontWeight: '500',
61
+ color: styledVars.CAP_WHITE,
62
+ lineHeight: '20px'
63
+ },
64
+ h10: {
65
+ fontSize: '12px',
66
+ fontWeight: '500',
67
+ color: styledVars.CAP_G01,
68
+ lineHeight: '16px'
69
+ },
70
+ label1: {
71
+ color: styledVars.CAP_G04,
72
+ fontSize: '12px',
73
+ fontWeight: 'normal',
74
+ lineHeight: '20px'
75
+ },
76
+ label2: {
77
+ color: styledVars.CAP_G01,
78
+ fontSize: '12px',
79
+ fontWeight: 'normal',
80
+ lineHeight: '20px'
81
+ },
82
+ label3: {
83
+ color: styledVars.CAP_G05,
84
+ fontSize: '12px',
85
+ fontWeight: 'normal',
86
+ lineHeight: '20px'
87
+ },
88
+ label4: {
89
+ color: styledVars.CAP_G04,
90
+ fontSize: '12px',
91
+ fontWeight: 'normal',
92
+ lineHeight: '16px'
93
+ },
94
+ label5: {
95
+ color: styledVars.CAP_G04,
96
+ fontSize: '16px',
97
+ fontWeight: 'normal',
98
+ lineHeight: '24px'
99
+ },
100
+ label6: {
101
+ color: styledVars.CAP_G01,
102
+ fontSize: '16px',
103
+ fontWeight: 'normal',
104
+ lineHeight: '24px'
105
+ }
106
+ };
107
+ var headingStyles = css(["font-size:", ";font-weight:", ";color:", ";line-height:", ";margin:0;padding:0;"], function (props) {
108
+ return headings[props.type].fontSize;
109
+ }, function (props) {
110
+ return headings[props.type].fontWeight;
111
+ }, function (props) {
112
+ return headings[props.type].color;
113
+ }, function (props) {
114
+ return headings[props.type].lineHeight;
115
+ });
116
+ export var HeadingWrapper = styled.div.withConfig({
117
+ displayName: "HeadingWrapper",
118
+ componentId: "sc-14c6fxa-0"
119
+ })(["", ""], headingStyles);
120
+ export var HeadingSpan = styled.span.withConfig({
121
+ displayName: "HeadingSpan",
122
+ componentId: "sc-14c6fxa-1"
123
+ })(["", " display:inline-block;"], headingStyles);
@@ -0,0 +1,62 @@
1
+ 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); }
2
+ var _excluded = ["message", "style", "noteText", "type", "className"];
3
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
4
+ 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; }
5
+ 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; }
6
+ 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; }
7
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
8
+ 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); }
9
+ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
10
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
11
+ import React from 'react';
12
+ import PropTypes from 'prop-types';
13
+ import { Alert } from 'antd';
14
+ import { InfoNoteWrapper } from './styles';
15
+ import CapLabel from '../CapLabel';
16
+ import CapRow from '../CapRow';
17
+ var Note = function Note(_ref) {
18
+ var noteText = _ref.noteText;
19
+ return /*#__PURE__*/React.createElement(CapLabel.Inline, {
20
+ type: "label4",
21
+ className: "note-text"
22
+ }, noteText);
23
+ };
24
+ Note.propTypes = {
25
+ noteText: PropTypes.string
26
+ };
27
+ var CapInfoNote = function CapInfoNote(_ref2) {
28
+ var message = _ref2.message,
29
+ style = _ref2.style,
30
+ noteText = _ref2.noteText,
31
+ _ref2$type = _ref2.type,
32
+ type = _ref2$type === void 0 ? 'info' : _ref2$type,
33
+ className = _ref2.className,
34
+ rest = _objectWithoutProperties(_ref2, _excluded);
35
+ return /*#__PURE__*/React.createElement(InfoNoteWrapper, null, /*#__PURE__*/React.createElement(Alert, _extends({
36
+ message: /*#__PURE__*/React.createElement(CapRow, {
37
+ className: "note-message-container"
38
+ }, /*#__PURE__*/React.createElement(Note, {
39
+ noteText: noteText
40
+ }), ":", /*#__PURE__*/React.createElement(CapRow, {
41
+ className: "message-text"
42
+ }, message)),
43
+ className: className,
44
+ type: type,
45
+ showIcon: true,
46
+ style: _objectSpread({
47
+ marginTop: '0.857rem',
48
+ marginBottom: '0.857rem'
49
+ }, style)
50
+ }, rest)));
51
+ };
52
+ CapInfoNote.propTypes = {
53
+ message: PropTypes.node,
54
+ style: PropTypes.object,
55
+ noteText: PropTypes.string,
56
+ type: PropTypes.string,
57
+ className: PropTypes.string
58
+ };
59
+ CapInfoNote.defaultProps = {
60
+ type: 'info'
61
+ };
62
+ export default CapInfoNote;
@@ -0,0 +1 @@
1
+ export { default } from './CapInfoNote';
@@ -0,0 +1,6 @@
1
+ import styled from 'styled-components';
2
+ import * as styledVars from '../styled/variables';
3
+ export var InfoNoteWrapper = styled.div.withConfig({
4
+ displayName: "InfoNoteWrapper",
5
+ componentId: "sc-1b8g28t-0"
6
+ })([".note-text{padding-left:", ";white-space:nowrap;line-height:inherit;}.note-message-container{display:flex;.message-text{margin-left:0.22rem;}}.ant-alert{padding:8px 12px;border-radius:", ";.ant-alert-icon{font-size:", ";top:9px;}&.ant-alert-info{background-color:", ";border:1px solid ", ";.ant-alert-icon{color:", ";}}&.ant-alert-success{background-color:", ";border:1px solid ", ";.ant-alert-icon{color:", ";}}&.ant-alert-warning{background-color:", ";border:1px solid ", ";.ant-alert-icon{color:", ";}}&.ant-alert-error{background-color:", ";border:1px solid ", ";.ant-alert-icon{color:", ";}}}"], styledVars.CAP_SPACE_24, styledVars.RADIUS_04, styledVars.ICON_SIZE_S, styledVars.CAP_G09, styledVars.CAP_G07, styledVars.CAP_G01, styledVars.CAP_COLOR_01, styledVars.CAP_PRIMARY.base, styledVars.CAP_PRIMARY.base, styledVars.CAP_COLOR_02, styledVars.CAP_ORANGE, styledVars.CAP_ORANGE, styledVars.CAP_COLOR_05, styledVars.CAP_RED, styledVars.CAP_RED);
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Asynchronously loads the CapInput component
3
+ */
4
+
5
+ import { loadable } from '@capillarytech/cap-ui-utils';
6
+ var CapInputLoadable = loadable(function () {
7
+ return import('./CapInput');
8
+ });
9
+ export default CapInputLoadable;
@@ -0,0 +1,50 @@
1
+ var _excluded = ["type", "children", "fontWeight", "lineHeight"],
2
+ _excluded2 = ["type", "children", "fontWeight", "lineHeight"];
3
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
4
+ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
5
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
6
+ import React from 'react';
7
+ import PropTypes from 'prop-types';
8
+ import { LabelWrapper, LabelInline } from './styles';
9
+ var CapLabel = function CapLabel(_ref) {
10
+ var _ref$type = _ref.type,
11
+ type = _ref$type === void 0 ? 'label1' : _ref$type,
12
+ children = _ref.children,
13
+ fontWeight = _ref.fontWeight,
14
+ lineHeight = _ref.lineHeight,
15
+ rest = _objectWithoutProperties(_ref, _excluded);
16
+ return /*#__PURE__*/React.createElement(LabelWrapper, _extends({
17
+ type: type,
18
+ fontWeight: fontWeight,
19
+ lineHeight: lineHeight
20
+ }, rest), children);
21
+ };
22
+ CapLabel.propTypes = {
23
+ type: PropTypes.oneOf(['label1', 'label2', 'label3', 'label4', 'label5', 'label6', 'label7', 'label8', 'label9', 'label10', 'label11', 'label12', 'label13', 'label14', 'label15', 'label16', 'label17', 'label18', 'label19', 'label20', 'label21', 'label22', 'label23', 'label24', 'label25', 'label26', 'label27', 'label28', 'label29', 'label30', 'label31', 'label32', 'label33']),
24
+ children: PropTypes.node,
25
+ fontWeight: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
26
+ lineHeight: PropTypes.string
27
+ };
28
+
29
+ // Inline span version
30
+ var CapLabelInline = function CapLabelInline(_ref2) {
31
+ var _ref2$type = _ref2.type,
32
+ type = _ref2$type === void 0 ? 'label1' : _ref2$type,
33
+ children = _ref2.children,
34
+ fontWeight = _ref2.fontWeight,
35
+ lineHeight = _ref2.lineHeight,
36
+ rest = _objectWithoutProperties(_ref2, _excluded2);
37
+ return /*#__PURE__*/React.createElement(LabelInline, _extends({
38
+ type: type,
39
+ fontWeight: fontWeight,
40
+ lineHeight: lineHeight
41
+ }, rest), children);
42
+ };
43
+ CapLabelInline.propTypes = {
44
+ type: PropTypes.oneOf(['label1', 'label2', 'label3', 'label4', 'label5', 'label6', 'label7', 'label8', 'label9', 'label10', 'label11', 'label12', 'label13', 'label14', 'label15', 'label16', 'label17', 'label18', 'label19', 'label20', 'label21', 'label22', 'label23', 'label24', 'label25', 'label26', 'label27', 'label28', 'label29', 'label30', 'label31', 'label32', 'label33']),
45
+ children: PropTypes.node,
46
+ fontWeight: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
47
+ lineHeight: PropTypes.string
48
+ };
49
+ CapLabel.Inline = CapLabelInline;
50
+ export default CapLabel;
@@ -0,0 +1 @@
1
+ export { default } from './CapLabel';
@@ -0,0 +1,219 @@
1
+ import styled, { css } from 'styled-components';
2
+ import * as styledVars from '../styled/variables';
3
+ var labels = {
4
+ label1: {
5
+ color: styledVars.CAP_G04,
6
+ fontSize: '12px',
7
+ fontWeight: 'normal',
8
+ lineHeight: 'normal'
9
+ },
10
+ label2: {
11
+ color: styledVars.CAP_G01,
12
+ fontSize: '12px',
13
+ fontWeight: 'normal',
14
+ lineHeight: 'normal'
15
+ },
16
+ label3: {
17
+ color: styledVars.CAP_G05,
18
+ fontSize: '12px',
19
+ fontWeight: 'normal',
20
+ lineHeight: 'normal'
21
+ },
22
+ label4: {
23
+ color: styledVars.CAP_G01,
24
+ fontSize: '12px',
25
+ fontWeight: '500',
26
+ lineHeight: 'normal'
27
+ },
28
+ label5: {
29
+ color: styledVars.CAP_G01,
30
+ fontSize: '10px',
31
+ fontWeight: 'normal',
32
+ lineHeight: 'normal'
33
+ },
34
+ label6: {
35
+ color: styledVars.CAP_G06,
36
+ fontSize: '12px',
37
+ fontWeight: 'normal',
38
+ lineHeight: 'normal'
39
+ },
40
+ label7: {
41
+ color: styledVars.CAP_G04,
42
+ fontSize: '14px',
43
+ fontWeight: '500',
44
+ lineHeight: 'normal'
45
+ },
46
+ label8: {
47
+ color: styledVars.CAP_G01,
48
+ fontSize: '12px',
49
+ fontWeight: '500',
50
+ lineHeight: 'normal'
51
+ },
52
+ label9: {
53
+ color: styledVars.CAP_G01,
54
+ fontSize: '12px',
55
+ fontWeight: 'normal',
56
+ lineHeight: '16px'
57
+ },
58
+ label10: {
59
+ color: styledVars.CAP_WHITE,
60
+ fontSize: '12px',
61
+ fontWeight: 'normal',
62
+ lineHeight: '16px'
63
+ },
64
+ label11: {
65
+ color: styledVars.CAP_G04,
66
+ fontSize: '10px',
67
+ fontWeight: 'normal',
68
+ lineHeight: 'normal'
69
+ },
70
+ label12: {
71
+ color: styledVars.CAP_WHITE,
72
+ fontSize: '12px',
73
+ fontWeight: 'normal',
74
+ lineHeight: 'normal'
75
+ },
76
+ label13: {
77
+ color: styledVars.CAP_G05,
78
+ fontSize: '10px',
79
+ fontWeight: 'normal',
80
+ lineHeight: 'normal'
81
+ },
82
+ label14: {
83
+ color: styledVars.CAP_G03,
84
+ fontSize: '14px',
85
+ fontWeight: 'normal',
86
+ lineHeight: 'normal'
87
+ },
88
+ label15: {
89
+ color: styledVars.CAP_G01,
90
+ fontSize: '14px',
91
+ fontWeight: 'normal',
92
+ lineHeight: 'normal'
93
+ },
94
+ label16: {
95
+ color: styledVars.CAP_G01,
96
+ fontSize: '14px',
97
+ fontWeight: '500',
98
+ lineHeight: 'normal'
99
+ },
100
+ label17: {
101
+ color: styledVars.CAP_G01,
102
+ fontSize: '16px',
103
+ fontWeight: '500',
104
+ lineHeight: 'normal'
105
+ },
106
+ label18: {
107
+ color: styledVars.CAP_G04,
108
+ fontSize: '14px',
109
+ fontWeight: 'normal',
110
+ lineHeight: 'normal'
111
+ },
112
+ label19: {
113
+ color: 'rgba(0, 0, 0, 0.87)',
114
+ fontSize: '12px',
115
+ fontWeight: 'normal',
116
+ lineHeight: '16px'
117
+ },
118
+ label20: {
119
+ color: styledVars.CAP_SECONDARY.base,
120
+ fontSize: '14px',
121
+ fontWeight: '500',
122
+ lineHeight: 'normal'
123
+ },
124
+ label21: {
125
+ color: styledVars.CAP_SECONDARY.base,
126
+ fontSize: '12px',
127
+ fontWeight: 'normal',
128
+ lineHeight: 'normal'
129
+ },
130
+ label22: {
131
+ color: styledVars.CAP_G04,
132
+ fontSize: '24px',
133
+ fontWeight: 'normal',
134
+ lineHeight: '28px'
135
+ },
136
+ label23: {
137
+ color: styledVars.CAP_WHITE,
138
+ fontSize: '14px',
139
+ fontWeight: 'normal',
140
+ lineHeight: 'normal'
141
+ },
142
+ label24: {
143
+ fontSize: '14px',
144
+ fontWeight: '400',
145
+ color: styledVars.CAP_G04,
146
+ lineHeight: '20px'
147
+ },
148
+ label25: {
149
+ fontSize: '14px',
150
+ fontWeight: '500',
151
+ color: styledVars.CAP_G04,
152
+ lineHeight: '20px'
153
+ },
154
+ label26: {
155
+ fontSize: '10px',
156
+ fontWeight: '400',
157
+ color: styledVars.CAP_G01,
158
+ lineHeight: '12px'
159
+ },
160
+ label27: {
161
+ fontSize: '12px',
162
+ fontWeight: '500',
163
+ color: styledVars.CAP_SECONDARY.base,
164
+ lineHeight: '16px'
165
+ },
166
+ label28: {
167
+ fontSize: '12px',
168
+ fontWeight: '500',
169
+ color: styledVars.CAP_WHITE,
170
+ lineHeight: '16px'
171
+ },
172
+ label29: {
173
+ fontSize: '10px',
174
+ fontWeight: '400',
175
+ color: styledVars.CAP_WHITE,
176
+ lineHeight: '12px'
177
+ },
178
+ label30: {
179
+ fontSize: '10px',
180
+ fontWeight: '400',
181
+ color: styledVars.CAP_WHITE,
182
+ lineHeight: '12px'
183
+ },
184
+ label31: {
185
+ color: styledVars.CAP_G01,
186
+ fontSize: '12px',
187
+ fontWeight: '400',
188
+ lineHeight: '16px'
189
+ },
190
+ label32: {
191
+ color: styledVars.CAP_WHITE,
192
+ fontSize: '14px',
193
+ fontWeight: '500',
194
+ lineHeight: '20px'
195
+ },
196
+ label33: {
197
+ color: styledVars.CAP_SECONDARY.base,
198
+ fontSize: '14px',
199
+ fontWeight: '500',
200
+ lineHeight: '20px'
201
+ }
202
+ };
203
+ var labelStyles = css(["font-size:", ";font-weight:", ";color:", ";line-height:", ";margin:0;padding:0;"], function (props) {
204
+ return labels[props.type].fontSize;
205
+ }, function (props) {
206
+ return props.fontWeight || labels[props.type].fontWeight;
207
+ }, function (props) {
208
+ return labels[props.type].color;
209
+ }, function (props) {
210
+ return props.lineHeight || labels[props.type].lineHeight || 'initial';
211
+ });
212
+ export var LabelWrapper = styled.div.withConfig({
213
+ displayName: "LabelWrapper",
214
+ componentId: "sc-1xg855n-0"
215
+ })(["", ""], labelStyles);
216
+ export var LabelInline = styled.span.withConfig({
217
+ displayName: "LabelInline",
218
+ componentId: "sc-1xg855n-1"
219
+ })(["", " display:inline-block;"], labelStyles);
@@ -1,22 +1,22 @@
1
- var _excluded = ["className"];
1
+ var _excluded = ["className", "children"];
2
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
3
  function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
4
4
  function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
5
- /**
6
- * CapSkeleton - Migrated to Ant Design v5
7
- */
8
5
  import React from 'react';
9
6
  import PropTypes from 'prop-types';
10
- import { Skeleton } from 'antd';
11
- var CapSkeleton = function CapSkeleton(_ref) {
7
+ import { Row } from 'antd';
8
+ import classNames from 'classnames';
9
+ import { RowWrapper } from './styles';
10
+ var CapRow = function CapRow(_ref) {
12
11
  var className = _ref.className,
12
+ children = _ref.children,
13
13
  rest = _objectWithoutProperties(_ref, _excluded);
14
- var combinedClassName = "cap-skeleton-v2 ".concat(className || '').trim();
15
- return /*#__PURE__*/React.createElement(Skeleton, _extends({
16
- className: combinedClassName
17
- }, rest));
14
+ return /*#__PURE__*/React.createElement(RowWrapper, null, /*#__PURE__*/React.createElement(Row, _extends({}, rest, {
15
+ className: classNames('cap-row', className)
16
+ }), React.Children.toArray(children)));
18
17
  };
19
- CapSkeleton.propTypes = {
18
+ CapRow.propTypes = {
19
+ children: PropTypes.node,
20
20
  className: PropTypes.string
21
21
  };
22
- export default CapSkeleton;
22
+ export default CapRow;
@@ -0,0 +1 @@
1
+ export { default } from './CapRow';
@@ -0,0 +1,5 @@
1
+ import styled from 'styled-components';
2
+ export var RowWrapper = styled.div.withConfig({
3
+ displayName: "RowWrapper",
4
+ componentId: "sc-y3x4h8-0"
5
+ })([".cap-row{display:flex;flex-flow:row wrap;min-width:0;}"]);
@@ -1,12 +1,12 @@
1
- import CapSkeleton from '../CapSkeleton';
1
+ import CapSpin from '@capillarytech/cap-ui-library/CapSpin';
2
2
  import { loadable } from '@capillarytech/cap-ui-utils';
3
3
  import React, { Suspense } from 'react';
4
4
  var LoadableComponent = loadable(function () {
5
5
  return import('./CapTable');
6
6
  });
7
- var CapTableLoadable = function CapTableLoadable(props) {
7
+ var CapTableLoadable = function CapTableLoadable() {
8
8
  return /*#__PURE__*/React.createElement(Suspense, {
9
- fallback: /*#__PURE__*/React.createElement(CapSkeleton, null)
10
- }, /*#__PURE__*/React.createElement(LoadableComponent, props));
9
+ fallback: /*#__PURE__*/React.createElement(CapSpin, null)
10
+ }, /*#__PURE__*/React.createElement(LoadableComponent, null));
11
11
  };
12
12
  export default CapTableLoadable;
@@ -0,0 +1,34 @@
1
+ var _excluded = ["overlayClassName", "children"];
2
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
+ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
4
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
5
+ import React from 'react';
6
+ import PropTypes from 'prop-types';
7
+ import { Tooltip } from 'antd';
8
+ import classNames from 'classnames';
9
+ import { TooltipWrapper } from './styles';
10
+ var CapTooltip = function CapTooltip(_ref) {
11
+ var overlayClassName = _ref.overlayClassName,
12
+ children = _ref.children,
13
+ rest = _objectWithoutProperties(_ref, _excluded);
14
+ return /*#__PURE__*/React.createElement(TooltipWrapper, null, /*#__PURE__*/React.createElement(Tooltip, _extends({
15
+ overlayClassName: classNames('cap-tooltip', overlayClassName)
16
+ }, rest), children));
17
+ };
18
+
19
+ /*
20
+ NOTE:
21
+ While using a disabled button with tooltip, wrap the button with an element with className "button-disabled-tooltip-wrapper".
22
+
23
+ <CapTooltip title="disabled button with tooltip">
24
+ <span className="button-disabled-tooltip-wrapper">
25
+ <CapButton disabled>Button</CapButton>
26
+ </span>
27
+ </CapTooltip>
28
+ */
29
+
30
+ CapTooltip.propTypes = {
31
+ overlayClassName: PropTypes.string,
32
+ children: PropTypes.node
33
+ };
34
+ export default CapTooltip;
@@ -0,0 +1 @@
1
+ export { default } from './CapTooltip';