@konstructio/ui 0.1.2-alpha.43 → 0.1.2-alpha.46

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 (59) hide show
  1. package/dist/components/AlertDialog/AlertDialog.js +39 -37
  2. package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
  3. package/dist/components/AlertDialog/components/index.js +1 -1
  4. package/dist/components/Badge/Badge.js +23 -26
  5. package/dist/components/Badge/Badge.variants.js +1 -1
  6. package/dist/components/Button/Button.variants.js +108 -98
  7. package/dist/components/Checkbox/Checkbox.js +104 -100
  8. package/dist/components/Checkbox/Checkbox.variants.js +30 -7
  9. package/dist/components/Filter/Filter.js +1 -1
  10. package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +9 -10
  11. package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.js +76 -43
  12. package/dist/components/Filter/components/ResetButton/ResetButton.js +21 -32
  13. package/dist/components/Filter/events/index.js +3 -3
  14. package/dist/components/ImageUpload/ImageUpload.js +221 -0
  15. package/dist/components/ImageUpload/ImageUpload.variants.js +109 -0
  16. package/dist/components/Input/Input.variants.js +10 -2
  17. package/dist/components/PhoneNumberInput/PhoneNumberInput.variants.js +4 -4
  18. package/dist/components/PhoneNumberInput/components/FlagContent/FlagContent.js +16 -7
  19. package/dist/components/PhoneNumberInput/components/FlagSelectorList/FlagSelectorList.js +92 -74
  20. package/dist/components/PhoneNumberInput/components/FlagSelectorWrapper/FlagSelectorWrapper.js +53 -29
  21. package/dist/components/PhoneNumberInput/components/Wrapper.js +139 -120
  22. package/dist/components/Select/Select.js +48 -0
  23. package/dist/components/{Dropdown/Dropdown.variants.js → Select/Select.variants.js} +8 -8
  24. package/dist/components/{Dropdown → Select}/components/List/List.js +73 -46
  25. package/dist/components/{Dropdown → Select}/components/List/List.variants.js +11 -8
  26. package/dist/components/{Dropdown → Select}/components/ListItem/ListItem.js +34 -34
  27. package/dist/components/{Dropdown → Select}/components/ListItem/ListItem.variants.js +5 -4
  28. package/dist/components/{Dropdown → Select}/components/Wrapper.js +88 -88
  29. package/dist/components/Select/contexts/index.js +6 -0
  30. package/dist/components/{Dropdown/contexts/dropdown.context.js → Select/contexts/select.context.js} +2 -2
  31. package/dist/components/Select/contexts/select.hook.js +11 -0
  32. package/dist/components/Select/contexts/select.provider.js +58 -0
  33. package/dist/components/{Dropdown → Select}/hooks/useNavigationList.js +3 -3
  34. package/dist/components/{Dropdown/hooks/useDropdown.js → Select/hooks/useSelect.js} +33 -33
  35. package/dist/components/Switch/Switch.js +153 -125
  36. package/dist/components/Switch/Switch.variants.js +15 -6
  37. package/dist/components/Typography/Typography.js +25 -27
  38. package/dist/components/Typography/Typography.variants.js +2 -2
  39. package/dist/components/VirtualizedTable/components/Actions/Actions.js +14 -14
  40. package/dist/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.js +10 -10
  41. package/dist/components/VirtualizedTable/components/Skeleton/Skeleton.js +1 -1
  42. package/dist/components/index.js +77 -74
  43. package/dist/{index-CPU02rhe.js → index-D6KzX_ef.js} +13 -12
  44. package/dist/index.d.ts +106 -60
  45. package/dist/index.js +109 -106
  46. package/dist/package.json +4 -4
  47. package/dist/styles.css +1 -1
  48. package/dist/ui/civo-theme.css +6 -5
  49. package/dist/ui/theme.css +27 -0
  50. package/dist/x-BXShoIAM.js +8 -0
  51. package/package.json +4 -4
  52. package/dist/components/Dropdown/Dropdown.js +0 -48
  53. package/dist/components/Dropdown/contexts/dropdown.hook.js +0 -13
  54. package/dist/components/Dropdown/contexts/dropdown.provider.js +0 -58
  55. package/dist/components/Dropdown/contexts/index.js +0 -6
  56. /package/dist/components/{Dropdown → Select}/components/EmptyList.js +0 -0
  57. /package/dist/components/{Dropdown → Select}/components/index.js +0 -0
  58. /package/dist/components/{Dropdown → Select}/constants/index.js +0 -0
  59. /package/dist/components/{Dropdown → Select}/constants/pagination.js +0 -0
