@ryanhelsing/ry-ui 1.0.13 → 1.0.14

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/dist/ry-ui.js CHANGED
@@ -150,7 +150,8 @@ const B = [
150
150
  "carousel",
151
151
  "combobox",
152
152
  "theme-panel",
153
- "testimonial"
153
+ "testimonial",
154
+ "heading"
154
155
  ], R = new RegExp(
155
156
  `<(/?)(${B.join("|")})(\\s|>|/)`,
156
157
  "g"
@@ -891,7 +892,7 @@ class f extends u {
891
892
  }
892
893
  }
893
894
  customElements.define("ry-toast", f);
894
- const k = {
895
+ const $ = {
895
896
  // Close / X
896
897
  close: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 6L6 18"/><path d="M6 6l12 12"/></svg>',
897
898
  // Chevron down
@@ -964,16 +965,16 @@ const k = {
964
965
  quote: '<svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor" stroke="none"><path d="M4.583 17.321C3.553 16.227 3 15 3 13.011c0-3.5 2.457-6.637 6.03-8.188l.893 1.378c-3.335 1.804-3.987 4.145-4.247 5.621.537-.278 1.24-.375 1.929-.311C9.591 11.69 11 13.17 11 15c0 1.933-1.567 3.5-3.5 3.5-1.073 0-2.099-.49-2.917-1.179zM14.583 17.321C13.553 16.227 13 15 13 13.011c0-3.5 2.457-6.637 6.03-8.188l.893 1.378c-3.335 1.804-3.987 4.145-4.247 5.621.537-.278 1.24-.375 1.929-.311C19.591 11.69 21 13.17 21 15c0 1.933-1.567 3.5-3.5 3.5-1.073 0-2.099-.49-2.917-1.179z"/></svg>'
965
966
  };
966
967
  function p(h) {
967
- return k[h] ?? "";
968
+ return $[h] ?? "";
968
969
  }
969
- function Ft(h, t) {
970
- k[h] = t;
970
+ function jt(h, t) {
971
+ $[h] = t;
971
972
  }
972
- function jt(h) {
973
- Object.assign(k, h);
973
+ function Ot(h) {
974
+ Object.assign($, h);
974
975
  }
975
- function Ot() {
976
- return Object.keys(k);
976
+ function Nt() {
977
+ return Object.keys($);
977
978
  }
978
979
  let tt = 0;
979
980
  class et extends u {
@@ -1060,7 +1061,7 @@ class et extends u {
1060
1061
  const r = s.dataset.value ?? "";
1061
1062
  this.#u(r);
1062
1063
  } else
1063
- this.#$(s), this.close();
1064
+ this.#k(s), this.close();
1064
1065
  return;
1065
1066
  }
1066
1067
  e.closest('[data-ry-target="trigger"]') && this.toggle();
@@ -1078,7 +1079,7 @@ class et extends u {
1078
1079
  const r = i.dataset.value ?? "";
1079
1080
  this.#u(r);
1080
1081
  } else
1081
- this.#$(i), this.close();
1082
+ this.#k(i), this.close();
1082
1083
  } else
1083
1084
  this.toggle();
1084
1085
  break;
@@ -1126,7 +1127,7 @@ class et extends u {
1126
1127
  this.#d(s);
1127
1128
  else if (!this.#a) {
1128
1129
  const i = e[s];
1129
- i && this.#$(i);
1130
+ i && this.#k(i);
1130
1131
  }
1131
1132
  }
1132
1133
  this.#s = setTimeout(() => {
@@ -1200,7 +1201,7 @@ class et extends u {
1200
1201
  this.#r.clear(), this.#b(), this.#v(), this.#y(), this.setAttribute("value", ""), this.emit("change", { value: "", label: "" });
1201
1202
  }
1202
1203
  // --- Single-select method ---
1203
- #$(t) {
1204
+ #k(t) {
1204
1205
  const e = t.dataset.value ?? "", s = t.textContent?.trim() ?? "", i = this.$('[data-ry-target="value"]');
1205
1206
  i && (i.textContent = s, i.setAttribute("data-selected", ""));
1206
1207
  const r = this.$('[data-ry-target="native"]');
@@ -1212,7 +1213,7 @@ class et extends u {
1212
1213
  if (this.state === "open") return;
1213
1214
  this.state = "open";
1214
1215
  const t = this.$('[data-ry-target="trigger"]');
1215
- if (t && t.setAttribute("aria-expanded", "true"), this.#D(), this.#a)
1216
+ if (t && t.setAttribute("aria-expanded", "true"), this.#I(), this.#a)
1216
1217
  this.#d(0);
1217
1218
  else {
1218
1219
  const e = this.getAttribute("value");
@@ -1224,7 +1225,7 @@ class et extends u {
1224
1225
  }
1225
1226
  this.emit("open");
1226
1227
  }
1227
- #D() {
1228
+ #I() {
1228
1229
  const t = this.$('[data-ry-target="dropdown"]');
1229
1230
  if (!t) return;
1230
1231
  this.removeAttribute("data-ry-position");
@@ -1253,7 +1254,7 @@ class et extends u {
1253
1254
  this.#b(), this.#v(), this.#y(), this.setAttribute("value", t);
1254
1255
  } else {
1255
1256
  const e = this.$(`[data-ry-target="option"][data-value="${t}"]`);
1256
- e && this.#$(e);
1257
+ e && this.#k(e);
1257
1258
  }
1258
1259
  }
1259
1260
  get values() {
@@ -2368,7 +2369,7 @@ class gt extends u {
2368
2369
  t.preventDefault(), this.#g(-1);
2369
2370
  }), this.on(this.#s, "mouseup", () => this.#u()), this.on(this.#s, "mouseleave", () => this.#u())), this.#r && (this.on(this.#r, "mousedown", (t) => {
2370
2371
  t.preventDefault(), this.#g(1);
2371
- }), this.on(this.#r, "mouseup", () => this.#u()), this.on(this.#r, "mouseleave", () => this.#u())), this.#t && this.on(this.#t, "mousedown", this.#D), this.on(document, "mousemove", this.#Y), this.on(document, "mouseup", this.#C), this.#t && this.on(this.#t, "touchstart", this.#X), this.on(document, "touchmove", this.#G), this.on(document, "touchend", this.#q), this.#t && this.on(this.#t, "keydown", this.#K), this.on(this, "wheel", this.#J), this.#t && this.on(this.#t, "dblclick", () => this.#E()), this.#i && (this.on(this.#i, "blur", () => this.#z()), this.on(this.#i, "keydown", (t) => {
2372
+ }), this.on(this.#r, "mouseup", () => this.#u()), this.on(this.#r, "mouseleave", () => this.#u())), this.#t && this.on(this.#t, "mousedown", this.#I), this.on(document, "mousemove", this.#Y), this.on(document, "mouseup", this.#C), this.#t && this.on(this.#t, "touchstart", this.#X), this.on(document, "touchmove", this.#G), this.on(document, "touchend", this.#q), this.#t && this.on(this.#t, "keydown", this.#K), this.on(this, "wheel", this.#J), this.#t && this.on(this.#t, "dblclick", () => this.#E()), this.#i && (this.on(this.#i, "blur", () => this.#z()), this.on(this.#i, "keydown", (t) => {
2372
2373
  t.key === "Enter" && (t.preventDefault(), this.#z()), t.key === "Escape" && (t.preventDefault(), this.#P()), t.stopPropagation();
2373
2374
  }));
2374
2375
  }
@@ -2405,18 +2406,18 @@ class gt extends u {
2405
2406
  const s = t / e * 4, i = this.#b;
2406
2407
  this.#e.style.transform = i === "y" ? `translateY(${-s}px)` : `translateX(${s}px)`;
2407
2408
  }
2408
- #$(t, e, s) {
2409
+ #k(t, e, s) {
2409
2410
  const i = this.#v(t, e), r = this.step || 1, a = s ? r * 10 : r, n = s ? S * 2 : S, o = Math.round(i / n), l = this.#l + o * a, c = i - o * n;
2410
2411
  this.#M(c, n);
2411
2412
  const d = this.hasAttribute("wrap") ? this.#V(l) : this.#T(l), g = this.#F(d);
2412
2413
  g !== this.value && (this.value = g, this.#A(), this.#x());
2413
2414
  }
2414
2415
  // --- Mouse drag ---
2415
- #D = (t) => {
2416
+ #I = (t) => {
2416
2417
  this.disabled || this.#c || this.#b === "none" || (t.preventDefault(), this.#a = !0, this.#o = t.clientX, this.#h = t.clientY, this.#l = this.value, this.setAttribute("data-dragging", ""));
2417
2418
  };
2418
2419
  #Y = (t) => {
2419
- this.#a && this.#$(t.clientX, t.clientY, t.shiftKey);
2420
+ this.#a && this.#k(t.clientX, t.clientY, t.shiftKey);
2420
2421
  };
