primevue-mirror/apps/showcase/components/layout/designer/semantic/DesignGeneral.vue

63 lines
2.7 KiB
Vue
Raw Normal View History

2024-11-10 19:16:58 +00:00
<template>
<Fieldset legend="General" :toggleable="true">
<section class="flex justify-between items-center mb-4">
<div class="flex gap-2 items-center">
<span class="text-sm">Primary</span>
2024-11-14 09:57:46 +00:00
<input :value="$preset.semantic.primary['500']" @input="onPrimaryColorChange($event)" type="color" />
2024-11-10 19:16:58 +00:00
</div>
<DesignColorPalette :value="$preset.semantic.primary" />
2024-11-10 19:16:58 +00:00
</section>
<section class="grid grid-cols-4 mb-3 gap-2">
<div class="flex flex-col gap-1">
2024-11-12 13:44:52 +00:00
<DesignTokenField v-model="$preset.semantic.transitionDuration" label="Transition Duration" />
2024-11-10 19:16:58 +00:00
</div>
<div class="flex flex-col gap-1">
2024-11-12 13:44:52 +00:00
<DesignTokenField v-model="$preset.semantic.disabledOpacity" label="Disabled Opacity" />
2024-11-10 19:16:58 +00:00
</div>
<div class="flex flex-col gap-1">
2024-11-12 13:44:52 +00:00
<DesignTokenField v-model="$preset.semantic.iconSize" label="Icon Size" />
2024-11-10 19:16:58 +00:00
</div>
<div class="flex flex-col gap-1">
2024-11-12 13:44:52 +00:00
<DesignTokenField v-model="$preset.semantic.anchorGutter" label="Anchor Gutter" />
2024-11-10 19:16:58 +00:00
</div>
<div class="flex flex-col gap-1">
2024-11-12 13:44:52 +00:00
<DesignTokenField v-model="$preset.semantic.content.borderRadius" label="Border Radius" />
2024-11-10 19:16:58 +00:00
</div>
<div class="flex flex-col gap-1">
2024-11-12 13:44:52 +00:00
<DesignTokenField v-model="$preset.semantic.mask.transitionDuration" label="Mask Transition Dur." />
2024-11-10 19:16:58 +00:00
</div>
<div class="flex flex-col gap-1"></div>
<div class="flex flex-col gap-1"></div>
</section>
<div class="text-sm mb-1 font-semibold text-surface-950 dark:text-surface-0">Focus Ring</div>
<section class="grid grid-cols-4 gap-2">
<div class="flex flex-col gap-1">
2024-11-12 13:44:52 +00:00
<DesignTokenField v-model="$preset.semantic.focusRing.width" label="Width" />
2024-11-10 19:16:58 +00:00
</div>
<div class="flex flex-col gap-1">
2024-11-12 13:44:52 +00:00
<DesignTokenField v-model="$preset.semantic.focusRing.style" label="Style" />
2024-11-10 19:16:58 +00:00
</div>
<div class="flex flex-col gap-1">
2024-11-12 09:18:07 +00:00
<DesignTokenField v-model="$preset.semantic.focusRing.color" label="Color" type="color" />
2024-11-10 19:16:58 +00:00
</div>
<div class="flex flex-col gap-1">
2024-11-12 13:44:52 +00:00
<DesignTokenField v-model="$preset.semantic.focusRing.offset" label="Offset" />
2024-11-10 19:16:58 +00:00
</div>
</section>
</Fieldset>
</template>
<script>
2024-11-14 09:57:46 +00:00
import { palette } from '@primevue/themes';
2024-11-10 19:16:58 +00:00
export default {
inject: ['$preset'],
methods: {
onPrimaryColorChange(event) {
this.$preset.semantic.primary = palette(event.target.value);
}
}
};
</script>