@ballistix.digital/react-components 0.4.105 → 0.4.107

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/dist/index.js CHANGED
@@ -3450,7 +3450,7 @@ function p(){return u||(u=1,"production"!==process.env.NODE_ENV&&function(){var
3450
3450
  var InputGroupForm = function (props) {
3451
3451
  var _a;
3452
3452
  var _b;
3453
- var name = props.name, _c = props.htmlType, htmlType = _c === void 0 ? 'text' : _c, label = props.label, description = props.description, placeholder = props.placeholder, leading = props.leading, trailing = props.trailing, required = props.required, value = props.value, mask = props.mask, min = props.min, max = props.max, maxLength = props.maxLength, error = props.error, _d = props.type, type = _d === void 0 ? 'normal' : _d, isDisabled = props.isDisabled, _e = props.isRequired, isRequired = _e === void 0 ? false : _e, _f = props.isTouched, isTouched = _f === void 0 ? false : _f, _g = props.isSolo, isSolo = _g === void 0 ? false : _g, onChange = props.onChange, onBlur = props.onBlur, stylesOverrides = props.styles;
3453
+ var name = props.name, _c = props.htmlType, htmlType = _c === void 0 ? 'text' : _c, label = props.label, description = props.description, placeholder = props.placeholder, leading = props.leading, trailing = props.trailing, required = props.required, value = props.value, mask = props.mask, min = props.min, max = props.max, maxLength = props.maxLength, rows = props.rows, error = props.error, _d = props.type, type = _d === void 0 ? 'normal' : _d, isDisabled = props.isDisabled, _e = props.isRequired, isRequired = _e === void 0 ? false : _e, _f = props.isTouched, isTouched = _f === void 0 ? false : _f, _g = props.isSolo, isSolo = _g === void 0 ? false : _g, onChange = props.onChange, onBlur = props.onBlur, stylesOverrides = props.styles;
3454
3454
  var isValid = error === undefined;
3455
3455
  var ref = y({
3456
3456
  mask: mask === null || mask === void 0 ? void 0 : mask.mask,
@@ -3466,7 +3466,8 @@ var InputGroupForm = function (props) {
3466
3466
  };
3467
3467
  var styles = handleGenerateStyle();
3468
3468
  var invalidIcon = (jsxRuntime.jsx(solid.ExclamationCircleIcon, { className: "h-5 w-5 text-red-500", "aria-hidden": "true" }));
3469
- return (jsxRuntime.jsxs("div", __assign({ className: styles.container }, { children: [jsxRuntime.jsxs("div", __assign({ className: styles.head }, { children: [label && (jsxRuntime.jsx("label", __assign({ htmlFor: name, className: styles.label }, { children: label }))), !required && !isRequired && typeof label === 'string' && (jsxRuntime.jsx("span", __assign({ className: styles.hint }, { children: "Optional" }))), required && required({ isRequired: isRequired })] })), jsxRuntime.jsxs("div", __assign({ className: styles.body }, { children: [leading && jsxRuntime.jsx("div", __assign({ className: styles.leading }, { children: leading })), jsxRuntime.jsx("input", { type: mask !== undefined ? 'text' : htmlType, ref: mask && ref, name: name, id: name, className: styles.input, placeholder: placeholder, defaultValue: isSolo ? value : undefined, value: isSolo ? undefined : value, min: min, max: max, maxLength: maxLength, disabled: isDisabled, onChange: onChange, onBlur: onBlur }), type === 'floored' && (jsxRuntime.jsx("div", { className: "absolute inset-x-0 bottom-0 border-t border-gray-300 peer-focus:border-t-2 peer-focus:border-primary-600", "aria-hidden": "true" })), trailing && isValid && (jsxRuntime.jsx("div", __assign({ className: styles.trailing }, { children: trailing }))), isTouched && !isValid && (jsxRuntime.jsx("div", __assign({ className: styles.trailing }, { children: invalidIcon })))] })), jsxRuntime.jsxs("div", __assign({ className: styles.foot }, { children: [description && !(error && isTouched) && (jsxRuntime.jsx("p", __assign({ className: styles.description }, { children: description }))), error && isTouched && jsxRuntime.jsx("p", __assign({ className: styles.error }, { children: error }))] }))] })));
3469
+ return (jsxRuntime.jsxs("div", __assign({ className: styles.container }, { children: [jsxRuntime.jsxs("div", __assign({ className: styles.head }, { children: [label && (jsxRuntime.jsx("label", __assign({ htmlFor: name, className: styles.label }, { children: label }))), !required && !isRequired && typeof label === 'string' && (jsxRuntime.jsx("span", __assign({ className: styles.hint }, { children: "Optional" }))), required && required({ isRequired: isRequired })] })), jsxRuntime.jsxs("div", __assign({ className: styles.body }, { children: [leading && jsxRuntime.jsx("div", __assign({ className: styles.leading }, { children: leading })), !htmlType ||
3470
+ (htmlType !== 'area' && (jsxRuntime.jsx("input", { type: mask !== undefined ? 'text' : htmlType, ref: mask && ref, name: name, id: name, className: styles.input, placeholder: placeholder, defaultValue: isSolo ? value : undefined, value: isSolo ? undefined : value, min: min, max: max, maxLength: maxLength, disabled: isDisabled, onChange: onChange, onBlur: onBlur }))), htmlType === 'area' && (jsxRuntime.jsx("textarea", { rows: rows, name: name, id: name, className: styles.input, placeholder: placeholder, defaultValue: isSolo ? value : undefined, value: isSolo ? undefined : value, maxLength: maxLength, disabled: isDisabled, onChange: onChange, onBlur: onBlur })), type === 'floored' && (jsxRuntime.jsx("div", { className: "absolute inset-x-0 bottom-0 border-t border-gray-300 peer-focus:border-t-2 peer-focus:border-primary-600", "aria-hidden": "true" })), trailing && isValid && (jsxRuntime.jsx("div", __assign({ className: styles.trailing }, { children: trailing }))), isTouched && !isValid && (jsxRuntime.jsx("div", __assign({ className: styles.trailing }, { children: invalidIcon })))] })), jsxRuntime.jsxs("div", __assign({ className: styles.foot }, { children: [description && !(error && isTouched) && (jsxRuntime.jsx("p", __assign({ className: styles.description }, { children: description }))), error && isTouched && jsxRuntime.jsx("p", __assign({ className: styles.error }, { children: error }))] }))] })));
3470
3471
  };
3471
3472
 
3472
3473
  var base$f = {
@@ -4313,7 +4314,7 @@ var TableList2 = function (props) {
4313
4314
  ((_c = (_b = table === null || table === void 0 ? void 0 : table.getState()) === null || _b === void 0 ? void 0 : _b.pagination) === null || _c === void 0 ? void 0 : _c.pageSize) - 1 &&
4314
4315
  'border-b border-gray-200') }, { children: reactTable.flexRender(cell.column.columnDef.cell, cell.getContext()) }), cell.id));
4315
4316
  }) }), row.id));
