@mci-ui/mci-ui 0.0.87 → 0.0.89

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.
Files changed (33) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/shared/ui/MciModal/MciModal.js +30 -28
  3. package/dist/shared/ui/mciAccordion/MciAccordion.js +97 -64
  4. package/dist/shared/ui/mciBreadcrumb/MciBreadcrumb.js +45 -25
  5. package/dist/shared/ui/mciButton/MciButton.js +39 -31
  6. package/dist/shared/ui/mciCheck/MciCheck.js +86 -76
  7. package/dist/shared/ui/mciDrawer/MciDrawer.js +78 -54
  8. package/dist/shared/ui/mciInput/MciInput.js +39 -40
  9. package/dist/shared/ui/mciLoader/MciLoader.js +14 -14
  10. package/dist/shared/ui/mciPagination/MciPagination.js +28 -18
  11. package/dist/shared/ui/mciPicker/MciPicker.js +53 -53
  12. package/dist/shared/ui/mciSelect/MciSelect.js +42 -41
  13. package/dist/shared/ui/mciTable/MciTable.js +97 -90
  14. package/dist/shared/ui/mciTable/MciTableClamp2.js +4 -3
  15. package/dist/shared/ui/mciTable/MciTableColumnsPanel.js +100 -79
  16. package/dist/shared/ui/mciTabs/MciTabs.js +66 -55
  17. package/dist/shared/ui/mciToggle/MciToggle.js +51 -43
  18. package/dist/shared/ui/mciUpload/MciUpload.js +129 -107
  19. package/dist/types/shared/types/mci-table.types.d.ts +2 -0
  20. package/dist/types/shared/types/ui/accordion.types.d.ts +1 -0
  21. package/dist/types/shared/types/ui/breadcrumb.types.d.ts +1 -1
  22. package/dist/types/shared/types/ui/button.types.d.ts +1 -1
  23. package/dist/types/shared/types/ui/check.types.d.ts +1 -1
  24. package/dist/types/shared/types/ui/drawer.types.d.ts +2 -0
  25. package/dist/types/shared/types/ui/loader.types.d.ts +1 -1
  26. package/dist/types/shared/types/ui/pagination.types.d.ts +1 -1
  27. package/dist/types/shared/types/ui/toggle.types.d.ts +1 -1
  28. package/dist/types/shared/types/ui/upload.types.d.ts +1 -1
  29. package/dist/types/shared/ui/mciAccordion/MciAccordion.d.ts +5 -3
  30. package/dist/types/shared/ui/mciDrawer/MciDrawer.d.ts +1 -1
  31. package/dist/types/shared/ui/mciTable/MciTable.d.ts +1 -1
  32. package/dist/types/shared/ui/mciTable/MciTableColumnsPanel.d.ts +3 -2
  33. package/package.json +1 -1
@@ -1,94 +1,114 @@
1
- import { jsxs as n, Fragment as j, jsx as t } from "react/jsx-runtime";
2
- import { useRef as h, useCallback as E, useEffect as x, useMemo as C } from "react";
3
- import { cn as i } from "../../lib/utils.js";
1
+ import { jsxs as n, Fragment as $, jsx as r } from "react/jsx-runtime";
2
+ import { useRef as v, useCallback as A, useEffect as g, useMemo as S } from "react";
3
+ import { cn as s } from "../../lib/utils.js";
4
4
  import X from "../../../assets/icons/close.svg.js";
