iryx-ui 0.18.0 → 0.18.1

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.
@@ -85,6 +85,8 @@ var x = ["data-iryx-field"], S = ["id"], C = ["id"], w = ["id"], T = /*@__PURE__
85
85
  O.value ? (p(), l("p", {
86
86
  key: 2,
87
87
  id: `${_(D)}-error`,
88
+ role: "alert",
89
+ "aria-live": "polite",
88
90
  class: f(P("error", T.ui?.error))
89
91
  }, g(O.value), 11, C)) : T.help ? (p(), l("p", {
90
92
  key: 3,
@@ -9,6 +9,7 @@ var T = [
9
9
  "id",
10
10
  "value",
11
11
  "type",
12
+ "spellcheck",
12
13
  "placeholder",
13
14
  "disabled",
14
15
  "required",
@@ -49,74 +50,80 @@ var T = [
49
50
  }),
50
51
  emits: ["update:modelValue"],
51
52
  setup(u, { expose: d }) {
52
- let D = u, O = y(u, "modelValue"), k = b(), A = r(), j = i(() => D.id ?? A?.id.value), M = i(() => D.invalid ?? A?.invalid.value ?? !1), N = e(), P = i(() => D.unstyled ?? N.unstyled), F = g(O.value), I;
53
- function L() {
54
- I !== void 0 && (clearTimeout(I), I = void 0);
53
+ let D = u, O = i(() => [
54
+ "email",
55
+ "url",
56
+ "tel",
57
+ "password"
58
+ ].includes(D.type) ? !1 : void 0), k = y(u, "modelValue"), A = b(), j = r(), M = i(() => D.id ?? j?.id.value), N = i(() => D.invalid ?? j?.invalid.value ?? !1), P = e(), F = i(() => D.unstyled ?? P.unstyled), I = g(k.value), L;
59
+ function R() {
60
+ L !== void 0 && (clearTimeout(L), L = void 0);
55
61
  }
56
- x(O, (e) => {
57
- L(), F.value = e;
62
+ x(k, (e) => {
63
+ R(), I.value = e;
58
64
  });
59
- function R(e) {
65
+ function z(e) {
60
66
  let t = e.target.value;
61
- if (F.value = t, L(), !D.debounce) {
62
- O.value = t;
67
+ if (I.value = t, R(), !D.debounce) {
68
+ k.value = t;
63
69
  return;
64
70
  }
65
- I = setTimeout(() => {
66
- I = void 0, O.value = t;
71
+ L = setTimeout(() => {
72
+ L = void 0, k.value = t;
67
73
  }, D.debounce);
68
74
  }
69
- function z() {
70
- I !== void 0 && (L(), O.value = F.value);
75
+ function B() {
76
+ L !== void 0 && (R(), k.value = I.value);
71
77
  }
72
- m(L);
73
- let B = g();
74
- function V() {
75
- L(), F.value = "", O.value = "", B.value?.focus();
78
+ m(R);
79
+ let V = g();
80
+ function H() {
81
+ R(), I.value = "", k.value = "", V.value?.focus();
76
82
  }
77
- d({ input: B });
78
- let H = i(() => F.value !== "" && F.value != null), U = i(() => D.clearable && H.value && !D.disabled), W = i(() => D.loading || U.value || !!k.trailing), G = i(() => n({
83
+ d({ input: V });
84
+ let U = i(() => I.value !== "" && I.value != null), W = i(() => D.clearable && U.value && !D.disabled), G = i(() => D.loading || W.value || !!A.trailing), K = i(() => n({
79
85
  size: D.size,
80
- invalid: M.value
86
+ invalid: N.value
81
87
  }));
82
- function K(e, t) {
88
+ function q(e, t) {
83
89
  let n = D.ui?.[e];
84
- return P.value ? [n, t] : G.value[e]({ class: [n, t] });
90
+ return F.value ? [n, t] : K.value[e]({ class: [n, t] });
85
91
  }
86
- return (e, n) => (h(), s("div", { class: p(K("root", D.class)) }, [
87
- v(k).leading ? (h(), s("span", {
92
+ return (e, n) => (h(), s("div", { class: p(q("root", D.class)) }, [
93
+ v(A).leading ? (h(), s("span", {
88
94
  key: 0,
89
- class: p(K("leading"))
95
+ class: p(q("leading"))
90
96
  }, [_(e.$slots, "leading")], 2)) : o("", !0),
91
97
  c("input", f({
92
- id: j.value,
98
+ id: M.value,
93
99
  ref_key: "inputEl",
94
- ref: B,
95
- value: F.value,
100
+ ref: V,
101
+ value: I.value,
96
102
  type: D.type,
103
+ spellcheck: O.value,
97
104
  placeholder: D.placeholder,
98
105
  disabled: D.disabled,
99
106
  required: D.required,
100
- "aria-invalid": M.value || void 0,
101
- "aria-describedby": v(A)?.describedBy.value,
102
- class: K("input")
107
+ "aria-invalid": N.value || void 0,
108
+ "aria-describedby": v(j)?.describedBy.value,
109
+ class: q("input")
103
110
  }, e.$attrs, {
104
- onInput: R,
105
- onBlur: z,
106
- onKeydown: S(z, ["enter"])
111
+ onInput: z,
112
+ onBlur: B,
113
+ onKeydown: S(B, ["enter"])
107
114
  }), null, 16, T),
108
- W.value ? (h(), s("span", {
115
+ G.value ? (h(), s("span", {
109
116
  key: 1,
110
- class: p(K("trailing"))
117
+ class: p(q("trailing"))
111
118
  }, [
112
119
  _(e.$slots, "trailing"),
113
- U.value ? (h(), s("button", {
120
+ W.value ? (h(), s("button", {
114
121
  key: 0,
115
122
  type: "button",
116
123
  tabindex: "-1",
117
124
  "aria-label": D.clearLabel,
118
- class: p(K("clear")),
119
- onClick: V
125
+ class: p(q("clear")),
126
+ onClick: H
120
127
  }, [l(t, { icon: v(C) }, null, 8, ["icon"])], 10, E)) : o("", !0),
121
128
  D.loading ? (h(), a(t, {
122
129
  key: 1,
@@ -74,7 +74,8 @@ var w = [
74
74
  invalid: f.invalid,
75
75
  unstyled: f.unstyled,
76
76
  ui: { input: N.value },
77
- autocomplete: "current-password"
77
+ autocomplete: "current-password",
78
+ spellcheck: "false"
78
79
  }, e.$attrs), l({ _: 2 }, [f.toggle ? {
79
80
  name: "trailing",
80
81
  fn: x(() => [c("button", {
@@ -53,6 +53,7 @@ var y = /*@__PURE__*/ l({
53
53
  }, {
54
54
  default: g(() => [(d(!0), o(n, null, f(w.value, (t) => (d(), o(n, { key: t }, [c(h(_), {
55
55
  index: t,
56
+ spellcheck: "false",
56
57
  "aria-invalid": b.invalid || void 0,
57
58
  class: u(A.value)
58
59
  }, null, 8, [
@@ -19,7 +19,7 @@ export declare const buttonTheme: import("tailwind-variants").TVReturnType<{
19
19
  block: {
20
20
  true: string;
21
21
  };
22
- }, undefined, "inline-flex shrink-0 items-center justify-center gap-2 rounded-xl border border-transparent font-medium no-underline transition-[color,background-color,border-color,box-shadow,opacity,filter,translate] outline-none focus-visible:ring-2 focus-visible:ring-primary/50 active:translate-y-px disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0", {
22
+ }, undefined, "inline-flex shrink-0 touch-manipulation items-center justify-center gap-2 rounded-xl border border-transparent font-medium no-underline transition-[color,background-color,border-color,box-shadow,opacity,filter,translate] outline-none focus-visible:ring-2 focus-visible:ring-primary/50 active:translate-y-px disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0", {
23
23
  variant: {
24
24
  solid: string;
25
25
  outline: string;
@@ -61,5 +61,5 @@ export declare const buttonTheme: import("tailwind-variants").TVReturnType<{
61
61
  block: {
62
62
  true: string;
63
63
  };
64
- }, undefined, "inline-flex shrink-0 items-center justify-center gap-2 rounded-xl border border-transparent font-medium no-underline transition-[color,background-color,border-color,box-shadow,opacity,filter,translate] outline-none focus-visible:ring-2 focus-visible:ring-primary/50 active:translate-y-px disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0", unknown, unknown, undefined>>;
64
+ }, undefined, "inline-flex shrink-0 touch-manipulation items-center justify-center gap-2 rounded-xl border border-transparent font-medium no-underline transition-[color,background-color,border-color,box-shadow,opacity,filter,translate] outline-none focus-visible:ring-2 focus-visible:ring-primary/50 active:translate-y-px disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0", unknown, unknown, undefined>>;
65
65
  export type ButtonVariants = Parameters<typeof buttonTheme>[0];
@@ -1,7 +1,7 @@
1
1
  import { tv as e } from "tailwind-variants";
2
2
  //#region src/theme/button.ts
3
3
  var t = e({
4
- base: "inline-flex shrink-0 items-center justify-center gap-2 rounded-xl border border-transparent font-medium no-underline transition-[color,background-color,border-color,box-shadow,opacity,filter,translate] outline-none focus-visible:ring-2 focus-visible:ring-primary/50 active:translate-y-px disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
4
+ base: "inline-flex shrink-0 touch-manipulation items-center justify-center gap-2 rounded-xl border border-transparent font-medium no-underline transition-[color,background-color,border-color,box-shadow,opacity,filter,translate] outline-none focus-visible:ring-2 focus-visible:ring-primary/50 active:translate-y-px disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
5
5
  variants: {
6
6
  variant: {
7
7
  solid: "bg-linear-to-b from-primary-from to-primary-to text-primary-foreground hover:brightness-110 active:brightness-95",
@@ -3,7 +3,7 @@ import { tv as e } from "tailwind-variants";
3
3
  var t = e({
4
4
  slots: {
5
5
  wrapper: "flex items-start gap-2.5",
6
- root: "peer flex shrink-0 cursor-pointer items-center justify-center rounded border border-border bg-background text-primary-foreground transition-colors outline-none focus:ring-2 focus:ring-primary/50 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=indeterminate]:border-primary data-[state=indeterminate]:bg-primary",
6
+ root: "peer flex shrink-0 cursor-pointer items-center justify-center rounded border border-border bg-background text-primary-foreground transition-colors outline-none focus-visible:ring-2 focus-visible:ring-primary/50 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=indeterminate]:border-primary data-[state=indeterminate]:bg-primary",
7
7
  indicator: "flex items-center justify-center text-current",
8
8
  content: "grid gap-1",
9
9
  label: "text-sm leading-5 font-medium text-foreground select-none",
@@ -4,7 +4,7 @@ import { tv as t } from "tailwind-variants";
4
4
  var n = t({
5
5
  slots: {
6
6
  root: `inline-flex items-center gap-0.5 ${e} w-auto focus-within:ring-2 focus-within:ring-primary/50`,
7
- segment: "rounded px-0.5 text-foreground tabular-nums outline-none focus:bg-primary focus:text-primary-foreground data-[disabled]:cursor-not-allowed",
7
+ segment: "rounded px-0.5 text-foreground tabular-nums outline-none focus-visible:bg-primary focus-visible:text-primary-foreground data-[disabled]:cursor-not-allowed",
8
8
  literal: "text-muted-foreground"
9
9
  },
10
10
  variants: {
@@ -3,7 +3,7 @@ import { tv as e } from "tailwind-variants";
3
3
  var t = e({
4
4
  slots: {
5
5
  overlay: "fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-fade-out data-[state=open]:animate-fade-in",
6
- content: "fixed top-1/2 left-1/2 z-50 flex max-h-[calc(100dvh-2rem)] w-[calc(100vw-2rem)] -translate-x-1/2 -translate-y-1/2 flex-col gap-4 rounded-2xl border border-border bg-background p-6 text-foreground shadow-lg outline-none data-[state=closed]:animate-dialog-out data-[state=open]:animate-dialog-in",
6
+ content: "fixed top-1/2 left-1/2 z-50 flex max-h-[calc(100dvh-2rem)] w-[calc(100vw-2rem)] -translate-x-1/2 -translate-y-1/2 flex-col gap-4 overscroll-contain rounded-2xl border border-border bg-background p-6 text-foreground shadow-lg outline-none data-[state=closed]:animate-dialog-out data-[state=open]:animate-dialog-in",
7
7
  header: "flex flex-col gap-1",
8
8
  title: "text-base leading-none font-semibold",
9
9
  description: "text-sm text-muted-foreground",
@@ -3,7 +3,7 @@ import { tv as e } from "tailwind-variants";
3
3
  var t = e({
4
4
  slots: {
5
5
  overlay: "fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-fade-out data-[state=open]:animate-fade-in",
6
- content: "iryx-drawer fixed z-50 flex touch-none flex-col gap-4 border-border bg-background p-6 text-foreground shadow-lg outline-none",
6
+ content: "iryx-drawer fixed z-50 flex touch-none flex-col gap-4 overscroll-contain border-border bg-background p-6 text-foreground shadow-lg outline-none",
7
7
  handle: "shrink-0 rounded-full bg-border",
8
8
  header: "flex flex-col gap-1",
9
9
  title: "text-base leading-none font-semibold",
@@ -4,7 +4,7 @@ var t = e({
4
4
  slots: {
5
5
  root: "",
6
6
  wrapper: "flex items-start gap-2.5",
7
- item: "aspect-square shrink-0 cursor-pointer rounded-full border border-border bg-background transition-colors outline-none focus:ring-2 focus:ring-primary/50 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-primary",
7
+ item: "aspect-square shrink-0 cursor-pointer rounded-full border border-border bg-background transition-colors outline-none focus-visible:ring-2 focus-visible:ring-primary/50 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-primary",
8
8
  indicator: "flex size-full items-center justify-center after:block after:rounded-full after:bg-primary",
9
9
  content: "grid gap-1",
10
10
  label: "text-sm leading-5 text-foreground select-none",
@@ -3,7 +3,7 @@ import { tv as e } from "tailwind-variants";
3
3
  var t = e({
4
4
  slots: {
5
5
  wrapper: "flex items-start gap-2.5",
6
- root: "inline-flex shrink-0 cursor-pointer items-center rounded-full transition-colors outline-none focus:ring-2 focus:ring-primary/50 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-muted",
6
+ root: "inline-flex shrink-0 cursor-pointer items-center rounded-full transition-colors outline-none focus-visible:ring-2 focus-visible:ring-primary/50 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-muted",
7
7
  thumb: "pointer-events-none block rounded-full bg-background shadow-sm transition-transform data-[state=unchecked]:translate-x-0.5",
8
8
  content: "grid gap-1",
9
9
  label: "text-sm leading-5 font-medium text-foreground select-none",
@@ -4,7 +4,7 @@ import { tv as t } from "tailwind-variants";
4
4
  var n = t({
5
5
  slots: {
6
6
  root: `inline-flex items-center gap-0.5 ${e} w-auto focus-within:ring-2 focus-within:ring-primary/50`,
7
- segment: "rounded px-0.5 text-foreground tabular-nums outline-none focus:bg-primary focus:text-primary-foreground data-[disabled]:cursor-not-allowed",
7
+ segment: "rounded px-0.5 text-foreground tabular-nums outline-none focus-visible:bg-primary focus-visible:text-primary-foreground data-[disabled]:cursor-not-allowed",
8
8
  literal: "text-muted-foreground"
9
9
  },
10
10
  variants: {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "iryx-ui",
3
3
  "type": "module",
4
- "version": "0.18.0",
4
+ "version": "0.18.1",
5
5
  "description": "A Vue 3 component library built on Reka UI and Tailwind CSS v4.",
6
6
  "author": "therok1",
7
7
  "license": "MIT",
package/theme.css CHANGED
@@ -19,6 +19,8 @@
19
19
  @custom-variant dark (&:where(.dark, .dark *));
20
20
 
21
21
  :root {
22
+ color-scheme: light;
23
+
22
24
  /*
23
25
  * Typeface. The library ships no webfont — that would put font files, a
24
26
  * licence and a network request in every consumer's bundle whether they
@@ -104,6 +106,8 @@
104
106
  }
105
107
 
106
108
  .dark {
109
+ color-scheme: dark;
110
+
107
111
  /* Neutral surfaces — shadcn/ui "zinc" palette. */
108
112
  --iryx-background: oklch(0.145 0 0);
109
113
  --iryx-foreground: oklch(0.985 0 0);