@jobber/components 4.69.0 → 4.69.1-JOB-85843.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.
@@ -33,7 +33,7 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
33
33
  var debounce__default = /*#__PURE__*/_interopDefaultLegacy(debounce);
34
34
  var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
35
35
 
36
- var css_248z = ".v0Cys9vQ-NE- {\n position: relative;\n width: 100%;\n}\n\n.CX-N-e0e6og- {\n display: none;\n position: absolute;\n z-index: calc(6 + 1001);\n z-index: calc(var(--elevation-menu) + var(--elevation-modal));\n width: 100%;\n /* Unfortunately this is how we define our line item picker height in jobber online.\n This is a concession to maintain visual parity. */\n max-height: 300px;\n box-shadow: 0px calc(16px / 16) calc(16px / 4) 0px\n rgba(0, 0, 0, 0.1),\n 0px calc(16px / 4) 12px 0px rgba(0, 0, 0, 0.05);\n box-shadow: var(--shadow-base);\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n border: calc(16px / 16) solid var(--color-color-border);\n border: var(--border-base) solid var(--color-color-border);\n border-radius: calc(16px / 8);\n border-radius: var(--radius-base);\n overflow: auto;\n scroll-behavior: smooth;\n background-color: rgba(255, 255, 255, 1);\n background-color: var(--color-surface);\n}\n\n.CX-N-e0e6og- h5 {\n padding: calc(16px / 2) 0 calc(16px / 4) calc(16px / 2);\n padding: var(--space-small) 0 var(--space-smaller) var(--space-small);\n border-bottom: calc(16px / 16) solid rgb(1, 41, 57);\n border-bottom: var(--border-base) solid var(--color-border--section);\n}\n\n.CX-N-e0e6og-._4PlUaegVpkk- {\n display: block;\n}\n\n.CX-N-e0e6og-._4PlUaegVpkk-:empty {\n display: none;\n}\n\n.ucQtG0iwqbo- {\n display: -ms-flexbox;\n display: flex;\n width: 100%;\n -ms-flex-direction: row;\n flex-direction: row;\n -ms-flex-wrap: nowrap;\n flex-wrap: nowrap;\n -ms-flex-pack: start;\n justify-content: flex-start;\n -ms-flex-line-pack: stretch;\n align-content: stretch;\n -ms-flex-align: center;\n align-items: center;\n padding: calc(16px / 2);\n padding: var(--space-small);\n border: none;\n border-radius: calc(16px / 8);\n border-radius: var(--radius-base);\n text-align: left;\n list-style: none;\n background-color: transparent;\n cursor: pointer;\n transition: all 200ms;\n transition: all var(--timing-base);\n}\n\n.ucQtG0iwqbo-:hover,\n.ucQtG0iwqbo-:focus,\n.ucQtG0iwqbo-.r8HS-ma79QE- {\n background-color: rgb(244, 246, 250);\n background-color: var(--color-surface--hover);\n outline-color: rgb(147, 161, 169);\n outline-color: var(--color-focus);\n}\n\n.ucQtG0iwqbo-.ydwLX44YFZc-:not(:last-child) {\n border-bottom: calc(16px / 16) solid rgb(217, 223, 225);\n border-bottom: var(--border-base) solid var(--color-border);\n}\n\n.CX-N-e0e6og-:hover .ucQtG0iwqbo-.r8HS-ma79QE-:not(:hover) {\n background-color: transparent;\n outline-color: transparent;\n}\n\n.v0Cys9vQ-NE- .PvUgNoAUG7A-:not(:first-child) {\n padding-top: calc(16px / 2);\n padding-top: var(--space-small);\n}\n\n.ucQtG0iwqbo- .DAOOFUZ1BRM- {\n -ms-flex: 0 1 auto;\n flex: 0 1 auto;\n -ms-flex-item-align: auto;\n align-self: auto;\n width: calc(16px * 1.5);\n width: var(--space-large);\n}\n\n.ucQtG0iwqbo- .cjKJFup6hGY- {\n display: -ms-inline-flexbox;\n display: inline-flex;\n -ms-flex: 1 100%;\n flex: 1 100%;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n}\n\n.ucQtG0iwqbo- .hG5zNBuI2wA- {\n -ms-flex: 2;\n flex: 2;\n}\n\n.ucQtG0iwqbo- ._3CwjFCbhqi4- {\n -ms-flex: 1;\n flex: 1;\n -ms-flex-item-align: end;\n align-self: flex-end;\n text-align: right;\n}\n";
36
+ var css_248z = ".v0Cys9vQ-NE- {\n position: relative;\n width: 100%;\n}\n\n.CX-N-e0e6og- {\n display: none;\n position: absolute;\n z-index: calc(6 + 1001);\n z-index: calc(var(--elevation-menu) + var(--elevation-modal));\n width: 100%;\n /* Unfortunately this is how we define our line item picker height in jobber online.\n This is a concession to maintain visual parity. */\n max-height: 300px;\n box-shadow: 0px calc(16px / 16) calc(16px / 4) 0px\n rgba(0, 0, 0, 0.1),\n 0px calc(16px / 4) 12px 0px rgba(0, 0, 0, 0.05);\n box-shadow: var(--shadow-base);\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n border: calc(16px / 16) solid var(--color-color-border);\n border: var(--border-base) solid var(--color-color-border);\n border-radius: calc(16px / 8);\n border-radius: var(--radius-base);\n overflow: auto;\n scroll-behavior: smooth;\n background-color: rgba(255, 255, 255, 1);\n background-color: var(--color-surface);\n}\n\n.CX-N-e0e6og- h5 {\n padding: calc(16px / 2) 0 calc(16px / 4) calc(16px / 2);\n padding: var(--space-small) 0 var(--space-smaller) var(--space-small);\n border-bottom: calc(16px / 16) solid rgb(1, 41, 57);\n border-bottom: var(--border-base) solid var(--color-border--section);\n}\n\n.CX-N-e0e6og-._4PlUaegVpkk- {\n display: block;\n}\n\n.CX-N-e0e6og-._4PlUaegVpkk-:empty {\n display: none;\n}\n\n.ucQtG0iwqbo- {\n display: -ms-flexbox;\n display: flex;\n width: 100%;\n -ms-flex-direction: row;\n flex-direction: row;\n -ms-flex-wrap: nowrap;\n flex-wrap: nowrap;\n -ms-flex-pack: start;\n justify-content: flex-start;\n -ms-flex-line-pack: stretch;\n align-content: stretch;\n -ms-flex-align: center;\n align-items: center;\n padding: calc(16px / 2);\n padding: var(--space-small);\n border: none;\n text-align: left;\n list-style: none;\n background-color: transparent;\n cursor: pointer;\n transition: all 200ms;\n transition: all var(--timing-base);\n}\n\n.ucQtG0iwqbo-:hover,\n.ucQtG0iwqbo-:focus,\n.ucQtG0iwqbo-.r8HS-ma79QE- {\n background-color: rgb(244, 246, 250);\n background-color: var(--color-surface--hover);\n outline-color: rgb(147, 161, 169);\n outline-color: var(--color-focus);\n}\n\n.ucQtG0iwqbo-.ydwLX44YFZc-:not(:last-child) {\n border-bottom: calc(16px / 16) solid rgb(217, 223, 225);\n border-bottom: var(--border-base) solid var(--color-border);\n}\n\n.CX-N-e0e6og-:hover .ucQtG0iwqbo-.r8HS-ma79QE-:not(:hover) {\n background-color: transparent;\n outline-color: transparent;\n}\n\n.v0Cys9vQ-NE- .PvUgNoAUG7A-:not(:first-child) {\n padding-top: calc(16px / 2);\n padding-top: var(--space-small);\n}\n\n.ucQtG0iwqbo- .DAOOFUZ1BRM- {\n -ms-flex: 0 1 auto;\n flex: 0 1 auto;\n -ms-flex-item-align: auto;\n align-self: auto;\n width: calc(16px * 1.5);\n width: var(--space-large);\n}\n\n.ucQtG0iwqbo- .cjKJFup6hGY- {\n display: -ms-inline-flexbox;\n display: inline-flex;\n -ms-flex: 1 100%;\n flex: 1 100%;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n}\n\n.ucQtG0iwqbo- .hG5zNBuI2wA- {\n -ms-flex: 2;\n flex: 2;\n}\n\n.ucQtG0iwqbo- ._3CwjFCbhqi4- {\n -ms-flex: 1;\n flex: 1;\n -ms-flex-item-align: end;\n align-self: flex-end;\n text-align: right;\n}\n";
37
37
  var styles = {"autocomplete":"v0Cys9vQ-NE-","options":"CX-N-e0e6og-","visible":"_4PlUaegVpkk-","option":"ucQtG0iwqbo-","active":"r8HS-ma79QE-","separator":"ydwLX44YFZc-","heading":"PvUgNoAUG7A-","icon":"DAOOFUZ1BRM-","text":"cjKJFup6hGY-","label":"hG5zNBuI2wA-","details":"_3CwjFCbhqi4-"};
