@oliasoft-open-source/react-ui-library 9.1.1 → 9.2.0-beta-2

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.
package/dist/index.js CHANGED
@@ -2566,21 +2566,21 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
2566
2566
  ]
2567
2567
  }) : null });
2568
2568
  }, Ks = {
2569
- inputInTable: "_inputInTable_sfyqx_1",
2570
- inputHover: "_inputHover_sfyqx_13",
2571
- inputFocus: "_inputFocus_sfyqx_18",
2572
- controlFocusVisible: "_controlFocusVisible_sfyqx_25",
2573
- inputError: "_inputError_sfyqx_29",
2574
- inputWarning: "_inputWarning_sfyqx_30",
2575
- inputDisabled: "_inputDisabled_sfyqx_65",
2576
- hideScrollbars: "_hideScrollbars_sfyqx_71",
2577
- wrapper: "_wrapper_sfyqx_89",
2578
- bordered: "_bordered_sfyqx_97",
2579
- scroll: "_scroll_sfyqx_102",
2580
- table: "_table_sfyqx_113",
2581
- dragOverlay: "_dragOverlay_sfyqx_149",
2582
- virtualScroll: "_virtualScroll_sfyqx_184",
2583
- striped: "_striped_sfyqx_204"
2569
+ inputInTable: "_inputInTable_mlaya_1",
2570
+ inputHover: "_inputHover_mlaya_13",
2571
+ inputFocus: "_inputFocus_mlaya_18",
2572
+ controlFocusVisible: "_controlFocusVisible_mlaya_25",
2573
+ inputError: "_inputError_mlaya_29",
2574
+ inputWarning: "_inputWarning_mlaya_30",
2575
+ inputDisabled: "_inputDisabled_mlaya_65",
2576
+ hideScrollbars: "_hideScrollbars_mlaya_71",
2577
+ wrapper: "_wrapper_mlaya_89",
2578
+ bordered: "_bordered_mlaya_97",
2579
+ scroll: "_scroll_mlaya_102",
2580
+ table: "_table_mlaya_114",
2581
+ dragOverlay: "_dragOverlay_mlaya_150",
2582
+ virtualScroll: "_virtualScroll_mlaya_185",
2583
+ striped: "_striped_mlaya_205"
2584
2584
  }, qs = { title: "_title_zn5s7_1" }, Js = ({ name: e = null, actions: t = null, actionsRight: n = !1, testId: r }) => {
2585
2585
  let i = e !== null, a = t !== null;
2586
2586
  return !i && !a ? null : /* @__PURE__ */ C("div", {
@@ -4170,8 +4170,8 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
4170
4170
  }));
4171
4171
  }
4172
4172
  };