2421
2422
  #C = (t) => {
2422
2423
  if (!this.#a) return;
@@ -2431,7 +2432,7 @@ class gt extends u {
2431
2432
  if (!this.#a) return;
2432
2433
  t.preventDefault();
2433
2434
  const e = t.touches[0];
2434
- e && this.#$(e.clientX, e.clientY, !1);
2435
+ e && this.#k(e.clientX, e.clientY, !1);
2435
2436
  };
2436
2437
  #q = () => {
2437
2438
  this.#a && (this.#a = !1, this.removeAttribute("data-dragging"), this.#e && (this.#e.style.transform = ""), this.#_());
@@ -2609,7 +2610,7 @@ function v(h) {
2609
2610
  b: Math.round(a * 255)
2610
2611
  };
2611
2612
  }
2612
- function $(h) {
2613
+ function k(h) {
2613
2614
  const t = h.r / 255, e = h.g / 255, s = h.b / 255, i = Math.max(t, e, s), r = Math.min(t, e, s), a = i - r;
2614
2615
  let n = 0;
2615
2616
  const o = i === 0 ? 0 : a / i, l = i;
@@ -2647,7 +2648,7 @@ function ft(h) {
2647
2648
  v: Math.round(s * 100)
2648
2649
  };
2649
2650
  }
2650
- function I(h) {
2651
+ function H(h) {
2651
2652
  const t = (e) => e.toString(16).padStart(2, "0");
2652
2653
  return `#${t(h.r)}${t(h.g)}${t(h.b)}`;
2653
2654
  }
@@ -2677,10 +2678,10 @@ function A(h) {
2677
2678
  g: parseInt(i[2], 16),
2678
2679
  b: parseInt(i[3], 16)
2679
2680
  }, n = parseInt(i[4], 16) / 255;
2680
- return { hsv: $(a), alpha: Math.round(n * 100) };
2681
+ return { hsv: k(a), alpha: Math.round(n * 100) };
2681
2682
  }
2682
2683
  const r = bt(t);
2683
- return r ? { hsv: $(r), alpha: 100 } : null;
2684
+ return r ? { hsv: k(r), alpha: 100 } : null;
2684
2685
  }
2685
2686
  const e = /^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d.]+))?\s*\)$/.exec(t);
