diff --git a/packages/buefy-next/rollup.config.mjs b/packages/buefy-next/rollup.config.mjs index 29cfdb209..5ded1f0df 100644 --- a/packages/buefy-next/rollup.config.mjs +++ b/packages/buefy-next/rollup.config.mjs @@ -31,7 +31,6 @@ const components = fs const JS_COMPONENTS = [ 'clockpicker', - 'colorpicker', 'datepicker', 'datetimepicker', 'numberinput', diff --git a/packages/buefy-next/src/components/colorpicker/Colorpicker.spec.js b/packages/buefy-next/src/components/colorpicker/Colorpicker.spec.ts similarity index 83% rename from packages/buefy-next/src/components/colorpicker/Colorpicker.spec.js rename to packages/buefy-next/src/components/colorpicker/Colorpicker.spec.ts index 7abc6a308..e81b3c103 100644 --- a/packages/buefy-next/src/components/colorpicker/Colorpicker.spec.js +++ b/packages/buefy-next/src/components/colorpicker/Colorpicker.spec.ts @@ -1,5 +1,6 @@ +import { describe, expect, it } from 'vitest' import { shallowMount } from '@vue/test-utils' -import BColorpicker from '@components/colorpicker/Colorpicker' +import BColorpicker from '@components/colorpicker/Colorpicker.vue' describe('BColorpicker', () => { it('render correctly', () => { diff --git a/packages/buefy-next/src/components/colorpicker/Colorpicker.vue b/packages/buefy-next/src/components/colorpicker/Colorpicker.vue index 3548e3f02..1b352b252 100644 --- a/packages/buefy-next/src/components/colorpicker/Colorpicker.vue +++ b/packages/buefy-next/src/components/colorpicker/Colorpicker.vue @@ -98,25 +98,46 @@ - diff --git a/packages/buefy-next/src/components/colorpicker/ColorpickerAlphaSlider.spec.js b/packages/buefy-next/src/components/colorpicker/ColorpickerAlphaSlider.spec.ts similarity index 86% rename from packages/buefy-next/src/components/colorpicker/ColorpickerAlphaSlider.spec.js rename to packages/buefy-next/src/components/colorpicker/ColorpickerAlphaSlider.spec.ts index 91b8746f2..c92ff18c0 100644 --- a/packages/buefy-next/src/components/colorpicker/ColorpickerAlphaSlider.spec.js +++ b/packages/buefy-next/src/components/colorpicker/ColorpickerAlphaSlider.spec.ts @@ -1,6 +1,7 @@ +import { describe, expect, it } from 'vitest' import { shallowMount } from '@vue/test-utils' import Color from '@utils/color' -import BColorpickerAlphaSlider from '@components/colorpicker/ColorpickerAlphaSlider' +import BColorpickerAlphaSlider from '@components/colorpicker/ColorpickerAlphaSlider.vue' describe('BColorpickerAlphaSlider', () => { it('render correctly', () => { diff --git a/packages/buefy-next/src/components/colorpicker/ColorpickerAlphaSlider.vue b/packages/buefy-next/src/components/colorpicker/ColorpickerAlphaSlider.vue index c814f04df..4c115b616 100644 --- a/packages/buefy-next/src/components/colorpicker/ColorpickerAlphaSlider.vue +++ b/packages/buefy-next/src/components/colorpicker/ColorpickerAlphaSlider.vue @@ -25,23 +25,28 @@ - diff --git a/packages/buefy-next/src/components/colorpicker/ColorpickerHSLRepresentationSquare.spec.js b/packages/buefy-next/src/components/colorpicker/ColorpickerHSLRepresentationSquare.spec.ts similarity index 79% rename from packages/buefy-next/src/components/colorpicker/ColorpickerHSLRepresentationSquare.spec.js rename to packages/buefy-next/src/components/colorpicker/ColorpickerHSLRepresentationSquare.spec.ts index 8fe30ebbd..c33313f9b 100644 --- a/packages/buefy-next/src/components/colorpicker/ColorpickerHSLRepresentationSquare.spec.js +++ b/packages/buefy-next/src/components/colorpicker/ColorpickerHSLRepresentationSquare.spec.ts @@ -1,8 +1,9 @@ +import { beforeEach, describe, expect, it } from 'vitest' import { shallowMount } from '@vue/test-utils' import Color from '@utils/color' -import BColorpickerHSLRepresentationSquare from '@components/colorpicker/ColorpickerHSLRepresentationSquare' +import BColorpickerHSLRepresentationSquare from '@components/colorpicker/ColorpickerHSLRepresentationSquare.vue' -let defaultProps +let defaultProps: () => { value: Color } describe('BColorpickerHSLRepresentationSquare', () => { beforeEach(() => { diff --git a/packages/buefy-next/src/components/colorpicker/ColorpickerHSLRepresentationSquare.vue b/packages/buefy-next/src/components/colorpicker/ColorpickerHSLRepresentationSquare.vue index ff9c92d99..fb5726a04 100644 --- a/packages/buefy-next/src/components/colorpicker/ColorpickerHSLRepresentationSquare.vue +++ b/packages/buefy-next/src/components/colorpicker/ColorpickerHSLRepresentationSquare.vue @@ -44,18 +44,25 @@ - diff --git a/packages/buefy-next/src/components/colorpicker/ColorpickerHSLRepresentationTriangle.spec.js b/packages/buefy-next/src/components/colorpicker/ColorpickerHSLRepresentationTriangle.spec.ts similarity index 79% rename from packages/buefy-next/src/components/colorpicker/ColorpickerHSLRepresentationTriangle.spec.js rename to packages/buefy-next/src/components/colorpicker/ColorpickerHSLRepresentationTriangle.spec.ts index 3f6bf7d05..e54dc972d 100644 --- a/packages/buefy-next/src/components/colorpicker/ColorpickerHSLRepresentationTriangle.spec.js +++ b/packages/buefy-next/src/components/colorpicker/ColorpickerHSLRepresentationTriangle.spec.ts @@ -1,8 +1,9 @@ +import { beforeEach, describe, expect, it } from 'vitest' import { shallowMount } from '@vue/test-utils' import Color from '@utils/color' -import BColorpickerHSLRepresentationTriangle from '@components/colorpicker/ColorpickerHSLRepresentationTriangle' +import BColorpickerHSLRepresentationTriangle from '@components/colorpicker/ColorpickerHSLRepresentationTriangle.vue' -let defaultProps +let defaultProps: () => { value: Color } describe('BColorpickerHSLRepresentationTriangle', () => { beforeEach(() => { diff --git a/packages/buefy-next/src/components/colorpicker/ColorpickerHSLRepresentationTriangle.vue b/packages/buefy-next/src/components/colorpicker/ColorpickerHSLRepresentationTriangle.vue index 7e7b0439d..5897ffbe6 100644 --- a/packages/buefy-next/src/components/colorpicker/ColorpickerHSLRepresentationTriangle.vue +++ b/packages/buefy-next/src/components/colorpicker/ColorpickerHSLRepresentationTriangle.vue @@ -115,20 +115,25 @@ - diff --git a/packages/buefy-next/src/components/colorpicker/__snapshots__/Colorpicker.spec.js.snap b/packages/buefy-next/src/components/colorpicker/__snapshots__/Colorpicker.spec.js.snap deleted file mode 100644 index 3d9c806bb..000000000 --- a/packages/buefy-next/src/components/colorpicker/__snapshots__/Colorpicker.spec.js.snap +++ /dev/null @@ -1,77 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`BColorpicker render correctly 1`] = ` -
- -
-`; diff --git a/packages/buefy-next/src/components/colorpicker/__snapshots__/Colorpicker.spec.ts.snap b/packages/buefy-next/src/components/colorpicker/__snapshots__/Colorpicker.spec.ts.snap new file mode 100644 index 000000000..3e8d5f517 --- /dev/null +++ b/packages/buefy-next/src/components/colorpicker/__snapshots__/Colorpicker.spec.ts.snap @@ -0,0 +1,77 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`BColorpicker > render correctly 1`] = ` +"
+
+
+ +
+
+ +
+
+
+
+
+ +
+
+ +
+
+ +
+
+
+
+
+
" +`; diff --git a/packages/buefy-next/src/components/colorpicker/__snapshots__/ColorpickerAlphaSlider.spec.js.snap b/packages/buefy-next/src/components/colorpicker/__snapshots__/ColorpickerAlphaSlider.spec.js.snap deleted file mode 100644 index 808c06c06..000000000 --- a/packages/buefy-next/src/components/colorpicker/__snapshots__/ColorpickerAlphaSlider.spec.js.snap +++ /dev/null @@ -1,9 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`BColorpickerAlphaSlider render correctly 1`] = ` -
-
- -
-
-`; diff --git a/packages/buefy-next/src/components/colorpicker/__snapshots__/ColorpickerAlphaSlider.spec.ts.snap b/packages/buefy-next/src/components/colorpicker/__snapshots__/ColorpickerAlphaSlider.spec.ts.snap new file mode 100644 index 000000000..647ee5227 --- /dev/null +++ b/packages/buefy-next/src/components/colorpicker/__snapshots__/ColorpickerAlphaSlider.spec.ts.snap @@ -0,0 +1,9 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`BColorpickerAlphaSlider > render correctly 1`] = ` +"
+
+ +
+
" +`; diff --git a/packages/buefy-next/src/components/colorpicker/__snapshots__/ColorpickerHSLRepresentationSquare.spec.js.snap b/packages/buefy-next/src/components/colorpicker/__snapshots__/ColorpickerHSLRepresentationSquare.spec.js.snap deleted file mode 100644 index 146c82bc4..000000000 --- a/packages/buefy-next/src/components/colorpicker/__snapshots__/ColorpickerHSLRepresentationSquare.spec.js.snap +++ /dev/null @@ -1,12 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`BColorpickerHSLRepresentationSquare render correctly 1`] = ` -
-
-
-
-
-
-
-
-`; diff --git a/packages/buefy-next/src/components/colorpicker/__snapshots__/ColorpickerHSLRepresentationSquare.spec.ts.snap b/packages/buefy-next/src/components/colorpicker/__snapshots__/ColorpickerHSLRepresentationSquare.spec.ts.snap new file mode 100644 index 000000000..e1a8861b5 --- /dev/null +++ b/packages/buefy-next/src/components/colorpicker/__snapshots__/ColorpickerHSLRepresentationSquare.spec.ts.snap @@ -0,0 +1,12 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`BColorpickerHSLRepresentationSquare > render correctly 1`] = ` +"
+
+
+
+
+
+
+
" +`; diff --git a/packages/buefy-next/src/components/colorpicker/__snapshots__/ColorpickerHSLRepresentationTriangle.spec.js.snap b/packages/buefy-next/src/components/colorpicker/__snapshots__/ColorpickerHSLRepresentationTriangle.spec.js.snap deleted file mode 100644 index 510663aa0..000000000 --- a/packages/buefy-next/src/components/colorpicker/__snapshots__/ColorpickerHSLRepresentationTriangle.spec.js.snap +++ /dev/null @@ -1,36 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`BColorpickerHSLRepresentationTriangle render correctly 1`] = ` - - - - - - - - - - - - - - - - -
-
- - -
-
-
-
- - - - -
-
-
-
-`; diff --git a/packages/buefy-next/src/components/colorpicker/__snapshots__/ColorpickerHSLRepresentationTriangle.spec.ts.snap b/packages/buefy-next/src/components/colorpicker/__snapshots__/ColorpickerHSLRepresentationTriangle.spec.ts.snap new file mode 100644 index 000000000..8adc1b24e --- /dev/null +++ b/packages/buefy-next/src/components/colorpicker/__snapshots__/ColorpickerHSLRepresentationTriangle.spec.ts.snap @@ -0,0 +1,36 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`BColorpickerHSLRepresentationTriangle > render correctly 1`] = ` +" + + + + + + + + + + + + + + + +
+
+ + +
+
+
+
+ + + + +
+
+
+
" +`; diff --git a/packages/buefy-next/src/components/colorpicker/index.js b/packages/buefy-next/src/components/colorpicker/index.ts similarity index 81% rename from packages/buefy-next/src/components/colorpicker/index.js rename to packages/buefy-next/src/components/colorpicker/index.ts index be4f79ab2..9ce155936 100644 --- a/packages/buefy-next/src/components/colorpicker/index.js +++ b/packages/buefy-next/src/components/colorpicker/index.ts @@ -1,9 +1,10 @@ +import type { App } from 'vue' import Colorpicker from './Colorpicker.vue' import { registerComponent } from '../../utils/plugins' const Plugin = { - install(Vue) { + install(Vue: App) { registerComponent(Vue, Colorpicker) } } diff --git a/packages/buefy-next/src/utils/color.spec.js b/packages/buefy-next/src/utils/color.spec.ts similarity index 97% rename from packages/buefy-next/src/utils/color.spec.js rename to packages/buefy-next/src/utils/color.spec.ts index ecc086de4..effe819fc 100644 --- a/packages/buefy-next/src/utils/color.spec.js +++ b/packages/buefy-next/src/utils/color.spec.ts @@ -1,3 +1,4 @@ +import { describe, expect, it } from 'vitest' import Color from '@utils/color' describe('Color', () => { diff --git a/packages/buefy-next/src/utils/color.js b/packages/buefy-next/src/utils/color.ts similarity index 76% rename from packages/buefy-next/src/utils/color.js rename to packages/buefy-next/src/utils/color.ts index 10ad313bd..7d8def072 100644 --- a/packages/buefy-next/src/utils/color.js +++ b/packages/buefy-next/src/utils/color.ts @@ -1,4 +1,21 @@ -export const colorChannels = ['red', 'green', 'blue', 'alpha'] +export const colorChannels = ['red', 'green', 'blue', 'alpha'] as const +export type ColorChannel = typeof colorChannels[number] + +export type Rgba = { + [C in ColorChannel]: number +} +export type Rgb = Omit + +export const hslChannels = ['hue', 'saturation', 'lightness'] as const +export type HslChannel = typeof hslChannels[number] +export type CapitalizedHslChannel = Capitalize + +export type Hsla = { + [C in HslChannel]: number +} +export type Hsl = Omit + +type ChannelTuple = [number, number, number, number] export const colorsNammed = { transparent: '#00000000', @@ -150,7 +167,9 @@ export const colorsNammed = { whitesmoke: '#f5f5f5', yellowgreen: '#9acd32', rebeccapurple: '#663399' -} +} as const + +export type ColorName = keyof typeof colorsNammed export class ColorTypeError extends Error { constructor() { @@ -159,46 +178,91 @@ export class ColorTypeError extends Error { } class Color { - constructor(...args) { + // @ts-expect-error - TypeScript failed to inter the initialization of this property + $channels: Uint8Array + + // Since getters and setters for the color channels, e.g., "alpha", are + // dynamically defined with `Object.defineProperty` in the constructor, we + // cannot write property declarations inside the class body. Instead, we + // augment the `Color` class with an ambient module declared in `color.ts`. + + // eslint-disable-next-line @typescript-eslint/no-explicit-any + constructor(...args: any[]) { if (args.length > 0) { return Color.parse(...args) } this.$channels = new Uint8Array(colorChannels.length) - colorChannels.forEach((channel, index) => { - Object.defineProperty( - this, - channel, - { - get: () => this.$channels[index], - set: (byte) => { - if (!Number.isNaN(byte / 1)) { - this.$channels[index] = Math.min(255, Math.max(0, byte)) - } - }, - enumerable: true, - configurable: true - } - ) - }) - // Required for observability - ;['hue', 'saturation', 'lightness'].forEach((name) => { - const capitalizedName = name.replace(/^./, (m) => m.toUpperCase()) - Object.defineProperty( - this, - name, - { - get: () => this[`get${capitalizedName}`](), - set: (value) => { - if (!Number.isNaN(value / 1)) { - this[`set${capitalizedName}`](value) - } - }, - enumerable: true, - configurable: true - } - ) - }) + } + + get red(): number { + return this.$channels[0] + } + + set red(byte: number) { + if (!Number.isNaN(byte / 1)) { + this.$channels[0] = Math.min(255, Math.max(0, byte)) + } + } + + get green(): number { + return this.$channels[1] + } + + set green(byte: number) { + if (!Number.isNaN(byte / 1)) { + this.$channels[1] = Math.min(255, Math.max(0, byte)) + } + } + + get blue(): number { + return this.$channels[2] + } + + set blue(byte: number) { + if (!Number.isNaN(byte / 1)) { + this.$channels[2] = Math.min(255, Math.max(0, byte)) + } + } + + get alpha(): number { + return this.$channels[3] + } + + set alpha(byte: number) { + if (!Number.isNaN(byte / 1)) { + this.$channels[3] = Math.min(255, Math.max(0, byte)) + } + } + + get hue(): number { + return this.getHue() + } + + set hue(value: number) { + if (!Number.isNaN(value / 1)) { + this.setHue(value) + } + } + + get saturation(): number { + return this.getSaturation() + } + + set saturation(value: number) { + if (!Number.isNaN(value / 1)) { + this.setSaturation(value) + } + } + + get lightness(): number { + return this.getLightness() + } + + set lightness(value: number) { + if (!Number.isNaN(value / 1)) { + this.setLightness(value) + } } getHue() { @@ -225,7 +289,7 @@ class Color { return Math.round(hue % 360) } - setHue(value) { + setHue(value: number) { const color = Color.fromHSL(value, this.saturation, this.lightness, this.alpha / 255) for (let i = 0; i < this.$channels.length; i++) { this.$channels[i] = Number(color.$channels[i]) @@ -242,7 +306,7 @@ class Color { : 0 } - setSaturation(value) { + setSaturation(value: number) { const color = Color.fromHSL(this.hue, value, this.lightness, this.alpha / 255) colorChannels.forEach((_, i) => (this.$channels[i] = color.$channels[i])) } @@ -254,7 +318,7 @@ class Color { return Math.round((max + min) / 2 * 100) / 100 } - setLightness(value) { + setLightness(value: number) { const color = Color.fromHSL(this.hue, this.lightness, value, this.alpha / 255) colorChannels.forEach((_, i) => (this.$channels[i] = color.$channels[i])) } @@ -289,11 +353,12 @@ class Color { } } - get [Symbol.toString]() { + get [Symbol.toStringTag]() { return this.toString('hex') } - static parse(...args) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + static parse(...args: any[]): Color { if (typeof args[0] === 'object') { return Color.parseObject(args[0]) } else if (args.every((arg) => !Number.isNaN(arg / 1))) { @@ -314,8 +379,8 @@ class Color { } else if (typeof args[0] === 'string') { let match = null - if (typeof colorsNammed[args[0].toLowerCase()] === 'string') { - return Color.parseHex(colorsNammed[args[0].toLowerCase()]) + if (typeof colorsNammed[args[0].toLowerCase() as ColorName] === 'string') { + return Color.parseHex(colorsNammed[args[0].toLowerCase() as ColorName]) } else if ((match = args[0].match(/^(#|&h|0x)?(([a-f0-9]{3,4}){1,2})$/i)) !== null) { return Color.parseHex(match[2]) } else if ((match = args[0].match(/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)(\s*,\s*(\d*\.?\d+))?\s*\)$/i)) !== null) { @@ -328,7 +393,7 @@ class Color { : 1 ] - return Color.fromRGB(...channels.map((value) => Number(value))) + return Color.fromRGB(...(channels.map((value) => Number(value)) as ChannelTuple)) } else if ((args[0].match(/^(h(sl|wb)a?|lab|color|cmyk)\(/i))) { throw new Error('Color expression not implemented yet') } @@ -337,7 +402,7 @@ class Color { throw new Error('Invalid color expression') } - static parseObject(object) { + static parseObject(object: unknown) { const color = new Color() if (object === null || typeof object !== 'object') { @@ -348,15 +413,15 @@ class Color { } colorChannels.forEach((channel) => { - if (!Number.isNaN(object[channel])) { - color[channel] = object[channel] + if (!Number.isNaN((object as Rgba)[channel])) { + color[channel] = (object as Rgba)[channel] } }) return color } - static parseHex(hex) { + static parseHex(hex: string) { if (typeof hex !== 'string') { throw new Error('Hex expression must be a string') } @@ -378,10 +443,10 @@ class Color { if (typeof chans[3] === 'number') { chans[3] /= 255 } - return Color.fromRGB(...chans) + return Color.fromRGB(...(chans as ChannelTuple)) } - static parseIndex(value, channels = 3) { + static parseIndex(value: number, channels: number = 3) { const color = new Color() for (let i = 0; i < 4; i++) { @@ -391,7 +456,7 @@ class Color { return color } - static fromRGB(red, green, blue, alpha = 1) { + static fromRGB(red: number, green: number, blue: number, alpha: number = 1) { if ([red, green, blue, alpha].some((arg) => Number.isNaN(arg / 1))) { throw new Error('Invalid arguments') } @@ -405,7 +470,7 @@ class Color { return color } - static fromHSL(hue, saturation, lightness, alpha = 1) { + static fromHSL(hue: number, saturation: number, lightness: number, alpha: number = 1) { if ([hue, saturation, lightness, alpha].some((arg) => Number.isNaN(arg))) { throw new Error('Invalid arguments') } @@ -434,7 +499,7 @@ class Color { return Color.fromRGB((r + m) * 255, (g + m) * 255, (b + m) * 255, alpha) } - static isColor(arg) { + static isColor(arg: unknown): arg is Color { return arg instanceof Color } } diff --git a/packages/docs/src/pages/components/colorpicker/Colorpicker.vue b/packages/docs/src/pages/components/colorpicker/Colorpicker.vue index 757e00192..fd9476d97 100644 --- a/packages/docs/src/pages/components/colorpicker/Colorpicker.vue +++ b/packages/docs/src/pages/components/colorpicker/Colorpicker.vue @@ -15,27 +15,38 @@ - diff --git a/packages/docs/src/pages/components/colorpicker/api/colorpicker.js b/packages/docs/src/pages/components/colorpicker/api/colorpicker.ts similarity index 100% rename from packages/docs/src/pages/components/colorpicker/api/colorpicker.js rename to packages/docs/src/pages/components/colorpicker/api/colorpicker.ts diff --git a/packages/docs/src/pages/components/colorpicker/examples/ExAlpha.vue b/packages/docs/src/pages/components/colorpicker/examples/ExAlpha.vue index 56da327be..b6763bd2d 100644 --- a/packages/docs/src/pages/components/colorpicker/examples/ExAlpha.vue +++ b/packages/docs/src/pages/components/colorpicker/examples/ExAlpha.vue @@ -11,10 +11,16 @@ - diff --git a/packages/docs/src/pages/components/colorpicker/examples/ExFields.vue b/packages/docs/src/pages/components/colorpicker/examples/ExFields.vue index 157011e1d..1fe8037af 100644 --- a/packages/docs/src/pages/components/colorpicker/examples/ExFields.vue +++ b/packages/docs/src/pages/components/colorpicker/examples/ExFields.vue @@ -90,10 +90,17 @@ - diff --git a/packages/docs/src/pages/components/colorpicker/examples/ExFormatter.vue b/packages/docs/src/pages/components/colorpicker/examples/ExFormatter.vue index cee61376e..e223d0c66 100644 --- a/packages/docs/src/pages/components/colorpicker/examples/ExFormatter.vue +++ b/packages/docs/src/pages/components/colorpicker/examples/ExFormatter.vue @@ -21,10 +21,11 @@ - diff --git a/packages/docs/src/pages/components/colorpicker/examples/ExRepresentation.vue b/packages/docs/src/pages/components/colorpicker/examples/ExRepresentation.vue index 9ab775b11..911997a80 100644 --- a/packages/docs/src/pages/components/colorpicker/examples/ExRepresentation.vue +++ b/packages/docs/src/pages/components/colorpicker/examples/ExRepresentation.vue @@ -6,14 +6,15 @@ - diff --git a/packages/docs/src/pages/components/colorpicker/examples/ExSimple.vue b/packages/docs/src/pages/components/colorpicker/examples/ExSimple.vue index 7b5fec330..84e2a3885 100644 --- a/packages/docs/src/pages/components/colorpicker/examples/ExSimple.vue +++ b/packages/docs/src/pages/components/colorpicker/examples/ExSimple.vue @@ -5,3 +5,7 @@ + + diff --git a/packages/docs/src/pages/components/colorpicker/variables/colorpicker.js b/packages/docs/src/pages/components/colorpicker/variables/colorpicker.ts similarity index 100% rename from packages/docs/src/pages/components/colorpicker/variables/colorpicker.js rename to packages/docs/src/pages/components/colorpicker/variables/colorpicker.ts