@vkzstudio/muza-ui 1.0.26 → 1.0.27

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.
@@ -1,62 +1,62 @@
1
1
  import { jsx as d } from "react/jsx-runtime";
2
- import { forwardRef as A, useContext as K, useRef as X, useCallback as N, createContext as k } from "react";
3
- import { useMuzaTranslations as M } from "../../translations/TranslationContext.js";
2
+ import { forwardRef as A, useContext as k, useRef as X, useCallback as G, createContext as M } from "react";
3
+ import { useMuzaTranslations as T } from "../../translations/TranslationContext.js";
4
4
  import { AnimatePresence as O } from "../../node_modules/framer-motion/dist/es/components/AnimatePresence/index.js";
5
5
  import { useDragControls as U } from "../../node_modules/framer-motion/dist/es/gestures/drag/use-drag-controls.js";
6
6
  import { motion as Y } from "../../node_modules/framer-motion/dist/es/render/components/motion/proxy.js";
7
7
  import { cn as C } from "../../utils/cn.js";
8
8
  import { ReorderGroup as j } from "../../node_modules/framer-motion/dist/es/components/Reorder/Group.js";
9
9
  import { ReorderItem as z } from "../../node_modules/framer-motion/dist/es/components/Reorder/Item.js";
10
- const w = {
10
+ const D = {
11
11
  initial: { opacity: 0, scale: 0.96 },
12
12
  animate: { opacity: 1, scale: 1 },
13
13
  exit: { opacity: 0, scale: 0.96 },
14
14
  transition: { duration: 0.2, ease: "easeOut" }
15
- }, T = k({}), F = 50, G = 3, _ = () => K(T), P = k(null), V = () => {
16
- const r = K(P);
15
+ }, _ = M({}), F = 50, K = 3, P = () => k(_), S = M(null), V = () => {
16
+ const r = k(S);
17
17
  if (!r)
18
18
  throw new Error("useReorderableItem must be used within a ReorderableItem");
19
19
  return r;
20
20
  }, Z = ({
21
21
  values: r,
22
- onReorder: s,
22
+ onReorder: l,
23
23
  axis: b = "y",
24
- as: l = "ol",
25
- disabled: a = !1,
26
- layoutScroll: n = !1,
27
- animatePresence: D,
28
- style: x,
29
- className: I,
24
+ as: c = "ol",
25
+ disabled: n = !1,
26
+ layoutScroll: o = !1,
27
+ animatePresence: R,
28
+ style: g,
29
+ className: w,
30
30
  children: f
31
- }, v) => {
32
- const c = M(), u = {
33
- disabled: a,
31
+ }, x) => {
32
+ const I = T(), a = {
33
+ disabled: n,
34
34
  values: r,
35
- onReorder: a ? void 0 : s,
35
+ onReorder: n ? void 0 : l,
36
36
  axis: b,
37
- animatePresence: !!D
38
- }, e = D === !0 ? { mode: "popLayout", initial: !1 } : D || null, m = e ? /* @__PURE__ */ d(O, { ...e, children: f }) : f;
37
+ animatePresence: !!R
38
+ }, t = R === !0 ? { mode: "popLayout", initial: !1 } : R || null, i = t ? /* @__PURE__ */ d(O, { ...t, children: f }) : f;
39
39
  return /* @__PURE__ */ d(
40
- T.Provider,
40
+ _.Provider,
41
41
  {
42
- value: u,
42
+ value: a,
43
43
  children: /* @__PURE__ */ d(
44
44
  j,
45
45
  {
46
- ref: v,
46
+ ref: x,
47
47
  axis: b,
48
48
  values: r,
49
- onReorder: a ? () => {
50
- } : s,
51
- as: l,
52
- layoutScroll: n,
53
- style: x,
54
- ...l !== "tbody" && {
49
+ onReorder: n ? () => {
50
+ } : l,
51
+ as: c,
52
+ layoutScroll: o,
53
+ style: g,
54
+ ...c !== "tbody" && {
55
55
  role: "list",
56
- "aria-label": c.reorderableTable.listAriaLabel
56
+ "aria-label": I.reorderableTable.listAriaLabel
57
57
  },
58
- className: C(I),
59
- children: m
58
+ className: C(w),
59
+ children: i
60
60
  }
61
61
  )
62
62
  }
@@ -65,77 +65,79 @@ const w = {
65
65
  q.displayName = "ReorderableGroup";
66
66
  const B = ({
67
67
  value: r,
68
- as: s = "li",
68
+ as: l = "li",
69
69
  disabled: b = !1,
70
- dragListenerDisabled: l = !1,
71
- whileDrag: a,
72
- animation: n,
73
- className: D,
74
- children: x,
75
- style: I
76
- }, f) => {
70
+ dragListenerDisabled: c = !1,
71
+ whileDrag: n,
72
+ animation: o,
73
+ className: R,
74
+ children: g,
75
+ style: w,
76
+ layout: f
77
+ }, x) => {
77
78
  const {
78
- disabled: v,
79
- values: c,
80
- onReorder: u,
81
- axis: e,
82
- animatePresence: m
83
- } = _(), E = U(), L = b || v, p = !L && !l, t = n === !1 ? null : n === !0 ? w : typeof n == "object" ? {
84
- initial: n.initial ?? w.initial,
85
- animate: n.animate ?? w.animate,
86
- exit: n.exit ?? w.exit,
87
- transition: n.transition ?? w.transition
88
- } : m ? w : null, o = N(
89
- (i) => {
90
- if (!c || !u) return;
91
- const y = c.indexOf(r);
92
- if (y === -1) return;
93
- const R = y + i;
94
- if (R < 0 || R >= c.length) return;
95
- const g = [...c];
96
- g.splice(y, 1), g.splice(R, 0, r), u(g);
79
+ disabled: I,
80
+ values: a,
81
+ onReorder: t,
82
+ axis: i,
83
+ animatePresence: N
84
+ } = P(), E = U(), L = b || I, s = !L && !c, e = o === !1 ? null : o === !0 ? D : typeof o == "object" ? {
85
+ initial: o.initial ?? D.initial,
86
+ animate: o.animate ?? D.animate,
87
+ exit: o.exit ?? D.exit,
88
+ transition: o.transition ?? D.transition
89
+ } : N ? D : null, m = G(
90
+ (u) => {
91
+ if (!a || !t) return;
92
+ const p = a.indexOf(r);
93
+ if (p === -1) return;
94
+ const y = p + u;
95
+ if (y < 0 || y >= a.length) return;
96
+ const h = [...a];
97
+ h.splice(p, 1), h.splice(y, 0, r), t(h);
97
98
  },
98
- [c, u, r]
99
- ), h = N(
100
- (i) => {
101
- if (!p) return;
102
- const y = e === "y" ? "ArrowUp" : "ArrowLeft", R = e === "y" ? "ArrowDown" : "ArrowRight";
103
- i.key === y ? (i.preventDefault(), o(-1)) : i.key === R && (i.preventDefault(), o(1));
99
+ [a, t, r]
100
+ ), v = G(
101
+ (u) => {
102
+ if (!s) return;
103
+ const p = i === "y" ? "ArrowUp" : "ArrowLeft", y = i === "y" ? "ArrowDown" : "ArrowRight";
104
+ u.key === p ? (u.preventDefault(), m(-1)) : u.key === y && (u.preventDefault(), m(1));
104
105
  },
105
- [p, e, o]
106
+ [s, i, m]
106
107
  );
107
108
  return /* @__PURE__ */ d(
108
- P.Provider,
109
+ S.Provider,
109
110
  {
110
- value: { dragControls: E, dragListenerDisabled: l, moveItem: o },
111
+ value: { dragControls: E, dragListenerDisabled: c, moveItem: m },
111
112
  children: /* @__PURE__ */ d(
112
113
  z,
113
114
  {
114
- ref: f,
115
+ ref: x,
115
116
  value: r,
116
- as: s,
117
+ as: l,
118
+ layout: f,
117
119
  dragControls: E,
118
- dragListener: p,
119
- initial: t == null ? void 0 : t.initial,
120
- animate: t == null ? void 0 : t.animate,
121
- exit: t == null ? void 0 : t.exit,
122
- transition: t == null ? void 0 : t.transition,
123
- tabIndex: p ? 0 : void 0,
120
+ dragListener: s,
121
+ initial: e == null ? void 0 : e.initial,
122
+ animate: e == null ? void 0 : e.animate,
123
+ exit: e == null ? void 0 : e.exit,
124
+ transition: e == null ? void 0 : e.transition,
125
+ tabIndex: s ? 0 : void 0,
124
126
  role: "listitem",
125
127
  "aria-disabled": L,
126
- onKeyDown: h,
128
+ onKeyDown: v,
127
129
  className: C(
128
- p && "cursor-grab active:cursor-grabbing",
129
- p && "focus-visible-default",
130
- D
130
+ s && "cursor-grab active:cursor-grabbing",
131
+ s && "focus-visible-default",
132
+ R
131
133
  ),
132
- style: I,
134
+ style: w,
133
135
  whileDrag: {
134
136
  zIndex: F,
135
137
  position: "relative",
136
- ...a
138
+ ...n
137
139
  },
138
- children: x
140
+ children: g
139
141
  }
140
142
  )
141
143
  }
@@ -145,69 +147,69 @@ J.displayName = "ReorderableItem";
145
147
  const Q = A(
146
148
  ({
147
149
  as: r = "button",
148
- disabled: s = !1,
150
+ disabled: l = !1,
149
151
  "aria-label": b,
150
- className: l,
151
- children: a
152
- }, n) => {
153
- const D = M(), x = b ?? D.reorderableTable.dragHandleAriaLabel, { disabled: I, axis: f } = _(), { dragControls: v, dragListenerDisabled: c, moveItem: u } = V(), e = c && !I && !s, m = X(!1), E = (o) => {
154
- if (!e) return;
155
- m.current = !1;
156
- const h = o.clientX, i = o.clientY, y = (g) => {
157
- const S = Math.abs(g.clientX - h), H = Math.abs(g.clientY - i);
158
- (S > G || H > G) && (m.current = !0);
159
- }, R = () => {
160
- document.removeEventListener("pointermove", y), document.removeEventListener("pointerup", R);
152
+ className: c,
153
+ children: n
154
+ }, o) => {
155
+ const R = T(), g = b ?? R.reorderableTable.dragHandleAriaLabel, { disabled: w, axis: f } = P(), { dragControls: x, dragListenerDisabled: I, moveItem: a } = V(), t = I && !w && !l, i = X(!1), N = (e) => {
156
+ if (!t) return;
157
+ i.current = !1;
158
+ const m = e.clientX, v = e.clientY, u = (y) => {
159
+ const h = Math.abs(y.clientX - m), H = Math.abs(y.clientY - v);
160
+ (h > K || H > K) && (i.current = !0);
161
+ }, p = () => {
162
+ document.removeEventListener("pointermove", u), document.removeEventListener("pointerup", p);
161
163
  };
162
- document.addEventListener("pointermove", y), document.addEventListener("pointerup", R), v.start(o);
163
- }, L = (o) => {
164
- m.current && (o.stopPropagation(), m.current = !1);
165
- }, p = N(
166
- (o) => {
167
- if (!e) return;
168
- const h = f === "y" ? "ArrowUp" : "ArrowLeft", i = f === "y" ? "ArrowDown" : "ArrowRight";
169
- o.key === h ? (o.preventDefault(), u(-1)) : o.key === i && (o.preventDefault(), u(1));
164
+ document.addEventListener("pointermove", u), document.addEventListener("pointerup", p), x.start(e);
165
+ }, E = (e) => {
166
+ i.current && (e.stopPropagation(), i.current = !1);
167
+ }, L = G(
168
+ (e) => {
169
+ if (!t) return;
170
+ const m = f === "y" ? "ArrowUp" : "ArrowLeft", v = f === "y" ? "ArrowDown" : "ArrowRight";
171
+ e.key === m ? (e.preventDefault(), a(-1)) : e.key === v && (e.preventDefault(), a(1));
170
172
  },
171
- [e, f, u]
172
- ), t = {
173
- "aria-label": x,
173
+ [t, f, a]
174
+ ), s = {
175
+ "aria-label": g,
174
176
  "aria-roledescription": "sortable",
175
- onPointerDown: E,
176
- onKeyDown: p,
177
- onClick: L,
177
+ onPointerDown: N,
178
+ onKeyDown: L,
179
+ onClick: E,
178
180
  className: C(
179
181
  "touch-none select-none",
180
- e && "cursor-grab active:cursor-grabbing",
181
- !e && "cursor-default",
182
- e && "focus-visible-default",
183
- l
182
+ t && "cursor-grab active:cursor-grabbing",
183
+ !t && "cursor-default",
184
+ t && "focus-visible-default",
185
+ c
184
186
  )
185
187
  };
186
- return r === "button" ? /* @__PURE__ */ d("button", { ref: n, type: "button", disabled: s, ...t, children: a }) : r === "div" ? /* @__PURE__ */ d(
188
+ return r === "button" ? /* @__PURE__ */ d("button", { ref: o, type: "button", disabled: l, ...s, children: n }) : r === "div" ? /* @__PURE__ */ d(
187
189
  "div",
188
190
  {
189
- ref: n,
190
- tabIndex: e ? 0 : void 0,
191
- role: e ? "button" : void 0,
192
- ...t,
193
- children: a
191
+ ref: o,
192
+ tabIndex: t ? 0 : void 0,
193
+ role: t ? "button" : void 0,
194
+ ...s,
195
+ children: n
194
196
  }
195
197
  ) : /* @__PURE__ */ d(
196
198
  "span",
197
199
  {
198
- ref: n,
199
- tabIndex: e ? 0 : void 0,
200
- role: e ? "button" : void 0,
201
- ...t,
202
- children: a
200
+ ref: o,
201
+ tabIndex: t ? 0 : void 0,
202
+ role: t ? "button" : void 0,
203
+ ...s,
204
+ children: n
203
205
  }
204
206
  );
205
207
  }
206
208
  );
207
209
  Q.displayName = "ReorderableHandle";
208
- const W = ({ as: r = "li", className: s, children: b }, l) => {
209
- const a = Y[r];
210
- return /* @__PURE__ */ d(a, { ref: l, layout: !0, role: "listitem", className: C(s), children: b });
210
+ const W = ({ as: r = "li", className: l, children: b }, c) => {
211
+ const n = Y[r];
212
+ return /* @__PURE__ */ d(n, { ref: c, layout: !0, role: "listitem", className: C(l), children: b });
211
213
  }, $ = A(W);
212
214
  $.displayName = "ReorderableStaticItem";
213
215
  export {
@@ -215,6 +217,6 @@ export {
215
217
  Q as ReorderableHandle,
216
218
  J as ReorderableItem,
217
219
  $ as ReorderableStaticItem,
218
- _ as useReorderableGroup,
220
+ P as useReorderableGroup,
219
221
  V as useReorderableItem
220
222
  };
@@ -12,4 +12,5 @@ export declare const ScrollableList: Story;
12
12
  export declare const ContentBlocks: Story;
13
13
  export declare const AnimatedItems: Story;
14
14
  export declare const StaticItem: Story;
15
+ export declare const DynamicHeight: Story;
15
16
  //# sourceMappingURL=Reorderable.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Reorderable.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Reorderable/Reorderable.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAW3D,OAAO,EACL,gBAAgB,EAIjB,MAAM,eAAe,CAAA;AAwFtB,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,gBAAgB,CAuEvC,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAU9C,eAAO,MAAM,OAAO,EAAE,KAiCrB,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KAsCxB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KAuCtB,CAAA;AAED,eAAO,MAAM,cAAc,EAAE,KAmC5B,CAAA;AASD,eAAO,MAAM,SAAS,EAAE,KA2FvB,CAAA;AAgBD,eAAO,MAAM,cAAc,EAAE,KAsC5B,CAAA;AAmBD,eAAO,MAAM,aAAa,EAAE,KAgD3B,CAAA;AAGD,eAAO,MAAM,aAAa,EAAE,KA+E3B,CAAA;AA4BD,eAAO,MAAM,UAAU,EAAE,KAkDxB,CAAA"}
1
+ {"version":3,"file":"Reorderable.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Reorderable/Reorderable.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAY3D,OAAO,EACL,gBAAgB,EAIjB,MAAM,eAAe,CAAA;AAwFtB,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,gBAAgB,CAuEvC,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAU9C,eAAO,MAAM,OAAO,EAAE,KAiCrB,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KAsCxB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KAuCtB,CAAA;AAED,eAAO,MAAM,cAAc,EAAE,KAmC5B,CAAA;AASD,eAAO,MAAM,SAAS,EAAE,KA2FvB,CAAA;AAgBD,eAAO,MAAM,cAAc,EAAE,KAsC5B,CAAA;AAmBD,eAAO,MAAM,aAAa,EAAE,KAgD3B,CAAA;AAGD,eAAO,MAAM,aAAa,EAAE,KA+E3B,CAAA;AA4BD,eAAO,MAAM,UAAU,EAAE,KAkDxB,CAAA;AA8GD,eAAO,MAAM,aAAa,EAAE,KAsC3B,CAAA"}
@@ -64,6 +64,11 @@ export interface ReorderableTableProps<T extends {
64
64
  isMovable?: boolean;
65
65
  /** Enables enter/exit animations when rows are added or removed. @default false */
66
66
  animateItems?: boolean;
67
+ /**
68
+ * Controls Motion's layout animation mode on rows.
69
+ * Use `"position"` to animate only position and prevent scale distortion when row height changes.
70
+ */
71
+ layout?: true | 'position';
67
72
  }
68
73
  declare const ReorderableTable: <T extends {
69
74
  id: string | number;
@@ -1 +1 @@
1
- {"version":3,"file":"ReorderableTable.d.ts","sourceRoot":"","sources":["../../../src/components/ReorderableTable/ReorderableTable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAc,MAAM,OAAO,CAAA;AAWrE;;;;;;;;;;GAUG;AACH,MAAM,WAAW,sBAAsB,CAAC,CAAC;IACvC,uEAAuE;IACvE,OAAO,EAAE,MAAM,CAAC,CAAA;IAChB,6BAA6B;IAC7B,KAAK,EAAE,SAAS,CAAA;IAChB,0DAA0D;IAC1D,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;O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,EAAE,MAAM,KAAK,OAAO,CAAA;IACzD,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,uFAAuF;IACvF,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,mFAAmF;IACnF,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB;;;OAGG;IACH,MAAM,CAAC,EAAE,IAAI,GAAG,UAAU,CAAA;CAC3B;AAoOD,QAAA,MAAM,gBAAgB,EAAwC,CAC5D,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,EAEjC,KAAK,EAAE,qBAAqB,CAAC,CAAC,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,YAAY,CAAC,gBAAgB,CAAC,CAAA;CAAE,KACvE,KAAK,CAAC,YAAY,CACtB;AAED,OAAO,EAAE,gBAAgB,EAAE,CAAA"}
@@ -1,11 +1,11 @@
1
1
  import { jsx as e, jsxs as m } from "react/jsx-runtime";
2
- import { forwardRef as T } from "react";
2
+ import { forwardRef as w } from "react";
3
3
  import { motion as n } from "../../node_modules/framer-motion/dist/es/render/components/motion/proxy.js";
4
- import { ReorderableGroup as w, ReorderableItem as A, ReorderableHandle as C } from "../Reorderable/Reorderable.js";
5
- import { Reorder as H } from "../Icons/CustomIcons.js";
4
+ import { ReorderableGroup as A, ReorderableItem as C, ReorderableHandle as H } from "../Reorderable/Reorderable.js";
5
+ import { Reorder as O } from "../Icons/CustomIcons.js";
6
6
  import { cn as i } from "../../utils/cn.js";
7
- import { typographyVariants as O, Typography as k } from "../Typography/Typography.js";
8
- const p = 72, u = 20, E = 24, D = 4, R = ({
7
+ import { typographyVariants as k, Typography as E } from "../Typography/Typography.js";
8
+ const p = 72, u = 20, D = 24, R = 4, j = ({
9
9
  data: b,
10
10
  onReorder: y,
11
11
  columns: o,
@@ -15,23 +15,24 @@ const p = 72, u = 20, E = 24, D = 4, R = ({
15
15
  className: g,
16
16
  isMovable: s = !0,
17
17
  animateItems: x = !1,
18
- ...L
19
- }, _) => /* @__PURE__ */ e("div", { className: "w-full", children: /* @__PURE__ */ m(
18
+ layout: L,
19
+ ..._
20
+ }, v) => /* @__PURE__ */ e("div", { className: "w-full", children: /* @__PURE__ */ m(
20
21
  "table",
21
22
  {
22
- ref: _,
23
+ ref: v,
23
24
  className: i(
24
25
  "-my-sm w-full border-separate border-spacing-y-sm",
25
26
  g
26
27
  ),
27
- ...L,
28
+ ..._,
28
29
  children: [
29
30
  N && /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ m("tr", { children: [
30
31
  o.map((r, d) => /* @__PURE__ */ e(
31
32
  "th",
32
33
  {
33
34
  className: i(
34
- O({
35
+ k({
35
36
  size: "sm",
36
37
  uppercase: !0,
37
38
  variant: "body",
@@ -57,7 +58,7 @@ const p = 72, u = 20, E = 24, D = 4, R = ({
57
58
  )
58
59
  ] }) }),
59
60
  /* @__PURE__ */ e(
60
- w,
61
+ A,
61
62
  {
62
63
  values: b,
63
64
  onReorder: y,
@@ -66,32 +67,33 @@ const p = 72, u = 20, E = 24, D = 4, R = ({
66
67
  as: "tbody",
67
68
  className: "contents",
68
69
  children: b.map((r, d) => {
69
- const v = (l == null ? void 0 : l(r, d)) ?? !1, t = h || v;
70
+ const I = (l == null ? void 0 : l(r, d)) ?? !1, t = h || I;
70
71
  return /* @__PURE__ */ m(
71
- A,
72
+ C,
72
73
  {
73
74
  value: r,
74
75
  as: "tr",
76
+ layout: L,
75
77
  disabled: t,
76
78
  dragListenerDisabled: !0,
77
79
  whileDrag: t ? void 0 : { boxShadow: "0 8px 32px 0 rgba(59, 18, 107, 0.2)" },
78
80
  className: "group rounded-2xl",
79
81
  children: [
80
82
  o.map((a, c) => {
81
- const I = c === 0, f = c === o.length - 1;
83
+ const T = c === 0, f = c === o.length - 1;
82
84
  return /* @__PURE__ */ e(
83
85
  n.td,
84
86
  {
85
87
  initial: !1,
86
88
  animate: f ? {
87
- paddingRight: s ? E : D
89
+ paddingRight: s ? D : R
88
90
  } : void 0,
89
91
  transition: { duration: 0.3, ease: "easeInOut" },
90
92
  className: i(
91
93
  "h-comp-table-h border-y border-stroke-base-secondary bg-surface-base-secondary align-middle",
92
94
  f ? "pl-comp-table-p" : "px-comp-table-p",
93
95
  {
94
- "rounded-l-xl border-l": I,
96
+ "rounded-l-xl border-l": T,
95
97
  "group-focus-within:border-icon-brand-focus group-hover:border-icon-brand-hover": !t
96
98
  },
97
99
  a.className
@@ -101,7 +103,7 @@ const p = 72, u = 20, E = 24, D = 4, R = ({
101
103
  r,
102
104
  d
103
105
  ) : /* @__PURE__ */ e(
104
- k,
106
+ E,
105
107
  {
106
108
  variant: "body",
107
109
  size: "base",
@@ -146,14 +148,14 @@ const p = 72, u = 20, E = 24, D = 4, R = ({
146
148
  transition: { duration: 0.3, ease: "easeInOut" },
147
149
  className: "flex h-full items-center justify-center overflow-hidden border-l border-stroke-base-secondary",
148
150
  children: /* @__PURE__ */ e(
149
- C,
151
+ H,
150
152
  {
151
153
  disabled: !s || t,
152
154
  className: i(
153
155
  "flex h-comp-button-h-sm w-comp-button-w-sm items-center justify-center focus-visible-default",
154
156
  t ? "text-text-dark-disabled" : "text-text-brand-def"
155
157
  ),
156
- children: /* @__PURE__ */ e(H, { className: "size-icon-default" })
158
+ children: /* @__PURE__ */ e(O, { className: "size-icon-default" })
157
159
  }
158
160
  )
159
161
  }
@@ -169,8 +171,8 @@ const p = 72, u = 20, E = 24, D = 4, R = ({
169
171
  )
170
172
  ]
171
173
  }
172
- ) }), j = T(R);
173
- j.displayName = "ReorderableTable";
174
+ ) }), P = w(j);
175
+ P.displayName = "ReorderableTable";
174
176
  export {
175
- j as ReorderableTable
177
+ P as ReorderableTable
176
178
  };