@aivex/ui 1.2.0-dev.49 → 1.2.0-dev.50

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 (63) hide show
  1. package/dist/components/Avatar/Avatar.cjs +1 -1
  2. package/dist/components/Avatar/Avatar.cjs.map +1 -1
  3. package/dist/components/Avatar/Avatar.d.ts +2 -4
  4. package/dist/components/Avatar/Avatar.js +31 -29
  5. package/dist/components/Avatar/Avatar.js.map +1 -1
  6. package/dist/components/Calendar/Calendar.cjs +1 -1
  7. package/dist/components/Calendar/Calendar.js +25 -25
  8. package/dist/components/Checkbox/Checkbox.cjs +1 -1
  9. package/dist/components/Checkbox/Checkbox.js +10 -10
  10. package/dist/components/Comment/MentionInput.cjs +1 -1
  11. package/dist/components/Comment/MentionInput.js +8 -8
  12. package/dist/components/Comment/MentionList.cjs +1 -1
  13. package/dist/components/Comment/MentionList.js +36 -36
  14. package/dist/components/DataGrid/DataGrid.cjs +1 -1
  15. package/dist/components/DataGrid/DataGrid.js +108 -108
  16. package/dist/components/DataGrid/DataGrid.js.map +1 -1
  17. package/dist/components/DataGrid/DataGridColumnSettings.cjs +1 -1
  18. package/dist/components/DataGrid/DataGridColumnSettings.js +36 -36
  19. package/dist/components/DataGrid/DataGridPrimitives.cjs +1 -1
  20. package/dist/components/DataGrid/DataGridPrimitives.js +48 -48
  21. package/dist/components/DataGrid/DataGridRows.cjs +1 -1
  22. package/dist/components/DataGrid/DataGridRows.js +24 -24
  23. package/dist/components/DraggableScroll/DraggableScroll.cjs +1 -1
  24. package/dist/components/DraggableScroll/DraggableScroll.js +5 -5
  25. package/dist/components/Field/Field.cjs +1 -1
  26. package/dist/components/Field/Field.js +34 -34
  27. package/dist/components/FilterModal/FilterModal.cjs +1 -1
  28. package/dist/components/FilterModal/FilterModal.js +24 -24
  29. package/dist/components/Modal/Modal.cjs +1 -1
  30. package/dist/components/Modal/Modal.js +51 -51
  31. package/dist/components/Pagination/Pagination.cjs +1 -1
  32. package/dist/components/Pagination/Pagination.js +24 -24
  33. package/dist/components/Radio/Radio.cjs +1 -1
  34. package/dist/components/Radio/Radio.js +9 -9
  35. package/dist/components/Segmented/Segmented.cjs +1 -1
  36. package/dist/components/Segmented/Segmented.js +12 -12
  37. package/dist/components/SelectBox/SelectBox.cjs +1 -1
  38. package/dist/components/SelectBox/SelectBox.js +12 -12
  39. package/dist/components/ShapeEditor/ShapeEditor.cjs +1 -1
  40. package/dist/components/ShapeEditor/ShapeEditor.js +367 -367
  41. package/dist/components/ShapeEditor/ShapeEditor.js.map +1 -1
  42. package/dist/components/ShapeEditor/ShapeViewer.cjs +1 -1
  43. package/dist/components/ShapeEditor/ShapeViewer.js +17 -17
  44. package/dist/components/ShapeEditor/_components/CursorGuide.cjs +1 -1
  45. package/dist/components/ShapeEditor/_components/CursorGuide.js +7 -7
  46. package/dist/components/ShapeEditor/_components/Minimap.cjs +1 -1
  47. package/dist/components/ShapeEditor/_components/Minimap.js +29 -29
  48. package/dist/components/ShapeEditor/_components/MinimapShape.cjs +1 -1
  49. package/dist/components/ShapeEditor/_components/MinimapShape.cjs.map +1 -1
  50. package/dist/components/ShapeEditor/_components/MinimapShape.js +9 -9
  51. package/dist/components/Slider/Slider.cjs +1 -1
  52. package/dist/components/Slider/Slider.js +10 -10
  53. package/dist/components/Switch/Switch.cjs +1 -1
  54. package/dist/components/Switch/Switch.js +7 -7
  55. package/dist/components/Tagbox/Tagbox.cjs +1 -1
  56. package/dist/components/Tagbox/Tagbox.js +7 -7
  57. package/dist/components/Textarea/Textarea.cjs +1 -1
  58. package/dist/components/Textarea/Textarea.js +9 -9
  59. package/dist/components/Textbox/Textbox.cjs +1 -1
  60. package/dist/components/Textbox/Textbox.js +7 -7
  61. package/dist/components/UploadArea/UploadArea.cjs +1 -1
  62. package/dist/components/UploadArea/UploadArea.js +19 -19
  63. package/package.json +1 -1
@@ -6,8 +6,8 @@ import { Button as r } from "../Button/Button.js";
6
6
  import { Checkbox as i } from "../Checkbox/Checkbox.js";
7
7
  import { Popover as a } from "../Popover/Popover.js";
8
8
  import { ScrollArea as o } from "../ScrollArea/ScrollArea.js";
9
- import { jsx as s, jsxs as c } from "react/jsx-runtime";
10
- import { useCallback as l, useEffect as u, useRef as d, useState as f } from "react";
9
+ import { useCallback as s, useEffect as c, useRef as l, useState as u } from "react";
10
+ import { jsx as d, jsxs as f } from "react/jsx-runtime";
11
11
  import { DndContext as p, DragOverlay as m, KeyboardSensor as h, PointerSensor as g, closestCenter as _, useSensor as v, useSensors as y } from "@dnd-kit/core";
12
12
  import { restrictToFirstScrollableAncestor as b, restrictToVerticalAxis as x } from "@dnd-kit/modifiers";
13
13
  import { SortableContext as S, arrayMove as ee, sortableKeyboardCoordinates as te, useSortable as C, verticalListSortingStrategy as w } from "@dnd-kit/sortable";
@@ -21,59 +21,59 @@ function A(e) {
21
21
  }
22
22
  var j = "aivex:group/item aivex:relative aivex:flex aivex:w-full aivex:min-w-[160px] aivex:shrink-0 aivex:select-none aivex:items-center aivex:gap-md aivex:overflow-hidden aivex:rounded-md aivex:p-md", M = "aivex:min-w-0 aivex:flex-1 aivex:truncate aivex:text-label-lg aivex:text-text-primary", N = "aivex:group/handle aivex:relative aivex:flex aivex:size-2xl aivex:shrink-0 aivex:touch-none aivex:items-center aivex:justify-center aivex:text-icon-secondary aivex:outline-none", P = "aivex:absolute aivex:-inset-xs aivex:rounded-sm aivex:bg-bg-inverse-strong aivex:transition-opacity";
