@pareto-engineering/design-system 4.0.0-alpha.78 → 4.0.0-alpha.81

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.
Files changed (98) hide show
  1. package/dist/cjs/a/Label/styles.scss +1 -1
  2. package/dist/cjs/a/Quote/styles.scss +1 -1
  3. package/dist/cjs/a/Tooltip/Tooltip.js +21 -5
  4. package/dist/cjs/a/Tooltip/styles.scss +44 -36
  5. package/dist/cjs/a/index.js +0 -7
  6. package/dist/cjs/b/Page/common/PageHelmet/PageHelmet.js +4 -1
  7. package/dist/cjs/b/index.js +1 -8
  8. package/dist/cjs/f/fields/EditorInput/EditorInput.js +18 -4
  9. package/dist/cjs/f/fields/EditorInput/common/ColorPicker/ColorPicker.js +8 -4
  10. package/dist/cjs/f/fields/EditorInput/common/ToolbarPlugin/ToolbarPlugin.js +0 -6
  11. package/dist/cjs/f/fields/EditorInput/styles.scss +9 -2
  12. package/dist/cjs/f/fields/SelectInput/SelectInput.js +9 -2
  13. package/dist/cjs/f/fields/SelectInput/common/Single/Single.js +13 -2
  14. package/dist/cjs/f/fields/SelectInput/styles.scss +1 -1
  15. package/dist/cjs/{b → g}/ExpandableLexicalPreview/ExpandableLexicalPreview.js +59 -47
  16. package/dist/cjs/g/ExpandableLexicalPreview/common/NewWindowPortal/NewWindowPortal.js +79 -0
  17. package/dist/cjs/g/ExpandableLexicalPreview/common/NewWindowPortal/index.js +13 -0
  18. package/dist/cjs/g/ExpandableLexicalPreview/common/NewWindowPortal/styles.scss +9 -0
  19. package/dist/cjs/g/ExpandableLexicalPreview/common/index.js +12 -0
  20. package/dist/cjs/g/ExpandableLexicalPreview/styles.scss +34 -0
  21. package/dist/cjs/g/index.js +12 -0
  22. package/dist/cjs/index.js +11 -0
  23. package/dist/es/a/Label/styles.scss +1 -1
  24. package/dist/es/a/Quote/styles.scss +1 -1
  25. package/dist/es/a/Tooltip/Tooltip.js +21 -5
  26. package/dist/es/a/Tooltip/styles.scss +44 -36
  27. package/dist/es/a/index.js +0 -1
  28. package/dist/es/b/Page/common/PageHelmet/PageHelmet.js +4 -1
  29. package/dist/es/b/index.js +1 -2
  30. package/dist/es/f/fields/EditorInput/EditorInput.js +16 -3
  31. package/dist/es/f/fields/EditorInput/common/ColorPicker/ColorPicker.js +8 -4
  32. package/dist/es/f/fields/EditorInput/common/ToolbarPlugin/ToolbarPlugin.js +0 -6
  33. package/dist/es/f/fields/EditorInput/styles.scss +9 -2
  34. package/dist/es/f/fields/SelectInput/SelectInput.js +9 -2
  35. package/dist/es/f/fields/SelectInput/common/Single/Single.js +12 -1
  36. package/dist/es/f/fields/SelectInput/styles.scss +1 -1
  37. package/dist/es/g/ExpandableLexicalPreview/ExpandableLexicalPreview.js +126 -0
  38. package/dist/es/g/ExpandableLexicalPreview/common/NewWindowPortal/NewWindowPortal.js +70 -0
  39. package/dist/es/g/ExpandableLexicalPreview/common/NewWindowPortal/index.js +2 -0
  40. package/dist/es/g/ExpandableLexicalPreview/common/NewWindowPortal/styles.scss +9 -0
  41. package/dist/es/g/ExpandableLexicalPreview/common/index.js +1 -0
  42. package/dist/es/g/ExpandableLexicalPreview/styles.scss +34 -0
  43. package/dist/es/g/index.js +1 -0
  44. package/dist/es/index.js +1 -0
  45. package/package.json +4 -4
  46. package/src/stories/a/Tooltip.stories.jsx +7 -12
  47. package/src/stories/f/SelectInput.stories.jsx +18 -2
  48. package/src/stories/{b → g}/ExpandableLexicalPreview.stories.jsx +13 -5
  49. package/src/ui/a/Label/styles.scss +1 -1
  50. package/src/ui/a/Quote/styles.scss +1 -1
  51. package/src/ui/a/Tooltip/Tooltip.jsx +27 -4
  52. package/src/ui/a/Tooltip/styles.scss +44 -36
  53. package/src/ui/a/index.js +0 -1
  54. package/src/ui/b/Page/common/PageHelmet/PageHelmet.jsx +6 -0
  55. package/src/ui/b/index.js +0 -1
  56. package/src/ui/f/fields/EditorInput/EditorInput.jsx +14 -1
  57. package/src/ui/f/fields/EditorInput/common/ColorPicker/ColorPicker.jsx +8 -3
  58. package/src/ui/f/fields/EditorInput/common/ToolbarPlugin/ToolbarPlugin.jsx +0 -14
  59. package/src/ui/f/fields/EditorInput/styles.scss +9 -2
  60. package/src/ui/f/fields/SelectInput/SelectInput.jsx +10 -2
  61. package/src/ui/f/fields/SelectInput/common/Single/Single.jsx +13 -1
  62. package/src/ui/f/fields/SelectInput/styles.scss +1 -1
  63. package/src/ui/g/ExpandableLexicalPreview/ExpandableLexicalPreview.jsx +180 -0
  64. package/src/ui/g/ExpandableLexicalPreview/common/NewWindowPortal/NewWindowPortal.jsx +80 -0
  65. package/src/ui/g/ExpandableLexicalPreview/common/NewWindowPortal/index.js +2 -0
  66. package/src/ui/g/ExpandableLexicalPreview/common/NewWindowPortal/styles.scss +9 -0
  67. package/src/ui/g/ExpandableLexicalPreview/common/index.js +1 -0
  68. package/src/ui/g/ExpandableLexicalPreview/styles.scss +34 -0
  69. package/src/ui/g/index.js +1 -0
  70. package/src/ui/index.js +1 -0
  71. package/tests/__snapshots__/Storyshots.test.js.snap +221 -99
  72. package/dist/cjs/a/LexicalPreview/LexicalPreview.js +0 -90
  73. package/dist/cjs/a/LexicalPreview/index.js +0 -13
  74. package/dist/cjs/a/LexicalPreview/styles.scss +0 -46
  75. package/dist/cjs/b/ExpandableLexicalPreview/common/ExpandButton/ExpandButton.js +0 -112
  76. package/dist/cjs/b/ExpandableLexicalPreview/common/ExpandButton/index.js +0 -13
  77. package/dist/cjs/b/ExpandableLexicalPreview/common/index.js +0 -12
  78. package/dist/cjs/b/ExpandableLexicalPreview/styles.scss +0 -84
  79. package/dist/es/a/LexicalPreview/LexicalPreview.js +0 -80
  80. package/dist/es/a/LexicalPreview/index.js +0 -2
  81. package/dist/es/a/LexicalPreview/styles.scss +0 -46
  82. package/dist/es/b/ExpandableLexicalPreview/ExpandableLexicalPreview.js +0 -115
  83. package/dist/es/b/ExpandableLexicalPreview/common/ExpandButton/ExpandButton.js +0 -102
  84. package/dist/es/b/ExpandableLexicalPreview/common/ExpandButton/index.js +0 -1
  85. package/dist/es/b/ExpandableLexicalPreview/common/index.js +0 -1
  86. package/dist/es/b/ExpandableLexicalPreview/styles.scss +0 -84
  87. package/src/stories/a/LexicalPreview.stories.jsx +0 -28
  88. package/src/ui/a/LexicalPreview/LexicalPreview.jsx +0 -109
  89. package/src/ui/a/LexicalPreview/index.js +0 -2
  90. package/src/ui/a/LexicalPreview/styles.scss +0 -46
  91. package/src/ui/b/ExpandableLexicalPreview/ExpandableLexicalPreview.jsx +0 -157
  92. package/src/ui/b/ExpandableLexicalPreview/common/ExpandButton/ExpandButton.jsx +0 -123
  93. package/src/ui/b/ExpandableLexicalPreview/common/ExpandButton/index.js +0 -1
  94. package/src/ui/b/ExpandableLexicalPreview/common/index.js +0 -1
  95. package/src/ui/b/ExpandableLexicalPreview/styles.scss +0 -84
  96. /package/dist/cjs/{b → g}/ExpandableLexicalPreview/index.js +0 -0
  97. /package/dist/es/{b → g}/ExpandableLexicalPreview/index.js +0 -0
  98. /package/src/ui/{b → g}/ExpandableLexicalPreview/index.js +0 -0
