Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(VColorInput): add new component #20623

Open
wants to merge 35 commits into
base: dev
Choose a base branch
from

Conversation

webdevnerdstuff
Copy link
Contributor

@webdevnerdstuff webdevnerdstuff commented Oct 28, 2024

Description

Adding a Color Input field

Markup:

<template>
  <v-app>
    <div>
      <v-color-input
        v-model="displayColor"
        v-bind="colorInputProps"
      />
    </div>
  </v-app>
</template>

<script setup lang="ts">
  import { ref } from 'vue'
  import { VColorInput } from '../src/components/VColorInput'

  const displayColor = ref<string | undefined>(undefined)

  const colorPickerProps = {
    // border: 'xl', // ?
    // canvasHeight: '400px', // *
    // dotSize: 50, // *
    // elevation: 10, // *
    // hideCanvas: true, // *
    // hideInputs: true,
    // hideSliders: true,
    mode: 'hex', // *
    modes: ['rgb', 'hsl', 'hex'], // *
    // showSwatches: true, // *
    // swatches: [ // *
    // ['#FF0000', '#AA0000', '#550000'],
    // ['#FFFF00', '#AAAA00', '#555500'],
    // ['#00FF00', '#00AA00', '#005500'],
    // ['#00FFFF', '#00AAAA', '#005555'],
    // ['#0000FF', '#0000AA', '#000055'],
    // ],
    // swatchesMaxHeight: 10, // *
    // tag: 'section', // *
  }

  const textFieldProps = {
    // active: true, // *
    // appendIcon: '$vuetify', // *
    // appendInnerIcon: '$vuetify', // *
    // autoFocus: true, // *
    // baseColor: 'error', // *
    // bgColor: 'warning', // *
    // centerAffix: true, // ?
    // clearable: true, // *
    // clearIcon: '$vuetify', // *
    // colorPip: false, // *
    color: 'primary', // *
    // counter: true, // *
    // counterValue: 1100, // *
    // density: 'compact', // *
    // direction: 'vertical', // *
    // dirty: true,
    // disabled: true, // *
    // error: true, // *
    // errorMessages: ['error 1', 'error 2'], // *
    // flat: true, // ?
    // focused: true, // *
    // hideSpinButtons: true, // *
    // hint: 'foobar hint', // *
    label: 'Color', // ?
    // loading: true, // *
    // location: 'tbd', // ?
    // maxErrors: 2, // *
    // messages: ['message', 'message 2'], // *
    // persistentClear: true, // *
    // persistentHint: true, // *
    // persistentPlaceholder: true, // ?
    // placeholder: 'foobar placeholder', // *
    // persistentCounter: true, // *
    // prefix: 'prefix', // *
    // prependIcon: '$vuetify', // *
    // prependInnerIcon: null, // *
    // readonly: true, // *
    // readonlyInput: true, // *
    // reverse: true, // *
    // role: 'foobar role', // *
    // rules: [(v: string) => !!v || 'Required'], // *
    // singleLine: false, // *
    // suffix: 'suffix', // *
    // title: 'foobar title', // *
    // type: 'text', // *
    // validateOn: 'input', // ?
    // variant: 'outlined', // *
  }

  const sharedProps = {
  // rounded: 'pill', // *
  // tile: true, // *
  // width: '500px', // *
  // theme: 'dark', // *
  }

  const colorInputProps = {
    ...colorPickerProps,
    ...textFieldProps,
    ...sharedProps,
  // maxWidth: '100px', // ? * VTF, ? VCP uses width
  // minWidth: '1000px', // ? * VTF, ? VCP uses width
  }

</script>

<style scoped></style>

```vue

@MajesticPotatoe MajesticPotatoe added the T: feature A new feature label Oct 28, 2024
@MajesticPotatoe MajesticPotatoe changed the title feat/color input feat(VColorInput): add new component Oct 29, 2024
@MajesticPotatoe MajesticPotatoe added the C: New Component This issue would need a new component to be developed. label Oct 29, 2024
@webdevnerdstuff webdevnerdstuff marked this pull request as ready for review November 24, 2024 00:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: New Component This issue would need a new component to be developed. T: feature A new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.