@nubisco/ui 5.16.0 → 5.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (124) hide show
  1. package/dist/{BarChart-BmDXIaf6.cjs → BarChart-B3B7wH20.cjs} +1 -1
  2. package/dist/{BarChart-CmYyd4IV.js → BarChart-DUy6vE_i.js} +4 -4
  3. package/dist/{BlueprintControls-CVQkxcMU.js → BlueprintControls-CuOAdppD.js} +1 -1
  4. package/dist/{BlueprintControls-IU6Dc5yv.cjs → BlueprintControls-LCIgk-cb.cjs} +1 -1
  5. package/dist/Board-6D49Yld8.js +524 -0
  6. package/dist/Board-Cp8XfgZm.cjs +1 -0
  7. package/dist/{Confirm-DsrwfJbb.cjs → Confirm-Br9VOB2-.cjs} +1 -1
  8. package/dist/{Confirm-DWEwpP6C.js → Confirm-DztLfQzB.js} +2 -2
  9. package/dist/{DataTable-D6hXgtDH.js → DataTable-8VaU0T7V.js} +1 -1
  10. package/dist/{DataTable-BJKfz59R.cjs → DataTable-Mq7v4Dyk.cjs} +1 -1
  11. package/dist/{FileUploader-CufMlD5X.cjs → FileUploader-DPIAWehF.cjs} +1 -1
  12. package/dist/{FileUploader-B2A1T1vb.js → FileUploader-OJJIlvmH.js} +1 -1
  13. package/dist/{GanttChart-Cekazr75.cjs → GanttChart-C6uVsNrq.cjs} +1 -1
  14. package/dist/{GanttChart-B6Np07RJ.js → GanttChart-asYYkfjM.js} +3 -3
  15. package/dist/{InterpolationChart-BF00hyiY.js → InterpolationChart-CdbT0AvE.js} +3 -3
  16. package/dist/{InterpolationChart-D_QPQOIS.cjs → InterpolationChart-w1GgDSDT.cjs} +1 -1
  17. package/dist/{LineChart-D21jFHa1.js → LineChart-BgnDKI8u.js} +4 -4
  18. package/dist/{LineChart-CgBvFTwd.cjs → LineChart-CmBBttxc.cjs} +1 -1
  19. package/dist/{Modal-DAcbddGc.js → Modal-BvZulLj2.js} +46 -33
  20. package/dist/Modal-Xa9TIGNi.cjs +1 -0
  21. package/dist/{NotificationCenter-RIzKsxUf.cjs → NotificationCenter-B12PMiat.cjs} +1 -1
  22. package/dist/{NotificationCenter-BWNFq7Y_.js → NotificationCenter-B2kJXtA9.js} +1 -1
  23. package/dist/{Pagination-D69J9sA1.cjs → Pagination-Di4RPomA.cjs} +1 -1
  24. package/dist/{Pagination-CH2A6T3n.js → Pagination-JW-O2kLk.js} +1 -1
  25. package/dist/{PieChart-DajsvhAV.cjs → PieChart-CUckdHre.cjs} +1 -1
  26. package/dist/{PieChart-ByOhOTXU.js → PieChart-CpkjCb1W.js} +3 -3
  27. package/dist/{TableOfContents-BfR2Zyrv.cjs → TableOfContents-C6Qnq6aS.cjs} +1 -1
  28. package/dist/{TableOfContents-C6zgmnCg.js → TableOfContents-DwnnMxv5.js} +1 -1
  29. package/dist/{Tabs-BCCI2jAd.cjs → Tabs-B5crovQe.cjs} +1 -1
  30. package/dist/{Tabs-CxqDD--r.js → Tabs-DRrq4YCX.js} +1 -1
  31. package/dist/{Walkthrough-CDeBRQZb.cjs → Walkthrough-DRx76ziA.cjs} +1 -1
  32. package/dist/{Walkthrough-B_zZaq4y.js → Walkthrough-vAJctcje.js} +1 -1
  33. package/dist/all.cjs +1 -1
  34. package/dist/all.mjs +32 -32
  35. package/dist/component-styles.json +3 -0
  36. package/dist/components/Avatar.cjs +1 -1
  37. package/dist/components/Avatar.mjs +1 -1
  38. package/dist/components/Badge.cjs +1 -1
  39. package/dist/components/Badge.mjs +1 -1
  40. package/dist/components/Banner.cjs +1 -1
  41. package/dist/components/Banner.mjs +1 -1
  42. package/dist/components/BlueprintControls.cjs +1 -1
  43. package/dist/components/BlueprintControls.mjs +1 -1
  44. package/dist/components/Board.cjs +1 -1
  45. package/dist/components/Board.d.ts +28 -0
  46. package/dist/components/Board.mjs +1 -1
  47. package/dist/components/Board.vue.d.ts +13 -1
  48. package/dist/components/Board.vue.d.ts.map +1 -1
  49. package/dist/components/Breadcrumbs.cjs +1 -1
  50. package/dist/components/Breadcrumbs.mjs +1 -1
  51. package/dist/components/Button.cjs +1 -1
  52. package/dist/components/Button.mjs +1 -1
  53. package/dist/components/Calendar.cjs +1 -1
  54. package/dist/components/Calendar.mjs +1 -1
  55. package/dist/components/Charts/BarChart.cjs +1 -1
  56. package/dist/components/Charts/BarChart.mjs +1 -1
  57. package/dist/components/Charts/GanttChart.cjs +1 -1
  58. package/dist/components/Charts/GanttChart.mjs +1 -1
  59. package/dist/components/Charts/InterpolationChart.cjs +1 -1
  60. package/dist/components/Charts/InterpolationChart.mjs +1 -1
  61. package/dist/components/Charts/LineChart.cjs +1 -1
  62. package/dist/components/Charts/LineChart.mjs +1 -1
  63. package/dist/components/Charts/PieChart.cjs +1 -1
  64. package/dist/components/Charts/PieChart.mjs +1 -1
  65. package/dist/components/Confirm.cjs +1 -1
  66. package/dist/components/Confirm.mjs +1 -1
  67. package/dist/components/DataTable.cjs +1 -1
  68. package/dist/components/DataTable.mjs +1 -1
  69. package/dist/components/DatePicker.vue.d.ts +1 -1
  70. package/dist/components/FileUploader.cjs +1 -1
  71. package/dist/components/FileUploader.mjs +1 -1
  72. package/dist/components/Modal.cjs +1 -1
  73. package/dist/components/Modal.d.ts +6 -0
  74. package/dist/components/Modal.mjs +1 -1
  75. package/dist/components/Modal.vue.d.ts +4 -3
  76. package/dist/components/Modal.vue.d.ts.map +1 -1
  77. package/dist/components/NotificationCenter.cjs +1 -1
  78. package/dist/components/NotificationCenter.mjs +1 -1
  79. package/dist/components/NotificationCenter.vue.d.ts +1 -1
  80. package/dist/components/NotificationCenterItem.vue.d.ts +1 -1
  81. package/dist/components/NumberInput.vue.d.ts +1 -1
  82. package/dist/components/Pagination.cjs +1 -1
  83. package/dist/components/Pagination.mjs +1 -1
  84. package/dist/components/Select.vue.d.ts +1 -1
  85. package/dist/components/TableOfContents.cjs +1 -1
  86. package/dist/components/TableOfContents.mjs +1 -1
  87. package/dist/components/Tabs.cjs +1 -1
  88. package/dist/components/Tabs.mjs +1 -1
  89. package/dist/components/TextInput.vue.d.ts +1 -1
  90. package/dist/components/Walkthrough.cjs +1 -1
  91. package/dist/components/Walkthrough.mjs +1 -1
  92. package/dist/composables/useConfirm.composable.cjs +1 -1
  93. package/dist/composables/useConfirm.composable.mjs +2 -2
  94. package/dist/index.cjs +1 -1
  95. package/dist/index.mjs +24 -24
  96. package/dist/main.d.ts +1 -1
  97. package/dist/main.d.ts.map +1 -1
  98. package/dist/styles/Board.css +1 -1
  99. package/dist/styles/Modal.css +1 -1
  100. package/dist/ui.css +2 -2
  101. package/package.json +1 -1
  102. package/dist/Board-6TUivitd.cjs +0 -1
  103. package/dist/Board-nLi96Obf.js +0 -420
  104. package/dist/Modal-nmkOUH0U.cjs +0 -1
  105. /package/dist/{Avatar-BmB57kGg.cjs → Avatar-CLL3i8dn.cjs} +0 -0
  106. /package/dist/{Avatar-ap4X6_kE.js → Avatar-uYRUtK1R.js} +0 -0
  107. /package/dist/{Badge-B1xoanmq.cjs → Badge-ouVFB318.cjs} +0 -0
  108. /package/dist/{Badge-CxBslbIp.js → Badge-wDtZdOfk.js} +0 -0
  109. /package/dist/{Banner-DzySrOrs.cjs → Banner-CtaMbfyG.cjs} +0 -0
  110. /package/dist/{Banner-D61pK-1n.js → Banner-DKMPZuXR.js} +0 -0
  111. /package/dist/{Breadcrumbs-BT3EvjKk.js → Breadcrumbs-BXsbR60g.js} +0 -0
  112. /package/dist/{Breadcrumbs-H9PvTXK0.cjs → Breadcrumbs-CPucjD0z.cjs} +0 -0
  113. /package/dist/{Button-CV2mm5ZB.js → Button-BAfC7ySK.js} +0 -0
  114. /package/dist/{Button-S8xZ0EGV.cjs → Button-BZn2lmMA.cjs} +0 -0
  115. /package/dist/{Calendar-DiYrR5ss.cjs → Calendar-D3ExPJ2t.cjs} +0 -0
  116. /package/dist/{Calendar-Bu8yA7-h.js → Calendar-DCoZLEcA.js} +0 -0
  117. /package/dist/{ChartLegend-ywCoTUbO.js → ChartLegend-B_Y9TNfO.js} +0 -0
  118. /package/dist/{ChartLegend-O2SYdHsd.cjs → ChartLegend-k-7LH8-7.cjs} +0 -0
  119. /package/dist/{palette-CS95-prq.js → palette-BVXsOJol.js} +0 -0
  120. /package/dist/{palette-BW0RLn76.cjs → palette-CP7R55wd.cjs} +0 -0
  121. /package/dist/{scales-BjSg0Ayo.js → scales-CsGzsNm7.js} +0 -0
  122. /package/dist/{scales-VtK6oMP0.cjs → scales-DJ_hCmZX.cjs} +0 -0
  123. /package/dist/{useChartSize-CBOK3yq5.js → useChartSize-6K6L_Xnm.js} +0 -0
  124. /package/dist/{useChartSize-BPqvq1te.cjs → useChartSize-DGUae61E.cjs} +0 -0
