@mzc-fe/design-system 0.0.9 → 0.0.10-rc.0

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.
@@ -15,7 +15,7 @@ const l = i(
15
15
  variants: {
16
16
  variant: {
17
17
  default: "bg-card text-card-foreground",
18
- destructive: "text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"
18
+ destructive: "text-error bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-error/90"
19
19
  }
20
20
  },
21
21
  defaultVariants: {
@@ -26,7 +26,7 @@ const l = i(
26
26
  function g({ className: t, variant: r, ...s }) {
27
27
  return /* @__PURE__ */ e("div", { "data-slot": "alert", role: "alert", className: a(l({ variant: r }), t), ...s });
28
28
  }
29
- function u({ className: t, ...r }) {
29
+ function m({ className: t, ...r }) {
30
30
  return /* @__PURE__ */ e(
31
31
  "div",
32
32
  {
@@ -36,7 +36,7 @@ function u({ className: t, ...r }) {
36
36
  }
37
37
  );
38
38
  }
39
- function m({ className: t, ...r }) {
39
+ function u({ className: t, ...r }) {
40
40
  return /* @__PURE__ */ e(
41
41
  "div",
42
42
  {
@@ -51,6 +51,6 @@ function m({ className: t, ...r }) {
51
51
  }
52
52
  export {
53
53
  g as Alert,
54
- m as AlertDescription,
55
- u as AlertTitle
54
+ u as AlertDescription,
55
+ m as AlertTitle
56
56
  };
@@ -1,6 +1,6 @@
1
- import { jsx as a } from "react/jsx-runtime";
1
+ import { jsx as i } from "react/jsx-runtime";
2
2
  import "react";
3
- import { Slot as o } from "@radix-ui/react-slot";
3
+ import { Slot as t } from "@radix-ui/react-slot";
4
4
  import { cva as n } from "class-variance-authority";
5
5
  import { cn as s } from "../../lib/utils.js";
6
6
  const d = n(
@@ -10,8 +10,8 @@ const d = n(
10
10
  "rounded-full border border-border",
11
11
  "transition-[color,box-shadow]",
12
12
  "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
13
- "aria-invalid:ring-destructive/20 aria-invalid:border-destructive",
14
- "dark:aria-invalid:ring-destructive/40",
13
+ "aria-invalid:ring-error/20 aria-invalid:border-error",
14
+ "dark:aria-invalid:ring-error/40",
15
15
  "[&>svg]:size-3 [&>svg]:pointer-events-none"
16
16
  ],
17
17
  {
@@ -20,11 +20,11 @@ const d = n(
20
20
  default: ["border-transparent bg-primary text-primary-foreground", "[a&]:hover:bg-primary/90"],
21
21
  secondary: ["border-transparent bg-secondary text-secondary-foreground", "[a&]:hover:bg-secondary/90"],
22
22
  destructive: [
23
- "border-transparent bg-destructive text-white",
24
- "[a&]:hover:bg-destructive/90",
25
- "focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60"
23
+ "border-transparent bg-error text-white",
24
+ "[a&]:hover:bg-error/90",
25
+ "focus-visible:ring-error/20 dark:focus-visible:ring-error/40 dark:bg-error/60"
26
26
  ],
27
- outline: ["text-foreground", "[a&]:hover:bg-accent [a&]:hover:text-accent-foreground"]
27
+ outline: ["text-foreground", "[a&]:hover:bg-accent-1 [a&]:hover:text-accent-foreground"]
28
28
  }
29
29
  },
30
30
  defaultVariants: {
@@ -32,10 +32,10 @@ const d = n(
32
32
  }
33
33
  }
34
34
  );
35
- function l({ className: r, variant: e, asChild: t = !1, ...i }) {
36
- return /* @__PURE__ */ a(t ? o : "span", { "data-slot": "badge", className: s(d({ variant: e }), r), ...i });
35
+ function v({ className: r, variant: e, asChild: o = !1, ...a }) {
36
+ return /* @__PURE__ */ i(o ? t : "span", { "data-slot": "badge", className: s(d({ variant: e }), r), ...a });
37
37
  }
38
38
  export {
39
- l as Badge,
39
+ v as Badge,
40
40
  d as badgeVariants
41
41
  };
@@ -1,9 +1,9 @@
1
- import { jsx as o } from "react/jsx-runtime";
1
+ import { jsx as n } from "react/jsx-runtime";
2
2
  import "react";
3
3
  import { Slot as a } from "@radix-ui/react-slot";
4
4
  import { cva as s } from "class-variance-authority";
5
5
  import { cn as d } from "../../lib/utils.js";
6
- const u = s(
6
+ const g = s(
7
7
  [
8
8
  "inline-flex items-center justify-center gap-2 shrink-0 rounded-md",
9
9
  "whitespace-nowrap text-sm font-medium",
@@ -11,26 +11,26 @@ const u = s(
11
11
  "disabled:pointer-events-none disabled:opacity-50",
12
12
  "[&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0",
13
13
  "outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
14
- "aria-invalid:ring-destructive/20 aria-invalid:border-destructive",
15
- "dark:aria-invalid:ring-destructive/40"
14
+ "aria-invalid:ring-error/20 aria-invalid:border-error",
15
+ "dark:aria-invalid:ring-error/40"
16
16
  ],
17
17
  {
18
18
  variants: {
19
19
  variant: {
20
20
  default: ["bg-primary text-primary-foreground", "hover:bg-primary/90"],
21
21
  destructive: [
22
- "bg-destructive dark:bg-destructive/60 text-white",
23
- "hover:bg-destructive/90",
24
- "focus-visible:ring-destructive/20",
25
- "dark:focus-visible:ring-destructive/40 dark:bg-destructive/60"
22
+ "bg-error dark:bg-error/60 text-white",
23
+ "hover:bg-error/90",
24
+ "focus-visible:ring-error/20",
25
+ "dark:focus-visible:ring-error/40 dark:bg-error/60"
26
26
  ],
27
27
  outline: [
28
28
  "border border-border bg-background shadow-xs",
29
- "hover:bg-accent hover:text-accent-foreground",
29
+ "hover:bg-accent-1 dark:hover:bg-input/50 hover:text-accent-foreground",
30
30
  "dark:bg-input/30 dark:border-input dark:hover:bg-input/50"
31
31
  ],
32
32
  secondary: ["bg-secondary text-secondary-foreground", "hover:bg-secondary/80"],
33
- ghost: ["hover:bg-accent hover:text-accent-foreground", "dark:hover:bg-accent/50"],
33
+ ghost: ["hover:bg-accent-1 hover:text-accent-foreground"],
34
34
  link: ["text-primary underline-offset-4", "hover:underline"]
35
35
  },
36
36
  size: {
@@ -48,19 +48,19 @@ const u = s(
48
48
  }
49
49
  }
50
50
  );
51
- function f({ className: t, variant: e = "default", size: r = "default", asChild: i = !1, ...n }) {
52
- return /* @__PURE__ */ o(
51
+ function f({ className: o, variant: r = "default", size: e = "default", asChild: i = !1, ...t }) {
52
+ return /* @__PURE__ */ n(
53
53
  i ? a : "button",
54
54
  {
55
55
  "data-slot": "button",
56
- "data-variant": e,
57
- "data-size": r,
58
- className: d(u({ variant: e, size: r, className: t })),
59
- ...n
56
+ "data-variant": r,
57
+ "data-size": e,
58
+ className: d(g({ variant: r, size: e, className: o })),
59
+ ...t
60
60
  }
61
61
  );
62
62
  }
63
63
  export {
64
64
  f as Button,
65
- u as buttonVariants
65
+ g as buttonVariants
66
66
  };
@@ -32,15 +32,9 @@ function j({
32
32
  },
33
33
  classNames: {
34
34
  root: e("w-fit", t.root),
35
- months: e(
36
- "flex gap-4 flex-col md:flex-row relative",
37
- t.months
38
- ),
35
+ months: e("flex gap-4 flex-col md:flex-row relative", t.months),
39
36
  month: e("flex flex-col w-full gap-4", t.month),
40
- nav: e(
41
- "flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between",
42
- t.nav
43
- ),
37
+ nav: e("flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between", t.nav),
44
38
  button_previous: e(
45
39
  f({ variant: s }),
46
40
  "size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",
@@ -63,10 +57,7 @@ function j({
63
57
  "relative has-focus:border-ring border border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] rounded-md",
64
58
  t.dropdown_root
65
59
  ),
66
- dropdown: e(
67
- "absolute bg-popover inset-0 opacity-0",
68
- t.dropdown
69
- ),
60
+ dropdown: e("absolute bg-popover inset-0 opacity-0", t.dropdown),
70
61
  caption_label: e(
71
62
  "select-none font-medium",
72
63
  l === "label" ? "text-sm" : "rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-muted-foreground [&>svg]:size-3.5",
@@ -79,57 +70,28 @@ function j({
79
70
  t.weekday
80
71
  ),
81
72
  week: e("flex w-full mt-2", t.week),
82
- week_number_header: e(
83
- "select-none w-(--cell-size)",
84
- t.week_number_header
85
- ),
86
- week_number: e(
87
- "text-[0.8rem] select-none text-muted-foreground",
88
- t.week_number
89
- ),
73
+ week_number_header: e("select-none w-(--cell-size)", t.week_number_header),
74
+ week_number: e("text-[0.8rem] select-none text-muted-foreground", t.week_number),
90
75
  day: e(
91
76
  "relative w-full h-full p-0 text-center [&:last-child[data-selected=true]_button]:rounded-r-md group/day aspect-square select-none",
92
77
  g.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-md" : "[&:first-child[data-selected=true]_button]:rounded-l-md",
93
78
  t.day
94
79
  ),
95
- range_start: e(
96
- "rounded-l-md bg-accent",
97
- t.range_start
98
- ),
80
+ range_start: e("rounded-l-md bg-accent-1", t.range_start),
99
81
  range_middle: e("rounded-none", t.range_middle),
100
- range_end: e("rounded-r-md bg-accent", t.range_end),
82
+ range_end: e("rounded-r-md bg-accent-1", t.range_end),
101
83
  today: e(
102
- "bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",
84
+ "bg-accent-1 text-accent-foreground rounded-md data-[selected=true]:rounded-none",
103
85
  t.today
104
86
  ),
105
- outside: e(
106
- "text-muted-foreground aria-selected:text-muted-foreground",
107
- t.outside
108
- ),
109
- disabled: e(
110
- "text-muted-foreground opacity-50",
111
- t.disabled
112
- ),
87
+ outside: e("text-muted-foreground aria-selected:text-muted-foreground", t.outside),
88
+ disabled: e("text-muted-foreground opacity-50", t.disabled),
113
89
  hidden: e("invisible", t.hidden),
114
90
  ...i
115
91
  },
116
92
  components: {
117
- Root: ({ className: a, rootRef: d, ...o }) => /* @__PURE__ */ n(
118
- "div",
119
- {
120
- "data-slot": "calendar",
121
- ref: d,
122
- className: e(a),
123
- ...o
124
- }
125
- ),
126
- Chevron: ({ className: a, orientation: d, ...o }) => d === "left" ? /* @__PURE__ */ n(b, { className: e("size-4", a), ...o }) : d === "right" ? /* @__PURE__ */ n(
127
- h,
128
- {
129
- className: e("size-4", a),
130
- ...o
131
- }
132
- ) : /* @__PURE__ */ n(w, { className: e("size-4", a), ...o }),
93
+ Root: ({ className: a, rootRef: d, ...o }) => /* @__PURE__ */ n("div", { "data-slot": "calendar", ref: d, className: e(a), ...o }),
94
+ Chevron: ({ className: a, orientation: d, ...o }) => d === "left" ? /* @__PURE__ */ n(b, { className: e("size-4", a), ...o }) : d === "right" ? /* @__PURE__ */ n(h, { className: e("size-4", a), ...o }) : /* @__PURE__ */ n(w, { className: e("size-4", a), ...o }),
133
95
  DayButton: v,
134
96
  WeekNumber: ({ children: a, ...d }) => /* @__PURE__ */ n("td", { ...d, children: /* @__PURE__ */ n("div", { className: "flex size-(--cell-size) items-center justify-center text-center", children: a }) }),
135
97
  ...x
@@ -138,12 +100,7 @@ function j({
138
100
  }
139
101
  );
140
102
  }
141
- function v({
142
- className: c,
143
- day: i,
144
- modifiers: r,
145
- ...l
146
- }) {
103
+ function v({ className: c, day: i, modifiers: r, ...l }) {
147
104
  const s = p(), u = m.useRef(null);
148
105
  return m.useEffect(() => {
149
106
  r.focused && u.current?.focus();
@@ -159,7 +116,7 @@ function v({
159
116
  "data-range-end": r.range_end,
160
117
  "data-range-middle": r.range_middle,
161
118
  className: e(
162
- "data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 dark:hover:text-accent-foreground flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:text-xs [&>span]:opacity-70",
119
+ "data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent-1 data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 dark:hover:text-accent-foreground flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:text-xs [&>span]:opacity-70",
163
120
  s.day,
164
121
  c
165
122
  ),
@@ -1,32 +1,32 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
2
  import "react";
3
- import * as t from "@radix-ui/react-checkbox";
4
- import { MinusIcon as d, CheckIcon as n } from "lucide-react";
5
- import { cn as o } from "../../lib/utils.js";
6
- function b({ className: a, checked: e, ...i }) {
3
+ import * as a from "@radix-ui/react-checkbox";
4
+ import { MinusIcon as o, CheckIcon as n } from "lucide-react";
5
+ import { cn as d } from "../../lib/utils.js";
6
+ function b({ className: i, checked: e, ...t }) {
7
7
  return /* @__PURE__ */ r(
8
- t.Root,
8
+ a.Root,
9
9
  {
10
10
  "data-slot": "checkbox",
11
- className: o(
11
+ className: d(
12
12
  "peer size-4 shrink-0 rounded-[4px]",
13
13
  "border-input border shadow-xs transition-shadow outline-none",
14
14
  "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
15
- "aria-invalid:border-destructive aria-invalid:ring-destructive/20",
15
+ "aria-invalid:border-error aria-invalid:ring-error/20",
16
16
  "data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
17
17
  "data-[state=indeterminate]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground",
18
18
  "disabled:cursor-not-allowed disabled:opacity-50",
19
- "dark:bg-input/30 dark:data-[state=checked]:bg-primary dark:data-[state=indeterminate]:bg-primary dark:aria-invalid:ring-destructive/40",
20
- a
19
+ "dark:bg-input/30 dark:data-[state=checked]:bg-primary dark:data-[state=indeterminate]:bg-primary dark:aria-invalid:ring-error/40",
20
+ i
21
21
  ),
22
22
  checked: e,
23
- ...i,
23
+ ...t,
24
24
  children: /* @__PURE__ */ r(
25
- t.Indicator,
25
+ a.Indicator,
26
26
  {
27
27
  "data-slot": "checkbox-indicator",
28
28
  className: "grid place-content-center text-current transition-none",
29
- children: e === "indeterminate" ? /* @__PURE__ */ r(d, { className: "size-3.5" }) : /* @__PURE__ */ r(n, { className: "size-3.5" })
29
+ children: e === "indeterminate" ? /* @__PURE__ */ r(o, { className: "size-3.5" }) : /* @__PURE__ */ r(n, { className: "size-3.5" })
30
30
  }
31
31
  )
32
32
  }
@@ -140,7 +140,7 @@ function Ve({
140
140
  "data-slot": "combobox-trigger",
141
141
  className: g(
142
142
  "border-input dark:bg-input/30 dark:hover:bg-input/50 flex w-full items-center gap-2 rounded-md border bg-transparent px-4 text-sm font-medium shadow-xs transition-[color,box-shadow] outline-none",
143
- "hover:bg-accent/50",
143
+ "hover:bg-accent-1/50",
144
144
  "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
145
145
  "active:opacity-60",
146
146
  "disabled:cursor-not-allowed disabled:opacity-50",
@@ -303,7 +303,7 @@ function Be({
303
303
  "data-slot": "combobox-item",
304
304
  "data-selected": m,
305
305
  className: g(
306
- "data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
306
+ "data-[selected=true]:bg-accent-1 data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
307
307
  a
308
308
  ),
309
309
  value: o,
@@ -91,7 +91,7 @@ function z({ className: e, ...t }) {
91
91
  {
92
92
  "data-slot": "command-item",
93
93
  className: r(
94
- "data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
94
+ "data-[selected=true]:bg-accent-1 data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
95
95
  e
96
96
  ),
97
97
  ...t
@@ -33,7 +33,7 @@ function z({
33
33
  "data-slot": "context-menu-sub-trigger",
34
34
  "data-inset": n,
35
35
  className: r(
36
- "focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
36
+ "focus:bg-accent-1 focus:text-accent-foreground data-[state=open]:bg-accent-1 data-[state=open]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
37
37
  t
38
38
  ),
39
39
  ...s,
@@ -94,7 +94,7 @@ function _({
94
94
  "data-inset": n,
95
95
  "data-variant": a,
96
96
  className: r(
97
- "focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
97
+ "focus:bg-accent-1 focus:text-accent-foreground data-[variant=destructive]:text-error data-[variant=destructive]:focus:bg-error/10 dark:data-[variant=destructive]:focus:bg-error/20 data-[variant=destructive]:focus:text-error data-[variant=destructive]:*:[svg]:!text-error [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
98
98
  t
99
99
  ),
100
100
  ...s
@@ -112,7 +112,7 @@ function I({
112
112
  {
113
113
  "data-slot": "context-menu-checkbox-item",
114
114
  className: r(
115
- "focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
115
+ "focus:bg-accent-1 focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
116
116
  t
117
117
  ),
118
118
  checked: a,
@@ -134,7 +134,7 @@ function y({
134
134
  {
135
135
  "data-slot": "context-menu-radio-item",
136
136
  className: r(
137
- "focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
137
+ "focus:bg-accent-1 focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
138
138
  t
139
139
  ),
140
140
  ...a,
@@ -64,7 +64,7 @@ function N({ className: a, children: o, showCloseButton: r = !0, size: l, ...d }
64
64
  e.Close,
65
65
  {
66
66
  "data-slot": "dialog-close",
67
- className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
67
+ className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent-1 data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
68
68
  children: [
69
69
  /* @__PURE__ */ t(c, {}),
70
70
  /* @__PURE__ */ t("span", { className: "sr-only", children: "Close" })
@@ -54,10 +54,10 @@ function z({
54
54
  className: r(
55
55
  "relative flex items-center gap-2 rounded-sm px-2 py-1.5",
56
56
  "text-sm outline-hidden select-none",
57
- "focus:bg-accent focus:text-accent-foreground cursor-default",
57
+ "focus:bg-accent-1 focus:text-accent-foreground cursor-default",
58
58
  "data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8",
59
- "data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive",
60
- "dark:data-[variant=destructive]:focus:bg-destructive/20",
59
+ "data-[variant=destructive]:text-error data-[variant=destructive]:focus:bg-error/10 data-[variant=destructive]:focus:text-error data-[variant=destructive]:*:[svg]:!text-error",
60
+ "dark:data-[variant=destructive]:focus:bg-error/20",
61
61
  "[&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
62
62
  e
63
63
  ),
@@ -78,7 +78,7 @@ function D({
78
78
  className: r(
79
79
  "relative flex items-center gap-2 rounded-sm py-1.5 pr-2 pl-8",
80
80
  "text-sm outline-hidden select-none",
81
- "focus:bg-accent focus:text-accent-foreground cursor-default",
81
+ "focus:bg-accent-1 focus:text-accent-foreground cursor-default",
82
82
  "data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
83
83
  "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
84
84
  e
@@ -107,7 +107,7 @@ function _({
107
107
  className: r(
108
108
  "relative flex items-center gap-2 rounded-sm py-1.5 pr-2 pl-8",
109
109
  "text-sm outline-hidden select-none",
110
- "focus:bg-accent focus:text-accent-foreground cursor-default",
110
+ "focus:bg-accent-1 focus:text-accent-foreground cursor-default",
111
111
  "data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
112
112
  "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
113
113
  e
@@ -172,8 +172,8 @@ function C({
172
172
  className: r(
173
173
  "flex items-center gap-2 rounded-sm px-2 py-1.5",
174
174
  "text-sm outline-hidden select-none",
175
- "focus:bg-accent focus:text-accent-foreground cursor-default",
176
- "data-[state=open]:bg-accent data-[state=open]:text-accent-foreground data-[inset]:pl-8",
175
+ "focus:bg-accent-1 focus:text-accent-foreground cursor-default",
176
+ "data-[state=open]:bg-accent-1 data-[state=open]:text-accent-foreground data-[inset]:pl-8",
177
177
  "[&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
178
178
  e
179
179
  ),
@@ -46,7 +46,7 @@ function y({ className: t, ...e }) {
46
46
  }
47
47
  );
48
48
  }
49
- const g = c("group/field flex w-full gap-3 data-[invalid=true]:text-destructive", {
49
+ const g = c("group/field flex w-full gap-3 data-[invalid=true]:text-error", {
50
50
  variants: {
51
51
  orientation: {
52
52
  vertical: ["flex-col [&>*]:w-full [&>.sr-only]:w-auto"],
@@ -165,26 +165,17 @@ function V({
165
165
  className: t,
166
166
  children: e,
167
167
  errors: o,
168
- ...s
168
+ ...n
169
169
  }) {
170
170
  const i = u(() => {
171
171
  if (e)
172
172
  return e;
173
173
  if (!o?.length)
174
174
  return null;
175
- const r = [...new Map(o.map((d) => [d?.message, d])).values()];
176
- return r?.length == 1 ? r[0]?.message : /* @__PURE__ */ a("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: r.map((d, n) => d?.message && /* @__PURE__ */ a("li", { children: d.message }, n)) });
175
+ const d = [...new Map(o.map((r) => [r?.message, r])).values()];
176
+ return d?.length == 1 ? d[0]?.message : /* @__PURE__ */ a("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: d.map((r, s) => r?.message && /* @__PURE__ */ a("li", { children: r.message }, s)) });
177
177
  }, [e, o]);
178
- return i ? /* @__PURE__ */ a(
179
- "div",
180
- {
181
- role: "alert",
182
- "data-slot": "field-error",
183
- className: l("text-destructive text-sm font-normal", t),
184
- ...s,
185
- children: i
186
- }
187
- ) : null;
178
+ return i ? /* @__PURE__ */ a("div", { role: "alert", "data-slot": "field-error", className: l("text-error text-sm font-normal", t), ...n, children: i }) : null;
188
179
  }
189
180
  export {
190
181
  L as Field,
@@ -50,4 +50,4 @@ declare function FormControl({ ...props }: React.ComponentProps<typeof Slot>): i
50
50
  declare function FormDescription({ className, ...props }: React.ComponentProps<"p">): import("react/jsx-runtime").JSX.Element;
51
51
  /** 폼 필드의 유효성 검증 메시지 컴포넌트입니다. */
52
52
  declare function FormMessage({ className, ...props }: React.ComponentProps<"p">): import("react/jsx-runtime").JSX.Element | null;
53
- export { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField, };
53
+ export { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField };
@@ -4,15 +4,13 @@ import { Slot as f } from "@radix-ui/react-slot";
4
4
  import { FormProvider as u, useFormContext as F, useFormState as x, Controller as I } from "react-hook-form";
5
5
  import { cn as a } from "../../lib/utils.js";
6
6
  import { Label as g } from "../label/label.js";
7
- const S = u, c = s.createContext(
8
- {}
9
- ), $ = ({
7
+ const S = u, c = s.createContext({}), $ = ({
10
8
  ...e
11
9
  }) => /* @__PURE__ */ m(c.Provider, { value: { name: e.name }, children: /* @__PURE__ */ m(I, { ...e }) }), d = () => {
12
- const e = s.useContext(c), t = s.useContext(l), { getFieldState: r } = F(), o = x({ name: e.name }), n = r(e.name, o);
10
+ const e = s.useContext(c), r = s.useContext(l), { getFieldState: t } = F(), o = x({ name: e.name }), n = t(e.name, o);
13
11
  if (!e)
14
12
  throw new Error("useFormField should be used within <FormField>");
15
- const { id: i } = t;
13
+ const { id: i } = r;
16
14
  return {
17
15
  id: i,
18
16
  name: e.name,
@@ -21,73 +19,52 @@ const S = u, c = s.createContext(
21
19
  formMessageId: `${i}-form-item-message`,
22
20
  ...n
23
21
  };
24
- }, l = s.createContext(
25
- {}
26
- );
27
- function D({ className: e, ...t }) {
28
- const r = s.useId();
29
- return /* @__PURE__ */ m(l.Provider, { value: { id: r }, children: /* @__PURE__ */ m(
30
- "div",
31
- {
32
- "data-slot": "form-item",
33
- className: a("grid gap-2", e),
34
- ...t
35
- }
36
- ) });
22
+ }, l = s.createContext({});
23
+ function D({ className: e, ...r }) {
24
+ const t = s.useId();
25
+ return /* @__PURE__ */ m(l.Provider, { value: { id: t }, children: /* @__PURE__ */ m("div", { "data-slot": "form-item", className: a("grid gap-2", e), ...r }) });
37
26
  }
38
- function M({
39
- className: e,
40
- ...t
41
- }) {
42
- const { error: r, formItemId: o } = d();
27
+ function M({ className: e, ...r }) {
28
+ const { error: t, formItemId: o } = d();
43
29
  return /* @__PURE__ */ m(
44
30
  g,
45
31
  {
46
32
  "data-slot": "form-label",
47
- "data-error": !!r,
48
- className: a("data-[error=true]:text-destructive", e),
33
+ "data-error": !!t,
34
+ className: a("data-[error=true]:text-error", e),
49
35
  htmlFor: o,
50
- ...t
36
+ ...r
51
37
  }
52
38
  );
53
39
  }
54
40
  function N({ ...e }) {
55
- const { error: t, formItemId: r, formDescriptionId: o, formMessageId: n } = d();
41
+ const { error: r, formItemId: t, formDescriptionId: o, formMessageId: n } = d();
56
42
  return /* @__PURE__ */ m(
57
43
  f,
58
44
  {
59
45
  "data-slot": "form-control",
60
- id: r,
61
- "aria-describedby": t ? `${o} ${n}` : `${o}`,
62
- "aria-invalid": !!t,
46
+ id: t,
47
+ "aria-describedby": r ? `${o} ${n}` : `${o}`,
48
+ "aria-invalid": !!r,
63
49
  ...e
64
50
  }
65
51
  );
66
52
  }
67
- function w({ className: e, ...t }) {
68
- const { formDescriptionId: r } = d();
53
+ function w({ className: e, ...r }) {
54
+ const { formDescriptionId: t } = d();
69
55
  return /* @__PURE__ */ m(
70
56
  "p",
71
57
  {
72
58
  "data-slot": "form-description",
73
- id: r,
59
+ id: t,
74
60
  className: a("text-muted-foreground text-sm", e),
75
- ...t
61
+ ...r
76
62
  }
77
63
  );
78
64
  }
79
- function P({ className: e, ...t }) {
80
- const { error: r, formMessageId: o } = d(), n = r ? String(r?.message ?? "") : t.children;
81
- return n ? /* @__PURE__ */ m(
82
- "p",
83
- {
84
- "data-slot": "form-message",
85
- id: o,
86
- className: a("text-destructive text-sm", e),
87
- ...t,
88
- children: n
89
- }
90
- ) : null;
65
+ function P({ className: e, ...r }) {
66
+ const { error: t, formMessageId: o } = d(), n = t ? String(t?.message ?? "") : r.children;
67
+ return n ? /* @__PURE__ */ m("p", { "data-slot": "form-message", id: o, className: a("text-error text-sm", e), ...r, children: n }) : null;
91
68
  }
92
69
  export {
93
70
  S as Form,
@@ -1,19 +1,19 @@
1
- import { jsx as t } from "react/jsx-runtime";
1
+ import { jsx as o } from "react/jsx-runtime";
2
2
  import "react";
3
3
  import { cn as n } from "../../lib/utils.js";
4
- function l({ className: e, type: i, ...r }) {
5
- return /* @__PURE__ */ t(
4
+ function l({ className: r, type: e, ...i }) {
5
+ return /* @__PURE__ */ o(
6
6
  "input",
7
7
  {
8
- type: i,
8
+ type: e,
9
9
  "data-slot": "input",
10
10
  className: n(
11
11
  "file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
12
12
  "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
13
- "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
14
- e
13
+ "aria-invalid:ring-error/20 dark:aria-invalid:ring-error/40 aria-invalid:border-error",
14
+ r
15
15
  ),
16
- ...r
16
+ ...i
17
17
  }
18
18
  );
19
19
  }