2686
2687
  if (e) {
@@ -2689,7 +2690,7 @@ function A(h) {
2689
2690
  g: parseInt(e[2], 10),
2690
2691
  b: parseInt(e[3], 10)
2691
2692
  }, r = e[4] ? parseFloat(e[4]) * 100 : 100;
2692
- return { hsv: $(i), alpha: r };
2693
+ return { hsv: k(i), alpha: r };
2693
2694
  }
2694
2695
  const s = /^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%\s*(?:,\s*([\d.]+))?\s*\)$/.exec(t);
2695
2696
  if (s) {
@@ -2767,7 +2768,7 @@ class yt extends u {
2767
2768
  `, this.#h = this.$('[data-ry-target="trigger"]'), this.#l = this.$('[data-ry-target="panel"]'), this.#c = this.$('[data-ry-target="grid"]'), this.#n = this.$('[data-ry-target="grid-handle"]'), this.#p = this.$('[data-ry-target="hue-slider"]'), this.#d = this.$('[data-ry-target="hue-handle"]'), this.#m = this.$('[data-ry-target="alpha-slider"]'), this.#f = this.$('[data-ry-target="alpha-handle"]'), this.#w = this.$('[data-ry-target="preview"]'), this.#g = this.$('[data-ry-target="input"]');
2768
2769
  }
2769
2770
  #b() {
2770
- this.#h && this.on(this.#h, "click", this.#y), this.on(document, "click", this.#M), this.on(document, "keydown", this.#$), this.#c && this.on(this.#c, "pointerdown", this.#Y), this.#n && this.on(this.#n, "keydown", this.#X), this.#p && this.on(this.#p, "pointerdown", this.#G), this.#d && this.on(this.#d, "keydown", this.#K), this.#m && this.on(this.#m, "pointerdown", this.#J), this.#f && this.on(this.#f, "keydown", this.#z), this.on(document, "pointermove", this.#P), this.on(document, "pointerup", this.#R), this.#g && (this.on(this.#g, "change", this.#T), this.on(this.#g, "keydown", this.#V));
2771
+ this.#h && this.on(this.#h, "click", this.#y), this.on(document, "click", this.#M), this.on(document, "keydown", this.#k), this.#c && this.on(this.#c, "pointerdown", this.#Y), this.#n && this.on(this.#n, "keydown", this.#X), this.#p && this.on(this.#p, "pointerdown", this.#G), this.#d && this.on(this.#d, "keydown", this.#K), this.#m && this.on(this.#m, "pointerdown", this.#J), this.#f && this.on(this.#f, "keydown", this.#z), this.on(document, "pointermove", this.#P), this.on(document, "pointerup", this.#R), this.#g && (this.on(this.#g, "change", this.#T), this.on(this.#g, "keydown", this.#V));
2771
2772
  const t = this.$('[data-ry-target="format-toggle"]');
2772
2773
  t && this.on(t, "click", this.#F);
2773
2774
  const e = this.$('[data-ry-target="swatches"]');
@@ -2789,16 +2790,16 @@ class yt extends u {
2789
2790
  #M = (t) => {
2790
2791
  this.state === "open" && (this.contains(t.target) || this.close());
2791
2792
  };
2792
- #$ = (t) => {
2793
+ #k = (t) => {
2793
2794
  t.key === "Escape" && this.state === "open" && (this.close(), this.#h?.focus());
2794
2795
  };
2795
2796
  open() {
2796
- this.hasAttribute("inline") || (this.#D(), this.state = "open");
2797
+ this.hasAttribute("inline") || (this.#I(), this.state = "open");
2797
2798
  }
2798
2799
  close() {
2799
2800
  this.hasAttribute("inline") || (this.state = "closed", this.removeAttribute("data-ry-position"));
2800
2801
  }
2801
- #D() {
2802
+ #I() {
2802
2803
  if (!this.#l || !this.#h) return;
2803
2804
  const t = this.#h.getBoundingClientRect(), e = 320, i = window.innerHeight - t.bottom, r = t.top;
2804
2805
  i < e && r > i ? this.setAttribute("data-ry-position", "top") : this.setAttribute("data-ry-position", "bottom");
@@ -2832,7 +2833,7 @@ class yt extends u {
2832
2833
  this.#i = Math.max(0, this.#i - e), s = !0;
2833
2834
  break;
2834
2835
  }
2835
- s && (t.preventDefault(), this.#A(), this.#L(), this.#k());
2836
+ s && (t.preventDefault(), this.#A(), this.#L(), this.#$());
2836
2837
  };
2837
2838
  // ───────────────────────────────────────────────────────────────────────────
2838
2839
  // Hue handlers
@@ -2859,7 +2860,7 @@ class yt extends u {
2859
2860
  this.#t = (this.#t - e + 360) % 360, s = !0;
2860
2861
  break;
2861
2862
  }
2862
- s && (t.preventDefault(), this.#A(), this.#L(), this.#k());
2863
+ s && (t.preventDefault(), this.#A(), this.#L(), this.#$());
2863
2864
  };
2864
2865
  // ───────────────────────────────────────────────────────────────────────────
2865
2866
  // Alpha handlers
@@ -2886,7 +2887,7 @@ class yt extends u {
2886
2887
  this.#s = Math.max(0, this.#s - e), s = !0;
2887
2888
  break;
2888
2889
  }
2889
- s && (t.preventDefault(), this.#A(), this.#L(), this.#k());
2890
+ s && (t.preventDefault(), this.#A(), this.#L(), this.#$());
2890
2891
  };
2891
2892
  // ───────────────────────────────────────────────────────────────────────────
2892
2893
  // Pointer move/up
@@ -2895,7 +2896,7 @@ class yt extends u {
2895
2896
  this.#r ? this.#C(t) : this.#a ? this.#q(t) : this.#o && this.#E(t);
2896
2897
  };
2897
2898
  #R = () => {
2898
- (this.#r || this.#a || this.#o) && (this.#r = !1, this.#a = !1, this.#o = !1, this.#k());
2899
+ (this.#r || this.#a || this.#o) && (this.#r = !1, this.#a = !1, this.#o = !1, this.#$());
2899
2900
  };
2900
2901
  // ───────────────────────────────────────────────────────────────────────────
2901
2902
  // Input handlers
@@ -2903,7 +2904,7 @@ class yt extends u {
2903
2904
  #T = () => {
2904
2905
  if (!this.#g) return;
2905
2906
  const t = A(this.#g.value);
2906
- t ? (this.#t = t.hsv.h, this.#e = t.hsv.s, this.#i = t.hsv.v, this.hasAttribute("opacity") && (this.#s = t.alpha), this.#A(), this.#k()) : this.#W();
2907
+ t ? (this.#t = t.hsv.h, this.#e = t.hsv.s, this.#i = t.hsv.v, this.hasAttribute("opacity") && (this.#s = t.alpha), this.#A(), this.#$()) : this.#W();
2907
2908
  };
2908
2909
  #V = (t) => {
2909
2910
  t.key === "Enter" && (t.preventDefault(), this.#T());
@@ -2926,7 +2927,7 @@ class yt extends u {
2926
2927
  const s = e.dataset.color;
2927
2928
  if (s) {
2928
2929
  const i = A(s);
2929
- i && (this.#t = i.hsv.h, this.#e = i.hsv.s, this.#i = i.hsv.v, this.hasAttribute("opacity") && (this.#s = i.alpha), this.#A(), this.#L(), this.#k());
2930
+ i && (this.#t = i.hsv.h, this.#e = i.hsv.s, this.#i = i.hsv.v, this.hasAttribute("opacity") && (this.#s = i.alpha), this.#A(), this.#L(), this.#$());
2930
2931
  }
2931
2932
  }
2932
2933
  };
@@ -2934,7 +2935,7 @@ class yt extends u {
2934
2935
  // Update methods
2935
2936
  // ───────────────────────────────────────────────────────────────────────────
2936
2937
  #A() {
2937
- this.#U(), this.#x(), this.#_(), this.#H(), this.#O(), this.#W(), this.#Z();
2938
+ this.#U(), this.#x(), this.#_(), this.#D(), this.#O(), this.#W(), this.#Z();
2938
2939
  }
2939
2940
  #U() {
2940
2941
  const t = this.$('[data-ry-target="trigger-color"]');
@@ -2953,7 +2954,7 @@ class yt extends u {
2953
2954
  #_() {
2954
2955
  this.#d && (this.#d.style.left = `${this.#t / 360 * 100}%`);
2955
2956
  }
2956
- #H() {
2957
+ #D() {
2957
2958
  if (this.#m) {
2958
2959
  const t = v({ h: this.#t, s: this.#e, v: this.#i });
2959
2960
  this.#m.style.setProperty("--alpha-color", `rgb(${t.r}, ${t.g}, ${t.b})`);
@@ -2978,7 +2979,7 @@ class yt extends u {
2978
2979
  const t = this.format, e = v({ h: this.#t, s: this.#e, v: this.#i }), s = this.hasAttribute("opacity");
2979
2980
  switch (t) {
2980
2981
  case "hex": {
2981
- const i = I(e);
2982
+ const i = H(e);
2982
2983
  if (s && this.#s < 100) {
2983
2984
  const r = Math.round(this.#s / 100 * 255).toString(16).padStart(2, "0");
2984
2985
  return i + r;
@@ -2992,7 +2993,7 @@ class yt extends u {
2992
2993
  return s ? `hsla(${i.h}, ${i.s}%, ${i.l}%, ${(this.#s / 100).toFixed(2)})` : `hsl(${i.h}, ${i.s}%, ${i.l}%)`;
2993
2994
  }
2994
2995
  default:
2995
- return I(e);
2996
+ return H(e);
2996
2997
  }
2997
2998
  }
2998
2999
  // ───────────────────────────────────────────────────────────────────────────
@@ -3001,7 +3002,7 @@ class yt extends u {
3001
3002
  #L() {
3002
3003
  this.emit("input", { value: this.value, hsv: this.hsv, rgb: this.rgb });
3003
3004
  }
3004
- #k() {
3005
+ #$() {
3005
3006
  this.emit("change", { value: this.value, hsv: this.hsv, rgb: this.rgb });
3006
3007
  }
3007
3008
  // ───────────────────────────────────────────────────────────────────────────
@@ -3010,7 +3011,7 @@ class yt extends u {
3010
3011
  attributeChangedCallback(t, e, s) {
3011
3012
  if (e !== s && t === "value" && this.#c && s) {
3012
3013
  const i = A(s);
3013
- i && (this.#t = i.hsv.h, this.#e = i.hsv.s, this.#i = i.hsv.v, this.hasAttribute("opacity") && (this.#s = i.alpha), this.#U(), this.#x(), this.#_(), this.#H(), this.#O());
3014
+ i && (this.#t = i.hsv.h, this.#e = i.hsv.s, this.#i = i.hsv.v, this.hasAttribute("opacity") && (this.#s = i.alpha), this.#U(), this.#x(), this.#_(), this.#D(), this.#O());
3014
3015
  }
3015
3016
  }
3016
3017
  // ───────────────────────────────────────────────────────────────────────────
@@ -3259,8 +3260,8 @@ function At(h, t, e) {
3259
3260
  b: Math.round(h.b + (t.b - h.b) * e)
3260
3261
  };
3261
3262
  }
3262
- const D = "linear-gradient(90deg, #000000 0%, #ffffff 100%)", wt = 50;
3263
- class kt extends u {
3263
+ const I = "linear-gradient(90deg, #000000 0%, #ffffff 100%)", wt = 50;
3264
+ class $t extends u {
3264
3265
  #t = "linear";
3265
3266
  #e = 90;
3266
3267
  #i = "circle";
@@ -3283,8 +3284,8 @@ class kt extends u {
3283
3284
  // Parsing / Serialization
3284
3285
  // ───────────────────────────────────────────────────────────────────────────
3285
3286
  #m() {
3286
- const t = this.getAttribute("value") || D;
3287
- this.#f(t) || this.#f(D);
3287
+ const t = this.getAttribute("value") || I;
3288
+ this.#f(t) || this.#f(I);
3288
3289
  }
3289
3290
  #f(t) {
3290
3291
  const e = t.trim();
@@ -3345,7 +3346,7 @@ class kt extends u {
3345
3346
  }
3346
3347
  #v(t, e) {
3347
3348
  const s = this.#u(t, e);
3348
- this.#s.push(s), this.#$(), this.#r = s.id, this.#C(), this.#x();
3349
+ this.#s.push(s), this.#k(), this.#r = s.id, this.#C(), this.#x();
3349
3350
  }
3350
3351
  #y(t) {
3351
3352
  if (this.#s.length <= 2) return !1;
@@ -3355,10 +3356,10 @@ class kt extends u {
3355
3356
  #M(t) {
3356
3357
  this.#r !== t && (this.#r = t, this.#N(), this.#L());
3357
3358
  }
3358
- #$() {
3359
+ #k() {
3359
3360
  this.#s.sort((t, e) => t.position - e.position);
3360
3361
  }
3361
- #D() {
3362
+ #I() {
3362
3363
  return this.#s.find((t) => t.id === this.#r) ?? null;
3363
3364
  }
3364
3365
  // ───────────────────────────────────────────────────────────────────────────
@@ -3429,7 +3430,7 @@ class kt extends u {
3429
3430
  } else {
3430
3431
  if (t.preventDefault(), !this.#n) return;
3431
3432
  const i = this.#n.getBoundingClientRect(), r = Math.round(Math.max(0, Math.min(100, (t.clientX - i.left) / i.width * 100))), a = this.#U(r);
3432
- this.#v(a, r), this.#n.querySelector(`[data-stop-id="${this.#r}"]`)?.focus(), this.#o = this.#r, this.#h = !1, this.#l = i, this.#n.setPointerCapture(t.pointerId), this.#I();
3433
+ this.#v(a, r), this.#n.querySelector(`[data-stop-id="${this.#r}"]`)?.focus(), this.#o = this.#r, this.#h = !1, this.#l = i, this.#n.setPointerCapture(t.pointerId), this.#H();
3433
3434
  }
3434
3435
  };
3435
3436
  #q = (t) => {
@@ -3441,7 +3442,7 @@ class kt extends u {
3441
3442
  const i = this.#l.top + this.#l.height / 2, r = Math.abs(t.clientY - i);
3442
3443
  this.#h = r > wt && this.#s.length > 2;
3443
3444
  const a = this.#n?.querySelector(`[data-stop-id="${e.id}"]`);
3444
- a && (a.style.left = this.#b(e.position), this.#h ? (a.style.opacity = "0.3", a.style.transform = "translate(-50%, -50%) scale(0.7)") : (a.style.opacity = "", a.style.transform = "")), this.#$(), this.#O(), this.#H(), this.#k(), this.#I();
3445
+ a && (a.style.left = this.#b(e.position), this.#h ? (a.style.opacity = "0.3", a.style.transform = "translate(-50%, -50%) scale(0.7)") : (a.style.opacity = "", a.style.transform = "")), this.#k(), this.#O(), this.#D(), this.#$(), this.#H();
3445
3446
  };
3446
3447
  #K = () => {
3447
3448
  this.#o && (this.#h && this.#y(this.#o), this.#o = null, this.#h = !1, this.#l = null, this.#S(), this.#B());
@@ -3465,30 +3466,30 @@ class kt extends u {
3465
3466
  break;
3466
3467
  case "Delete":
3467
3468
  case "Backspace":
3468
- this.#y(i) && (this.#I(), this.#B()), t.preventDefault();
3469
+ this.#y(i) && (this.#H(), this.#B()), t.preventDefault();
3469
3470
  return;
3470
3471
  }
3471
- n && (t.preventDefault(), this.#$(), this.#W(), this.#O(), this.#H(), this.#k(), this.#S(), this.#I(), this.#B());
3472
+ n && (t.preventDefault(), this.#k(), this.#W(), this.#O(), this.#D(), this.#$(), this.#S(), this.#H(), this.#B());
3472
3473
  };
3473
3474
  // ───────────────────────────────────────────────────────────────────────────
3474
3475
  // Type / Angle / Shape handlers
3475
3476
  // ───────────────────────────────────────────────────────────────────────────
3476
3477
  #E(t) {
3477
- this.#t !== t && (this.#t = t, this.setAttribute("data-ry-type", t), this.#_(), this.#H(), this.#k(), this.#S(), this.#I(), this.#B());
3478
+ this.#t !== t && (this.#t = t, this.setAttribute("data-ry-type", t), this.#_(), this.#D(), this.#$(), this.#S(), this.#H(), this.#B());
3478
3479
  }
3479
3480
  #z = (t) => {
3480
3481
  const e = t.detail;
3481
- this.#e = e.value, this.#H(), this.#k(), this.#S(), this.#I();
3482
+ this.#e = e.value, this.#D(), this.#$(), this.#S(), this.#H();
3482
3483
  };
3483
3484
  #P(t) {
3484
- this.#i !== t && (this.#i = t, this.#_(), this.#k(), this.#S(), this.#I(), this.#B());
3485
+ this.#i !== t && (this.#i = t, this.#_(), this.#$(), this.#S(), this.#H(), this.#B());
3485
3486
  }
3486
3487
  // ───────────────────────────────────────────────────────────────────────────
3487
3488
  // Color picker handlers
3488
3489
  // ───────────────────────────────────────────────────────────────────────────
3489
3490
  #R = () => {
3490
- const t = this.#D();
3491
- !t || !this.#p || (t.color = this.#p.value, this.#Z(t), this.#O(), this.#H(), this.#k(), this.#I());
3491
+ const t = this.#I();
3492
+ !t || !this.#p || (t.color = this.#p.value, this.#Z(t), this.#O(), this.#D(), this.#$(), this.#H());
3492
3493
  };
3493
3494
  #T = () => {
3494
3495
  this.#S(), this.#B();
@@ -3515,7 +3516,7 @@ class kt extends u {
3515
3516
  #A() {
3516
3517
  if (!this.#d) return;
3517
3518
  const t = this.#d.value.trim();
3518
- t && this.#f(t) ? (this.#C(), this.#x(), this.#S(), this.#I(), this.#B()) : this.#k();
3519
+ t && this.#f(t) ? (this.#C(), this.#x(), this.#S(), this.#H(), this.#B()) : this.#$();
3519
3520
  }
3520
3521
  // ───────────────────────────────────────────────────────────────────────────
3521
3522
  // Color interpolation
@@ -3541,7 +3542,7 @@ class kt extends u {
3541
3542
  // Update methods
3542
3543
  // ───────────────────────────────────────────────────────────────────────────
3543
3544
  #x() {
3544
- this.setAttribute("data-ry-type", this.#t), this.#_(), this.#O(), this.#H(), this.#W(), this.#N(), this.#L(), this.#k();
3545
+ this.setAttribute("data-ry-type", this.#t), this.#_(), this.#O(), this.#D(), this.#W(), this.#N(), this.#L(), this.#$();
3545
3546
  }
3546
3547
  #_() {
3547
3548
  const t = this.$('[data-ry-target="type-solid"]'), e = this.$('[data-ry-target="type-linear"]'), s = this.$('[data-ry-target="type-radial"]');
@@ -3551,7 +3552,7 @@ class kt extends u {
3551
3552
  const a = this.$('[data-ry-target="angle-select"]');
3552
3553
  a && a.setAttribute("value", String(this.#e));
3553
3554
  }
3554
- #H() {
3555
+ #D() {
3555
3556
  if (!this.#p) return;
3556
3557
  const t = this.#p.querySelector('[data-ry-target="preview-color"]');
3557
3558
  t && (t.style.backgroundImage = this.#t === "solid" ? "" : this.#g());
@@ -3580,10 +3581,10 @@ class kt extends u {
3580
3581
  e.getAttribute("data-stop-id") === this.#r ? e.setAttribute("data-selected", "") : e.removeAttribute("data-selected");
3581
3582
  }
3582
3583
  #L() {
3583
- const t = this.#D();
3584
+ const t = this.#I();
3584
3585
  !t || !this.#p || this.#p.setColor(t.color);
3585
3586
  }
3586
- #k() {
3587
+ #$() {
3587
3588
  this.#d && document.activeElement !== this.#d && (this.#d.value = this.#g());
3588
3589
  }
3589
3590
  #S() {
@@ -3593,7 +3594,7 @@ class kt extends u {
3593
3594
  // ───────────────────────────────────────────────────────────────────────────
3594
3595
  // Events
3595
3596
  // ───────────────────────────────────────────────────────────────────────────
3596
- #I() {
3597
+ #H() {
3597
3598
  this.emit("input", {
3598
3599
  value: this.#g(),
3599
3600
  type: this.#t,
@@ -3636,7 +3637,7 @@ class kt extends u {
3636
3637
  return this.#e;
3637
3638
  }
3638
3639
  set angle(t) {
3639
- this.#e = (t % 360 + 360) % 360, this.#_(), this.#k(), this.#S();
3640
+ this.#e = (t % 360 + 360) % 360, this.#_(), this.#$(), this.#S();
3640
3641
  }
3641
3642
  get shape() {
3642
3643
  return this.#i;
@@ -3648,7 +3649,7 @@ class kt extends u {
3648
3649
  return this.#s.map((t) => ({ ...t }));
3649
3650
  }
3650
3651
  get selectedStop() {
3651
- const t = this.#D();
3652
+ const t = this.#I();
3652
3653
  return t ? { ...t } : null;
3653
3654
  }
3654
3655
  get disabled() {
@@ -3658,15 +3659,15 @@ class kt extends u {
3658
3659
  t ? this.setAttribute("disabled", "") : this.removeAttribute("disabled");
3659
3660
  }
3660
3661
  addStop(t, e) {
3661
- this.#v(t, e), this.#S(), this.#I(), this.#B();
3662
+ this.#v(t, e), this.#S(), this.#H(), this.#B();
3662
3663
  }
3663
3664
  removeStop(t) {
3664
3665
  const e = this.#y(t);
3665
- return e && (this.#k(), this.#S(), this.#B()), e;
3666
+ return e && (this.#$(), this.#S(), this.#B()), e;
3666
3667
  }
3667
3668
  }
3668
- customElements.define("ry-gradient-picker", kt);
3669
- let $t = 0;
3669
+ customElements.define("ry-gradient-picker", $t);
3670
+ let kt = 0;
3670
3671
  const xt = 5;
3671
3672
  function _(h) {
3672
3673
  return p(h).replace(/width="24"/g, 'width="16"').replace(/height="24"/g, 'height="16"').replace(/viewBox/, 'class="ry-tree__icon" viewBox');
@@ -3713,7 +3714,7 @@ class w extends u {
3713
3714
  (o) => o.tagName === "RY-TREE-ITEM"
3714
3715
  );
3715
3716
  if (a.length > 0) {
3716
- const o = `ry-tree-${++$t}`, l = document.createElement("input");
3717
+ const o = `ry-tree-${++kt}`, l = document.createElement("input");
3717
3718
  l.type = "checkbox", l.id = o, l.className = "ry-tree__toggle", i && (l.checked = !0);
3718
3719
  const c = document.createElement("label");
3719
3720
  c.htmlFor = o, c.className = "ry-tree__label", c.setAttribute("data-ry-target", "folder"), c.dataset.ryLabel = s, c.innerHTML = `
@@ -3842,7 +3843,7 @@ class w extends u {
3842
3843
  }
3843
3844
  #M(t, e, s) {
3844
3845
  if (s === "inside" && e.contains(t)) return;
3845
- const i = this.#$(t), r = this.#$(e);
3846
+ const i = this.#k(t), r = this.#k(e);
3846
3847
  if (s === "before")
3847
3848
  e.parentNode?.insertBefore(t, e);
3848
3849
  else if (s === "after")
@@ -3861,7 +3862,7 @@ class w extends u {
3861
3862
  position: s
3862
3863
  });
3863
3864
  }
3864
- #$(t) {
3865
+ #k(t) {
3865
3866
  const e = t.querySelector(':scope > [data-ry-target="folder"]'), s = t.querySelector(':scope > [data-ry-target="file"]');
3866
3867
  return e?.dataset.ryLabel ?? s?.dataset.ryLabel ?? "";
3867
3868
  }
@@ -4008,13 +4009,13 @@ class Lt extends u {
4008
4009
  }
4009
4010
  customElements.define("ry-feature", Tt);
4010
4011
  customElements.define("ry-feature-grid", Lt);
4012
+ class Ht extends u {
4013
+ }
4011
4014
  class It extends u {
4012
4015
  }
4016
+ customElements.define("ry-pricing", Ht);
4017
+ customElements.define("ry-pricing-card", It);
4013
4018
  class Dt extends u {
4014
- }
4015
- customElements.define("ry-pricing", It);
4016
- customElements.define("ry-pricing-card", Dt);
4017
- class Ht extends u {
4018
4019
  #t = 0;
4019
4020
  #e = 0;
4020
4021
  #i = null;
@@ -4094,8 +4095,8 @@ class Ht extends u {
4094
4095
  this.#p();
4095
4096
  }
4096
4097
  }
4097
- customElements.define("ry-carousel", Ht);
4098
- const H = "ry-theme-panel";
4098
+ customElements.define("ry-carousel", Dt);
4099
+ const D = "ry-theme-panel";
4099
4100
  class Bt extends u {
4100
4101
  #t = "default";
4101
4102
  #e = "auto";
@@ -4125,10 +4126,11 @@ class Bt extends u {
4125
4126
  this.#t === "default" ? delete t.dataset.ryTheme : t.dataset.ryTheme = this.#t, this.#e === "auto" ? t.style.removeProperty("color-scheme") : t.style.colorScheme = this.#e, this.#r();
4126
4127
  }
4127
4128
  #r() {
4128
- if (document.querySelectorAll("link[data-ry-theme-panel]").forEach((t) => t.remove()), this.#t === "ocean") {
4129
- if (document.querySelector('link[href*="ocean.css"]')) return;
4130
- const t = document.createElement("link");
4131
- t.rel = "stylesheet", t.href = this.#a("ocean.css"), t.setAttribute("data-ry-theme-panel", ""), document.head.appendChild(t);
4129
+ if (document.querySelectorAll("link[data-ry-theme-panel]").forEach((t) => t.remove()), this.#t !== "none" && this.#t !== "default") {
4130
+ const t = `${this.#t}.css`;
4131
+ if (document.querySelector(`link[href*="${t}"]`)) return;
4132
+ const e = document.createElement("link");
4133
+ e.rel = "stylesheet", e.href = this.#a(t), e.setAttribute("data-ry-theme-panel", ""), document.head.appendChild(e);
4132
4134
  }
4133
4135
  }
4134
4136
  #a(t) {
@@ -4152,7 +4154,7 @@ class Bt extends u {
4152
4154
  }
4153
4155
  #h() {
4154
4156
  try {
4155
- localStorage.setItem(H, JSON.stringify({
4157
+ localStorage.setItem(D, JSON.stringify({
4156
4158
  theme: this.#t,
4157
4159
  mode: this.#e
4158
4160
  }));
@@ -4161,7 +4163,7 @@ class Bt extends u {
4161
4163
  }
4162
4164
  #l() {
4163
4165
  try {
4164
- const t = localStorage.getItem(H);
4166
+ const t = localStorage.getItem(D);
4165
4167
  return t ? JSON.parse(t) : null;
4166
4168
  } catch {
4167
4169
  return null;
@@ -4176,6 +4178,7 @@ class Bt extends u {
4176
4178
  ${this.#n("theme-btn", "none", "None")}
4177
4179
  ${this.#n("theme-btn", "default", "Default")}
4178
4180
  ${this.#n("theme-btn", "ocean", "Ocean")}
4181
+ ${this.#n("theme-btn", "antigravity", "Antigravity")}
4179
4182
  </div>
4180
4183
  </div>
4181
4184
  <div data-ry-target="mode-row" class="ry-theme-panel__row">
@@ -4226,6 +4229,22 @@ class Rt extends u {
4226
4229
  }
4227
4230
  }
4228
4231
  customElements.define("ry-testimonial", Rt);
4232
+ class Pt extends u {
4233
+ setup() {
4234
+ this.#t();
4235
+ }
4236
+ #t() {
4237
+ if (this.$('[data-ry-target="title"]')) return;
4238
+ const t = this.querySelector('[slot="sub"]'), e = t?.innerHTML?.trim() ?? "";
4239
+ t?.remove();
4240
+ const s = this.innerHTML.trim();
4241
+ this.innerHTML = `
4242
+ <div data-ry-target="title" class="ry-heading__title">${s}</div>
4243
+ ${e ? `<div data-ry-target="sub" class="ry-heading__sub">${e}</div>` : ""}
4244
+ `;
4245
+ }
4246
+ }
4247
+ customElements.define("ry-heading", Pt);
4229
4248
  window.RyToast = f;
4230
4249
  console.log("ry-ui loaded");
4231
4250
  export {
@@ -4234,7 +4253,7 @@ export {
4234
4253
  N as RyButton,
4235
4254
  q as RyButtonGroup,
4236
4255
  V as RyCard,
4237
- Ht as RyCarousel,
4256
+ Dt as RyCarousel,
4238
4257
  at as RyCode,
4239
4258
  mt as RyColorInput,
4240
4259
  yt as RyColorPicker,
@@ -4246,14 +4265,15 @@ export {
4246
4265
  Tt as RyFeature,
4247
4266
  Lt as RyFeatureGrid,
4248
4267
  W as RyField,
4249
- kt as RyGradientPicker,
4268
+ $t as RyGradientPicker,
4269
+ Pt as RyHeading,
4250
4270
  Ct as RyHero,
4251
4271
  ot as RyIcon,
4252
4272
  pt as RyKnob,
4253
4273
  F as RyModal,
4254
4274
  gt as RyNumberSelect,
4255
- It as RyPricing,
4256
- Dt as RyPricingCard,
4275
+ Ht as RyPricing,
4276
+ It as RyPricingCard,
4257
4277
  et as RySelect,
4258
4278
  ut as RySlider,
4259
4279
  K as RySplit,
@@ -4271,10 +4291,10 @@ export {
4271
4291
  w as RyTree,
4272
4292
  _t as RyTreeItem,
4273
4293
  p as getIcon,
4274
- Ot as getIconNames,
4294
+ Nt as getIconNames,
4275
4295
  C as processTransforms,
4276
- Ft as registerIcon,
4277
- jt as registerIcons,
4296
+ jt as registerIcon,
4297
+ Ot as registerIcons,
4278
4298
  M as transform
4279
4299
  };
4280
4300
  //# sourceMappingURL=ry-ui.js.map