@ui0/icon 0.1.3 → 0.1.4

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.
@@ -1,5 +1,6 @@
1
1
  @value icon: ic_c2d4;
2
2
  @value canvas: ca_a457;
3
+ @value sized: si_3f5b;
3
4
  @value sizeCustom: si_e681;
4
5
  @value strokeMask: st_39f2;
5
6
  @value shapeStrokeMask: sh_6010;
@@ -1 +1 @@
1
- {"version":3,"file":"icon.vue.d.ts","sourceRoot":"","sources":["../src/icon.vue"],"names":[],"mappings":"AAusBE,OAAO,KAAK,EAA8B,SAAS,EAAE,MAAM,SAAS,CAAA;AAikBtE,QAAA,MAAM,YAAY;;6EAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"icon.vue.d.ts","sourceRoot":"","sources":["../src/icon.vue"],"names":[],"mappings":"AAguBA,OAAO,KAAK,EAA8B,SAAS,EAAE,MAAM,SAAS,CAAA;AA4kBpE,QAAA,MAAM,YAAY;;6EAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
package/dist/index.js CHANGED
@@ -1,18 +1,18 @@
1
- var te = Object.defineProperty;
2
- var ne = (o, s, e) => s in o ? te(o, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[s] = e;
3
- var V = (o, s, e) => ne(o, typeof s != "symbol" ? s + "" : s, e);
4
- import { newErrorForSetupCall as ce, isArray as ie, hyphenate as re } from "@ui0/util";
5
- import { inject as z, getCurrentInstance as ae, h as B, resolveComponent as le, reactive as pe, onScopeDispose as ue, defineComponent as fe, useCssModule as de, useAttrs as he, openBlock as me, createBlock as ge, mergeProps as G, camelize as ve } from "vue";
6
- import { useComponentId as ke } from "@ui0/composable";
7
- const we = Symbol.for("ui0-icon"), X = Symbol("ui0-icon-instance");
8
- function ls() {
9
- const o = z(X, void 0);
1
+ var ne = Object.defineProperty;
2
+ var ce = (o, s, e) => s in o ? ne(o, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[s] = e;
3
+ var z = (o, s, e) => ce(o, typeof s != "symbol" ? s + "" : s, e);
4
+ import { newErrorForSetupCall as ie, isArray as re, hyphenate as ae } from "@ui0/util";
5
+ import { inject as Z, getCurrentInstance as le, h as E, reactive as ue, onScopeDispose as pe, resolveComponent as fe, defineComponent as de, useCssModule as he, useAttrs as me, openBlock as ge, createBlock as ve, mergeProps as G, camelize as ke } from "vue";
6
+ import { useComponentId as we } from "@ui0/composable";
7
+ const ye = Symbol.for("ui0-icon"), Y = Symbol("ui0-icon-instance");
8
+ function ps() {
9
+ const o = Z(Y, void 0);
10
10
  if (o) return o;
11
- const s = ae();
12
- if (!s) throw ce("getIcon");
11
+ const s = le();
12
+ if (!s) throw ie("getIcon");
13
13
  return s.appContext.config.globalProperties.$ui0Icon;
14
14
  }
15
- const ye = {
15
+ const be = {
16
16
  value: "fake",
17
17
  rotate: 0,
18
18
  weight: 400,
@@ -32,32 +32,32 @@ const ye = {
32
32
  guides: !1
33
33
  }
34
34
  };
35
- function be(o, s) {
35
+ function xe(o, s) {
36
36
  const e = [
37
37
  o,
38
38
  s,
39
- ye
40
- ], i = (n) => {
41
- for (const r of e) {
42
- const u = r == null ? void 0 : r[n];
39
+ be
40
+ ], d = (n) => {
41
+ for (const i of e) {
42
+ const u = i == null ? void 0 : i[n];
43
43
  if (u !== void 0) return u;
44
44
  }
45
45
  };
46
46
  return new Proxy({}, {
47
- get: (n, r) => i(r),
47
+ get: (n, i) => d(i),
48
48
  ownKeys: () => [...new Set(e.flatMap((n) => n ? Object.keys(n) : []))],
49
- getOwnPropertyDescriptor: (n, r) => ({
49
+ getOwnPropertyDescriptor: (n, i) => ({
50
50
  enumerable: !0,
51
51
  configurable: !0,
52
- value: i(r)
52
+ value: d(i)
53
53
  })
54
54
  });
55
55
  }
56
- const Q = Symbol("ui0-icon-framework");
57
- function xe() {
58
- return z(Q, {});
56
+ const J = Symbol("ui0-icon-framework");
57
+ function Ie() {
58
+ return Z(J, {});
59
59
  }
60
- const Y = {
60
+ const q = {
61
61
  "ellipse-rect": "M930,602.17c0,12.52,0,25.03-.07,37.55-.06,10.54-.18,21.09-.47,31.63-.62,22.97-1.97,46.14-6.06,68.85-4.14,23.04-10.9,44.49-21.56,65.42-10.47,20.58-24.16,39.41-40.49,55.73-16.33,16.33-35.16,30.01-55.73,40.49-20.94,10.66-42.38,17.42-65.42,21.56-22.71,4.08-45.88,5.43-68.85,6.06-10.54.29-21.08.41-31.63.47-12.52.08-25.03.07-37.55.07h-244.34c-12.52,0-25.03,0-37.55-.07-10.54-.06-21.09-.18-31.63-.47-22.97-.62-46.14-1.97-68.85-6.06-23.04-4.14-44.49-10.9-65.42-21.56-20.58-10.47-39.41-24.16-55.73-40.49-16.33-16.33-30.01-35.16-40.49-55.73-10.66-20.94-17.42-42.38-21.56-65.42-4.08-22.71-5.43-45.88-6.06-68.85-.29-10.54-.41-21.08-.47-31.63-.08-12.52-.07-25.03-.07-37.55v-244.34c0-12.52,0-25.03.07-37.55.06-10.54.18-21.09.47-31.63.62-22.97,1.97-46.14,6.06-68.85,4.14-23.04,10.9-44.49,21.56-65.42,10.47-20.58,24.16-39.41,40.49-55.73,16.33-16.33,35.16-30.01,55.73-40.49,20.94-10.66,42.38-17.42,65.42-21.56,22.71-4.08,45.88-5.43,68.85-6.06,10.54-.29,21.08-.41,31.63-.47,12.52-.08,25.03-.07,37.55-.07h244.34c12.52,0,25.03,0,37.55.07,10.54.06,21.09.18,31.63.47,22.97.62,46.14,1.97,68.85,6.06,23.04,4.14,44.49,10.9,65.42,21.56,20.58,10.47,39.41,24.16,55.73,40.49,16.33,16.33,30.01,35.16,40.49,55.73,10.66,20.94,17.42,42.38,21.56,65.42,4.08,22.71,5.43,45.88,6.06,68.85.29,10.54.41,21.08.47,31.63.08,12.52.07,25.03.07,37.55v244.34Z",
62
62
  shield: "M75,408.8c0-143.9,0-215.8,17-240,17-24.2,84.6-47.4,219.9-93.7l25.8-8.8c70.5-24.1,105.8-36.2,142.3-36.2s71.8,12.1,142.3,36.2l25.8,8.8c135.3,46.3,202.9,69.5,219.9,93.7,17,24.2,17,96.2,17,240v70.9c0,253.7-190.8,376.8-310.4,429.1-32.5,14.2-48.7,21.3-94.6,21.3s-62.1-7.1-94.6-21.3c-119.7-52.3-310.4-175.4-310.4-429.1v-70.9h0Z",
63
63
  pentagon: "M515.9,52.2l114.6,232.2c5.8,11.8,17.1,20,30.1,21.9l256.3,37.2c32.8,4.8,45.9,45.1,22.2,68.2l-185.4,180.8c-9.4,9.2-13.7,22.4-11.5,35.4l43.8,255.2c5.6,32.7-28.7,57.6-58,42.2l-229.2-120.5c-11.7-6.1-25.6-6.1-37.2,0l-229.2,120.5c-29.3,15.4-63.6-9.5-58-42.2l43.8-255.2c2.2-13-2.1-26.2-11.5-35.4L21,411.8c-23.7-23.1-10.6-63.5,22.2-68.2l256.3-37.2c13-1.9,24.3-10.1,30.1-21.9l114.6-232.2c14.7-29.7,57.1-29.7,71.7,0Z",
@@ -65,18 +65,18 @@ const Y = {
65
65
  heptagon: "M462.6,40.8L133.9,199.2c-11,5.3-18.9,15.3-21.6,27.1L31.1,582c-2.7,11.9.1,24.3,7.7,33.8l227.5,285.3c7.6,9.5,19.1,15.1,31.3,15.1h364.9c12.2,0,23.7-5.5,31.3-15.1l227.5-285.3c7.6-9.5,10.4-22,7.7-33.8l-81.2-355.7c-2.7-11.9-10.7-21.9-21.6-27.1L497.4,40.8c-11-5.3-23.7-5.3-34.7,0Z",
66
66
  octagon: "M523,38.5l238.7,98.9c27.6,11.4,49.5,33.3,60.9,60.9l98.9,238.7c11.4,27.6,11.4,58.5,0,86.1l-98.9,238.7c-11.4,27.6-33.3,49.5-60.9,60.9l-238.7,98.9c-27.6,11.4-58.5,11.4-86.1,0l-238.7-98.9c-27.6-11.4-49.5-33.3-60.9-60.9l-98.9-238.7c-11.4-27.6-11.4-58.5,0-86.1l98.9-238.7c11.4-27.6,33.3-49.5,60.9-60.9l238.7-98.9c27.6-11.4,58.5-11.4,86.1,0h0Z"
67
67
  };
68
- function Ie(o) {
69
- return o in Y;
68
+ function _e(o) {
69
+ return o in q;
70
70
  }
71
71
  function W(o) {
72
72
  return !!o && "customOptions" in o;
73
73
  }
74
- function F(o) {
75
- return (s) => B("g", o, s || []);
74
+ function R(o) {
75
+ return (s) => E("g", o, s || []);
76
76
  }
77
- class _e {
77
+ class Se {
78
78
  constructor() {
79
- V(this, "stack", []);
79
+ z(this, "stack", []);
80
80
  }
81
81
  add(s) {
82
82
  this.stack.push(s);
@@ -85,106 +85,115 @@ class _e {
85
85
  return this.stack.reduce((s, e) => e(s), {});
86
86
  }
87
87
  }
88
- function Se(o, s) {
89
- const e = () => n.params.value ? `icon-${n.params.pack}-${n.params.value}` : "icon-none", n = {
90
- modifiers: [],
91
- params: {},
92
- getComponentName: e,
93
- getComponent: () => {
94
- const k = z(Symbol.for("ui0-icon-generated"), {})[`${n.params.pack}/${n.params.value}`];
95
- if (k) return k;
96
- const P = le(e());
97
- return typeof P == "string" ? null : P;
98
- }
99
- };
100
- if (!o) return n;
101
- const r = o.includes("/") ? o : `/${o}`, [u, y = ""] = r.split("?", 2), d = u.indexOf("/"), L = u.slice(0, d), D = u.slice(d + 1), [M, ...O] = D.split(".");
102
- return O.length && (n.modifiers = O.reduce((g, k) => [...g, k.replace(":", "-")], [])), y && (n.params = Object.fromEntries(y.split("&").map((g) => g.split("=", 2)))), n.params.pack = L || s.pack || "ui0", M && (n.params.value = M), n;
103
- }
104
- function H(o, s) {
105
- const e = Se(o, s);
106
- for (const [n, r] of Object.entries(s))
107
- r !== void 0 && n !== "value" && e.params[n] === void 0 && (e.params[n] = r);
108
- const i = {
109
- ...s,
110
- ...e.params
111
- };
112
- return {
113
- ...e,
114
- params: i
115
- };
116
- }
117
- function Be(o) {
88
+ function X(o) {
118
89
  return Array.isArray(o) ? o.filter((s) => typeof s == "string" && s.length > 0) : typeof o == "string" ? o.split(/[\s,]+/).filter(Boolean) : [];
119
90
  }
120
- function Me(o, s) {
91
+ function Be(o, s) {
121
92
  const e = /* @__PURE__ */ new Set();
122
- for (const i of o) {
123
- const n = i.match(/^(.+?)(?::|-)(hover|active|focus)$/);
124
- n ? s[n[2]] && e.add(n[1]) : e.add(i);
93
+ for (const d of o) {
94
+ const n = d.match(/^(.+?)(?::|-)(hover|active|focus)$/);
95
+ n ? s[n[2]] && e.add(n[1]) : e.add(d);
125
96
  }
126
97
  return [...e];
127
98
  }
128
- function $e(o, s) {
129
- const e = { hover: o.matches(":hover"), active: o.matches(":active"), focus: o.matches(":focus-within") }, i = o.closest("button, input, a"), n = {
130
- hover: (i == null ? void 0 : i.matches(":hover")) ?? !1,
131
- active: (i == null ? void 0 : i.matches(":active")) ?? !1,
132
- focus: (i == null ? void 0 : i.matches(":focus-within")) ?? !1
133
- }, r = () => s({ hover: e.hover || n.hover, active: e.active || n.active, focus: e.focus || n.focus });
134
- let u = () => {
99
+ function Ee(o) {
100
+ return o.some((s) => /(?::|-)(hover|active|focus)$/.test(s));
101
+ }
102
+ function Me(o, s) {
103
+ const e = { hover: o.matches(":hover"), active: o.matches(":active"), focus: o.matches(":focus-within") }, d = () => o.closest("button, input, a, [data-icon-host]");
104
+ let n = null;
105
+ const i = { hover: !1, active: !1, focus: !1 }, u = () => s({ hover: e.hover || i.hover, active: e.active || i.active, focus: e.focus || i.focus });
106
+ let v = () => {
135
107
  };
136
- const y = () => {
137
- e.active = n.active = !1, u(), u = () => {
138
- }, r();
139
- }, d = o.ownerDocument.defaultView, L = (g, k) => {
140
- if (g.type === "pointerdown" && g.button !== 0 || g.type === "keydown" && ![" ", "Enter"].includes(g.key) || (y(), k.active = !0, r(), !d)) return;
141
- const P = (m) => {
142
- (m.type !== "keyup" || [" ", "Enter"].includes(m.key)) && y();
108
+ const h = () => {
109
+ e.active = i.active = !1, v(), v = () => {
110
+ }, u();
111
+ }, L = o.ownerDocument.defaultView, F = (f, P) => {
112
+ if (f.type === "pointerdown" && f.button !== 0 || f.type === "keydown" && ![" ", "Enter"].includes(f.key) || (h(), P.active = !0, u(), !L)) return;
113
+ const O = (g) => {
114
+ (g.type !== "keyup" || [" ", "Enter"].includes(g.key)) && h();
143
115
  };
144
- for (const m of ["pointerup", "pointercancel", "keyup", "blur"]) d.addEventListener(m, P);
145
- u = () => {
146
- for (const m of ["pointerup", "pointercancel", "keyup", "blur"]) d.removeEventListener(m, P);
116
+ for (const g of ["pointerup", "pointercancel", "keyup", "blur"]) L.addEventListener(g, O);
117
+ v = () => {
118
+ for (const g of ["pointerup", "pointercancel", "keyup", "blur"]) L.removeEventListener(g, O);
147
119
  };
148
- }, D = (g, k) => {
149
- const P = {
120
+ }, I = (f, P) => {
121
+ const O = {
150
122
  pointerenter: () => {
151
- k.hover = !0, r();
123
+ P.hover = !0, u();
152
124
  },
153
125
  pointerleave: () => {
154
- k.hover = !1, r();
126
+ P.hover = !1, u();
155
127
  },
156
- pointerdown: (m) => L(m, k),
157
- keydown: (m) => L(m, k),
128
+ pointerdown: (g) => F(g, P),
129
+ keydown: (g) => F(g, P),
158
130
  focusin: () => {
159
- k.focus = !0, r();
131
+ P.focus = !0, u();
160
132
  },
161
- focusout: (m) => {
162
- const E = m.relatedTarget;
163
- k.focus = E !== null && g.contains(E), r();
133
+ focusout: (g) => {
134
+ const A = g.relatedTarget;
135
+ P.focus = A !== null && f.contains(A), u();
164
136
  }
165
137
  };
166
- for (const [m, E] of Object.entries(P)) g.addEventListener(m, E);
138
+ for (const [g, A] of Object.entries(O)) f.addEventListener(g, A);
167
139
  return () => {
168
- for (const [m, E] of Object.entries(P)) g.removeEventListener(m, E);
140
+ for (const [g, A] of Object.entries(O)) f.removeEventListener(g, A);
169
141
  };
170
- }, M = D(o, e), O = i && i !== o ? D(i, n) : () => {
142
+ }, j = I(o, e);
143
+ let C = () => {
171
144
  };
172
- return r(), () => {
173
- M(), O(), u();
145
+ const _ = () => {
146
+ const f = d();
147
+ f !== n && (n = f, C(), C = f && f !== o ? I(f, i) : () => {
148
+ }, i.hover = (f == null ? void 0 : f.matches(":hover")) ?? !1, i.active = (f == null ? void 0 : f.matches(":active")) ?? !1, i.focus = (f == null ? void 0 : f.matches(":focus-within")) ?? !1);
149
+ };
150
+ _();
151
+ const D = () => _();
152
+ return o.addEventListener("pointerenter", _), o.addEventListener("focusin", _), o.ownerDocument.addEventListener("pointerover", D), u(), () => {
153
+ j(), C(), o.removeEventListener("pointerenter", _), o.removeEventListener("focusin", _), o.ownerDocument.removeEventListener("pointerover", D), v();
174
154
  };
175
155
  }
176
- function Ce() {
177
- const o = pe({ hover: !1, active: !1, focus: !1 });
156
+ function $e() {
157
+ const o = ue({ hover: !1, active: !1, focus: !1 });
178
158
  let s = null, e = () => {
179
159
  };
180
- const i = (n) => {
181
- const r = n instanceof Element ? n : null;
182
- r !== s && (e(), s = r, Object.assign(o, { hover: !1, active: !1, focus: !1 }), e = r ? $e(r, (u) => Object.assign(o, u)) : () => {
160
+ const d = (n) => {
161
+ const i = n instanceof Element ? n : null;
162
+ i !== s && (e(), s = i, Object.assign(o, { hover: !1, active: !1, focus: !1 }), e = i ? Me(i, (u) => Object.assign(o, u)) : () => {
183
163
  });
184
164
  };
185
- return ue(() => i(null)), { state: o, elementRef: i };
165
+ return pe(() => d(null)), { state: o, elementRef: d };
166
+ }
167
+ function Ce(o, s) {
168
+ const e = () => n.params.value ? `icon-${n.params.pack}-${n.params.value}` : "icon-none", n = {
169
+ modifiers: [],
170
+ params: {},
171
+ getComponentName: e,
172
+ getComponent: () => {
173
+ const _ = Z(Symbol.for("ui0-icon-generated"), {})[`${n.params.pack}/${n.params.value}`];
174
+ if (_) return _;
175
+ const D = fe(e());
176
+ return typeof D == "string" ? null : D;
177
+ }
178
+ };
179
+ if (!o) return n;
180
+ const i = o.includes("/") ? o : `/${o}`, [u, v = ""] = i.split("?", 2), h = u.indexOf("/"), L = u.slice(0, h), F = u.slice(h + 1), [I, ...j] = F.split(".");
181
+ return j.length && (n.modifiers = j.reduce((C, _) => [...C, _.replace(":", "-")], [])), v && (n.params = Object.fromEntries(v.split("&").map((C) => C.split("=", 2)))), n.params.pack = L || s.pack || "ui0", I && (n.params.value = I), n;
186
182
  }
187
- const Pe = /* @__PURE__ */ fe({
183
+ function Q(o, s) {
184
+ const e = Ce(o, s);
185
+ for (const [n, i] of Object.entries(s))
186
+ i !== void 0 && n !== "value" && e.params[n] === void 0 && (e.params[n] = i);
187
+ const d = {
188
+ ...s,
189
+ ...e.params
190
+ };
191
+ return {
192
+ ...e,
193
+ params: d
194
+ };
195
+ }
196
+ const Pe = /* @__PURE__ */ de({
188
197
  __name: "icon",
189
198
  props: {
190
199
  filled: { type: Boolean, default: void 0 },
@@ -208,190 +217,193 @@ const Pe = /* @__PURE__ */ fe({
208
217
  color: {}
209
218
  },
210
219
  setup(o) {
211
- var Z, U;
212
- const s = o, e = de(), i = xe(), n = (Z = i.useTheme) == null ? void 0 : Z.call(i, s, e), r = be(s, (U = i.useDefaults) == null ? void 0 : U.call(i)), u = se(), [, y] = ke("icon"), d = {
213
- badge: y("badge"),
214
- radial: y("radial"),
215
- shape: y("shape"),
216
- shapeBadge: y("shape-badge"),
217
- strokeMask: y("stroke-mask"),
218
- shapeStrokeMask: y("shape-stroke-mask"),
219
- icon: y("icon"),
220
- iconMask: y("mask-icon")
221
- }, L = B("rect", {
220
+ var U, H;
221
+ const s = o, e = he(), d = Ie(), n = (U = d.useTheme) == null ? void 0 : U.call(d, s, e), i = xe(s, (H = d.useDefaults) == null ? void 0 : H.call(d)), u = oe(), [, v] = we("icon"), h = {
222
+ badge: v("badge"),
223
+ radial: v("radial"),
224
+ shape: v("shape"),
225
+ shapeBadge: v("shape-badge"),
226
+ strokeMask: v("stroke-mask"),
227
+ shapeStrokeMask: v("shape-stroke-mask"),
228
+ icon: v("icon"),
229
+ iconMask: v("mask-icon")
230
+ }, L = E("rect", {
222
231
  ...u.viewBox,
223
232
  fill: "#FFF"
224
- }), M = {
225
- ...oe(s),
233
+ }), I = {
234
+ ...te(s),
226
235
  viewBox: u.getViewBox()
227
- }, O = Ce(), g = he();
228
- function k(c) {
229
- const p = [], t = Object.keys(c), f = ["size", "color", "value", "fill", "weight"];
236
+ }, j = $e(), C = me();
237
+ function _(c) {
238
+ const a = [], t = Object.keys(c), p = ["size", "color", "value", "fill", "weight"];
230
239
  for (let l = 0; l < t.length; l++) {
231
- const v = c[t[l]];
232
- f.includes(t[l]) && v !== void 0 && ["string", "number", "boolean"].includes(typeof v) && p.push(`icon-${t[l]}-${v}`);
240
+ const k = c[t[l]];
241
+ p.includes(t[l]) && k !== void 0 && ["string", "number", "boolean"].includes(typeof k) && a.push(`icon-${t[l]}-${k}`);
233
242
  }
234
- return p;
243
+ return a;
235
244
  }
236
- const P = () => {
245
+ const D = () => {
237
246
  const { value: c } = s;
238
247
  if (!c) return null;
239
- const p = H(ie(c) ? c[0] : c, r), t = [e.icon];
240
- n ? t.push(...n.classes(p.params)) : t.push(...k(p.params));
241
- const f = { class: t, ref: O.elementRef };
242
- if (p.params.value === "fake")
243
- return B("i", G(g, f));
244
- const l = E(p);
245
- return l ? B("i", G(g, f), l) : null;
246
- }, m = (c, p) => B("symbol", p, c), E = (c) => {
247
- const p = N(c);
248
- if (!p) return null;
249
- const t = c.params, f = t.color && t.color.length === 2, l = t.color && t.color.length > 2, v = (f || l) && t.rendering && t.rendering === "multicolor", a = [e.canvas];
250
- n && a.push(...n.classes(t, e));
251
- const h = [], _ = [], A = {
248
+ const a = Q(re(c) ? c[0] : c, i), t = [e.icon];
249
+ n ? t.push(...n.classes(a.params)) : t.push(..._(a.params));
250
+ const p = {
251
+ class: t,
252
+ ref: Ee([...a.modifiers, ...X(a.params.modifiers)]) ? j.elementRef : void 0
253
+ };
254
+ if (a.params.value === "fake")
255
+ return E("i", G(C, p));
256
+ const l = P(a);
257
+ return l ? E("i", G(C, p), l) : null;
258
+ }, f = (c, a) => E("symbol", a, c), P = (c) => {
259
+ const a = O(c);
260
+ if (!a) return null;
261
+ const t = c.params, p = t.color && t.color.length === 2, l = t.color && t.color.length > 2, k = (p || l) && t.rendering && t.rendering === "multicolor", r = [e.canvas];
262
+ n && r.push(...n.classes(t, e));
263
+ const m = [], S = [], V = {
252
264
  viewBox: u.getViewBox(),
253
- class: a
265
+ class: r
254
266
  };
255
- f && a.push(e.doubleColored), l && a.push(e.tripleColored);
256
- let b = {};
257
- const $ = /* @__PURE__ */ new Map(), j = (x, I, w) => {
258
- const C = I.getComponent();
259
- W(C) && (Array.from(C.customOptions.modifiers).length > 0 || C.customOptions.flags.some((T) => ["animation", "animate"].includes(T))) ? $.set(x, () => N(I)) : h.push(m(w, { id: x, viewBox: u.getViewBox() }));
260
- }, S = (x, I = {}, w = {}) => {
261
- const C = $.get(x);
262
- return J(x, I, w, C);
267
+ p && r.push(e.doubleColored), l && r.push(e.tripleColored);
268
+ let y = {};
269
+ const M = /* @__PURE__ */ new Map(), T = (b, x, w) => {
270
+ const $ = x.getComponent();
271
+ W($) && (Array.from($.customOptions.modifiers).length > 0 || $.customOptions.flags.some((N) => ["animation", "animate"].includes(N))) ? M.set(b, () => O(x)) : m.push(f(w, { id: b, viewBox: u.getViewBox() }));
272
+ }, B = (b, x = {}, w = {}) => {
273
+ const $ = M.get(b);
274
+ return g(b, x, w, $);
263
275
  };
264
- if (j(d.icon, c, p), t.badge && typeof t.badge == "string") {
265
- const x = H(t.badge, {});
266
- b = x.params;
267
- const I = N(x);
268
- if (I) {
269
- j(d.badge, x, I), !t.shape && !b.shape && h.push(S(d.badge, b, M));
270
- const w = S(d.badge, b, {
271
- ...M,
276
+ if (T(h.icon, c, a), t.badge && typeof t.badge == "string") {
277
+ const b = Q(t.badge, {});
278
+ y = b.params;
279
+ const x = O(b);
280
+ if (x) {
281
+ T(h.badge, b, x), !t.shape && !y.shape && m.push(B(h.badge, y, I));
282
+ const w = B(h.badge, y, {
283
+ ...I,
272
284
  class: [e.strokeMask, e.masked]
273
285
  });
274
- _.push(R(d.strokeMask, [w]));
286
+ S.push(A(h.strokeMask, [w]));
275
287
  }
276
288
  }
277
- if ((!t.shape || v) && h.push(S(d.icon, t, { mask: d.strokeMask })), t.shape) {
278
- const x = S(d.icon, t, {
279
- mask: d.strokeMask,
289
+ if ((!t.shape || k) && m.push(B(h.icon, t, { mask: h.strokeMask })), t.shape) {
290
+ const b = B(h.icon, t, {
291
+ mask: h.strokeMask,
280
292
  class: e.masked
281
- }), I = S(d.badge, b, {
282
- ...M,
293
+ }), x = B(h.badge, y, {
294
+ ...I,
283
295
  class: e.masked
284
296
  });
285
- b.shape && h.push(S(d.shape, {}, { mask: d.badge, ...M }));
286
- const w = [x];
287
- if (t.badge && w.push(I), b.shape) {
288
- const C = {
289
- ...M,
297
+ y.shape && m.push(B(h.shape, {}, { mask: h.badge, ...I }));
298
+ const w = [b];
299
+ if (t.badge && w.push(x), y.shape) {
300
+ const $ = {
301
+ ...I,
290
302
  viewBox: u.getViewBox()
291
303
  };
292
304
  w.push(
293
- S(
294
- d.shape,
305
+ B(
306
+ h.shape,
295
307
  {},
296
308
  {
297
- ...C,
309
+ ...$,
298
310
  class: [e.strokeMask, e.shapeStrokeMask, e.masked]
299
311
  }
300
312
  )
301
313
  );
302
314
  }
303
- if (_.push(R(d.iconMask, w)), t.shape || b.shape) {
304
- const C = q(c);
305
- C && h.push(
306
- m(C, {
307
- id: d.shape,
315
+ if (S.push(A(h.iconMask, w)), t.shape || y.shape) {
316
+ const $ = ee(c);
317
+ $ && m.push(
318
+ f($, {
319
+ id: h.shape,
308
320
  viewBox: u.getViewBox()
309
321
  })
310
- ), h.push(S(d.shape, {}, v ? { mask: d.iconMask } : { mask: d.iconMask }));
322
+ ), m.push(B(h.shape, {}, k ? { mask: h.iconMask } : { mask: h.iconMask }));
311
323
  }
312
- t.badge && h.push(S(d.badge, b, v ? M : { ...M }));
324
+ t.badge && m.push(B(h.badge, y, k ? I : { ...I }));
313
325
  }
314
- return _.length && h.unshift(B("defs", _)), B("svg", A, h);
315
- }, N = (c) => {
316
- const p = c.getComponent();
317
- if (!W(p)) return null;
318
- const t = new _e(), f = p.customOptions, l = Me(
319
- [...c.modifiers, ...Be(c.params.modifiers)],
320
- O.state
321
- ), v = {
326
+ return S.length && m.unshift(E("defs", S)), E("svg", V, m);
327
+ }, O = (c) => {
328
+ const a = c.getComponent();
329
+ if (!W(a)) return null;
330
+ const t = new Se(), p = a.customOptions, l = Be(
331
+ [...c.modifiers, ...X(c.params.modifiers)],
332
+ j.state
333
+ ), k = {
322
334
  fit: c.params.fit ?? "default",
323
335
  progress: c.params.progress ?? 100,
324
336
  rendering: c.params.rendering,
325
337
  modifiers: l
326
- }, a = [e.layerStyle], h = {
327
- class: a,
338
+ }, r = [e.layerStyle], m = {
339
+ class: r,
328
340
  style: "--0-icon-weight: 800;"
329
341
  };
330
- f.flags.includes("no-fill") || a.push(e.fillable), !f.flags.includes("no-stroke") && !f.flags.includes("no-process-stroke") && a.push(e.weighty), f.flags.includes("no-cap") || a.push(e.cap), f.flags.includes("no-join") || a.push(e.join), c.params.shape && a.push(e.shaped);
331
- const _ = c.params.filled;
332
- (_ !== void 0 ? _ === !0 || _ === "true" : l.some((S) => S === "fill" || S === "filled")) && a.push(e.filled), c.params.rendering && a.push(e[ve(c.params.rendering)]), t.add(() => B(p, v)), t.add(F(h)), c.params.animation && t.add(F({})), (c.params.flipped || l.includes("flip")) && t.add(F({ class: e.flip }));
333
- const b = Number(c.params.rotate ?? 0), $ = u.viewBox.x + u.viewBox.width / 2, j = u.viewBox.y + u.viewBox.height / 2;
342
+ p.flags.includes("no-fill") || r.push(e.fillable), !p.flags.includes("no-stroke") && !p.flags.includes("no-process-stroke") && r.push(e.weighty), p.flags.includes("no-cap") || r.push(e.cap), p.flags.includes("no-join") || r.push(e.join), c.params.shape && r.push(e.shaped);
343
+ const S = c.params.filled;
344
+ (S !== void 0 ? S === !0 || S === "true" : l.some((B) => B === "fill" || B === "filled")) && r.push(e.filled), c.params.rendering && r.push(e[ke(c.params.rendering)]), t.add(() => E(a, k)), t.add(R(m)), c.params.animation && t.add(R({})), (c.params.flipped || l.includes("flip")) && t.add(R({ class: e.flip }));
345
+ const y = Number(c.params.rotate ?? 0), M = u.viewBox.x + u.viewBox.width / 2, T = u.viewBox.y + u.viewBox.height / 2;
334
346
  return t.add(
335
- F({
347
+ R({
336
348
  "data-icon-rotate": "",
337
- transform: `rotate(${Number.isFinite(b) ? b : 0} ${$} ${j})`
349
+ transform: `rotate(${Number.isFinite(y) ? y : 0} ${M} ${T})`
338
350
  })
339
351
  ), t.render();
340
- }, J = (c, p = {}, t = {}, f) => {
352
+ }, g = (c, a = {}, t = {}, p) => {
341
353
  let l = {
342
- "--0-icon-weight": +(p.weight ?? 400) / 100 * u.getStrokeUnit(),
343
- "--0-icon-progress": p.progress ?? 100
354
+ "--0-icon-weight": +(a.weight ?? 400) / 100 * u.getStrokeUnit(),
355
+ "--0-icon-progress": a.progress ?? 100
344
356
  };
345
- const v = Array.isArray(t.class) ? t.class : [t.class];
346
- n && (l = { ...l, ...n.styles(p) }, v.push(...n.classes(p, e)));
347
- const a = {
357
+ const k = Array.isArray(t.class) ? t.class : [t.class];
358
+ n && (l = { ...l, ...n.styles(a) }, k.push(...n.classes(a, e)));
359
+ const r = {
348
360
  href: `#${c}`,
349
361
  style: l,
350
362
  ...t,
351
- class: v
363
+ class: k
352
364
  };
353
- return t.mask && (a.mask = `url(#${t.mask})`), f ? (delete a.href, a.viewBox ?? (a.viewBox = u.getViewBox()), a["data-icon-inline"] = "", B("svg", a, [f()])) : B("use", a);
354
- }, R = (c, p = []) => B("mask", { id: c }, [L, ...p]), q = (c) => {
355
- const p = c.params;
356
- if (!p.shape) return;
357
- const t = [], f = ee(c), l = p.shape;
365
+ return t.mask && (r.mask = `url(#${t.mask})`), p ? (delete r.href, r.viewBox ?? (r.viewBox = u.getViewBox()), r["data-icon-inline"] = "", E("svg", r, [p()])) : E("use", r);
366
+ }, A = (c, a = []) => E("mask", { id: c }, [L, ...a]), ee = (c) => {
367
+ const a = c.params;
368
+ if (!a.shape) return;
369
+ const t = [], p = se(c), l = a.shape;
358
370
  return l === "rect" || l === "circle" ? t.push(
359
- B("rect", {
360
- ...f,
371
+ E("rect", {
372
+ ...p,
361
373
  rx: l === "circle" ? "50%" : "10%"
362
374
  // mask: 'url(#badgenumber)'
363
375
  })
364
- ) : Ie(l) && t.push(
365
- B("path", {
376
+ ) : _e(l) && t.push(
377
+ E("path", {
366
378
  // 'stroke-width': 80,
367
- ...f,
379
+ ...p,
368
380
  x: void 0,
369
381
  y: void 0,
370
382
  "stroke-linejoin": "round",
371
383
  "stroke-linecap": "round",
372
- d: Y[l]
384
+ d: q[l]
373
385
  // !asMask ? shapes[p.shape] : scalePath(shapes[p.shape], .4),
374
386
  })
375
387
  ), t;
376
388
  };
377
- function ee(c) {
378
- const l = u.viewBox.height - u.viewBox.height / 16, v = l, a = l, h = (
389
+ function se(c) {
390
+ const l = u.viewBox.height - u.viewBox.height / 16, k = l, r = l, m = (
379
391
  /* isChild && isMask ? measure.x : */
380
392
  u.viewBox.width / 32
381
- ), _ = (
393
+ ), S = (
382
394
  /*isChild && isMask ? measure.y : */
383
395
  u.viewBox.height / 32
384
- ), A = [e.shape];
385
- return n && A.push(...n.classes(c.params, e)), {
386
- class: A,
396
+ ), V = [e.shape];
397
+ return n && V.push(...n.classes(c.params, e)), {
398
+ class: V,
387
399
  // mask,
388
- x: h,
389
- y: _,
390
- height: v,
391
- width: a
400
+ x: m,
401
+ y: S,
402
+ height: k,
403
+ width: r
392
404
  };
393
405
  }
394
- function se() {
406
+ function oe() {
395
407
  return {
396
408
  viewBox: {
397
409
  width: 960,
@@ -412,36 +424,36 @@ const Pe = /* @__PURE__ */ fe({
412
424
  }
413
425
  };
414
426
  }
415
- function oe(c) {
416
- const { options: p } = c, t = 960, f = t / 4 * 3, l = (t - f) / 2, v = {
417
- small: f / 4,
418
- normal: f / 3,
419
- large: f / 2
420
- }, a = p == null ? void 0 : p.badge, h = a !== void 0 && a.scale || "normal", _ = a == null ? void 0 : a.cell, A = a == null ? void 0 : a.x, b = a == null ? void 0 : a.y;
421
- if (h === "full" || h === 1)
427
+ function te(c) {
428
+ const { options: a } = c, t = 960, p = t / 4 * 3, l = (t - p) / 2, k = {
429
+ small: p / 4,
430
+ normal: p / 3,
431
+ large: p / 2
432
+ }, r = a == null ? void 0 : a.badge, m = r !== void 0 && r.scale || "normal", S = r == null ? void 0 : r.cell, V = r == null ? void 0 : r.x, y = r == null ? void 0 : r.y;
433
+ if (m === "full" || m === 1)
422
434
  return {
423
435
  x: "0",
424
436
  y: "0",
425
437
  width: `${t}px`,
426
438
  height: `${t}px`
427
439
  };
428
- let $;
429
- if (typeof h == "number" ? $ = h > 0.75 ? h * t : Math.min(f, Math.round(f * h)) : $ = v[h], _) {
430
- const I = typeof h == "string" ? {
440
+ let M;
441
+ if (typeof m == "number" ? M = m > 0.75 ? m * t : Math.min(p, Math.round(p * m)) : M = k[m], S) {
442
+ const x = typeof m == "string" ? {
431
443
  small: 4,
432
444
  normal: 3,
433
445
  large: 2
434
- }[h] : 3, w = f / I, [C, K] = _.split(/\s|-|,/).map(Number), T = I - 1;
446
+ }[m] : 3, w = p / x, [$, K] = S.split(/\s|-|,/).map(Number), N = x - 1;
435
447
  return {
436
- x: `${l + Math.min(C, T) * w}`,
437
- y: `${l + Math.min(K, T) * w}`,
438
- width: `${$}px`,
439
- height: `${$}px`
448
+ x: `${l + Math.min($, N) * w}`,
449
+ y: `${l + Math.min(K, N) * w}`,
450
+ width: `${M}px`,
451
+ height: `${M}px`
440
452
  };
441
453
  }
442
- const j = (x) => {
443
- const I = x === "x" ? A : b, w = f - $;
444
- switch (I) {
454
+ const T = (b) => {
455
+ const x = b === "x" ? V : y, w = p - M;
456
+ switch (x) {
445
457
  case "center":
446
458
  return l + w / 2;
447
459
  case "end":
@@ -451,53 +463,54 @@ const Pe = /* @__PURE__ */ fe({
451
463
  }
452
464
  };
453
465
  return {
454
- x: `${j("x")}`,
455
- y: `${j("y")}`,
456
- width: `${$}px`,
457
- height: `${$}px`
466
+ x: `${T("x")}`,
467
+ y: `${T("y")}`,
468
+ width: `${M}px`,
469
+ height: `${M}px`
458
470
  };
459
471
  }
460
- return (c, p) => (me(), ge(P));
472
+ return (c, a) => (ge(), ve(D));
461
473
  }
462
- }), Ee = "ic_c2d4", Oe = "ca_a457", Ae = "si_e681", je = "st_39f2", Le = "sh_6010", Ve = "sh_f589", De = "la_1353", Te = "we_0775", Fe = "fi_ff74", Ne = "fi_8a2f", ze = "la_e3b8", Re = "ma_30e1", Ze = "la_9af0", Ue = "do_9bcc", Ke = "mu_2455", Ge = "sh_0266", We = "tr_07fb", He = "jo_5839", Xe = "ca_45e8", Qe = "fl_4e44", Ye = {
463
- icon: Ee,
464
- canvas: Oe,
465
- sizeCustom: Ae,
466
- strokeMask: je,
467
- shapeStrokeMask: Le,
468
- shape: Ve,
469
- layerStyle: De,
470
- weighty: Te,
471
- fillable: Fe,
472
- filled: Ne,
473
- layers: ze,
474
- masked: Re,
475
- layersShift: Ze,
476
- doubleColored: Ue,
477
- multicolor: Ke,
478
- shaped: Ge,
479
- tripleColored: We,
480
- join: He,
481
- cap: Xe,
482
- flip: Qe
483
- }, Je = (o, s) => {
474
+ }), Oe = "ic_c2d4", Ae = "ca_a457", Le = "si_3f5b", je = "si_e681", De = "st_39f2", Ve = "sh_6010", Te = "sh_f589", ze = "la_1353", Fe = "we_0775", Ne = "fi_ff74", Re = "fi_8a2f", Ze = "la_e3b8", Ue = "ma_30e1", He = "la_9af0", Ke = "do_9bcc", Ge = "mu_2455", We = "sh_0266", Xe = "tr_07fb", Qe = "jo_5839", Ye = "ca_45e8", Je = "fl_4e44", qe = {
475
+ icon: Oe,
476
+ canvas: Ae,
477
+ sized: Le,
478
+ sizeCustom: je,
479
+ strokeMask: De,
480
+ shapeStrokeMask: Ve,
481
+ shape: Te,
482
+ layerStyle: ze,
483
+ weighty: Fe,
484
+ fillable: Ne,
485
+ filled: Re,
486
+ layers: Ze,
487
+ masked: Ue,
488
+ layersShift: He,
489
+ doubleColored: Ke,
490
+ multicolor: Ge,
491
+ shaped: We,
492
+ tripleColored: Xe,
493
+ join: Qe,
494
+ cap: Ye,
495
+ flip: Je
496
+ }, es = (o, s) => {
484
497
  const e = o.__vccOpts || o;
485
- for (const [i, n] of s)
486
- e[i] = n;
498
+ for (const [d, n] of s)
499
+ e[d] = n;
487
500
  return e;
488
- }, qe = {
489
- $style: Ye
490
- }, es = /* @__PURE__ */ Je(Pe, [["__cssModules", qe]]);
491
- function ss(o) {
492
- const s = re(o.replace("Icon", "")), e = s.split("-")[0];
501
+ }, ss = {
502
+ $style: qe
503
+ }, os = /* @__PURE__ */ es(Pe, [["__cssModules", ss]]);
504
+ function ts(o) {
505
+ const s = ae(o.replace("Icon", "")), e = s.split("-")[0];
493
506
  return e ? e + "/" + s.replace(e + "-", "") : s.replace(e + "-", "");
494
507
  }
495
- class os {
508
+ class ns {
496
509
  constructor() {
497
- V(this, "icons", []);
498
- V(this, "vueApp");
499
- V(this, "packs", {});
500
- V(this, "deferred", []);
510
+ z(this, "icons", []);
511
+ z(this, "vueApp");
512
+ z(this, "packs", {});
513
+ z(this, "deferred", []);
501
514
  }
502
515
  /**
503
516
  * add icon pack plugin
@@ -520,8 +533,8 @@ class os {
520
533
  */
521
534
  add(s, e) {
522
535
  var n;
523
- const i = ss(s);
524
- this.icons.push(i), this.vueApp ? (n = this.vueApp) == null || n.component(s, e) : this.deferred.push([s, e]);
536
+ const d = ts(s);
537
+ this.icons.push(d), this.vueApp ? (n = this.vueApp) == null || n.component(s, e) : this.deferred.push([s, e]);
525
538
  }
526
539
  setVue(s) {
527
540
  if (!s) throw new Error("app is null");
@@ -531,29 +544,29 @@ class os {
531
544
  throw new Error("vue already installed");
532
545
  }
533
546
  }
534
- function ps(o = {}, s) {
535
- const e = new os();
547
+ function fs(o = {}, s) {
548
+ const e = new ns();
536
549
  return {
537
- install: (r) => {
538
- if (!r) throw new Error("@ui0/icon can be run with vue 3 only");
539
- r.provide(X, e), o.framework && r.provide(Q, o.framework), r.component("Icon", es), e.setVue(r), r.config.globalProperties.$ui0Icon = e;
550
+ install: (i) => {
551
+ if (!i) throw new Error("@ui0/icon can be run with vue 3 only");
552
+ i.provide(Y, e), o.framework && i.provide(J, o.framework), i.component("Icon", os), e.setVue(i), i.config.globalProperties.$ui0Icon = e;
540
553
  },
541
- use: (r) => {
542
- e.addPack(r);
554
+ use: (i) => {
555
+ e.addPack(i);
543
556
  },
544
- key: we
557
+ key: ye
545
558
  };
546
559
  }
547
- const ts = "ic_c2d4", ns = "ca_a457", us = {
548
- icon: ts,
549
- canvas: ns
560
+ const cs = "ic_c2d4", is = "ca_a457", ds = {
561
+ icon: cs,
562
+ canvas: is
550
563
  };
551
564
  export {
552
- us as $style,
553
- es as Icon,
554
- Q as IconFrameworkKey,
555
- ps as createIcon,
556
- ls as getIcon,
557
- be as resolveIconDefaults,
558
- xe as useIconFramework
565
+ ds as $style,
566
+ os as Icon,
567
+ J as IconFrameworkKey,
568
+ fs as createIcon,
569
+ ps as getIcon,
570
+ xe as resolveIconDefaults,
571
+ Ie as useIconFramework
559
572
  };
@@ -6,6 +6,12 @@ export declare function resolveIconModifiers(declarations: readonly string[], st
6
6
  active: boolean;
7
7
  focus: boolean;
8
8
  }): string[];
9
+ /**
10
+ * True when any declaration binds to an interaction state (`close:hover`,
11
+ * `pressed:active`, `selected-focus`). Observers (own + host + document
12
+ * listeners) are attached only then - plain modifiers never read the state.
13
+ */
14
+ export declare function hasInteractionBindings(declarations: readonly string[]): boolean;
9
15
  /** Observes DOM interaction state and returns cleanup without depending on a UI framework. */
10
16
  export declare function observeIconInteractions(element: Element, update: (state: {
11
17
  hover: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"modifiers.d.ts","sourceRoot":"","sources":["../src/modifiers.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,EAAE,CAGrD;AAED,oGAAoG;AACpG,wBAAgB,oBAAoB,CAClC,YAAY,EAAE,SAAS,MAAM,EAAE,EAC/B,KAAK,EAAE;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,GACzD,MAAM,EAAE,CAQV;AAED,8FAA8F;AAC9F,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,CAAC,KAAK,EAAE;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,KAAK,IAAI,GAC3E,MAAM,IAAI,CAuEZ"}
1
+ {"version":3,"file":"modifiers.d.ts","sourceRoot":"","sources":["../src/modifiers.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,EAAE,CAGrD;AAED,oGAAoG;AACpG,wBAAgB,oBAAoB,CAClC,YAAY,EAAE,SAAS,MAAM,EAAE,EAC/B,KAAK,EAAE;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,GACzD,MAAM,EAAE,CAQV;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAE/E;AAED,8FAA8F;AAC9F,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,CAAC,KAAK,EAAE;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,KAAK,IAAI,GAC3E,MAAM,IAAI,CAqGZ"}
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- @property --0-icon-layer-count{inherits: true; syntax: "<number>"; initial-value: 0;}@property --0-icon-progress{inherits: true; syntax: "<number>"; initial-value: 0;}@layer ui0.ic_c2d4{.ic_c2d4{--0-c-src: initial;--0-c-src-l: initial;--0-c-src-d: initial;--0-c-src-hover: initial;--0-c-src-active: initial;--0-c-src-focus: initial;--0-c-src-l-hover: initial;--0-c-src-l-active: initial;--0-c-src-l-focus: initial;--0-c-src-d-hover: initial;--0-c-src-d-active: initial;--0-c-src-d-focus: initial;--0-c-o: var(--0-c-src, var(--0-c-src-l, 1));--0-c-cur: rgb(var(--0-c-cur-v) / var(--0-c-o))}.theme_dark .ic_c2d4{--0-c-o: var(--0-c-src-d, var(--0-c-src, 1))}.ic_c2d4:hover{--0-c-o: var(--0-c-src-hover, var(--0-c-src, var(--0-c-src-l, 1)))}.ic_c2d4:active{--0-c-o: var(--0-c-src-active, var(--0-c-src, var(--0-c-src-l, 1)))}.ic_c2d4:focus{--0-c-o: var(--0-c-src-focus, var(--0-c-src, var(--0-c-src-l, 1)))}.theme_dark .ic_c2d4:hover{--0-c-o: var(--0-c-src-d-hover, var(--0-c-src-hover, var(--0-c-src-d, var(--0-c-src, 1))))}.theme_dark .ic_c2d4:active{--0-c-o: var(--0-c-src-d-active, var(--0-c-src-active, var(--0-c-src-d, var(--0-c-src, 1))))}.theme_dark .ic_c2d4:focus{--0-c-o: var(--0-c-src-d-focus, var(--0-c-src-focus, var(--0-c-src-d, var(--0-c-src, 1))))}.ic_c2d4{--0-f-src: initial;--0-f-src-l: initial;--0-f-src-d: initial;--0-f-src-hover: initial;--0-f-src-active: initial;--0-f-src-focus: initial;--0-f-src-l-hover: initial;--0-f-src-l-active: initial;--0-f-src-l-focus: initial;--0-f-src-d-hover: initial;--0-f-src-d-active: initial;--0-f-src-d-focus: initial;--0-f-o: var(--0-f-src, var(--0-f-src-l, 1));--0-f-cur: rgb(var(--0-f-cur-v) / var(--0-f-o))}.theme_dark .ic_c2d4{--0-f-o: var(--0-f-src-d, var(--0-f-src, 1))}.ic_c2d4:hover{--0-f-o: var(--0-f-src-hover, var(--0-f-src, var(--0-f-src-l, 1)))}.ic_c2d4:active{--0-f-o: var(--0-f-src-active, var(--0-f-src, var(--0-f-src-l, 1)))}.ic_c2d4:focus{--0-f-o: var(--0-f-src-focus, var(--0-f-src, var(--0-f-src-l, 1)))}.theme_dark .ic_c2d4:hover{--0-f-o: var(--0-f-src-d-hover, var(--0-f-src-hover, var(--0-f-src-d, var(--0-f-src, 1))))}.theme_dark .ic_c2d4:active{--0-f-o: var(--0-f-src-d-active, var(--0-f-src-active, var(--0-f-src-d, var(--0-f-src, 1))))}.theme_dark .ic_c2d4:focus{--0-f-o: var(--0-f-src-d-focus, var(--0-f-src-focus, var(--0-f-src-d, var(--0-f-src, 1))))}.ic_c2d4{--0-g-cur: initial;height:var(--0-s);align-items:center;display:flex;--0-icon-size: calc(var(--0-s-cur) * 1.5);justify-content:center;transform-origin:50% 50%}.ic_c2d4:not(.si_e681){height:var(--0-icon-size, 100%);min-height:var(--0-icon-size);min-width:var(--0-icon-size);width:var(--0-icon-size, 100%)}.ca_a457{box-sizing:border-box;color:var(--0-c-cur, currentColor);height:100%;width:100%}use,[data-icon-inline]{--0-icon-fill-color: var(--0-c-cur, currentColor);--0-icon-stroke-color: var(--0-c-cur, currentColor);--0-icon-stroke-width: clamp(20, var(--0-icon-weight, 20), 80)}.st_39f2 *,.st_39f2{--0-icon-stroke-width: calc(clamp(30, var(--0-icon-weight, 30), 80)*.15em) !important}.sh_6010{stroke:#000;stroke-width:80}.sh_f589{fill:var(--0-c-cur, currentColor)}.la_1353{fill:none;stroke:inherit;stroke-width:var(--0-icon-stroke-width)}.la_1353 .no-fill,.la_1353 [data-icon-body] .no-fill{fill:none}.la_1353 [data-icon-body] .no-stroke,.la_1353 .no-stroke{--0-icon-stroke-width: 0;stroke:none}.la_1353.we_0775 :not(.no-stroke){stroke:var(--0-icon-stroke-color, currentColor)}.la_1353.fi_ff74.fi_8a2f :not(.no-fill,.no-fill *){fill:var(--0-icon-fill-color)}.la_1353 [data-icon-body] .always-fill{fill:var(--0-icon-fill-color, currentColor)!important}.la_e3b8 [data-layer]:not(.ma_30e1){--0-icon-l-step: calc(1 / var(--0-icon-l-c));--0-icon-layer-opacity: calc( (var(--0-icon-l-i) + 1) - var(--0-icon-l-i) - (var(--0-icon-l-i) * var(--0-icon-l-step)) );opacity:var(--0-icon-layer-opacity)}.la_9af0 [data-layer]{--0-icon-l-step: calc(1 / var(--0-icon-l-c));--0-icon-layer-opacity: calc((var(--0-icon-l-i) + 1) - ((var(--0-icon-l-i) + 1) * var(--0-icon-l-step)));opacity:var(--0-icon-layer-opacity)}.do_9bcc .mu_2455:not(.ma_30e1) [data-p-i]{--0-icon-fill-color: rgba(var(--0-c-v, 1));--0-icon-stroke-color: rgba(var(--0-c-v, 1))}.do_9bcc .mu_2455:not(.ma_30e1) [data-p-i="1"],.do_9bcc .mu_2455:not(.ma_30e1) [data-p-i="3"],.do_9bcc .mu_2455:not(.ma_30e1) [data-p-i="5"],.do_9bcc .mu_2455:not(.ma_30e1) [data-p-i="7"]{--0-icon-fill-color: rgba(var(--0-c2-v, 1));--0-icon-stroke-color: rgba(var(--0-c2-v, 1))}.do_9bcc .mu_2455:not(.ma_30e1).sh_0266 [data-p-i]{--0-icon-fill-color: rgba(var(--0-c2-v, 1));--0-icon-stroke-color: rgba(var(--0-c2-v, 1))}.tr_07fb .mu_2455:not(.ma_30e1) [data-p-i]{--0-icon-fill-color: rgba(var(--0-c-v, 1));--0-icon-stroke-color: rgba(var(--0-c-v, 1))}.tr_07fb .mu_2455:not(.ma_30e1) [data-p-i="1"],.tr_07fb .mu_2455:not(.ma_30e1) [data-p-i="4"],.tr_07fb .mu_2455:not(.ma_30e1) [data-p-i="7"]{--0-icon-fill-color: rgba(var(--0-c2-v, 1));--0-icon-stroke-color: rgba(var(--0-c2-v, var(--0-c-v)), 1)}.tr_07fb .mu_2455:not(.ma_30e1) [data-p-i="2"],.tr_07fb .mu_2455:not(.ma_30e1) [data-p-i="5"],.tr_07fb .mu_2455:not(.ma_30e1) [data-p-i="8"]{--0-icon-fill-color: rgba(var(--0-c3-v, 1));--0-icon-stroke-color: rgba(var(--0-c3-v, var(--0-c-v)), 1)}.tr_07fb .mu_2455:not(.ma_30e1).sh_0266 [data-p-i]{--0-icon-fill-color: rgba(var(--0-c2-v, 1));--0-icon-stroke-color: rgba(var(--0-c2-v, 1))}.tr_07fb .mu_2455:not(.ma_30e1).sh_0266 [data-p-i="1"],.tr_07fb .mu_2455:not(.ma_30e1).sh_0266 [data-p-i="3"],.tr_07fb .mu_2455:not(.ma_30e1).sh_0266 [data-p-i="5"]{--0-icon-fill-color: rgba(var(--0-c3-v, 1));--0-icon-stroke-color: rgba(var(--0-c3-v, var(--0-c-v)), 1)}defs>mask .ma_30e1:not(.mu_2455){color:#000!important;--0-icon-fill-color: #000 !important;--0-icon-stroke-color: #000 !important}.we_0775.jo_5839{stroke-linejoin:round}.we_0775.ca_45e8{stroke-linecap:round}.fl_4e44{transform-origin:50% 50%}.fl_4e44{transform:scaleX(-1)}}
1
+ @property --0-icon-layer-count{inherits: true; syntax: "<number>"; initial-value: 0;}@property --0-icon-progress{inherits: true; syntax: "<number>"; initial-value: 0;}@layer ui0.ic_c2d4{.ic_c2d4{align-items:center;display:flex;justify-content:center;transform-origin:50% 50%}.ic_c2d4{--0-icon-h: var(--0-s, var(--0-s-m));--0-c-src: initial;--0-c-src-l: initial;--0-c-src-d: initial;--0-c-src-hover: initial;--0-c-src-active: initial;--0-c-src-focus: initial;--0-c-src-l-hover: initial;--0-c-src-l-active: initial;--0-c-src-l-focus: initial;--0-c-src-d-hover: initial;--0-c-src-d-active: initial;--0-c-src-d-focus: initial;--0-c-o: var(--0-c-src, var(--0-c-src-l, 1));--0-c-cur: rgb(var(--0-c-cur-v) / var(--0-c-o))}.theme_dark .ic_c2d4{--0-c-o: var(--0-c-src-d, var(--0-c-src, 1))}.ic_c2d4:hover{--0-c-o: var(--0-c-src-hover, var(--0-c-src, var(--0-c-src-l, 1)))}.ic_c2d4:active{--0-c-o: var(--0-c-src-active, var(--0-c-src, var(--0-c-src-l, 1)))}.ic_c2d4:focus{--0-c-o: var(--0-c-src-focus, var(--0-c-src, var(--0-c-src-l, 1)))}.theme_dark .ic_c2d4:hover{--0-c-o: var(--0-c-src-d-hover, var(--0-c-src-hover, var(--0-c-src-d, var(--0-c-src, 1))))}.theme_dark .ic_c2d4:active{--0-c-o: var(--0-c-src-d-active, var(--0-c-src-active, var(--0-c-src-d, var(--0-c-src, 1))))}.theme_dark .ic_c2d4:focus{--0-c-o: var(--0-c-src-d-focus, var(--0-c-src-focus, var(--0-c-src-d, var(--0-c-src, 1))))}.ic_c2d4{--0-f-src: initial;--0-f-src-l: initial;--0-f-src-d: initial;--0-f-src-hover: initial;--0-f-src-active: initial;--0-f-src-focus: initial;--0-f-src-l-hover: initial;--0-f-src-l-active: initial;--0-f-src-l-focus: initial;--0-f-src-d-hover: initial;--0-f-src-d-active: initial;--0-f-src-d-focus: initial;--0-f-o: var(--0-f-src, var(--0-f-src-l, 1));--0-f-cur: rgb(var(--0-f-cur-v) / var(--0-f-o))}.theme_dark .ic_c2d4{--0-f-o: var(--0-f-src-d, var(--0-f-src, 1))}.ic_c2d4:hover{--0-f-o: var(--0-f-src-hover, var(--0-f-src, var(--0-f-src-l, 1)))}.ic_c2d4:active{--0-f-o: var(--0-f-src-active, var(--0-f-src, var(--0-f-src-l, 1)))}.ic_c2d4:focus{--0-f-o: var(--0-f-src-focus, var(--0-f-src, var(--0-f-src-l, 1)))}.theme_dark .ic_c2d4:hover{--0-f-o: var(--0-f-src-d-hover, var(--0-f-src-hover, var(--0-f-src-d, var(--0-f-src, 1))))}.theme_dark .ic_c2d4:active{--0-f-o: var(--0-f-src-d-active, var(--0-f-src-active, var(--0-f-src-d, var(--0-f-src, 1))))}.theme_dark .ic_c2d4:focus{--0-f-o: var(--0-f-src-d-focus, var(--0-f-src-focus, var(--0-f-src-d, var(--0-f-src, 1))))}.ic_c2d4{--0-g-cur: initial;height:var(--0-s)}.ic_c2d4.si_3f5b{height:var(--0-icon-h, 100%);min-height:var(--0-icon-h);min-width:var(--0-icon-h);width:var(--0-icon-h, 100%)}.ic_c2d4:not(.si_e681){height:var(--0-icon-h, 100%);min-height:var(--0-icon-h);min-width:var(--0-icon-h);width:var(--0-icon-h, 100%)}.ca_a457{box-sizing:border-box;color:var(--0-c-cur, currentColor);height:100%;width:100%}use,[data-icon-inline]{--0-icon-fill-color: var(--0-c-cur, currentColor);--0-icon-stroke-color: var(--0-c-cur, currentColor);--0-icon-stroke-width: clamp(20, var(--0-icon-weight, 20), 80)}.st_39f2 *,.st_39f2{--0-icon-stroke-width: calc(clamp(30, var(--0-icon-weight, 30), 80)*.15em) !important}.sh_6010{stroke:#000;stroke-width:80}.sh_f589{fill:var(--0-c-cur, currentColor)}.la_1353{fill:none;stroke:inherit;stroke-width:var(--0-icon-stroke-width)}.la_1353 .no-fill,.la_1353 [data-icon-body] .no-fill{fill:none}.la_1353 [data-icon-body] .no-stroke,.la_1353 .no-stroke{--0-icon-stroke-width: 0;stroke:none}.la_1353.we_0775 :not(.no-stroke){stroke:var(--0-icon-stroke-color, currentColor)}.la_1353.fi_ff74.fi_8a2f :not(.no-fill,.no-fill *){fill:var(--0-icon-fill-color)}.la_1353 [data-icon-body] .always-fill{fill:var(--0-icon-fill-color, currentColor)!important}.la_e3b8 [data-layer]:not(.ma_30e1){--0-icon-l-step: calc(1 / var(--0-icon-l-c));--0-icon-layer-opacity: calc( (var(--0-icon-l-i) + 1) - var(--0-icon-l-i) - (var(--0-icon-l-i) * var(--0-icon-l-step)) );opacity:var(--0-icon-layer-opacity)}.la_9af0 [data-layer]{--0-icon-l-step: calc(1 / var(--0-icon-l-c));--0-icon-layer-opacity: calc((var(--0-icon-l-i) + 1) - ((var(--0-icon-l-i) + 1) * var(--0-icon-l-step)));opacity:var(--0-icon-layer-opacity)}.do_9bcc .mu_2455:not(.ma_30e1) [data-p-i]{--0-icon-fill-color: rgba(var(--0-c-v, 1));--0-icon-stroke-color: rgba(var(--0-c-v, 1))}.do_9bcc .mu_2455:not(.ma_30e1) [data-p-i="1"],.do_9bcc .mu_2455:not(.ma_30e1) [data-p-i="3"],.do_9bcc .mu_2455:not(.ma_30e1) [data-p-i="5"],.do_9bcc .mu_2455:not(.ma_30e1) [data-p-i="7"]{--0-icon-fill-color: rgba(var(--0-c2-v, 1));--0-icon-stroke-color: rgba(var(--0-c2-v, 1))}.do_9bcc .mu_2455:not(.ma_30e1).sh_0266 [data-p-i]{--0-icon-fill-color: rgba(var(--0-c2-v, 1));--0-icon-stroke-color: rgba(var(--0-c2-v, 1))}.tr_07fb .mu_2455:not(.ma_30e1) [data-p-i]{--0-icon-fill-color: rgba(var(--0-c-v, 1));--0-icon-stroke-color: rgba(var(--0-c-v, 1))}.tr_07fb .mu_2455:not(.ma_30e1) [data-p-i="1"],.tr_07fb .mu_2455:not(.ma_30e1) [data-p-i="4"],.tr_07fb .mu_2455:not(.ma_30e1) [data-p-i="7"]{--0-icon-fill-color: rgba(var(--0-c2-v, 1));--0-icon-stroke-color: rgba(var(--0-c2-v, var(--0-c-v)), 1)}.tr_07fb .mu_2455:not(.ma_30e1) [data-p-i="2"],.tr_07fb .mu_2455:not(.ma_30e1) [data-p-i="5"],.tr_07fb .mu_2455:not(.ma_30e1) [data-p-i="8"]{--0-icon-fill-color: rgba(var(--0-c3-v, 1));--0-icon-stroke-color: rgba(var(--0-c3-v, var(--0-c-v)), 1)}.tr_07fb .mu_2455:not(.ma_30e1).sh_0266 [data-p-i]{--0-icon-fill-color: rgba(var(--0-c2-v, 1));--0-icon-stroke-color: rgba(var(--0-c2-v, 1))}.tr_07fb .mu_2455:not(.ma_30e1).sh_0266 [data-p-i="1"],.tr_07fb .mu_2455:not(.ma_30e1).sh_0266 [data-p-i="3"],.tr_07fb .mu_2455:not(.ma_30e1).sh_0266 [data-p-i="5"]{--0-icon-fill-color: rgba(var(--0-c3-v, 1));--0-icon-stroke-color: rgba(var(--0-c3-v, var(--0-c-v)), 1)}defs>mask .ma_30e1:not(.mu_2455){color:#000!important;--0-icon-fill-color: #000 !important;--0-icon-stroke-color: #000 !important}.we_0775.jo_5839{stroke-linejoin:round}.we_0775.ca_45e8{stroke-linecap:round}.fl_4e44{transform-origin:50% 50%}.fl_4e44{transform:scaleX(-1)}}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/vite/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,IAAI,OAAO,EAAE,WAAW,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,eAAe,CAAA;AACnG,cAAc,SAAS,CAAA;AACvB,YAAY,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AACzG,YAAY,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/vite/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,IAAI,OAAO,EAAE,WAAW,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,eAAe,CAAA;AACnG,cAAc,SAAS,CAAA;AACvB,YAAY,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AACzG,YAAY,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ui0/icon",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Vue icon component with an svg ?icon vite loader",
5
5
  "files": [
6
6
  "dist"
@@ -37,9 +37,9 @@
37
37
  "dependencies": {},
38
38
  "devDependencies": {
39
39
  "@types/node": "^20.14.8",
40
- "@ui0/core": "^0.1.4",
41
- "@ui0/theme": "^0.1.4",
42
- "@ui0/vite": "^0.1.4",
40
+ "@ui0/core": "^0.1.5",
41
+ "@ui0/theme": "^0.1.5",
42
+ "@ui0/vite": "^0.1.5",
43
43
  "@vitejs/plugin-vue": "^6.0.1",
44
44
  "@vue/test-utils": "^2.4.6",
45
45
  "sass-embedded": "^1.80.0",
@@ -49,11 +49,11 @@
49
49
  "vue-tsc": "^3.2.1"
50
50
  },
51
51
  "peerDependencies": {
52
- "@ui0/composable": "^0.1.4",
53
- "@ui0/core": "^0.1.4",
54
- "@ui0/theme": "^0.1.4",
55
- "@ui0/types": "^0.1.4",
56
- "@ui0/util": "^0.0.5",
52
+ "@ui0/composable": "^0.1.5",
53
+ "@ui0/core": "^0.1.5",
54
+ "@ui0/theme": "^0.1.5",
55
+ "@ui0/types": "^0.1.6",
56
+ "@ui0/util": "^0.0.7",
57
57
  "vue": "^3.5.45"
58
58
  },
59
59
  "peerDependenciesMeta": {