4316
- }) })))] })), isLoading && (jsxRuntime.jsx("div", __assign({ className: "flex flex-col gap-y-2 w-full pt-5" }, { children: new Array(8).fill(undefined).map(function (index) { return (jsxRuntime.jsxs("div", __assign({ className: "flex gap-2" }, { children: [jsxRuntime.jsx("div", { className: "w-20 h-14 rounded-md bg-gray-100 animate-pulse" }), jsxRuntime.jsx("div", { className: "w-full h-14 rounded-md bg-gray-100 animate-pulse" })] }), index)); }) })))] })) })) })) })), jsxRuntime.jsx("div", __assign({ className: styles$a.foot }, { children: foot && foot(state) }))] })));
4317
+ }) })))] })), isLoading && (jsxRuntime.jsx("div", __assign({ className: "flex flex-col gap-y-2 w-full pt-5" }, { children: new Array(8).fill(undefined).map(function (index) { return (jsxRuntime.jsxs("div", __assign({ className: "flex gap-2" }, { children: [jsxRuntime.jsx("div", { className: "w-20 h-12 rounded-md bg-gray-100 animate-pulse" }), jsxRuntime.jsx("div", { className: "w-full h-12 rounded-md bg-gray-100 animate-pulse" })] }), index)); }) })))] })) })) })) })), jsxRuntime.jsx("div", __assign({ className: styles$a.foot }, { children: foot && foot(state) }))] })));
4317
4318
  };
4318
4319
 
4319
4320
  var styles$a = {
@@ -4623,7 +4624,7 @@ var List$1 = function (props) {
4623
4624
  }) }))] })), jsxRuntime.jsx("div", __assign({ className: styles.list.body }, { children: jsxRuntime.jsx("nav", __assign({ className: styles.list.navigation }, { children: children })) }))] })));