@@ -1,115 +1,116 @@
1
- import { jsxs as C, jsx as i } from "react/jsx-runtime";
2
- import * as h from "react";
3
- import { forwardRef as H, useRef as M, useId as $, useImperativeHandle as j, useEffect as z } from "react";
4
- import { a as A, c as U, P as N, b as q } from "../../index-DKfEnhKr.js";
1
+ import { jsxs as y, jsx as l } from "react/jsx-runtime";
2
+ import * as p from "react";
3
+ import { forwardRef as M, useRef as $, useId as j, useImperativeHandle as z, useEffect as A } from "react";
4
+ import { a as U, c as q, P as N, b as F } from "../../index-DKfEnhKr.js";
5
5
  import { u as P } from "../../index-DLcqcWxM.js";
6
- import { u as F } from "../../index-BZPx6jYI.js";
7
- import { u as L } from "../../index-DtEcCIrM.js";
8
- import { cn as R } from "../../utils/index.js";
9
- import { thumbVariants as O, switchVariants as V } from "./Switch.variants.js";
10
- var b = "Switch", [D, se] = U(b), [W, X] = D(b), y = h.forwardRef(
11
- (e, l) => {
6
+ import { u as L } from "../../index-BZPx6jYI.js";
7
+ import { u as O } from "../../index-DtEcCIrM.js";
8
+ import { Typography as R } from "../Typography/Typography.js";
9
+ import { cn as C } from "../../utils/index.js";
10
+ import { thumbVariants as V, switchVariants as D } from "./Switch.variants.js";
11
+ var k = "Switch", [W, ne] = q(k), [X, G] = W(k), g = p.forwardRef(
12
+ (o, d) => {
12
13
  const {
13
- __scopeSwitch: t,
14
- name: s,
15
- checked: o,
16
- defaultChecked: d,
17
- required: u,
18
- disabled: r,
19
- value: c = "on",
20
- onCheckedChange: m,
21
- form: n,
22
- ...a
23
- } = e, [p, f] = h.useState(null), w = P(l, (v) => f(v)), x = h.useRef(!1), k = p ? n || !!p.closest("form") : !0, [S, B] = A({
24
- prop: o,
25
- defaultProp: d ?? !1,
26
- onChange: m,
27
- caller: b
14
+ __scopeSwitch: e,
15
+ name: c,
16
+ checked: t,
17
+ defaultChecked: S,
18
+ required: r,
19
+ disabled: n,
20
+ value: a = "on",
21
+ onCheckedChange: v,
22
+ form: i,
23
+ ...u
24
+ } = o, [f, m] = p.useState(null), s = P(d, (x) => m(x)), h = p.useRef(!1), b = f ? i || !!f.closest("form") : !0, [w, T] = U({
25
+ prop: t,
26
+ defaultProp: S ?? !1,
27
+ onChange: v,
28
+ caller: k
28
29
  });
29
- return /* @__PURE__ */ C(W, { scope: t, checked: S, disabled: r, children: [
30
- /* @__PURE__ */ i(
30
+ return /* @__PURE__ */ y(X, { scope: e, checked: w, disabled: n, children: [
31
+ /* @__PURE__ */ l(
31
32
  N.button,
32
33
  {
33
34
  type: "button",
34
35
  role: "switch",
35
- "aria-checked": S,
36
- "aria-required": u,
37
- "data-state": I(S),
38
- "data-disabled": r ? "" : void 0,
39
- disabled: r,
40
- value: c,
41
- ...a,
42
- ref: w,
43
- onClick: q(e.onClick, (v) => {
44
- B((T) => !T), k && (x.current = v.isPropagationStopped(), x.current || v.stopPropagation());
36
+ "aria-checked": w,
37
+ "aria-required": r,
38
+ "data-state": B(w),
39
+ "data-disabled": n ? "" : void 0,
40
+ disabled: n,
41
+ value: a,
42
+ ...u,
43
+ ref: s,
44
+ onClick: F(o.onClick, (x) => {
45
+ T((H) => !H), b && (h.current = x.isPropagationStopped(), h.current || x.stopPropagation());
45
46
  })
46
47
  }
47
48
  ),
48
- k && /* @__PURE__ */ i(
49
- _,
49
+ b && /* @__PURE__ */ l(
50
+ I,
50
51
  {
51
- control: p,
52
- bubbles: !x.current,
53
- name: s,
54
- value: c,
55
- checked: S,
56
- required: u,
57
- disabled: r,
58
- form: n,
52
+ control: f,
53
+ bubbles: !h.current,
54
+ name: c,
55
+ value: a,
56
+ checked: w,
57
+ required: r,
58
+ disabled: n,
59
+ form: i,
59
60
  style: { transform: "translateX(-100%)" }
60
61
  }
61
62
  )
62
63
  ] });
63
64
  }
64
65
  );
65
- y.displayName = b;
66
- var g = "SwitchThumb", E = h.forwardRef(
67
- (e, l) => {
68
- const { __scopeSwitch: t, ...s } = e, o = X(g, t);
69
- return /* @__PURE__ */ i(
66
+ g.displayName = k;
67
+ var E = "SwitchThumb", _ = p.forwardRef(
68
+ (o, d) => {
69
+ const { __scopeSwitch: e, ...c } = o, t = G(E, e);
70
+ return /* @__PURE__ */ l(
70
71
  N.span,
71
72
  {
72
- "data-state": I(o.checked),
73
- "data-disabled": o.disabled ? "" : void 0,
74
- ...s,
75
- ref: l
73
+ "data-state": B(t.checked),
74
+ "data-disabled": t.disabled ? "" : void 0,
75
+ ...c,
76
+ ref: d
76
77
  }
77
78
  );
78
79
  }
79
80
  );
80
- E.displayName = g;
81
- var G = "SwitchBubbleInput", _ = h.forwardRef(
81
+ _.displayName = E;
82
+ var J = "SwitchBubbleInput", I = p.forwardRef(
82
83
  ({
83
- __scopeSwitch: e,
84
- control: l,
85
- checked: t,
86
- bubbles: s = !0,
87
- ...o
88
- }, d) => {
89
- const u = h.useRef(null), r = P(u, d), c = F(t), m = L(l);
90
- return h.useEffect(() => {
91
- const n = u.current;
92
- if (!n) return;
93
- const a = window.HTMLInputElement.prototype, f = Object.getOwnPropertyDescriptor(
94
- a,
84
+ __scopeSwitch: o,
85
+ control: d,
86
+ checked: e,
87
+ bubbles: c = !0,
88
+ ...t
89
+ }, S) => {
90
+ const r = p.useRef(null), n = P(r, S), a = L(e), v = O(d);
91
+ return p.useEffect(() => {
92
+ const i = r.current;
93
+ if (!i) return;
94
+ const u = window.HTMLInputElement.prototype, m = Object.getOwnPropertyDescriptor(
95
+ u,
95
96
  "checked"
96
97
  ).set;
97
- if (c !== t && f) {
98
- const w = new Event("click", { bubbles: s });
99
- f.call(n, t), n.dispatchEvent(w);
98
+ if (a !== e && m) {
99
+ const s = new Event("click", { bubbles: c });
100
+ m.call(i, e), i.dispatchEvent(s);
100
101
  }
101
- }, [c, t, s]), /* @__PURE__ */ i(
102
+ }, [a, e, c]), /* @__PURE__ */ l(
102
103
  "input",
103
104
  {
104
105
  type: "checkbox",
105
106
  "aria-hidden": !0,
106
- defaultChecked: t,
107
- ...o,
107
+ defaultChecked: e,
108
+ ...t,
108
109
  tabIndex: -1,
109
- ref: r,
110
+ ref: n,
110
111
  style: {
111
- ...o.style,
112
- ...m,
112
+ ...t.style,
113
+ ...v,
113
114
  position: "absolute",
114
115
  pointerEvents: "none",
115
116
  opacity: 0,
@@ -119,72 +120,99 @@ var G = "SwitchBubbleInput", _ = h.forwardRef(
119
120
  );
120
121
  }
121
122
  );
122
- _.displayName = G;
123
- function I(e) {
124
- return e ? "checked" : "unchecked";
123
+ I.displayName = J;
124
+ function B(o) {
125
+ return o ? "checked" : "unchecked";
125
126
  }
126
- var J = y, K = E;
127
- const ce = H(
127
+ var K = g, Q = _;
128
+ const ie = M(
128
129
  ({
129
- name: e,
130
- alignment: l = "horizontal",
131
- theme: t,
132
- thumbClassName: s,
133
- className: o,
134
- label: d,
135
- defaultChecked: u,
136
- value: r,
137
- helperText: c,
138
- onChange: m
139
- }, n) => {
140
- const a = M(null), p = $(), f = e ? `${p}-${e}` : p;
141
- return j(n, () => a.current, [a]), z(() => {
142
- a.current && (a.current.value = `${r}`);
143
- }, [r]), /* @__PURE__ */ C(
130
+ alignment: o = "horizontal",
131
+ className: d,
132
+ defaultChecked: e,
133
+ disabled: c = !1,
134
+ helperText: t,
135
+ helperTextClassName: S,
136
+ label: r,
137
+ labelClassName: n,
138
+ name: a,
139
+ theme: v,
140
+ thumbClassName: i,
141
+ value: u,
142
+ onChange: f
143
+ }, m) => {
144
+ const s = $(null), h = j(), b = a ? `${h}-${a}` : h;
145
+ return z(m, () => s.current, [s]), A(() => {
146
+ s.current && (s.current.value = `${u}`);
147
+ }, [u]), /* @__PURE__ */ y(
144
148
  "div",
145
149
  {
146
- className: R(
147
- "w-full flex gap-3",
148
- l === "vertical" ? "flex-col" : "flex-row"
150
+ className: C(
151
+ "w-full",
152
+ "flex",
153
+ "gap-3",
154
+ o === "vertical" ? "flex-col" : "flex-row"
149
155
  ),
150
- "data-theme": t,
156
+ "data-theme": v,
151
157
  children: [
152
- /* @__PURE__ */ i(
153
- J,
158
+ /* @__PURE__ */ l(
159
+ K,
154
160
  {
155
- id: f,
156
- defaultChecked: u,
157
- checked: r,
158
- onCheckedChange: (w) => m?.(w),
159
- className: R(V({ className: o })),
160
- "aria-label": d,
161
- children: /* @__PURE__ */ i(
162
- K,
161
+ id: b,
162
+ defaultChecked: e,
163
+ checked: u,
164
+ onCheckedChange: (w) => f?.(w),
165
+ className: C(D({ className: d })),
166
+ "aria-label": r,
167
+ disabled: c,
168
+ children: /* @__PURE__ */ l(
169
+ Q,
163
170
  {
164
- className: O({
165
- className: s
171
+ className: V({
172
+ className: i
166
173
  })
167
174
  }
168
175
  )
169
176
  }
170
177
  ),
171
- d ? /* @__PURE__ */ C(
172
- "label",
178
+ r ? /* @__PURE__ */ y(
179
+ R,
173
180
  {
174
- className: "flex flex-col text-slate-800 dark:text-white text-sm",
175
- htmlFor: f,
181
+ component: "label",
182
+ className: C(
183
+ "flex",
184
+ "flex-col",
185
+ "text-sm",
186
+ "dark:text-white",
187
+ "select-none",
188
+ n
189
+ ),
190
+ htmlFor: b,
176
191
  style: { paddingRight: 15 },
177
192
  children: [
178
- d,
179
- c ? /* @__PURE__ */ i("span", { className: "text-slate-600 dark:text-slate-400 text-xs", children: c }) : null
193
+ r,
194
+ t ? /* @__PURE__ */ l(
195
+ R,
196
+ {
197
+ component: "span",
198
+ className: C(
199
+ "text-xs",
200
+ "select-none",
201
+ "text-slate-600",
202
+ "dark:text-metal-400",
203
+ S
204
+ ),
205
+ children: t
206
+ }
207
+ ) : null
180
208
  ]
181
209
  }
182
210
  ) : null,
183
- /* @__PURE__ */ i(
211
+ /* @__PURE__ */ l(
184
212
  "input",
185
213
  {
186
- ref: a,
187
- name: e,
214
+ ref: s,
215
+ name: a,
188
216
  type: "text",
189
217
  className: "hidden",
190
218
  "aria-hidden": "true"
@@ -196,5 +224,5 @@ const ce = H(
196
224
  }
197
225
  );
198
226
  export {
199
- ce as Switch
227
+ ie as Switch
200
228
  };
@@ -1,5 +1,5 @@
1
1
  import { c as a } from "../../index-D29mdTf5.js";
2
- const r = a([
2
+ const t = a([
3
3
  "w-10",
4
4
  "h-5",
5
5
  "flex",
@@ -8,14 +8,23 @@ const r = a([
8
8
  "shadow",
9
9
  "focus:shadow-md",
10
10
  "data-[state=unchecked]:bg-gray-300",
11
- "dark:data-[state=unchecked]:bg-gray-600",
11
+ "dark:data-[state=unchecked]:bg-metal-600",
12
12
  "transition-all",
13
13
  "delay-10",
14
14
  "duration-250",
15
15
  "cursor-pointer",
16
16
  "bg-aurora-500",
17
- "kubefirst:bg-kubefirst-primary"
18
- ]), e = a([
17
+ "kubefirst:bg-kubefirst-primary",
18
+ "[&+label,&+span]:cursor-pointer",
19
+ "disabled:[&+label,&+span,&]:cursor-not-allowed",
20
+ "disabled:bg-gray-200",
21
+ "disabled:data-[state=unchecked]:[&>span]:bg-white",
22
+ "disabled:data-[state=unchecked]:bg-gray-200",
23
+ "dark:disabled:bg-metal-700",
24
+ "dark:disabled:data-[state=unchecked]:[&>span]:bg-metal-600",
25
+ "dark:disabled:data-[state=unchecked]:bg-metal-700",
26
+ "dark:disabled:[&>span]:bg-metal-600"
27
+ ]), d = a([
19
28
  "block",
20
29
  "w-4",
21
30
  "h-4",
@@ -31,6 +40,6 @@ const r = a([
31
40
  "duration-300"
32
41
  ]);
33
42
  export {
34
- r as switchVariants,
35
- e as thumbVariants
43
+ t as switchVariants,
44
+ d as thumbVariants
36
45
  };
@@ -1,30 +1,28 @@
1
- import { jsx as y } from "react/jsx-runtime";
2
- import { forwardRef as f } from "react";
3
- import { cn as n } from "../../utils/index.js";
4
- import { typographyVariants as c } from "./Typography.variants.js";
5
- const d = f(
6
- ({ className: t, theme: r, children: p, variant: o, component: e, ...m }, a) => {
7
- const s = e ?? (o?.includes("h") ? o : "p");
8
- return /* @__PURE__ */ y(
9
- s,
10
- {
11
- ref: a,
12
- "data-theme": r,
13
- className: n(
14
- "text-slate-800",
15
- "dark:text-metal-50",
16
- c({
17
- className: t,
18
- variant: o
19
- })
20
- ),
21
- ...m,
22
- children: p
23
- }
24
- );
25
- }
26
- );
27
- d.displayName = "Typography";
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { forwardRef as y } from "react";
3
+ import { cn as c } from "../../utils/index.js";
4
+ import { typographyVariants as f } from "./Typography.variants.js";
5
+ const d = y(({ className: o, theme: r, children: p, variant: t, component: e, ...m }, a) => {
6
+ const s = e ?? (t?.includes("h") ? t : "p");
7
+ return /* @__PURE__ */ n(
8
+ s,
9
+ {
10
+ ref: a,
11
+ "data-theme": r,
12
+ className: c(
13
+ "text-slate-800",
14
+ "dark:text-metal-50",
15
+ f({
16
+ className: o,
17
+ variant: t
18
+ })
19
+ ),
20
+ ...m,
21
+ children: p
22
+ }
23
+ );
24
+ });
25
+ d.displayName = "KonstructTypography";
28
26
  export {
29
27
  d as Typography
30
28
  };
@@ -3,7 +3,7 @@ const a = t([], {
3
3
  variants: {
4
4
  variant: {
5
5
  h1: ["text-[57px]", "leading-16"],
6
- h2: ["text-[45px]", "leading-[52px]"],
6
+ h2: ["text-[45px]", "leading-13"],
7
7
  h3: ["text-4xl", "leading-11"],
8
8
  h4: ["text-[32px]", "leading-10"],
9
9
  h5: ["text-[28px]", "leading-9"],
@@ -40,7 +40,7 @@ const a = t([], {
40
40
  body1: ["text-base", "leading-6", "tracking-[0.5px]"],
41
41
  body2: ["text-sm", "leading-5", "tracking-[0.25px]"],
42
42
  body3: ["text-xs", "leading-4", "tracking-[0.4px]"],
43
- tooltip: ["text-sm", "leading-[22px]"]
43
+ tooltip: ["text-sm", "leading-5.5"]
44
44
  }
45
45
  },
46
46
  defaultVariants: {
@@ -1,20 +1,20 @@
1
1
  import { jsxs as i, jsx as r } from "react/jsx-runtime";
2
- import { Button as t } from "../../../Button/Button.js";
2
+ import { Button as a } from "../../../Button/Button.js";
3
3
  import { cn as e } from "../../../../utils/index.js";
4
4
  import { E as m } from "../../../../ellipsis-vertical-BVPtjl5f.js";
5
5
  const b = ({
6
- actions: a,
6
+ actions: t,
7
7
  wrapperClassName: l,
8
- triggerButtonClassName: s,
9
- iconTriggerButtonClassName: n,
8
+ triggerButtonClassName: n,
9
+ iconTriggerButtonClassName: s,
10
10
  wrapperActionsClassName: d,
11
11
  wrapperContentActionsClassName: c,
12
12
  ...h
13
- }) => a ? /* @__PURE__ */ i("div", { className: e("relative group", l), children: [
13
+ }) => t ? /* @__PURE__ */ i("div", { className: e("relative group", l), children: [
14
14
  /* @__PURE__ */ i(
15
- t,
15
+ a,
16
16
  {
17
- variant: "text",
17
+ variant: "link",
18
18
  shape: "circle",
19
19
  size: "large",
20
20
  className: e(
@@ -24,7 +24,7 @@ const b = ({
24
24
  "dark:text-metal-400",
25
25
  "dark:group-hover:text-aurora-500",
26
26
  "dark:group-hover:bg-aurora-900",
27
- s
27
+ n
28
28
  ),
29
29
  role: "presentation",
30
30
  children: [
@@ -32,7 +32,7 @@ const b = ({
32
32
  m,
33
33
  {
34
34
  "aria-hidden": "true",
35
- className: e("w-7 h-7", n)
35
+ className: e("w-7 h-7", s)
36
36
  }
37
37
  ),
38
38
  /* @__PURE__ */ r("span", { className: "sr-only", children: "Show Actions" })
@@ -46,7 +46,7 @@ const b = ({
46
46
  "absolute",
47
47
  "top-full",
48
48
  "right-0",
49
- "w-[215px]",
49
+ "w-53.75",
50
50
  "hidden",
51
51
  "group-hover:block",
52
52
  "z-10",
@@ -67,8 +67,8 @@ const b = ({
67
67
  "fade-in-0",
68
68
  c
69
69
  ),
70
- children: a.map(({ label: o, className: p, onClick: u }) => /* @__PURE__ */ r(
71
- t,
70
+ children: t.map(({ label: o, className: p, onClick: u }) => /* @__PURE__ */ r(
71
+ a,
72
72
  {
73
73
  className: e(
74
74
  "w-full",
@@ -87,10 +87,10 @@ const b = ({
87
87
  "px-6",
88
88
  p
89
89
  ),
90
- variant: "text",
90
+ variant: "link",
91
91
  asChild: !0,
92
92
  role: "presentation",
93
- children: /* @__PURE__ */ r(t, { onClick: () => u(h.row.original), children: o })
93
+ children: /* @__PURE__ */ r(a, { onClick: () => u(h.row.original), children: o })
94
94
  },
95
95
  o
96
96
  ))
@@ -1,15 +1,15 @@
1
1
  import { jsxs as i, jsx as o } from "react/jsx-runtime";
2
2
  import { useMemo as l, useCallback as p } from "react";
3
- import { Dropdown as g } from "../../../Dropdown/Dropdown.js";
4
- import { DEFAULT_PAGE_SIZES as c } from "../../constants/pagination.js";
5
- import { useTableContext as d } from "../../contexts/table.hook.js";
3
+ import { Select as c } from "../../../Select/Select.js";
4
+ import { DEFAULT_PAGE_SIZES as g } from "../../constants/pagination.js";
5
+ import { useTableContext as x } from "../../contexts/table.hook.js";
6
6
  const u = ({
7
- pageSizes: r = c
7
+ pageSizes: r = g
8
8
  }) => {
9
- const { pageSize: n, onPageSize: t, handlePage: a } = d(), s = l(
9
+ const { pageSize: s, onPageSize: t, handlePage: a } = x(), m = l(
10
10
  () => r.map(String).map((e) => ({ label: e, value: e })),
11
11
  []
12
- ), m = p(
12
+ ), n = p(
13
13
  (e) => {
14
14
  t(Number(e)), a(0);
15
15
  },
@@ -18,13 +18,13 @@ const u = ({
18
18
  return /* @__PURE__ */ i("div", { className: "flex items-center gap-2 dark:text-metal-300", children: [
19
19
  /* @__PURE__ */ o("span", { children: "Show" }),
20
20
  /* @__PURE__ */ o(
21
- g,
21
+ c,
22
22
  {
23
23
  className: "w-22 [&>div>p]:text-xs bg-white",
24
24
  listItemClassName: "[&>p]:text-xs dark:bg-metal-800",
25
- options: s,
26
- value: n.toString(),
27
- onChange: ({ target: e }) => m(e.value)
25
+ options: m,
26
+ value: s.toString(),
27
+ onChange: ({ target: e }) => n(e.value)
28
28
  }
29
29
  )
30
30
  ] });
@@ -72,7 +72,7 @@ const N = ({ numberOfRows: i, table: o }) => {
72
72
  children: /* @__PURE__ */ r(
73
73
  m,
74
74
  {
75
- variant: "text",
75
+ variant: "link",
76
76
  shape: "circle",
77
77
  size: "large",
78
78
  disabled: !0,