nntc-ui 0.0.32 → 0.0.34

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/index.css CHANGED
@@ -1550,12 +1550,9 @@ button[disabled] {
1550
1550
  .tabs_tab.tabs_disabled .tabs_tabIcon {
1551
1551
  color: var(--theme-text-inactive);
1552
1552
  }
1553
- .tabs_tabs-story-wrapper {
1554
- width: 600px;
1555
- }
1556
1553
 
1557
1554
  /* src/components/view/Modal/modal.module.css */
1558
- .modal_root {
1555
+ .modal_overlay {
1559
1556
  position: absolute;
1560
1557
  top: 0;
1561
1558
  left: 0;
@@ -1566,7 +1563,7 @@ button[disabled] {
1566
1563
  width: 100%;
1567
1564
  height: 100%;
1568
1565
  padding: 16px;
1569
- background-color: var(--theme-modal-shadow-background);
1566
+ background-color: var(--theme-modal-shadow-background, rgba(0, 0, 0, 0.5));
1570
1567
  }
1571
1568
  .modal_modal {
1572
1569
  min-width: 200px;
package/index.d.ts CHANGED
@@ -384,8 +384,12 @@ interface Props$1 {
384
384
  declare const Typography: React.ForwardRefExoticComponent<Omit<HTMLProps<HTMLParagraphElement> & Props$1, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
385
385
 
386
386
  interface Props {
387
- close: () => void;
387
+ open: boolean;
388
+ onClose?: () => void;
389
+ root?: HTMLElement | MutableRefObject<HTMLElement | null> | null;
388
390
  }
389
- declare function Modal(props: PropsWithChildren<UiProps<Props>>): react_jsx_runtime.JSX.Element;
391
+ declare const Modal: React.ForwardRefExoticComponent<Omit<PropsWithChildren<Props & {
392
+ classes?: PropsObject;
393
+ } & HTMLProps<HTMLDivElement>>, "ref"> & React.RefAttributes<HTMLDivElement>>;
390
394
 
391
395
  export { type AdditionalButton, Button, ButtonsGroup, Card, Checkbox, Checklist, type Item$3 as ChecklistItem, type SelectedItems as ChecklistSelectedItems, ColorPicker, type ColumnAlign, DateTime, type FilterBy, Input, Layout, Menu, type Divider as MenuDivider, type Item$2 as MenuItem, Modal, MultiSelect, type Item$4 as MultiSelectItem, type TitleVariant as MultiSelectTitleVariant, type Pair, Pairs, Popover, SearchInput, Select, type Divider$1 as SelectDivider, type Item$5 as SelectItem, type SortBy, Surface, type TableCell, type TableColumn, type TableRow, Tabs, type Item$1 as TabsItem, Tooltip, _default as TreeView, type Item as TreeViewItem, Typography, type VerticalAlign, VirtualTable, WrapForLabel };
package/index.js CHANGED
@@ -333,7 +333,7 @@ function usePopover(props = {}) {
333
333
  initialOpen = false,
334
334
  placement = "bottom",
335
335
  modal: modal3,
336
- root: root23,
336
+ root: root22,
337
337
  open: controlledOpen,
338
338
  onOpenChange: setControlledOpen,
339
339
  containerOffset = 12
@@ -371,11 +371,11 @@ function usePopover(props = {}) {
371
371
  ...interactions,
372
372
  ...data,
373
373
  modal: modal3,
374
- root: root23,
374
+ root: root22,
375
375
  descriptionId,
376
376
  setDescriptionId
377
377
  }),
378
- [open, setOpen, interactions, data, modal3, root23, descriptionId]
378
+ [open, setOpen, interactions, data, modal3, root22, descriptionId]
379
379
  );
380
380
  }
381
381
 
@@ -417,7 +417,7 @@ var PopoverTrigger = forwardRef4(
417
417
  // src/components/view/Popover/Popover.tsx
418
418
  import { jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
419
419
  function Popover(props) {
420
- const { description, clickable, initialOpen, placement, wrapTrigger, containerOffset, root: root23, children: children2, classes } = props;
420
+ const { description, clickable, initialOpen, placement, wrapTrigger, containerOffset, root: root22, children: children2, classes } = props;
421
421
  const [showTooltip, setShowTooltip] = useState2(false);
422
422
  if (!children2) {
423
423
  return null;
@@ -433,7 +433,7 @@ function Popover(props) {
433
433
  open: clickable ? showTooltip : void 0,
434
434
  onOpenChange: clickable ? setShowTooltip : void 0,
435
435
  containerOffset,
436
- root: root23,
436
+ root: root22,
437
437
  children: [
438
438
  /* @__PURE__ */ jsx7(
439
439
  PopoverTrigger,
@@ -2102,7 +2102,7 @@ function useTooltip(props = {}) {
2102
2102
  onOpenChange: setControlledOpen,
2103
2103
  withoutArrow,
2104
2104
  arrowRef,
2105
- root: root23
2105
+ root: root22
2106
2106
  } = props;
2107
2107
  const [uncontrolledOpen, setUncontrolledOpen] = useState8(initialOpen);
2108
2108
  const open = controlledOpen ?? uncontrolledOpen;
@@ -2140,11 +2140,11 @@ function useTooltip(props = {}) {
2140
2140
  setOpen,
2141
2141
  withoutArrow,
2142
2142
  arrowRef,
2143
- root: root23,
2143
+ root: root22,
2144
2144
  ...interactions,
2145
2145
  ...data
2146
2146
  }),
2147
- [open, setOpen, interactions, data, root23]
2147
+ [open, setOpen, interactions, data, root22]
2148
2148
  );
2149
2149
  }
2150
2150
 
@@ -2194,7 +2194,7 @@ function Tooltip(props) {
2194
2194
  withoutArrow,
2195
2195
  wrapTrigger,
2196
2196
  alertType = "default",
2197
- root: root23,
2197
+ root: root22,
2198
2198
  children: children2,
2199
2199
  classes
2200
2200
  } = props;
@@ -2215,7 +2215,7 @@ function Tooltip(props) {
2215
2215
  onOpenChange: clickable ? setShowTooltip : void 0,
2216
2216
  withoutArrow,
2217
2217
  arrowRef,
2218
- root: root23,
2218
+ root: root22,
2219
2219
  children: [
2220
2220
  /* @__PURE__ */ jsx27(
2221
2221
  TooltipTrigger,
@@ -2259,7 +2259,6 @@ __export(tabs_exports, {
2259
2259
  tabIcon: () => tabIcon,
2260
2260
  tabTitle: () => tabTitle,
2261
2261
  tabVertical: () => tabVertical,
2262
- "tabs-story-wrapper": () => tabs_story_wrapper,
2263
2262
  vertical: () => vertical
2264
2263
  });
2265
2264
  var root16 = "tabs_root";
@@ -2279,7 +2278,6 @@ var selected2 = "tabs_selected";
2279
2278
  var tabBorderVertical = "tabs_tabBorderVertical";
2280
2279
  var tabIcon = "tabs_tabIcon";
2281
2280
  var disabled = "tabs_disabled";
2282
- var tabs_story_wrapper = "tabs_tabs-story-wrapper";
2283
2281
  var tabs_default = {
2284
2282
  root: root16,
2285
2283
  vertical,
@@ -2297,8 +2295,7 @@ var tabs_default = {
2297
2295
  selected: selected2,
2298
2296
  tabBorderVertical,
2299
2297
  tabIcon,
2300
- disabled,
2301
- "tabs-story-wrapper": tabs_story_wrapper
2298
+ disabled
2302
2299
  };
2303
2300
 
2304
2301
  // src/components/navigation/Tabs/Tabs.tsx
@@ -2425,9 +2422,9 @@ function Tabs(props) {
2425
2422
  // src/components/view/VirtualTable/VirtualTable.tsx
2426
2423
  import { flexRender, getCoreRowModel, useReactTable } from "@tanstack/react-table";
2427
2424
  import { defaultRangeExtractor, useVirtualizer } from "@tanstack/react-virtual";
2428
- import classnames23 from "classnames";
2425
+ import classnames22 from "classnames";
2429
2426
  import dayjs4 from "dayjs";
2430
- import { Fragment as Fragment7, useCallback as useCallback7, useEffect as useEffect9, useMemo as useMemo7, useRef as useRef10, useState as useState14 } from "react";
2427
+ import { Fragment as Fragment7, useCallback as useCallback7, useEffect as useEffect8, useMemo as useMemo6, useRef as useRef11, useState as useState14 } from "react";
2431
2428
 
2432
2429
  // src/utils/toFirstLetterUpperCase.ts
2433
2430
  var toFirstLetterUpperCase = (name) => {
@@ -2438,40 +2435,53 @@ var toFirstLetterUpperCase = (name) => {
2438
2435
  var defaultRowHeight = 32;
2439
2436
 
2440
2437
  // src/components/view/VirtualTable/ui/DefaultColumn/DefaultColumn.tsx
2441
- import classnames19 from "classnames";
2442
- import { useEffect as useEffect7, useMemo as useMemo5, useState as useState11 } from "react";
2443
- import { createPortal } from "react-dom";
2438
+ import classnames18 from "classnames";
2439
+ import { useEffect as useEffect6, useRef as useRef10, useState as useState11 } from "react";
2444
2440
 
2445
2441
  // src/components/view/Modal/Modal.tsx
2446
- import classnames18 from "classnames";
2447
- import { useEffect as useEffect6, useRef as useRef9 } from "react";
2442
+ import { forwardRef as forwardRef7, useRef as useRef9 } from "react";
2443
+ import { createPortal } from "react-dom";
2448
2444
 
2449
2445
  // src/components/view/Modal/modal.module.css
2450
- var root17 = "modal_root";
2446
+ var overlay = "modal_overlay";
2451
2447
  var modal2 = "modal_modal";
2452
2448
 
2453
2449
  // src/components/view/Modal/Modal.tsx
2454
2450
  import { jsx as jsx29 } from "react/jsx-runtime";
2455
- function Modal(props) {
2456
- const { close, children: children2, classes } = props;
2457
- const rootRef = useRef9(null);
2458
- useEffect6(() => {
2459
- const clickListener = function(e) {
2460
- if (e.target === rootRef?.current) {
2461
- close();
2451
+ var Modal = forwardRef7(
2452
+ function Modal2({ open, onClose, root: root22 = document.body, children: children2, ...props }, propRef) {
2453
+ const overlayRef = useRef9(null);
2454
+ const modalRef = useRef9(null);
2455
+ const handleOverlayClick = (e) => {
2456
+ if (e.target === overlayRef.current || !modalRef.current?.contains(e.target)) {
2457
+ e.stopPropagation();
2458
+ onClose?.();
2462
2459
  }
2463
2460
  };
2464
- if (rootRef?.current) {
2465
- rootRef.current.addEventListener("click", clickListener);
2461
+ if (!open || !children2) {
2462
+ return null;
2466
2463
  }
2467
- return () => {
2468
- if (rootRef?.current) {
2469
- rootRef.current.removeEventListener("click", clickListener);
2464
+ const modalContent2 = /* @__PURE__ */ jsx29("div", { ref: overlayRef, className: overlay, onClick: handleOverlayClick, ...props, children: /* @__PURE__ */ jsx29(
2465
+ "div",
2466
+ {
2467
+ ref: (node) => {
2468
+ if (node) {
2469
+ modalRef.current = node;
2470
+ }
2471
+ if (typeof propRef === "function") {
2472
+ propRef(node);
2473
+ } else if (propRef) {
2474
+ propRef.current = node;
2475
+ }
2476
+ },
2477
+ className: modal2,
2478
+ onClick: (e) => e.stopPropagation(),
2479
+ children: children2
2470
2480
  }
2471
- };
2472
- }, [rootRef]);
2473
- return /* @__PURE__ */ jsx29("div", { ref: rootRef, className: classnames18(root17, classes?.root), children: /* @__PURE__ */ jsx29("div", { className: classnames18(modal2, classes?.modal), children: children2 }) });
2474
- }
2481
+ ) });
2482
+ return createPortal(modalContent2, root22);
2483
+ }
2484
+ );
2475
2485
 
2476
2486
  // src/components/view/VirtualTable/virtualTable.module.css
2477
2487
  var virtualTable_exports = {};
@@ -2492,7 +2502,7 @@ __export(virtualTable_exports, {
2492
2502
  medium: () => medium11,
2493
2503
  modalContent: () => modalContent,
2494
2504
  rightBorder: () => rightBorder,
2495
- root: () => root18,
2505
+ root: () => root17,
2496
2506
  rowButtonTrigger: () => rowButtonTrigger,
2497
2507
  selected: () => selected3,
2498
2508
  showInModal: () => showInModal,
@@ -2513,7 +2523,7 @@ __export(virtualTable_exports, {
2513
2523
  viewCell: () => viewCell,
2514
2524
  viewSpan: () => viewSpan
2515
2525
  });
2516
- var root18 = "virtualTable_root";
2526
+ var root17 = "virtualTable_root";
2517
2527
  var tableContainer = "virtualTable_tableContainer";
2518
2528
  var small11 = "virtualTable_small";
2519
2529
  var table = "virtualTable_table";
@@ -2549,7 +2559,7 @@ var verticalAlignCenter = "virtualTable_verticalAlignCenter";
2549
2559
  var verticalAlignFlexEnd = "virtualTable_verticalAlignFlexEnd";
2550
2560
  var rowButtonTrigger = "virtualTable_rowButtonTrigger";
2551
2561
  var virtualTable_default = {
2552
- root: root18,
2562
+ root: root17,
2553
2563
  tableContainer,
2554
2564
  small: small11,
2555
2565
  table,
@@ -2596,10 +2606,13 @@ var DefaultColumn = {
2596
2606
  const [value, setValue] = useState11(initialValue);
2597
2607
  const [isEdit, setIsEdit] = useState11(false);
2598
2608
  const [showModal, setShowModal] = useState11(false);
2599
- useEffect7(() => {
2609
+ const closeModalRef = useRef10();
2610
+ closeModalRef.current = () => {
2611
+ setShowModal(false);
2612
+ };
2613
+ useEffect6(() => {
2600
2614
  setValue(initialValue);
2601
2615
  }, [initialValue]);
2602
- const modalPortal = useMemo5(() => document.getElementById("modal-portal"), []);
2603
2616
  const additionalViewResult = tableMeta?.additionalColumnsViews?.(id, initialValue);
2604
2617
  if (isEdit && meta?.editable) {
2605
2618
  const onBlur = () => {
@@ -2615,7 +2628,7 @@ var DefaultColumn = {
2615
2628
  return /* @__PURE__ */ jsx30(Tooltip, { label: original[id]?.error, alertType: "error", children: /* @__PURE__ */ jsxs16(
2616
2629
  "div",
2617
2630
  {
2618
- className: classnames19(
2631
+ className: classnames18(
2619
2632
  viewCell,
2620
2633
  !!meta?.rowsAlign ? virtualTable_exports[`align${meta?.rowsAlign}`] : void 0,
2621
2634
  meta?.showInModal ? showInModal : void 0,
@@ -2629,10 +2642,7 @@ var DefaultColumn = {
2629
2642
  } : void 0,
2630
2643
  children: [
2631
2644
  /* @__PURE__ */ jsx30("span", { className: viewSpan, children: shownValue }),
2632
- showModal && modalPortal && createPortal(
2633
- /* @__PURE__ */ jsx30(Modal, { close: () => setShowModal(false), children: /* @__PURE__ */ jsx30(Surface, { type: "panel", children: /* @__PURE__ */ jsx30("div", { className: modalContent, children: shownValue }) }) }),
2634
- modalPortal
2635
- )
2645
+ showModal && /* @__PURE__ */ jsx30(Modal, { open: showModal, onClose: () => closeModalRef.current?.(), children: /* @__PURE__ */ jsx30(Surface, { type: "panel", children: /* @__PURE__ */ jsx30("div", { className: modalContent, children: shownValue }) }) })
2636
2646
  ]
2637
2647
  }
2638
2648
  ) });
@@ -2640,19 +2650,19 @@ var DefaultColumn = {
2640
2650
  };
2641
2651
 
2642
2652
  // src/components/view/VirtualTable/ui/HeaderDropdown/HeaderDropdown.tsx
2643
- import classnames22 from "classnames";
2644
- import { useMemo as useMemo6 } from "react";
2653
+ import classnames21 from "classnames";
2654
+ import { useMemo as useMemo5 } from "react";
2645
2655
 
2646
2656
  // src/components/view/VirtualTable/ui/HeaderDropdown/headerDropdown.module.css
2647
- var root19 = "headerDropdown_root";
2657
+ var root18 = "headerDropdown_root";
2648
2658
  var checklistWrap = "headerDropdown_checklistWrap";
2649
2659
 
2650
2660
  // src/components/view/VirtualTable/ui/DateFiltration/DateFiltration.tsx
2651
- import classnames20 from "classnames";
2652
- import { useEffect as useEffect8, useState as useState12 } from "react";
2661
+ import classnames19 from "classnames";
2662
+ import { useEffect as useEffect7, useState as useState12 } from "react";
2653
2663
 
2654
2664
  // src/components/view/VirtualTable/ui/DateFiltration/dateFiltration.module.css
2655
- var root20 = "dateFiltration_root";
2665
+ var root19 = "dateFiltration_root";
2656
2666
 
2657
2667
  // src/components/view/VirtualTable/ui/DateFiltration/DateFiltration.tsx
2658
2668
  import { jsx as jsx31 } from "react/jsx-runtime";
@@ -2662,10 +2672,10 @@ function DateFiltration(props) {
2662
2672
  const handleChangeDates = (newValues) => {
2663
2673
  setValues(newValues);
2664
2674
  };
2665
- useEffect8(() => {
2675
+ useEffect7(() => {
2666
2676
  actionWithSelected(values);
2667
2677
  }, [values]);
2668
- return /* @__PURE__ */ jsx31("div", { className: classnames20(root20), children: /* @__PURE__ */ jsx31(
2678
+ return /* @__PURE__ */ jsx31("div", { className: classnames19(root19), children: /* @__PURE__ */ jsx31(
2669
2679
  DateTime,
2670
2680
  {
2671
2681
  componentSize: "small",
@@ -2679,11 +2689,11 @@ function DateFiltration(props) {
2679
2689
  }
2680
2690
 
2681
2691
  // src/components/view/VirtualTable/ui/NumberFiltration/NumberFiltration.tsx
2682
- import classnames21 from "classnames";
2692
+ import classnames20 from "classnames";
2683
2693
  import { useState as useState13 } from "react";
2684
2694
 
2685
2695
  // src/components/view/VirtualTable/ui/NumberFiltration/numberFiltration.module.css
2686
- var root21 = "numberFiltration_root";
2696
+ var root20 = "numberFiltration_root";
2687
2697
  var select = "numberFiltration_select";
2688
2698
  var inputsContainer = "numberFiltration_inputsContainer";
2689
2699
  var input8 = "numberFiltration_input";
@@ -2730,7 +2740,7 @@ function NumberFiltration(props) {
2730
2740
  (prev) => type === "equal" ? [value.length ? +value : -Infinity, value.length ? +value : Infinity] : type === "more" ? [value.length ? +value : -Infinity, prev[1]] : [prev[0], value.length ? +value : Infinity]
2731
2741
  );
2732
2742
  };
2733
- return /* @__PURE__ */ jsxs17("div", { className: classnames21(root21), children: [
2743
+ return /* @__PURE__ */ jsxs17("div", { className: classnames20(root20), children: [
2734
2744
  /* @__PURE__ */ jsx32(
2735
2745
  Select,
2736
2746
  {
@@ -2743,7 +2753,7 @@ function NumberFiltration(props) {
2743
2753
  tabIndex: -1
2744
2754
  }
2745
2755
  ),
2746
- /* @__PURE__ */ jsx32("div", { className: classnames21(inputsContainer), children: selectedItem.value === "range" ? /* @__PURE__ */ jsxs17(Fragment5, { children: [
2756
+ /* @__PURE__ */ jsx32("div", { className: classnames20(inputsContainer), children: selectedItem.value === "range" ? /* @__PURE__ */ jsxs17(Fragment5, { children: [
2747
2757
  /* @__PURE__ */ jsx32(
2748
2758
  Input,
2749
2759
  {
@@ -2831,7 +2841,7 @@ function HeaderDropdown(props) {
2831
2841
  children: children2
2832
2842
  } = props;
2833
2843
  const headerResultName = sortAnotherName ?? headerName;
2834
- const filterItems2 = useMemo6(() => {
2844
+ const filterItems2 = useMemo5(() => {
2835
2845
  const checklistItems = items2.filter((i) => Object.keys(i).includes(headerResultName)).map(
2836
2846
  (i) => ({
2837
2847
  name: valueFormat ? valueFormat(i[headerResultName].value?.toString() ?? "") : toFixed !== void 0 && !Number.isNaN(parseFloat(i[headerResultName].value)) ? parseFloat(Number(i[headerResultName].value).toFixed(toFixed)) : i[headerResultName].value,
@@ -2846,17 +2856,17 @@ function HeaderDropdown(props) {
2846
2856
  ];
2847
2857
  return uniqueChecklistItems;
2848
2858
  }, [items2, headerResultName]);
2849
- const filterSelectedItems = useMemo6(() => {
2859
+ const filterSelectedItems = useMemo5(() => {
2850
2860
  const result = {};
2851
2861
  filterBy.find((fb) => fb.columnName === headerResultName)?.values.forEach((v) => {
2852
2862
  result[v] = true;
2853
2863
  });
2854
2864
  return result;
2855
2865
  }, [filterBy, headerResultName]);
2856
- const filterNumbers = useMemo6(() => {
2866
+ const filterNumbers = useMemo5(() => {
2857
2867
  return filterBy.find((fb) => fb.columnName === headerResultName && fb.type === "numberRange")?.values;
2858
2868
  }, [filterBy, headerResultName]);
2859
- const filterDates = useMemo6(() => {
2869
+ const filterDates = useMemo5(() => {
2860
2870
  return filterBy.find((fb) => fb.columnName === headerResultName && fb.type === "dateRange")?.values;
2861
2871
  }, [filterBy, headerResultName]);
2862
2872
  const handleSortClick = (direction) => () => {
@@ -2931,7 +2941,7 @@ function HeaderDropdown(props) {
2931
2941
  };
2932
2942
  const hasAnyFilter = Object.keys(filterSelectedItems).length || sortBy.some((sb) => sb.columnName === headerResultName);
2933
2943
  const { t } = useTranslation();
2934
- return /* @__PURE__ */ jsxs18("div", { className: classnames22(root19), children: [
2944
+ return /* @__PURE__ */ jsxs18("div", { className: classnames21(root18), children: [
2935
2945
  children2?.(showUniqueValuesCount && /* @__PURE__ */ jsx33("div", { children: `(${filterItems2.length})` })),
2936
2946
  (sortable || filtrationByValue || filtrationByDate || filtrationByNumber) && /* @__PURE__ */ jsx33(
2937
2947
  Popover,
@@ -2942,7 +2952,7 @@ function HeaderDropdown(props) {
2942
2952
  description: /* @__PURE__ */ jsxs18(Fragment6, { children: [
2943
2953
  filtrationByNumber && /* @__PURE__ */ jsx33(NumberFiltration, { defaultValues: filterNumbers, actionWithSelected: actionWithSelectedNumbers }),
2944
2954
  filtrationByDate && /* @__PURE__ */ jsx33(DateFiltration, { defaultValues: filterDates, actionWithSelected: actionWithSelectedDates }),
2945
- filtrationByValue && /* @__PURE__ */ jsx33("div", { className: classnames22(checklistWrap), children: /* @__PURE__ */ jsx33(
2955
+ filtrationByValue && /* @__PURE__ */ jsx33("div", { className: classnames21(checklistWrap), children: /* @__PURE__ */ jsx33(
2946
2956
  Checklist,
2947
2957
  {
2948
2958
  items: filterItems2,
@@ -3115,9 +3125,9 @@ function VirtualTable(props) {
3115
3125
  } = props;
3116
3126
  const [filterBy, setFilterBy] = useState14([]);
3117
3127
  const [sortBy, setSortBy] = useState14([{ columnName: "isNew", direction: "desc" }]);
3118
- const tableContainerRef = useRef10(null);
3119
- const memoizedColumns = useMemo7(() => getColumns(columns), [columns]);
3120
- const memoizedData = useMemo7(() => {
3128
+ const tableContainerRef = useRef11(null);
3129
+ const memoizedColumns = useMemo6(() => getColumns(columns), [columns]);
3130
+ const memoizedData = useMemo6(() => {
3121
3131
  const newRows = [...rows];
3122
3132
  const nextFilterBy = filterBy.filter((filterByItem) => {
3123
3133
  const startDate = filterByItem.type === "dateRange" ? dayjs4(filterByItem.values[0]) : null;
@@ -3133,7 +3143,7 @@ function VirtualTable(props) {
3133
3143
  const sorted = sortBy.length ? recursiveSort(filtered, sortBy) : filtered;
3134
3144
  return sorted;
3135
3145
  }, [rows, sortBy, filterBy]);
3136
- const columnsEstimateSize = useMemo7(
3146
+ const columnsEstimateSize = useMemo6(
3137
3147
  () => cellWidth ?? ((index) => memoizedColumns[index]?.meta?.width ?? 200),
3138
3148
  [cellWidth, memoizedColumns]
3139
3149
  );
@@ -3176,11 +3186,11 @@ function VirtualTable(props) {
3176
3186
  estimateSize: columnsEstimateSize,
3177
3187
  overscan: 5
3178
3188
  });
3179
- const fixedColumnsWidth = useMemo7(
3189
+ const fixedColumnsWidth = useMemo6(
3180
3190
  () => [...Array(fixedColumnsCount)].reduce((sum, _, index) => sum + columnsEstimateSize(index), 0),
3181
3191
  [fixedColumnsCount, columnsEstimateSize]
3182
3192
  );
3183
- const headerGroupHeight = useMemo7(() => {
3193
+ const headerGroupHeight = useMemo6(() => {
3184
3194
  const delta = headerGroups.length - headerRowHeight.length;
3185
3195
  const result = [...headerRowHeight];
3186
3196
  if (delta > 0) {
@@ -3190,7 +3200,7 @@ function VirtualTable(props) {
3190
3200
  }
3191
3201
  return result;
3192
3202
  }, [headerRowHeight, headerGroups]);
3193
- const summaryHeaderHeight = useMemo7(
3203
+ const summaryHeaderHeight = useMemo6(
3194
3204
  () => headerGroupHeight.reduce(
3195
3205
  (sum, current, currentIndex) => currentIndex < headerGroups.length ? sum + current : sum,
3196
3206
  0
@@ -3203,7 +3213,7 @@ function VirtualTable(props) {
3203
3213
  );
3204
3214
  const rowsTotalSize = rowVirtualizer.getTotalSize();
3205
3215
  const columnsTotalSize = columnVirtualizer.getTotalSize();
3206
- useEffect9(() => {
3216
+ useEffect8(() => {
3207
3217
  if (tableContainerRef?.current) {
3208
3218
  const container = tableContainerRef?.current;
3209
3219
  const rightBorderElement = container.querySelector(`.${rightBorder}`);
@@ -3214,7 +3224,7 @@ function VirtualTable(props) {
3214
3224
  }
3215
3225
  }
3216
3226
  }, [tableContainerRef?.current?.clientWidth, columnsTotalSize, rowButtons, rowActionWidth]);
3217
- useEffect9(() => {
3227
+ useEffect8(() => {
3218
3228
  if (tableContainerRef?.current) {
3219
3229
  const container = tableContainerRef?.current;
3220
3230
  const bottomBorderElement = container.querySelector(`.${bottomBorder}`);
@@ -3225,7 +3235,7 @@ function VirtualTable(props) {
3225
3235
  }
3226
3236
  }
3227
3237
  }, [tableContainerRef?.current?.clientHeight, rowsTotalSize]);
3228
- useEffect9(() => {
3238
+ useEffect8(() => {
3229
3239
  const scrollListener = function() {
3230
3240
  const marginLeftChangingElements = this.querySelectorAll(`.${marginLeftChanging}`);
3231
3241
  marginLeftChangingElements?.forEach(
@@ -3254,14 +3264,14 @@ function VirtualTable(props) {
3254
3264
  return /* @__PURE__ */ jsx34(
3255
3265
  "div",
3256
3266
  {
3257
- className: classnames23(
3258
- root18,
3267
+ className: classnames22(
3268
+ root17,
3259
3269
  virtualTable_exports[size],
3260
3270
  virtualTable_exports[`borders${toFirstLetterUpperCase(borders)}`],
3261
3271
  classes?.root
3262
3272
  ),
3263
3273
  style: height ? { height } : void 0,
3264
- children: /* @__PURE__ */ jsxs19("div", { ref: tableContainerRef, className: classnames23(tableContainer, "styledScroll"), children: [
3274
+ children: /* @__PURE__ */ jsxs19("div", { ref: tableContainerRef, className: classnames22(tableContainer, "styledScroll"), children: [
3265
3275
  /* @__PURE__ */ jsxs19(
3266
3276
  "div",
3267
3277
  {
@@ -3282,7 +3292,7 @@ function VirtualTable(props) {
3282
3292
  children: headerGroups.map((headerGroup, hgi) => {
3283
3293
  const innerCell = (header2) => {
3284
3294
  const headerMeta = header2.column.columnDef.meta;
3285
- return /* @__PURE__ */ jsx34("div", { className: classnames23(thCell), children: header2.column.columnDef.id === header2.column.columnDef["accessorKey"] && (headerMeta?.sortable || headerMeta?.filtrationByValue || headerMeta?.filtrationByDate || headerMeta?.filtrationByNumber || headerMeta && showUniqueValuesCount) ? /* @__PURE__ */ jsx34(
3295
+ return /* @__PURE__ */ jsx34("div", { className: classnames22(thCell), children: header2.column.columnDef.id === header2.column.columnDef["accessorKey"] && (headerMeta?.sortable || headerMeta?.filtrationByValue || headerMeta?.filtrationByDate || headerMeta?.filtrationByNumber || headerMeta && showUniqueValuesCount) ? /* @__PURE__ */ jsx34(
3286
3296
  HeaderDropdown,
3287
3297
  {
3288
3298
  headerMeta,
@@ -3297,7 +3307,7 @@ function VirtualTable(props) {
3297
3307
  children: (afterNode) => /* @__PURE__ */ jsxs19(
3298
3308
  "div",
3299
3309
  {
3300
- className: classnames23(
3310
+ className: classnames22(
3301
3311
  label6,
3302
3312
  !!headerMeta?.headerAlign ? virtualTable_exports[`align${headerMeta?.headerAlign}`] : alignLeft
3303
3313
  ),
@@ -3311,7 +3321,7 @@ function VirtualTable(props) {
3311
3321
  ) : /* @__PURE__ */ jsx34(
3312
3322
  "div",
3313
3323
  {
3314
- className: classnames23(
3324
+ className: classnames22(
3315
3325
  label6,
3316
3326
  !!headerMeta?.headerAlign ? virtualTable_exports[`align${headerMeta?.headerAlign}`] : alignLeft
3317
3327
  ),
@@ -3331,7 +3341,7 @@ function VirtualTable(props) {
3331
3341
  return /* @__PURE__ */ jsx34(
3332
3342
  "div",
3333
3343
  {
3334
- className: classnames23(
3344
+ className: classnames22(
3335
3345
  th,
3336
3346
  hgi === 0 ? firstThRow : void 0,
3337
3347
  !nextVerticalHeaders.length && index !== headerGroup.headers.length - 1 && thRightBorder,
@@ -3377,7 +3387,7 @@ function VirtualTable(props) {
3377
3387
  return /* @__PURE__ */ jsx34(
3378
3388
  "div",
3379
3389
  {
3380
- className: classnames23(
3390
+ className: classnames22(
3381
3391
  th,
3382
3392
  hgi === 0 && firstThRow,
3383
3393
  !nextVerticalHeaders.length && column.index !== headerGroup.headers.length - 1 && thRightBorder,
@@ -3401,7 +3411,7 @@ function VirtualTable(props) {
3401
3411
  !!rowButtons && /* @__PURE__ */ jsx34(
3402
3412
  "div",
3403
3413
  {
3404
- className: classnames23(th, hgi === 0 ? firstThRow : void 0),
3414
+ className: classnames22(th, hgi === 0 ? firstThRow : void 0),
3405
3415
  style: {
3406
3416
  width: `${rowActionWidth}px`,
3407
3417
  height: `${headerGroupHeight[hgi]}px`,
@@ -3420,7 +3430,7 @@ function VirtualTable(props) {
3420
3430
  {
3421
3431
  "data-index": virtualRow.index,
3422
3432
  ref: dynamicRowHeight ? rowVirtualizer.measureElement : void 0,
3423
- className: classnames23(
3433
+ className: classnames22(
3424
3434
  tr,
3425
3435
  virtualRow.index % 2 !== 0 && evenRow,
3426
3436
  row.original?.isNew?.value === 1 && selected3
@@ -3440,7 +3450,7 @@ function VirtualTable(props) {
3440
3450
  "div",
3441
3451
  {
3442
3452
  "data-col-index": virtualCol.index,
3443
- className: classnames23(td, isSticky && sticky),
3453
+ className: classnames22(td, isSticky && sticky),
3444
3454
  style: {
3445
3455
  ...isSticky && {
3446
3456
  left: virtualCol.start,
@@ -3461,7 +3471,7 @@ function VirtualTable(props) {
3461
3471
  !!rowButtons && /* @__PURE__ */ jsx34(
3462
3472
  "div",
3463
3473
  {
3464
- className: classnames23(td),
3474
+ className: classnames22(td),
3465
3475
  style: {
3466
3476
  width: `${rowActionWidth}px`,
3467
3477
  justifyContent: "flex-start",
@@ -3509,14 +3519,14 @@ function VirtualTable(props) {
3509
3519
  }
3510
3520
 
3511
3521
  // src/components/view/TreeView/TreeView.tsx
3512
- import { memo as memo2, useCallback as useCallback8, useMemo as useMemo8, useState as useState16 } from "react";
3522
+ import { memo as memo2, useCallback as useCallback8, useMemo as useMemo7, useState as useState16 } from "react";
3513
3523
 
3514
3524
  // src/components/view/TreeView/treeView.module.css
3515
3525
  var search = "treeView_search";
3516
3526
 
3517
3527
  // src/components/view/TreeView/ui/TreeViewItem/TreeViewItem.tsx
3518
3528
  import classNames4 from "classnames";
3519
- import { memo, useEffect as useEffect10, useState as useState15 } from "react";
3529
+ import { memo, useEffect as useEffect9, useState as useState15 } from "react";
3520
3530
 
3521
3531
  // src/components/view/TreeView/ui/TreeViewItem/treeViewItem.module.css
3522
3532
  var item2 = "treeViewItem_item";
@@ -3540,7 +3550,7 @@ var TreeViewItem_default = memo(function TreeViewItem({
3540
3550
  children: children2
3541
3551
  }) {
3542
3552
  const [isOpen, setIsOpen] = useState15(false);
3543
- useEffect10(() => {
3553
+ useEffect9(() => {
3544
3554
  setIsOpen(!!searchValue);
3545
3555
  }, [searchValue]);
3546
3556
  const hasChildren = !!children2?.length;
@@ -3603,7 +3613,7 @@ import { Fragment as Fragment9, jsx as jsx36, jsxs as jsxs21 } from "react/jsx-r
3603
3613
  var TreeView_default = memo2(function TreeView({ data, selected: selected5, startIcons, onSelect, withSearch = false }) {
3604
3614
  const [searchValue, setSearchValue] = useState16("");
3605
3615
  const onChangeSearchValue = useCallback8((e) => setSearchValue(e.target.value), []);
3606
- const selectedValues = useMemo8(
3616
+ const selectedValues = useMemo7(
3607
3617
  () => selected5.reduce(
3608
3618
  (acc, cur) => {
3609
3619
  acc[cur] = true;
@@ -3613,7 +3623,7 @@ var TreeView_default = memo2(function TreeView({ data, selected: selected5, star
3613
3623
  ),
3614
3624
  [selected5]
3615
3625
  );
3616
- const filteredData = useMemo8(() => {
3626
+ const filteredData = useMemo7(() => {
3617
3627
  return getFilteredTree(data, searchValue);
3618
3628
  }, [data, searchValue]);
3619
3629
  return /* @__PURE__ */ jsxs21(Fragment9, { children: [
@@ -3726,7 +3736,7 @@ function Pairs(props) {
3726
3736
  import classNames6 from "classnames";
3727
3737
 
3728
3738
  // src/components/view/Card/card.module.css
3729
- var root22 = "card_root";
3739
+ var root21 = "card_root";
3730
3740
  var header = "card_header";
3731
3741
  var actions = "card_actions";
3732
3742
 
@@ -3734,7 +3744,7 @@ var actions = "card_actions";
3734
3744
  import { jsx as jsx39, jsxs as jsxs23 } from "react/jsx-runtime";
3735
3745
  function Card(props) {
3736
3746
  const { surfaceType = "primary", title: title2, actions: actions2, children: children2, classes } = props;
3737
- return /* @__PURE__ */ jsxs23(Surface, { type: surfaceType, classes: { root: classNames6(root22, classes?.root) }, children: [
3747
+ return /* @__PURE__ */ jsxs23(Surface, { type: surfaceType, classes: { root: classNames6(root21, classes?.root) }, children: [
3738
3748
  (!!title2 || !!actions2) && /* @__PURE__ */ jsxs23("div", { className: header, children: [
3739
3749
  title2 ?? /* @__PURE__ */ jsx39("div", {}),
3740
3750
  !!actions2 && /* @__PURE__ */ jsx39("div", { className: classNames6(actions, classes?.actions), children: actions2 })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nntc-ui",
3
- "version": "0.0.32",
3
+ "version": "0.0.34",
4
4
  "author": "NNTC",
5
5
  "description": "React UI-kit for NNTC",
6
6
  "type": "module",
@@ -10,7 +10,6 @@
10
10
 
11
11
  --theme-modal-shadow-background: rgba(81, 81, 81, 0.5);
12
12
  --theme-modal-background: #515151;
13
- --theme-modal-translucent-background: #515151aa;
14
13
 
15
14
  --theme-divider: rgba(255, 255, 255, 0.24);
16
15
 
@@ -10,7 +10,6 @@
10
10
 
11
11
  --theme-modal-shadow-background: rgba(255, 255, 255, 0.5);
12
12
  --theme-modal-background: #ffffff;
13
- --theme-modal-translucent-background: #515151aa;
14
13
 
15
14
  --theme-divider: rgba(0, 0, 0, 0.12);
16
15