@uniformdev/mesh-sdk-react 18.30.1-alpha.17 → 18.31.1-alpha.22

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
@@ -766,12 +766,16 @@ type EntrySearchResultItemProps = SelectedItemProps & {
766
766
  hideRemoveButton?: boolean;
767
767
  /** sets user defined child nodes that are uncontrolled by Uniform */
768
768
  children?: ReactNode;
769
+ /** disable or enable drag and drop functionality
770
+ * @default false
771
+ */
772
+ disableDnD?: boolean;
769
773
  };
770
774
  /**
771
775
  * @description An opinionated result item, best used for selected results
772
776
  * @example <EntrySearchResultItem id="my-result" title="title" />
773
777
  */
774
- declare const EntrySearchResultItem: ({ id, title, name, contentType, popoverData, publishStatus, editLinkIcon, editLink, imageUrl, onRemove, createdAt, publishedAt, hideRemoveButton, children, }: EntrySearchResultItemProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
778
+ declare const EntrySearchResultItem: ({ id, title, name, contentType, popoverData, publishStatus, editLinkIcon, editLink, imageUrl, onRemove, createdAt, publishedAt, hideRemoveButton, disableDnD, children, }: EntrySearchResultItemProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
775
779
 
776
780
  type EntrySearchResultItemButtonProps<THtml extends HTMLAttributes<HTMLElement> = HTMLAttributes<HTMLButtonElement>> = {
777
781
  /** sets the button or link text value */
package/dist/index.esm.js CHANGED
@@ -4243,6 +4243,22 @@ var EntrySearchResultItemContainer = css29`
4243
4243
  display: grid;
4244
4244
  grid-template-columns: 1fr auto;
4245
4245
  padding: var(--spacing-sm) var(--spacing-sm) var(--spacing-sm) var(--spacing-md);
4246
+ position: relative;
4247
+
4248
+ &:hover {
4249
+ .drag-handle {
4250
+ opacity: 1;
4251
+ }
4252
+ }
4253
+ `;
4254
+ var EntrySearchDragHandle = css29`
4255
+ border-left: 2px dotted var(--gray-300);
4256
+ border-right: 2px dotted var(--gray-300);
4257
+ position: absolute;
4258
+ inset: var(--spacing-sm) auto var(--spacing-sm) var(--spacing-sm);
4259
+ width: 5px;
4260
+ transition: opacity var(--duration-fast) var(--timing-ease-out);
4261
+ opacity: 0;
4246
4262
  `;
4247
4263
  var EntrySearchResultItemSubtitle = css29`
4248
4264
  color: var(--gray-500);
@@ -4293,6 +4309,7 @@ var EntrySearchResultItem = ({
4293
4309
  createdAt,
4294
4310
  publishedAt,
4295
4311
  hideRemoveButton = false,
4312
+ disableDnD = false,
4296
4313
  children
4297
4314
  }) => {
4298
4315
  const { onSelectItem } = useEntrySearchContext();
@@ -4302,6 +4319,7 @@ var EntrySearchResultItem = ({
4302
4319
  onRemove == null ? void 0 : onRemove();
4303
4320
  };
4304
4321
  return /* @__PURE__ */ jsxs30("div", { css: EntrySearchResultItemContainer, children: [
4322
+ disableDnD ? null : /* @__PURE__ */ jsx50("div", { role: "presentation", className: "drag-handle", css: EntrySearchDragHandle }),
4305
4323
  /* @__PURE__ */ jsx50("div", { children: /* @__PURE__ */ jsxs30("div", { css: EntrySearchContentContainer, children: [
4306
4324
  !imageUrl ? null : /* @__PURE__ */ jsx50("img", { src: imageUrl, alt: `Thumbnail for ${title}`, css: EntrySearchImage }),
4307
4325
  /* @__PURE__ */ jsxs30("div", { children: [
@@ -4421,7 +4439,7 @@ var EntrySearchResultList = ({
4421
4439
  onRemoveAllSelected,
4422
4440
  hideRemoveButton = false,
4423
4441
  additionalButtons,
4424
- renderResultComponent = (value) => /* @__PURE__ */ jsx52(EntrySearchResultItem, { ...value }),
4442
+ renderResultComponent = (value) => /* @__PURE__ */ jsx52(EntrySearchResultItem, { ...value, disableDnD }),
4425
4443
  disableDnD = false
4426
4444
  }) => {
4427
4445
  const { selectedListItems, onRemoveAllSelectedItems, onSelectItem } = useEntrySearchContext();
package/dist/index.js CHANGED
@@ -4398,6 +4398,22 @@ var EntrySearchResultItemContainer = import_react44.css`
4398
4398
  display: grid;
4399
4399
  grid-template-columns: 1fr auto;
4400
4400
  padding: var(--spacing-sm) var(--spacing-sm) var(--spacing-sm) var(--spacing-md);
4401
+ position: relative;
4402
+
4403
+ &:hover {
4404
+ .drag-handle {
4405
+ opacity: 1;
4406
+ }
4407
+ }
4408
+ `;
4409
+ var EntrySearchDragHandle = import_react44.css`
4410
+ border-left: 2px dotted var(--gray-300);
4411
+ border-right: 2px dotted var(--gray-300);
4412
+ position: absolute;
4413
+ inset: var(--spacing-sm) auto var(--spacing-sm) var(--spacing-sm);
4414
+ width: 5px;
4415
+ transition: opacity var(--duration-fast) var(--timing-ease-out);
4416
+ opacity: 0;
4401
4417
  `;
4402
4418
  var EntrySearchResultItemSubtitle = import_react44.css`
4403
4419
  color: var(--gray-500);
@@ -4448,6 +4464,7 @@ var EntrySearchResultItem = ({
4448
4464
  createdAt,
4449
4465
  publishedAt,
4450
4466
  hideRemoveButton = false,
4467
+ disableDnD = false,
4451
4468
  children
4452
4469
  }) => {
4453
4470
  const { onSelectItem } = useEntrySearchContext();
@@ -4457,6 +4474,7 @@ var EntrySearchResultItem = ({
4457
4474
  onRemove == null ? void 0 : onRemove();
4458
4475
  };
4459
4476
  return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { css: EntrySearchResultItemContainer, children: [
4477
+ disableDnD ? null : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { role: "presentation", className: "drag-handle", css: EntrySearchDragHandle }),
4460
4478
  /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { css: EntrySearchContentContainer, children: [
4461
4479
  !imageUrl ? null : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("img", { src: imageUrl, alt: `Thumbnail for ${title}`, css: EntrySearchImage }),
4462
4480
  /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { children: [
@@ -4576,7 +4594,7 @@ var EntrySearchResultList = ({
4576
4594
  onRemoveAllSelected,
4577
4595
  hideRemoveButton = false,
4578
4596
  additionalButtons,
4579
- renderResultComponent = (value) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(EntrySearchResultItem, { ...value }),
4597
+ renderResultComponent = (value) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(EntrySearchResultItem, { ...value, disableDnD }),
4580
4598
  disableDnD = false
4581
4599
  }) => {
4582
4600
  const { selectedListItems, onRemoveAllSelectedItems, onSelectItem } = useEntrySearchContext();
package/dist/index.mjs CHANGED
@@ -4243,6 +4243,22 @@ var EntrySearchResultItemContainer = css29`
4243
4243
  display: grid;
4244
4244
  grid-template-columns: 1fr auto;
4245
4245
  padding: var(--spacing-sm) var(--spacing-sm) var(--spacing-sm) var(--spacing-md);
4246
+ position: relative;
4247
+
4248
+ &:hover {
4249
+ .drag-handle {
4250
+ opacity: 1;
4251
+ }
4252
+ }
4253
+ `;
4254
+ var EntrySearchDragHandle = css29`
4255
+ border-left: 2px dotted var(--gray-300);
4256
+ border-right: 2px dotted var(--gray-300);
4257
+ position: absolute;
4258
+ inset: var(--spacing-sm) auto var(--spacing-sm) var(--spacing-sm);
4259
+ width: 5px;
4260
+ transition: opacity var(--duration-fast) var(--timing-ease-out);
4261
+ opacity: 0;
4246
4262
  `;
4247
4263
  var EntrySearchResultItemSubtitle = css29`
4248
4264
  color: var(--gray-500);
@@ -4293,6 +4309,7 @@ var EntrySearchResultItem = ({
4293
4309
  createdAt,
4294
4310
  publishedAt,
4295
4311
  hideRemoveButton = false,
4312
+ disableDnD = false,
4296
4313
  children
4297
4314
  }) => {
4298
4315
  const { onSelectItem } = useEntrySearchContext();
@@ -4302,6 +4319,7 @@ var EntrySearchResultItem = ({
4302
4319
  onRemove == null ? void 0 : onRemove();
4303
4320
  };
4304
4321
  return /* @__PURE__ */ jsxs30("div", { css: EntrySearchResultItemContainer, children: [
4322
+ disableDnD ? null : /* @__PURE__ */ jsx50("div", { role: "presentation", className: "drag-handle", css: EntrySearchDragHandle }),
4305
4323
  /* @__PURE__ */ jsx50("div", { children: /* @__PURE__ */ jsxs30("div", { css: EntrySearchContentContainer, children: [
4306
4324
  !imageUrl ? null : /* @__PURE__ */ jsx50("img", { src: imageUrl, alt: `Thumbnail for ${title}`, css: EntrySearchImage }),
4307
4325
  /* @__PURE__ */ jsxs30("div", { children: [
@@ -4421,7 +4439,7 @@ var EntrySearchResultList = ({
4421
4439
  onRemoveAllSelected,
4422
4440
  hideRemoveButton = false,
4423
4441
  additionalButtons,
4424
- renderResultComponent = (value) => /* @__PURE__ */ jsx52(EntrySearchResultItem, { ...value }),
4442
+ renderResultComponent = (value) => /* @__PURE__ */ jsx52(EntrySearchResultItem, { ...value, disableDnD }),
4425
4443
  disableDnD = false
4426
4444
  }) => {
4427
4445
  const { selectedListItems, onRemoveAllSelectedItems, onSelectItem } = useEntrySearchContext();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/mesh-sdk-react",
3
- "version": "18.30.1-alpha.17+2d6d08805",
3
+ "version": "18.31.1-alpha.22+342a682db",
4
4
  "description": "Uniform Mesh Framework SDK for React",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -43,8 +43,8 @@
43
43
  "document": "api-extractor run --local"
44
44
  },
45
45
  "dependencies": {
46
- "@uniformdev/design-system": "18.30.1-alpha.17+2d6d08805",
47
- "@uniformdev/mesh-sdk": "18.30.1-alpha.17+2d6d08805",
46
+ "@uniformdev/design-system": "18.31.1-alpha.22+342a682db",
47
+ "@uniformdev/mesh-sdk": "18.31.1-alpha.22+342a682db",
48
48
  "formik": "^2.2.9",
49
49
  "react-beautiful-dnd": "13.1.1",
50
50
  "react-icons": "4.8.0",
@@ -61,7 +61,7 @@
61
61
  "@emotion/babel-preset-css-prop": "11.10.0",
62
62
  "@emotion/react": "11.10.5",
63
63
  "@svgr/cli": "6.5.1",
64
- "@types/react": "18.0.29",
64
+ "@types/react": "18.0.31",
65
65
  "@types/react-beautiful-dnd": "13.1.4",
66
66
  "@types/uuid": "9.0.1",
67
67
  "react": "18.2.0",
@@ -73,5 +73,5 @@
73
73
  "publishConfig": {
74
74
  "access": "public"
75
75
  },
76
- "gitHead": "2d6d0880575669784931c6481be92847ac55f141"
76
+ "gitHead": "342a682dbc05a6b97b4d529b7604daa62f7d1066"
77
77
  }