react-better-html 1.1.94 → 1.1.96

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.mts CHANGED
@@ -551,11 +551,13 @@ type FormProps = {
551
551
  isSubmitting?: boolean;
552
552
  /** @default false */
553
553
  isDestructive?: boolean;
554
+ /** @default false */
555
+ withDividers?: boolean;
554
556
  onClickCancel?: () => void;
555
557
  onSubmit?: (value: React.FormEvent<HTMLFormElement>) => void;
556
558
  children?: React.ReactNode;
557
559
  } & ComponentMarginProps;
558
- declare function Form({ form, submitButtonText, submitButtonLoaderName, submitButtonId, submitButtonIsDisabled, actionButtonsLocation, gap, isSubmitting, isDestructive, onClickCancel, onSubmit, children, ...props }: FormProps): react_jsx_runtime.JSX.Element;
560
+ declare function Form({ form, submitButtonText, submitButtonLoaderName, submitButtonId, submitButtonIsDisabled, actionButtonsLocation, gap, isSubmitting, isDestructive, withDividers, onClickCancel, onSubmit, children, ...props }: FormProps): react_jsx_runtime.JSX.Element;
559
561
  declare const _default$2: react.MemoExoticComponent<typeof Form>;
560
562
 
561
563
  type LabelProps = {
package/dist/index.d.ts CHANGED
@@ -551,11 +551,13 @@ type FormProps = {
551
551
  isSubmitting?: boolean;
552
552
  /** @default false */
553
553
  isDestructive?: boolean;
554
+ /** @default false */
555
+ withDividers?: boolean;
554
556
  onClickCancel?: () => void;
555
557
  onSubmit?: (value: React.FormEvent<HTMLFormElement>) => void;
556
558
  children?: React.ReactNode;
557
559
  } & ComponentMarginProps;
558
- declare function Form({ form, submitButtonText, submitButtonLoaderName, submitButtonId, submitButtonIsDisabled, actionButtonsLocation, gap, isSubmitting, isDestructive, onClickCancel, onSubmit, children, ...props }: FormProps): react_jsx_runtime.JSX.Element;
560
+ declare function Form({ form, submitButtonText, submitButtonLoaderName, submitButtonId, submitButtonIsDisabled, actionButtonsLocation, gap, isSubmitting, isDestructive, withDividers, onClickCancel, onSubmit, children, ...props }: FormProps): react_jsx_runtime.JSX.Element;
559
561
  declare const _default$2: react.MemoExoticComponent<typeof Form>;
560
562
 
561
563
  type LabelProps = {
package/dist/index.js CHANGED
@@ -2566,6 +2566,7 @@ var Image_default = { Image: MemoizedImage }.Image;
2566
2566
 
2567
2567
  // src/components/Button.tsx
2568
2568
  var import_react9 = require("react");
2569
+ var import_react_router_dom2 = require("react-router-dom");
2569
2570
  var import_styled_components7 = __toESM(require("styled-components"));
2570
2571
  var import_jsx_runtime7 = require("react/jsx-runtime");
2571
2572
  var ButtonElement = import_styled_components7.default.button.withConfig({
@@ -2683,14 +2684,14 @@ var ButtonComponent = function Button({
2683
2684
  return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
2684
2685
  ButtonElement,
2685
2686
  {
2686
- as: href ? "a" : "button",
2687
+ as: href ? import_react_router_dom2.Link : "button",
2687
2688
  theme: theme2,
2688
2689
  colorTheme: betterHtmlContext2.colorTheme,
2689
2690
  isSmall,
2690
2691
  withText: text !== void 0,
2691
2692
  isLoading: isLoadingElement,
2692
2693
  disabled,
2693
- href,
2694
+ to: href,
2694
2695
  download,
2695
2696
  target,
2696
2697
  type: isSubmit && !isLoadingElement ? "submit" : "button",
@@ -3414,7 +3415,7 @@ var countries = [
3414
3415
  phoneNumberFormat: "(XXX)XXX-XXXX"
3415
3416
  },
3416
3417
  {
3417
- name: "AndorrA",
3418
+ name: "Andorra",
3418
3419
  code: "AD",
3419
3420
  timeZone: "Europe/Andorra",
3420
3421
  phoneNumberExtension: "376"
@@ -5150,6 +5151,7 @@ var DropdownComponent = (0, import_react16.forwardRef)(function Dropdown({
5150
5151
  cursor: !withSearch ? "pointer" : void 0,
5151
5152
  placeholder: withSearch ? selectedOption ? selectedOption.label : readyPlaceholder : readyPlaceholder,
5152
5153
  leftIcon,
5154
+ autoComplete: "off",
5153
5155
  className: `react-better-html-dropdown${isOpen ? " react-better-html-dropdown-open" : ""}${isOpenLate ? " react-better-html-dropdown-open-late" : ""}${inputFieldClassName ? ` ${inputFieldClassName}` : ""}`,
5154
5156
  onClick: !disabled ? setIsOpen.toggle : void 0,
5155
5157
  onFocus: setIsFocused.setTrue,
@@ -6573,6 +6575,7 @@ function Form({
6573
6575
  gap,
6574
6576
  isSubmitting,
6575
6577
  isDestructive,
6578
+ withDividers,
6576
6579
  onClickCancel,
6577
6580
  onSubmit,
6578
6581
  children,
@@ -6588,7 +6591,10 @@ function Form({
6588
6591
  const SubmitButtonTag = isDestructive ? Button_default.destructive : Button_default;
6589
6592
  const submitButtonIsDisabledFinal = submitButtonIsDisabled || submitButtonIsDisabledInternal;
6590
6593
  return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Div_default, { width: "100%", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("form", { onSubmit: onSubmit ?? form?.onSubmit, children: [
6591
- gap !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Div_default.column, { gap, children }) : children,
6594
+ gap !== void 0 || withDividers ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Div_default.column, { gap: gap ?? (withDividers ? theme2.styles.space : theme2.styles.gap), children: withDividers ? import_react20.Children.toArray(children).map((child, index) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react20.Fragment, { children: [
6595
+ child,
6596
+ index < import_react20.Children.toArray(children).length - 1 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Divider_default.horizontal, {})
6597
+ ] }, index)) : children }) : children,
6592
6598
  submitButtonText && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
6593
6599
  Div_default.row,
6594
6600
  {
@@ -7257,12 +7263,12 @@ var loaderControls = {
7257
7263
  };
7258
7264
 
7259
7265
  // src/plugins/react-router-dom.ts
7260
- var import_react_router_dom2 = require("react-router-dom");
7266
+ var import_react_router_dom3 = require("react-router-dom");
7261
7267
  var reactRouterDomPlugin = {
7262
7268
  name: "react-router-dom",
7263
7269
  components: {
7264
- Link: import_react_router_dom2.Link,
7265
- NavLink: import_react_router_dom2.NavLink
7270
+ Link: import_react_router_dom3.Link,
7271
+ NavLink: import_react_router_dom3.NavLink
7266
7272
  },
7267
7273
  initialize: () => {
7268
7274
  console.log("react-router-dom plugin initialized");