@capillarytech/blaze-ui 0.1.6-alpha.21 → 0.1.6-alpha.22

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.
@@ -0,0 +1,47 @@
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import { Select } from 'antd';
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;
@@ -0,0 +1 @@
1
+ export { default } from './CapTestSelect';
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _propTypes = _interopRequireDefault(require("prop-types"));
9
+ var _antd = require("antd");
10
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
11
+ /**
12
+ * Test component to verify Ant Design v5 Select integration
13
+ * This is a simple wrapper for testing purposes only
14
+ */
15
+ var CapTestSelect = function CapTestSelect(props) {
16
+ return /*#__PURE__*/_react["default"].createElement(_antd.Select, props);
17
+ };
18
+ CapTestSelect.propTypes = {
19
+ // Common Select props from antd
20
+ allowClear: _propTypes["default"].bool,
21
+ defaultValue: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].number, _propTypes["default"].arrayOf(_propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].number]))]),
22
+ disabled: _propTypes["default"].bool,
23
+ loading: _propTypes["default"].bool,
24
+ mode: _propTypes["default"].oneOf(['multiple', 'tags']),
25
+ placeholder: _propTypes["default"].string,
26
+ showSearch: _propTypes["default"].bool,
27
+ value: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].number, _propTypes["default"].arrayOf(_propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].number]))]),
28
+ options: _propTypes["default"].arrayOf(_propTypes["default"].shape({
29
+ label: _propTypes["default"].node,
30
+ value: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].number]),
31
+ disabled: _propTypes["default"].bool
32
+ }))
33
+ };
34
+ CapTestSelect.defaultProps = {
35
+ allowClear: false,
36
+ disabled: false,
37
+ loading: false,
38
+ showSearch: false
39
+ };
40
+ var _default = exports["default"] = CapTestSelect;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "default", {
7
+ enumerable: true,
8
+ get: function get() {
9
+ return _CapTestSelect["default"];
10
+ }
11
+ });
12
+ var _CapTestSelect = _interopRequireDefault(require("./CapTestSelect"));
13
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
@@ -0,0 +1,34 @@
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import { Select } from 'antd';
4
+
5
+ /**
6
+ * Test component to verify Ant Design v5 Select integration
7
+ * This is a simple wrapper for testing purposes only
8
+ */
9
+ var CapTestSelect = function CapTestSelect(props) {
10
+ return /*#__PURE__*/React.createElement(Select, props);
11
+ };
12
+ CapTestSelect.propTypes = {
13
+ // Common Select props from antd
14
+ allowClear: PropTypes.bool,
15
+ defaultValue: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number]))]),
16
+ disabled: PropTypes.bool,
17
+ loading: PropTypes.bool,
18
+ mode: PropTypes.oneOf(['multiple', 'tags']),
19
+ placeholder: PropTypes.string,
20
+ showSearch: PropTypes.bool,
21
+ value: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number]))]),
22
+ options: PropTypes.arrayOf(PropTypes.shape({
23
+ label: PropTypes.node,
24
+ value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
25
+ disabled: PropTypes.bool
26
+ }))
27
+ };
28
+ CapTestSelect.defaultProps = {
29
+ allowClear: false,
30
+ disabled: false,
31
+ loading: false,
32
+ showSearch: false
33
+ };
34
+ export default CapTestSelect;
@@ -0,0 +1 @@
1
+ export { default } from './CapTestSelect';
package/dist/esm/index.js CHANGED
@@ -1,11 +1 @@
1
- // Import and export all components
2
- export { default as CapInput } from './CapInput';
3
- export { default as CapTable } from './CapTable';
4
-
5
- // Export utilities
6
- export { default as LocaleHoc } from './LocaleHoc';
7
-
8
- // Export styled utilities
9
- import * as _styledVars from './styled/variables';
10
- export { _styledVars as styledVars };
11
- export { default as styled } from './styled';
1
+ export { default as withStyles } from './withStyles';
@@ -0,0 +1,23 @@
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
+ var withStyledComponent = function withStyledComponent(WrappedComponent, styles) {
10
+ /**
11
+ * A styled component generated by combining WrappedComponent with additional styles.
12
+ * @type {React.ComponentType}
13
+ */
14
+ var StyledComponent = styled(WrappedComponent).withConfig({
15
+ displayName: "StyledComponent",
16
+ componentId: "sc-ujcdm3-0"
17
+ })(["", ";"], styles);
18
+
19
+ // Set default props from the original component to the styled component
20
+ StyledComponent.defaultProps = WrappedComponent.defaultProps;
21
+ return StyledComponent;
22
+ };
23
+ export default withStyledComponent;
package/dist/index.js CHANGED
@@ -1,39 +1,13 @@
1
1
  "use strict";
