@orchidui/dashboard 1.8.1-83 → 1.8.1-86

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orchidui/dashboard",
3
3
  "description": "Orchid Dashboard UI , Dashboard Ui Library Vue 3 tailwind css",
4
- "version": "1.8.1-83",
4
+ "version": "1.8.1-86",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "build": "vite build"
@@ -1,128 +0,0 @@
1
- import { ref as r, computed as x, openBlock as u, createBlock as p, unref as s, normalizeClass as O, withCtx as i, createVNode as h, createCommentVNode as B, createSlots as F, renderSlot as k, createElementBlock as U, normalizeStyle as E } from "vue";
2
- import { ColorPickerPopup as L } from "./index.js";
3
- import { BaseInput as P, Dropdown as N, Input as $, Icon as D } from "@orchidui/core";
4
- const z = { key: 1 }, X = {
5
- __name: "OcColorPicker",
6
- props: {
7
- modelValue: {
8
- type: String,
9
- default: ""
10
- },
11
- variant: {
12
- type: String,
13
- default: "solid"
14
- },
15
- hideOpacity: Boolean,
16
- hideInputColor: Boolean,
17
- presetColors: {
18
- type: Array
19
- },
20
- placement: {
21
- type: String,
22
- default: "auto"
23
- }
24
- },
25
- emits: ["update:model-value"],
26
- setup(a, { emit: C }) {
27
- const m = a, v = C, d = r(!1), o = r(m.modelValue), f = (e) => {
28
- e && (o.value = e, v("update:model-value", e));
29
- }, S = x(() => m.variant === "gradient" ? {
30
- class: "w-[20px] h-[20px] hide-svg-icon",
31
- style: {
32
- background: o.value
33
- }
34
- } : {
35
- style: {
36
- color: o.value
37
- }
38
- }), y = r(), l = r([]), c = () => {
39
- l.value.length > 8 && (l.value = l.value.filter((e, n) => n < 8)), localStorage.setItem("ck-cp-local-color-list", JSON.stringify(l.value));
40
- };
41
- let g = localStorage.getItem("ck-cp-local-color-list");
42
- g && (l.value = [...new Set(JSON.parse(g))], c());
43
- const w = (e) => {
44
- if (!e && o.value)
45
- if (l.value.find((t) => t === o.value))
46
- l.value = [
47
- o.value,
48
- ...l.value.filter((t) => t !== o.value)
49
- ], c();
50
- else {
51
- l.value.length >= 9 && l.value.pop();
52
- let t = o.value;
53
- l.value.unshift(t), c();
54
- }
55
- }, V = r(!1), I = (e) => {
56
- o.value = e, v("update:model-value", e), d.value = !1;
57
- };
58
- return (e, n) => (u(), p(s(P), {
59
- class: O(a.hideInputColor ? "w-[40px]" : ""),
60
- onClick: n[1] || (n[1] = () => {
61
- var t;
62
- return (t = y.value) == null ? void 0 : t.toggleDropdown();
63
- })
64
- }, {
65
- default: i(() => [
66
- h(s(N), {
67
- ref_key: "dropdownRef",
68
- ref: y,
69
- modelValue: d.value,
70
- "onUpdate:modelValue": [
71
- n[0] || (n[0] = (t) => d.value = t),
72
- w
73
- ],
74
- "max-menu-height": 800,
75
- placement: a.placement,
76
- "popper-options": {
77
- strategy: "fixed"
78
- }
79
- }, {
80
- menu: i(() => [
81
- V.value ? B("", !0) : (u(), p(s(L), {
82
- key: 0,
83
- variant: a.variant,
84
- "show-alpha": !a.hideOpacity,
85
- type: a.hideOpacity ? "HEX" : "HEX8",
86
- "model-value": a.modelValue,
87
- "last-used-colors": l.value,
88
- "preset-colors": a.presetColors,
89
- "onUpdate:modelValue": f,
90
- onLastUsedPick: I
91
- }, null, 8, ["variant", "show-alpha", "type", "model-value", "last-used-colors", "preset-colors"]))
92
- ]),
93
- default: i(() => [
94
- a.hideInputColor ? (u(), U("div", z, [
95
- k(e.$slots, "picker-icon", {}, () => [
96
- h(s(D), {
97
- class: "cursor-pointer",
98
- style: E(`color: ${o.value}`),
99
- name: "drop"
100
- }, null, 8, ["style"])
101
- ])
102
- ])) : (u(), p(s($), {
103
- key: 0,
104
- "model-value": o.value,
105
- icon: "drop",
106
- "icon-props": S.value,
107
- placeholder: "#FFFFFF",
108
- "onUpdate:modelValue": f
109
- }, F({ _: 2 }, [
110
- e.$slots.leading ? {
111
- name: "leading",
112
- fn: i(() => [
113
- k(e.$slots, "leading")
114
- ]),
115
- key: "0"
116
- } : void 0
117
- ]), 1032, ["model-value", "icon-props"]))
118
- ]),
119
- _: 3
120
- }, 8, ["modelValue", "placement"])
121
- ]),
122
- _: 3
123
- }, 8, ["class"]));
124
- }
125
- };
126
- export {
127
- X as default
128
- };