@capillarytech/blaze-ui 5.0.1 → 5.0.2
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.
- package/CapActionBar/README.md +11 -0
- package/CapActionBar/index.d.ts +5 -0
- package/CapActionBar/index.d.ts.map +1 -0
- package/CapActionBar/index.js +62 -58
- package/CapActionBar/index.js.map +1 -1
- package/CapActionBar/types.d.ts +80 -0
- package/CapActionBar/types.d.ts.map +1 -0
- package/CapListLayout/index.js +62 -58
- package/CapListLayout/index.js.map +1 -1
- package/assets/HOCs/ComponentWithLabelHOC/types.d.ts +0 -2
- package/assets/HOCs/ComponentWithLabelHOC/types.d.ts.map +1 -1
- package/index.d.ts +2 -0
- package/index.d.ts.map +1 -1
- package/index.js +165 -1
- package/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# CapActionBar
|
|
2
|
+
|
|
3
|
+
A flexible action bar component that provides a consistent layout for search inputs, filters, sort controls, and action buttons. This component wraps Ant Design's Row and Col components to create a structured action bar interface.
|
|
4
|
+
|
|
5
|
+
## Migration from Ant Design v3 to v6
|
|
6
|
+
|
|
7
|
+
This component has been migrated from Ant Design v3 to v6 with the following changes:
|
|
8
|
+
|
|
9
|
+
### Breaking Changes
|
|
10
|
+
|
|
11
|
+
No breaking changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../components/CapActionBar/index.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAa1B,OAAO,KAAK,EAAE,iBAAiB,EAAqB,MAAM,SAAS,CAAC;AAsBpE,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAiE7C,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
package/CapActionBar/index.js
CHANGED
|
@@ -22439,84 +22439,88 @@ var exports = __webpack_exports__;
|
|
|
22439
22439
|
|
|
22440
22440
|
exports.__esModule = true;
|
|
22441
22441
|
exports["default"] = void 0;
|
|
22442
|
-
var
|
|
22442
|
+
var _classnames = _interopRequireDefault(__webpack_require__(46942));
|
|
22443
22443
|
var _react = _interopRequireDefault(__webpack_require__(9206));
|
|
22444
22444
|
var _CapButton = _interopRequireDefault(__webpack_require__(80739));
|
|
22445
22445
|
var _CapColumn = _interopRequireDefault(__webpack_require__(4757));
|
|
22446
22446
|
var _CapFormItem = _interopRequireDefault(__webpack_require__(9660));
|
|
22447
|
-
var _CapInput =
|
|
22447
|
+
var _CapInput = __webpack_require__(15773);
|
|
22448
22448
|
var _CapRadioButton = _interopRequireDefault(__webpack_require__(50880));
|
|
22449
22449
|
var _CapRadioGroup = _interopRequireDefault(__webpack_require__(49269));
|
|
22450
22450
|
var _CapRow = _interopRequireDefault(__webpack_require__(69813));
|
|
22451
22451
|
var _CapSelect = _interopRequireDefault(__webpack_require__(80827));
|
|
22452
|
-
__webpack_require__(24952);
|
|
22452
|
+
var _styles = _interopRequireDefault(__webpack_require__(24952));
|
|
22453
22453
|
var _jsxRuntime = __webpack_require__(74848);
|
|
22454
|
-
const _excluded = ["options"]
|
|
22454
|
+
const _excluded = ["options"],
|
|
22455
|
+
_excluded2 = ["label", "value"];
|
|
22455
22456
|
/**
|
|
22456
22457
|
* CapActionBar
|
|
22457
22458
|
*/
|
|
22458
22459
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
22459
22460
|
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); }
|
|
22460
22461
|
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; }
|
|
22461
|
-
function RadioButtonComponent(
|
|
22462
|
-
|
|
22462
|
+
function RadioButtonComponent(_ref) {
|
|
22463
|
+
let {
|
|
22463
22464
|
options
|
|
22464
|
-
} =
|
|
22465
|
-
otherProps = _objectWithoutPropertiesLoose(
|
|
22465
|
+
} = _ref,
|
|
22466
|
+
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
22466
22467
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapRadioGroup.default, _extends({}, otherProps, {
|
|
22467
|
-
children: options.map((option, optionInd) =>
|
|
22468
|
-
|
|
22469
|
-
|
|
22468
|
+
children: options.map((option, optionInd) => {
|
|
22469
|
+
const {
|
|
22470
|
+
label,
|
|
22471
|
+
value
|
|
22472
|
+
} = option,
|
|
22473
|
+
restOptionProps = _objectWithoutPropertiesLoose(option, _excluded2);
|
|
22474
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapRadioButton.default, _extends({
|
|
22475
|
+
value: value
|
|
22476
|
+
}, restOptionProps, {
|
|
22477
|
+
children: label
|
|
22478
|
+
}), optionInd);
|
|
22479
|
+
})
|
|
22470
22480
|
}));
|
|
22471
22481
|
}
|
|
22472
|
-
|
|
22473
|
-
|
|
22474
|
-
|
|
22475
|
-
|
|
22476
|
-
|
|
22477
|
-
|
|
22478
|
-
|
|
22479
|
-
|
|
22480
|
-
|
|
22481
|
-
|
|
22482
|
-
|
|
22483
|
-
|
|
22484
|
-
|
|
22485
|
-
|
|
22486
|
-
|
|
22487
|
-
|
|
22488
|
-
}))
|
|
22489
|
-
}))
|
|
22490
|
-
|
|
22491
|
-
|
|
22492
|
-
}))
|
|
22493
|
-
}))
|
|
22494
|
-
|
|
22495
|
-
|
|
22496
|
-
}))
|
|
22497
|
-
}))
|
|
22498
|
-
|
|
22499
|
-
|
|
22500
|
-
}))
|
|
22501
|
-
}))
|
|
22502
|
-
}))
|
|
22503
|
-
|
|
22504
|
-
|
|
22505
|
-
|
|
22506
|
-
|
|
22507
|
-
|
|
22508
|
-
|
|
22509
|
-
|
|
22510
|
-
|
|
22511
|
-
|
|
22512
|
-
filterItemTwo: _propTypes.default.object,
|
|
22513
|
-
actionItemOne: _propTypes.default.object,
|
|
22514
|
-
actionItemTwo: _propTypes.default.object
|
|
22515
|
-
};
|
|
22516
|
-
RadioButtonComponent.propTypes = {
|
|
22517
|
-
onChange: _propTypes.default.func,
|
|
22518
|
-
options: _propTypes.default.array
|
|
22482
|
+
const CapActionBar = _ref2 => {
|
|
22483
|
+
let {
|
|
22484
|
+
className,
|
|
22485
|
+
search,
|
|
22486
|
+
filterItemOne,
|
|
22487
|
+
filterItemTwo,
|
|
22488
|
+
sort,
|
|
22489
|
+
actionItemOne,
|
|
22490
|
+
actionItemTwo,
|
|
22491
|
+
row
|
|
22492
|
+
} = _ref2;
|
|
22493
|
+
const rowProps = (row == null ? void 0 : row.props) || {};
|
|
22494
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CapRow.default, _extends({}, rowProps, {
|
|
22495
|
+
className: (0, _classnames.default)(_styles.default['cap-action-bar'], className),
|
|
22496
|
+
children: [search && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapColumn.default, _extends({}, search.capColumn, {
|
|
22497
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapFormItem.default, _extends({}, search.formItem, {
|
|
22498
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapInput.CapInputSearch, _extends({}, search.props))
|
|
22499
|
+
}))
|
|
22500
|
+
})), filterItemOne && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapColumn.default, _extends({}, filterItemOne.capColumn, {
|
|
22501
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapFormItem.default, _extends({}, filterItemOne.formItem, {
|
|
22502
|
+
children: filterItemOne.radioButton ? /*#__PURE__*/(0, _jsxRuntime.jsx)(RadioButtonComponent, _extends({}, filterItemOne.props)) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapSelect.default, _extends({}, filterItemOne.props))
|
|
22503
|
+
}))
|
|
22504
|
+
})), filterItemTwo && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapColumn.default, _extends({}, filterItemTwo.capColumn, {
|
|
22505
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapFormItem.default, _extends({}, filterItemTwo.formItem, {
|
|
22506
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapSelect.default, _extends({}, filterItemTwo.props))
|
|
22507
|
+
}))
|
|
22508
|
+
})), sort && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapColumn.default, _extends({}, sort.capColumn, {
|
|
22509
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapFormItem.default, _extends({}, sort.formItem, {
|
|
22510
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapSelect.default, _extends({}, sort.props))
|
|
22511
|
+
}))
|
|
22512
|
+
})), actionItemOne && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapColumn.default, _extends({}, actionItemOne.capColumn, {
|
|
22513
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapButton.default, _extends({}, actionItemOne.props, {
|
|
22514
|
+
children: actionItemOne.props.children
|
|
22515
|
+
}))
|
|
22516
|
+
})), actionItemTwo && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapColumn.default, _extends({}, actionItemTwo.capColumn, {
|
|
22517
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapButton.default, _extends({}, actionItemTwo.props, {
|
|
22518
|
+
children: actionItemTwo.props.children
|
|
22519
|
+
}))
|
|
22520
|
+
}))]
|
|
22521
|
+
}));
|
|
22519
22522
|
};
|
|
22523
|
+
var _default = exports["default"] = CapActionBar;
|
|
22520
22524
|
})();
|
|
22521
22525
|
|
|
22522
22526
|
module.exports = __webpack_exports__;
|