From a9aecfd3f8c56813ca1f11582db0fa51faa4832c Mon Sep 17 00:00:00 2001 From: Cagatay Civici Date: Wed, 13 Nov 2024 02:14:58 +0300 Subject: [PATCH] Infra to dynamic autocomplete tokens --- .../components/layout/AppDesigner.vue | 10 ++++- .../layout/designer/DesignTokenField.vue | 43 +------------------ 2 files changed, 10 insertions(+), 43 deletions(-) diff --git a/apps/showcase/components/layout/AppDesigner.vue b/apps/showcase/components/layout/AppDesigner.vue index be7daef78..f485ea1d0 100644 --- a/apps/showcase/components/layout/AppDesigner.vue +++ b/apps/showcase/components/layout/AppDesigner.vue @@ -160,7 +160,8 @@ const presets = { export default { provide() { return { - $preset: computed(() => this.preset) + $preset: computed(() => this.preset), + $acTokens: computed(() => this.acTokens) }; }, data() { @@ -175,11 +176,13 @@ export default { { label: 'Lara', value: 'Lara' }, { label: 'Nora', value: 'Nora' } ], - customTokens: [] + customTokens: [], + acTokens: [] }; }, mounted() { this.replaceColorPalette(); + this.generateACTokens(); }, methods: { apply() { @@ -306,6 +309,9 @@ app.mount("#app"); } else { return name; } + }, + generateACTokens() { + //@TODO: parse preset to generate tokens } } }; diff --git a/apps/showcase/components/layout/designer/DesignTokenField.vue b/apps/showcase/components/layout/designer/DesignTokenField.vue index 6aeab64b0..65e15d206 100644 --- a/apps/showcase/components/layout/designer/DesignTokenField.vue +++ b/apps/showcase/components/layout/designer/DesignTokenField.vue @@ -26,46 +26,6 @@