diff --git a/bun.lock b/bun.lock index 9c9ca73..e766562 100644 --- a/bun.lock +++ b/bun.lock @@ -3,6 +3,9 @@ "workspaces": { "": { "name": "vue3.dev", + "dependencies": { + "tinycolor2": "1.6.0", + }, "devDependencies": { "@babel/core": "^7.26.10", "@bulvar/bulma": "^0.11.24", @@ -1603,6 +1606,8 @@ "thenify-all": ["thenify-all@1.6.0", "", { "dependencies": { "thenify": ">= 3.1.0 < 4" } }, "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA=="], + "tinycolor2": ["tinycolor2@1.6.0", "", {}, "sha512-XPaBkWQJdsf3pLKJV9p4qN/S+fm2Oj8AIPo1BTUhg5oxkvm9+SVEGFdhyOz7tTdUTfvxMiAs4sp6/eZO2Ew+pw=="], + "tinyglobby": ["tinyglobby@0.2.12", "", { "dependencies": { "fdir": "^6.4.3", "picomatch": "^4.0.2" } }, "sha512-qkf4trmKSIiMTs/E63cxH+ojC2unam7rJ0WrauAzpT3ECNTxGRMlaXxVbfxMUC/w0LaYk6jQ4y/nGR9uBO3tww=="], "to-data-view": ["to-data-view@2.0.0", "", {}, "sha512-RGEM5KqlPHr+WVTPmGNAXNeFEmsBnlkxXaIfEpUYV0AST2Z5W1EGq9L/MENFrMMmL2WQr1wjkmZy/M92eKhjYA=="], diff --git a/package.json b/package.json index 1a2c9c5..de9a919 100644 --- a/package.json +++ b/package.json @@ -90,7 +90,8 @@ "vue": "^3.5.13", "vue-composable": "^1.0.0-beta.24", "vue-i18n": "^9.1.10", - "vue-router": "^4.0.16" + "vue-router": "^4.0.16", + "tinycolor2": "1.6.0" }, "engines": { "bun": ">=1.0.0" diff --git a/rollup.config.js b/rollup.config.js index c27395d..43f723e 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -145,9 +145,10 @@ const config = [ replace({ 'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV), 'process.env.VUE_APP_VERSION_NUMBER': JSON.stringify(env.parsed.VUE_APP_VERSION_NUMBER), + __VUE_PROD_HYDRATION_MISMATCH_DETAILS__: false, __VUE_OPTIONS_API__: false, __VUE_PROD_DEVTOOLS__: false, - preventAssignment: true + preventAssignment: true, }), json(), alias({ entries: { vue: '@vue/runtime-dom' } }), @@ -181,13 +182,13 @@ const config = [ prod && terser({ format: { comments: false } }), prod && - gzip({ - fileName: '.br', - customCompression: content => - zlib.brotliCompressSync(Buffer.from(content), { - params: { [zlib.constants.BROTLI_PARAM_QUALITY]: 11 }, - }), - }), + gzip({ + fileName: '.br', + customCompression: content => + zlib.brotliCompressSync(Buffer.from(content), { + params: { [zlib.constants.BROTLI_PARAM_QUALITY]: 11 }, + }), + }), html({ publicPath: env.parsed.BASE_URL, title: 'Vue3-ui', @@ -195,12 +196,12 @@ const config = [ }), watch && - serve({ - host: '0.0.0.0', - contentBase: 'dist', - historyApiFallback: true, - port: 5000, - }), + serve({ + host: '0.0.0.0', + contentBase: 'dist', + historyApiFallback: true, + port: 5000, + }), watch && livereload({ watch: 'dist' }), prod && analyzer(), diff --git a/src/components/ComponentShowcase.vue b/src/components/ComponentShowcase.vue new file mode 100644 index 0000000..1157311 --- /dev/null +++ b/src/components/ComponentShowcase.vue @@ -0,0 +1,121 @@ + + + \ No newline at end of file diff --git a/src/components/sections/Snippet.vue b/src/components/sections/Snippet.vue index 8fc7e5a..f86a525 100644 --- a/src/components/sections/Snippet.vue +++ b/src/components/sections/Snippet.vue @@ -22,7 +22,7 @@ export default { if (binding.value) { target.innerHTML = binding.value } - hljs.highlightBlock(target) + hljs.highlightElement(target) } }, componentUpdated(el, binding) { @@ -30,7 +30,7 @@ export default { for (const target of targets) { if (binding.value) { target.innerHTML = binding.value - hljs.highlightBlock(target) + hljs.highlightElement(target) } } } diff --git a/src/docs/components/showcases/Checkbox.vue b/src/docs/components/showcases/Checkbox.vue index a1c271d..6968732 100644 --- a/src/docs/components/showcases/Checkbox.vue +++ b/src/docs/components/showcases/Checkbox.vue @@ -22,11 +22,11 @@ export default { Active checkbox
- + Indeterminate checkbox
- + Disabled checkbox diff --git a/src/docs/components/showcases/Toast/Default.vue b/src/docs/components/showcases/Toast/Default.vue index a2a9c38..1b422ff 100644 --- a/src/docs/components/showcases/Toast/Default.vue +++ b/src/docs/components/showcases/Toast/Default.vue @@ -49,19 +49,23 @@ v-model="state.options.duration" min="1000" max="10000" - :disabled="state.options.duration === false" /> - - - Disable duration + :disabled="state.options.durationDisabled" /> + + Disable duration - + Dismissible on click - + Enqueue @@ -69,7 +73,7 @@ - + Pause on hover @@ -175,6 +179,10 @@ export default { message: "Bulma's notification implemented as a toast plugin.", options: { duration: 4000, + dismissible: true, + queue: false, + pauseOnHover: true, + durationDisabled: false }, }) @@ -217,11 +225,7 @@ export default { }) } - function changeDuration(e) { - state.options.duration = !e.target.checked ? 4000 : false - } - - return { state, positions, hasOptions, toast, changeDuration } + return { state, positions, hasOptions, toast } }, } diff --git a/src/pages/Design/Colors.vue b/src/pages/Design/Colors.vue new file mode 100644 index 0000000..fdec97f --- /dev/null +++ b/src/pages/Design/Colors.vue @@ -0,0 +1,192 @@ + + + diff --git a/src/pages/Documentation.vue b/src/pages/Documentation.vue index 438cfcb..39769ac 100644 --- a/src/pages/Documentation.vue +++ b/src/pages/Documentation.vue @@ -55,43 +55,23 @@ export default {
- - + + - + + - - + + - - + + @@ -107,43 +87,25 @@ export default { - + - + - + - - + + - + - + - + @@ -169,30 +125,18 @@ export default { - + - + - + - +
@@ -200,13 +144,8 @@ export default { Home - + {{ item }} diff --git a/src/pages/index.ts b/src/pages/index.ts index b34eac7..c9afb6e 100644 --- a/src/pages/index.ts +++ b/src/pages/index.ts @@ -10,6 +10,8 @@ export { default as Validation } from './Validation.vue' export { default as Theming } from './Design/Theming.vue' +export { default as Colors } from './Design/Colors.vue' + export { default as Bulma } from './Design/Bulma.vue' export { default as IntroducingAppState } from './AppState/Introducing.vue' diff --git a/src/router/index.js b/src/router/index.js index b1863b2..6e08c93 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -89,6 +89,12 @@ const routes = [ component: Pages.Theming, meta: metaTags('Theming', 'Customize Vue3-ui and make it your own.'), }, + { + name: 'colors', + path: 'colors', + component: Pages.Colors, + meta: metaTags('Colors', 'Colors are a great way to add personality to your application.'), + }, { name: 'bulma', path: 'bulma', diff --git a/src/theming/variables.js b/src/theming/variables.js index 9f4f483..34dd113 100644 --- a/src/theming/variables.js +++ b/src/theming/variables.js @@ -1,27 +1,27 @@ const variables = { - // fonts - '$family-primary': 'metroclean, Arial, sans-serif', - '$subtitle-family': 'metroclean, Arial, sans-serif', - '$title-family': 'metroclean, Arial, sans-serif', - '$weight-normal': '600', // TODO Must be work with 400 (normal) + // // fonts + // '$family-primary': 'metroclean, Arial, sans-serif', + // '$subtitle-family': 'metroclean, Arial, sans-serif', + // '$title-family': 'metroclean, Arial, sans-serif', + // '$weight-normal': '600', // TODO Must be work with 400 (normal) - $primary: '#111', - '$button-background-color': '#4958f5', - '$button-border-width': '2px', - '$button-color': '#dbd', - $danger: '#aa1e02', - '$footer-background-color': '#000', - '$footer-padding': '10px', - '$navbar-background-color': '#000', - '$navbar-dropdown-arrow': '#fff', - '$navbar-height': '2.5rem', - '$navbar-item-active-color': '#fff', - '$navbar-item-color': 'gray', - '$navbar-item-hover-color': '#fff', - '$navbar-item-hover-background-color': '#000', - '$navbar-item-img-max-height': '4rem', - '$section-padding': '0.5rem 1.5rem', - '$size-7': '0.875em', + // $primary: '#111', + // '$button-background-color': '#4958f5', + // '$button-border-width': '2px', + // '$button-color': '#dbd', + // $danger: '#aa1e02', + // '$footer-background-color': '#000', + // '$footer-padding': '10px', + // '$navbar-background-color': '#000', + // '$navbar-dropdown-arrow': '#fff', + // '$navbar-height': '2.5rem', + // '$navbar-item-active-color': '#fff', + // '$navbar-item-color': 'gray', + // '$navbar-item-hover-color': '#fff', + // '$navbar-item-hover-background-color': '#000', + // '$navbar-item-img-max-height': '4rem', + // '$section-padding': '0.5rem 1.5rem', + // '$size-7': '0.875em', } export default variables