iryx-ui 0.18.4 → 0.18.5

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.
@@ -40,7 +40,13 @@ var M = /*@__PURE__*/ l({
40
40
  };
41
41
  }
42
42
  }
43
- let L = (e) => k(e, "hex"), R = p(I(N.modelValue)), z = (e) => e.s === 0 || e.b === 0;
43
+ let L = (e) => k(e, "hex"), R = p(I(N.modelValue)), z = (e) => e.s === 0 || e.b === 0, B = r(() => {
44
+ try {
45
+ return j(N.modelValue), N.modelValue;
46
+ } catch {
47
+ return L(R.value);
48
+ }
49
+ });
44
50
  g(() => N.modelValue, (e) => {
45
51
  if (L(R.value) === e) return;
46
52
  let t = I(e);
@@ -49,48 +55,48 @@ var M = /*@__PURE__*/ l({
49
55
  h: R.value.h
50
56
  } : t;
51
57
  });
52
- function B(e) {
58
+ function V(e) {
53
59
  R.value = e, F(L(e));
54
60
  }
55
- function V(e) {
56
- return B({
61
+ function H(e) {
62
+ return V({
57
63
  ...A(e),
58
64
  h: R.value.h,
59
65
  alpha: R.value.alpha
60
66
  });
61
67
  }
62
- function H(e) {
63
- return B({
68
+ function U(e) {
69
+ return V({
64
70
  ...R.value,
65
71
  h: A(e).h
66
72
  });
67
73
  }
68
- function U(e) {
69
- return B({
74
+ function W(e) {
75
+ return V({
70
76
  ...R.value,
71
77
  alpha: A(e).alpha
72
78
  });
73
79
  }
74
- let W = e(), G = r(() => N.unstyled ?? W.unstyled), K = r(() => t());
75
- function q(e, t) {
80
+ let G = e(), K = r(() => N.unstyled ?? G.unstyled), q = r(() => t());
81
+ function J(e, t) {
76
82
  let n = [N.ui?.[e], t].filter(Boolean).join(" ");
77
- return G.value ? n : K.value[e]({ class: n });
83
+ return K.value ? n : q.value[e]({ class: n });
78
84
  }
79
- return (e, t) => (f(), o("div", { class: u(q("root", N.class)) }, [
85
+ return (e, t) => (f(), o("div", { class: u(J("root", N.class)) }, [
80
86
  c(h(y), {
81
87
  "color-space": "hsb",
82
88
  "x-channel": "saturation",
83
89
  "y-channel": "brightness",
84
90
  "model-value": R.value,
85
91
  disabled: N.disabled,
86
- class: u(q("area")),
87
- "onUpdate:color": V
92
+ class: u(J("area")),
93
+ "onUpdate:color": H
88
94
  }, {
89
95
  default: _(({ style: e }) => [c(h(v), {
90
96
  class: "size-full rounded-[inherit]",
91
97
  style: d(e)
92
98
  }, {
93
- default: _(() => [c(h(b), { class: u(q("thumb")) }, null, 8, ["class"])]),
99
+ default: _(() => [c(h(b), { class: u(J("thumb")) }, null, 8, ["class"])]),
94
100
  _: 1
95
101
  }, 8, ["style"])]),
96
102
  _: 1
@@ -104,10 +110,10 @@ var M = /*@__PURE__*/ l({
104
110
  channel: "hue",
105
111
  "model-value": R.value,
106
112
  disabled: N.disabled,
107
- class: u(q("slider")),
108
- "onUpdate:color": H
113
+ class: u(J("slider")),
114
+ "onUpdate:color": U
109
115
  }, {
110
- default: _(() => [c(h(T), { class: u(q("track")) }, null, 8, ["class"]), c(h(w), { class: u([q("thumb"), q("sliderThumb")]) }, null, 8, ["class"])]),
116
+ default: _(() => [c(h(T), { class: u(J("track")) }, null, 8, ["class"]), c(h(w), { class: u([J("thumb"), J("sliderThumb")]) }, null, 8, ["class"])]),
111
117
  _: 1
112
118
  }, 8, [
113
119
  "model-value",
@@ -120,13 +126,13 @@ var M = /*@__PURE__*/ l({
120
126
  channel: "alpha",
121
127
  "model-value": R.value,
122
128
  disabled: N.disabled,
123
- class: u(q("slider")),
124
- "onUpdate:color": U
129
+ class: u(J("slider")),
130
+ "onUpdate:color": W
125
131
  }, {
126
132
  default: _(() => [
127
- s("span", { class: u(q("checkerboard")) }, null, 2),
128
- c(h(T), { class: u(q("track")) }, null, 8, ["class"]),
129
- c(h(w), { class: u([q("thumb"), q("sliderThumb")]) }, null, 8, ["class"])
133
+ s("span", { class: u(J("checkerboard")) }, null, 2),
134
+ c(h(T), { class: u(J("track")) }, null, 8, ["class"]),
135
+ c(h(w), { class: u([J("thumb"), J("sliderThumb")]) }, null, 8, ["class"])
130
136
  ]),
131
137
  _: 1
132
138
  }, 8, [
@@ -136,17 +142,17 @@ var M = /*@__PURE__*/ l({
136
142
  ])) : a("", !0),
137
143
  N.hideField ? a("", !0) : (f(), i(h(S), {
138
144
  key: 1,
139
- "model-value": N.modelValue,
145
+ "model-value": B.value,
140
146
  disabled: N.disabled,
141
- class: u(q("field")),
147
+ class: u(J("field")),
142
148
  "onUpdate:modelValue": F
143
149
  }, {
144
- default: _(() => [s("span", { class: u(q("preview")) }, [s("span", { class: u(q("checkerboard", "rounded-none")) }, null, 2), s("span", {
150
+ default: _(() => [s("span", { class: u(J("preview")) }, [s("span", { class: u(J("checkerboard", "rounded-none")) }, null, 2), s("span", {
145
151
  class: "absolute inset-0",
146
- style: d({ background: N.modelValue })
152
+ style: d({ background: B.value })
147
153
  }, null, 4)], 2), c(h(x), {
148
154
  "aria-label": N.fieldLabel,
149
- class: u(q("input"))
155
+ class: u(J("input"))
150
156
  }, null, 8, ["aria-label", "class"])]),
151
157
  _: 1
152
158
  }, 8, [
@@ -156,14 +162,14 @@ var M = /*@__PURE__*/ l({
156
162
  ])),
157
163
  N.swatches?.length ? (f(), i(h(O), {
158
164
  key: 2,
159
- "model-value": N.modelValue,
160
- class: u(q("swatches")),
161
- "onUpdate:modelValue": t[0] ||= (e) => F(String(e))
165
+ "model-value": B.value,
166
+ class: u(J("swatches")),
167
+ "onUpdate:modelValue": t[0] ||= (e) => e && F(String(e))
162
168
  }, {
163
169
  default: _(() => [(f(!0), o(n, null, m(N.swatches, (e) => (f(), i(h(E), {
164
170
  key: e,
165
171
  value: e,
166
- class: u(q("swatch"))
172
+ class: u(J("swatch"))
167
173
  }, {
168
174
  default: _(() => [c(h(D), { class: "size-full rounded-[inherit] bg-[var(--reka-color-swatch-color)]" })]),
169
175
  _: 1
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "iryx-ui",
3
3
  "type": "module",
4
- "version": "0.18.4",
4
+ "version": "0.18.5",
5
5
  "description": "A Vue 3 component library built on Reka UI and Tailwind CSS v4.",
6
6
  "author": "therok1",
7
7
  "license": "MIT",