From 500102002e5b30a4b739842f2e767d0ff9ae4993 Mon Sep 17 00:00:00 2001 From: Jason Smith Date: Wed, 6 Nov 2024 15:24:30 +1100 Subject: [PATCH] feat(@dpc-sdp/ripple-ui-core): :sparkles: add icon-file-secure --- .../src/utils/markup-transpiler/cheerio.test.ts | 4 ++-- .../src/utils/markup-transpiler/default-plugins.ts | 8 ++++++-- .../src/assets/icons/core/icon-file-secure.svg | 4 ++++ packages/ripple-ui-core/src/assets/icons/sprite.js | 2 +- packages/ripple-ui-core/src/assets/icons/sprite.svg | 2 +- packages/ripple-ui-core/src/components/icon/constants.ts | 1 + 6 files changed, 15 insertions(+), 6 deletions(-) create mode 100644 packages/ripple-ui-core/src/assets/icons/core/icon-file-secure.svg diff --git a/packages/ripple-tide-api/src/utils/markup-transpiler/cheerio.test.ts b/packages/ripple-tide-api/src/utils/markup-transpiler/cheerio.test.ts index e7309c4186..f21e09156c 100644 --- a/packages/ripple-tide-api/src/utils/markup-transpiler/cheerio.test.ts +++ b/packages/ripple-tide-api/src/utils/markup-transpiler/cheerio.test.ts @@ -60,8 +60,8 @@ const fixed = { `
- - + +
Secure document diff --git a/packages/ripple-tide-api/src/utils/markup-transpiler/default-plugins.ts b/packages/ripple-tide-api/src/utils/markup-transpiler/default-plugins.ts index cadac7200e..b3e7e6125e 100644 --- a/packages/ripple-tide-api/src/utils/markup-transpiler/default-plugins.ts +++ b/packages/ripple-tide-api/src/utils/markup-transpiler/default-plugins.ts @@ -124,11 +124,15 @@ const pluginDocuments = function (this: any) { }) } + const mediaIcon = $element.hasClass('embedded-entity--media--secure-file') + ? 'file-secure' + : 'document-lined' + return $element.replaceWith(`
- - + +
${title} diff --git a/packages/ripple-ui-core/src/assets/icons/core/icon-file-secure.svg b/packages/ripple-ui-core/src/assets/icons/core/icon-file-secure.svg new file mode 100644 index 0000000000..999be8f08a --- /dev/null +++ b/packages/ripple-ui-core/src/assets/icons/core/icon-file-secure.svg @@ -0,0 +1,4 @@ + + + diff --git a/packages/ripple-ui-core/src/assets/icons/sprite.js b/packages/ripple-ui-core/src/assets/icons/sprite.js index 30cbbe3b5a..6341d5ff68 100644 --- a/packages/ripple-ui-core/src/assets/icons/sprite.js +++ b/packages/ripple-ui-core/src/assets/icons/sprite.js @@ -1 +1 @@ -export default ["icon-cancel","icon-check-circle-filled","icon-chevron-down","icon-chevron-left","icon-chevron-right","icon-chevron-up","icon-current-location","icon-document-lined","icon-document","icon-download","icon-enlarge-square-filled","icon-enlarge","icon-exclamation-circle-filled","icon-facebook","icon-home","icon-information-circle-filled","icon-link-external-square-filled","icon-linkedin","icon-mail","icon-phone","icon-pin","icon-twitter","icon-view","icon-whatsapp","icon-x"] \ No newline at end of file +export default ["icon-cancel","icon-check-circle-filled","icon-chevron-down","icon-chevron-left","icon-chevron-right","icon-chevron-up","icon-current-location","icon-document-lined","icon-document","icon-download","icon-enlarge-square-filled","icon-enlarge","icon-exclamation-circle-filled","icon-facebook","icon-file-secure","icon-home","icon-information-circle-filled","icon-link-external-square-filled","icon-linkedin","icon-mail","icon-phone","icon-pin","icon-twitter","icon-view","icon-whatsapp","icon-x"] \ No newline at end of file diff --git a/packages/ripple-ui-core/src/assets/icons/sprite.svg b/packages/ripple-ui-core/src/assets/icons/sprite.svg index a05c014b64..a49815ab93 100644 --- a/packages/ripple-ui-core/src/assets/icons/sprite.svg +++ b/packages/ripple-ui-core/src/assets/icons/sprite.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/packages/ripple-ui-core/src/components/icon/constants.ts b/packages/ripple-ui-core/src/components/icon/constants.ts index 0c3309b69f..0d1bdc4c73 100644 --- a/packages/ripple-ui-core/src/components/icon/constants.ts +++ b/packages/ripple-ui-core/src/components/icon/constants.ts @@ -54,6 +54,7 @@ export const RplIconGroups = { 'icon-enlarge', 'icon-enlarge-square-filled', 'icon-exclamation-circle-filled', + 'icon-file-secure', 'icon-free', 'icon-home', 'icon-information-circle-filled',