@landtrustinc/design-system 1.2.14 → 1.2.16

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
@@ -1883,6 +1883,10 @@ type LandownerProfileProps = {
1883
1883
  * Message button click handler
1884
1884
  */
1885
1885
  onMessageClick?: () => void;
1886
+ /**
1887
+ * Whether the message button is disabled
1888
+ */
1889
+ isMessageDisabled?: boolean;
1886
1890
  /**
1887
1891
  * Additional CSS class names
1888
1892
  */
package/dist/index.js CHANGED
@@ -3393,7 +3393,7 @@ var styles = {
3393
3393
  `,
3394
3394
  disabled: import_react4.css`
3395
3395
  opacity: ${opacity["50"]};
3396
- pointer-events: none;
3396
+ cursor: not-allowed;
3397
3397
  `,
3398
3398
  withIcon: import_react4.css`
3399
3399
  gap: var(--spacing-2);
@@ -3460,6 +3460,14 @@ var Button = import_react6.default.forwardRef(
3460
3460
  icon && children && styles.withIcon
3461
3461
  ],
3462
3462
  ...props,
3463
+ onClick: (e) => {
3464
+ var _a;
3465
+ if (disabled) {
3466
+ e.preventDefault();
3467
+ return;
3468
+ }
3469
+ (_a = props.onClick) == null ? void 0 : _a.call(props, e);
3470
+ },
3463
3471
  children: [
3464
3472
  icon,
3465
3473
  children && /* @__PURE__ */ (0, import_jsx_runtime201.jsx)("span", { css: [labelStyles(!isLoading), labelStyleOverrides], children }),
@@ -6944,6 +6952,7 @@ var LandownerProfile = ({
6944
6952
  responseTime,
6945
6953
  messageButtonText = "Message",
6946
6954
  onMessageClick,
6955
+ isMessageDisabled = false,
6947
6956
  className
6948
6957
  }) => {
6949
6958
  const responseRateFeature = responseRate ? {
@@ -7008,7 +7017,15 @@ var LandownerProfile = ({
7008
7017
  !!responseTimeFeature && /* @__PURE__ */ (0, import_jsx_runtime233.jsx)(FeatureListItem_default, { ...responseTimeFeature })
7009
7018
  ] })
7010
7019
  ] }),
7011
- /* @__PURE__ */ (0, import_jsx_runtime233.jsx)(Box_default, { alignSelf: "flex-start", children: /* @__PURE__ */ (0, import_jsx_runtime233.jsx)(Button_default, { variant: "secondary", onClick: onMessageClick, children: messageButtonText }) })
7020
+ /* @__PURE__ */ (0, import_jsx_runtime233.jsx)(Box_default, { alignSelf: "flex-start", children: /* @__PURE__ */ (0, import_jsx_runtime233.jsx)(
7021
+ Button_default,
7022
+ {
7023
+ variant: "secondary",
7024
+ onClick: onMessageClick,
7025
+ disabled: isMessageDisabled,
7026
+ children: messageButtonText
7027
+ }
7028
+ ) })
7012
7029
  ]
7013
7030
  }
7014
7031
  )