@@ -10355,21 +10355,6 @@ exports[`Storyshots a/Label Normal 1`] = `
10355
10355
  ]
10356
10356
  `;
10357
10357
 
10358
- exports[`Storyshots a/LexicalPreview Base 1`] = `
10359
- <div
10360
- className="base lexical-preview y-paragraph"
10361
- >
10362
- <div
10363
- aria-autocomplete="none"
10364
- aria-readonly={true}
10365
- className="content-editable"
10366
- contentEditable={false}
10367
- role="textbox"
10368
- spellCheck={true}
10369
- />
10370
- </div>
10371
- `;
10372
-
10373
10358
  exports[`Storyshots a/LoadingCircle Base 1`] = `
10374
10359
  <div
10375
10360
  className="x-main1 b-x"
@@ -11655,16 +11640,21 @@ exports[`Storyshots a/Tooltip Base 1`] = `
11655
11640
  }
11656
11641
  >
11657
11642
  <div
11658
- aria-describedby="test-tooltip"
11643
+ className="base tooltip x-background-cards"
11659
11644
  >
11660
- <button
11661
- className="base button x-main"
11662
- type="button"
11645
+ <div
11646
+ aria-describedby="test-tooltip"
11647
+ className="tooltip-trigger-wrapper"
11663
11648
  >