4173
- }, Jl = ({ row: e, rowIndex: t, isHeader: n = !1, columnCount: r, colSpan: i, columnHeaderAlignments: a = [], columnAlignment: o = [], hasRowActions: s, draggableTable: c = !1, columnWidths: l, dropDisabled: u = !1, height: d, testId: f }) => {
4174
- let p = _l(a, n, t), { onRowClick: m, onRowFocus: h, onRowMouseEnter: g, onRowMouseLeave: _, expandedContent: v, error: y, warning: w, active: T } = e, E = e.cells.map((e, r) => {
4173
+ }, Jl = ({ row: e, rowIndex: t, isHeader: n = !1, columnCount: r, colSpan: i, columnHeaderAlignments: a = [], columnAlignment: o = [], hasRowActions: s, draggableTable: c = !1, columnWidths: l, dropDisabled: u = !1, height: d, testId: f, measureRef: p }) => {
4174
+ let m = _l(a, n, t), { onRowClick: h, onRowFocus: g, onRowMouseEnter: _, onRowMouseLeave: v, expandedContent: y, error: w, warning: T, active: E } = e, D = e.cells.map((e, r) => {
4175
4175
  let i = `${+!n}_${t}_${r}`, a = n ? e : ql({
4176
4176
  cell: e,
4177
4177
  rowIndex: t,
@@ -4181,72 +4181,74 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
4181
4181
  cell: a,
4182
4182
  isHeader: n,
4183
4183
  columnAlignment: o[r],
4184
- columnHeaderAlignment: p[r],
4184
+ columnHeaderAlignment: m[r],
4185
4185
  width: l ? l[r] : void 0,
4186
4186
  testId: e.testId
4187
4187
  }, i);
4188
- }), D = s && /* @__PURE__ */ S(Wl, {
4188
+ }), O = s && /* @__PURE__ */ S(Wl, {
4189
4189
  cell: {
4190
4190
  type: Ul.ACTIONS,
4191
4191
  actions: e.actions
4192
4192
  },
4193
4193
  isHeader: n
4194
- }, r), { attributes: O, listeners: k, setNodeRef: A, transform: j, transition: M, isDragging: N } = Nr({
4194
+ }, r), { attributes: k, listeners: A, setNodeRef: j, transform: M, transition: N, isDragging: P } = Nr({
4195
4195
  id: t.toString(),
4196
4196
  animateLayoutChanges: () => !1
4197
- }), P = {
4198
- transform: u ? void 0 : Fr.Translate.toString(j),
4197
+ }), F = (t) => {
4198
+ e.noDrag || j(t), p == null || p(t);
4199
+ }, I = {
4200
+ transform: u ? void 0 : Fr.Translate.toString(M),
4199
4201
  height: d,
4200
- transition: M,
4201
- opacity: N ? 0 : void 0
4202
+ transition: N,
4203
+ opacity: P ? 0 : void 0
4202
4204
  };
4203
4205
  return n ? /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ C("tr", {
4204
- onClick: m,
4205
- onMouseEnter: g,
4206
- onMouseLeave: _,
4207
- onFocus: h,
4206
+ onClick: h,
4207
+ onMouseEnter: _,
4208
+ onMouseLeave: v,
4209
+ onFocus: g,
4208
4210
  "data-testid": f,
4209
- className: b(m ? ml.clickableRow : null, g ? ml.hoverableRow : null),
4211
+ className: b(h ? ml.clickableRow : null, _ ? ml.hoverableRow : null),
4210
4212
  children: [
4211
4213
  c ? /* @__PURE__ */ S("th", {}) : null,
4212
- E,
4213
- D
4214
+ D,
4215
+ O
4214
4216
  ]
4215
- }, t), v && v.content ? /* @__PURE__ */ S(hl, {
4217
+ }, t), y && y.content ? /* @__PURE__ */ S(hl, {
4216
4218
  colSpan: i,
4217
- flush: v.flush === !0,
4218
- children: v.content
4219
+ flush: y.flush === !0,
4220
+ children: y.content
4219
4221
  }, `${t}_expanded_content`) : null] }) : /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ C("tr", {
4220
- ref: e.noDrag ? null : A,
4221
- onClick: m,
4222
- onMouseEnter: g,
4223
- onMouseLeave: _,
4224
- onFocus: h,
4225
- className: b(m && !m.noStyle ? ml.clickableRow : null, g && !g.noStyle ? ml.hoverableRow : null, T ? ml.rowActive : null),
4226
- "data-active": T || null,
4227
- "data-error": y || null,
4228
- "data-warning": w || null,
4222
+ ref: F,
4223
+ onClick: h,
4224
+ onMouseEnter: _,
4225
+ onMouseLeave: v,
4226
+ onFocus: g,
4227
+ className: b(h && !h.noStyle ? ml.clickableRow : null, _ && !_.noStyle ? ml.hoverableRow : null, E ? ml.rowActive : null),
4228
+ "data-active": E || null,
4229
+ "data-error": w || null,
4230
+ "data-warning": T || null,
4229
4231
  "data-index": t,
4230
4232
  "data-even": t % 2 == 0,
4231
4233
  "data-testid": f,
4232
- style: P,
4234
+ style: I,
4233
4235
  children: [
4234
4236
  c ? e.noDrag ? /* @__PURE__ */ S("td", { "aria-labelledby": "unique-label-id" }) : /* @__PURE__ */ S("td", {
4235
4237
  className: ml.dragIconCell,
4236
4238
  children: /* @__PURE__ */ S("div", {
4237
4239
  className: b(ml.dragIcon, u ? ml.dragIconDisabled : ""),
4238
- ...O,
4239
4240
  ...k,
4241
+ ...A,
4240
4242
  children: /* @__PURE__ */ S(G, { icon: U.DRAG })
4241
4243
  })
4242
4244
  }) : null,
4243
- E,
4244
- D
4245
+ D,
4246
+ O
4245
4247
  ]
4246
- }, t), v && v.content ? /* @__PURE__ */ S(hl, {
4248
+ }, t), y && y.content ? /* @__PURE__ */ S(hl, {
4247
4249
  colSpan: i,
4248
- flush: v.flush === !0,
4249
- children: v.content
4250
+ flush: y.flush === !0,
4251
+ children: y.content
4250
4252
  }, `${t}_expanded_content`) : null] });
