@capillarytech/blaze-ui 0.1.6-alpha.67 → 0.1.6-alpha.7

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 (105) 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 +2 -2
  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/CapInput/styles.js +2 -2
  13. package/CapLabel/CapLabel.js +81 -58
  14. package/CapLabel/index.js +1 -3
  15. package/CapLabel/styles.js +212 -250
  16. package/CapRow/CapRow.js +10 -111
  17. package/CapRow/index.js +1 -3
  18. package/CapRow/styles.js +6 -47
  19. package/CapTable/CapTable.js +3 -0
  20. package/CapTable/loadable.js +4 -4
  21. package/CapTable/styles.js +26 -6
  22. package/CapTooltip/CapTooltip.js +25 -87
  23. package/CapTooltip/index.js +1 -3
  24. package/CapTooltip/styles.js +27 -19
  25. package/CapUnifiedSelect/CapUnifiedSelect.js +77 -495
  26. package/CapUnifiedSelect/index.js +4 -1
  27. package/CapUnifiedSelect/loadable.js +3 -0
  28. package/CapUnifiedSelect/styles.js +165 -376
  29. package/dist/235.index.js +2 -0
  30. package/dist/235.index.js.LICENSE.txt +29 -0
  31. package/dist/603.index.js +1 -0
  32. package/dist/CapInput/CapInput.js +66 -0
  33. package/dist/CapInput/Number.js +42 -0
  34. package/dist/CapInput/Search.js +35 -0
  35. package/dist/CapInput/TextArea.js +42 -0
  36. package/dist/CapInput/index.js +15 -0
  37. package/dist/CapInput/messages.js +32 -0
  38. package/dist/CapInput/styles.js +11 -0
  39. package/dist/CapTable/CapTable.js +151 -0
  40. package/dist/CapTable/index.js +9 -0
  41. package/dist/CapTable/loadable.js +23 -0
  42. package/dist/CapTable/styles.js +26 -0
  43. package/dist/LocaleHoc/index.js +40 -0
  44. package/dist/esm/CapHeading/CapHeading.js +41 -0
  45. package/dist/esm/CapHeading/index.js +1 -0
  46. package/dist/esm/CapHeading/styles.js +123 -0
  47. package/dist/esm/CapInfoNote/CapInfoNote.js +62 -0
  48. package/dist/esm/CapInfoNote/index.js +1 -0
  49. package/dist/esm/CapInfoNote/styles.js +6 -0
  50. package/dist/esm/CapInput/CapInput.js +57 -0
  51. package/dist/esm/CapInput/Number.js +35 -0
  52. package/dist/esm/CapInput/Search.js +28 -0
  53. package/dist/esm/CapInput/TextArea.js +35 -0
  54. package/dist/esm/CapInput/index.js +8 -0
  55. package/dist/esm/CapInput/loadable.js +9 -0
  56. package/dist/esm/CapInput/messages.js +25 -0
  57. package/dist/esm/CapInput/styles.js +3 -0
  58. package/dist/esm/CapLabel/CapLabel.js +50 -0
  59. package/dist/esm/CapLabel/index.js +1 -0
  60. package/dist/esm/CapLabel/styles.js +219 -0
  61. package/dist/esm/CapRow/CapRow.js +22 -0
  62. package/dist/esm/CapRow/index.js +1 -0
  63. package/dist/esm/CapRow/styles.js +5 -0
  64. package/dist/esm/CapTable/CapTable.js +143 -0
  65. package/dist/esm/CapTable/index.js +2 -0
  66. package/dist/esm/CapTable/loadable.js +12 -0
  67. package/dist/esm/CapTable/styles.js +17 -0
  68. package/dist/esm/CapTooltip/CapTooltip.js +34 -0
  69. package/dist/esm/CapTooltip/index.js +1 -0
  70. package/dist/esm/CapTooltip/styles.js +6 -0
  71. package/dist/esm/CapUnifiedSelect/CapUnifiedSelect.js +101 -0
  72. package/dist/esm/CapUnifiedSelect/index.js +3 -0
  73. package/dist/esm/CapUnifiedSelect/loadable.js +4 -0
  74. package/dist/esm/CapUnifiedSelect/messages.js +23 -0
  75. package/dist/esm/CapUnifiedSelect/styles.js +15 -0
  76. package/dist/esm/LocaleHoc/index.js +31 -0
  77. package/dist/esm/index.js +11 -0
  78. package/dist/esm/styled/index.js +5 -0
  79. package/dist/esm/styled/variables.js +88 -0
  80. package/dist/esm/translations/en.js +329 -0
  81. package/dist/index.js +39 -0
  82. package/dist/index.js.LICENSE.txt +7 -0
  83. package/dist/styled/index.js +22 -0
  84. package/dist/styled/variables.js +94 -0
  85. package/dist/translations/en.js +335 -0
  86. package/index.js +1 -12
  87. package/package.json +12 -6
  88. package/styled/variables.js +0 -2
  89. package/.DS_Store +0 -0
  90. package/CapIcon/CapIcon.js +0 -183
  91. package/CapIcon/index.js +0 -3
  92. package/CapIcon/styles.js +0 -76
  93. package/CapSkeleton/CapSkeleton.js +0 -17
  94. package/CapSkeleton/index.js +0 -1
  95. package/CapSpin/CapSpin.js +0 -23
  96. package/CapSpin/index.js +0 -1
  97. package/CapTestSelect/CapTestSelect.js +0 -47
  98. package/CapTestSelect/index.js +0 -1
  99. package/CapTooltipWithInfo/CapTooltipWithInfo.js +0 -74
  100. package/CapTooltipWithInfo/index.js +0 -3
  101. package/CapTooltipWithInfo/styles.js +0 -22
  102. package/assets/upload.svg +0 -3
  103. package/utils/index.js +0 -1
  104. package/utils/withMemo.js +0 -33
  105. package/utils/withStyles.js +0 -24
