@sustaina/shared-ui 1.63.1 → 1.64.1

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.mjs CHANGED
@@ -15676,7 +15676,8 @@ function MentionsTypeaheadMenuItem({
15676
15676
  function MentionsPlugin({
15677
15677
  mentions = [],
15678
15678
  mentionConfig,
15679
- trigger
15679
+ trigger,
15680
+ triggerOnly = false
15680
15681
  }) {
15681
15682
  const [editor] = useLexicalComposerContext();
15682
15683
  const [queryString, setQueryString] = useState(null);
@@ -15851,10 +15852,13 @@ function MentionsPlugin({
15851
15852
  if (triggerMatch) {
15852
15853
  return triggerMatch;
15853
15854
  }
15855
+ if (triggerOnly) {
15856
+ return null;
15857
+ }
15854
15858
  }
15855
15859
  return checkForTextMatch(text, mentions, mentionConfig);
15856
15860
  },
15857
- [trigger, mentions, mentionConfig]
15861
+ [trigger, triggerOnly, mentions, mentionConfig]
15858
15862
  );
15859
15863
  if (mentions.length === 0) {
15860
15864
  return null;
@@ -16047,6 +16051,7 @@ function RichTextInner({
16047
16051
  mentions,
16048
16052
  mentionConfig,
16049
16053
  mentionTrigger,
16054
+ mentionTriggerOnly,
16050
16055
  plainTextMentions = false,
16051
16056
  className,
16052
16057
  id,
@@ -16155,7 +16160,8 @@ function RichTextInner({
16155
16160
  {
16156
16161
  mentions,
16157
16162
  mentionConfig: finalMentionConfig,
16158
- trigger: mentionTrigger
16163
+ trigger: mentionTrigger,
16164
+ triggerOnly: mentionTriggerOnly
16159
16165
  }
16160
16166
  ),
16161
16167
  /* @__PURE__ */ jsx(MentionDeletePlugin, {}),
@@ -17364,8 +17370,8 @@ var ActionButton = ({ label, onPress, disabled, className }) => {
17364
17370
  onPress();
17365
17371
  },
17366
17372
  className: cn(
17367
- "action-menu-btn flex w-full items-center justify-start px-4 py-3 text-left",
17368
- "hover:bg-sus-secondary-green-3 hover:not-disabled:text-sus-primary-green-9 text-gray-800",
17373
+ "action-menu-btn flex w-full items-center justify-start rounded-sm px-2 py-1.5 text-left text-sm",
17374
+ "cursor-pointer text-gray-800 hover:bg-[#DDE8E2]",
17369
17375
  isDisabled && "cursor-not-allowed opacity-50 hover:bg-transparent text-gray-400",
17370
17376
  className
17371
17377
  ),
@@ -17410,14 +17416,14 @@ var ActionMenu = ({
17410
17416
  e.stopPropagation();
17411
17417
  setOpen((prev) => !prev);
17412
17418
  },
17413
- children: triggerButtonIcon ? triggerButtonIcon : /* @__PURE__ */ jsx(MoreVertical, { className: "w-5 h-5 text-gray-600" })
17419
+ children: triggerButtonIcon ? triggerButtonIcon : /* @__PURE__ */ jsx(MoreVertical, { className: "h-4 w-4 text-gray-600" })
17414
17420
  }
17415
17421
  ) }),
17416
17422
  /* @__PURE__ */ jsxs(
17417
17423
  PopoverContent,
17418
17424
  {
17419
17425
  className: cn(
17420
- "w-48 p-0 space-y-1 bg-sus-secondary-gray-2 border-none rounded-md overflow-hidden drop-shadow-[2px_0px_4px_rgba(0,0,0,0.1)]",
17426
+ "w-fit min-w-[10.5rem] p-1 bg-sus-secondary-gray-2 border-none rounded-md overflow-hidden drop-shadow-[2px_0px_4px_rgba(0,0,0,0.1)]",
17421
17427
  actionMenuClassName
17422
17428
  ),
17423
17429
  align: "end",
@@ -18115,7 +18121,8 @@ function MentionsTypeaheadMenuItem2({
18115
18121
  function MentionsPlugin2({
18116
18122
  mentions = [],
18117
18123
  mentionConfig,
18118
- trigger
18124
+ trigger,
18125
+ triggerOnly = false
18119
18126
  }) {
18120
18127
  const [editor] = useLexicalComposerContext();
18121
18128
  const [queryString, setQueryString] = useState(null);
@@ -18293,10 +18300,13 @@ function MentionsPlugin2({
18293
18300
  if (triggerMatch) {
18294
18301
  return triggerMatch;
18295
18302
  }
18303
+ if (triggerOnly) {
18304
+ return null;
18305
+ }
18296
18306
  }
18297
18307
  return checkForTextMatch2(text, mentions, mentionConfig);
18298
18308
  },
18299
- [trigger, mentions, mentionConfig]
18309
+ [trigger, triggerOnly, mentions, mentionConfig]
18300
18310
  );
18301
18311
  if (mentions.length === 0) {
18302
18312
  return null;
@@ -18447,6 +18457,7 @@ function InputMentionInner({
18447
18457
  mentions,
18448
18458
  mentionConfig,
18449
18459
  mentionTrigger,
18460
+ mentionTriggerOnly,
18450
18461
  plainTextMentions = false,
18451
18462
  className,
18452
18463
  id,
@@ -18526,7 +18537,8 @@ function InputMentionInner({
18526
18537
  {
18527
18538
  mentions,
18528
18539
  mentionConfig: finalMentionConfig,
18529
- trigger: mentionTrigger
18540
+ trigger: mentionTrigger,
18541
+ triggerOnly: mentionTriggerOnly
18530
18542
  }
18531
18543
  ),
18532
18544
  /* @__PURE__ */ jsx(MentionDeletePlugin2, {}),