@valu/block-components 0.4.0 → 0.5.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.
@@ -59,6 +59,7 @@ var tokens = {
59
59
  transitionFast: "120ms ease-out",
60
60
  fontSizeBody: "13px",
61
61
  fontSizeSmall: "11px",
62
+ fontWeightRegular: 400,
62
63
  fontWeightMedium: 500,
63
64
  fontWeightBold: 600
64
65
  };
@@ -75,6 +76,8 @@ react.css`
75
76
  white-space: nowrap;
76
77
  `;
77
78
  styled__default.default.div`
79
+ width: 100%;
80
+ min-width: 0;
78
81
  color: ${tokens.fg};
79
82
  font-size: ${tokens.fontSizeBody};
80
83
 
@@ -197,6 +200,11 @@ var PrimaryText = styled__default.default.span`
197
200
  line-height: 1.3;
198
201
  transition: color ${tokens.transitionFast};
199
202
  `;
203
+ var SelectedTitle = styled__default.default(PrimaryText)`
204
+ font-weight: ${tokens.fontWeightRegular};
205
+ white-space: normal;
206
+ overflow-wrap: anywhere;
207
+ `;
200
208
  styled__default.default.li`
201
209
  display: flex;
202
210
  align-items: center;
@@ -306,6 +314,10 @@ var ActionColumn = styled__default.default.div`
306
314
  gap: ${tokens.spaceXs};
307
315
  margin-left: auto;
308
316
  `;
317
+ styled__default.default.span`
318
+ display: flex;
319
+ flex-direction: column;
320
+ `;
309
321
  var SelectedListEl = styled__default.default.ul`
310
322
  list-style: none;
311
323
  margin: ${tokens.spaceSm} 0 0;
@@ -317,8 +329,8 @@ var SelectedListEl = styled__default.default.ul`
317
329
  styled__default.default.li`
318
330
  display: flex;
319
331
  align-items: center;
320
- gap: ${tokens.spaceSm};
321
- padding: 2px ${tokens.spaceSm};
332
+ gap: ${tokens.spaceXs};
333
+ padding: 6px ${tokens.spaceXs};
322
334
  background: ${({ missing }) => missing ? tokens.dangerSoft : tokens.bg};
323
335
  border: 1px solid ${({ missing }) => missing ? tokens.dangerLine : tokens.gray300};
324
336
  border-radius: ${tokens.radiusMd};
@@ -466,8 +478,8 @@ var SelectedRow2 = styled__default.default.li`
466
478
  container-name: valu-dp-row;
467
479
  display: flex;
468
480
  align-items: center;
469
- gap: ${tokens.spaceSm};
470
- padding: 2px ${tokens.spaceSm};
481
+ gap: ${tokens.spaceXs};
482
+ padding: 6px ${tokens.spaceXs};
471
483
  background: ${({ missing }) => missing ? tokens.dangerSoft : tokens.bg};
472
484
  border: 1px solid ${({ missing }) => missing ? tokens.dangerLine : tokens.gray300};
473
485
  border-radius: ${tokens.radiusMd};
@@ -607,6 +619,8 @@ var LabelEditBody = styled__default.default.div`
607
619
  }
608
620
  `;
609
621
  var Root2 = styled__default.default.div`
622
+ width: 100%;
623
+ min-width: 0;
610
624
  color: ${tokens.fg};
611
625
  font-size: ${tokens.fontSizeBody};
612
626
 
@@ -1885,7 +1899,7 @@ var SelectedItem = ({
1885
1899
  /* @__PURE__ */ jsxRuntime.jsx(FilenameText, { title: item.filename, children: metaParts.join(" \xB7 ") })
1886
1900
  ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1887
1901
  /* @__PURE__ */ jsxRuntime.jsxs(DocRowBody, { children: [
1888
- /* @__PURE__ */ jsxRuntime.jsx(PrimaryText, { muted: isMissing, title: displayName, children: isMissing ? missingLabel : displayName }),
1902
+ /* @__PURE__ */ jsxRuntime.jsx(SelectedTitle, { muted: isMissing, title: displayName, children: isMissing ? missingLabel : displayName }),
1889
1903
  !isMissing ? /* @__PURE__ */ jsxRuntime.jsx(FilenameText, { title: item.filename, children: item.filename }) : null
1890
1904
  ] }),
1891
1905
  !isMissing && (showFileSize || modified) ? /* @__PURE__ */ jsxRuntime.jsxs(DocMetaInline, { children: [
@@ -1950,7 +1964,7 @@ var useResolvedDocuments = (value) => {
1950
1964
  "attachment",
1951
1965
  item.id
1952
1966
  ]);
1953
- out[item.id] = { record: record ?? null, resolved };
1967
+ out[item.id] = resolved ? record ?? null : void 0;
1954
1968
  }
1955
1969
  return out;
1956
1970
  },
@@ -1958,10 +1972,8 @@ var useResolvedDocuments = (value) => {
1958
1972
  );
1959
1973
  return react$1.useMemo(
1960
1974
  () => value.map((item) => {
1961
- const entry = records[item.id];
1962
- if (!entry) return item;
1963
- const { record, resolved } = entry;
1964
- if (!resolved) return item;
1975
+ const record = records[item.id];
1976
+ if (record === void 0) return item;
1965
1977
  if (!record) return { ...item, missing: "deleted" };
1966
1978
  const fresh = mapMediaToDocumentItem(
1967
1979
  record