@ballistix.digital/react-components 0.5.5 → 0.5.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.
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import React, { FC, ReactNode, RefObject, ReactElement, ChangeEventHandler, FocusEventHandler, HTMLInputTypeAttribute, Dispatch, SetStateAction, ElementType, ChangeEvent } from 'react';
1
+ import React, { FC, ReactNode, RefObject, MouseEvent as MouseEvent$1, ReactElement, ChangeEventHandler, FocusEventHandler, HTMLInputTypeAttribute, Dispatch, SetStateAction, ElementType, ChangeEvent } from 'react';
2
2
  import { DeepPartialType as DeepPartialType$1 } from 'types/DeepPartialType';
3
3
  import { IconName } from '@fortawesome/fontawesome-svg-core';
4
4
  import { Menu } from '@headlessui/react';
@@ -92,7 +92,7 @@ type TButtonElementProps = {
92
92
  status?: 'idle' | 'loading' | 'success' | 'error';
93
93
  isDisabled?: boolean;
94
94
  styles?: TButtonElementStyles;
95
- onClick?: () => void;
95
+ onClick?: (e?: MouseEvent$1<HTMLButtonElement>) => void;
96
96
  };
97
97
  declare const ButtonElement: FC<TButtonElementProps>;
98
98
 
package/dist/index.esm.js CHANGED
@@ -538,7 +538,9 @@ var ButtonElement = function (props) {
538
538
  return result;
539
539
  };
540
540
  var styles = handleGenerateStyle();
541
- return (jsxs("button", { type: htmlType, className: styles.container, disabled: isDisabled || status !== 'idle', onClick: onClick, ref: innerRef, children: [status === 'idle' && children, status === 'loading' && (jsxs("div", { className: styles.content, children: [jsx(IconElement, { type: "regular", accessor: "spinner", className: styles.spinner }), jsx("div", { children: children })] })), status === 'error' && (jsxs("div", { className: styles.content, children: [jsx(IconElement, { type: "regular", accessor: "circle-exclamation", className: styles.icon }), jsx("div", { children: children })] })), status === 'success' && (jsxs("div", { className: styles.content, children: [jsx(IconElement, { type: "regular", accessor: "circle-check", className: styles.icon }), jsx("div", { children: children })] }))] }));
541
+ return (jsxs("button", { type: htmlType, className: styles.container, disabled: isDisabled || status !== 'idle', onClick: function (e) {
542
+ onClick && onClick(e);
543
+ }, ref: innerRef, children: [status === 'idle' && children, status === 'loading' && (jsxs("div", { className: styles.content, children: [jsx(IconElement, { type: "regular", accessor: "spinner", className: styles.spinner }), jsx("div", { children: children })] })), status === 'error' && (jsxs("div", { className: styles.content, children: [jsx(IconElement, { type: "regular", accessor: "circle-exclamation", className: styles.icon }), jsx("div", { children: children })] })), status === 'success' && (jsxs("div", { className: styles.content, children: [jsx(IconElement, { type: "regular", accessor: "circle-check", className: styles.icon }), jsx("div", { children: children })] }))] }));
542
544
  };
543
545
 