11664
- Hover on me!
11665
- </button>
11649
+ <button
11650
+ className="base button x-main"
11651
+ type="button"
11652
+ >
11653
+ Hover on me!
11654
+ </button>
11655
+ </div>
11666
11656
  <div
11667
- className="base tooltip bottom x-background-cards"
11657
+ className="tooltip-content bottom"
11668
11658
  id="test-tooltip"
11669
11659
  role="tooltip"
11670
11660
  >
@@ -11683,9 +11673,6 @@ exports[`Storyshots a/Tooltip Base 1`] = `
11683
11673
  </div>
11684
11674
  </div>
11685
11675
  </div>
11686
- <p>
11687
- With some more content around
11688
- </p>
11689
11676
  </div>
11690
11677
  `;
11691
11678
 
@@ -11703,16 +11690,21 @@ exports[`Storyshots a/Tooltip Left 1`] = `
11703
11690
  }
11704
11691
  >
11705
11692
  <div
11706
- aria-describedby="test-tooltip"
11693
+ className="base tooltip x-background-cards"
11707
11694
  >
11708
- <button
11709
- className="base button x-main"
11710
- type="button"
11695
+ <div
11696
+ aria-describedby="test-tooltip"
11697
+ className="tooltip-trigger-wrapper"
11711
11698
  >
11712
- Hover on me!
11713
- </button>
11699
+ <button
11700
+ className="base button x-main"
11701
+ type="button"
11702
+ >
11703
+ Hover on me!
11704
+ </button>
11705
+ </div>
11714
11706
  <div
11715
- className="base tooltip left x-background-cards"
11707
+ className="tooltip-content left"
11716
11708
  id="test-tooltip"
11717
11709
  role="tooltip"
11718
11710
  >
@@ -11731,9 +11723,6 @@ exports[`Storyshots a/Tooltip Left 1`] = `
11731
11723
  </div>
11732
11724
  </div>
11733
11725
  </div>
11734
- <p>
11735
- With some more content around
11736
- </p>
11737
11726
  </div>
11738
11727
  `;
11739
11728
 
@@ -11751,16 +11740,21 @@ exports[`Storyshots a/Tooltip Right 1`] = `
11751
11740
  }
11752
11741
  >
11753
11742
  <div
11754
- aria-describedby="test-tooltip"
11743
+ className="base tooltip x-background-cards"
11755
11744
  >
11756
- <button
11757
- className="base button x-main"
11758
- type="button"
11745
+ <div
11746
+ aria-describedby="test-tooltip"
11747
+ className="tooltip-trigger-wrapper"
11759
11748
  >
