From b2b21ca9dde1d31aaf19d8e3aa1f0372916d4af1 Mon Sep 17 00:00:00 2001 From: Cagatay Civici Date: Tue, 12 Nov 2024 12:18:07 +0300 Subject: [PATCH] Use a custom field to enter tokens --- .../assets/styles/layout/_designer.scss | 22 +++++++ .../showcase/assets/styles/layout/layout.scss | 1 + .../components/layout/AppDesigner.vue | 6 +- .../layout/designer/DesignColorPalette.vue | 4 +- .../layout/designer/DesignTokenField.vue | 39 ++++++++++++ .../designer/primitive/DesignColors.vue | 22 +++++++ .../designer/semantic/DesignFormField.vue | 42 +++++-------- .../designer/semantic/DesignGeneral.vue | 5 +- .../layout/designer/semantic/DesignList.vue | 21 +++---- .../designer/semantic/DesignNavigation.vue | 24 +++----- .../designer/semantic/DesignOverlay.vue | 27 +++------ .../semantic/colorscheme/DesignCSCommon.vue | 59 +++++++------------ .../colorscheme/DesignCSFormField.vue | 57 ++++++------------ .../semantic/colorscheme/DesignCSList.vue | 30 ++++------ .../colorscheme/DesignCSNavigation.vue | 39 ++++-------- .../semantic/colorscheme/DesignCSOverlay.vue | 27 +++------ 16 files changed, 200 insertions(+), 225 deletions(-) create mode 100644 apps/showcase/assets/styles/layout/_designer.scss create mode 100644 apps/showcase/components/layout/designer/DesignTokenField.vue diff --git a/apps/showcase/assets/styles/layout/_designer.scss b/apps/showcase/assets/styles/layout/_designer.scss new file mode 100644 index 000000000..460ff1a51 --- /dev/null +++ b/apps/showcase/assets/styles/layout/_designer.scss @@ -0,0 +1,22 @@ +.designer { + [type='color'] { + margin-top: -4px; + border: 0 none; + padding: 0; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + width: 28px; + height: 28px; + background-color: transparent; + border: none; + cursor: pointer; + } + + [type='color']::-webkit-color-swatch { + border-radius: 4px; + width: 24px; + height: 24px; + border: 0 none; + } +} \ No newline at end of file diff --git a/apps/showcase/assets/styles/layout/layout.scss b/apps/showcase/assets/styles/layout/layout.scss index eb9938455..d15826645 100644 --- a/apps/showcase/assets/styles/layout/layout.scss +++ b/apps/showcase/assets/styles/layout/layout.scss @@ -5,6 +5,7 @@ @import './_core'; @import './_glow'; @import './_topbar'; +@import './_designer'; @import './_sidebar'; @import './_content'; @import './_news'; diff --git a/apps/showcase/components/layout/AppDesigner.vue b/apps/showcase/components/layout/AppDesigner.vue index 87e948308..931600def 100644 --- a/apps/showcase/components/layout/AppDesigner.vue +++ b/apps/showcase/components/layout/AppDesigner.vue @@ -1,5 +1,5 @@