5
- function D({
5
+ const z = {
6
+ blue: {
7
+ close: "hover:bg-blue-100 hover:text-blue-600 focus-visible:ring-2 focus-visible:ring-[rgba(21,93,252,0.25)]",
8
+ darkClose: "hover:bg-blue-500/20 hover:text-blue-400 focus-visible:ring-2 focus-visible:ring-[rgba(21,93,252,0.25)]"
9
+ },
10
+ yellow: {
11
+ close: "hover:bg-yellow-100 hover:text-yellow-600 focus-visible:ring-2 focus-visible:ring-yellow-200",
12
+ darkClose: "hover:bg-yellow-500/20 hover:text-yellow-400 focus-visible:ring-2 focus-visible:ring-yellow-300/40"
13
+ },
14
+ orange: {
15
+ close: "hover:bg-orange-100 hover:text-orange-600 focus-visible:ring-2 focus-visible:ring-[rgba(227,98,12,0.25)]",
16
+ darkClose: "hover:bg-orange-600/20 hover:text-orange-400 focus-visible:ring-2 focus-visible:ring-[rgba(227,98,12,0.25)]"
17
+ }
18
+ };
19
+ function T({
6
20
  isOpen: e,
7
21
  onClose: c,
8
- position: o = "right",
9
- children: p,
10
- footer: m,
11
- title: a,
12
- description: s,
13
- showCloseButton: d = !0,
14
- drawerClassName: v,
22
+ position: l = "right",
23
+ children: x,
24
+ footer: b,
25
+ title: o,
26
+ description: a,
27
+ showCloseButton: u = !0,
28
+ drawerClassName: p,
15
29
  contentClassName: y,
16
- closeOnOverlayClick: g = !0,
17
- closeOnEscape: z = !0,
18
- width: l = 572,
19
- darkMode: r = !1
30
+ footerClassName: w,
31
+ closeOnOverlayClick: N = !0,
32
+ closeOnEscape: D = !0,
33
+ width: i = 572,
34
+ darkMode: t = !1,
35
+ variant: k = "orange"
20
36
  }) {
21
- const u = h(null), b = h(null), f = E(() => c(), [c]);
22
- x(() => {
23
- e ? (b.current = document.activeElement, u.current?.focus()) : b.current?.focus();
24
- }, [e]), x(() => (e && (document.body.style.overflow = "hidden"), () => {
37
+ const m = v(null), d = v(null), f = z[k], h = A(() => c(), [c]);
38
+ g(() => {
39
+ e ? (d.current = document.activeElement, m.current?.focus()) : d.current?.focus();
40
+ }, [e]), g(() => (e && (document.body.style.overflow = "hidden"), () => {
25
41
  document.body.style.overflow = "unset";
26
42
  }), [e]);
27
- const w = C(
43
+ const C = S(
28
44
  () => ({
29
- "--drawer-w": typeof l == "number" ? `${l}px` : l,
30
- transform: e ? "translateX(0)" : o === "right" ? "translateX(calc(100% + 48px))" : "translateX(calc(-100% - 48px))"
45
+ "--drawer-w": typeof i == "number" ? `${i}px` : i,
46
+ transform: e ? "translateX(0)" : l === "right" ? "translateX(calc(100% + 48px))" : "translateX(calc(-100% - 48px))"
31
47
  }),
32
- [e, l, o]
33
- ), N = !!(a || s || d), k = o === "right" ? "top-0 bottom-0 right-0 left-3 rounded-l-3xl rounded-r-none" : "top-0 bottom-0 left-0 right-3 rounded-r-3xl rounded-l-none", $ = o === "right" ? "sm:top-6 sm:bottom-6 sm:right-6 sm:left-auto" : "sm:top-6 sm:bottom-6 sm:left-6 sm:right-auto";
34
- return /* @__PURE__ */ n(j, { children: [
35
- /* @__PURE__ */ t(
48
+ [e, i, l]
49
+ ), j = !!(o || a || u), E = l === "right" ? "top-0 bottom-0 right-0 left-3 rounded-l-3xl rounded-r-none" : "top-0 bottom-0 left-0 right-3 rounded-r-3xl rounded-l-none", R = l === "right" ? "sm:top-6 sm:bottom-6 sm:right-6 sm:left-auto" : "sm:top-6 sm:bottom-6 sm:left-6 sm:right-auto";
50
+ return /* @__PURE__ */ n($, { children: [
51
+ /* @__PURE__ */ r(
36
52
  "div",
37
53
  {
38
- className: i(
54
+ className: s(
39
55
  "fixed inset-0 z-50 bg-black/40 transition-opacity duration-300",
40
56
  e ? "opacity-100 visible cursor-pointer" : "opacity-0 invisible pointer-events-none"
41
57
  ),
42
- onClick: g ? f : void 0,
58
+ onClick: N ? h : void 0,
43
59
  "aria-hidden": "true"
44
60
  }
45
61
  ),
46
62
  /* @__PURE__ */ n(
47
63
  "div",
48
64
  {
49
- ref: u,
65
+ ref: m,
50
66
  tabIndex: -1,
51
- style: w,
52
- className: i(
53
- `fixed z-50 flex flex-col ${r ? "bg-black" : "bg-white"} outline-none min-h-0`,
67
+ style: C,
68
+ className: s(
69
+ `fixed z-50 flex flex-col ${t ? "bg-black" : "bg-white"} outline-none min-h-0`,
54
70
  "transition-[transform,opacity,visibility] duration-300 ease-in-out",
55
71
  e ? "opacity-100 visible pointer-events-auto shadow-2xl" : "opacity-0 invisible pointer-events-none shadow-none",
56
- k,
72
+ E,
57
73
  "h-[100dvh]",
58
74
  "pb-[env(safe-area-inset-bottom)]",
59
- $,
75
+ R,
60
76
  "sm:h-auto sm:rounded-2xl sm:pb-0",
61
77
  "sm:w-[var(--drawer-w)]",
62
- v
78
+ p
63
79
  ),
64
80
  role: "dialog",
65
81
  "aria-modal": "true",
66
82
  "aria-hidden": !e,
67
- "aria-labelledby": a ? "drawer-title" : void 0,
83
+ "aria-labelledby": o ? "drawer-title" : void 0,
68
84
  children: [
69
- N && /* @__PURE__ */ n(
85
+ j && /* @__PURE__ */ n(
70
86
  "div",
71
87
  {
72
- className: `flex items-start justify-between border-b ${r ? "border-neutral-200" : "border-slate-200"} shrink-0 px-4 py-4 sm:p-6`,
88
+ className: `flex items-start justify-between border-b ${t ? "border-neutral-200" : "border-slate-200"} shrink-0 px-4 py-4 sm:p-6`,
73
89
  children: [
74
- (a || s) && /* @__PURE__ */ n("div", { className: "block pr-3", children: [
75
- a && /* @__PURE__ */ t(
90
+ (o || a) && /* @__PURE__ */ n("div", { className: "block pr-3", children: [
91
+ o && /* @__PURE__ */ r(
76
92
  "h2",
77
93
  {
78
94
  id: "drawer-title",
79
- className: `font-semibold ${r ? "text-slate-50" : "text-black"} text-xl leading-tight sm:text-h3`,
80
- children: a
95
+ className: `font-semibold ${t ? "text-slate-50" : "text-black"} text-xl leading-tight sm:text-h3`,
96
+ children: o
81
97
  }
82
98
  ),
83
- s && /* @__PURE__ */ t("p", { className: `text-sm sm:text-base ${r ? "text-neutral-50" : "text-slate-base"} font-normal mt-2`, children: s })
99
+ a && /* @__PURE__ */ r("p", { className: `text-sm sm:text-base ${t ? "text-neutral-50" : "text-slate-base"} font-normal mt-2`, children: a })
84
100
  ] }),
85
- d && /* @__PURE__ */ t(
101
+ u && /* @__PURE__ */ r(
86
102
  "button",
87
103
  {
88
104
  type: "button",
89
- onClick: f,
90
- className: `${r ? "bg-neutral-300 text-slate-50" : "bg-slate-100 text-black"} rounded-xl w-11 h-11 sm:w-12 sm:h-12 hover:cursor-pointer transition flex items-center justify-center group active:scale-95`,
91
- children: /* @__PURE__ */ t(
105
+ onClick: h,
106
+ className: s(
107
+ t ? "bg-neutral-300 text-slate-50" : "bg-slate-100 text-black",
108
+ t ? f.darkClose : f.close,
109
+ "rounded-xl w-11 h-11 sm:w-12 sm:h-12 hover:cursor-pointer transition flex items-center justify-center group active:scale-95"
110
+ ),
111
+ children: /* @__PURE__ */ r(
92
112
  X,
93
113
  {
94
114
  className: "h-5 w-5 sm:h-6 sm:w-6 transition-transform duration-300 group-hover:rotate-180"
@@ -99,21 +119,25 @@ function D({
99
119
  ]
100
120
  }
101
121
  ),
102
- /* @__PURE__ */ t(
122
+ /* @__PURE__ */ r(
103
123
  "div",
104
124
  {
105
- className: i(
125
+ className: s(
106
126
  "flex-1 min-h-0 overflow-y-auto scrollbar-thin scrollbar-thumb-slate-200 px-4 py-4 sm:p-6",
107
127
  y
108
128
  ),
109
- children: p
129
+ children: x
110
130
  }
111
131
  ),
112
- m && /* @__PURE__ */ t(
132
+ b && /* @__PURE__ */ r(
113
133
  "div",
114
134
  {
115
- className: `shrink-0 flex items-center justify-end border-t ${r ? "border-neutral-200" : "border-slate-200"} px-4 py-4 sm:p-6 gap-3 [&>*]:w-fit [&>*]:shrink-0 [&>*]:whitespace-nowrap`,
116
- children: m
135
+ className: s(
136
+ "shrink-0 flex items-center justify-end border-t px-4 py-4 sm:p-6 gap-3 [&>*]:w-fit [&>*]:shrink-0 [&>*]:whitespace-nowrap",
137
+ t ? "border-neutral-200" : "border-slate-200",
138
+ w
139
+ ),
140
+ children: b
117
141
  }
118
142
  )
119
143
  ]
@@ -122,5 +146,5 @@ function D({
122
146
  ] });
123
147
  }
124
148
  export {
125
- D as default
149
+ T as default
126
150
  };
@@ -1,9 +1,9 @@
1
1
  import { jsxs as p, jsx as l, Fragment as z } from "react/jsx-runtime";
2
2
  import { EyeClosed as ee, Eye as te } from "@solar-icons/react";
3
3
  import { forwardRef as le, useState as v, useMemo as h } from "react";
4
- import se from "../../../assets/icons/close.svg.js";
4
+ import ne from "../../../assets/icons/close.svg.js";
5
5
  import { cn as e } from "../../lib/utils.js";
6
- import { getInputSizes as ne, getInputStateStyles as ae, getInputIconColor as re, getInputRightPaddingClass as ce } from "./mci-input.utils.js";
6
+ import { getInputSizes as se, getInputStateStyles as ae, getInputIconColor as re, getInputRightPaddingClass as ce } from "./mci-input.utils.js";
7
7
  const ie = le(
8
8
  ({
9
9
  label: C,
@@ -30,24 +30,24 @@ const ie = le(
30
30
  autoComplete: K = "off",
31
31
  ...L
32
32
  }, O) => {
33
- const [y, S] = v(!1), [Q, W] = v(""), [R, T] = v(!1), B = N ?? Q, o = w === "password", b = H && !!B && !f, g = c && u === "left", j = c && u === "right" || r || o, U = j || b, V = h(() => {
34
- let n = 0;
35
- return b && (n += 1), o ? (n += 1, r && (n += 1), n) : (r && (n += 1), c && u === "right" && (n += 1), n);
36
- }, [b, o, r, c, u]), X = (n) => {
37
- S(!0), _?.(n);
38
- }, Y = (n) => {
39
- S(!1), D?.(n);
40
- }, Z = (n) => {
41
- let m = n.target.value;
42
- w === "number" && x && m.length > x && (m = m.slice(0, x), n.target.value = m), N === void 0 && W(m), P?.(n);
43
- }, $ = () => T((n) => !n), q = () => {
33
+ const [g, S] = v(!1), [Q, W] = v(""), [R, T] = v(!1), B = N ?? Q, o = w === "password", b = H && !!B && !f, y = c && u === "left", j = c && u === "right" || r || o, U = j || b, V = h(() => {
34
+ let s = 0;
35
+ return b && (s += 1), o ? (s += 1, r && (s += 1), s) : (r && (s += 1), c && u === "right" && (s += 1), s);
36
+ }, [b, o, r, c, u]), X = (s) => {
37
+ S(!0), _?.(s);
38
+ }, Y = (s) => {
39
+ S(!1), D?.(s);
40
+ }, Z = (s) => {
41
+ let m = s.target.value;
42
+ w === "number" && x && m.length > x && (m = m.slice(0, x), s.target.value = m), N === void 0 && W(m), P?.(s);
43
+ }, $ = () => T((s) => !s), q = () => {
44
44
  N === void 0 && W(""), G?.();
45
- }, s = h(
46
- () => ne(!!g, !!j),
47
- [g, j]
45
+ }, n = h(
46
+ () => se(!!y, !!j),
47
+ [y, j]
48
48
  ), k = h(() => ae(i, a), [i, a]), d = h(
49
- () => re(f, i, y, a),
50
- [i, y, f, a]
49
+ () => re(f, i, g, a),
50
+ [i, g, f, a]
51
51
  ), M = h(
52
52
  () => ce(t, V),
53
53
  [t, V]
@@ -60,7 +60,7 @@ const ie = le(
60
60
  className: e(
61
61
  "mb-2 block text-base font-medium",
62
62
  i ? a ? "text-red-500" : "text-red-600" : a ? "text-neutral-50" : "text-slate-700",
63
- s[t].labelFont
63
+ n[t].labelFont
64
64
  ),
65
65
  children: [
66
66
  C,
@@ -89,30 +89,30 @@ const ie = le(
89
89
  "w-full border font-normal transition-all duration-300 ease-in-out outline-none",
90
90
  t === "base" ? "rounded-xl" : "rounded-lg",
91
91
  a ? "text-neutral-50 placeholder:text-neutral-100 disabled:cursor-not-allowed disabled:border-neutral-200 disabled:bg-neutral-300 disabled:text-neutral-100/50 disabled:placeholder:text-neutral-100/50" : "bg-white disabled:cursor-not-allowed disabled:border-slate-200 disabled:bg-slate-100 disabled:text-slate-400",
92
- a && y && !f && "text-white",
92
+ a && g && !f && "text-white",
93
93
  "[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",
94
- s[t].input,
95
- s[t].padding,
94
+ n[t].input,
95
+ n[t].padding,
96
96
  M,
97
97
  k
98
98
  ),
99
99
  maxLength: x
100
100
  }
101
101
  ),
102
- g && /* @__PURE__ */ l(
102
+ y && /* @__PURE__ */ l(
103
103
  "div",
104
104
  {
105
105
  className: e(
106
106
  "absolute top-1/2 flex -translate-y-1/2 items-center justify-center",
107
107
  "transition-all duration-300",
108
- s[t].leftIcon,
108
+ n[t].leftIcon,
109
109
  d
110
110
  ),
111
111
  children: /* @__PURE__ */ l(
112
112
  "div",
113
113
  {
114
- className: e("flex items-center justify-center", s[t].iconWrapper),
115
- children: /* @__PURE__ */ l("span", { className: e("flex items-center justify-center", s[t].icon), children: c })
114
+ className: e("flex items-center justify-center", n[t].iconWrapper),
115
+ children: /* @__PURE__ */ l("span", { className: e("flex items-center justify-center", n[t].icon), children: c })
116
116
  }
117
117
  )
118
118
  }
@@ -123,7 +123,7 @@ const ie = le(
123
123
  className: e(
124
124
  "absolute top-1/2 flex -translate-y-1/2 items-center justify-center gap-2",
125
125
  "transition-all duration-300",
126
- s[t].rightIcon
126
+ n[t].rightIcon
127
127
  ),
128
128
  children: [
129
129
  b && /* @__PURE__ */ l(
@@ -132,24 +132,23 @@ const ie = le(
132
132
  type: "button",
133
133
  onClick: q,
134
134
  className: e(
135
- "flex items-center justify-center",
136
- s[t].iconWrapper,
135
+ "flex cursor-pointer items-center justify-center",
136
+ n[t].iconWrapper,
137
137
  a ? "text-neutral-100 hover:text-white" : "text-slate-base hover:text-black"
138
138
  ),
139
- style: { cursor: "pointer" },
140
- children: /* @__PURE__ */ l("span", { className: e("flex items-center justify-center", s[t].icon), children: /* @__PURE__ */ l(se, { className: e("h-full w-full") }) })
139
+ children: /* @__PURE__ */ l("span", { className: e("flex items-center justify-center", n[t].icon), children: /* @__PURE__ */ l(ne, { className: e("h-full w-full") }) })
141
140
  }
142
141
  ),
143
142
  r && !o && /* @__PURE__ */ l(
144
143
  "div",
145
144
  {
146
- className: e("flex items-center justify-center", s[t].iconWrapper),
145
+ className: e("flex items-center justify-center", n[t].iconWrapper),
147
146
  children: /* @__PURE__ */ l(
148
147
  "span",
149
148
  {
150
149
  className: e(
151
150
  "flex items-center justify-center",
152
- s[t].icon,
151
+ n[t].icon,
153
152
  d
154
153
  ),
155
154
  children: r
@@ -163,14 +162,14 @@ const ie = le(
163
162
  {
164
163
  className: e(
165
164
  "flex items-center justify-center",
166
- s[t].iconWrapper
165
+ n[t].iconWrapper
167
166
  ),
168
167
  children: /* @__PURE__ */ l(
169
168
  "span",
170
169
  {
171
170
  className: e(
172
171
  "flex items-center justify-center",
173
- s[t].icon,
172
+ n[t].icon,
174
173
  d
175
174
  ),
176
175
  children: r
@@ -184,14 +183,14 @@ const ie = le(
184
183
  type: "button",
185
184
  onClick: $,
186
185
  className: e(
187
- "flex items-center justify-center",
188
- s[t].iconWrapper,
186
+ "flex cursor-pointer items-center justify-center",
187
+ n[t].iconWrapper,
189
188
  d
190
189
  ),
191
190
  children: /* @__PURE__ */ l(
192
191
  "span",
193
192
  {
194
- className: e("flex items-center justify-center cursor-pointer", s[t].icon),
193
+ className: e("flex items-center justify-center", n[t].icon),
195
194
  children: R ? /* @__PURE__ */ l(ee, { weight: "Linear", className: e("h-full w-full") }) : /* @__PURE__ */ l(te, { weight: "Linear", className: e("h-full w-full") })
196
195
  }
197
196
  )
@@ -201,13 +200,13 @@ const ie = le(
201
200
  c && u === "right" && !o && /* @__PURE__ */ l(
202
201
  "div",
203
202
  {
204
- className: e("flex items-center justify-center", s[t].iconWrapper),
203
+ className: e("flex items-center justify-center", n[t].iconWrapper),
205
204
  children: /* @__PURE__ */ l(
206
205
  "span",
207
206
  {
208
207
  className: e(
209
208
  "flex items-center justify-center",
210
- s[t].icon,
209
+ n[t].icon,
211
210
  d
212
211
  ),
213
212
  children: c
@@ -1,31 +1,31 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import { cn as l } from "../../lib/utils.js";
1
+ import { jsx as l } from "react/jsx-runtime";
2
+ import { cn as o } from "../../lib/utils.js";
3
3
  import a from "../../../assets/icons/loaderIcon.svg.js";
4
4
  function d({
5
- className: o,
5
+ className: n,
6
6
  size: e = 150,
7
- iconClassName: t,
7
+ iconClassName: r,
8
8
  isLoading: i = !1,
9
- isFullPage: n = !0,
10
- variant: u = "yellow"
9
+ isFullPage: u = !0,
10
+ variant: t = "orange"
11
11
  }) {
12
- return i ? /* @__PURE__ */ r(
12
+ return i ? /* @__PURE__ */ l(
13
13
  "div",
14
14
  {
15
- className: l(
15
+ className: o(
16
16
  "z-[99px] flex flex-col items-center justify-center transition-all duration-300",
17
- n ? "fixed inset-0 backdrop-blur-[2px]" : "absolute inset-0 w-full h-full rounded-[inherit]",
18
- o
17
+ u ? "fixed inset-0 backdrop-blur-[2px]" : "absolute inset-0 w-full h-full rounded-[inherit]",
18
+ n
19
19
  ),
20
- children: /* @__PURE__ */ r(
20
+ children: /* @__PURE__ */ l(
21
21
  a,
22
22
  {
23
23
  width: e,
24
24
  height: e,
25
- className: l(
25
+ className: o(
26
26
  "animate-spin",
27
- !t && (u === "blue" ? "text-blue-600" : "text-yellow-500"),
28
- t
27
+ !r && (t === "blue" ? "text-blue-600" : t === "orange" ? "text-orange-600" : "text-yellow-500"),
28
+ r
29
29
  ),
30
30
  style: { fill: "currentColor", stroke: "currentColor" }
31
31
  }
@@ -26,6 +26,16 @@ const _ = {
26
26
  darkInactive: "bg-neutral-300 border-neutral-200 text-white hover:bg-neutral-200",
27
27
  darkDisabled: "text-neutral-100/50 border-neutral-200 bg-neutral-300/60",
28
28
  darkArrow: "text-neutral-50"
29
+ },
30
+ orange: {
31
+ active: "bg-orange-600 text-white border-orange-600",
32
+ inactive: "bg-slate-100 border-slate-200 text-black hover:bg-slate-200",
33
+ disabled: "text-slate-400 border-slate-300",
34
+ arrow: "text-black",
35
+ darkActive: "bg-orange-600 text-white border-orange-600",
36
+ darkInactive: "bg-neutral-300 border-neutral-200 text-white hover:bg-neutral-200",
37
+ darkDisabled: "text-neutral-100/50 border-neutral-200 bg-neutral-300/60",
38
+ darkArrow: "text-neutral-50"
29
39
  }
30
40
  };
31
41
  function P({
@@ -34,20 +44,20 @@ function P({
34
44
  perPage: b,
35
45
  onPageChange: u,
36
46
  onPerPageChange: h,
37
- siblingCount: w = 1,
38
- perPageOptions: A = [10, 30, 50, 100],
39
- showPerPage: y = !0,
40
- variant: k = "yellow",
41
- size: x = "large",
47
+ siblingCount: x = 1,
48
+ perPageOptions: N = [10, 30, 50, 100],
49
+ showPerPage: k = !0,
50
+ variant: y = "orange",
51
+ size: g = "large",
42
52
  darkMode: e = !1,
43
- paginationClassName: j
53
+ paginationClassName: I
44
54
  }) {
45
- const g = Number.isFinite(c) && c > 0 ? c : 0, v = Number.isFinite(b) && b > 0 ? b : 10, l = Math.max(1, Number.isFinite(m) ? m : 1), n = Math.ceil(g / v), C = T(() => F(l, w, n), [l, w, n]), s = _[x], i = G[k ?? "yellow"], I = e ? i.darkActive : i.active, D = e ? i.darkInactive : i.inactive, f = e ? i.darkDisabled : i.disabled, p = e ? i.darkArrow : i.arrow;
46
- return n <= 1 || g === 0 ? null : /* @__PURE__ */ o("div", { className: r(
55
+ const w = Number.isFinite(c) && c > 0 ? c : 0, v = Number.isFinite(b) && b > 0 ? b : 10, l = Math.max(1, Number.isFinite(m) ? m : 1), i = Math.ceil(w / v), j = T(() => F(l, x, i), [l, x, i]), s = _[g], n = G[y ?? "yellow"], C = e ? n.darkActive : n.active, D = e ? n.darkInactive : n.inactive, f = e ? n.darkDisabled : n.disabled, p = e ? n.darkArrow : n.arrow;
56
+ return i <= 1 || w === 0 ? null : /* @__PURE__ */ o("div", { className: r(
47
57
  "flex items-center justify-between gap-4 w-full",
48
- j
58
+ I
49
59
  ), children: [
50
- y && h && /* @__PURE__ */ o("div", { className: "flex items-center gap-2", children: [
60
+ k && h && /* @__PURE__ */ o("div", { className: "flex items-center gap-2", children: [
51
61
  /* @__PURE__ */ t(
52
62
  "span",
53
63
  {
@@ -67,10 +77,10 @@ function P({
67
77
  className: r(
68
78
  "appearance-none rounded-lg border pl-3 pr-8 text-base font-medium focus:outline-none cursor-pointer",
69
79
  e ? "border-neutral-200 bg-neutral-300 text-white" : "border-slate-200 bg-white text-black",
70
- x === "large" ? "h-10" : "h-9"
80
+ g === "large" ? "h-10" : "h-9"
71
81
  ),
72
82
  "aria-label": "Количество строк на странице",
73
- children: A.map((a) => /* @__PURE__ */ t("option", { value: a, children: a }, a))
83
+ children: N.map((a) => /* @__PURE__ */ t("option", { value: a, children: a }, a))
74
84
  }
75
85
  ),
76
86
  /* @__PURE__ */ t(
@@ -102,7 +112,7 @@ function P({
102
112
  children: /* @__PURE__ */ t(z, { weight: "Linear", size: 20 })
103
113
  }
104
114
  ),
105
- /* @__PURE__ */ t("div", { className: "flex items-center gap-1", children: C.map((a, N) => {
115
+ /* @__PURE__ */ t("div", { className: "flex items-center gap-1", children: j.map((a, A) => {
106
116
  if (a === "...")
107
117
  return /* @__PURE__ */ t(
108
118
  "span",
@@ -115,7 +125,7 @@ function P({
115
125
  "aria-hidden": "true",
116
126
  children: /* @__PURE__ */ t(E, { weight: "Bold", size: 20 })
117
127
  },
118
- N
128
+ A
119
129
  );
120
130
  const d = a === l;
121
131
  return /* @__PURE__ */ t(
@@ -127,24 +137,24 @@ function P({
127
137
  className: r(
128
138
  "flex items-center justify-center rounded-lg border font-medium transition-all hover:cursor-pointer min-w-10 px-2",
129
139
  s,
130
- d ? I : D
140
+ d ? C : D
131
141
  ),
132
142
  children: a
133
143
  },
134
- N
144
+ A
135
145
  );
136
146
  }) }),
137
147
  /* @__PURE__ */ t(
138
148
  "button",
139
149
  {
140
150
  onClick: () => u(l + 1),
141
- disabled: l === n,
151
+ disabled: l === i,
142
152
  "aria-label": "Следующая страница",
143
153
  className: r(
144
154
  "flex items-center justify-center rounded-lg border transition-all min-w-10",
145
155
  e ? "bg-neutral-300 border-neutral-200" : "bg-slate-100",
146
156
  s,
147
- l === n ? r("cursor-not-allowed opacity-50", f) : r("hover:cursor-pointer", p, e ? "hover:bg-neutral-200" : "border-slate-200")
157
+ l === i ? r("cursor-not-allowed opacity-50", f) : r("hover:cursor-pointer", p, e ? "hover:bg-neutral-200" : "border-slate-200")
148
158
  ),
149
159
  children: /* @__PURE__ */ t(S, { size: 20, weight: "Linear" })
150
160
  }