4624
4625
  };
4625
4626
  var Item$2 = function (props) {
4626
- var children = props.children, _a = props.as, LinkComponent = _a === void 0 ? 'a' : _a, _b = props.type, type = _b === void 0 ? 'underline' : _b, href = props.href, isCurrent = props.isCurrent, onClick = props.onClick, stylesOverrides = props.styles, _c = props.isLoading, isLoading = _c === void 0 ? true : _c;
4627
+ var children = props.children, _a = props.as, LinkComponent = _a === void 0 ? 'a' : _a, _b = props.type, type = _b === void 0 ? 'underline' : _b, href = props.href, isCurrent = props.isCurrent, onClick = props.onClick, stylesOverrides = props.styles, isLoading = props.isLoading;
4627
4628
  var handleGenerateStyle = function () {
4628
4629
  var result = deepCopyObject(styles$7.base);
4629
4630
  var keys = calculateNestedKeys(styles$7.base);
@@ -4634,7 +4635,7 @@ var Item$2 = function (props) {
4634
4635
  };
4635
4636
  var styles = handleGenerateStyle();
4636
4637
  if (href && LinkComponent) {
4637
- return (jsxRuntime.jsx(LinkComponent, __assign({ href: href, className: toClassName(styles.tab.base, isCurrent ? styles.tab.active : styles.tab.inactive), onClick: onClick }, { children: children })));
4638
+ return (jsxRuntime.jsx(LinkComponent, __assign({ href: href, className: toClassName(styles.tab.base, isCurrent ? styles.tab.active : styles.tab.inactive, isLoading && 'opacity-30 !text-gray-300 !cursor-default', isLoading && styles.tab.inactive), onClick: onClick }, { children: children })));
4638
4639
  }
4639
4640
  return (jsxRuntime.jsx("div", __assign({ className: toClassName(styles.tab.base, isCurrent ? styles.tab.active : styles.tab.inactive, isLoading && 'opacity-30 !text-gray-300 !cursor-default', isLoading && styles.tab.inactive), onClick: !isLoading ? onClick : function () { return null; } }, { children: children })));
4640
4641
  };
@@ -9186,7 +9187,7 @@ var zh$1 = _mergeNamespaces$1({
9186
9187
  var DateMenuForm = function (props) {
9187
9188
  var _a;
9188
9189
  var _b = props.name, name = _b === void 0 ? 'date-menu-form' : _b, _c = props.size, size = _c === void 0 ? 'compact' : _c, label = props.label, _d = props.i18n, i18n = _d === void 0 ? 'en' : _d, description = props.description, placeholder = props.placeholder, separator = props.separator, startFrom = props.startFrom, _e = props.displayFormat, displayFormat = _e === void 0 ? 'DD.MM.YYYY' : _e, _f = props.direction, direction = _f === void 0 ? 'down' : _f, minDate = props.minDate, maxDate = props.maxDate, _g = props.startWeekOn, startWeekOn = _g === void 0 ? 'mon' : _g, _h = props.icon, icon = _h === void 0 ? function (isEmpty) {
9189
- return isEmpty ? (jsxRuntime.jsx(IconElement, { accessor: "calendar" })) : (jsxRuntime.jsx(IconElement, { accessor: "xmark" }));
9190
+ return isEmpty ? (jsxRuntime.jsx(IconElement, { accessor: "calendar" })) : (jsxRuntime.jsx(IconElement, { accessor: "xmark", className: "text-black" }));
9190
9191
  } : _h, required = props.required, defaultValue = props.value, error = props.error, _j = props.type, type = _j === void 0 ? 'normal' : _j, _k = props.isRequired, isRequired = _k === void 0 ? false : _k, _l = props.isTouched, isTouched = _l === void 0 ? false : _l, isDisabled = props.isDisabled, _m = props.isSolo, isSolo = _m === void 0 ? false : _m, _o = props.isRanged, isRanged = _o === void 0 ? false : _o, onChange = props.onChange, onClear = props.onClear, onBlur = props.onBlur, stylesOverrides = props.styles;
9191
9192
  var isValid = error === undefined;
9192
9193
  var _p = React.useState(true), isFocus = _p[0], setIsFocus = _p[1];