Skip to content

Commit 46f4208

Browse files
Merge release/2.1.0 into main branch (#977)
* add target to Alert action (#974) * Bump word-wrap from 1.2.3 to 1.2.4 (#976) Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4. - [Release notes](https://github.com/jonschlinkert/word-wrap/releases) - [Commits](jonschlinkert/word-wrap@1.2.3...1.2.4) --- updated-dependencies: - dependency-name: word-wrap dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump semver from 5.7.1 to 5.7.2 (#967) Bumps [semver](https://github.com/npm/node-semver) from 5.7.1 to 5.7.2. - [Release notes](https://github.com/npm/node-semver/releases) - [Changelog](https://github.com/npm/node-semver/blob/v5.7.2/CHANGELOG.md) - [Commits](npm/node-semver@v5.7.1...v5.7.2) --- updated-dependencies: - dependency-name: semver dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump tough-cookie from 4.1.2 to 4.1.3 (#966) Bumps [tough-cookie](https://github.com/salesforce/tough-cookie) from 4.1.2 to 4.1.3. - [Release notes](https://github.com/salesforce/tough-cookie/releases) - [Changelog](https://github.com/salesforce/tough-cookie/blob/master/CHANGELOG.md) - [Commits](salesforce/tough-cookie@v4.1.2...v4.1.3) --- updated-dependencies: - dependency-name: tough-cookie dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add RichTextEditor component (#972) Adds a RichTextEditor component to input and edit text with formatting. Currently supports bold, italic, link, unordered list, and ordered list.
1 parent ad96e36 commit 46f4208

17 files changed

+1782
-19
lines changed

package.json

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,31 @@
11
{
22
"name": "@user-interviews/ui-design-system",
3-
"version": "2.0.4",
3+
"version": "2.1.0",
44
"dependencies": {
5+
"@tiptap/core": "^2.0.3",
6+
"@tiptap/extension-bold": "^2.0.3",
7+
"@tiptap/extension-bullet-list": "^2.0.3",
8+
"@tiptap/extension-character-count": "^2.0.3",
9+
"@tiptap/extension-document": "^2.0.3",
10+
"@tiptap/extension-hard-break": "^2.0.3",
11+
"@tiptap/extension-history": "^2.0.3",
12+
"@tiptap/extension-italic": "^2.0.3",
13+
"@tiptap/extension-link": "^2.0.3",
14+
"@tiptap/extension-list-item": "^2.0.3",
15+
"@tiptap/extension-ordered-list": "^2.0.3",
16+
"@tiptap/extension-paragraph": "^2.0.3",
17+
"@tiptap/extension-placeholder": "^2.0.3",
18+
"@tiptap/extension-text": "^2.0.3",
19+
"@tiptap/pm": "^2.0.3",
20+
"@tiptap/react": "^2.0.3",
521
"react-bootstrap": "^2.5.0",
622
"react-currency-input-field": "^3.6.10",
723
"react-loading-skeleton": "^3.1.0",
824
"react-router-dom": "^5.2.0",
925
"react-select": "^5.0.0",
1026
"react-toggle": "4.1.1",
1127
"react-transition-group": "^4.3.0",
28+
"sanitize-html": "^2.11.0",
1229
"uuid": "^7.0.2"
1330
},
1431
"scripts": {

spec/__snapshots__/Storyshots.test.js.snap

Lines changed: 258 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10559,6 +10559,264 @@ exports[`Storyshots Components/RadioButton With Description 1`] = `
1055910559
</label>
1056010560
`;
1056110561

10562+
exports[`Storyshots Components/RichTextEditor ARIA Attributes 1`] = `
10563+
Array [
10564+
<span
10565+
aria-busy={true}
10566+
aria-live="polite"
10567+
>
10568+
<span
10569+
className="react-loading-skeleton LoadingSkeleton"
10570+
style={
10571+
Object {
10572+
"--base-color": "#E1E1E1",
10573+
"borderRadius": "0.25rem",
10574+
"height": 40,
10575+
"width": "100%",
10576+
}
10577+
}
10578+
>
10579+
10580+
</span>
10581+
<br />
10582+
</span>,
10583+
<span
10584+
aria-busy={true}
10585+
aria-live="polite"
10586+
>
10587+
<span
10588+
className="react-loading-skeleton LoadingSkeleton"
10589+
style={
10590+
Object {
10591+
"--base-color": "#E1E1E1",
10592+
"borderRadius": "0.25rem",
10593+
"height": 70,
10594+
"width": "100%",
10595+
}
10596+
}
10597+
>
10598+
10599+
</span>
10600+
<br />
10601+
</span>,
10602+
]
10603+
`;
10604+
10605+
exports[`Storyshots Components/RichTextEditor Available Actions 1`] = `
10606+
Array [
10607+
<span
10608+
aria-busy={true}
10609+
aria-live="polite"
10610+
>
10611+
<span
10612+
className="react-loading-skeleton LoadingSkeleton"
10613+
style={
10614+
Object {
10615+
"--base-color": "#E1E1E1",
10616+
"borderRadius": "0.25rem",
10617+
"height": 40,
10618+
"width": "100%",
10619+
}
10620+
}
10621+
>
10622+
10623+
</span>
10624+
<br />
10625+
</span>,
10626+
<span
10627+
aria-busy={true}
10628+
aria-live="polite"
10629+
>
10630+
<span
10631+
className="react-loading-skeleton LoadingSkeleton"
10632+
style={
10633+
Object {
10634+
"--base-color": "#E1E1E1",
10635+
"borderRadius": "0.25rem",
10636+
"height": 70,
10637+
"width": "100%",
10638+
}
10639+
}
10640+
>
10641+
10642+
</span>
10643+
<br />
10644+
</span>,
10645+
]
10646+
`;
10647+
10648+
exports[`Storyshots Components/RichTextEditor Character Limit 1`] = `
10649+
Array [
10650+
<span
10651+
aria-busy={true}
10652+
aria-live="polite"
10653+
>
10654+
<span
10655+
className="react-loading-skeleton LoadingSkeleton"
10656+
style={
10657+
Object {
10658+
"--base-color": "#E1E1E1",
10659+
"borderRadius": "0.25rem",
10660+
"height": 40,
10661+
"width": "100%",
10662+
}
10663+
}
10664+
>
10665+
10666+
</span>
10667+
<br />
10668+
</span>,
10669+
<span
10670+
aria-busy={true}
10671+
aria-live="polite"
10672+
>
10673+
<span
10674+
className="react-loading-skeleton LoadingSkeleton"
10675+
style={
10676+
Object {
10677+
"--base-color": "#E1E1E1",
10678+
"borderRadius": "0.25rem",
10679+
"height": 70,
10680+
"width": "100%",
10681+
}
10682+
}
10683+
>
10684+
10685+
</span>
10686+
<br />
10687+
</span>,
10688+
]
10689+
`;
10690+
10691+
exports[`Storyshots Components/RichTextEditor Default 1`] = `
10692+
Array [
10693+
<span
10694+
aria-busy={true}
10695+
aria-live="polite"
10696+
>
10697+
<span
10698+
className="react-loading-skeleton LoadingSkeleton"
10699+
style={
10700+
Object {
10701+
"--base-color": "#E1E1E1",
10702+
"borderRadius": "0.25rem",
10703+
"height": 40,
10704+
"width": "100%",
10705+
}
10706+
}
10707+
>
10708+
10709+
</span>
10710+
<br />
10711+
</span>,
10712+
<span
10713+
aria-busy={true}
10714+
aria-live="polite"
10715+
>
10716+
<span
10717+
className="react-loading-skeleton LoadingSkeleton"
10718+
style={
10719+
Object {
10720+
"--base-color": "#E1E1E1",
10721+
"borderRadius": "0.25rem",
10722+
"height": 70,
10723+
"width": "100%",
10724+
}
10725+
}
10726+
>
10727+
10728+
</span>
10729+
<br />
10730+
</span>,
10731+
]
10732+
`;
10733+
10734+
exports[`Storyshots Components/RichTextEditor Error 1`] = `
10735+
Array [
10736+
<span
10737+
aria-busy={true}
10738+
aria-live="polite"
10739+
>
10740+
<span
10741+
className="react-loading-skeleton LoadingSkeleton"
10742+
style={
10743+
Object {
10744+
"--base-color": "#E1E1E1",
10745+
"borderRadius": "0.25rem",
10746+
"height": 40,
10747+
"width": "100%",
10748+
}
10749+
}
10750+
>
10751+
10752+
</span>
10753+
<br />
10754+
</span>,
10755+
<span
10756+
aria-busy={true}
10757+
aria-live="polite"
10758+
>
10759+
<span
10760+
className="react-loading-skeleton LoadingSkeleton"
10761+
style={
10762+
Object {
10763+
"--base-color": "#E1E1E1",
10764+
"borderRadius": "0.25rem",
10765+
"height": 70,
10766+
"width": "100%",
10767+
}
10768+
}
10769+
>
10770+
10771+
</span>
10772+
<br />
10773+
</span>,
10774+
]
10775+
`;
10776+
10777+
exports[`Storyshots Components/RichTextEditor One Line 1`] = `
10778+
Array [
10779+
<span
10780+
aria-busy={true}
10781+
aria-live="polite"
10782+
>
10783+
<span
10784+
className="react-loading-skeleton LoadingSkeleton"
10785+
style={
10786+
Object {
10787+
"--base-color": "#E1E1E1",
10788+
"borderRadius": "0.25rem",
10789+
"height": 40,
10790+
"width": "100%",
10791+
}
10792+
}
10793+
>
10794+
10795+
</span>
10796+
<br />
10797+
</span>,
10798+
<span
10799+
aria-busy={true}
10800+
aria-live="polite"
10801+
>
10802+
<span
10803+
className="react-loading-skeleton LoadingSkeleton"
10804+
style={
10805+
Object {
10806+
"--base-color": "#E1E1E1",
10807+
"borderRadius": "0.25rem",
10808+
"height": 70,
10809+
"width": "100%",
10810+
}
10811+
}
10812+
>
10813+
10814+
</span>
10815+
<br />
10816+
</span>,
10817+
]
10818+
`;
10819+
1056210820
exports[`Storyshots Components/Selects/Async Default 1`] = `
1056310821
<div
1056410822
className="FormGroup"

src/Alert/Alert.jsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ function Alert(props) {
108108
className={classNames(`Alert-${(props.type)}`, 'primary-action')}
109109
href={props.action.url}
110110
rel="noopener noreferrer"
111+
target={props.actionTarget}
111112
>
112113
{props.action.content}
113114
</a>
@@ -138,6 +139,10 @@ Alert.propTypes = {
138139
Creates a CTA button on the Alert
139140
*/
140141
action: PropTypes.oneOfType([PropTypes.object, PropTypes.node]),
142+
/**
143+
Specifies where to open the linked document
144+
*/
145+
actionTarget: PropTypes.string,
141146
/**
142147
Determines whether the Alert will disappear automatically
143148
*/
@@ -155,6 +160,7 @@ Alert.propTypes = {
155160

156161
Alert.defaultProps = {
157162
action: undefined,
163+
actionTarget: undefined,
158164
autoDismiss: false,
159165
removeBorderLeft: false,
160166
title: undefined,

0 commit comments

Comments
 (0)