544
546
  var base$n = {
@@ -715,8 +717,9 @@ var InputGroupForm = function (props) {
715
717
  };
716
718
  var styles = handleGenerateStyle();
717
719
  var invalidIcon = (jsx(ExclamationCircleIcon, { className: "h-5 w-5 text-red-500", "aria-hidden": "true" }));
720
+ var isClearable = !trailing && isValid && onClear && value !== '' && value;
718
721
  return (jsxs("div", { className: styles.container, children: [jsxs("div", { className: styles.head, children: [label && (jsx("label", { htmlFor: name, className: styles.label, children: label })), !required && !isRequired && typeof label === 'string' && (jsx("span", { className: styles.hint, children: "Optional" })), required && required({ isRequired: isRequired })] }), jsxs("div", { className: styles.body, children: [leading && jsx("div", { className: styles.leading, children: leading }), !htmlType ||
719
- (htmlType !== 'area' && (jsxs("div", { className: "flex items-center", children: [jsx("input", { type: mask !== undefined ? 'text' : htmlType, ref: mask && ref, name: name, id: name, className: toClassName(styles.input, htmlType === 'color' && '!h-10'), placeholder: placeholder, defaultValue: isSolo ? value : undefined, value: isSolo ? undefined : value, min: min, max: max, maxLength: maxLength, disabled: isDisabled, onChange: onChange, onBlur: onBlur }), htmlType === 'text' && !trailing && isValid && onClear && (jsx("div", { className: "right-5 px-2 absolute cursor-pointer hover:opacity-60", onClick: onClear, children: jsx(IconElement, { accessor: "times", className: "text-gray-500" }) })), htmlType === 'date' && !trailing && isValid && onClear && (jsx("div", { className: "right-10 px-2 absolute cursor-pointer hover:opacity-60", onClick: onClear, children: jsx(IconElement, { accessor: "times", className: "text-gray-500" }) }))] }))), htmlType === 'area' && (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' && (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 && (jsx("div", { className: styles.trailing, children: trailing })), isTouched && !isValid && (jsx("div", { className: styles.trailing, children: invalidIcon }))] }), jsxs("div", { className: styles.foot, children: [description && !(error && isTouched) && (jsx("p", { className: styles.description, children: description })), error && isTouched && jsx("p", { className: styles.error, children: error })] })] }));
722
+ (htmlType !== 'area' && (jsxs("div", { className: "flex items-center", children: [jsx("input", { type: mask !== undefined ? 'text' : htmlType, ref: mask && ref, name: name, id: name, className: toClassName(styles.input, htmlType === 'color' && '!h-10'), placeholder: placeholder, defaultValue: isSolo ? value : undefined, value: isSolo ? undefined : value, min: min, max: max, maxLength: maxLength, disabled: isDisabled, onChange: onChange, onBlur: onBlur }), htmlType === 'text' && isClearable && (jsx("div", { className: "right-5 px-2 absolute cursor-pointer hover:opacity-60", onClick: onClear, children: jsx(IconElement, { accessor: "times", className: "text-gray-500" }) })), htmlType === 'date' && isClearable && (jsx("div", { className: "right-10 px-2 absolute cursor-pointer hover:opacity-60", onClick: onClear, children: jsx(IconElement, { accessor: "times", className: "text-gray-500" }) }))] }))), htmlType === 'area' && (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' && (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 && (jsx("div", { className: styles.trailing, children: trailing })), isTouched && !isValid && (jsx("div", { className: styles.trailing, children: invalidIcon }))] }), jsxs("div", { className: styles.foot, children: [description && !(error && isTouched) && (jsx("p", { className: styles.description, children: description })), error && isTouched && jsx("p", { className: styles.error, children: error })] })] }));
720
723
  };
721
724
 
722
725
  var base$k = {
@@ -1205,13 +1208,13 @@ var PanelPaginationNavigation = function (props) {
1205
1208
  }, [onChange]);
1206
1209
  var pageType = useMemo(function () {
1207
1210
  var result = 'center';
1208
- if (current < min + 3) {
1211
+ if (current < min + 2) {
1209
1212
  result = 'first';
1210
1213
  }
1211
- if (current > max - 3) {
1214
+ if (current > max - 2) {
1212
1215
  result = 'last';
1213
1216
  }
1214
- if (max <= 3) {
1217
+ if (max <= 4) {
1215
1218
  result = 'simple';
1216
1219
  }
1217
1220
  return result;
@@ -1222,13 +1225,13 @@ var PanelPaginationNavigation = function (props) {
1222
1225
  component = (jsxs(Fragment$1, { children: [jsx("button", { className: toClassName(styles.button.default, current === min && styles.button.active), onClick: function () { return handleChangeCurrent(min); }, children: min }), jsx("button", { className: toClassName(styles.button.default, current === min + 1 && styles.button.active), onClick: function () { return handleChangeCurrent(min + 1); }, children: min + 1 }), jsx("button", { className: toClassName(styles.button.default, current === min + 2 && styles.button.active), onClick: function () { return handleChangeCurrent(min + 2); }, children: min + 2 }), jsx("span", { className: styles.divider, children: "..." }), jsx("button", { className: styles.button.default, onClick: function () { return handleChangeCurrent(max); }, children: max })] }));
1223
1226
  break;
1224
1227
  case 'center':
1225
- component = (jsxs(Fragment$1, { children: [jsx("button", { className: styles.button.default, onClick: function () { return handleChangeCurrent(min); }, children: min }), jsx("span", { className: styles.divider, children: "..." }), jsx("button", { className: styles.button.default, onClick: function () { return handleChangeCurrent(current - 1); }, children: current - 1 }), jsx("button", { className: toClassName(styles.button.default, styles.button.active), onClick: function () { return handleChangeCurrent(current); }, children: current }), jsx("button", { className: styles.button.default, onClick: function () { return handleChangeCurrent(current + 1); }, children: current + 1 }), jsx("span", { className: styles.divider, children: "..." }), jsx("button", { className: styles.button.default, onClick: function () { return handleChangeCurrent(max); }, children: max })] }));
1228
+ component = (jsxs(Fragment$1, { children: [jsx("button", { className: styles.button.default, onClick: function () { return handleChangeCurrent(min); }, children: min }), current - 2 !== min && jsx("span", { className: styles.divider, children: "..." }), jsx("button", { className: styles.button.default, onClick: function () { return handleChangeCurrent(current - 1); }, children: current - 1 }), jsx("button", { className: toClassName(styles.button.default, styles.button.active), onClick: function () { return handleChangeCurrent(current); }, children: current }), jsx("button", { className: styles.button.default, onClick: function () { return handleChangeCurrent(current + 1); }, children: current + 1 }), current + 2 !== max && jsx("span", { className: styles.divider, children: "..." }), jsx("button", { className: styles.button.default, onClick: function () { return handleChangeCurrent(max); }, children: max })] }));
1226
1229
  break;
1227
1230
  case 'last':
1228
1231
  component = (jsxs(Fragment$1, { children: [jsx("button", { className: styles.button.default, onClick: function () { return handleChangeCurrent(min); }, children: min }), jsx("span", { className: styles.divider, children: "..." }), jsx("button", { className: toClassName(styles.button.default, current === max - 2 && styles.button.active), onClick: function () { return handleChangeCurrent(max - 2); }, children: max - 2 }), jsx("button", { className: toClassName(styles.button.default, current === max - 1 && styles.button.active), onClick: function () { return handleChangeCurrent(max - 1); }, children: max - 1 }), jsx("button", { className: toClassName(styles.button.default, current === max && styles.button.active), onClick: function () { return handleChangeCurrent(max); }, children: max })] }));
1229
1232
  break;
1230
1233
  case 'simple':
1231
- component = (jsxs(Fragment$1, { children: [jsx("button", { className: toClassName(styles.button.default, current === min && styles.button.active), onClick: function () { return handleChangeCurrent(min); }, children: min }), max >= min + 1 && (jsx("button", { className: toClassName(styles.button.default, current === min + 1 && styles.button.active), onClick: function () { return handleChangeCurrent(min + 1); }, children: min + 1 })), max >= min + 2 && (jsx("button", { className: toClassName(styles.button.default, current === min + 2 && styles.button.active), onClick: function () { return handleChangeCurrent(min + 2); }, children: min + 2 }))] }));
1234
+ component = (jsxs(Fragment$1, { children: [jsx("button", { className: toClassName(styles.button.default, current === min && styles.button.active), onClick: function () { return handleChangeCurrent(min); }, children: min }), max >= min + 1 && (jsx("button", { className: toClassName(styles.button.default, current === min + 1 && styles.button.active), onClick: function () { return handleChangeCurrent(min + 1); }, children: min + 1 })), max >= min + 2 && (jsx("button", { className: toClassName(styles.button.default, current === min + 2 && styles.button.active), onClick: function () { return handleChangeCurrent(min + 2); }, children: min + 2 })), max >= min + 3 && (jsx("button", { className: toClassName(styles.button.default, current === min + 3 && styles.button.active), onClick: function () { return handleChangeCurrent(min + 3); }, children: min + 3 }))] }));
1232
1235
  break;
1233
1236
  }
1234
1237
  return (jsxs("div", { className: styles.container, children: [jsxs("div", { className: "flex flex-1 justify-between sm:hidden", children: [jsx("button", { className: toClassName(styles.mobile.button, current === min && styles.button.disabled), disabled: current === min, onClick: function () { return handleChangeCurrent(current - 1); }, children: "Previous" }), jsx("button", { className: toClassName(styles.mobile.button, current === max && styles.button.disabled), disabled: current === max, onClick: function () { return handleChangeCurrent(current + 1); }, children: "Next" })] }), jsxs("div", { className: styles.desktop.container, children: [jsx("div", { children: jsx("div", { className: "text-sm text-gray-700", children: children && children({ min: min, max: max, current: current }) }) }), jsx("div", { children: jsxs("nav", { className: styles.desktop.navigation, "aria-label": "Pagination", children: [jsxs("button", { className: toClassName(styles.desktop.leftButton, current === min && styles.button.disabled), disabled: current === min, onClick: function () { return handleChangeCurrent(current - 1); }, children: [jsx("span", { className: styles.label, children: "Previous" }), jsx(ChevronLeftIcon, { className: styles.icon, "aria-hidden": "true" })] }), component, jsxs("button", { className: toClassName(styles.desktop.rightButton, current === max && styles.button.disabled), disabled: current === max, onClick: function () { return handleChangeCurrent(current + 1); }, children: [jsx("span", { className: styles.label, children: "Next" }), jsx(ChevronRightIcon, { className: styles.icon, "aria-hidden": "true" })] })] }) })] })] }));
@@ -1881,12 +1884,15 @@ var PagePaginationNavigation = function (props) {
1881
1884
  var styles = handleGenerateStyle();
1882
1885
  var pageType = useMemo(function () {
1883
1886
  var result = 'center';
1884
- if (current < min + 3) {
1887
+ if (current < min + 2) {
1885
1888
  result = 'first';
1886
1889
  }
1887
- if (current > max - 3) {
1890
+ if (current > max - 2) {
1888
1891
  result = 'last';
1889
1892
  }
1893
+ if (max <= 4) {
1894
+ result = 'simple';
1895
+ }
1890
1896
  return result;
1891
1897
  }, [current, min, max]);
1892
1898
  var component;
@@ -1895,11 +1901,14 @@ var PagePaginationNavigation = function (props) {
1895
1901
  component = (jsxs(Fragment$1, { children: [jsx("button", { className: toClassName(styles.button.default, current === min && styles.button.active), onClick: function () { return setCurrent(min); }, children: min }), jsx("button", { className: toClassName(styles.button.default, current === min + 1 && styles.button.active), onClick: function () { return setCurrent(min + 1); }, children: min + 1 }), jsx("button", { className: toClassName(styles.button.default, current === min + 2 && styles.button.active), onClick: function () { return setCurrent(min + 2); }, children: min + 2 }), jsx("span", { className: styles.divider, children: "..." }), jsx("button", { className: styles.button.default, onClick: function () { return setCurrent(max); }, children: max })] }));
1896
1902
  break;
1897
1903
  case 'center':
1898
- component = (jsxs(Fragment$1, { children: [jsx("button", { className: styles.button.default, onClick: function () { return setCurrent(min); }, children: min }), jsx("span", { className: styles.divider, children: "..." }), jsx("button", { className: styles.button.default, onClick: function () { return setCurrent(current - 1); }, children: current - 1 }), jsx("button", { className: toClassName(styles.button.default, styles.button.active), onClick: function () { return setCurrent(current); }, children: current }), jsx("button", { className: styles.button.default, onClick: function () { return setCurrent(current + 1); }, children: current + 1 }), jsx("span", { className: styles.divider, children: "..." }), jsx("button", { className: styles.button.default, onClick: function () { return setCurrent(max); }, children: max })] }));
1904
+ component = (jsxs(Fragment$1, { children: [jsx("button", { className: styles.button.default, onClick: function () { return setCurrent(min); }, children: min }), current - 2 !== min && jsx("span", { className: styles.divider, children: "..." }), jsx("button", { className: styles.button.default, onClick: function () { return setCurrent(current - 1); }, children: current - 1 }), jsx("button", { className: toClassName(styles.button.default, styles.button.active), onClick: function () { return setCurrent(current); }, children: current }), jsx("button", { className: styles.button.default, onClick: function () { return setCurrent(current + 1); }, children: current + 1 }), current + 2 !== max && jsx("span", { className: styles.divider, children: "..." }), jsx("button", { className: styles.button.default, onClick: function () { return setCurrent(max); }, children: max })] }));
1899
1905
  break;
1900
1906
  case 'last':
1901
1907
  component = (jsxs(Fragment$1, { children: [jsx("button", { className: styles.button.default, onClick: function () { return setCurrent(min); }, children: min }), jsx("span", { className: styles.divider, children: "..." }), jsx("button", { className: toClassName(styles.button.default, current === max - 2 && styles.button.active), onClick: function () { return setCurrent(max - 2); }, children: max - 2 }), jsx("button", { className: toClassName(styles.button.default, current === max - 1 && styles.button.active), onClick: function () { return setCurrent(max - 1); }, children: max - 1 }), jsx("button", { className: toClassName(styles.button.default, current === max && styles.button.active), onClick: function () { return setCurrent(max); }, children: max })] }));
1902
1908
  break;
1909
+ case 'simple':
1910
+ component = (jsxs(Fragment$1, { children: [jsx("button", { className: toClassName(styles.button.default, current === min && styles.button.active), onClick: function () { return setCurrent(min); }, children: min }), max >= min + 1 && (jsx("button", { className: toClassName(styles.button.default, current === min + 1 && styles.button.active), onClick: function () { return setCurrent(min + 1); }, children: min + 1 })), max >= min + 2 && (jsx("button", { className: toClassName(styles.button.default, current === min + 2 && styles.button.active), onClick: function () { return setCurrent(min + 2); }, children: min + 2 })), max >= min + 3 && (jsx("button", { className: toClassName(styles.button.default, current === min + 3 && styles.button.active), onClick: function () { return setCurrent(min + 3); }, children: min + 3 }))] }));
1911
+ break;
1903
1912
  }
1904
1913
  useEffect(function () {
1905
1914
  if (current) {
@@ -2486,6 +2495,10 @@ var SelectMenuForm = function (props) {
2486
2495
  }
2487
2496
  // eslint-disable-next-line react-hooks/exhaustive-deps
2488
2497
  }, [isFocus]);
2498
+ // listen to value changes.
2499
+ useEffect(function () {
2500
+ setState(value);
2501
+ }, [value]);
2489
2502
  return (jsxs("div", { className: styles.container, children: [jsxs("div", { className: styles.head, children: [label && (jsx("label", { htmlFor: name, className: styles.label, children: label })), !required && !isRequired && typeof label === 'string' && (jsx("span", { className: styles.hint, children: "Optional" })), required && required({ isRequired: isRequired })] }), jsxs("div", { className: styles.container, children: [jsx(Select, { primaryColor: "primary",
2490
2503
  //
2491
2504
  placeholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder.select, noOptionsMessage: (jsx("p", { className: styles.emptyState, children: (_a = placeholder === null || placeholder === void 0 ? void 0 : placeholder.emptyState) !== null && _a !== void 0 ? _a : 'No results found' })), searchInputPlaceholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder.searchInput,
@@ -2616,15 +2629,16 @@ var DateMenuForm = function (props) {
2616
2629
  return isEmpty ? (jsx(IconElement, { accessor: "calendar" })) : (jsx(IconElement, { accessor: "xmark", className: "text-black" }));
2617
2630
  } : _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;
2618
2631
  var isValid = error === undefined;
2619
- var _p = useState(true), isFocus = _p[0], setIsFocus = _p[1];
2620
- var _q = useState(defaultValue !== null && defaultValue !== void 0 ? defaultValue : {
2632
+ var _p = useState(defaultValue !== null && defaultValue !== void 0 ? defaultValue : {
2621
2633
  startDate: null,
2622
2634
  endDate: null,
2623
- }), state = _q[0], setState = _q[1];
2635
+ }), state = _p[0], setState = _p[1];
2624
2636
  var handleValueChange = function (newValue) {
2625
2637
  setState(newValue);
2626
2638
  onChange && onChange(newValue);
2627
- setIsFocus(false);
2639
+ setTimeout(function () {
2640
+ onBlur && onBlur();
2641
+ }, 50);
2628
2642
  };
2629
2643
  var handleGenerateStyle = function () {
2630
2644
  var result = deepCopyObject(styles$5.base);
@@ -2642,13 +2656,6 @@ var DateMenuForm = function (props) {
2642
2656
  }
2643
2657
  // eslint-disable-next-line react-hooks/exhaustive-deps
2644
2658
  }, [state]);
2645
- // Simulate onBlur event.
2646
- useEffect(function () {
2647
- if (!isFocus) {
2648
- onBlur && onBlur();
2649
- }
2650
- // eslint-disable-next-line react-hooks/exhaustive-deps
2651
- }, [isFocus]);
2652
2659
  return (jsxs("div", { className: styles.container, children: [jsxs("div", { className: styles.head, children: [label && (jsx("label", { htmlFor: name, className: styles.label, children: label })), !required && !isRequired && typeof label === 'string' && (jsx("span", { className: styles.hint, children: "Optional" })), required && required({ isRequired: isRequired })] }), jsxs("div", { className: styles.container, children: [jsx(Datepicker, { inputName: name, inputId: name, i18n: i18n, useRange: size === 'expanded', placeholder: placeholder, asSingle: !isRanged, separator: separator, startFrom: startFrom, displayFormat: displayFormat, disabled: isDisabled, popoverDirection: direction, minDate: minDate, maxDate: maxDate, toggleIcon: icon,
2653
2660
  //
2654
2661
  value: state,
@@ -9562,7 +9569,7 @@ var OpeningHourItem = function (props) {
9562
9569
  };
9563
9570
  onUpdate && onUpdate(params);
9564
9571
  }
9565
- }, className: toClassName(styles$2.control.action, form.values.closed ? 'bg-primary-500' : 'bg-gray-200'), children: [jsx("span", { className: styles$2.control.sr, children: "Toggle closed" }), jsx("span", { "aria-hidden": "true", className: toClassName(styles$2.control.span, form.values.closed ? 'translate-x-5' : 'translate-x-0') })] })] }), !isCreating ? (jsx(ButtonElement, { size: "sm", type: "outline", onClick: function () { return onDelete && onDelete(form.values.id); }, children: jsx(XMarkIcon, { className: "w-4 h-4" }) })) : (jsx(ButtonElement, { size: "sm", type: "secondary", onClick: form.handleSubmit, children: jsx(PlusIcon, { className: "w-4 h-4" }) }))] }));
9572
+ }, className: toClassName(styles$2.control.action, form.values.closed ? 'bg-primary-500' : 'bg-gray-200'), children: [jsx("span", { className: styles$2.control.sr, children: "Toggle closed" }), jsx("span", { "aria-hidden": "true", className: toClassName(styles$2.control.span, form.values.closed ? 'translate-x-5' : 'translate-x-0') })] })] }), !isCreating ? (jsx(ButtonElement, { size: "sm", type: "outline", onClick: function () { return onDelete && onDelete(form.values.id); }, children: jsx(XMarkIcon, { className: "w-4 h-4" }) })) : (jsx(ButtonElement, { size: "sm", type: "secondary", onClick: function () { return form.handleSubmit(); }, children: jsx(PlusIcon, { className: "w-4 h-4" }) }))] }));
9566
9573
  };
9567
9574
 
9568
9575
  var styles$2 = {