38
38
  styleInject_es.styleInject(css_248z);
39
39
 
@@ -1,5 +1,6 @@
1
1
  import React from "react";
2
2
  import { XOR } from "ts-xor";
3
+ import { LinkProps } from "react-router-dom";
3
4
  import { IconNames } from "@jobber/design";
4
5
  interface ButtonFoundationProps {
5
6
  /**
@@ -35,11 +36,11 @@ interface ButtonAnchorProps extends ButtonFoundationProps {
35
36
  */
36
37
  readonly url?: string;
37
38
  }
38
- interface ButtonLinkProps extends ButtonFoundationProps {
39
+ interface ButtonLinkProps<S = unknown> extends ButtonFoundationProps {
39
40
  /**
40
41
  * Used for client side routing. Only use when inside a routed component.
41
42
  */
42
- readonly to?: string;
43
+ readonly to?: LinkProps<S>["to"];
43
44
  }
44
45
  interface BaseActionProps extends ButtonFoundationProps {
45
46
  readonly variation?: "work" | "learning" | "subtle" | "destructive";
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var Card = require('../Card-644dd256.js');
5
+ var Card = require('../Card-dde21526.js');
6
6
  require('react');
7
7
  require('classnames');
8
8
  require('../style-inject.es-9d2f5f4e.js');
@@ -12,7 +12,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
12
12
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
13
13
  var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
14
14
 
15
- var css_248z$1 = ":root {\n --card--accent-color: var(--color-grey);\n --card--base-padding: var(--space-base);\n --card--border: var(--border-base) solid var(--color-border);\n --card--header-background: var(--color-surface--background);\n}\n\n._2wxPdv7kELk- {\n display: block;\n width: 100%;\n border: calc(16px / 16) solid rgb(217, 223, 225);\n border: var(--card--border);\n border-radius: calc(16px / 8);\n border-radius: var(--radius-base);\n outline-color: rgb(147, 161, 169);\n outline-color: var(--color-focus);\n background-color: rgba(255, 255, 255, 1);\n background-color: var(--color-surface);\n}\n\n._2wxPdv7kELk-:active {\n outline: 0;\n}\n\n:root .jobber-retheme ._2wxPdv7kELk-:not(.tRfpysqqk8s-) {\n --card--base-padding: var(--space-base);\n --card--border: none;\n --card--header-background: transparent;\n}\n\n@media (min-width: 768px) {\n\n:root .jobber-retheme ._2wxPdv7kELk-:not(.tRfpysqqk8s-) {\n --card--base-padding: 0;\n}\n }\n\n@media (--medium-screens-and-up) {\n\n:root .jobber-retheme ._2wxPdv7kELk-:not(.tRfpysqqk8s-) {\n --card--base-padding: 0;\n}\n }\n\n/* Adjust `Content` components public padding to match the cards */\n\n._2wxPdv7kELk- > * {\n --public-content--padding: var(--card--base-padding);\n}\n\n/* Remove the nested `Content` components public padding */\n\n._2wxPdv7kELk- > * > * {\n --public-content--padding: 0;\n}\n\n._5LfUFF9DYsk- {\n border-top-width: 0;\n}\n\n._5LfUFF9DYsk-::before {\n content: \" \";\n display: block;\n margin: 0 calc(-1 * (16px / 16));\n margin: 0 calc(-1 * calc(16px / 16));\n margin: 0 calc(-1 * var(--border-base));\n border-top: 0.5rem solid rgb(181, 181, 181);\n border-top: 0.5rem solid var(--card--accent-color);\n border-radius: calc(16px / 8) calc(16px / 8) 0 0;\n border-radius: var(--radius-base) var(--radius-base) 0 0;\n}\n\n.tRfpysqqk8s- {\n --card--border: none;\n\n box-shadow: 0px calc(16px / 16) calc(16px / 4) 0px\n rgba(0, 0, 0, 0.1),\n 0px calc(16px / 4) 12px 0px rgba(0, 0, 0, 0.05);\n\n box-shadow: var(--shadow-base);\n color: inherit;\n text-decoration: inherit;\n cursor: pointer;\n transition: all 100ms linear;\n transition: all var(--timing-quick) linear;\n}\n\n.tRfpysqqk8s-:hover,\n.tRfpysqqk8s-:focus {\n background-color: rgb(244, 246, 250);\n background-color: var(--color-surface--hover);\n}\n\n.fAPeD1InvAI- {\n display: -ms-flexbox;\n display: flex;\n padding: calc(16px * 1);\n padding: var(--card--base-padding);\n background-color: rgb(238, 240, 242);\n background-color: var(--card--header-background);\n -ms-flex-pack: justify;\n justify-content: space-between;\n -ms-flex-align: start;\n align-items: flex-start;\n gap: calc(16px / 2);\n gap: var(--space-small);\n}\n\n.jobber-retheme .fAPeD1InvAI- {\n padding: calc(16px * 1);\n padding: var(--card--base-padding);\n padding-bottom: 0;\n}\n\n@media (min-width: 768px) {\n\n.jobber-retheme .fAPeD1InvAI- {\n padding: calc(16px * 1) 0;\n padding: var(--space-base) 0;\n}\n }\n\n@media (--medium-screens-and-up) {\n\n.jobber-retheme .fAPeD1InvAI- {\n padding: calc(16px * 1) 0;\n padding: var(--space-base) 0;\n}\n }\n\n.jobber-retheme .fAPeD1InvAI- h3 {\n font-family: \"Inter\", Helvetica, Arial, sans-serif;\n font-family: var(--typography--fontFamily-normal);\n font-size: calc((16px * 1) * 1.5);\n font-size: calc(calc(16px * 1) * 1.5);\n font-size: var(--typography--fontSize-largest);\n}\n";
15
+ var css_248z$1 = ":root {\n --card--accent-color: var(--color-grey);\n --card--base-padding: var(--space-base);\n --card--border: var(--border-base) solid var(--color-border);\n --card--header-background: var(--color-surface--background);\n}\n\n._2wxPdv7kELk- {\n display: block;\n width: 100%;\n border: calc(16px / 16) solid rgb(217, 223, 225);\n border: var(--card--border);\n border-radius: calc(16px / 8);\n border-radius: var(--radius-base);\n outline-color: rgb(147, 161, 169);\n outline-color: var(--color-focus);\n background-color: rgba(255, 255, 255, 1);\n background-color: var(--color-surface);\n}\n\n._2wxPdv7kELk-:active {\n outline: 0;\n}\n\n:root .jobber-retheme ._2wxPdv7kELk-:not(.tRfpysqqk8s-) {\n --card--header-background: transparent;\n}\n\n/* Adjust `Content` components public padding to match the cards */\n\n._2wxPdv7kELk- > * {\n --public-content--padding: var(--card--base-padding);\n}\n\n/* Remove the nested `Content` components public padding */\n\n._2wxPdv7kELk- > * > * {\n --public-content--padding: 0;\n}\n\n._5LfUFF9DYsk- {\n border-top-width: 0;\n}\n\n.jobber-retheme ._5LfUFF9DYsk- {\n border-top-width: 1px;\n}\n\n._5LfUFF9DYsk-::before {\n content: \" \";\n display: block;\n margin: 0 calc(-1 * (16px / 16));\n margin: 0 calc(-1 * calc(16px / 16));\n margin: 0 calc(-1 * var(--border-base));\n border-top: 0.5rem solid rgb(181, 181, 181);\n border-top: 0.5rem solid var(--card--accent-color);\n border-radius: calc(16px / 8) calc(16px / 8) 0 0;\n border-radius: var(--radius-base) var(--radius-base) 0 0;\n}\n\n.jobber-retheme ._5LfUFF9DYsk-::before {\n display: none;\n}\n\n.tRfpysqqk8s- {\n --card--border: none;\n\n box-shadow: 0px calc(16px / 16) calc(16px / 4) 0px\n rgba(0, 0, 0, 0.1),\n 0px calc(16px / 4) 12px 0px rgba(0, 0, 0, 0.05);\n\n box-shadow: var(--shadow-base);\n color: inherit;\n text-decoration: inherit;\n cursor: pointer;\n transition: all 100ms linear;\n transition: all var(--timing-quick) linear;\n}\n\n.tRfpysqqk8s-:hover,\n.tRfpysqqk8s-:focus {\n background-color: rgb(244, 246, 250);\n background-color: var(--color-surface--hover);\n}\n\n.fAPeD1InvAI- {\n display: -ms-flexbox;\n display: flex;\n padding: calc(16px * 1);\n padding: var(--card--base-padding);\n background-color: rgb(238, 240, 242);\n background-color: var(--card--header-background);\n -ms-flex-pack: justify;\n justify-content: space-between;\n -ms-flex-align: start;\n align-items: flex-start;\n gap: calc(16px / 2);\n gap: var(--space-small);\n}\n\n.jobber-retheme .fAPeD1InvAI- {\n padding-bottom: 0;\n}\n\n.jobber-retheme .fAPeD1InvAI- h3 {\n font-family: \"Inter\", Helvetica, Arial, sans-serif;\n font-family: var(--typography--fontFamily-normal);\n font-size: calc((16px * 1) * 1.5);\n font-size: calc(calc(16px * 1) * 1.5);\n font-size: var(--typography--fontSize-largest);\n}\n";
16
16
  var styles = {"card":"_2wxPdv7kELk-","clickable":"tRfpysqqk8s-","accent":"_5LfUFF9DYsk-","header":"fAPeD1InvAI-"};
17
17
  styleInject_es.styleInject(css_248z$1);
18
18
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var ConfirmationModal = require('../ConfirmationModal-189e107a.js');
5
+ var ConfirmationModal = require('../ConfirmationModal-df1828b5.js');
6
6
  require('react');
7
7
  require('@jobber/hooks/useOnKeyDown');
8
8
  require('../Modal-a0627c92.js');
@@ -21,8 +21,9 @@ require('../Icon-405a216c.js');
21
21
  require('@jobber/design');
22
22
  require('../ButtonDismiss-350af163.js');
23
23
  require('../Content-2ca1ffe1.js');
24
- require('../Markdown-b80706ed.js');
25
- require('react-markdown');
24
+ require('../Markdown-7028fa41.js');
25
+ require('markdown-to-jsx');
26
+ require('../tslib.es6-5b8768b7.js');
26
27
  require('../Text-259af966.js');
27
28
  require('../Emphasis-bda56d3b.js');
28
29
 
@@ -4,7 +4,7 @@ var React = require('react');
4
4
  var useOnKeyDown = require('@jobber/hooks/useOnKeyDown');
5
5
  var Modal = require('./Modal-a0627c92.js');
6
6
  var Content = require('./Content-2ca1ffe1.js');
7
- var Markdown = require('./Markdown-b80706ed.js');
7
+ var Markdown = require('./Markdown-7028fa41.js');
8
8
 
9
9
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
10
10
 
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var React = require('react');
6
- var Card = require('../Card-644dd256.js');
6
+ var Card = require('../Card-dde21526.js');
7
7
  var Content = require('../Content-2ca1ffe1.js');
8
8
  var Emphasis = require('../Emphasis-bda56d3b.js');
9
9
  require('classnames');
@@ -1,5 +1,4 @@
1
- /// <reference types="react" />
2
- import { ReactElement } from "react-markdown/lib/react-markdown";
1
+ import { ReactElement } from "react";
3
2
  interface DataListHeaderCheckbox {
4
3
  readonly children: ReactElement;
5
4
  }
@@ -12,13 +12,14 @@ var Content = require('../Content-2ca1ffe1.js');
12
12
  var Switch = require('../Switch-7d4aa7c3.js');
13
13
  var Button = require('../Button-b73a5e01.js');
14
14
  var Emphasis = require('../Emphasis-bda56d3b.js');
15
- var Markdown = require('../Markdown-b80706ed.js');
15
+ var Markdown = require('../Markdown-7028fa41.js');
16
16
  require('../Typography-c45bf216.js');
17
17
  require('../getAtlantisConfig-0f3e8af2.js');
18
18
  require('react-router-dom');
19
19
  require('../Icon-405a216c.js');
20
20
  require('@jobber/design');
21
- require('react-markdown');
21
+ require('markdown-to-jsx');
22
+ require('../tslib.es6-5b8768b7.js');
22
23
 
23
24
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
24
25
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var FormatFile = require('../FormatFile-aae6c6e2.js');
5
+ var FormatFile = require('../FormatFile-cc7897de.js');
6
6
  require('react');
7
7
  require('classnames');
8
8
  require('filesize');
@@ -12,7 +12,7 @@ require('react-router-dom');
12
12
  require('../Icon-405a216c.js');
13
13
  require('@jobber/design');
14
14
  require('../Typography-c45bf216.js');
15
- require('../ConfirmationModal-189e107a.js');
15
+ require('../ConfirmationModal-df1828b5.js');
16
16
  require('@jobber/hooks/useOnKeyDown');
17
17
  require('../Modal-a0627c92.js');
18
18
  require('react-dom');
@@ -23,12 +23,12 @@ require('../Heading-1e8e4bd3.js');
23
23
  require('../getAtlantisConfig-0f3e8af2.js');
24
24
  require('../ButtonDismiss-350af163.js');
25
25
  require('../Content-2ca1ffe1.js');
26
- require('../Markdown-b80706ed.js');
27
- require('react-markdown');
26
+ require('../Markdown-7028fa41.js');
27
+ require('markdown-to-jsx');
28
+ require('../tslib.es6-5b8768b7.js');
28
29
  require('../Text-259af966.js');
29
30
  require('../Emphasis-bda56d3b.js');
30
31
  require('../Glimmer-cfa92a88.js');
31
- require('../tslib.es6-5b8768b7.js');
32
32
  require('../ProgressBar-b68edc8f.js');
33
33
 
34
34
 
@@ -5,7 +5,7 @@ var classnames = require('classnames');
5
5
  var getHumanReadableFileSize = require('filesize');
6
6
  var styleInject_es = require('./style-inject.es-9d2f5f4e.js');
7
7
  var Button = require('./Button-b73a5e01.js');
8
- var ConfirmationModal = require('./ConfirmationModal-189e107a.js');
8
+ var ConfirmationModal = require('./ConfirmationModal-df1828b5.js');
9
9
  var Glimmer = require('./Glimmer-cfa92a88.js');
10
10
  var Icon = require('./Icon-405a216c.js');
11
11
  var Typography = require('./Typography-c45bf216.js');
@@ -5,8 +5,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var React = require('react');
6
6
  var classnames = require('classnames');
7
7
  var styleInject_es = require('../style-inject.es-9d2f5f4e.js');
8
- var LightBox = require('../LightBox-a1b87af7.js');
9
- var FormatFile = require('../FormatFile-aae6c6e2.js');
8
+ var LightBox = require('../LightBox-a89d8863.js');
9
+ var FormatFile = require('../FormatFile-cc7897de.js');
10
10
  var Button = require('../Button-b73a5e01.js');
11
11
  require('framer-motion');
12
12
  require('react-dom');
@@ -16,18 +16,18 @@ require('@jobber/hooks/useOnKeyDown');
16
16
  require('@jobber/hooks/useFocusTrap');
17
17
  require('../ButtonDismiss-350af163.js');
18
18
  require('filesize');
19
- require('../ConfirmationModal-189e107a.js');
19
+ require('../ConfirmationModal-df1828b5.js');
20
20
  require('../Modal-a0627c92.js');
21
21
  require('../Heading-1e8e4bd3.js');
22
22
  require('../Typography-c45bf216.js');
23
23
  require('../getAtlantisConfig-0f3e8af2.js');
24
24
  require('../Content-2ca1ffe1.js');
25
- require('../Markdown-b80706ed.js');
26
- require('react-markdown');
25
+ require('../Markdown-7028fa41.js');
26
+ require('markdown-to-jsx');
27
+ require('../tslib.es6-5b8768b7.js');
27
28
  require('../Text-259af966.js');
28
29
  require('../Emphasis-bda56d3b.js');
29
30
  require('../Glimmer-cfa92a88.js');
30
- require('../tslib.es6-5b8768b7.js');
31
31
  require('../Icon-405a216c.js');
32
32
  require('@jobber/design');
33
33
  require('../ProgressBar-b68edc8f.js');
@@ -6,7 +6,7 @@ var tslib_es6 = require('../tslib.es6-5b8768b7.js');
6
6
  var React = require('react');
7
7
  var styleInject_es = require('../style-inject.es-9d2f5f4e.js');
8
8
  var Avatar = require('../Avatar-76a799fa.js');
9
- var InputFile = require('../InputFile-65bfbd78.js');
9
+ var InputFile = require('../InputFile-271f6d31.js');
10
10
  var ProgressBar = require('../ProgressBar-b68edc8f.js');
11
11
  var Button = require('../Button-b73a5e01.js');
12
12
  require('classnames');
@@ -82,10 +82,11 @@ interface InputFileProps {
82
82
  *
83
83
  * @param "images" - only accepts all types of image
84
84
  * @param "basicImages" - only accepts png, jpg and jpeg
85
+ * @param "string[]" - accept a specific list of MIME types
85
86
  *
86
87
  * @default "all"
87
88
  */
88
- readonly allowedTypes?: "all" | "images" | "basicImages";
89
+ readonly allowedTypes?: "all" | "images" | "basicImages" | string[];
89
90
  /**
90
91
  * Allow for multiple files to be selected for upload.
91
92
  *
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var InputFile = require('../InputFile-65bfbd78.js');
5
+ var InputFile = require('../InputFile-271f6d31.js');
6
6
  require('../tslib.es6-5b8768b7.js');
7
7
  require('react');
8
8
  require('classnames');
@@ -24,7 +24,7 @@ styleInject_es.styleInject(css_248z);
24
24
  function InputFile({ variation = "dropzone", size = "base", buttonLabel: providedButtonLabel, allowMultiple = false, allowedTypes = "all", getUploadParams, onUploadStart, onUploadProgress, onUploadComplete, }) {
25
25
  const options = {
26
26
  multiple: allowMultiple,
27
- onDrop: React.useCallback(handleDrop, []),
27
+ onDrop: React.useCallback(handleDrop, [uploadFile]),
28
28
  };
29
29
  if (allowedTypes === "images") {
30
30
  options.accept = "image/*";
@@ -32,6 +32,9 @@ function InputFile({ variation = "dropzone", size = "base", buttonLabel: provide
32
32
  else if (allowedTypes === "basicImages") {
33
33
  options.accept = "image/png, image/jpg, image/jpeg";
34
34
  }
35
+ else if (Array.isArray(allowedTypes)) {
36
+ options.accept = allowedTypes.join(",");
37
+ }
35
38
  const { getRootProps, getInputProps, isDragActive } = reactDropzone.useDropzone(options);
36
39
  const { buttonLabel, hintText } = getLabels(providedButtonLabel, allowMultiple, allowedTypes);
37
40
  const dropZone = classnames__default["default"](styles.dropZoneBase, {
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var LightBox = require('../LightBox-a1b87af7.js');
5
+ var LightBox = require('../LightBox-a89d8863.js');
6
6
  require('react');
7
7
  require('framer-motion');
8
8
  require('react-dom');
@@ -17,7 +17,7 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
17
17
  var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
18
18
  var debounce__default = /*#__PURE__*/_interopDefaultLegacy(debounce);
19
19
 
20
- var css_248z = "._3JgBCebdbNU-,\n.JJOBEL7d-10- {\n display: -ms-flexbox;\n display: flex;\n position: absolute;\n top: 50%;\n z-index: 1;\n z-index: var(--elevation-base);\n -webkit-transform: translateY(-50%);\n transform: translateY(-50%);\n}\n\n._3JgBCebdbNU- {\n right: calc(16px * 1);\n right: var(--space-base);\n}\n\n.JJOBEL7d-10- {\n left: calc(16px * 1);\n left: var(--space-base);\n}\n\n.fAep1A-0xIU- {\n display: -ms-flexbox;\n display: flex;\n position: fixed;\n top: 0;\n left: 0;\n z-index: 1001;\n z-index: var(--elevation-modal);\n width: 100%;\n height: 100%;\n -ms-flex-pack: justify;\n justify-content: space-between;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n\n.AfUUWErd5S4- {\n display: -ms-flexbox;\n display: flex;\n z-index: 1;\n z-index: var(--elevation-base);\n padding: calc(16px / 2) calc(16px * 1);\n padding: var(--space-small) var(--space-base);\n color: rgb(193, 201, 206);\n color: var(--color-text--reverse--secondary);\n font-size: calc(16px * 1);\n font-size: var(--typography--fontSize-large);\n background-color: rgb(1, 41, 57);\n background-color: var(--color-surface--reverse);\n -ms-flex-pack: justify;\n justify-content: space-between;\n}\n\n.ysUYbBTaORk- {\n display: -ms-inline-flexbox;\n display: inline-flex;\n -ms-flex-align: center;\n align-items: center;\n}\n\n.GSOVtN1Y3IU- {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-pack: center;\n justify-content: center;\n position: relative;\n -ms-flex: 1 1 0px;\n flex: 1 1 0;\n min-height: 0;\n}\n\n.-V917BdNqSs- {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n background-color: rgba(0, 0, 0, 0.32);\n background-color: var(--color-overlay);\n}\n\n.sjwUjzb3a5c- {\n position: absolute;\n top: 50%;\n max-width: 100%;\n max-height: 100%;\n margin: auto;\n}\n";
20
+ var css_248z = "._3JgBCebdbNU-,\n.JJOBEL7d-10- {\n display: -ms-flexbox;\n display: flex;\n position: absolute;\n top: 50%;\n z-index: 1;\n z-index: var(--elevation-base);\n -webkit-transform: translateY(-50%);\n transform: translateY(-50%);\n}\n\n._3JgBCebdbNU- {\n right: calc(16px * 1);\n right: var(--space-base);\n}\n\n.JJOBEL7d-10- {\n left: calc(16px * 1);\n left: var(--space-base);\n}\n\n.fAep1A-0xIU- {\n display: -ms-flexbox;\n display: flex;\n position: fixed;\n top: 0;\n left: 0;\n z-index: 1001;\n z-index: var(--elevation-modal);\n width: 100%;\n height: 100%;\n -ms-flex-pack: justify;\n justify-content: space-between;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n\n.AfUUWErd5S4- {\n display: -ms-flexbox;\n display: flex;\n z-index: 1;\n z-index: var(--elevation-base);\n padding: calc(16px / 2) calc(16px * 1);\n padding: var(--space-small) var(--space-base);\n color: rgb(193, 201, 206);\n color: var(--color-text--reverse--secondary);\n font-size: calc(16px * 1);\n font-size: var(--typography--fontSize-large);\n background-color: rgb(1, 41, 57);\n background-color: var(--color-surface--reverse);\n -ms-flex-pack: justify;\n justify-content: space-between;\n}\n\n.jobber-retheme .AfUUWErd5S4- {\n color: rgb(77, 105, 116);\n color: var(--color-text--secondary);\n background-color: rgb(238, 240, 242);\n background-color: var(--color-surface--background);\n}\n\n.ysUYbBTaORk- {\n display: -ms-inline-flexbox;\n display: inline-flex;\n -ms-flex-align: center;\n align-items: center;\n}\n\n.GSOVtN1Y3IU- {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-pack: center;\n justify-content: center;\n position: relative;\n -ms-flex: 1 1 0px;\n flex: 1 1 0;\n min-height: 0;\n}\n\n.-V917BdNqSs- {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n background-color: rgba(0, 0, 0, 0.32);\n background-color: var(--color-overlay);\n}\n\n.sjwUjzb3a5c- {\n position: absolute;\n top: 50%;\n max-width: 100%;\n max-height: 100%;\n margin: auto;\n}\n";
21
21
  var styles = {"next":"_3JgBCebdbNU-","prev":"JJOBEL7d-10-","lightboxWrapper":"fAep1A-0xIU-","toolbar":"AfUUWErd5S4-","title":"ysUYbBTaORk-","imagesWrapper":"GSOVtN1Y3IU-","overlay":"-V917BdNqSs-","image":"sjwUjzb3a5c-"};
22
22
  styleInject_es.styleInject(css_248z);
23
23
 
@@ -11,11 +11,12 @@ var Icon = require('../Icon-405a216c.js');
11
11
  var Text = require('../Text-259af966.js');
12
12
  var Heading = require('../Heading-1e8e4bd3.js');
13
13
  var Typography = require('../Typography-c45bf216.js');
14
- var Markdown = require('../Markdown-b80706ed.js');
14
+ var Markdown = require('../Markdown-7028fa41.js');
15
15
  var Emphasis = require('../Emphasis-bda56d3b.js');
16
16
  require('@jobber/design');
17
17
  require('../getAtlantisConfig-0f3e8af2.js');
18
- require('react-markdown');
18
+ require('markdown-to-jsx');
19
+ require('../tslib.es6-5b8768b7.js');
19
20
  require('../Content-2ca1ffe1.js');
20
21
 
21
22
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
@@ -14,5 +14,17 @@ interface MarkdownProps {
14
14
  */
15
15
  readonly basicUsage?: boolean;
16
16
  }
17
+ /**
18
+ *
19
+ * Our Markdown component is a thin, opinionated wrapper around markdown-to-jsx. It
20
+ * used to be a wrapper around react-markdown, but we switched to
21
+ * markdown-to-jsx because it has better support for server-side rendering.
22
+ * If you need more control over the markdown rendering, you can use
23
+ * markdown-to-jsx directly with a modified version of the configs found in
24
+ * useMarkdownOverrides.tsx.
25
+ *
26
+ * @param props
27
+ * @returns
28
+ */
17
29
  export declare function Markdown({ content, externalLink, basicUsage }: MarkdownProps): JSX.Element;
18
30
  export {};
@@ -2,9 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var Markdown = require('../Markdown-b80706ed.js');
5
+ var Markdown = require('../Markdown-7028fa41.js');
6
6
  require('react');
7
- require('react-markdown');
7
+ require('markdown-to-jsx');
8
+ require('../tslib.es6-5b8768b7.js');
8
9
  require('../Text-259af966.js');
9
10
  require('../Typography-c45bf216.js');
10
11
  require('classnames');
@@ -0,0 +1,2 @@
1
+ import { MarkdownToJSX } from "markdown-to-jsx";
2
+ export declare function useMarkdownOverrides(externalLink?: boolean, basicUsage?: boolean): MarkdownToJSX.Overrides;
@@ -0,0 +1,144 @@
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+ var MarkdownToJSX = require('markdown-to-jsx');
5
+ var tslib_es6 = require('./tslib.es6-5b8768b7.js');
6
+ var Text = require('./Text-259af966.js');
7
+ var Emphasis = require('./Emphasis-bda56d3b.js');
8
+ var Heading = require('./Heading-1e8e4bd3.js');
9
+ var Content = require('./Content-2ca1ffe1.js');
10
+
11
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
12
+
13
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
14
+ var MarkdownToJSX__default = /*#__PURE__*/_interopDefaultLegacy(MarkdownToJSX);
15
+
16
+ /**
17
+ * Basic prevents the use of paragraph and h1 elements while wrapping
18
+ * strong, and em in Atlantis styles. Anchor tags can be
19
+ * made to open in a new tab via the externalLink prop.
20
+ * @param externalLink Will open any anchor tags in a new tab.
21
+ * @returns
22
+ */
23
+ function basicOverrides(externalLink) {
24
+ return {
25
+ p: ({ children }) => React__default["default"].createElement(React__default["default"].Fragment, null, children),
26
+ h1: ({ children }) => React__default["default"].createElement(React__default["default"].Fragment, null, children),
27
+ strong: renderStrong,
28
+ em: renderEmphasis,
29
+ a: renderAnchor({ externalLink }),
30
+ };
31
+ }
32
+ /**
33
+ * This is setup to mimic the output of our old react-markdown setup for compatibility purposes.
34
+ * We sub in Atlantis components here for most of the markdown elements.
35
+ * @param externalLink Will open any anchor tags in a new tab.
36
+ * @returns MarkdownToJSX.Overrides
37
+ */
38
+ function defaultOverrides(externalLink) {
39
+ return {
40
+ p: ({ children }) => React__default["default"].createElement(Text.Text, null, children),
41
+ strong: renderStrong,
42
+ em: renderEmphasis,
43
+ h1: renderHeading(1),
44
+ h2: renderHeading(2),
45
+ h3: renderHeading(3),
46
+ h4: renderHeading(4),
47
+ h5: renderHeading(5),
48
+ h6: {
49
+ component: ({ children }) => React__default["default"].createElement("h6", null, children),
50
+ },
51
+ a: renderAnchor({ externalLink }),
52
+ };
53
+ }
54
+ /**
55
+ * Simple wrapper to open anchor tags in a new tab if externalLink is true.
56
+ * @param props
57
+ * @returns
58
+ */
59
+ function renderAnchor(_a) {
60
+ var { children, externalLink } = _a, rest = tslib_es6.__rest(_a, ["children", "externalLink"]);
61
+ return (React__default["default"].createElement("a", Object.assign({}, rest, { target: externalLink ? "_blank" : undefined }), children));
62
+ }
63
+ /**
64
+ * Renders the Atlantis Emphasis component with the bold variation.
65
+ * @param props
66
+ * @returns
67
+ */
68
+ function renderStrong({ children }) {
69
+ return React__default["default"].createElement(Emphasis.Emphasis, { variation: "bold" }, children);
70
+ }
71
+ /**
72
+ * Renders the Atlantis Emphasis component with the italic variation.
73
+ * @param props
74
+ * @returns
75
+ */
76
+ function renderEmphasis({ children }) {
77
+ return React__default["default"].createElement(Emphasis.Emphasis, { variation: "italic" }, children);
78
+ }
79
+ /**
80
+ * Renders the Atlantis Heading component with the specified level.
81
+ * @param level Heading Level to render
82
+ * @returns
83
+ */
84
+ function renderHeading(level) {
85
+ function buildHeading({ children }) {
86
+ return React__default["default"].createElement(Heading.Heading, { level: level }, children);
87
+ }
88
+ return buildHeading;
89
+ }
90
+ // Quick toggle to decide between basic and default overrides
91
+ // and to pass along our decision to make the link external
92
+ // or not.
93
+ function useMarkdownOverrides(externalLink, basicUsage) {
94
+ return basicUsage
95
+ ? basicOverrides(externalLink)
96
+ : defaultOverrides(externalLink);
97
+ }
98
+
99
+ /**
100
+ *
101
+ * Our Markdown component is a thin, opinionated wrapper around markdown-to-jsx. It
102
+ * used to be a wrapper around react-markdown, but we switched to
103
+ * markdown-to-jsx because it has better support for server-side rendering.
104
+ * If you need more control over the markdown rendering, you can use
105
+ * markdown-to-jsx directly with a modified version of the configs found in
106
+ * useMarkdownOverrides.tsx.
107
+ *
108
+ * @param props
109
+ * @returns
110
+ */
111
+ function Markdown({ content, externalLink, basicUsage }) {
112
+ const props = Object.assign({}, (basicUsage && {
113
+ disallowedElements: [
114
+ "p",
115
+ "h1",
116
+ "h2",
117
+ "h3",
118
+ "h4",
119
+ "h5",
120
+ "h6",
121
+ "table",
122
+ "ul",
123
+ "li",
124
+ "code",
125
+ "image",
126
+ ],
127
+ unwrapDisallowed: true,
128
+ }));
129
+ const Tag = basicUsage ? React__default["default"].Fragment : Content.Content;
130
+ const overrides = useMarkdownOverrides(externalLink, basicUsage);
131
+ return (React__default["default"].createElement(Tag, null,
132
+ React__default["default"].createElement(MarkdownToJSX__default["default"], Object.assign({}, props, { linkTarget: externalLink ? "_blank" : undefined, options: {
133
+ // We wrap the content in a fragment to avoid the extra div that
134
+ // markdown-to-jsx adds by default.
135
+ wrapper: React__default["default"].Fragment,
136
+ // Force markdown-to-jsx to render the content as a block element.
137
+ // This is necessary to avoid the extra span that markdown-to-jsx
138
+ // adds by default.
139
+ forceBlock: true,
140
+ overrides,
141
+ } }), content)));
142
+ }
143
+
144
+ exports.Markdown = Markdown;
@@ -9,13 +9,14 @@ var styleInject_es = require('../style-inject.es-9d2f5f4e.js');
9
9
  var Heading = require('../Heading-1e8e4bd3.js');
10
10
  var Text = require('../Text-259af966.js');
11
11
  var Content = require('../Content-2ca1ffe1.js');
12
- var Markdown = require('../Markdown-b80706ed.js');
12
+ var Markdown = require('../Markdown-7028fa41.js');
13
13
  var Button = require('../Button-b73a5e01.js');
14
14
  var Menu = require('../Menu-da5d8217.js');
15
15
  var Emphasis = require('../Emphasis-bda56d3b.js');
16
16
  require('../Typography-c45bf216.js');
17
17
  require('../getAtlantisConfig-0f3e8af2.js');
18
- require('react-markdown');
18
+ require('markdown-to-jsx');
19
+ require('../tslib.es6-5b8768b7.js');
19
20
  require('react-router-dom');
20
21
  require('../Icon-405a216c.js');
21
22
  require('@jobber/design');
@@ -13,7 +13,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
13
13
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
14
14
  var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
15
15
 
16
- var css_248z = ":root {\n --statusLabel-icon-diameter: calc(var(--space-base) - var(--space-smaller));\n}\n\n.MB0ycTR4PHg- {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-direction: row;\n flex-direction: row;\n -ms-flex-wrap: nowrap;\n flex-wrap: nowrap;\n gap: calc(16px / 2);\n gap: var(--space-small);\n width: -webkit-fit-content;\n width: -moz-fit-content;\n width: fit-content;\n}\n\n.fNl6zDhsox0- {\n width: calc((16px * 1) - (16px / 4));\n width: calc(calc(16px * 1) - calc(16px / 4));\n width: var(--statusLabel-icon-diameter);\n height: calc((16px * 1) - (16px / 4));\n height: calc(calc(16px * 1) - calc(16px / 4));\n height: var(--statusLabel-icon-diameter);\n margin-top: calc(16px / 16);\n margin-top: var(--space-minuscule);\n border-radius: calc(16px / 8);\n border-radius: var(--radius-base);\n background-color: rgb(125, 176, 14);\n background-color: var(--color-success);\n -ms-flex-negative: 0;\n flex-shrink: 0;\n}\n\n._0kNfkSPBETw- {\n -ms-flex-direction: row-reverse;\n flex-direction: row-reverse;\n}\n";
16
+ var css_248z = ":root {\n --statusLabel-icon-diameter: 10px;\n}\n\n.MB0ycTR4PHg- {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-direction: row;\n flex-direction: row;\n -ms-flex-wrap: nowrap;\n flex-wrap: nowrap;\n gap: calc(16px / 2);\n gap: var(--space-small);\n width: -webkit-fit-content;\n width: -moz-fit-content;\n width: fit-content;\n}\n\n.fNl6zDhsox0- {\n width: 10px;\n width: var(--statusLabel-icon-diameter);\n height: 10px;\n height: var(--statusLabel-icon-diameter);\n margin-top: calc(16px / 16);\n margin-top: var(--space-minuscule);\n border-radius: 3px;\n background-color: rgb(125, 176, 14);\n background-color: var(--color-success);\n -ms-flex-negative: 0;\n flex-shrink: 0;\n}\n\n._0kNfkSPBETw- {\n -ms-flex-direction: row-reverse;\n flex-direction: row-reverse;\n}\n";
17
17
  var styles = {"statusLabelRow":"MB0ycTR4PHg-","statusIndicator":"fNl6zDhsox0-","labelTextEndAligned":"_0kNfkSPBETw-"};
18
18
  styleInject_es.styleInject(css_248z);
19
19
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jobber/components",
3
- "version": "4.69.0",
3
+ "version": "4.69.1-JOB-85843.6+46ce7cd4",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -20,7 +20,7 @@
20
20
  ],
21
21
  "dependencies": {
22
22
  "@jobber/design": "^0.51.1",
23
- "@jobber/formatters": "*",
23
+ "@jobber/formatters": "^0.2.2",
24
24
  "@jobber/hooks": "^2.8.0",
25
25
  "@popperjs/core": "^2.0.6",
26
26
  "@std-proposal/temporal": "0.0.1",
@@ -37,11 +37,11 @@
37
37
  "filesize": "^6.1.0",
38
38
  "framer-motion": "6.3.16",
39
39
  "lodash": "^4.17.21",
40
+ "markdown-to-jsx": "^7.4.0",
40
41
  "react-countdown": "^2.3.2",
41
42
  "react-datepicker": "~4.10.0",
42
43
  "react-dropzone": "^11.0.2",
43
44
  "react-hook-form": "^7.43.7",
44
- "react-markdown": "^8.0.3",
45
45
  "react-popper": "^2.2.5",
46
46
  "react-router-dom": "^5.3.4",
47
47
  "time-input-polyfill": "^1.0.7",
@@ -83,5 +83,5 @@
83
83
  "> 1%",
84
84
  "IE 10"
85
85
  ],
86
- "gitHead": "6632ba87310c0b157e22f50d3ba186c914beb826"
86
+ "gitHead": "46ce7cd46b803f5237829edbb4b14d8abb78b80a"
87
87
  }
package/rollup.config.js CHANGED
@@ -49,7 +49,7 @@ export default {
49
49
  "react-hook-form",
50
50
  "react-router-dom",
51
51
  "react-dom",
52
- "react-markdown",
52
+ "markdown-to-jsx",
53
53
  "react-countdown",
54
54
  "react-popper",
55
55
  "react-datepicker",
@@ -1,62 +0,0 @@
1
- 'use strict';
2
-
3
- var React = require('react');
4
- var ReactMarkdown = require('react-markdown');
5
- var Text = require('./Text-259af966.js');
6
- var Emphasis = require('./Emphasis-bda56d3b.js');
7
- var Heading = require('./Heading-1e8e4bd3.js');
8
- var Content = require('./Content-2ca1ffe1.js');
9
-
10
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
11
-
12
- var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
13
- var ReactMarkdown__default = /*#__PURE__*/_interopDefaultLegacy(ReactMarkdown);
14
-
15
- function Markdown({ content, externalLink, basicUsage }) {
16
- const props = Object.assign({}, (basicUsage && {
17
- disallowedElements: [
18
- "p",
19
- "h1",
20
- "h2",
21
- "h3",
22
- "h4",
23
- "h5",
24
- "h6",
25
- "table",
26
- "ul",
27
- "li",
28
- "code",
29
- "image",
30
- ],
31
- unwrapDisallowed: true,
32
- }));
33
- const Tag = basicUsage ? React__default["default"].Fragment : Content.Content;
34
- return (React__default["default"].createElement(Tag, null,
35
- React__default["default"].createElement(ReactMarkdown__default["default"], Object.assign({}, props, { linkTarget: externalLink ? "_blank" : undefined, components: {
36
- p: renderParagraph,
37
- strong: renderStrong,
38
- em: renderEmphasis,
39
- h1: renderHeading(1),
40
- h2: renderHeading(2),
41
- h3: renderHeading(3),
42
- h4: renderHeading(4),
43
- h5: renderHeading(5),
44
- } }), content)));
45
- }
46
- function renderParagraph({ children }) {
47
- return React__default["default"].createElement(Text.Text, null, children);
48
- }
49
- function renderStrong({ children }) {
50
- return React__default["default"].createElement(Emphasis.Emphasis, { variation: "bold" }, children);
51
- }
52
- function renderEmphasis({ children }) {
53
- return React__default["default"].createElement(Emphasis.Emphasis, { variation: "italic" }, children);
54
- }
55
- function renderHeading(level) {
56
- function buildHeading({ children }) {
57
- return React__default["default"].createElement(Heading.Heading, { level: level }, children);
58
- }
59
- return buildHeading;
60
- }
61
-
62
- exports.Markdown = Markdown;