2
2
 
3
- 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); }
4
3
  Object.defineProperty(exports, "__esModule", {
5
4
  value: true
6
5
  });
7
- Object.defineProperty(exports, "CapInput", {
6
+ Object.defineProperty(exports, "withStyles", {
8
7
  enumerable: true,
9
8
  get: function get() {
10
- return _CapInput["default"];
9
+ return _withStyles["default"];
11
10
  }
12
11
  });
13
- Object.defineProperty(exports, "CapTable", {
14
- enumerable: true,
15
- get: function get() {
16
- return _CapTable["default"];
17
- }
18
- });
19
- Object.defineProperty(exports, "LocaleHoc", {
20
- enumerable: true,
21
- get: function get() {
22
- return _LocaleHoc["default"];
23
- }
24
- });
25
- Object.defineProperty(exports, "styled", {
26
- enumerable: true,
27
- get: function get() {
28
- return _styled["default"];
29
- }
30
- });
31
- exports.styledVars = void 0;
32
- var _CapInput = _interopRequireDefault(require("./CapInput"));
33
- var _CapTable = _interopRequireDefault(require("./CapTable"));
34
- var _LocaleHoc = _interopRequireDefault(require("./LocaleHoc"));
35
- var _styledVars = _interopRequireWildcard(require("./styled/variables"));
36
- exports.styledVars = _styledVars;
37
- var _styled = _interopRequireDefault(require("./styled"));
38
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(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 (var _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); }
12
+ var _withStyles = _interopRequireDefault(require("./withStyles"));
39
13
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
9
+ /**
10
+ * Enhances a React component with additional styles using styled-components.
11
+ * @param {React.ComponentType} WrappedComponent - The React component to enhance.
12
+ * @param {TemplateStringsArray} styles - CSS styles as a TemplateStringsArray.
13
+ * @returns {React.ComponentType} Returns the enhanced styled component.
14
+ */
15
+ var withStyledComponent = function withStyledComponent(WrappedComponent, styles) {
16
+ /**
17
+ * A styled component generated by combining WrappedComponent with additional styles.
18
+ * @type {React.ComponentType}
19
+ */
20
+ var StyledComponent = (0, _styledComponents["default"])(WrappedComponent).withConfig({
21
+ displayName: "StyledComponent",
22
+ componentId: "sc-ujcdm3-0"
23
+ })(["", ";"], styles);
24
+
25
+ // Set default props from the original component to the styled component
26
+ StyledComponent.defaultProps = WrappedComponent.defaultProps;
27
+ return StyledComponent;
28
+ };
29
+ var _default = exports["default"] = withStyledComponent;
package/index.js CHANGED
@@ -1,10 +1,14 @@
1
1
  // Import and export all components
2
2
  export { default as CapInput } from './CapInput';
3
3
  export { default as CapTable } from './CapTable';
4
+ export { default as CapTestSelect } from './CapTestSelect'; // Test component for Ant Design v5 integration
4
5
 
5
6
  // Export utilities
6
7
  export { default as LocaleHoc } from './LocaleHoc';
7
8
 
8
9
  // Export styled utilities
9
10
  export * as styledVars from './styled/variables';
10
- export { default as styled } from './styled';
11
+ export { default as styled } from './styled';
12
+
13
+ // Export utils
14
+ export * from '../utils';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capillarytech/blaze-ui",
3
3
  "author": "Capillary Technologies",
4
- "version": "0.1.6-alpha.21",
4
+ "version": "0.1.6-alpha.22",
5
5
  "description": "Capillary UI component library with Ant Design v5",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/esm/index.js",