@uniformdev/mesh-sdk-react 19.30.1-alpha.5 → 19.32.1-alpha.4

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
@@ -865,11 +865,13 @@ type ObjectSearchListItemProps = SelectedItemProps & {
865
865
  * @default false
866
866
  */
867
867
  isMulti?: boolean;
868
+ /** sets disabled state to the interactive element */
869
+ disabled?: boolean;
868
870
  };
869
871
  /**
870
872
  * @description entry search list item is an opinionated UI component best used for initial retrieved results
871
873
  * @example <ObjectSearchListItem id="my-result-item" title="title" popoverData={<p>some data info</p>}><div>example of uncontrolled content</div></ObjectSearchListItem> */
872
- declare const ObjectSearchListItem: ({ id, title, contentType, image, popoverData, onSelect, isMulti, children, }: ObjectSearchListItemProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
874
+ declare const ObjectSearchListItem: ({ id, title, contentType, image, popoverData, onSelect, isMulti, disabled, children, }: ObjectSearchListItemProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
873
875
  /**
874
876
  * An opinionated loading skeleton component best used with ObjectSearchListItem
875
877
  * @example <ObjectSearchListItemLoadingSkeleton />
package/dist/index.esm.js CHANGED
@@ -6635,6 +6635,10 @@ var ObjectListItemContainer = css31`
6635
6635
  grid-template-columns: 1fr auto;
6636
6636
  padding: var(--spacing-sm);
6637
6637
  `;
6638
+ var ObjectListItemContainerDisabled = css31`
6639
+ opacity: var(--opacity-50);
6640
+ pointer-events: none;
6641
+ `;
6638
6642
  var ObjectListItemLoading = css31`
6639
6643
  animation: ${skeletonLoading} 1s linear infinite alternate;
6640
6644
  border-color: transparent;
@@ -6699,6 +6703,7 @@ var ObjectSearchListItem = ({
6699
6703
  popoverData,
6700
6704
  onSelect,
6701
6705
  isMulti = false,
6706
+ disabled,
6702
6707
  children
6703
6708
  }) => {
6704
6709
  const { onSelectItem, selectedListItems } = useObjectSearchContext();
@@ -6713,20 +6718,36 @@ var ObjectSearchListItem = ({
6713
6718
  return onSelectItem([selectedItem]);
6714
6719
  };
6715
6720
  const selected = selectedListItems.some((item) => item.id === id);
6716
- return /* @__PURE__ */ jsxs33("div", { role: "listitem", css: ObjectListItemContainer, children: [
6717
- /* @__PURE__ */ jsxs33("div", { role: "button", onClick: handleSelectItem, css: ObjectListItemControlledContent, children: [
6718
- !image ? null : /* @__PURE__ */ jsx56("img", { ...image, loading: (image == null ? void 0 : image.width) && image.height ? "lazy" : "eager" }),
6719
- /* @__PURE__ */ jsxs33("div", { role: "heading", css: ObjectListItemHeadingGroup, children: [
6720
- !contentType ? null : /* @__PURE__ */ jsx56("span", { css: ObjectListItemSubtitle, children: formatedContentType }),
6721
- /* @__PURE__ */ jsx56("span", { css: ObjectListItemTitle, children: title })
6722
- ] })
6723
- ] }),
6724
- !popoverData ? null : /* @__PURE__ */ jsxs33("div", { css: ObjectListItemInfoContainer, children: [
6725
- selected ? /* @__PURE__ */ jsx56(Chip2, { text: "selected", size: "xs" }) : null,
6726
- /* @__PURE__ */ jsx56(Popover, { baseId: title, ariaLabel: title, buttonText: `See ${title} details`, iconColor: "default", children: popoverData })
6727
- ] }),
6728
- !children ? null : /* @__PURE__ */ jsx56("div", { css: ObjectListItemUnControlledContent, children })
6729
- ] });
6721
+ return /* @__PURE__ */ jsxs33(
6722
+ "div",
6723
+ {
6724
+ role: "listitem",
6725
+ css: [ObjectListItemContainer, disabled ? ObjectListItemContainerDisabled : void 0],
6726
+ children: [
6727
+ /* @__PURE__ */ jsxs33(
6728
+ "div",
6729
+ {
6730
+ role: "button",
6731
+ onClick: handleSelectItem,
6732
+ css: ObjectListItemControlledContent,
6733
+ "aria-disabled": disabled,
6734
+ children: [
6735
+ !image ? null : /* @__PURE__ */ jsx56("img", { ...image, loading: (image == null ? void 0 : image.width) && image.height ? "lazy" : "eager" }),
6736
+ /* @__PURE__ */ jsxs33("div", { role: "heading", css: ObjectListItemHeadingGroup, children: [
6737
+ !contentType ? null : /* @__PURE__ */ jsx56("span", { css: ObjectListItemSubtitle, children: formatedContentType }),
6738
+ /* @__PURE__ */ jsx56("span", { css: ObjectListItemTitle, children: title })
6739
+ ] })
6740
+ ]
6741
+ }
6742
+ ),
6743
+ /* @__PURE__ */ jsxs33("div", { css: ObjectListItemInfoContainer, children: [
6744
+ selected ? /* @__PURE__ */ jsx56(Chip2, { text: "selected", size: "xs" }) : null,
6745
+ !popoverData ? null : /* @__PURE__ */ jsx56(Popover, { baseId: title, ariaLabel: title, buttonText: `See ${title} details`, iconColor: "default", children: popoverData })
6746
+ ] }),
6747
+ !children ? null : /* @__PURE__ */ jsx56("div", { css: ObjectListItemUnControlledContent, children })
6748
+ ]
6749
+ }
6750
+ );
6730
6751
  };
6731
6752
  var ObjectSearchListItemLoadingSkeleton = () => {
6732
6753
  return /* @__PURE__ */ jsx56("div", { role: "presentation", css: [ObjectListItemContainer, ObjectListItemLoading] });
package/dist/index.js CHANGED
@@ -6750,6 +6750,10 @@ var ObjectListItemContainer = import_react55.css`
6750
6750
  grid-template-columns: 1fr auto;
6751
6751
  padding: var(--spacing-sm);
6752
6752
  `;
6753
+ var ObjectListItemContainerDisabled = import_react55.css`
6754
+ opacity: var(--opacity-50);
6755
+ pointer-events: none;
6756
+ `;
6753
6757
  var ObjectListItemLoading = import_react55.css`
6754
6758
  animation: ${import_design_system29.skeletonLoading} 1s linear infinite alternate;
6755
6759
  border-color: transparent;
@@ -6814,6 +6818,7 @@ var ObjectSearchListItem = ({
6814
6818
  popoverData,
6815
6819
  onSelect,
6816
6820
  isMulti = false,
6821
+ disabled,
6817
6822
  children
6818
6823
  }) => {
6819
6824
  const { onSelectItem, selectedListItems } = useObjectSearchContext();
@@ -6828,20 +6833,36 @@ var ObjectSearchListItem = ({
6828
6833
  return onSelectItem([selectedItem]);
6829
6834
  };
6830
6835
  const selected = selectedListItems.some((item) => item.id === id);
6831
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { role: "listitem", css: ObjectListItemContainer, children: [
6832
- /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { role: "button", onClick: handleSelectItem, css: ObjectListItemControlledContent, children: [
6833
- !image ? null : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("img", { ...image, loading: (image == null ? void 0 : image.width) && image.height ? "lazy" : "eager" }),
6834
- /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { role: "heading", css: ObjectListItemHeadingGroup, children: [
6835
- !contentType ? null : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { css: ObjectListItemSubtitle, children: formatedContentType }),
6836
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { css: ObjectListItemTitle, children: title })
6837
- ] })
6838
- ] }),
6839
- !popoverData ? null : /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { css: ObjectListItemInfoContainer, children: [
6840
- selected ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_design_system30.Chip, { text: "selected", size: "xs" }) : null,
6841
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_design_system30.Popover, { baseId: title, ariaLabel: title, buttonText: `See ${title} details`, iconColor: "default", children: popoverData })
6842
- ] }),
6843
- !children ? null : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { css: ObjectListItemUnControlledContent, children })
6844
- ] });
6836
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
6837
+ "div",
6838
+ {
6839
+ role: "listitem",
6840
+ css: [ObjectListItemContainer, disabled ? ObjectListItemContainerDisabled : void 0],
6841
+ children: [
6842
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
6843
+ "div",
6844
+ {
6845
+ role: "button",
6846
+ onClick: handleSelectItem,
6847
+ css: ObjectListItemControlledContent,
6848
+ "aria-disabled": disabled,
6849
+ children: [
6850
+ !image ? null : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("img", { ...image, loading: (image == null ? void 0 : image.width) && image.height ? "lazy" : "eager" }),
6851
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { role: "heading", css: ObjectListItemHeadingGroup, children: [
6852
+ !contentType ? null : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { css: ObjectListItemSubtitle, children: formatedContentType }),
6853
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { css: ObjectListItemTitle, children: title })
6854
+ ] })
6855
+ ]
6856
+ }
6857
+ ),
6858
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { css: ObjectListItemInfoContainer, children: [
6859
+ selected ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_design_system30.Chip, { text: "selected", size: "xs" }) : null,
6860
+ !popoverData ? null : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_design_system30.Popover, { baseId: title, ariaLabel: title, buttonText: `See ${title} details`, iconColor: "default", children: popoverData })
6861
+ ] }),
6862
+ !children ? null : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { css: ObjectListItemUnControlledContent, children })
6863
+ ]
6864
+ }
6865
+ );
6845
6866
  };
6846
6867
  var ObjectSearchListItemLoadingSkeleton = () => {
6847
6868
  return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { role: "presentation", css: [ObjectListItemContainer, ObjectListItemLoading] });
package/dist/index.mjs CHANGED
@@ -6635,6 +6635,10 @@ var ObjectListItemContainer = css31`
6635
6635
  grid-template-columns: 1fr auto;
6636
6636
  padding: var(--spacing-sm);
6637
6637
  `;
6638
+ var ObjectListItemContainerDisabled = css31`
6639
+ opacity: var(--opacity-50);
6640
+ pointer-events: none;
6641
+ `;
6638
6642
  var ObjectListItemLoading = css31`
6639
6643
  animation: ${skeletonLoading} 1s linear infinite alternate;
6640
6644
  border-color: transparent;
@@ -6699,6 +6703,7 @@ var ObjectSearchListItem = ({
6699
6703
  popoverData,
6700
6704
  onSelect,
6701
6705
  isMulti = false,
6706
+ disabled,
6702
6707
  children
6703
6708
  }) => {
6704
6709
  const { onSelectItem, selectedListItems } = useObjectSearchContext();
@@ -6713,20 +6718,36 @@ var ObjectSearchListItem = ({
6713
6718
  return onSelectItem([selectedItem]);
6714
6719
  };
6715
6720
  const selected = selectedListItems.some((item) => item.id === id);
6716
- return /* @__PURE__ */ jsxs33("div", { role: "listitem", css: ObjectListItemContainer, children: [
6717
- /* @__PURE__ */ jsxs33("div", { role: "button", onClick: handleSelectItem, css: ObjectListItemControlledContent, children: [
6718
- !image ? null : /* @__PURE__ */ jsx56("img", { ...image, loading: (image == null ? void 0 : image.width) && image.height ? "lazy" : "eager" }),
6719
- /* @__PURE__ */ jsxs33("div", { role: "heading", css: ObjectListItemHeadingGroup, children: [
6720
- !contentType ? null : /* @__PURE__ */ jsx56("span", { css: ObjectListItemSubtitle, children: formatedContentType }),
6721
- /* @__PURE__ */ jsx56("span", { css: ObjectListItemTitle, children: title })
6722
- ] })
6723
- ] }),
6724
- !popoverData ? null : /* @__PURE__ */ jsxs33("div", { css: ObjectListItemInfoContainer, children: [
6725
- selected ? /* @__PURE__ */ jsx56(Chip2, { text: "selected", size: "xs" }) : null,
6726
- /* @__PURE__ */ jsx56(Popover, { baseId: title, ariaLabel: title, buttonText: `See ${title} details`, iconColor: "default", children: popoverData })
6727
- ] }),
6728
- !children ? null : /* @__PURE__ */ jsx56("div", { css: ObjectListItemUnControlledContent, children })
6729
- ] });
6721
+ return /* @__PURE__ */ jsxs33(
6722
+ "div",
6723
+ {
6724
+ role: "listitem",
6725
+ css: [ObjectListItemContainer, disabled ? ObjectListItemContainerDisabled : void 0],
6726
+ children: [
6727
+ /* @__PURE__ */ jsxs33(
6728
+ "div",
6729
+ {
6730
+ role: "button",
6731
+ onClick: handleSelectItem,
6732
+ css: ObjectListItemControlledContent,
6733
+ "aria-disabled": disabled,
6734
+ children: [
6735
+ !image ? null : /* @__PURE__ */ jsx56("img", { ...image, loading: (image == null ? void 0 : image.width) && image.height ? "lazy" : "eager" }),
6736
+ /* @__PURE__ */ jsxs33("div", { role: "heading", css: ObjectListItemHeadingGroup, children: [
6737
+ !contentType ? null : /* @__PURE__ */ jsx56("span", { css: ObjectListItemSubtitle, children: formatedContentType }),
6738
+ /* @__PURE__ */ jsx56("span", { css: ObjectListItemTitle, children: title })
6739
+ ] })
6740
+ ]
6741
+ }
6742
+ ),
6743
+ /* @__PURE__ */ jsxs33("div", { css: ObjectListItemInfoContainer, children: [
6744
+ selected ? /* @__PURE__ */ jsx56(Chip2, { text: "selected", size: "xs" }) : null,
6745
+ !popoverData ? null : /* @__PURE__ */ jsx56(Popover, { baseId: title, ariaLabel: title, buttonText: `See ${title} details`, iconColor: "default", children: popoverData })
6746
+ ] }),
6747
+ !children ? null : /* @__PURE__ */ jsx56("div", { css: ObjectListItemUnControlledContent, children })
6748
+ ]
6749
+ }
6750
+ );
6730
6751
  };
6731
6752
  var ObjectSearchListItemLoadingSkeleton = () => {
6732
6753
  return /* @__PURE__ */ jsx56("div", { role: "presentation", css: [ObjectListItemContainer, ObjectListItemLoading] });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/mesh-sdk-react",
3
- "version": "19.30.1-alpha.5+2a53a5820",
3
+ "version": "19.32.1-alpha.4+e139d9ab3",
4
4
  "description": "Uniform Mesh Framework SDK for React",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -45,8 +45,8 @@
45
45
  "dependencies": {
46
46
  "@hookform/resolvers": "^3.0.1",
47
47
  "@lexical/react": "^0.11.1",
48
- "@uniformdev/design-system": "19.30.1-alpha.5+2a53a5820",
49
- "@uniformdev/mesh-sdk": "19.30.1-alpha.5+2a53a5820",
48
+ "@uniformdev/design-system": "19.32.1-alpha.4+e139d9ab3",
49
+ "@uniformdev/mesh-sdk": "19.32.1-alpha.4+e139d9ab3",
50
50
  "lexical": "^0.11.1",
51
51
  "mitt": "^3.0.0",
52
52
  "react-beautiful-dnd": "13.1.1",
@@ -80,5 +80,5 @@
80
80
  "publishConfig": {
81
81
  "access": "public"
82
82
  },
83
- "gitHead": "2a53a5820c0343ca6bc8d883ed6737717afba488"
83
+ "gitHead": "e139d9ab324b00fff68e36751585b829c3bb1fb5"
84
84
  }