@rulab/adminjs-components 0.0.5 → 0.0.6

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.cjs CHANGED
@@ -276,7 +276,7 @@ function SortableList({
276
276
  }
277
277
  SortableList.Item = SortableItem;
278
278
 
279
- // src/constants.ts
279
+ // src/components/StringList/constants.ts
280
280
  var separator = "|";
281
281
 
282
282
  // src/components/StringList/StringList.tsx
@@ -363,7 +363,6 @@ var StringListShow = ({
363
363
  record,
364
364
  stringListSeparator = separator
365
365
  }) => {
366
- console.log(stringListSeparator, "stringListSeparator");
367
366
  return /* @__PURE__ */ import_react6.default.createElement(import_styled_components7.ThemeProvider, { theme: import_design_system6.theme }, /* @__PURE__ */ import_react6.default.createElement(StringListShowWrapper, null, /* @__PURE__ */ import_react6.default.createElement(StringListShowLabel, null, property.name), record.params.facts && /* @__PURE__ */ import_react6.default.createElement("ul", null, record.params.facts.split(stringListSeparator).map((item, index) => /* @__PURE__ */ import_react6.default.createElement(ListItem, { key: index }, `- ${item}`)))));
368
367
  };
369
368
  var StringListShow_default = StringListShow;
@@ -387,6 +386,46 @@ var EditorWrapper = (0, import_styled_components8.styled)(import_design_system7.
387
386
  margin-bottom: 24px;
388
387
  border: 1px solid rgb(187, 195, 203);
389
388
  `;
389
+ var EditorShowWrapper = (0, import_styled_components8.styled)(import_design_system7.Box)`
390
+ margin-bottom: 24px;
391
+
392
+ h1,
393
+ h2,
394
+ h3 {
395
+ margin-bottom: 5px;
396
+ font-weight: bold;
397
+ }
398
+
399
+ h1 {
400
+ font-size: 18px;
401
+ }
402
+
403
+ h2 {
404
+ font-size: 16px;
405
+ }
406
+
407
+ h3 {
408
+ font-size: 14px;
409
+ }
410
+
411
+ p {
412
+ margin-bottom: 8px;
413
+ }
414
+
415
+ ol,
416
+ ul {
417
+ margin-left: 20px;
418
+ margin-bottom: 8px;
419
+ }
420
+
421
+ ol {
422
+ list-style: auto;
423
+ }
424
+
425
+ ul {
426
+ list-style: inherit;
427
+ }
428
+ `;
390
429
  var StyledEditor = import_styled_components8.styled.div`
391
430
  .cdx-block,
392
431
  .ce-header {
@@ -504,7 +543,7 @@ var parseHtml = (jsonData) => {
504
543
  // src/components/Editor/EditorShow.jsx
505
544
  var EditorShow = ({ property, record }) => {
506
545
  const htmlContent = parseHtml(record.params[property.path]);
507
- return /* @__PURE__ */ import_react8.default.createElement(import_styled_components10.ThemeProvider, { theme: import_design_system9.theme }, /* @__PURE__ */ import_react8.default.createElement(Label3, null, "Content"), htmlContent && /* @__PURE__ */ import_react8.default.createElement("div", { dangerouslySetInnerHTML: { __html: String(htmlContent) } }));
546
+ return /* @__PURE__ */ import_react8.default.createElement(import_styled_components10.ThemeProvider, { theme: import_design_system9.theme }, /* @__PURE__ */ import_react8.default.createElement(EditorShowWrapper, null, /* @__PURE__ */ import_react8.default.createElement(Label3, null, "Content"), htmlContent && /* @__PURE__ */ import_react8.default.createElement("div", { dangerouslySetInnerHTML: { __html: String(htmlContent) } })));
508
547
  };
509
548
  var EditorShow_default = EditorShow;
510
549
  // Annotate the CommonJS export names for ESM import in node:
package/dist/index.js CHANGED
@@ -255,7 +255,7 @@ function SortableList({
255
255
  }
256
256
  SortableList.Item = SortableItem;
257
257
 
258
- // src/constants.ts
258
+ // src/components/StringList/constants.ts
259
259
  var separator = "|";
260
260
 
261
261
  // src/components/StringList/StringList.tsx
@@ -342,7 +342,6 @@ var StringListShow = ({
342
342
  record,
343
343
  stringListSeparator = separator
344
344
  }) => {
345
- console.log(stringListSeparator, "stringListSeparator");
346
345
  return /* @__PURE__ */ React6.createElement(ThemeProvider3, { theme: theme3 }, /* @__PURE__ */ React6.createElement(StringListShowWrapper, null, /* @__PURE__ */ React6.createElement(StringListShowLabel, null, property.name), record.params.facts && /* @__PURE__ */ React6.createElement("ul", null, record.params.facts.split(stringListSeparator).map((item, index) => /* @__PURE__ */ React6.createElement(ListItem, { key: index }, `- ${item}`)))));
347
346
  };
348
347
  var StringListShow_default = StringListShow;
@@ -366,6 +365,46 @@ var EditorWrapper = styled5(Box3)`
366
365
  margin-bottom: 24px;
367
366
  border: 1px solid rgb(187, 195, 203);
368
367
  `;
368
+ var EditorShowWrapper = styled5(Box3)`
369
+ margin-bottom: 24px;
370
+
371
+ h1,
372
+ h2,
373
+ h3 {
374
+ margin-bottom: 5px;
375
+ font-weight: bold;
376
+ }
377
+
378
+ h1 {
379
+ font-size: 18px;
380
+ }
381
+
382
+ h2 {
383
+ font-size: 16px;
384
+ }
385
+
386
+ h3 {
387
+ font-size: 14px;
388
+ }
389
+
390
+ p {
391
+ margin-bottom: 8px;
392
+ }
393
+
394
+ ol,
395
+ ul {
396
+ margin-left: 20px;
397
+ margin-bottom: 8px;
398
+ }
399
+
400
+ ol {
401
+ list-style: auto;
402
+ }
403
+
404
+ ul {
405
+ list-style: inherit;
406
+ }
407
+ `;
369
408
  var StyledEditor = styled5.div`
370
409
  .cdx-block,
371
410
  .ce-header {
@@ -483,7 +522,7 @@ var parseHtml = (jsonData) => {
483
522
  // src/components/Editor/EditorShow.jsx
484
523
  var EditorShow = ({ property, record }) => {
485
524
  const htmlContent = parseHtml(record.params[property.path]);
486
- return /* @__PURE__ */ React8.createElement(ThemeProvider5, { theme: theme5 }, /* @__PURE__ */ React8.createElement(Label3, null, "Content"), htmlContent && /* @__PURE__ */ React8.createElement("div", { dangerouslySetInnerHTML: { __html: String(htmlContent) } }));
525
+ return /* @__PURE__ */ React8.createElement(ThemeProvider5, { theme: theme5 }, /* @__PURE__ */ React8.createElement(EditorShowWrapper, null, /* @__PURE__ */ React8.createElement(Label3, null, "Content"), htmlContent && /* @__PURE__ */ React8.createElement("div", { dangerouslySetInnerHTML: { __html: String(htmlContent) } })));
487
526
  };
488
527
  var EditorShow_default = EditorShow;
489
528
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rulab/adminjs-components",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",
@@ -4,6 +4,8 @@ import { theme } from "@adminjs/design-system";
4
4
 
5
5
  import { parseHtml } from "../../utils/parseHtml";
6
6
 
7
+ import { EditorShowWrapper } from "./styles";
8
+
7
9
  import { Label } from "./styles";
8
10
 
9
11
  const EditorShow = ({ property, record }) => {
@@ -11,10 +13,12 @@ const EditorShow = ({ property, record }) => {
11
13
 
12
14
  return (
13
15
  <ThemeProvider theme={theme}>
14
- <Label>Content</Label>
15
- {htmlContent && (
16
- <div dangerouslySetInnerHTML={{ __html: String(htmlContent) }} />
17
- )}
16
+ <EditorShowWrapper>
17
+ <Label>Content</Label>
18
+ {htmlContent && (
19
+ <div dangerouslySetInnerHTML={{ __html: htmlContent }} />
20
+ )}
21
+ </EditorShowWrapper>
18
22
  </ThemeProvider>
19
23
  );
20
24
  };
@@ -13,6 +13,47 @@ export const EditorWrapper = styled(Box)`
13
13
  border: 1px solid rgb(187, 195, 203);
14
14
  `;
15
15
 
16
+ export const EditorShowWrapper = styled(Box)`
17
+ margin-bottom: 24px;
18
+
19
+ h1,
20
+ h2,
21
+ h3 {
22
+ margin-bottom: 5px;
23
+ font-weight: bold;
24
+ }
25
+
26
+ h1 {
27
+ font-size: 18px;
28
+ }
29
+
30
+ h2 {
31
+ font-size: 16px;
32
+ }
33
+
34
+ h3 {
35
+ font-size: 14px;
36
+ }
37
+
38
+ p {
39
+ margin-bottom: 8px;
40
+ }
41
+
42
+ ol,
43
+ ul {
44
+ margin-left: 20px;
45
+ margin-bottom: 8px;
46
+ }
47
+
48
+ ol {
49
+ list-style: auto;
50
+ }
51
+
52
+ ul {
53
+ list-style: inherit;
54
+ }
55
+ `;
56
+
16
57
  export const StyledEditor = styled.div`
17
58
  .cdx-block,
18
59
  .ce-header {