11760
- Hover on me!
11761
- </button>
11749
+ <button
11750
+ className="base button x-main"
11751
+ type="button"
11752
+ >
11753
+ Hover on me!
11754
+ </button>
11755
+ </div>
11762
11756
  <div
11763
- className="base tooltip right x-background-cards"
11757
+ className="tooltip-content right"
11764
11758
  id="test-tooltip"
11765
11759
  role="tooltip"
11766
11760
  >
@@ -11779,9 +11773,6 @@ exports[`Storyshots a/Tooltip Right 1`] = `
11779
11773
  </div>
11780
11774
  </div>
11781
11775
  </div>
11782
- <p>
11783
- With some more content around
11784
- </p>
11785
11776
  </div>
11786
11777
  `;
11787
11778
 
@@ -11799,16 +11790,21 @@ exports[`Storyshots a/Tooltip Top 1`] = `
11799
11790
  }
11800
11791
  >
11801
11792
  <div
11802
- aria-describedby="test-tooltip"
11793
+ className="base tooltip x-background-cards"
11803
11794
  >
11804
- <button
11805
- className="base button x-main"
11806
- type="button"
11795
+ <div
11796
+ aria-describedby="test-tooltip"
11797
+ className="tooltip-trigger-wrapper"
11807
11798
  >
11808
- Hover on me!
11809
- </button>
11799
+ <button
11800
+ className="base button x-main"
11801
+ type="button"
11802
+ >
11803
+ Hover on me!
11804
+ </button>
11805
+ </div>
11810
11806
  <div
11811
- className="base tooltip top x-background-cards"
11807
+ className="tooltip-content top"
11812
11808
  id="test-tooltip"
11813
11809
  role="tooltip"
11814
11810
  >
@@ -11827,9 +11823,6 @@ exports[`Storyshots a/Tooltip Top 1`] = `
11827
11823
  </div>
11828
11824
  </div>
11829
11825
  </div>
11830
- <p>
11831
- With some more content around
11832
- </p>
11833
11826
  </div>
11834
11827
  `;
11835
11828
 
@@ -21285,42 +21278,6 @@ exports[`Storyshots b/Card/Group Card Group Not Snap Scroller 1`] = `
21285
21278
  </div>
21286
21279
  `;
21287
21280
 
21288
- exports[`Storyshots b/ExpandableLexicalPreview Base 1`] = `
21289
- <div
21290
- className="base expandable-lexical-preview y-paragraph"
21291
- style={
21292
- {
21293
- "--resize": "vertical",
21294
- }
21295
- }
21296
- >
21297
- <p
21298
- className="title h2"
21299
- >
21300
- Task Instructions
21301
- </p>
21302
- <div
21303
- className="lexical-content"
21304
- >
21305
- <div
21306
- aria-autocomplete="none"
21307
- aria-readonly={true}
21308
- className="content-editable"
21309
- contentEditable={false}
21310
- role="textbox"
21311
- spellCheck={true}
21312
- />
21313
- <button
21314
- className="base button base expand-button ai-icon x-background-far modifierCompact"
21315
- onClick={[Function]}
21316
- type="button"
21317
- >
21318
- D
21319
- </button>
21320
- </div>
21321
- </div>
21322
- `;
21323
-
21324
21281
  exports[`Storyshots b/Logo Base 1`] = `
21325
21282
  <svg
21326
21283
  className="base svg base logo x-paragraph y-transparent"
@@ -26746,9 +26703,9 @@ exports[`Storyshots f/fields/EditorInput Base 1`] = `
26746
26703
  className="rcp-saturation-cursor"
26747
26704
  style={
26748
26705
  {
26749
- "backgroundColor": "rgb(0 0 0)",
26706
+ "backgroundColor": "rgb(255 255 255)",
26750
26707
  "left": 0,
26751
- "top": 200,
26708
+ "top": 0,
26752
26709
  }
26753
26710
  }
26754
26711
  />
@@ -26786,7 +26743,7 @@ exports[`Storyshots f/fields/EditorInput Base 1`] = `
26786
26743
  className="rcp-alpha"