@@ -1,23 +0,0 @@
1
- /**
2
- * CapSpin - Migrated to Ant Design v5
3
- */
4
- import React from 'react';
5
- import PropTypes from 'prop-types';
6
- import { Spin } from 'antd-v5';
7
-
8
- const CapSpin = ({ className, ...rest }) => (
9
- <Spin className={className} {...rest} />
10
- );
11
-
12
- CapSpin.propTypes = {
13
- className: PropTypes.string,
14
- size: PropTypes.oneOf(['small', 'default', 'large']),
15
- spinning: PropTypes.bool,
16
- tip: PropTypes.string,
17
- delay: PropTypes.number,
18
- indicator: PropTypes.node,
19
- fullscreen: PropTypes.bool,
20
- wrapperClassName: PropTypes.string
21
- };
22
-
23
- export default CapSpin;
package/CapSpin/index.js DELETED
@@ -1 +0,0 @@
1
- export { default } from './CapSpin';
@@ -1,47 +0,0 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import { Select } from 'antd-v5';
4
-
5
- /**
6
- * Test component to verify Ant Design v5 Select integration
7
- * This is a simple wrapper for testing purposes only
8
- */
9
- const CapTestSelect = (props) => {
10
- return <Select {...props} />;
11
- };
12
-
13
- CapTestSelect.propTypes = {
14
- // Common Select props from antd
15
- allowClear: PropTypes.bool,
16
- defaultValue: PropTypes.oneOfType([
17
- PropTypes.string,
18
- PropTypes.number,
19
- PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number]))
20
- ]),
21
- disabled: PropTypes.bool,
22
- loading: PropTypes.bool,
23
- mode: PropTypes.oneOf(['multiple', 'tags']),
24
- placeholder: PropTypes.string,
25
- showSearch: PropTypes.bool,
26
- value: PropTypes.oneOfType([
27
- PropTypes.string,
28
- PropTypes.number,
29
- PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number]))
30
- ]),
31
- options: PropTypes.arrayOf(
32
- PropTypes.shape({
33
- label: PropTypes.node,
34
- value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
35
- disabled: PropTypes.bool
36
- })
37
- )
38
- };
39
-
40
- CapTestSelect.defaultProps = {
41
- allowClear: false,
42
- disabled: false,
43
- loading: false,
44
- showSearch: false
45
- };
46
-
47
- export default CapTestSelect;
@@ -1 +0,0 @@
1
- export { default } from './CapTestSelect';
@@ -1,74 +0,0 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import classnames from 'classnames';
4
- import { CapTooltip, CapIcon } from '../';
5
- import withStyles from '../utils/withStyles';
6
- import { tooltipWithInfoStyles } from './styles';
7
-
8
- /**
9
- * CapTooltipWithInfo - A component that combines an info icon with a tooltip
10
- * for displaying additional information on hover or other trigger events.
11
- */
12
- const CapTooltipWithInfo = ({
13
- title,
14
- iconSize = 's',
15
- iconType = 'info-circle',
16
- placement = 'top',
17
- trigger = 'hover',
18
- className = '',
19
- tooltipProps = {},
20
- iconProps = {},
21
- ...rest
22
- }) => {
23
- return (
24
- <span
25
- className={classnames('cap-tooltip-with-info', className)}
26
- {...rest}
27
- >
28
- <CapTooltip
29
- title={title}
30
- placement={placement}
31
- trigger={trigger}
32
- {...tooltipProps}
33
- >
34
- <span className="cap-tooltip-with-info-icon">
35
- <CapIcon
36
- type={iconType}
37
- size={iconSize}
38
- {...iconProps}
39
- />
40
- </span>
41
- </CapTooltip>
42
- </span>
43
- );
44
- };
45
-
46
- CapTooltipWithInfo.propTypes = {
47
- title: PropTypes.oneOfType([PropTypes.string, PropTypes.node]).isRequired,
48
- iconSize: PropTypes.oneOf(['xs', 's', 'm', 'l']),
49
- iconType: PropTypes.string,
50
- placement: PropTypes.oneOf([
51
- 'top', 'left', 'right', 'bottom',
52
- 'topLeft', 'topRight', 'bottomLeft', 'bottomRight',
53
- 'leftTop', 'leftBottom', 'rightTop', 'rightBottom',
54
- ]),
55
- trigger: PropTypes.oneOfType([
56
- PropTypes.string,
57
- PropTypes.arrayOf(PropTypes.string),
58
- ]),
59
- className: PropTypes.string,
60
- tooltipProps: PropTypes.object,
61
- iconProps: PropTypes.object,
62
- };
63
-
64
- CapTooltipWithInfo.defaultProps = {
65
- iconSize: 's',
66
- iconType: 'info-circle',
67
- placement: 'top',
68
- trigger: 'hover',
69
- className: '',
70
- tooltipProps: {},
71
- iconProps: {},
72
- };
73
-
74
- export default withStyles(CapTooltipWithInfo, tooltipWithInfoStyles);
@@ -1,3 +0,0 @@
1
- import CapTooltipWithInfo from './CapTooltipWithInfo';
2
-
3
- export default CapTooltipWithInfo;
@@ -1,22 +0,0 @@
1
- import { css } from 'styled-components';
2
- import * as styledVars from '../styled/variables';
3
-
4
- export const tooltipWithInfoStyles = css`
5
- &.cap-tooltip-with-info {
6
- display: inline-flex;
7
- align-items: center;
8
- cursor: default;
9
-
10
- .cap-tooltip-with-info-icon {
11
- color: ${styledVars.CAP_G06};
12
- margin-left: ${styledVars.SPACING_04};
13
- cursor: help;
14
-
15
- &:hover {
16
- color: ${styledVars.CAP_G07};
17
- }
18
- }
19
- }
20
- `;
21
-
22
- export default tooltipWithInfoStyles;
package/assets/upload.svg DELETED
@@ -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>
package/utils/index.js DELETED
@@ -1 +0,0 @@
1
- export { default as withStyles } from './withStyles';
package/utils/withMemo.js DELETED
@@ -1,33 +0,0 @@
1
- import React from 'react';
2
-
3
- const withMemo = (Component, isEqual, log = false) => {
4
- const defaultIsEqual = (prevProps, nextProps) => {
5
- const prevKeys = Object.keys(prevProps).filter((key) => key !== 'intl');
6
- const changedProps = [];
7
- const isEqual = prevKeys.every((key) => {
8
- const areEqual = prevProps[key] === nextProps[key];
9
- if (!areEqual) {
10
- changedProps.push({
11
- key,
12
- prevValue: prevProps[key],
13
- nextValue: nextProps[key],
14
- });
15
- }
16
- return areEqual;
17
- });
18
-
19
- if (log && changedProps.length > 0) {
20
- // eslint-disable-next-line no-console
21
- console.log('Props changed:', changedProps);
22
- }
23
-
24
- return isEqual;
25
- };
26
-
27
- if (typeof isEqual !== 'function') {
28
- return React.memo(Component, defaultIsEqual);
29
- }
30
- return React.memo(Component, isEqual);
31
- };
32
-
33
- export default withMemo;
@@ -1,24 +0,0 @@
1
- import styled from 'styled-components';
2
-
3
- /**
4
- * Enhances a React component with additional styles using styled-components.
5
- * @param {React.ComponentType} WrappedComponent - The React component to enhance.
6
- * @param {TemplateStringsArray} styles - CSS styles as a TemplateStringsArray.
7
- * @returns {React.ComponentType} Returns the enhanced styled component.
8
- */
9
- const withStyledComponent = (WrappedComponent, styles) => {
10
- /**
11
- * A styled component generated by combining WrappedComponent with additional styles.
12
- * @type {React.ComponentType}
13
- */
14
- const StyledComponent = styled(WrappedComponent)`
15
- ${styles};
16
- `;
17
-
18
- // Set default props from the original component to the styled component
19
- StyledComponent.defaultProps = WrappedComponent.defaultProps;
20
-
21
- return StyledComponent;
22
- };
23
-
24
- export default withStyledComponent;