23
23
  function F({ column: t }) {
24
- let { attributes: r, listeners: a, setNodeRef: o, transform: l, transition: u, isDragging: d } = C({ id: t.id });
25
- return /* @__PURE__ */ c("div", {
24
+ let { attributes: r, listeners: a, setNodeRef: o, transform: s, transition: c, isDragging: l } = C({ id: t.id });
25
+ return /* @__PURE__ */ f("div", {
26
26
  ref: o,
27
27
  style: {
28
- transform: T.Transform.toString(l),
29
- transition: u
28
+ transform: T.Transform.toString(s),
29
+ transition: c
30
30
  },
31
- className: e(j, d && "aivex:opacity-0"),
31
+ className: e(j, l && "aivex:opacity-0"),
32
32
  children: [
33
- !d && /* @__PURE__ */ s("span", { className: "aivex:pointer-events-none aivex:absolute aivex:inset-0 aivex:bg-bg-inverse-strong aivex:opacity-0 aivex:transition-opacity aivex:group-hover/item:opacity-4 aivex:group-active/item:opacity-8" }),
34
- /* @__PURE__ */ s(i, {
33
+ !l && /* @__PURE__ */ d("span", { className: "aivex:pointer-events-none aivex:absolute aivex:inset-0 aivex:bg-bg-inverse-strong aivex:opacity-0 aivex:transition-opacity aivex:group-hover/item:opacity-4 aivex:group-active/item:opacity-8" }),
34
+ /* @__PURE__ */ d(i, {
35
35
  size: "sm",
36
36
  checked: t.getIsVisible(),
37
37
  disabled: !t.getCanHide(),
38
38
  onChange: t.getToggleVisibilityHandler()
39
39
  }),
40
- /* @__PURE__ */ s("span", {
40
+ /* @__PURE__ */ d("span", {
41
41
  className: M,
42
42
  children: A(t)
43
43
  }),
44
- /* @__PURE__ */ c("span", {
44
+ /* @__PURE__ */ f("span", {
45
45
  ...r,
46
46
  ...a,
47
47
  className: e(N, "aivex:cursor-grab aivex:active:cursor-grabbing"),
48
- children: [/* @__PURE__ */ s("span", { className: e(P, "aivex:opacity-0 aivex:group-hover/handle:opacity-4 aivex:group-active/handle:opacity-8") }), /* @__PURE__ */ s(n, { size: 20 })]
48
+ children: [/* @__PURE__ */ d("span", { className: e(P, "aivex:opacity-0 aivex:group-hover/handle:opacity-4 aivex:group-active/handle:opacity-8") }), /* @__PURE__ */ d(n, { size: 20 })]
49
49
  })
50
50
  ]
51
51
  });
52
52
  }
53
53
  function I({ column: t }) {
54
- return /* @__PURE__ */ c("div", {
54
+ return /* @__PURE__ */ f("div", {
55
55
  className: e(j, "aivex:cursor-grabbing aivex:bg-bg-secondary aivex:shadow-xl"),
56
56
  children: [
57
- /* @__PURE__ */ s(i, {
57
+ /* @__PURE__ */ d(i, {
58
58
  size: "sm",
59
59
  checked: t.getIsVisible(),
60
60
  disabled: !t.getCanHide(),
61
61
  readOnly: !0
62
62
  }),
63
- /* @__PURE__ */ s("span", {
63
+ /* @__PURE__ */ d("span", {
64
64
  className: M,
65
65
  children: A(t)
66
66
  }),
67
- /* @__PURE__ */ c("span", {
67
+ /* @__PURE__ */ f("span", {
68
68
  className: N,
69
- children: [/* @__PURE__ */ s("span", { className: e(P, "aivex:opacity-8") }), /* @__PURE__ */ s(n, { size: 20 })]
69
+ children: [/* @__PURE__ */ d("span", { className: e(P, "aivex:opacity-8") }), /* @__PURE__ */ d(n, { size: 20 })]
70
70
  })
71
71
  ]
72
72
  });
73
73
  }
74
74
  function L({ table: n, title: i = "컬럼 설정", resetLabel: C = "초기화", excludeColumnIds: T, triggerLabel: A = "컬럼 설정", container: j }) {
75
- let M = j ?? (typeof document > "u" ? null : document.body), [N, P] = f(!1), [L, R] = f(!1), [z, B] = f(!1), V = z || L || N, H = d(null), [U, W] = f(null), G = d(void 0), K = l(() => window.clearTimeout(G.current), []);
76
- u(() => {
75
+ let M = j ?? (typeof document > "u" ? null : document.body), [N, P] = u(!1), [L, R] = u(!1), [z, B] = u(!1), V = z || L || N, H = l(null), [U, W] = u(null), G = l(void 0), K = s(() => window.clearTimeout(G.current), []);
76
+ c(() => {
77
77
  let e = H.current?.parentElement;
78
78
  if (!e) return;
79
79
  let t = (e) => e instanceof Element && !!e.closest("[data-datagrid-header]"), n = (e) => {
@@ -84,7 +84,7 @@ function L({ table: n, title: i = "컬럼 설정", resetLabel: C = "초기화",
84
84
  return e.addEventListener("mouseover", n), e.addEventListener("mouseout", r), () => {
85
85
  K(), e.removeEventListener("mouseover", n), e.removeEventListener("mouseout", r);
86
86
  };
87
- }, [K]), u(() => {
87
+ }, [K]), c(() => {
88
88
  let e = () => {
89
89
  let e = H.current?.parentElement;
90
90
  if (!e) return;
@@ -98,7 +98,7 @@ function L({ table: n, title: i = "컬럼 설정", resetLabel: C = "초기화",
98
98
  window.removeEventListener("scroll", e, !0), window.removeEventListener("resize", e);
99
99
  };
100
100
  }, [V]);
101
- let q = y(v(g), v(h, { coordinateGetter: te })), J = n.getAllLeafColumns(), Y = J.filter((e) => !T?.includes(e.id)), X = Y.map((e) => e.id), [Z, Q] = f(null), $ = U ? /* @__PURE__ */ s("div", {
101
+ let q = y(v(g), v(h, { coordinateGetter: te })), J = n.getAllLeafColumns(), Y = J.filter((e) => !T?.includes(e.id)), X = Y.map((e) => e.id), [Z, Q] = u(null), $ = U ? /* @__PURE__ */ d("div", {
102
102
  style: {
103
103
  position: "fixed",
104
104
  top: U.top,
@@ -109,33 +109,33 @@ function L({ table: n, title: i = "컬럼 설정", resetLabel: C = "초기화",
109
109
  K(), R(!0);
110
110
  },
111
111
  onMouseLeave: () => R(!1),
112
- children: /* @__PURE__ */ c(a, {
112
+ children: /* @__PURE__ */ f(a, {
113
113
  open: N,
114
114
  onOpenChange: P,
115
- children: [/* @__PURE__ */ s(a.Trigger, {
115
+ children: [/* @__PURE__ */ d(a.Trigger, {
116
116
  asChild: !0,
117
- children: /* @__PURE__ */ s(r, {
117
+ children: /* @__PURE__ */ d(r, {
118
118
  size: "icon-md",
119
119
  variant: "outline",
120
120
  color: "secondary",
121
121
  "aria-label": A,
122
122
  className: "aivex:bg-bg-primary aivex:shadow-md",
123
- children: /* @__PURE__ */ s(t, { size: 20 })
123
+ children: /* @__PURE__ */ d(t, { size: 20 })
124
124
  })
125
- }), /* @__PURE__ */ c(a.Content, {
125
+ }), /* @__PURE__ */ f(a.Content, {
126
126
  container: j ?? void 0,
127
127
  children: [
128
- /* @__PURE__ */ s(a.Title, {
128
+ /* @__PURE__ */ d(a.Title, {
129
129
  className: "aivex:shrink-0",
130
130
  children: i
131
131
  }),
132
- /* @__PURE__ */ s(o, {
132
+ /* @__PURE__ */ d(o, {
133
133
  scrollbars: "vertical",
134
134
  className: "aivex:flex aivex:min-h-0 aivex:w-full aivex:flex-col",
135
135
  viewportClassName: "aivex:h-auto aivex:min-h-0",
136
- children: /* @__PURE__ */ s("div", {
136
+ children: /* @__PURE__ */ d("div", {
137
137
  className: "aivex:flex aivex:w-full aivex:flex-col",
138
- children: /* @__PURE__ */ c(p, {
138
+ children: /* @__PURE__ */ f(p, {
139
139
  sensors: q,
140
140
  collisionDetection: _,
141
141
  modifiers: [x, b],
@@ -150,17 +150,17 @@ function L({ table: n, title: i = "컬럼 설정", resetLabel: C = "초기화",
150
150
  n.setColumnOrder(J.map((e) => T?.includes(e.id) ? e.id : a[o++]));
151
151
  },
152
152
  onDragCancel: () => Q(null),
153
- children: [/* @__PURE__ */ s(S, {
153
+ children: [/* @__PURE__ */ d(S, {
154
154
  items: X,
155
155
  strategy: w,
156
- children: Y.map((e) => /* @__PURE__ */ s(F, { column: e }, e.id))
157
- }), M ? E(/* @__PURE__ */ s(m, { children: Z ? /* @__PURE__ */ s(I, { column: Z }) : null }), M) : null]
156
+ children: Y.map((e) => /* @__PURE__ */ d(F, { column: e }, e.id))
157
+ }), M ? E(/* @__PURE__ */ d(m, { children: Z ? /* @__PURE__ */ d(I, { column: Z }) : null }), M) : null]
158
158
  })
159
159
  })
160
160
  }),
161
- /* @__PURE__ */ s(a.Footer, {
161
+ /* @__PURE__ */ d(a.Footer, {
162
162
  className: "aivex:shrink-0",
163
- children: /* @__PURE__ */ s(r, {
163
+ children: /* @__PURE__ */ d(r, {
164
164
  size: "md",
165
165
  variant: "solid",
166
166
  color: "secondary",
@@ -174,7 +174,7 @@ function L({ table: n, title: i = "컬럼 설정", resetLabel: C = "초기화",
174
174
  })]
175
175
  })
176
176
  }) : null;
177
- return /* @__PURE__ */ s("span", {
177
+ return /* @__PURE__ */ d("span", {
178
178
  className: "aivex:absolute aivex:top-0 aivex:left-0",
179
179
  ref: H,
180
180
  children: $ && M ? E($, M) : null
@@ -1,2 +1,2 @@
1
- "use client";require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../utils.cjs`),t=require(`../Skeleton/Skeleton.cjs`),n=require(`../ScrollArea/ScrollArea.cjs`);let r=require(`react/jsx-runtime`),i=require(`react`),a=require(`@radix-ui/react-slot`);var o={start:`aivex:justify-start aivex:text-left`,center:`aivex:justify-center aivex:text-center`,end:`aivex:justify-end aivex:text-right`},s=(0,i.createContext)(`basic`);function c(){return(0,i.useContext)(s)}function l(e,t,n){return typeof e==`function`?e(t,n):e}function u({className:t,children:n,variant:i=`basic`,ref:a,...o}){return(0,r.jsx)(s.Provider,{value:i,children:(0,r.jsx)(`div`,{ref:a,"data-variant":i,className:e.cn(`aivex:flex aivex:h-full aivex:min-h-0 aivex:w-full aivex:min-w-0 aivex:flex-col aivex:text-body-md-regular aivex:text-text-primary`,t),...o,children:n})})}function d({className:t,children:i,ref:a,scrollbars:o=`both`,type:s=`always`,verticalScrollbarClassName:c,...l}){return(0,r.jsx)(n.ScrollArea,{ref:a,scrollbars:o,type:s,verticalScrollbarClassName:c,className:e.cn(`aivex:min-h-0 aivex:w-full aivex:min-w-0 aivex:flex-1`,t),...l,children:i})}function f({className:t,children:n,sticky:i=!0,ref:a,...o}){return(0,r.jsx)(`div`,{ref:a,role:`row`,"data-datagrid-header":``,className:e.cn(`aivex:flex aivex:shrink-0 aivex:items-center`,c()===`compact`?`aivex:h-8 aivex:bg-bg-primary`:`aivex:h-12 aivex:rounded-md aivex:border aivex:border-border-subtle aivex:bg-bg-secondary`,i&&`aivex:sticky aivex:top-0 aivex:z-10`,t),...o,children:n})}function p({className:t,children:n,ref:i,...a}){return(0,r.jsx)(`div`,{ref:i,role:`rowgroup`,className:e.cn(`aivex:flex aivex:min-h-0 aivex:flex-1 aivex:flex-col`,t),...a,children:n})}function m({className:t,children:n,asChild:i=!1,selected:o,disabled:s,interactive:l,ref:u,onClick:d,onDoubleClick:f,onKeyDown:p,tabIndex:m,role:h=`row`,"aria-disabled":g,..._}){return(0,r.jsx)(i?a.Slot:`div`,{ref:u,role:h,className:e.cn(`aivex:flex aivex:w-full aivex:shrink-0 aivex:text-text-primary aivex:transition-colors`,c()===`compact`?`aivex:min-h-9`:`aivex:min-h-12 aivex:border-b aivex:border-border-subtle aivex:last:border-b-0`,l&&!o&&!s&&`aivex:hover:bg-bg-secondary`,l&&!s&&`aivex:cursor-pointer aivex:focus-visible:outline-none aivex:focus-visible:ring-2 aivex:focus-visible:ring-border-brand`,o&&`aivex:bg-bg-brand-subtle aivex:hover:[background-image:linear-gradient(color-mix(in_srgb,var(--aivex-bg-inverse-strong)_4%,transparent),color-mix(in_srgb,var(--aivex-bg-inverse-strong)_4%,transparent))] aivex:active:[background-image:linear-gradient(color-mix(in_srgb,var(--aivex-bg-inverse-strong)_8%,transparent),color-mix(in_srgb,var(--aivex-bg-inverse-strong)_8%,transparent))]`,s&&`aivex:cursor-not-allowed aivex:opacity-disable`,t),"aria-disabled":s||g||void 0,"data-disabled":s?``:void 0,"data-state":o?`selected`:void 0,tabIndex:s?-1:m,onClick:s?void 0:d,onDoubleClick:s?void 0:f,onKeyDown:s?void 0:p,..._,children:n})}var h=`aivex:[overflow:clip] aivex:[overflow-clip-margin:4px]`;function g(e,t){let n=e=>typeof e==`string`||typeof e==`number`;return t||!(Array.isArray(e)?e.every(n):n(e))?e:(0,r.jsx)(`span`,{className:`aivex:min-w-0 aivex:truncate`,children:e})}function _({className:t,children:n,align:i=`start`,asChild:s=!1,ref:l,role:u=`cell`,...d}){return(0,r.jsx)(s?a.Slot:`div`,{"data-aivex-grid-cell":``,ref:l,role:u,className:e.cn(`aivex:flex aivex:self-stretch aivex:items-center aivex:gap-xs aivex:text-body-md-regular aivex:text-text-primary`,h,c()===`compact`?`aivex:min-h-9 aivex:px-md aivex:py-xs`:`aivex:min-h-12 aivex:px-md aivex:py-md aivex:first:pl-xl aivex:last:pr-xl`,o[i],t),...d,children:n})}function v({className:t,children:n,align:i=`start`,asChild:s=!1,ref:l,role:u=`columnheader`,...d}){return(0,r.jsx)(s?a.Slot:`div`,{"data-aivex-grid-cell":``,ref:l,role:u,className:e.cn(`aivex:flex aivex:items-center aivex:gap-xs aivex:whitespace-nowrap`,h,c()===`compact`?`aivex:h-full aivex:px-md aivex:py-xs`:`aivex:px-md aivex:first:pl-xl aivex:last:pr-xl`,`aivex:text-body-sm-medium aivex:text-text-secondary`,o[i],t),...d,children:g(n,s)})}function y({className:t,children:n,ref:i,...a}){return(0,r.jsx)(`div`,{ref:i,className:e.cn(`aivex:flex aivex:min-h-32 aivex:w-full aivex:flex-1 aivex:items-center aivex:justify-center aivex:p-xl aivex:text-body-md-regular aivex:text-text-tertiary`,t),...a,children:n})}function b({className:n,rowCount:i=5,ref:a,...o}){return(0,r.jsx)(`div`,{ref:a,className:e.cn(`aivex:flex aivex:flex-col`,n),...o,children:Array.from({length:i}).map((e,n)=>(0,r.jsx)(m,{children:(0,r.jsx)(_,{className:`aivex:w-full`,children:(0,r.jsx)(t.Skeleton,{className:`aivex:h-5 aivex:w-full`})})},n))})}function x({className:t,children:n,loading:i,ref:a,...o}){return(0,r.jsx)(`div`,{ref:a,role:`presentation`,className:e.cn(`aivex:flex aivex:w-full aivex:items-center aivex:justify-center aivex:text-text-tertiary`,i?`aivex:min-h-16`:`aivex:min-h-px`,t),...o,children:i?n:null})}exports.DataGridBody=p,exports.DataGridCell=_,exports.DataGridEmpty=y,exports.DataGridHeader=f,exports.DataGridHeaderCell=v,exports.DataGridInfiniteTrigger=x,exports.DataGridLoading=b,exports.DataGridRoot=u,exports.DataGridRow=m,exports.DataGridViewport=d,exports.resolveDataGridValue=l;
1
+ "use client";require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../utils.cjs`),t=require(`../Skeleton/Skeleton.cjs`),n=require(`../ScrollArea/ScrollArea.cjs`);let r=require(`react`),i=require(`react/jsx-runtime`),a=require(`@radix-ui/react-slot`);var o={start:`aivex:justify-start aivex:text-left`,center:`aivex:justify-center aivex:text-center`,end:`aivex:justify-end aivex:text-right`},s=(0,r.createContext)(`basic`);function c(){return(0,r.useContext)(s)}function l(e,t,n){return typeof e==`function`?e(t,n):e}function u({className:t,children:n,variant:r=`basic`,ref:a,...o}){return(0,i.jsx)(s.Provider,{value:r,children:(0,i.jsx)(`div`,{ref:a,"data-variant":r,className:e.cn(`aivex:flex aivex:h-full aivex:min-h-0 aivex:w-full aivex:min-w-0 aivex:flex-col aivex:text-body-md-regular aivex:text-text-primary`,t),...o,children:n})})}function d({className:t,children:r,ref:a,scrollbars:o=`both`,type:s=`always`,verticalScrollbarClassName:c,...l}){return(0,i.jsx)(n.ScrollArea,{ref:a,scrollbars:o,type:s,verticalScrollbarClassName:c,className:e.cn(`aivex:min-h-0 aivex:w-full aivex:min-w-0 aivex:flex-1`,t),...l,children:r})}function f({className:t,children:n,sticky:r=!0,ref:a,...o}){return(0,i.jsx)(`div`,{ref:a,role:`row`,"data-datagrid-header":``,className:e.cn(`aivex:flex aivex:shrink-0 aivex:items-center`,c()===`compact`?`aivex:h-8 aivex:bg-bg-primary`:`aivex:h-12 aivex:rounded-md aivex:border aivex:border-border-subtle aivex:bg-bg-secondary`,r&&`aivex:sticky aivex:top-0 aivex:z-10`,t),...o,children:n})}function p({className:t,children:n,ref:r,...a}){return(0,i.jsx)(`div`,{ref:r,role:`rowgroup`,className:e.cn(`aivex:flex aivex:min-h-0 aivex:flex-1 aivex:flex-col`,t),...a,children:n})}function m({className:t,children:n,asChild:r=!1,selected:o,disabled:s,interactive:l,ref:u,onClick:d,onDoubleClick:f,onKeyDown:p,tabIndex:m,role:h=`row`,"aria-disabled":g,..._}){return(0,i.jsx)(r?a.Slot:`div`,{ref:u,role:h,className:e.cn(`aivex:flex aivex:w-full aivex:shrink-0 aivex:text-text-primary aivex:transition-colors`,c()===`compact`?`aivex:min-h-9`:`aivex:min-h-12 aivex:border-b aivex:border-border-subtle aivex:last:border-b-0`,l&&!o&&!s&&`aivex:hover:bg-bg-secondary`,l&&!s&&`aivex:cursor-pointer aivex:focus-visible:outline-none aivex:focus-visible:ring-2 aivex:focus-visible:ring-border-brand`,o&&`aivex:bg-bg-brand-subtle aivex:hover:[background-image:linear-gradient(color-mix(in_srgb,var(--aivex-bg-inverse-strong)_4%,transparent),color-mix(in_srgb,var(--aivex-bg-inverse-strong)_4%,transparent))] aivex:active:[background-image:linear-gradient(color-mix(in_srgb,var(--aivex-bg-inverse-strong)_8%,transparent),color-mix(in_srgb,var(--aivex-bg-inverse-strong)_8%,transparent))]`,s&&`aivex:cursor-not-allowed aivex:opacity-disable`,t),"aria-disabled":s||g||void 0,"data-disabled":s?``:void 0,"data-state":o?`selected`:void 0,tabIndex:s?-1:m,onClick:s?void 0:d,onDoubleClick:s?void 0:f,onKeyDown:s?void 0:p,..._,children:n})}var h=`aivex:[overflow:clip] aivex:[overflow-clip-margin:4px]`;function g(e,t){let n=e=>typeof e==`string`||typeof e==`number`;return t||!(Array.isArray(e)?e.every(n):n(e))?e:(0,i.jsx)(`span`,{className:`aivex:min-w-0 aivex:truncate`,children:e})}function _({className:t,children:n,align:r=`start`,asChild:s=!1,ref:l,role:u=`cell`,...d}){return(0,i.jsx)(s?a.Slot:`div`,{"data-aivex-grid-cell":``,ref:l,role:u,className:e.cn(`aivex:flex aivex:self-stretch aivex:items-center aivex:gap-xs aivex:text-body-md-regular aivex:text-text-primary`,h,c()===`compact`?`aivex:min-h-9 aivex:px-md aivex:py-xs`:`aivex:min-h-12 aivex:px-md aivex:py-md aivex:first:pl-xl aivex:last:pr-xl`,o[r],t),...d,children:n})}function v({className:t,children:n,align:r=`start`,asChild:s=!1,ref:l,role:u=`columnheader`,...d}){return(0,i.jsx)(s?a.Slot:`div`,{"data-aivex-grid-cell":``,ref:l,role:u,className:e.cn(`aivex:flex aivex:items-center aivex:gap-xs aivex:whitespace-nowrap`,h,c()===`compact`?`aivex:h-full aivex:px-md aivex:py-xs`:`aivex:px-md aivex:first:pl-xl aivex:last:pr-xl`,`aivex:text-body-sm-medium aivex:text-text-secondary`,o[r],t),...d,children:g(n,s)})}function y({className:t,children:n,ref:r,...a}){return(0,i.jsx)(`div`,{ref:r,className:e.cn(`aivex:flex aivex:min-h-32 aivex:w-full aivex:flex-1 aivex:items-center aivex:justify-center aivex:p-xl aivex:text-body-md-regular aivex:text-text-tertiary`,t),...a,children:n})}function b({className:n,rowCount:r=5,ref:a,...o}){return(0,i.jsx)(`div`,{ref:a,className:e.cn(`aivex:flex aivex:flex-col`,n),...o,children:Array.from({length:r}).map((e,n)=>(0,i.jsx)(m,{children:(0,i.jsx)(_,{className:`aivex:w-full`,children:(0,i.jsx)(t.Skeleton,{className:`aivex:h-5 aivex:w-full`})})},n))})}function x({className:t,children:n,loading:r,ref:a,...o}){return(0,i.jsx)(`div`,{ref:a,role:`presentation`,className:e.cn(`aivex:flex aivex:w-full aivex:items-center aivex:justify-center aivex:text-text-tertiary`,r?`aivex:min-h-16`:`aivex:min-h-px`,t),...o,children:r?n:null})}exports.DataGridBody=p,exports.DataGridCell=_,exports.DataGridEmpty=y,exports.DataGridHeader=f,exports.DataGridHeaderCell=v,exports.DataGridInfiniteTrigger=x,exports.DataGridLoading=b,exports.DataGridRoot=u,exports.DataGridRow=m,exports.DataGridViewport=d,exports.resolveDataGridValue=l;
2
2
  //# sourceMappingURL=DataGridPrimitives.cjs.map
@@ -2,71 +2,71 @@
2
2
  import { cn as e } from "../../utils.js";
3
3
  import { Skeleton as t } from "../Skeleton/Skeleton.js";
4
4
  import { ScrollArea as n } from "../ScrollArea/ScrollArea.js";
5
- import { jsx as r } from "react/jsx-runtime";
6
- import { createContext as i, useContext as a } from "react";
5
+ import { createContext as r, useContext as i } from "react";
6
+ import { jsx as a } from "react/jsx-runtime";
7
7
  import { Slot as o } from "@radix-ui/react-slot";
8
8
  //#region src/components/DataGrid/DataGridPrimitives.tsx
9
9
  var s = {
10
10
  start: "aivex:justify-start aivex:text-left",
11
11
  center: "aivex:justify-center aivex:text-center",
12
12
  end: "aivex:justify-end aivex:text-right"
13
- }, c = i("basic");
13
+ }, c = r("basic");
14
14
  function l() {
15
- return a(c);
15
+ return i(c);
16
16
  }
17
17
  function u(e, t, n) {
18
18
  return typeof e == "function" ? e(t, n) : e;
19
19
  }
20
- function d({ className: t, children: n, variant: i = "basic", ref: a, ...o }) {
21
- return /* @__PURE__ */ r(c.Provider, {
22
- value: i,
23
- children: /* @__PURE__ */ r("div", {
24
- ref: a,
25
- "data-variant": i,
20
+ function d({ className: t, children: n, variant: r = "basic", ref: i, ...o }) {
21
+ return /* @__PURE__ */ a(c.Provider, {
22
+ value: r,
23
+ children: /* @__PURE__ */ a("div", {
24
+ ref: i,
25
+ "data-variant": r,
26
26
  className: e("aivex:flex aivex:h-full aivex:min-h-0 aivex:w-full aivex:min-w-0 aivex:flex-col aivex:text-body-md-regular aivex:text-text-primary", t),
27
27
  ...o,
28
28
  children: n
29
29
  })
30
30
  });
31
31
  }
32
- function f({ className: t, children: i, ref: a, scrollbars: o = "both", type: s = "always", verticalScrollbarClassName: c, ...l }) {
33
- return /* @__PURE__ */ r(n, {
34
- ref: a,
32
+ function f({ className: t, children: r, ref: i, scrollbars: o = "both", type: s = "always", verticalScrollbarClassName: c, ...l }) {
33
+ return /* @__PURE__ */ a(n, {
34
+ ref: i,
35
35
  scrollbars: o,
36
36
  type: s,
37
37
  verticalScrollbarClassName: c,
38
38
  className: e("aivex:min-h-0 aivex:w-full aivex:min-w-0 aivex:flex-1", t),
39
39
  ...l,
40
- children: i
40
+ children: r
41
41
  });
42
42
  }
43
- function p({ className: t, children: n, sticky: i = !0, ref: a, ...o }) {
44
- return /* @__PURE__ */ r("div", {
45
- ref: a,
43
+ function p({ className: t, children: n, sticky: r = !0, ref: i, ...o }) {
44
+ return /* @__PURE__ */ a("div", {
45
+ ref: i,
46
46
  role: "row",
47
47
  "data-datagrid-header": "",
48
- className: e("aivex:flex aivex:shrink-0 aivex:items-center", l() === "compact" ? "aivex:h-8 aivex:bg-bg-primary" : "aivex:h-12 aivex:rounded-md aivex:border aivex:border-border-subtle aivex:bg-bg-secondary", i && "aivex:sticky aivex:top-0 aivex:z-10", t),
48
+ className: e("aivex:flex aivex:shrink-0 aivex:items-center", l() === "compact" ? "aivex:h-8 aivex:bg-bg-primary" : "aivex:h-12 aivex:rounded-md aivex:border aivex:border-border-subtle aivex:bg-bg-secondary", r && "aivex:sticky aivex:top-0 aivex:z-10", t),
49
49
  ...o,
50
50
  children: n
51
51
  });
52
52
  }
53
- function m({ className: t, children: n, ref: i, ...a }) {
54
- return /* @__PURE__ */ r("div", {
55
- ref: i,
53
+ function m({ className: t, children: n, ref: r, ...i }) {
54
+ return /* @__PURE__ */ a("div", {
55
+ ref: r,
56
56
  role: "rowgroup",
57
57
  className: e("aivex:flex aivex:min-h-0 aivex:flex-1 aivex:flex-col", t),
58
- ...a,
58
+ ...i,
59
59
  children: n
60
60
  });
61
61
  }
62
- function h({ className: t, children: n, asChild: i = !1, selected: a, disabled: s, interactive: c, ref: u, onClick: d, onDoubleClick: f, onKeyDown: p, tabIndex: m, role: h = "row", "aria-disabled": g, ..._ }) {
63
- return /* @__PURE__ */ r(i ? o : "div", {
62
+ function h({ className: t, children: n, asChild: r = !1, selected: i, disabled: s, interactive: c, ref: u, onClick: d, onDoubleClick: f, onKeyDown: p, tabIndex: m, role: h = "row", "aria-disabled": g, ..._ }) {
63
+ return /* @__PURE__ */ a(r ? o : "div", {
64
64
  ref: u,
65
65
  role: h,
66
- className: e("aivex:flex aivex:w-full aivex:shrink-0 aivex:text-text-primary aivex:transition-colors", l() === "compact" ? "aivex:min-h-9" : "aivex:min-h-12 aivex:border-b aivex:border-border-subtle aivex:last:border-b-0", c && !a && !s && "aivex:hover:bg-bg-secondary", c && !s && "aivex:cursor-pointer aivex:focus-visible:outline-none aivex:focus-visible:ring-2 aivex:focus-visible:ring-border-brand", a && "aivex:bg-bg-brand-subtle aivex:hover:[background-image:linear-gradient(color-mix(in_srgb,var(--aivex-bg-inverse-strong)_4%,transparent),color-mix(in_srgb,var(--aivex-bg-inverse-strong)_4%,transparent))] aivex:active:[background-image:linear-gradient(color-mix(in_srgb,var(--aivex-bg-inverse-strong)_8%,transparent),color-mix(in_srgb,var(--aivex-bg-inverse-strong)_8%,transparent))]", s && "aivex:cursor-not-allowed aivex:opacity-disable", t),
66
+ className: e("aivex:flex aivex:w-full aivex:shrink-0 aivex:text-text-primary aivex:transition-colors", l() === "compact" ? "aivex:min-h-9" : "aivex:min-h-12 aivex:border-b aivex:border-border-subtle aivex:last:border-b-0", c && !i && !s && "aivex:hover:bg-bg-secondary", c && !s && "aivex:cursor-pointer aivex:focus-visible:outline-none aivex:focus-visible:ring-2 aivex:focus-visible:ring-border-brand", i && "aivex:bg-bg-brand-subtle aivex:hover:[background-image:linear-gradient(color-mix(in_srgb,var(--aivex-bg-inverse-strong)_4%,transparent),color-mix(in_srgb,var(--aivex-bg-inverse-strong)_4%,transparent))] aivex:active:[background-image:linear-gradient(color-mix(in_srgb,var(--aivex-bg-inverse-strong)_8%,transparent),color-mix(in_srgb,var(--aivex-bg-inverse-strong)_8%,transparent))]", s && "aivex:cursor-not-allowed aivex:opacity-disable", t),
67
67
  "aria-disabled": s || g || void 0,
68
68
  "data-disabled": s ? "" : void 0,
69
- "data-state": a ? "selected" : void 0,
69
+ "data-state": i ? "selected" : void 0,
70
70
  tabIndex: s ? -1 : m,
71
71
  onClick: s ? void 0 : d,
72
72
  onDoubleClick: s ? void 0 : f,
@@ -78,57 +78,57 @@ function h({ className: t, children: n, asChild: i = !1, selected: a, disabled:
78
78
  var g = "aivex:[overflow:clip] aivex:[overflow-clip-margin:4px]";
79
79
  function _(e, t) {
80
80
  let n = (e) => typeof e == "string" || typeof e == "number";
81
- return t || !(Array.isArray(e) ? e.every(n) : n(e)) ? e : /* @__PURE__ */ r("span", {
81
+ return t || !(Array.isArray(e) ? e.every(n) : n(e)) ? e : /* @__PURE__ */ a("span", {
82
82
  className: "aivex:min-w-0 aivex:truncate",
83
83
  children: e
84
84
  });
85
85
  }
86
- function v({ className: t, children: n, align: i = "start", asChild: a = !1, ref: c, role: u = "cell", ...d }) {
87
- return /* @__PURE__ */ r(a ? o : "div", {
86
+ function v({ className: t, children: n, align: r = "start", asChild: i = !1, ref: c, role: u = "cell", ...d }) {
87
+ return /* @__PURE__ */ a(i ? o : "div", {
88
88
  "data-aivex-grid-cell": "",
89
89
  ref: c,
90
90
  role: u,
91
- className: e("aivex:flex aivex:self-stretch aivex:items-center aivex:gap-xs aivex:text-body-md-regular aivex:text-text-primary", g, l() === "compact" ? "aivex:min-h-9 aivex:px-md aivex:py-xs" : "aivex:min-h-12 aivex:px-md aivex:py-md aivex:first:pl-xl aivex:last:pr-xl", s[i], t),
91
+ className: e("aivex:flex aivex:self-stretch aivex:items-center aivex:gap-xs aivex:text-body-md-regular aivex:text-text-primary", g, l() === "compact" ? "aivex:min-h-9 aivex:px-md aivex:py-xs" : "aivex:min-h-12 aivex:px-md aivex:py-md aivex:first:pl-xl aivex:last:pr-xl", s[r], t),
92
92
  ...d,
93
93
  children: n
94
94
  });
95
95
  }
96
- function y({ className: t, children: n, align: i = "start", asChild: a = !1, ref: c, role: u = "columnheader", ...d }) {
97
- return /* @__PURE__ */ r(a ? o : "div", {
96
+ function y({ className: t, children: n, align: r = "start", asChild: i = !1, ref: c, role: u = "columnheader", ...d }) {
97
+ return /* @__PURE__ */ a(i ? o : "div", {
98
98
  "data-aivex-grid-cell": "",
99
99
  ref: c,
100
100
  role: u,
101
- className: e("aivex:flex aivex:items-center aivex:gap-xs aivex:whitespace-nowrap", g, l() === "compact" ? "aivex:h-full aivex:px-md aivex:py-xs" : "aivex:px-md aivex:first:pl-xl aivex:last:pr-xl", "aivex:text-body-sm-medium aivex:text-text-secondary", s[i], t),
101
+ className: e("aivex:flex aivex:items-center aivex:gap-xs aivex:whitespace-nowrap", g, l() === "compact" ? "aivex:h-full aivex:px-md aivex:py-xs" : "aivex:px-md aivex:first:pl-xl aivex:last:pr-xl", "aivex:text-body-sm-medium aivex:text-text-secondary", s[r], t),
102
102
  ...d,
103
- children: _(n, a)
103
+ children: _(n, i)
104
104
  });
105
105
  }
106
- function b({ className: t, children: n, ref: i, ...a }) {
107
- return /* @__PURE__ */ r("div", {
108
- ref: i,
106
+ function b({ className: t, children: n, ref: r, ...i }) {
107
+ return /* @__PURE__ */ a("div", {
108
+ ref: r,
109
109
  className: e("aivex:flex aivex:min-h-32 aivex:w-full aivex:flex-1 aivex:items-center aivex:justify-center aivex:p-xl aivex:text-body-md-regular aivex:text-text-tertiary", t),
110
- ...a,
110
+ ...i,
111
111
  children: n
112
112
  });
113
113
  }
114
- function x({ className: n, rowCount: i = 5, ref: a, ...o }) {
115
- return /* @__PURE__ */ r("div", {
116
- ref: a,
114
+ function x({ className: n, rowCount: r = 5, ref: i, ...o }) {
115
+ return /* @__PURE__ */ a("div", {
116
+ ref: i,
117
117
  className: e("aivex:flex aivex:flex-col", n),
118
118
  ...o,
119
- children: Array.from({ length: i }).map((e, n) => /* @__PURE__ */ r(h, { children: /* @__PURE__ */ r(v, {
119
+ children: Array.from({ length: r }).map((e, n) => /* @__PURE__ */ a(h, { children: /* @__PURE__ */ a(v, {
120
120
  className: "aivex:w-full",
121
- children: /* @__PURE__ */ r(t, { className: "aivex:h-5 aivex:w-full" })
121
+ children: /* @__PURE__ */ a(t, { className: "aivex:h-5 aivex:w-full" })
122
122
  }) }, n))
123
123
  });
124
124
  }
125
- function S({ className: t, children: n, loading: i, ref: a, ...o }) {
126
- return /* @__PURE__ */ r("div", {
127
- ref: a,
125
+ function S({ className: t, children: n, loading: r, ref: i, ...o }) {
126
+ return /* @__PURE__ */ a("div", {
127
+ ref: i,
128
128
  role: "presentation",
129
- className: e("aivex:flex aivex:w-full aivex:items-center aivex:justify-center aivex:text-text-tertiary", i ? "aivex:min-h-16" : "aivex:min-h-px", t),
129
+ className: e("aivex:flex aivex:w-full aivex:items-center aivex:justify-center aivex:text-text-tertiary", r ? "aivex:min-h-16" : "aivex:min-h-px", t),
130
130
  ...o,
131
- children: i ? n : null
131
+ children: r ? n : null
132
132
  });
133
133
  }
134
134
  //#endregion
@@ -1,2 +1,2 @@
1
- "use client";require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../utils.cjs`),t=require(`./DataGridPrimitives.cjs`);let n=require(`react/jsx-runtime`),r=require(`react`),i=require(`@tanstack/react-table`),a=require(`@tanstack/react-virtual`);function o({row:a,virtualIndex:o,virtualStart:s,measureRef:c,interactive:l,selected:u,disabled:d,className:f,onRowClick:p,expandedContent:m,expandable:h,focusable:g,rowSelected:_,rowExpanded:v,cellRole:y,tabStop:b,onNavigate:x,onFocusRow:S}){let{original:C,id:w}=a,T=a.index,E=(0,r.useId)(),D=!!v,O=!!p&&!d,k=s!==void 0,A=(0,n.jsx)(t.DataGridRow,{ref:k?void 0:c,"data-datagrid-row-id":w,"data-row-selected":_?``:void 0,"data-row-expanded":v?``:void 0,interactive:l,selected:u,disabled:d,className:f,"aria-expanded":h?D:void 0,"aria-controls":m==null?void 0:E,tabIndex:g?b===!1?-1:0:void 0,onClick:p?e=>p(C,T,e):void 0,onKeyDown:g?e=>{if(e.target===e.currentTarget){if(x&&(e.key===`ArrowDown`||e.key===`ArrowUp`)){e.preventDefault(),x(w,e.key===`ArrowDown`?1:-1);return}if(h&&(e.key===`ArrowRight`||e.key===`ArrowLeft`)){let t=e.key===`ArrowRight`;if(t===D)return;e.preventDefault(),a.toggleExpanded(t);return}O&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),e.currentTarget.click())}}:void 0,onFocus:g&&S?()=>S(w):void 0,children:a.getVisibleCells().map(r=>{let{meta:a}=r.column.columnDef;return(0,n.jsx)(t.DataGridCell,{role:y,align:a?.cellAlign??a?.align,className:e.cn(a?.className,t.resolveDataGridValue(a?.cellClassName,C,T)),children:(0,i.flexRender)(r.column.columnDef.cell,r.getContext())},r.id)})}),j=m!=null&&(0,n.jsx)(`div`,{role:`row`,className:`aivex:w-full`,children:(0,n.jsx)(`div`,{role:y??`cell`,id:E,className:`aivex:w-full`,children:m})});return k?(0,n.jsxs)(`div`,{ref:c,"data-index":o,role:`presentation`,className:`aivex:flex aivex:w-full aivex:flex-col`,style:{position:`absolute`,top:0,left:0,width:`100%`,transform:`translateY(${s}px)`},children:[A,j]}):(0,n.jsxs)(n.Fragment,{children:[A,j]})}var s=(0,r.memo)(o);function c({rows:e,viewportRef:t,estimateRowHeight:i,overscan:o,activeRowId:s,focusableRowIds:c,pendingFocusRowId:l,focusRowElement:u,onFocusSettled:d,scrollToRowRef:f,renderRow:p}){let[m,h]=(0,r.useState)(null);(0,r.useEffect)(()=>{h(t.current)},[t]);let g=(0,a.useVirtualizer)({count:e.length,getScrollElement:()=>m,estimateSize:()=>i??48,overscan:o??6});f.current=e=>g.scrollToIndex(e,{align:`auto`}),(0,r.useEffect)(()=>()=>{f.current=null},[f]);let _=g.getVirtualItems(),v=_.map(t=>e[t.index]?.id),y=s!=null&&v.includes(s)?s:v.find(e=>e!=null&&c.has(e)),b=l!=null&&v.includes(l);return(0,r.useEffect)(()=>{!b||l==null||u(l)&&d()},[u,d,b,l]),(0,n.jsx)(`div`,{className:`aivex:relative aivex:w-full aivex:shrink-0`,style:{height:g.getTotalSize()},children:_.map(t=>{let n=e[t.index];return p(n,t,g.measureElement,n?.id===y)})})}exports.DataGridDataRow=s,exports.DataGridVirtualizedRows=c;
1
+ "use client";require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../utils.cjs`),t=require(`./DataGridPrimitives.cjs`);let n=require(`react`),r=require(`react/jsx-runtime`),i=require(`@tanstack/react-table`),a=require(`@tanstack/react-virtual`);function o({row:a,virtualIndex:o,virtualStart:s,measureRef:c,interactive:l,selected:u,disabled:d,className:f,onRowClick:p,expandedContent:m,expandable:h,focusable:g,rowSelected:_,rowExpanded:v,cellRole:y,tabStop:b,onNavigate:x,onFocusRow:S}){let{original:C,id:w}=a,T=a.index,E=(0,n.useId)(),D=!!v,O=!!p&&!d,k=s!==void 0,A=(0,r.jsx)(t.DataGridRow,{ref:k?void 0:c,"data-datagrid-row-id":w,"data-row-selected":_?``:void 0,"data-row-expanded":v?``:void 0,interactive:l,selected:u,disabled:d,className:f,"aria-expanded":h?D:void 0,"aria-controls":m==null?void 0:E,tabIndex:g?b===!1?-1:0:void 0,onClick:p?e=>p(C,T,e):void 0,onKeyDown:g?e=>{if(e.target===e.currentTarget){if(x&&(e.key===`ArrowDown`||e.key===`ArrowUp`)){e.preventDefault(),x(w,e.key===`ArrowDown`?1:-1);return}if(h&&(e.key===`ArrowRight`||e.key===`ArrowLeft`)){let t=e.key===`ArrowRight`;if(t===D)return;e.preventDefault(),a.toggleExpanded(t);return}O&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),e.currentTarget.click())}}:void 0,onFocus:g&&S?()=>S(w):void 0,children:a.getVisibleCells().map(n=>{let{meta:a}=n.column.columnDef;return(0,r.jsx)(t.DataGridCell,{role:y,align:a?.cellAlign??a?.align,className:e.cn(a?.className,t.resolveDataGridValue(a?.cellClassName,C,T)),children:(0,i.flexRender)(n.column.columnDef.cell,n.getContext())},n.id)})}),j=m!=null&&(0,r.jsx)(`div`,{role:`row`,className:`aivex:w-full`,children:(0,r.jsx)(`div`,{role:y??`cell`,id:E,className:`aivex:w-full`,children:m})});return k?(0,r.jsxs)(`div`,{ref:c,"data-index":o,role:`presentation`,className:`aivex:flex aivex:w-full aivex:flex-col`,style:{position:`absolute`,top:0,left:0,width:`100%`,transform:`translateY(${s}px)`},children:[A,j]}):(0,r.jsxs)(r.Fragment,{children:[A,j]})}var s=(0,n.memo)(o);function c({rows:e,viewportRef:t,estimateRowHeight:i,overscan:o,activeRowId:s,focusableRowIds:c,pendingFocusRowId:l,focusRowElement:u,onFocusSettled:d,scrollToRowRef:f,renderRow:p}){let[m,h]=(0,n.useState)(null);(0,n.useEffect)(()=>{h(t.current)},[t]);let g=(0,a.useVirtualizer)({count:e.length,getScrollElement:()=>m,estimateSize:()=>i??48,overscan:o??6});f.current=e=>g.scrollToIndex(e,{align:`auto`}),(0,n.useEffect)(()=>()=>{f.current=null},[f]);let _=g.getVirtualItems(),v=_.map(t=>e[t.index]?.id),y=s!=null&&v.includes(s)?s:v.find(e=>e!=null&&c.has(e)),b=l!=null&&v.includes(l);return(0,n.useEffect)(()=>{!b||l==null||u(l)&&d()},[u,d,b,l]),(0,r.jsx)(`div`,{className:`aivex:relative aivex:w-full aivex:shrink-0`,style:{height:g.getTotalSize()},children:_.map(t=>{let n=e[t.index];return p(n,t,g.measureElement,n?.id===y)})})}exports.DataGridDataRow=s,exports.DataGridVirtualizedRows=c;
2
2
  //# sourceMappingURL=DataGridRows.cjs.map
@@ -1,13 +1,13 @@
1
1
  "use client";
2
2
  import { cn as e } from "../../utils.js";
3
3
  import { DataGridCell as t, DataGridRow as n, resolveDataGridValue as r } from "./DataGridPrimitives.js";
4
- import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
5
- import { memo as s, useEffect as c, useId as l, useState as u } from "react";
4
+ import { memo as i, useEffect as a, useId as o, useState as s } from "react";
5
+ import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
6
6
  import { flexRender as d } from "@tanstack/react-table";
7
7
  import { useVirtualizer as f } from "@tanstack/react-virtual";
8
8
  //#region src/components/DataGrid/DataGridRows.tsx
9
- function p({ row: s, virtualIndex: c, virtualStart: u, measureRef: f, interactive: p, selected: m, disabled: h, className: g, onRowClick: _, expandedContent: v, expandable: y, focusable: b, rowSelected: x, rowExpanded: S, cellRole: C, tabStop: w, onNavigate: T, onFocusRow: E }) {
10
- let { original: D, id: O } = s, k = s.index, A = l(), j = !!S, M = !!_ && !h, N = u !== void 0, P = /* @__PURE__ */ a(n, {
9
+ function p({ row: i, virtualIndex: a, virtualStart: s, measureRef: f, interactive: p, selected: m, disabled: h, className: g, onRowClick: _, expandedContent: v, expandable: y, focusable: b, rowSelected: x, rowExpanded: S, cellRole: C, tabStop: w, onNavigate: T, onFocusRow: E }) {
10
+ let { original: D, id: O } = i, k = i.index, A = o(), j = !!S, M = !!_ && !h, N = s !== void 0, P = /* @__PURE__ */ l(n, {
11
11
  ref: N ? void 0 : f,
12
12
  "data-datagrid-row-id": O,
13
13
  "data-row-selected": x ? "" : void 0,
@@ -29,35 +29,35 @@ function p({ row: s, virtualIndex: c, virtualStart: u, measureRef: f, interactiv
29
29
  if (y && (e.key === "ArrowRight" || e.key === "ArrowLeft")) {
30
30
  let t = e.key === "ArrowRight";
31
31
  if (t === j) return;
32
- e.preventDefault(), s.toggleExpanded(t);
32
+ e.preventDefault(), i.toggleExpanded(t);
33
33
  return;
34
34
  }
35
35
  M && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.currentTarget.click());
36
36
  }
37
37
  } : void 0,
38
38
  onFocus: b && E ? () => E(O) : void 0,
39
- children: s.getVisibleCells().map((n) => {
39
+ children: i.getVisibleCells().map((n) => {
40
40
  let { meta: i } = n.column.columnDef;
41
- return /* @__PURE__ */ a(t, {
41
+ return /* @__PURE__ */ l(t, {
42
42
  role: C,
43
43
  align: i?.cellAlign ?? i?.align,
44
44
  className: e(i?.className, r(i?.cellClassName, D, k)),
45
45
  children: d(n.column.columnDef.cell, n.getContext())
46
46
  }, n.id);
47
47
  })
48
- }), F = v != null && /* @__PURE__ */ a("div", {
48
+ }), F = v != null && /* @__PURE__ */ l("div", {
49
49
  role: "row",
50
50
  className: "aivex:w-full",
51
- children: /* @__PURE__ */ a("div", {
51
+ children: /* @__PURE__ */ l("div", {
52
52
  role: C ?? "cell",
53
53
  id: A,
54
54
  className: "aivex:w-full",
55
55
  children: v
56
56
  })
57
57
  });
58
- return N ? /* @__PURE__ */ o("div", {
58
+ return N ? /* @__PURE__ */ u("div", {
59
59
  ref: f,
60
- "data-index": c,
60
+ "data-index": a,
61
61
  role: "presentation",
62
62
  className: "aivex:flex aivex:w-full aivex:flex-col",
63
63
  style: {
@@ -65,15 +65,15 @@ function p({ row: s, virtualIndex: c, virtualStart: u, measureRef: f, interactiv
65
65
  top: 0,
66
66
  left: 0,
67
67
  width: "100%",
68
- transform: `translateY(${u}px)`
68
+ transform: `translateY(${s}px)`
69
69
  },
70
70
  children: [P, F]
71
- }) : /* @__PURE__ */ o(i, { children: [P, F] });
71
+ }) : /* @__PURE__ */ u(c, { children: [P, F] });
72
72
  }
73
- var m = s(p);
74
- function h({ rows: e, viewportRef: t, estimateRowHeight: n, overscan: r, activeRowId: i, focusableRowIds: o, pendingFocusRowId: s, focusRowElement: l, onFocusSettled: d, scrollToRowRef: p, renderRow: m }) {
75
- let [h, g] = u(null);
76
- c(() => {
73
+ var m = i(p);
74
+ function h({ rows: e, viewportRef: t, estimateRowHeight: n, overscan: r, activeRowId: i, focusableRowIds: o, pendingFocusRowId: c, focusRowElement: u, onFocusSettled: d, scrollToRowRef: p, renderRow: m }) {
75
+ let [h, g] = s(null);
76
+ a(() => {
77
77
  g(t.current);
78
78
  }, [t]);
79
79
  let _ = f({
@@ -82,18 +82,18 @@ function h({ rows: e, viewportRef: t, estimateRowHeight: n, overscan: r, activeR
82
82
  estimateSize: () => n ?? 48,
83
83
  overscan: r ?? 6
84
84
  });
85
- p.current = (e) => _.scrollToIndex(e, { align: "auto" }), c(() => () => {
85
+ p.current = (e) => _.scrollToIndex(e, { align: "auto" }), a(() => () => {
86
86
  p.current = null;
87
87
  }, [p]);
88
- let v = _.getVirtualItems(), y = v.map((t) => e[t.index]?.id), b = i != null && y.includes(i) ? i : y.find((e) => e != null && o.has(e)), x = s != null && y.includes(s);
89
- return c(() => {
90
- !x || s == null || l(s) && d();
88
+ let v = _.getVirtualItems(), y = v.map((t) => e[t.index]?.id), b = i != null && y.includes(i) ? i : y.find((e) => e != null && o.has(e)), x = c != null && y.includes(c);
89
+ return a(() => {
90
+ !x || c == null || u(c) && d();
91
91
  }, [
92
- l,
92
+ u,
93
93
  d,
94
94
  x,
95
- s
96
- ]), /* @__PURE__ */ a("div", {
95
+ c
96
+ ]), /* @__PURE__ */ l("div", {
97
97
  className: "aivex:relative aivex:w-full aivex:shrink-0",
98
98
  style: { height: _.getTotalSize() },
99
99
  children: v.map((t) => {
@@ -1,2 +1,2 @@
1
- "use client";require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../utils.cjs`);let t=require(`react/jsx-runtime`),n=require(`react`);function r({children:r,className:i,autoScrollToEnd:a=!1,smoothScroll:o=!0,edgeFade:s=!1}){let c=(0,n.useRef)(null),l=(0,n.useRef)({isDragging:!1,startX:0,scrollLeft:0}),u=e=>{let t=c.current,{current:n}=l;if(t)if(e.type===`mousedown`)n.isDragging=!0,n.startX=e.clientX,n.scrollLeft=t.scrollLeft;else if(e.type===`mousemove`&&n.isDragging){e.preventDefault();let r=n.startX-e.clientX;t.scrollLeft=n.scrollLeft+r}else (e.type===`mouseup`||e.type===`mouseleave`)&&(n.isDragging=!1)};return(0,n.useEffect)(()=>{let e=c.current;a&&e&&requestAnimationFrame(()=>{e.scrollTo({left:e.scrollWidth,behavior:o?`smooth`:`auto`})})},[r,a,o]),(0,t.jsx)(`div`,{ref:c,className:e.cn(`aivex:overflow-x-auto aivex:overflow-y-hidden aivex:hide-scrollbar aivex:cursor-grab aivex:active:cursor-grabbing aivex:select-none`,s&&`aivex:scroll-fade-x`,i),onMouseDown:u,onMouseMove:u,onMouseUp:u,onMouseLeave:u,children:r})}exports.DraggableScroll=r;
1
+ "use client";require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../utils.cjs`);let t=require(`react`),n=require(`react/jsx-runtime`);function r({children:r,className:i,autoScrollToEnd:a=!1,smoothScroll:o=!0,edgeFade:s=!1}){let c=(0,t.useRef)(null),l=(0,t.useRef)({isDragging:!1,startX:0,scrollLeft:0}),u=e=>{let t=c.current,{current:n}=l;if(t)if(e.type===`mousedown`)n.isDragging=!0,n.startX=e.clientX,n.scrollLeft=t.scrollLeft;else if(e.type===`mousemove`&&n.isDragging){e.preventDefault();let r=n.startX-e.clientX;t.scrollLeft=n.scrollLeft+r}else (e.type===`mouseup`||e.type===`mouseleave`)&&(n.isDragging=!1)};return(0,t.useEffect)(()=>{let e=c.current;a&&e&&requestAnimationFrame(()=>{e.scrollTo({left:e.scrollWidth,behavior:o?`smooth`:`auto`})})},[r,a,o]),(0,n.jsx)(`div`,{ref:c,className:e.cn(`aivex:overflow-x-auto aivex:overflow-y-hidden aivex:hide-scrollbar aivex:cursor-grab aivex:active:cursor-grabbing aivex:select-none`,s&&`aivex:scroll-fade-x`,i),onMouseDown:u,onMouseMove:u,onMouseUp:u,onMouseLeave:u,children:r})}exports.DraggableScroll=r;
2
2
  //# sourceMappingURL=DraggableScroll.cjs.map
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import { cn as e } from "../../utils.js";
3
- import { jsx as t } from "react/jsx-runtime";
4
- import { useEffect as n, useRef as r } from "react";
3
+ import { useEffect as t, useRef as n } from "react";
4
+ import { jsx as r } from "react/jsx-runtime";
5
5
  //#region src/components/DraggableScroll/DraggableScroll.tsx
6
6
  function i({ children: i, className: a, autoScrollToEnd: o = !1, smoothScroll: s = !0, edgeFade: c = !1 }) {
7
- let l = r(null), u = r({
7
+ let l = n(null), u = n({
8
8
  isDragging: !1,
9
9
  startX: 0,
10
10
  scrollLeft: 0
@@ -17,7 +17,7 @@ function i({ children: i, className: a, autoScrollToEnd: o = !1, smoothScroll: s
17
17
  t.scrollLeft = n.scrollLeft + r;
18
18
  } else (e.type === "mouseup" || e.type === "mouseleave") && (n.isDragging = !1);
19
19
  };
20
- return n(() => {
20
+ return t(() => {
21
21
  let e = l.current;
22
22
  o && e && requestAnimationFrame(() => {
23
23
  e.scrollTo({
@@ -29,7 +29,7 @@ function i({ children: i, className: a, autoScrollToEnd: o = !1, smoothScroll: s
29
29
  i,
30
30
  o,
31
31
  s
32
- ]), /* @__PURE__ */ t("div", {
32
+ ]), /* @__PURE__ */ r("div", {
33
33
  ref: l,
34
34
  className: e("aivex:overflow-x-auto aivex:overflow-y-hidden aivex:hide-scrollbar aivex:cursor-grab aivex:active:cursor-grabbing aivex:select-none", c && "aivex:scroll-fade-x", a),
35
35
  onMouseDown: d,
@@ -1,2 +1,2 @@
1
- "use client";"use client";require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../utils.cjs`);let t=require(`class-variance-authority`),n=require(`react/jsx-runtime`),r=require(`react`),i=require(`@radix-ui/react-slot`);var a=(0,r.createContext)(null);function o(){let e=(0,r.useContext)(a);if(!e)throw Error(`Field 하위 컴포넌트는 <Field> 내부에서 사용해야 합니다.`);return e}var s=(0,t.cva)(`aivex:flex aivex:w-full`,{variants:{orientation:{vertical:`aivex:flex-col aivex:gap-xs`,horizontal:`aivex:flex-row aivex:items-center aivex:gap-sm aivex:has-[[data-slot=field-content]]:items-start`}},defaultVariants:{orientation:`vertical`}});function c({className:t,orientation:i,fieldId:o,invalid:c=!1,disabled:l=!1,ref:u,...d}){let f=(0,r.useId)(),p=o??f,m={controlId:p,descriptionId:`${p}-description`,errorId:`${p}-error`,invalid:c,disabled:l};return(0,n.jsx)(a.Provider,{value:m,children:(0,n.jsx)(`div`,{ref:u,className:e.cn(s({orientation:i}),t),"data-invalid":c||void 0,"data-disabled":l||void 0,...d})})}function l({className:t,ref:r,...i}){let{controlId:a,invalid:s,disabled:c}=o();return(0,n.jsx)(`label`,{ref:r,htmlFor:a,className:e.cn(`aivex:text-label-md aivex:text-text-secondary aivex:cursor-pointer aivex:select-none`,c&&`aivex:cursor-not-allowed aivex:text-text-disabled`,!c&&s&&`aivex:text-text-danger`,t),...i})}function u({className:t,ref:r,...i}){return(0,n.jsx)(`div`,{ref:r,"data-slot":`field-content`,className:e.cn(`aivex:flex aivex:min-w-0 aivex:flex-1 aivex:flex-col aivex:gap-2xs`,t),...i})}function d({children:e}){let{controlId:t,descriptionId:r,errorId:a,invalid:s}=o();return(0,n.jsx)(i.Slot,{id:t,"aria-describedby":s?`${r} ${a}`:r,"aria-invalid":s||void 0,children:e})}function f({className:t,ref:r,...i}){let{descriptionId:a,disabled:s}=o();return(0,n.jsx)(`p`,{ref:r,id:a,className:e.cn(`aivex:text-caption-md aivex:text-text-secondary`,s&&`aivex:text-text-disabled`,t),...i})}function p({className:t,children:r,ref:i,...a}){let{errorId:s,invalid:c}=o();return!c&&!r?null:(0,n.jsx)(`p`,{ref:i,id:s,role:`alert`,className:e.cn(`aivex:text-caption-md aivex:text-text-danger`,t),...a,children:r})}exports.Field=c,exports.FieldContent=u,exports.FieldControl=d,exports.FieldDescription=f,exports.FieldError=p,exports.FieldLabel=l,exports.fieldVariants=s;
1
+ "use client";"use client";require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../utils.cjs`);let t=require(`class-variance-authority`),n=require(`react`),r=require(`react/jsx-runtime`),i=require(`@radix-ui/react-slot`);var a=(0,n.createContext)(null);function o(){let e=(0,n.useContext)(a);if(!e)throw Error(`Field 하위 컴포넌트는 <Field> 내부에서 사용해야 합니다.`);return e}var s=(0,t.cva)(`aivex:flex aivex:w-full`,{variants:{orientation:{vertical:`aivex:flex-col aivex:gap-xs`,horizontal:`aivex:flex-row aivex:items-center aivex:gap-sm aivex:has-[[data-slot=field-content]]:items-start`}},defaultVariants:{orientation:`vertical`}});function c({className:t,orientation:i,fieldId:o,invalid:c=!1,disabled:l=!1,ref:u,...d}){let f=(0,n.useId)(),p=o??f,m={controlId:p,descriptionId:`${p}-description`,errorId:`${p}-error`,invalid:c,disabled:l};return(0,r.jsx)(a.Provider,{value:m,children:(0,r.jsx)(`div`,{ref:u,className:e.cn(s({orientation:i}),t),"data-invalid":c||void 0,"data-disabled":l||void 0,...d})})}function l({className:t,ref:n,...i}){let{controlId:a,invalid:s,disabled:c}=o();return(0,r.jsx)(`label`,{ref:n,htmlFor:a,className:e.cn(`aivex:text-label-md aivex:text-text-secondary aivex:cursor-pointer aivex:select-none`,c&&`aivex:cursor-not-allowed aivex:text-text-disabled`,!c&&s&&`aivex:text-text-danger`,t),...i})}function u({className:t,ref:n,...i}){return(0,r.jsx)(`div`,{ref:n,"data-slot":`field-content`,className:e.cn(`aivex:flex aivex:min-w-0 aivex:flex-1 aivex:flex-col aivex:gap-2xs`,t),...i})}function d({children:e}){let{controlId:t,descriptionId:n,errorId:a,invalid:s}=o();return(0,r.jsx)(i.Slot,{id:t,"aria-describedby":s?`${n} ${a}`:n,"aria-invalid":s||void 0,children:e})}function f({className:t,ref:n,...i}){let{descriptionId:a,disabled:s}=o();return(0,r.jsx)(`p`,{ref:n,id:a,className:e.cn(`aivex:text-caption-md aivex:text-text-secondary`,s&&`aivex:text-text-disabled`,t),...i})}function p({className:t,children:n,ref:i,...a}){let{errorId:s,invalid:c}=o();return!c&&!n?null:(0,r.jsx)(`p`,{ref:i,id:s,role:`alert`,className:e.cn(`aivex:text-caption-md aivex:text-text-danger`,t),...a,children:n})}exports.Field=c,exports.FieldContent=u,exports.FieldControl=d,exports.FieldDescription=f,exports.FieldError=p,exports.FieldLabel=l,exports.fieldVariants=s;
2
2
  //# sourceMappingURL=Field.cjs.map