26787
26744
  style={
26788
26745
  {
26789
- "background": "linear-gradient(to right, rgb(0 0 0 / 0), rgb(0 0 0 / 1)) top left / auto auto,
26746
+ "background": "linear-gradient(to right, rgb(255 255 255 / 0), rgb(255 255 255 / 1)) top left / auto auto,
26790
26747
  conic-gradient(#666 0.25turn, #999 0.25turn 0.5turn, #666 0.5turn 0.75turn, #999 0.75turn) top left / 12px 12px
26791
26748
  repeat",
26792
26749
  }
@@ -26796,7 +26753,7 @@ exports[`Storyshots f/fields/EditorInput Base 1`] = `
26796
26753
  className="rcp-alpha-cursor"
26797
26754
  style={
26798
26755
  {
26799
- "background": "linear-gradient(to right, rgb(0 0 0 / 1), rgb(0 0 0 / 1)) top left / auto auto,
26756
+ "background": "linear-gradient(to right, rgb(255 255 255 / 1), rgb(255 255 255 / 1)) top left / auto auto,
26800
26757
  conic-gradient(#666 0.25turn, #999 0.25turn 0.5turn, #666 0.5turn 0.75turn, #999 0.75turn) -5px 2px / 12px 12px
26801
26758
  repeat",
26802
26759
  "left": 1,
@@ -27224,9 +27181,9 @@ exports[`Storyshots f/fields/EditorInput Optional 1`] = `
27224
27181
  className="rcp-saturation-cursor"
27225
27182
  style={
27226
27183
  {
27227
- "backgroundColor": "rgb(0 0 0)",
27184
+ "backgroundColor": "rgb(255 255 255)",
27228
27185
  "left": 0,
27229
- "top": 200,
27186
+ "top": 0,
27230
27187
  }
27231
27188
  }
27232
27189
  />
@@ -27264,7 +27221,7 @@ exports[`Storyshots f/fields/EditorInput Optional 1`] = `
27264
27221
  className="rcp-alpha"
27265
27222
  style={
27266
27223
  {
27267
- "background": "linear-gradient(to right, rgb(0 0 0 / 0), rgb(0 0 0 / 1)) top left / auto auto,
27224
+ "background": "linear-gradient(to right, rgb(255 255 255 / 0), rgb(255 255 255 / 1)) top left / auto auto,
27268
27225
  conic-gradient(#666 0.25turn, #999 0.25turn 0.5turn, #666 0.5turn 0.75turn, #999 0.75turn) top left / 12px 12px
27269
27226
  repeat",
27270
27227
  }
@@ -27274,7 +27231,7 @@ exports[`Storyshots f/fields/EditorInput Optional 1`] = `
27274
27231
  className="rcp-alpha-cursor"
27275
27232
  style={
27276
27233
  {
27277
- "background": "linear-gradient(to right, rgb(0 0 0 / 1), rgb(0 0 0 / 1)) top left / auto auto,
27234
+ "background": "linear-gradient(to right, rgb(255 255 255 / 1), rgb(255 255 255 / 1)) top left / auto auto,
27278
27235
  conic-gradient(#666 0.25turn, #999 0.25turn 0.5turn, #666 0.5turn 0.75turn, #999 0.75turn) -5px 2px / 12px 12px
27279
27236
  repeat",
27280
27237
  "left": 1,
@@ -30260,6 +30217,128 @@ exports[`Storyshots f/fields/SelectInput String And Objects 1`] = `
30260
30217
  </form>
30261
30218
  `;
30262
30219
 
30220
+ exports[`Storyshots f/fields/SelectInput With Default 1`] = `
30221
+ <form
30222
+ action="#"
30223
+ onReset={[Function]}
30224
+ onSubmit={[Function]}
30225
+ >
30226
+ <div
30227
+ className="base select-input"
30228
+ >
30229
+ <div
30230
+ className="base single"
30231
+ >
30232
+ <label
30233
+ className="base form-label x-paragraph"
30234
+ htmlFor="workType"
30235
+ >
30236
+ Work Type
30237
+ </label>
30238
+ <div
30239
+ className="select-wrapper"
30240
+ >
30241
+ <select
30242
+ className="input y-paragraph"
30243
+ disabled={false}
30244
+ id="workType"
30245
+ name="workType"
30246
+ onBlur={[Function]}
30247
+ onChange={[Function]}
30248
+ value=""
30249
+ >
30250
+ <option
30251
+ disabled={true}
30252
+ value=""
30253
+ >
30254
+ Select an option
30255
+ </option>
30256
+ <option
30257
+ disabled={false}
30258
+ value="Work"
30259
+ >
30260
+ Work
30261
+ </option>
30262
+ <option
30263
+ disabled={false}
30264
+ value="Managing"
30265
+ >
30266
+ Managing
30267
+ </option>
30268
+ <option
30269
+ disabled={false}
30270
+ value="Training"
30271
+ >
30272
+ Training
30273
+ </option>
30274
+ </select>
30275
+ </div>
30276
+ </div>
30277
+ </div>
30278
+ </form>
30279
+ `;
30280
+
30281
+ exports[`Storyshots f/fields/SelectInput With Default No Override 1`] = `
30282
+ <form
30283
+ action="#"
30284
+ onReset={[Function]}
30285
+ onSubmit={[Function]}
30286
+ >
30287
+ <div
30288
+ className="base select-input"
30289
+ >
30290
+ <div
30291
+ className="base single"
30292
+ >
30293
+ <label
30294
+ className="base form-label x-paragraph"
30295
+ htmlFor="workType"
30296
+ >
30297
+ Work Type
30298
+ </label>
30299
+ <div
30300
+ className="select-wrapper"
30301
+ >
30302
+ <select
30303
+ className="input y-paragraph"
30304
+ disabled={false}
30305
+ id="workType"
30306
+ name="workType"
30307
+ onBlur={[Function]}
30308
+ onChange={[Function]}
30309
+ value="Training"
30310
+ >
30311
+ <option
30312
+ disabled={true}
30313
+ value=""
30314
+ >
30315
+ Select an option
30316
+ </option>
30317
+ <option
30318
+ disabled={false}
30319
+ value="Work"
30320
+ >
30321
+ Work
30322
+ </option>
30323
+ <option
30324
+ disabled={false}
30325
+ value="Managing"
30326
+ >
30327
+ Managing
30328
+ </option>
30329
+ <option
30330
+ disabled={false}
30331
+ value="Training"
30332
+ >
30333
+ Training
30334
+ </option>
30335
+ </select>
30336
+ </div>
30337
+ </div>
30338
+ </div>
30339
+ </form>
30340
+ `;
30341
+
30263
30342
  exports[`Storyshots f/fields/TextInput Base 1`] = `
30264
30343
  <form
30265
30344
  action="#"
@@ -31170,6 +31249,49 @@ exports[`Storyshots f/fields/TextareaInput Vertical Resize 1`] = `
31170
31249
  </form>
31171
31250
  `;
31172
31251
 
31252
+ exports[`Storyshots g/ExpandableLexicalPreview Base 1`] = `
31253
+ <div
31254
+ className="base expandable-lexical-preview y-paragraph"
31255
+ >
31256
+ <p
31257
+ className="title h2"
31258
+ >
31259
+ Task Instructions
31260
+ </p>
31261
+ <div
31262
+ className="base editor-input y-paragraph disabled"
31263
+ id="the-bad-ass-input"
31264
+ style={
31265
+ {
31266
+ "--resize": "vertical",
31267
+ "--rows": "10em",
31268
+ }
31269
+ }
31270
+ >
31271
+ <label
31272
+ className="base form-label x-paragraph"
31273
+ htmlFor="taskDescription"
31274
+ />
31275
+ <div
31276
+ aria-autocomplete="none"
31277
+ aria-readonly={true}
31278
+ className="content-editable"
31279
+ contentEditable={false}
31280
+ id="taskDescription"
31281
+ role="textbox"
31282
+ spellCheck={true}
31283
+ />
31284
+ </div>
31285
+ <button
31286
+ className="base button expand-button ai-icon x-background-far modifierCompact"
31287
+ onClick={[Function]}
31288
+ type="button"
31289
+ >
31290
+ D
31291
+ </button>
31292
+ </div>
31293
+ `;
31294
+
31173
31295
  exports[`Storyshots r/SwitchRouteMap Base 1`] = `"This component does not need a visual test."`;
31174
31296
 
31175
31297
  exports[`Storyshots r/common/PrivateRoute Base 1`] = `"This component does not need a visual test."`;
@@ -1,90 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var React = _interopRequireWildcard(require("react"));
8
- var _LexicalComposer = require("@lexical/react/LexicalComposer");
9
- var _LexicalRichTextPlugin = require("@lexical/react/LexicalRichTextPlugin");
10
- var _LexicalContentEditable = require("@lexical/react/LexicalContentEditable");
11
- var _link = require("@lexical/link");
12
- var _list = require("@lexical/list");
13
- var _propTypes = _interopRequireDefault(require("prop-types"));
14
- var _exports = _interopRequireDefault(require("@pareto-engineering/bem/exports"));
15
- require("./styles.scss");
16
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
18
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
19
- /* @pareto-engineering/generator-front 1.0.12 */
20
- /* eslint-disable import/no-extraneous-dependencies -- required here */
21
-
22
- // Local Definitions
23
-
24
- const baseClassName = _exports.default.base;
25
- const componentClassName = 'lexical-preview';
26
-
27
- /**
28
- * This is the component description.
29
- */
30
- const LexicalPreview = _ref => {
31
- let {
32
- id,
33
- className: userClassName,
34
- style,
35
- nodes,
36
- color
37
- // ...otherProps
38
- } = _ref;
39
- const initialConfig = {
40
- nameSpace: id,
41
- editable: false,
42
- editorState: nodes,
43
- theme: {
44
- text: {
45
- italic: 'italic',
46
- strikethrough: 'strikethrough',
47
- underline: 'underlined'
48
- }
49
- },
50
- nodes: [_link.AutoLinkNode, _link.LinkNode, _list.ListNode, _list.ListItemNode]
51
- };
52
- return /*#__PURE__*/React.createElement(_LexicalComposer.LexicalComposer, {
53
- initialConfig: initialConfig
54
- }, /*#__PURE__*/React.createElement("div", {
55
- id: id,
56
- className: [baseClassName, componentClassName, userClassName, `y-${color}`].filter(e => e).join(' '),
57
- style: style
58
- }, /*#__PURE__*/React.createElement(_LexicalRichTextPlugin.RichTextPlugin, {
59
- contentEditable: /*#__PURE__*/React.createElement(_LexicalContentEditable.ContentEditable, {
60
- id: id,
61
- className: "content-editable"
62
- })
63
- })));
64
- };
65
- LexicalPreview.propTypes = {
66
- /**
67
- * The HTML id for this element
68
- */
69
- id: _propTypes.default.string,
70
- /**
71
- * The HTML class names for this element
72
- */
73
- className: _propTypes.default.string,
74
- /**
75
- * The React-written, css properties for this element.
76
- */
77
- style: _propTypes.default.objectOf(_propTypes.default.string),
78
- /**
79
- * Color of the text
80
- */
81
- color: _propTypes.default.string,
82
- /**
83
- * The nodes to render in the form of a json string
84
- */
85
- nodes: _propTypes.default.string
86
- };
87
- LexicalPreview.defaultProps = {
88
- color: 'paragraph'
89
- };
90
- var _default = exports.default = LexicalPreview;
@@ -1,13 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "LexicalPreview", {
7
- enumerable: true,
8
- get: function () {
9
- return _LexicalPreview.default;
10
- }
11
- });
12
- var _LexicalPreview = _interopRequireDefault(require("./LexicalPreview"));
13
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -1,46 +0,0 @@
1
- /* @pareto-engineering/generator-front 1.0.12 */
2
-
3
- @use "@pareto-engineering/bem";
4
- @use "@pareto-engineering/styles/src/mixins";
5
- @use "@pareto-engineering/styles/src/globals" as *;
6
-
7
- .#{bem.$base}.lexical-preview {
8
- > .content-editable {
9
- color: var(--y);
10
- overflow: auto;
11
-
12
- li:has(ol, ul) {
13
- list-style-type: none;
14
- }
15
-
16
- p,
17
- span,
18
- strong,
19
- em,
20
- li {
21
- &.underlined {
22
- text-decoration: underline;
23
-
24
- &.strikethrough {
25
- text-decoration: underline line-through;
26
- }
27
- }
28
-
29
- &.strikethrough {
30
- text-decoration: line-through;
31
- }
32
-
33
- &.italic {
34
- font-style: italic;
35
- }
36
- }
37
-
38
- :first-child {
39
- margin-top: 0;
40
- }
41
-
42
- &::placeholder {
43
- color: var(--metadata);
44
- }
45
- }
46
- }