@@ -1,420 +0,0 @@
1
- import { useStableId as e } from "./composables/useStableId.composable.mjs";
2
- import { useSurfaceLayer as t } from "./composables/useSurfaceLayer.composable.mjs";
3
- import { Fragment as n, computed as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, defineComponent as c, mergeProps as l, nextTick as u, normalizeClass as d, normalizeStyle as f, openBlock as p, ref as m, renderList as h, renderSlot as g, toDisplayString as _, unref as v, withModifiers as y } from "vue";
4
- //#region src/components/Board.vue?vue&type=script&setup=true&lang.ts
5
- var b = [
6
- "draggable",
7
- "onDragstart",
8
- "onDragover"
9
- ], ee = { class: "nb-board__col-title" }, te = { class: "nb-board__col-count" }, ne = ["onClick"], re = ["aria-label"], ie = { class: "nb-board__lane-label" }, ae = { class: "nb-board__lane-count" }, oe = ["onDragover", "onDrop"], se = ["aria-label"], ce = [
10
- "data-item-id",
11
- "aria-label",
12
- "aria-describedby",
13
- "onDragstart",
14
- "onDragover",
15
- "onKeydown",
16
- "onBlur"
17
- ], le = {
18
- key: 0,
19
- class: "nb-board__empty-cell",
20
- "aria-hidden": "true"
21
- }, ue = {
22
- key: 0,
23
- class: "nb-board__cell-footer"
24
- }, de = ["id"], fe = {
25
- class: "nb-board__sr",
26
- "aria-live": "assertive"
27
- }, x = .5, S = 44, C = /* @__PURE__ */ c({
28
- __name: "Board",
29
- props: {
30
- columns: {},
31
- items: {},
32
- lanes: { default: void 0 },
33
- reorderableColumns: {
34
- type: Boolean,
35
- default: !1
36
- },
37
- nestable: {
38
- type: Boolean,
39
- default: !1
40
- }
41
- },
42
- emits: [
43
- "move",
44
- "nest",
45
- "column-move"
46
- ],
47
- setup(c, { emit: C }) {
48
- let w = c, { layerProps: pe } = t(), T = C, E = e({}), D = m(null), O = r(() => ({ gridTemplateColumns: `repeat(${w.columns.length}, var(--nb-board-column-track, minmax(200px, 1fr)))` })), me = r(() => w.lanes && w.lanes.length > 0 ? w.lanes : [null]);
49
- function k(e) {
50
- return e ? e.id ?? null : null;
51
- }
52
- function A(e) {
53
- return e ? M(e.id) : "__flat__";
54
- }
55
- function j(e) {
56
- return w.items.filter((t) => t.columnId === e).length;
57
- }
58
- function M(e) {
59
- return e ?? "__none__";
60
- }
61
- function he(e) {
62
- return w.lanes ? w.items.filter((t) => (t.laneId ?? null) === e).length : 0;
63
- }
64
- function N(e, t) {
65
- return !w.lanes || w.lanes.length === 0 ? w.items.filter((e) => e.columnId === t) : w.items.filter((n) => n.columnId === t && (n.laneId ?? null) === e);
66
- }
67
- function P(e) {
68
- return w.columns.find((t) => t.id === e);
69
- }
70
- let F = m(/* @__PURE__ */ new Set());
71
- function I(e) {
72
- let t = M(e), n = new Set(F.value);
73
- n.has(t) ? n.delete(t) : n.add(t), F.value = n;
74
- }
75
- function L(e) {
76
- return F.value.has(M(e));
77
- }
78
- function R(e) {
79
- let t = e.label ?? e.name ?? e.title;
80
- return typeof t == "string" ? t : `Item ${e.id}`;
81
- }
82
- function z(e, t) {
83
- return e ? `${t.label}, ${e.label}` : t.label;
84
- }
85
- function ge(e, t) {
86
- return z(e, t);
87
- }
88
- function B(e, t, n) {
89
- let r = N(k(t), n.id), i = r.findIndex((t) => t.id === e.id), a = `${R(e)}, ${i + 1} of ${r.length} in ${z(t, n)}`;
90
- return q.value?.item.id === e.id ? `${a}, picked up` : a;
91
- }
92
- let V = m("");
93
- function H(e, t, n, r) {
94
- let i = N(t, n).filter((t) => t.id !== e.item.id), a = Math.max(0, Math.min(r, i.length));
95
- return e.fromColumnId === n && e.fromLaneId === t && a === N(t, n).findIndex((t) => t.id === e.item.id) ? !1 : (T("move", {
96
- itemId: e.item.id,
97
- fromColumnId: e.fromColumnId,
98
- toColumnId: n,
99
- fromLaneId: e.fromLaneId,
100
- toLaneId: t,
101
- toIndex: a,
102
- beforeItemId: i[a - 1]?.id ?? null,
103
- afterItemId: i[a]?.id ?? null
104
- }), !0);
105
- }
106
- let U = m(null), W = m(null), G = m(null);
107
- function _e(e, t, n) {
108
- q.value = null, U.value = {
109
- item: e,
110
- fromLaneId: k(t),
111
- fromColumnId: n
112
- };
113
- }
114
- function ve(e, t, n, r, i) {
115
- if (!U.value) return;
116
- let a = e.currentTarget.getBoundingClientRect();
117
- if (w.nestable && a.height >= S) {
118
- let r = (e.clientY - a.top) / a.height, o = (1 - x) / 2;
119
- if (r > o && r < 1 - o && i.id !== U.value.item.id) {
120
- G.value = {
121
- laneId: k(t),
122
- colId: n,
123
- itemId: i.id
124
- }, W.value = null;
125
- return;
126
- }
127
- }
128
- G.value = null;
129
- let o = e.clientY >= a.top + a.height / 2;
130
- W.value = {
131
- laneId: k(t),
132
- colId: n,
133
- index: r + (o ? 1 : 0)
134
- };
135
- }
136
- function ye(e, t) {
137
- if (!U.value) return;
138
- let n = k(e);
139
- W.value = {
140
- laneId: n,
141
- colId: t,
142
- index: N(n, t).length
143
- };
144
- }
145
- function be() {
146
- W.value = null, G.value = null;
147
- }
148
- function xe() {
149
- U.value = null, W.value = null, G.value = null;
150
- }
151
- function Se(e, t) {
152
- return K(e, t) !== null;
153
- }
154
- function K(e, t) {
155
- let n = k(e), r = W.value;
156
- if (U.value && r && r.laneId === n && r.colId === t) return r.index;
157
- let i = q.value;
158
- if (i && i.laneId === n && i.colId === t) {
159
- let e = N(n, t).findIndex((e) => e.id === i.item.id);
160
- return e !== -1 && e <= i.index ? i.index + 1 : i.index;
161
- }
162
- return null;
163
- }
164
- function Ce(e, t, n) {
165
- let r = G.value;
166
- return r !== null && r.laneId === k(e) && r.colId === t && r.itemId === n.id;
167
- }
168
- function we(e, t, n) {
169
- return n === N(k(e), t).length - 1 && K(e, t) === n + 1;
170
- }
171
- function Te(e, t) {
172
- if (Z.value !== null) return;
173
- let n = W.value, r = G.value;
174
- W.value = null, G.value = null;
175
- let i = U.value;
176
- if (U.value = null, !i) return;
177
- if (r) {
178
- T("nest", {
179
- itemId: i.item.id,
180
- ontoItemId: r.itemId,
181
- fromColumnId: i.fromColumnId,
182
- ...w.lanes ? { fromLaneId: i.fromLaneId } : {}
183
- }), V.value = `${R(i.item)} dropped onto ${R(w.items.find((e) => e.id === r.itemId) ?? i.item)}`;
184
- return;
185
- }
186
- let a = k(e), o = N(a, t), s = n && n.laneId === a && n.colId === t ? n.index : o.length, c = o.findIndex((e) => e.id === i.item.id);
187
- H(i, a, t, c !== -1 && c < s ? s - 1 : s);
188
- }
189
- let q = m(null);
190
- function Ee(e, t, n, r) {
191
- let i = k(n);
192
- if (e.key === "Escape") {
193
- if (!q.value) return;
194
- e.preventDefault(), q.value = null, V.value = "Move cancelled";
195
- return;
196
- }
197
- if (e.key === " " || e.key === "Enter") {
198
- if (e.preventDefault(), q.value?.item.id !== t.id) {
199
- De(t, i, r);
200
- return;
201
- }
202
- if (w.nestable && e.shiftKey && Y()) {
203
- Ae();
204
- return;
205
- }
206
- je();
207
- return;
208
- }
209
- [
210
- "ArrowUp",
211
- "ArrowDown",
212
- "ArrowLeft",
213
- "ArrowRight"
214
- ].includes(e.key) && (e.preventDefault(), q.value?.item.id === t.id ? ke(e.key) : Me(e.key, t, i, r));
215
- }
216
- function De(e, t, n) {
217
- q.value = {
218
- item: e,
219
- fromLaneId: t,
220
- fromColumnId: n,
221
- laneId: t,
222
- colId: n,
223
- index: N(t, n).findIndex((t) => t.id === e.id)
224
- }, V.value = `${R(e)} picked up, ${J()}`;
225
- }
226
- function J() {
227
- let e = q.value;
228
- if (!e) return "";
229
- let t = N(e.laneId, e.colId).filter((t) => t.id !== e.item.id), n = P(e.colId), r = w.lanes?.find((t) => (t.id ?? null) === e.laneId) ?? null, i = n ? z(r, n) : e.colId;
230
- return `position ${e.index + 1} of ${t.length + 1} in ${i}`;
231
- }
232
- function Oe() {
233
- return !w.lanes || w.lanes.length === 0 ? [null] : w.lanes.filter((e) => !L(e.id)).map((e) => e.id ?? null);
234
- }
235
- function ke(e) {
236
- let t = q.value;
237
- if (!t) return;
238
- let n = N(t.laneId, t.colId).filter((e) => e.id !== t.item.id);
239
- if (e === "ArrowUp" || e === "ArrowDown") {
240
- let r = e === "ArrowUp" ? -1 : 1, i = t.index + r;
241
- if (i >= 0 && i <= n.length) t.index = i;
242
- else {
243
- let e = Oe(), n = e.indexOf(t.laneId), i = n + r;
244
- if (n === -1 || i < 0 || i >= e.length) return;
245
- let a = e[i];
246
- t.laneId = a, t.index = r === 1 ? 0 : N(a, t.colId).filter((e) => e.id !== t.item.id).length;
247
- }
248
- } else {
249
- let n = e === "ArrowLeft" ? -1 : 1, r = w.columns.findIndex((e) => e.id === t.colId), i = w.columns[r + n];
250
- if (r === -1 || !i) return;
251
- t.colId = i.id;
252
- let a = N(t.laneId, t.colId).filter((e) => e.id !== t.item.id);
253
- t.index = Math.min(t.index, a.length);
254
- }
255
- V.value = `${R(t.item)}, ${J()}`;
256
- }
257
- function Y() {
258
- let e = q.value;
259
- if (!e) return null;
260
- let t = N(e.laneId, e.colId).filter((t) => t.id !== e.item.id);
261
- return t.length === 0 ? null : t[Math.min(e.index, t.length - 1)] ?? null;
262
- }
263
- function Ae() {
264
- let e = q.value, t = Y();
265
- !e || !t || (q.value = null, T("nest", {
266
- itemId: e.item.id,
267
- ontoItemId: t.id,
268
- fromColumnId: e.fromColumnId,
269
- ...w.lanes ? { fromLaneId: e.fromLaneId } : {}
270
- }), V.value = `${R(e.item)} dropped onto ${R(t)}`);
271
- }
272
- function je() {
273
- let e = q.value;
274
- if (!e) return;
275
- q.value = null;
276
- let t = H({
277
- item: e.item,
278
- fromLaneId: e.fromLaneId,
279
- fromColumnId: e.fromColumnId
280
- }, e.laneId, e.colId, e.index), n = P(e.colId), r = w.lanes?.find((t) => (t.id ?? null) === e.laneId) ?? null, i = n ? z(r, n) : e.colId;
281
- V.value = t ? `${R(e.item)} dropped, position ${e.index + 1} in ${i}` : `${R(e.item)} dropped`, Ne(e.item.id);
282
- }
283
- function Me(e, t, n, r) {
284
- let i = N(n, r), a = i.findIndex((e) => e.id === t.id);
285
- if (e === "ArrowUp" || e === "ArrowDown") {
286
- let t = a + (e === "ArrowDown" ? 1 : -1);
287
- t >= 0 && t < i.length && X(i[t].id);
288
- } else {
289
- let t = w.columns.findIndex((e) => e.id === r), i = w.columns[t + (e === "ArrowRight" ? 1 : -1)];
290
- if (t === -1 || !i) return;
291
- let o = N(n, i.id);
292
- if (o.length === 0) return;
293
- X(o[Math.min(a, o.length - 1)].id);
294
- }
295
- }
296
- function X(e) {
297
- let t = D.value?.querySelectorAll("[data-item-id]");
298
- if (t) {
299
- for (let n of t) if (n.dataset.itemId === e) {
300
- n.focus();
301
- return;
302
- }
303
- }
304
- }
305
- async function Ne(e) {
306
- await u(), await u(), X(e);
307
- }
308
- function Pe(e) {
309
- q.value?.item.id === e.id && (q.value = null);
310
- }
311
- let Z = m(null), Q = m(null);
312
- function Fe(e, t) {
313
- if (!w.reorderableColumns) {
314
- t.preventDefault();
315
- return;
316
- }
317
- Z.value = e, Q.value = e;
318
- }
319
- function Ie(e, t) {
320
- if (Z.value === null) return;
321
- t.preventDefault();
322
- let n = t.currentTarget.getBoundingClientRect();
323
- Q.value = t.clientX < n.left + n.width / 2 ? e : e + 1;
324
- }
325
- function Le(e) {
326
- let t = Z.value, n = Q.value;
327
- if ($(), t === null || n === null) return;
328
- e.preventDefault();
329
- let r = n > t ? n - 1 : n;
330
- r !== t && T("column-move", {
331
- columnId: w.columns[t].id,
332
- toIndex: r
333
- });
334
- }
335
- function $() {
336
- Z.value = null, Q.value = null;
337
- }
338
- return (e, t) => (p(), a("div", l({
339
- ref_key: "boardRef",
340
- ref: D,
341
- class: "nb-board"
342
- }, v(pe)), [
343
- o("div", {
344
- class: "nb-board__grid",
345
- style: f(O.value)
346
- }, [(p(!0), a(n, null, h(c.columns, (t, n) => (p(), a("div", {
347
- key: t.id,
348
- class: d(["nb-board__col-header", {
349
- "nb-board__col-header--reorderable": c.reorderableColumns,
350
- "nb-board__col-header--dragging": Z.value === n,
351
- "nb-board__col-header--drop-before": Q.value === n,
352
- "nb-board__col-header--drop-after": Q.value === n + 1 && n === c.columns.length - 1
353
- }]),
354
- style: f(t.color ? { borderTopColor: t.color } : void 0),
355
- draggable: c.reorderableColumns || void 0,
356
- onDragstart: (e) => Fe(n, e),
357
- onDragover: (e) => Ie(n, e),
358
- onDrop: Le,
359
- onDragend: $
360
- }, [g(e.$slots, "column-header", {
361
- column: t,
362
- count: j(t.id)
363
- }, () => [o("span", ee, _(t.label), 1), o("span", te, _(j(t.id)), 1)])], 46, b))), 128)), (p(!0), a(n, null, h(me.value, (t) => (p(), a(n, { key: A(t) }, [t ? (p(), a("div", {
364
- key: 0,
365
- class: "nb-board__lane-header",
366
- onClick: (e) => I(t.id)
367
- }, [
368
- o("button", {
369
- class: "nb-board__collapse-btn",
370
- "aria-label": L(t.id) ? "Expand" : "Collapse"
371
- }, _(L(t.id) ? "▶" : "▼"), 9, re),
372
- g(e.$slots, "lane-header", { lane: t }, () => [o("span", ie, _(t.label), 1)]),
373
- o("span", ae, _(he(t.id)), 1)
374
- ], 8, ne)) : i("", !0), !t || !L(t.id) ? (p(!0), a(n, { key: 1 }, h(c.columns, (r) => (p(), a("div", {
375
- key: A(t) + "-" + r.id,
376
- class: d(["nb-board__cell", { "nb-board__cell--drag-over": Se(t, r.id) }]),
377
- onDragover: y((e) => ye(t, r.id), ["prevent"]),
378
- onDragleave: be,
379
- onDrop: y((e) => Te(t, r.id), ["prevent"])
380
- }, [o("div", {
381
- class: "nb-board__cell-items",
382
- role: "list",
383
- "aria-label": ge(t, r)
384
- }, [(p(!0), a(n, null, h(N(k(t), r.id), (n, i) => (p(), a("div", {
385
- key: n.id,
386
- class: d(["nb-board__card", {
387
- "nb-board__card--lifted": q.value?.item.id === n.id,
388
- "nb-board__card--drop-before": K(t, r.id) === i,
389
- "nb-board__card--drop-after": we(t, r.id, i),
390
- "nb-board__card--drop-into": Ce(t, r.id, n)
391
- }]),
392
- role: "listitem",
393
- tabindex: "0",
394
- "data-item-id": n.id,
395
- "aria-label": B(n, t, r),
396
- "aria-describedby": `${v(E)}-hint`,
397
- draggable: "true",
398
- onDragstart: (e) => _e(n, t, r.id),
399
- onDragover: y((e) => ve(e, t, r.id, i, n), ["prevent", "stop"]),
400
- onDragend: xe,
401
- onKeydown: (e) => Ee(e, n, t, r.id),
402
- onBlur: (e) => Pe(n)
403
- }, [g(e.$slots, "card", {
404
- item: n,
405
- column: r,
406
- lane: t ?? void 0
407
- })], 42, ce))), 128)), N(k(t), r.id).length === 0 ? (p(), a("div", le)) : i("", !0)], 8, se), e.$slots["column-footer"] ? (p(), a("div", ue, [g(e.$slots, "column-footer", {
408
- column: r,
409
- lane: t ?? void 0
410
- })])) : i("", !0)], 42, oe))), 128)) : i("", !0)], 64))), 128))], 4),
411
- o("span", {
412
- id: `${v(E)}-hint`,
413
- class: "nb-board__sr"
414
- }, [t[0] ||= s(" Press Space or Enter to pick up, arrow keys to move, Space or Enter to drop, Escape to cancel.", -1), c.nestable ? (p(), a(n, { key: 0 }, [s(" Shift with Space or Enter drops onto the card below instead, putting this one inside it.")], 64)) : i("", !0)], 8, de),
415
- o("span", fe, _(V.value), 1)
416
- ], 16));
417
- }
418
- });
419
- //#endregion
420
- export { C as t };
@@ -1 +0,0 @@
1
- require(`./chunk-D-qHiVGv.cjs`);const e=require(`./_plugin-vue_export-helper-tagjRzOz.cjs`),t=require(`./Size.d-GBIblj2D.cjs`),n=require(`./Icon-C8R_r_In.cjs`),r=require(`./composables/useSurfaceLayer.composable.cjs`),i=require(`./Grid-HifmWSUS.cjs`),a=require(`./composables/useScrollLock.composable.cjs`),o=require(`./composables/useFocusTrap.composable.cjs`);let s=require(`vue`),c=require(`@nubisco/ui/icons/x`);var l=200,u=[`[data-nb-confirm-floating]`,`.nb-select__dropdown`,`.nb-menu`,`.nb-date-picker__calendar`,`.nb-user-menu__panel`,`.nb-sidebar-menu-item__flyout`],d=new Set;function f(e){let t=e.trim();return t?(d.add(t),()=>{d.delete(t)}):()=>{}}function p(e=[]){return[...u,...d,...e].map(e=>e.trim()).filter(Boolean).join(`,`)}function m(e,t){if(!e)return;let n=`${t?0:200}ms`;e.style.transitionDuration=n;let r=e.parentElement;r instanceof HTMLElement&&(r.style.transitionDuration=n)}var h=[`role`,`aria-labelledby`,`aria-describedby`,`aria-busy`],g={key:0,class:`nb-modal--header`},_=[`disabled`,`aria-disabled`],v=[`tabindex`,`role`,`aria-labelledby`],y=(0,s.defineComponent)({__name:`Modal`,props:{open:{type:Boolean,default:!1},title:{default:void 0},size:{default:t.r.Medium},closeOnOverlay:{type:Boolean,default:!0},role:{default:`dialog`},labelledBy:{default:void 0},describedBy:{default:void 0},busy:{type:Boolean,default:!1},closeDisabled:{type:Boolean,default:!1},closeOnEscape:{type:Boolean,default:!0},trapFocus:{type:Boolean,default:!0},initialFocus:{type:[String,Function],default:void 0},floatingSelectors:{default:void 0}},emits:[`close`],setup(e,{expose:t,emit:l}){let u=e,d=l,f=(0,s.useSlots)(),m=(0,s.computed)(()=>!!f.header||!!u.title),y=`nb-modal-title-${(0,s.useId)()}`,b=(0,s.ref)(null),x=(0,s.ref)(null),{layerProps:S}=r.useSurfaceLayer({overlay:!0});function C(){u.closeOnOverlay&&d(`close`)}function w(){let e=u.initialFocus;return e?typeof e==`function`?e():b.value?.querySelector(e)??null:null}o.useFocusTrap({container:()=>b.value,active:()=>u.open&&u.trapFocus,initialFocus:w,floatingSelector:()=>p(u.floatingSelectors)});let T=!1;function E(){T||(T=!0,a.acquireScrollLock())}function D(){T&&(T=!1,a.releaseScrollLock())}let O=(0,s.ref)(!1);function k(){let e=x.value;if(!e)return;let t=e.scrollHeight-e.clientHeight;!O.value&&t>4?O.value=!0:O.value&&t<=0&&(O.value=!1)}let A=null,j=null;function M(){let e=x.value;e&&(N(),typeof ResizeObserver<`u`&&(A=new ResizeObserver(()=>k()),A.observe(e)),typeof MutationObserver<`u`&&(j=new MutationObserver(()=>k()),j.observe(e,{childList:!0,subtree:!0,characterData:!0})),k())}function N(){A?.disconnect(),A=null,j?.disconnect(),j=null}(0,s.watch)(()=>u.open,async e=>{e?E():D(),await(0,s.nextTick)(),e?M():(N(),O.value=!1)},{immediate:!0}),(0,s.onUnmounted)(()=>{D(),N()});function P(){let e=b.value;if(!e)return!1;let t=Array.from(document.querySelectorAll(`[aria-modal="true"]`));return t.length===0||t[t.length-1]===e}function F(e){e.key===`Escape`&&(!u.open||!u.closeOnEscape||u.closeDisabled||P()&&d(`close`))}return(0,s.onMounted)(()=>{document.addEventListener(`keydown`,F),u.open&&M()}),(0,s.onUnmounted)(()=>{document.removeEventListener(`keydown`,F)}),t({dialogEl:()=>b.value,bodyEl:()=>x.value}),(t,r)=>((0,s.openBlock)(),(0,s.createBlock)(s.Teleport,{to:`body`},[(0,s.createVNode)(s.Transition,{name:`nb-modal`},{default:(0,s.withCtx)(()=>[e.open?((0,s.openBlock)(),(0,s.createElementBlock)(`div`,{key:0,class:`nb-modal--overlay`,onClick:(0,s.withModifiers)(C,[`self`])},[(0,s.createElementVNode)(`div`,(0,s.mergeProps)({ref_key:`contentRef`,ref:b,class:[`nb-modal--content`,`nb-modal--content--${e.size}`]},(0,s.unref)(S),{role:e.role,"aria-modal":`true`,"aria-labelledby":e.labelledBy??(m.value?y:void 0),"aria-describedby":e.describedBy,"aria-busy":e.busy?`true`:void 0,tabindex:`-1`,onClick:r[1]||=(0,s.withModifiers)(()=>{},[`stop`])}),[m.value?((0,s.openBlock)(),(0,s.createElementBlock)(`header`,g,[(0,s.createElementVNode)(`span`,{id:y,class:`nb-modal--title`},[(0,s.renderSlot)(t.$slots,`header`,{},()=>[(0,s.createTextVNode)((0,s.toDisplayString)(e.title),1)],!0)]),(0,s.createElementVNode)(`button`,{class:`nb-modal--close`,"aria-label":`Close`,disabled:e.closeDisabled,"aria-disabled":e.closeDisabled?`true`:void 0,onClick:r[0]||=e=>d(`close`)},[(0,s.createVNode)(n.t,{name:(0,s.unref)(c.regular)},null,8,[`name`])],8,_)])):(0,s.createCommentVNode)(``,!0),(0,s.createElementVNode)(`main`,{ref_key:`bodyRef`,ref:x,class:`nb-modal--body`,tabindex:O.value?0:void 0,role:O.value?`region`:void 0,"aria-labelledby":O.value?e.labelledBy??(m.value?y:void 0):void 0},[(0,s.renderSlot)(t.$slots,`default`,{},void 0,!0)],8,v),t.$slots.footer?((0,s.openBlock)(),(0,s.createBlock)(i.t,{key:1,is:`footer`,justify:`end`,class:`nb-modal--footer`,distributed:``},{default:(0,s.withCtx)(()=>[(0,s.renderSlot)(t.$slots,`footer`,{},void 0,!0)]),_:3})):(0,s.createCommentVNode)(``,!0)],16,h)])):(0,s.createCommentVNode)(``,!0)]),_:3})]))}}),b=e.t(y,[[`__scopeId`,`data-v-bac1817a`]]);Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return b}});
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes