@mixd-id/web-scaffold 0.1.230406310 → 0.1.230406311
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.
package/package.json
CHANGED
|
@@ -210,14 +210,14 @@ export default{
|
|
|
210
210
|
}
|
|
211
211
|
|
|
212
212
|
.button-secondary{
|
|
213
|
-
@apply bg-
|
|
214
|
-
border: solid 1px rgb(var(--
|
|
213
|
+
@apply bg-secondary-500 border-secondary-500 text-primary-700 rounded-lg text-white;
|
|
214
|
+
border: solid 1px rgb(var(--secondary-500));
|
|
215
215
|
}
|
|
216
216
|
.button-secondary:hover{
|
|
217
|
-
@apply bg-
|
|
217
|
+
@apply bg-secondary-600 border-secondary-600;
|
|
218
218
|
}
|
|
219
219
|
.button-secondary:disabled{
|
|
220
|
-
@apply bg-
|
|
220
|
+
@apply bg-secondary-400 border-secondary-400 cursor-not-allowed;
|
|
221
221
|
}
|
|
222
222
|
.button-secondary *{
|
|
223
223
|
@apply text-text-500 fill-white;
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
<div class="flex flex-row gap-4 justify-end items-center p-3 pr-6">
|
|
5
5
|
<slot name="moreButtons"></slot>
|
|
6
6
|
<a v-if="download" :href="imageUrl" target="_blank" download>
|
|
7
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="19" height="19" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.0.0-alpha3 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) --><path d="M480 352h-133.5l-45.25 45.25C289.2 409.3 273.1 416 256 416s-33.16-6.656-45.25-18.75L165.5 352H32c-17.67 0-32 14.33-32 32v96c0 17.67 14.33 32 32 32h448c17.67 0 32-14.33 32-32v-96C512 366.3 497.7 352 480 352zM432 456c-13.2 0-24-10.8-24-24c0-13.2 10.8-24 24-24s24 10.8 24 24C456 445.2 445.2 456 432 456zM233.4 374.6C239.6 380.9 247.8 384 256 384s16.38-3.125 22.62-9.375l128-128c12.49-12.5 12.49-32.75 0-45.25c-12.5-12.5-32.76-12.5-45.25 0L288 274.8V32c0-17.67-14.33-32-32-32C238.3 0 224 14.33 224 32v242.8L150.6 201.4c-12.49-12.5-32.75-12.5-45.25 0c-12.49 12.5-12.49 32.75 0 45.25L233.4 374.6z"/></svg>
|
|
7
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="19" height="19" class="fill-text" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.0.0-alpha3 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) --><path d="M480 352h-133.5l-45.25 45.25C289.2 409.3 273.1 416 256 416s-33.16-6.656-45.25-18.75L165.5 352H32c-17.67 0-32 14.33-32 32v96c0 17.67 14.33 32 32 32h448c17.67 0 32-14.33 32-32v-96C512 366.3 497.7 352 480 352zM432 456c-13.2 0-24-10.8-24-24c0-13.2 10.8-24 24-24s24 10.8 24 24C456 445.2 445.2 456 432 456zM233.4 374.6C239.6 380.9 247.8 384 256 384s16.38-3.125 22.62-9.375l128-128c12.49-12.5 12.49-32.75 0-45.25c-12.5-12.5-32.76-12.5-45.25 0L288 274.8V32c0-17.67-14.33-32-32-32C238.3 0 224 14.33 224 32v242.8L150.6 201.4c-12.49-12.5-32.75-12.5-45.25 0c-12.49 12.5-12.49 32.75 0 45.25L233.4 374.6z"/></svg>
|
|
8
8
|
</a>
|
|
9
9
|
<button @click="close">
|
|
10
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 320 512"><!--! Font Awesome Pro 6.0.0-alpha3 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) --><path d="M310.6 361.4c12.5 12.5 12.5 32.75 0 45.25C304.4 412.9 296.2 416 288 416s-16.38-3.125-22.62-9.375L160 301.3L54.63 406.6C48.38 412.9 40.19 416 32 416S15.63 412.9 9.375 406.6c-12.5-12.5-12.5-32.75 0-45.25l105.4-105.4L9.375 150.6c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0L160 210.8l105.4-105.4c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25l-105.4 105.4L310.6 361.4z"/></svg>
|
|
10
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" class="fill-text" viewBox="0 0 320 512"><!--! Font Awesome Pro 6.0.0-alpha3 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) --><path d="M310.6 361.4c12.5 12.5 12.5 32.75 0 45.25C304.4 412.9 296.2 416 288 416s-16.38-3.125-22.62-9.375L160 301.3L54.63 406.6C48.38 412.9 40.19 416 32 416S15.63 412.9 9.375 406.6c-12.5-12.5-12.5-32.75 0-45.25l105.4-105.4L9.375 150.6c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0L160 210.8l105.4-105.4c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25l-105.4 105.4L310.6 361.4z"/></svg>
|
|
11
11
|
</button>
|
|
12
12
|
</div>
|
|
13
13
|
<div class="flex items-center justify-center">
|
package/src/utils/helpers.js
CHANGED
|
@@ -140,11 +140,11 @@ const strSlug = (title, separator) => {
|
|
|
140
140
|
return title.replace(new RegExp('^[' + separator + '\\s]+|[' + separator + '\\s]+$', 'g'),'');
|
|
141
141
|
}
|
|
142
142
|
|
|
143
|
-
const strVars = (text, vars) => {
|
|
143
|
+
const strVars = (text, vars, opt = { emptyUndefined:true }) => {
|
|
144
144
|
|
|
145
145
|
(text.match(/\{.*?(?=\})\}/gi) ?? []).forEach((match) => {
|
|
146
146
|
const key = match.substring(1, match.length - 1)
|
|
147
|
-
const value = vars[key] ?? ''
|
|
147
|
+
const value = vars[key] ?? (opt?.emptyUndefined ? '' : `{${key}}`)
|
|
148
148
|
text = text.replace(match, value)
|
|
149
149
|
})
|
|
150
150
|
|
package/src/utils/helpers.mjs
CHANGED
|
@@ -84,11 +84,11 @@ const parseBoolean = function(exp){
|
|
|
84
84
|
exp.toLowerCase() : exp)
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
const strVars = function(text, vars){
|
|
87
|
+
const strVars = function(text, vars, opt = { emptyUndefined:true }){
|
|
88
88
|
|
|
89
89
|
(text.match(/\{.*?(?=\})\}/gi) ?? []).forEach((match) => {
|
|
90
90
|
const key = match.substring(1, match.length - 1)
|
|
91
|
-
const value = vars[key] ?? ''
|
|
91
|
+
const value = vars[key] ?? (opt?.emptyUndefined ? '' : `{${key}}`)
|
|
92
92
|
text = text.replace(match, value)
|
|
93
93
|
})
|
|
94
94
|
|