4251
4253
  }, Yl = (e) => {
4252
4254
  let { children: t, colSpan: n, columnAlignment: r, columnCount: i, draggable: a, onListReorder: o = () => {}, canListReorder: s = () => !0, rowActions: c, rows: l = [], tbodyRef: u } = e, [d, f] = v(null), [p, m] = v(!1), g = h(() => l.map((e, t) => t.toString()), [l]);
@@ -4308,7 +4310,10 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
4308
4310
  let a = _(null), o = Jr({
4309
4311
  count: (n = (r = e == null ? void 0 : e.rowCount) == null ? (i = e.rows) == null ? void 0 : i.length : r) == null ? 0 : n,
4310
4312
  getScrollElement: () => a.current,
4311
- estimateSize: () => 31,
4313
+ estimateSize: (t) => {
4314
+ var n, r;
4315
+ return (n = (r = e.estimateRowHeight) == null ? void 0 : r.call(e, t)) == null ? 31 : n;
4316
+ },
4312
4317
  overscan: 10
4313
4318
  });
4314
4319
  return /* @__PURE__ */ S("div", {
@@ -4435,23 +4440,24 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
4435
4440
  draggableTable: w
4436
4441
  }, `0_${t}`)) }), /* @__PURE__ */ S("tbody", {
4437
4442
  ref: A,
4438
- children: t ? t.getVirtualItems().map((t) => {
4439
- let n = t.index, r = R[n], i = c ? c({
4440
- row: r,
4441
- rowIndex: n
4442
- }) : r;
4443
- return /* @__PURE__ */ S(Jl, {
4444
- rowIndex: n,
4443
+ children: t ? t.getVirtualItems().map((n) => {
4444
+ let r = n.index, i = R[r], a = c ? c({
4445
4445
  row: i,
4446
+ rowIndex: r
4447
+ }) : i;
4448
+ return /* @__PURE__ */ S(Jl, {
4449
+ rowIndex: r,
4450
+ row: a,
4446
4451
  columnCount: M,
4447
4452
  columnWidths: u,
4448
4453
  colSpan: P,
4449
4454
  hasRowActions: N,
4450
4455
  columnAlignment: v,
4451
4456
  draggableTable: w,
4452
- height: t.size,
4453
- dropDisabled: e
4454
- }, `1_${n}`);
4457
+ height: n.size,
4458
+ dropDisabled: e,
4459
+ measureRef: t.measureElement
4460
+ }, `1_${r}`);
4455
4461
  }) : R.map((t, n) => {
4456
4462
  let r = c ? c({
4457
4463
  row: t,
@@ -6488,55 +6494,48 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
6488
6494
  richTextToolbarContainer: "_richTextToolbarContainer_1gbkk_5"
6489
6495
  }, Yd = /* @__PURE__ */ function(e) {
6490
6496
  return e.BOLD = "bold", e.ITALIC = "italic", e.CODE = "code", e.UL = "ul", e.OL = "ol", e.MENTION = "at", e;
6491
- }({}), Xd = ({ editor: e, disabled: t = !1, showMentionButton: n = !1, toolbarComponent: r = null, testId: i }) => {
6492
- var a, o, s, c, l;
6493
- let u = [
6497
+ }({}), Xd = ({ editor: e, disabled: t = !1, showMentionButton: n = !1, toolbarComponent: r = null }) => {
6498
+ var i, a, o, s, c;
6499
+ let l = [
6494
6500
  {
6495
6501
  icon: Yd.BOLD,
6496
6502
  onClick: () => e == null ? void 0 : e.chain().focus().toggleBold().run(),
6497
- active: (a = e == null ? void 0 : e.isActive("bold")) != null && a,
6498
- testId: "bold"
6503
+ active: (i = e == null ? void 0 : e.isActive("bold")) != null && i
6499
6504
  },
6500
6505
  {
6501
6506
  icon: Yd.ITALIC,
6502
6507
  onClick: () => e == null ? void 0 : e.chain().focus().toggleItalic().run(),
6503
- active: (o = e == null ? void 0 : e.isActive("italic")) != null && o,
6504
- testId: "italic"
6508
+ active: (a = e == null ? void 0 : e.isActive("italic")) != null && a
6505
6509
  },
6506
6510
  {
6507
6511
  icon: Yd.CODE,
6508
6512
  onClick: () => e == null ? void 0 : e.chain().focus().toggleCode().run(),
6509
- active: (s = e == null ? void 0 : e.isActive("code")) != null && s,
6510
- testId: "code"
6513
+ active: (o = e == null ? void 0 : e.isActive("code")) != null && o
6511
6514
  },
6512
6515
  {
6513
6516
  icon: Yd.UL,
6514
6517
  onClick: () => e == null ? void 0 : e.chain().focus().toggleBulletList().run(),
6515
- active: (c = e == null ? void 0 : e.isActive("bulletList")) != null && c,
6516
- testId: "bulletList"
6518
+ active: (s = e == null ? void 0 : e.isActive("bulletList")) != null && s
6517
6519
  },
6518
6520
  {
6519
6521
  icon: Yd.OL,
6520
6522
  onClick: () => e == null ? void 0 : e.chain().focus().toggleOrderedList().run(),
6521
- active: (l = e == null ? void 0 : e.isActive("orderedList")) != null && l,
6522
- testId: "orderedList"
6523
+ active: (c = e == null ? void 0 : e.isActive("orderedList")) != null && c
6523
6524
  }
6524
6525
  ];
6525
6526
  if (n) {
6526
- var d;
6527
- u.push({
6527
+ var u;
6528
+ l.push({
6528
6529
  icon: Yd.MENTION,
6529
6530
  onClick: () => e == null ? void 0 : e.chain().focus().insertContent("@").run(),
6530
- active: (d = e == null ? void 0 : e.isActive("mention")) != null && d,
6531
- testId: "mention"
6531
+ active: (u = e == null ? void 0 : e.isActive("mention")) != null && u
6532
6532
  });
6533
6533
  }
6534
6534
  return /* @__PURE__ */ C("div", {
6535
6535
  className: Jd.richTextToolbarContainer,
6536
- "data-testid": i,
6537
6536
  children: [/* @__PURE__ */ S("div", {
6538
6537
  className: Jd.richTextToolbar,
6539
- children: u.map((e, n) => /* @__PURE__ */ S(q, {
6538
+ children: l.map((e, n) => /* @__PURE__ */ S(q, {
6540
6539
  small: !0,
6541
6540
  round: !0,
6542
6541
  basic: !0,
@@ -6544,8 +6543,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
6544
6543
  colored: Ti.MUTED,
6545
6544
  onClick: e.onClick,
6546
6545
  active: e.active,
6547
- disabled: t,
6548
- testId: i && `${i}-${e.testId}`
6546
+ disabled: t
6549
6547
  }, n))
6550
6548
  }), r]
6551
6549
  });
@@ -6695,68 +6693,63 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
6695
6693
  command: t,
6696
6694
  items: r,
6697
6695
  editable: n.view.dom
6698
- }), uf = c(o(({ placeholder: e, onChange: t, value: n, disabled: r, toolbarComponent: i, mentions: a, testId: o }, s) => {
6699
- var c, l, f, m;
6700
- let g = u(W), y = r || g, b = !!a, x = _(a), w = _(null), T = _(n == null ? "" : n), [E, D] = v(null);
6696
+ }), uf = c(o(({ placeholder: e, onChange: t, value: n, disabled: r, toolbarComponent: i, mentions: a }, o) => {
6697
+ var s, c, l, f;
6698
+ let m = u(W), g = r || m, y = !!a, b = _(a), x = _(null), w = _(n == null ? "" : n), [T, E] = v(null);
6701
6699
  d(() => {
6702
- x.current = a;
6700
+ b.current = a;
6703
6701
  }, [a]);
6704
- let O = h(() => [
6702
+ let D = h(() => [
6705
6703
  ci,
6706
6704
  li.configure({ placeholder: e }),
6707
6705
  ui,
6708
- of(() => x.current, () => ({
6709
- onStart: (e) => D(lf(e)),
6710
- onUpdate: (e) => D(lf(e)),
6711
- onExit: () => D(null),
6706
+ of(() => b.current, () => ({
6707
+ onStart: (e) => E(lf(e)),
6708
+ onUpdate: (e) => E(lf(e)),
6709
+ onExit: () => E(null),
6712
6710
  onKeyDown: ({ event: e }) => {
6713
6711
  var t, n;
6714
- return (t = (n = w.current) == null ? void 0 : n.onKeyDown(e)) != null && t;
6712
+ return (t = (n = x.current) == null ? void 0 : n.onKeyDown(e)) != null && t;
6715
6713
  }
6716
6714
  }))
6717
- ], []), k = si({
6718
- extensions: O,
6719
- content: T.current,
6715
+ ], []), O = si({
6716
+ extensions: D,
6717
+ content: w.current,
6720
6718
  contentType: "markdown",
6721
- editable: !y,
6719
+ editable: !g,
6722
6720
  editorProps: { attributes: { class: sf.editable } },
6723
6721
  onUpdate: ({ editor: e }) => {
6724
6722
  t == null || t(e.getMarkdown(), { mentionedIds: rf(e) });
6725
6723
  }
6726
6724
  });
6727
6725
  return d(() => {
6728
- k && n !== void 0 && n !== k.getMarkdown() && k.commands.setContent(n, {
6726
+ O && n !== void 0 && n !== O.getMarkdown() && O.commands.setContent(n, {
6729
6727
  emitUpdate: !1,
6730
6728
  contentType: "markdown"
6731
6729
  });
6732
- }, [n, k]), d(() => {
6733
- k && k.setEditable(!y);
6734
- }, [y, k]), p(s, () => ({
6735
- clearContent: () => k == null ? void 0 : k.commands.clearContent(!1),
6736
- editor: k,
6737
- getMentionedIds: () => rf(k)
6738
- }), [k]), /* @__PURE__ */ C("div", {
6730
+ }, [n, O]), d(() => {
6731
+ O && O.setEditable(!g);
6732
+ }, [g, O]), p(o, () => ({
6733
+ clearContent: () => O == null ? void 0 : O.commands.clearContent(!1),
6734
+ editor: O,
6735
+ getMentionedIds: () => rf(O)
6736
+ }), [O]), /* @__PURE__ */ C("div", {
6739
6737
  className: sf.richTextInput,
6740
- "data-testid": o,
6741
6738
  children: [
6742
6739
  /* @__PURE__ */ S(Xd, {
6743
- editor: k,
6744
- disabled: y,
6745
- showMentionButton: b && ((c = a == null ? void 0 : a.showMentionButton) == null || c),
6746
- toolbarComponent: i,
6747
- testId: o && `${o}-toolbar`
6748
- }),
6749
- /* @__PURE__ */ S(oi, {
6750
- editor: k,
6751
- "data-testid": o && `${o}-editor`
6740
+ editor: O,
6741
+ disabled: g,
6742
+ showMentionButton: y && ((s = a == null ? void 0 : a.showMentionButton) == null || s),
6743
+ toolbarComponent: i
6752
6744
  }),
6753
- b && /* @__PURE__ */ S(Xi, { children: /* @__PURE__ */ S(cf, {
6754
- ref: w,
6755
- editable: (l = E == null ? void 0 : E.editable) == null ? null : l,
6756
- getRect: (f = E == null ? void 0 : E.clientRect) == null ? null : f,
6757
- items: (m = E == null ? void 0 : E.items) == null ? [] : m,
6758
- onDismiss: () => D(null),
6759
- onSelect: (e) => E == null ? void 0 : E.command(e)
6745
+ /* @__PURE__ */ S(oi, { editor: O }),
6746
+ y && /* @__PURE__ */ S(Xi, { children: /* @__PURE__ */ S(cf, {
6747
+ ref: x,
6748
+ editable: (c = T == null ? void 0 : T.editable) == null ? null : c,
6749
+ getRect: (l = T == null ? void 0 : T.clientRect) == null ? null : l,
6750
+ items: (f = T == null ? void 0 : T.items) == null ? [] : f,
6751
+ onDismiss: () => E(null),
6752
+ onSelect: (e) => T == null ? void 0 : T.command(e)
6760
6753
  }) })
6761
6754
  ]
6762
6755
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oliasoft-open-source/react-ui-library",
3
- "version": "9.1.1",
3
+ "version": "9.2.0-beta-2",
4
4
  "description": "Reusable UI components for React projects",
5
5
  "homepage": "https://oliasoft-open-source.gitlab.io/react-ui-library",
6
6
  "bugs": {