From 4c2735f600e0389235f1c2a0cddefd1c37a6d731 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Ortiz?= Date: Fri, 25 Mar 2022 10:49:07 -0300 Subject: [PATCH] Add media slot to ContentRadioList --- package-lock.json | 270 +++++++++--------- package.json | 4 +- .../ContentRadioList.stories.ts | 61 ++++ .../ContentRadioList/ContentRadioList.ts | 4 +- .../ContentRadioList/ContentRadioList.vue | 3 +- src/lib/renderString.ts | 4 - 6 files changed, 203 insertions(+), 143 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9504e0c..1b745ab 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,15 +1,15 @@ { "name": "@lana/b2c-mapp-ui", - "version": "9.6.2", + "version": "9.7.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@lana/b2c-mapp-ui", - "version": "9.6.2", + "version": "9.7.0", "license": "ISC", "dependencies": { - "@lana/b2c-mapp-ui-assets": "^5.19.0", + "@lana/b2c-mapp-ui-assets": "^5.25.0", "libphonenumber-js": "^1.9.47", "lodash-es": "^4.17.21", "vue": "^3.2.21", @@ -2894,12 +2894,12 @@ } }, "node_modules/@lana/b2c-mapp-ui-assets": { - "version": "5.19.0", - "resolved": "https://npm.pkg.github.com/download/@lana/b2c-mapp-ui-assets/5.19.0/9dccf9056afa06b9c96b1228bbdc0ec46e8ec339b3deec4a70d6cc47d405d1a4", - "integrity": "sha512-fB5Y9cxzCNpGnEsLDjBWc8YdHcTGtSY4bomviJ74eQDNMHOkG0Qtya2zWOEJYdahvcNWHyniBzDfNuKyqqlYtA==", + "version": "5.25.0", + "resolved": "https://npm.pkg.github.com/download/@lana/b2c-mapp-ui-assets/5.25.0/21dc01b63e9f53a4812c0826c556cc45f343e652758f01470a144274b4d3647b", + "integrity": "sha512-8/SsMwoqjMouPZ83X5uNFKv4LETgrPU/j+bwkObNXADP22osqnTXIJVVqS8TLdhYBZfce6KW0K5u8ia0KAig2g==", "license": "ISC", "dependencies": { - "vue": "^3.2.26" + "vue": "^3.2.31" } }, "node_modules/@mdx-js/loader": { @@ -6016,12 +6016,12 @@ "dev": true }, "node_modules/@vue/compiler-core": { - "version": "3.2.29", - "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.2.29.tgz", - "integrity": "sha512-RePZ/J4Ub3sb7atQw6V6Rez+/5LCRHGFlSetT3N4VMrejqJnNPXKUt5AVm/9F5MJriy2w/VudEIvgscCfCWqxw==", + "version": "3.2.31", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.2.31.tgz", + "integrity": "sha512-aKno00qoA4o+V/kR6i/pE+aP+esng5siNAVQ422TkBNM6qA4veXiZbSe8OTXHXquEi/f6Akc+nLfB4JGfe4/WQ==", "dependencies": { "@babel/parser": "^7.16.4", - "@vue/shared": "3.2.29", + "@vue/shared": "3.2.31", "estree-walker": "^2.0.2", "source-map": "^0.6.1" } @@ -6035,25 +6035,25 @@ } }, "node_modules/@vue/compiler-dom": { - "version": "3.2.29", - "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.2.29.tgz", - "integrity": "sha512-y26vK5khdNS9L3ckvkqJk/78qXwWb75Ci8iYLb67AkJuIgyKhIOcR1E8RIt4mswlVCIeI9gQ+fmtdhaiTAtrBQ==", + "version": "3.2.31", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.2.31.tgz", + "integrity": "sha512-60zIlFfzIDf3u91cqfqy9KhCKIJgPeqxgveH2L+87RcGU/alT6BRrk5JtUso0OibH3O7NXuNOQ0cDc9beT0wrg==", "dependencies": { - "@vue/compiler-core": "3.2.29", - "@vue/shared": "3.2.29" + "@vue/compiler-core": "3.2.31", + "@vue/shared": "3.2.31" } }, "node_modules/@vue/compiler-sfc": { - "version": "3.2.29", - "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.2.29.tgz", - "integrity": "sha512-X9+0dwsag2u6hSOP/XsMYqFti/edvYvxamgBgCcbSYuXx1xLZN+dS/GvQKM4AgGS4djqo0jQvWfIXdfZ2ET68g==", + "version": "3.2.31", + "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.2.31.tgz", + "integrity": "sha512-748adc9msSPGzXgibHiO6T7RWgfnDcVQD+VVwYgSsyyY8Ans64tALHZANrKtOzvkwznV/F4H7OAod/jIlp/dkQ==", "dependencies": { "@babel/parser": "^7.16.4", - "@vue/compiler-core": "3.2.29", - "@vue/compiler-dom": "3.2.29", - "@vue/compiler-ssr": "3.2.29", - "@vue/reactivity-transform": "3.2.29", - "@vue/shared": "3.2.29", + "@vue/compiler-core": "3.2.31", + "@vue/compiler-dom": "3.2.31", + "@vue/compiler-ssr": "3.2.31", + "@vue/reactivity-transform": "3.2.31", + "@vue/shared": "3.2.31", "estree-walker": "^2.0.2", "magic-string": "^0.25.7", "postcss": "^8.1.10", @@ -6091,12 +6091,12 @@ } }, "node_modules/@vue/compiler-ssr": { - "version": "3.2.29", - "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.2.29.tgz", - "integrity": "sha512-LrvQwXlx66uWsB9/VydaaqEpae9xtmlUkeSKF6aPDbzx8M1h7ukxaPjNCAXuFd3fUHblcri8k42lfimHfzMICA==", + "version": "3.2.31", + "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.2.31.tgz", + "integrity": "sha512-mjN0rqig+A8TVDnsGPYJM5dpbjlXeHUm2oZHZwGyMYiGT/F4fhJf/cXy8QpjnLQK4Y9Et4GWzHn9PS8AHUnSkw==", "dependencies": { - "@vue/compiler-dom": "3.2.29", - "@vue/shared": "3.2.29" + "@vue/compiler-dom": "3.2.31", + "@vue/shared": "3.2.31" } }, "node_modules/@vue/eslint-config-typescript": { @@ -6118,60 +6118,60 @@ } }, "node_modules/@vue/reactivity": { - "version": "3.2.29", - "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.2.29.tgz", - "integrity": "sha512-Ryhb6Gy62YolKXH1gv42pEqwx7zs3n8gacRVZICSgjQz8Qr8QeCcFygBKYfJm3o1SccR7U+bVBQDWZGOyG1k4g==", + "version": "3.2.31", + "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.2.31.tgz", + "integrity": "sha512-HVr0l211gbhpEKYr2hYe7hRsV91uIVGFYNHj73njbARVGHQvIojkImKMaZNDdoDZOIkMsBc9a1sMqR+WZwfSCw==", "dependencies": { - "@vue/shared": "3.2.29" + "@vue/shared": "3.2.31" } }, "node_modules/@vue/reactivity-transform": { - "version": "3.2.29", - "resolved": "https://registry.npmjs.org/@vue/reactivity-transform/-/reactivity-transform-3.2.29.tgz", - "integrity": "sha512-YF6HdOuhdOw6KyRm59+3rML8USb9o8mYM1q+SH0G41K3/q/G7uhPnHGKvspzceD7h9J3VR1waOQ93CUZj7J7OA==", + "version": "3.2.31", + "resolved": "https://registry.npmjs.org/@vue/reactivity-transform/-/reactivity-transform-3.2.31.tgz", + "integrity": "sha512-uS4l4z/W7wXdI+Va5pgVxBJ345wyGFKvpPYtdSgvfJfX/x2Ymm6ophQlXXB6acqGHtXuBqNyyO3zVp9b1r0MOA==", "dependencies": { "@babel/parser": "^7.16.4", - "@vue/compiler-core": "3.2.29", - "@vue/shared": "3.2.29", + "@vue/compiler-core": "3.2.31", + "@vue/shared": "3.2.31", "estree-walker": "^2.0.2", "magic-string": "^0.25.7" } }, "node_modules/@vue/runtime-core": { - "version": "3.2.29", - "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.2.29.tgz", - "integrity": "sha512-VMvQuLdzoTGmCwIKTKVwKmIL0qcODIqe74JtK1pVr5lnaE0l25hopodmPag3RcnIcIXe+Ye3B2olRCn7fTCgig==", + "version": "3.2.31", + "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.2.31.tgz", + "integrity": "sha512-Kcog5XmSY7VHFEMuk4+Gap8gUssYMZ2+w+cmGI6OpZWYOEIcbE0TPzzPHi+8XTzAgx1w/ZxDFcXhZeXN5eKWsA==", "dependencies": { - "@vue/reactivity": "3.2.29", - "@vue/shared": "3.2.29" + "@vue/reactivity": "3.2.31", + "@vue/shared": "3.2.31" } }, "node_modules/@vue/runtime-dom": { - "version": "3.2.29", - "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.2.29.tgz", - "integrity": "sha512-YJgLQLwr+SQyORzTsBQLL5TT/5UiV83tEotqjL7F9aFDIQdFBTCwpkCFvX9jqwHoyi9sJqM9XtTrMcc8z/OjPA==", + "version": "3.2.31", + "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.2.31.tgz", + "integrity": "sha512-N+o0sICVLScUjfLG7u9u5XCjvmsexAiPt17GNnaWHJUfsKed5e85/A3SWgKxzlxx2SW/Hw7RQxzxbXez9PtY3g==", "dependencies": { - "@vue/runtime-core": "3.2.29", - "@vue/shared": "3.2.29", + "@vue/runtime-core": "3.2.31", + "@vue/shared": "3.2.31", "csstype": "^2.6.8" } }, "node_modules/@vue/server-renderer": { - "version": "3.2.29", - "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.2.29.tgz", - "integrity": "sha512-lpiYx7ciV7rWfJ0tPkoSOlLmwqBZ9FTmQm33S+T4g0j1fO/LmhJ9b9Ctl1o5xvIFVDk9QkSUWANZn7H2pXuxVw==", + "version": "3.2.31", + "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.2.31.tgz", + "integrity": "sha512-8CN3Zj2HyR2LQQBHZ61HexF5NReqngLT3oahyiVRfSSvak+oAvVmu8iNLSu6XR77Ili2AOpnAt1y8ywjjqtmkg==", "dependencies": { - "@vue/compiler-ssr": "3.2.29", - "@vue/shared": "3.2.29" + "@vue/compiler-ssr": "3.2.31", + "@vue/shared": "3.2.31" }, "peerDependencies": { - "vue": "3.2.29" + "vue": "3.2.31" } }, "node_modules/@vue/shared": { - "version": "3.2.29", - "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.2.29.tgz", - "integrity": "sha512-BjNpU8OK6Z0LVzGUppEk0CMYm/hKDnZfYdjSmPOs0N+TR1cLKJAkDwW8ASZUvaaSLEi6d3hVM7jnWnX+6yWnHw==" + "version": "3.2.31", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.2.31.tgz", + "integrity": "sha512-ymN2pj6zEjiKJZbrf98UM2pfDd6F2H7ksKw7NDt/ZZ1fh5Ei39X5tABugtT03ZRlWd9imccoK0hE8hpjpU7irQ==" }, "node_modules/@vue/test-utils": { "version": "2.0.0-rc.18", @@ -16303,11 +16303,11 @@ } }, "node_modules/magic-string": { - "version": "0.25.7", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.7.tgz", - "integrity": "sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz", + "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==", "dependencies": { - "sourcemap-codec": "^1.4.4" + "sourcemap-codec": "^1.4.8" } }, "node_modules/make-dir": { @@ -23971,15 +23971,15 @@ } }, "node_modules/vue": { - "version": "3.2.29", - "resolved": "https://registry.npmjs.org/vue/-/vue-3.2.29.tgz", - "integrity": "sha512-cFIwr7LkbtCRanjNvh6r7wp2yUxfxeM2yPpDQpAfaaLIGZSrUmLbNiSze9nhBJt5MrZ68Iqt0O5scwAMEVxF+Q==", + "version": "3.2.31", + "resolved": "https://registry.npmjs.org/vue/-/vue-3.2.31.tgz", + "integrity": "sha512-odT3W2tcffTiQCy57nOT93INw1auq5lYLLYtWpPYQQYQOOdHiqFct9Xhna6GJ+pJQaF67yZABraH47oywkJgFw==", "dependencies": { - "@vue/compiler-dom": "3.2.29", - "@vue/compiler-sfc": "3.2.29", - "@vue/runtime-dom": "3.2.29", - "@vue/server-renderer": "3.2.29", - "@vue/shared": "3.2.29" + "@vue/compiler-dom": "3.2.31", + "@vue/compiler-sfc": "3.2.31", + "@vue/runtime-dom": "3.2.31", + "@vue/server-renderer": "3.2.31", + "@vue/shared": "3.2.31" } }, "node_modules/vue-contenteditable": { @@ -27747,11 +27747,11 @@ } }, "@lana/b2c-mapp-ui-assets": { - "version": "5.19.0", - "resolved": "https://npm.pkg.github.com/download/@lana/b2c-mapp-ui-assets/5.19.0/9dccf9056afa06b9c96b1228bbdc0ec46e8ec339b3deec4a70d6cc47d405d1a4", - "integrity": "sha512-fB5Y9cxzCNpGnEsLDjBWc8YdHcTGtSY4bomviJ74eQDNMHOkG0Qtya2zWOEJYdahvcNWHyniBzDfNuKyqqlYtA==", + "version": "5.25.0", + "resolved": "https://npm.pkg.github.com/download/@lana/b2c-mapp-ui-assets/5.25.0/21dc01b63e9f53a4812c0826c556cc45f343e652758f01470a144274b4d3647b", + "integrity": "sha512-8/SsMwoqjMouPZ83X5uNFKv4LETgrPU/j+bwkObNXADP22osqnTXIJVVqS8TLdhYBZfce6KW0K5u8ia0KAig2g==", "requires": { - "vue": "^3.2.26" + "vue": "^3.2.31" } }, "@mdx-js/loader": { @@ -30060,12 +30060,12 @@ } }, "@vue/compiler-core": { - "version": "3.2.29", - "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.2.29.tgz", - "integrity": "sha512-RePZ/J4Ub3sb7atQw6V6Rez+/5LCRHGFlSetT3N4VMrejqJnNPXKUt5AVm/9F5MJriy2w/VudEIvgscCfCWqxw==", + "version": "3.2.31", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.2.31.tgz", + "integrity": "sha512-aKno00qoA4o+V/kR6i/pE+aP+esng5siNAVQ422TkBNM6qA4veXiZbSe8OTXHXquEi/f6Akc+nLfB4JGfe4/WQ==", "requires": { "@babel/parser": "^7.16.4", - "@vue/shared": "3.2.29", + "@vue/shared": "3.2.31", "estree-walker": "^2.0.2", "source-map": "^0.6.1" }, @@ -30078,25 +30078,25 @@ } }, "@vue/compiler-dom": { - "version": "3.2.29", - "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.2.29.tgz", - "integrity": "sha512-y26vK5khdNS9L3ckvkqJk/78qXwWb75Ci8iYLb67AkJuIgyKhIOcR1E8RIt4mswlVCIeI9gQ+fmtdhaiTAtrBQ==", + "version": "3.2.31", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.2.31.tgz", + "integrity": "sha512-60zIlFfzIDf3u91cqfqy9KhCKIJgPeqxgveH2L+87RcGU/alT6BRrk5JtUso0OibH3O7NXuNOQ0cDc9beT0wrg==", "requires": { - "@vue/compiler-core": "3.2.29", - "@vue/shared": "3.2.29" + "@vue/compiler-core": "3.2.31", + "@vue/shared": "3.2.31" } }, "@vue/compiler-sfc": { - "version": "3.2.29", - "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.2.29.tgz", - "integrity": "sha512-X9+0dwsag2u6hSOP/XsMYqFti/edvYvxamgBgCcbSYuXx1xLZN+dS/GvQKM4AgGS4djqo0jQvWfIXdfZ2ET68g==", + "version": "3.2.31", + "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.2.31.tgz", + "integrity": "sha512-748adc9msSPGzXgibHiO6T7RWgfnDcVQD+VVwYgSsyyY8Ans64tALHZANrKtOzvkwznV/F4H7OAod/jIlp/dkQ==", "requires": { "@babel/parser": "^7.16.4", - "@vue/compiler-core": "3.2.29", - "@vue/compiler-dom": "3.2.29", - "@vue/compiler-ssr": "3.2.29", - "@vue/reactivity-transform": "3.2.29", - "@vue/shared": "3.2.29", + "@vue/compiler-core": "3.2.31", + "@vue/compiler-dom": "3.2.31", + "@vue/compiler-ssr": "3.2.31", + "@vue/reactivity-transform": "3.2.31", + "@vue/shared": "3.2.31", "estree-walker": "^2.0.2", "magic-string": "^0.25.7", "postcss": "^8.1.10", @@ -30126,12 +30126,12 @@ } }, "@vue/compiler-ssr": { - "version": "3.2.29", - "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.2.29.tgz", - "integrity": "sha512-LrvQwXlx66uWsB9/VydaaqEpae9xtmlUkeSKF6aPDbzx8M1h7ukxaPjNCAXuFd3fUHblcri8k42lfimHfzMICA==", + "version": "3.2.31", + "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.2.31.tgz", + "integrity": "sha512-mjN0rqig+A8TVDnsGPYJM5dpbjlXeHUm2oZHZwGyMYiGT/F4fhJf/cXy8QpjnLQK4Y9Et4GWzHn9PS8AHUnSkw==", "requires": { - "@vue/compiler-dom": "3.2.29", - "@vue/shared": "3.2.29" + "@vue/compiler-dom": "3.2.31", + "@vue/shared": "3.2.31" } }, "@vue/eslint-config-typescript": { @@ -30146,57 +30146,57 @@ } }, "@vue/reactivity": { - "version": "3.2.29", - "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.2.29.tgz", - "integrity": "sha512-Ryhb6Gy62YolKXH1gv42pEqwx7zs3n8gacRVZICSgjQz8Qr8QeCcFygBKYfJm3o1SccR7U+bVBQDWZGOyG1k4g==", + "version": "3.2.31", + "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.2.31.tgz", + "integrity": "sha512-HVr0l211gbhpEKYr2hYe7hRsV91uIVGFYNHj73njbARVGHQvIojkImKMaZNDdoDZOIkMsBc9a1sMqR+WZwfSCw==", "requires": { - "@vue/shared": "3.2.29" + "@vue/shared": "3.2.31" } }, "@vue/reactivity-transform": { - "version": "3.2.29", - "resolved": "https://registry.npmjs.org/@vue/reactivity-transform/-/reactivity-transform-3.2.29.tgz", - "integrity": "sha512-YF6HdOuhdOw6KyRm59+3rML8USb9o8mYM1q+SH0G41K3/q/G7uhPnHGKvspzceD7h9J3VR1waOQ93CUZj7J7OA==", + "version": "3.2.31", + "resolved": "https://registry.npmjs.org/@vue/reactivity-transform/-/reactivity-transform-3.2.31.tgz", + "integrity": "sha512-uS4l4z/W7wXdI+Va5pgVxBJ345wyGFKvpPYtdSgvfJfX/x2Ymm6ophQlXXB6acqGHtXuBqNyyO3zVp9b1r0MOA==", "requires": { "@babel/parser": "^7.16.4", - "@vue/compiler-core": "3.2.29", - "@vue/shared": "3.2.29", + "@vue/compiler-core": "3.2.31", + "@vue/shared": "3.2.31", "estree-walker": "^2.0.2", "magic-string": "^0.25.7" } }, "@vue/runtime-core": { - "version": "3.2.29", - "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.2.29.tgz", - "integrity": "sha512-VMvQuLdzoTGmCwIKTKVwKmIL0qcODIqe74JtK1pVr5lnaE0l25hopodmPag3RcnIcIXe+Ye3B2olRCn7fTCgig==", + "version": "3.2.31", + "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.2.31.tgz", + "integrity": "sha512-Kcog5XmSY7VHFEMuk4+Gap8gUssYMZ2+w+cmGI6OpZWYOEIcbE0TPzzPHi+8XTzAgx1w/ZxDFcXhZeXN5eKWsA==", "requires": { - "@vue/reactivity": "3.2.29", - "@vue/shared": "3.2.29" + "@vue/reactivity": "3.2.31", + "@vue/shared": "3.2.31" } }, "@vue/runtime-dom": { - "version": "3.2.29", - "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.2.29.tgz", - "integrity": "sha512-YJgLQLwr+SQyORzTsBQLL5TT/5UiV83tEotqjL7F9aFDIQdFBTCwpkCFvX9jqwHoyi9sJqM9XtTrMcc8z/OjPA==", + "version": "3.2.31", + "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.2.31.tgz", + "integrity": "sha512-N+o0sICVLScUjfLG7u9u5XCjvmsexAiPt17GNnaWHJUfsKed5e85/A3SWgKxzlxx2SW/Hw7RQxzxbXez9PtY3g==", "requires": { - "@vue/runtime-core": "3.2.29", - "@vue/shared": "3.2.29", + "@vue/runtime-core": "3.2.31", + "@vue/shared": "3.2.31", "csstype": "^2.6.8" } }, "@vue/server-renderer": { - "version": "3.2.29", - "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.2.29.tgz", - "integrity": "sha512-lpiYx7ciV7rWfJ0tPkoSOlLmwqBZ9FTmQm33S+T4g0j1fO/LmhJ9b9Ctl1o5xvIFVDk9QkSUWANZn7H2pXuxVw==", + "version": "3.2.31", + "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.2.31.tgz", + "integrity": "sha512-8CN3Zj2HyR2LQQBHZ61HexF5NReqngLT3oahyiVRfSSvak+oAvVmu8iNLSu6XR77Ili2AOpnAt1y8ywjjqtmkg==", "requires": { - "@vue/compiler-ssr": "3.2.29", - "@vue/shared": "3.2.29" + "@vue/compiler-ssr": "3.2.31", + "@vue/shared": "3.2.31" } }, "@vue/shared": { - "version": "3.2.29", - "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.2.29.tgz", - "integrity": "sha512-BjNpU8OK6Z0LVzGUppEk0CMYm/hKDnZfYdjSmPOs0N+TR1cLKJAkDwW8ASZUvaaSLEi6d3hVM7jnWnX+6yWnHw==" + "version": "3.2.31", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.2.31.tgz", + "integrity": "sha512-ymN2pj6zEjiKJZbrf98UM2pfDd6F2H7ksKw7NDt/ZZ1fh5Ei39X5tABugtT03ZRlWd9imccoK0hE8hpjpU7irQ==" }, "@vue/test-utils": { "version": "2.0.0-rc.18", @@ -38074,11 +38074,11 @@ "dev": true }, "magic-string": { - "version": "0.25.7", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.7.tgz", - "integrity": "sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz", + "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==", "requires": { - "sourcemap-codec": "^1.4.4" + "sourcemap-codec": "^1.4.8" } }, "make-dir": { @@ -44083,15 +44083,15 @@ } }, "vue": { - "version": "3.2.29", - "resolved": "https://registry.npmjs.org/vue/-/vue-3.2.29.tgz", - "integrity": "sha512-cFIwr7LkbtCRanjNvh6r7wp2yUxfxeM2yPpDQpAfaaLIGZSrUmLbNiSze9nhBJt5MrZ68Iqt0O5scwAMEVxF+Q==", - "requires": { - "@vue/compiler-dom": "3.2.29", - "@vue/compiler-sfc": "3.2.29", - "@vue/runtime-dom": "3.2.29", - "@vue/server-renderer": "3.2.29", - "@vue/shared": "3.2.29" + "version": "3.2.31", + "resolved": "https://registry.npmjs.org/vue/-/vue-3.2.31.tgz", + "integrity": "sha512-odT3W2tcffTiQCy57nOT93INw1auq5lYLLYtWpPYQQYQOOdHiqFct9Xhna6GJ+pJQaF67yZABraH47oywkJgFw==", + "requires": { + "@vue/compiler-dom": "3.2.31", + "@vue/compiler-sfc": "3.2.31", + "@vue/runtime-dom": "3.2.31", + "@vue/server-renderer": "3.2.31", + "@vue/shared": "3.2.31" } }, "vue-contenteditable": { diff --git a/package.json b/package.json index b2ceab6..044de34 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lana/b2c-mapp-ui", - "version": "9.6.2", + "version": "9.7.0", "description": "Shared custom libraries for building µapps.", "bugs": { "url": "https://github.com/lana/b2c-mapp-ui/issues" @@ -48,7 +48,7 @@ "dist/*" ], "dependencies": { - "@lana/b2c-mapp-ui-assets": "^5.19.0", + "@lana/b2c-mapp-ui-assets": "^5.25.0", "libphonenumber-js": "^1.9.47", "lodash-es": "^4.17.21", "vue": "^3.2.21", diff --git a/src/components/ContentRadioList/ContentRadioList.stories.ts b/src/components/ContentRadioList/ContentRadioList.stories.ts index 9c6c5f4..93c3b99 100644 --- a/src/components/ContentRadioList/ContentRadioList.stories.ts +++ b/src/components/ContentRadioList/ContentRadioList.stories.ts @@ -1,5 +1,6 @@ import { action } from '@storybook/addon-actions'; import type { Meta, StoryFn } from '@storybook/vue3'; +import * as AllIcons from '@lana/b2c-mapp-ui-assets'; import ContentRadioList from './ContentRadioList.vue'; import RenderString from '../../lib/renderString'; @@ -51,6 +52,7 @@ const Template: StoryFn = (args, { argTypes }) => ({ components: { ContentRadioList, RenderString, + ...AllIcons, }, data() { return { @@ -73,6 +75,11 @@ const Template: StoryFn = (args, { argTypes }) => ({ :options="options" @input="onInput" > + @@ -166,9 +173,63 @@ withCustomCheckedUncheckedIcons.parameters = { }, }; +const optionsWithIcons = [ + { + title: 'Option 1', + metaText: 'Description 1', + value: 'option1', + icon: 'MopIcon', + }, + { + title: 'Option 2', + metaText: 'Description 2', + value: 'option2', + icon: 'MopSuccessIcon', + }, + { + title: 'Option 3', + metaText: 'Description 3', + value: 'option3', + icon: 'CardIcon', + }, +]; + +const optionsWithIconsValues = options.map(({ value }) => value); +const optionsWithIconsLabels = options.reduce((accumulator, { value, title }) => ({ ...accumulator, [value]: title }), {}); + +const withCustomMediaIcon = Template.bind({}); +withCustomMediaIcon.args = { + options: optionsWithIcons, + value: 'option1', +}; +withCustomMediaIcon.argTypes = { + value: { control: { type: 'select', labels: optionsWithIconsLabels }, options: optionsWithIconsValues }, +}; +withCustomMediaIcon.parameters = { + docs: { + source: { + code: ` + + + + `, + }, + }, +}; + export { defaultExample, withCustomCheckedUncheckedIcons, + withCustomMediaIcon, }; export default ContentRadioListStories; diff --git a/src/components/ContentRadioList/ContentRadioList.ts b/src/components/ContentRadioList/ContentRadioList.ts index 9816e44..3b0e3bf 100644 --- a/src/components/ContentRadioList/ContentRadioList.ts +++ b/src/components/ContentRadioList/ContentRadioList.ts @@ -9,7 +9,9 @@ interface ContentRadioOption { title?: string, metaText?: string, value: string | number, - disabled?: boolean + disabled?: boolean, + icon?: string, + mediaClass?: string, } const ContentRadioList = defineComponent({ diff --git a/src/components/ContentRadioList/ContentRadioList.vue b/src/components/ContentRadioList/ContentRadioList.vue index 0688447..b730175 100644 --- a/src/components/ContentRadioList/ContentRadioList.vue +++ b/src/components/ContentRadioList/ContentRadioList.vue @@ -1,7 +1,7 @@