impact-nova 0.1.13 → 1.1.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 (120) hide show
  1. package/dist/components/layout/dashboard-layout.d.ts +21 -6
  2. package/dist/components/ui/accordion-nested-list/accordion-nested-list.js +32 -33
  3. package/dist/components/ui/accordion.js +25 -23
  4. package/dist/components/ui/ag-grid-react/cell-renderers/date-display-renderer.js +32 -21
  5. package/dist/components/ui/ag-grid-react/cell-renderers/editors/date-cell-editor.d.ts +3 -5
  6. package/dist/components/ui/ag-grid-react/cell-renderers/editors/date-cell-editor.js +57 -55
  7. package/dist/components/ui/ag-grid-react/cell-renderers/editors/split-cell-editor.d.ts +5 -0
  8. package/dist/components/ui/ag-grid-react/cell-renderers/editors/split-cell-editor.js +50 -52
  9. package/dist/components/ui/ag-grid-react/cell-renderers/input-display-renderer.d.ts +1 -1
  10. package/dist/components/ui/ag-grid-react/cell-renderers/split-cell-renderer.js +34 -34
  11. package/dist/components/ui/ag-grid-react/headers/advanced-filter/column-filter-section.js +8 -11
  12. package/dist/components/ui/ag-grid-react/headers/column-menu/column-settings-menu.js +17 -17
  13. package/dist/components/ui/ag-grid-react/headers/header-search-input.js +3 -3
  14. package/dist/components/ui/alert-dialog.js +45 -40
  15. package/dist/components/ui/alert.d.ts +21 -4
  16. package/dist/components/ui/alert.js +45 -25
  17. package/dist/components/ui/avatar.js +19 -16
  18. package/dist/components/ui/badge.js +8 -1
  19. package/dist/components/ui/breadcrumb.js +1 -0
  20. package/dist/components/ui/button-group.d.ts +1 -1
  21. package/dist/components/ui/button-group.js +27 -32
  22. package/dist/components/ui/button-variants.d.ts +1 -1
  23. package/dist/components/ui/button.d.ts +11 -0
  24. package/dist/components/ui/button.js +11 -9
  25. package/dist/components/ui/calendar.d.ts +14 -2
  26. package/dist/components/ui/calendar.js +443 -376
  27. package/dist/components/ui/card.js +7 -6
  28. package/dist/components/ui/checkbox.js +64 -48
  29. package/dist/components/ui/chips.d.ts +1 -0
  30. package/dist/components/ui/chips.js +27 -19
  31. package/dist/components/ui/data-table/data-table-column-list.d.ts +4 -1
  32. package/dist/components/ui/data-table/data-table-column-list.js +58 -54
  33. package/dist/components/ui/data-table/data-table-sheet.d.ts +1 -1
  34. package/dist/components/ui/data-table/data-table-sheet.js +43 -40
  35. package/dist/components/ui/data-table/data-table-view-options.js +17 -17
  36. package/dist/components/ui/data-table/data-table.js +21 -20
  37. package/dist/components/ui/date-picker/date-picker.js +93 -93
  38. package/dist/components/ui/date-picker/date-range-picker.js +142 -133
  39. package/dist/components/ui/date-picker/month-picker.js +96 -93
  40. package/dist/components/ui/date-picker/month-range-picker.js +144 -134
  41. package/dist/components/ui/date-picker/multi-date-picker.js +43 -45
  42. package/dist/components/ui/date-picker/multi-month-picker.js +37 -39
  43. package/dist/components/ui/date-picker/multi-week-picker.js +56 -46
  44. package/dist/components/ui/date-picker/week-picker.js +119 -109
  45. package/dist/components/ui/date-picker/week-range-picker.js +170 -147
  46. package/dist/components/ui/dialog.js +15 -6
  47. package/dist/components/ui/drawer.js +16 -13
  48. package/dist/components/ui/dropdown-menu.js +4 -2
  49. package/dist/components/ui/dynamic-layout.d.ts +2 -2
  50. package/dist/components/ui/dynamic-layout.js +18 -15
  51. package/dist/components/ui/empty-container.js +69 -64
  52. package/dist/components/ui/file-upload.js +113 -106
  53. package/dist/components/ui/filter-panel/filter-panel.js +49 -46
  54. package/dist/components/ui/filter-strip/filter-strip.js +41 -37
  55. package/dist/components/ui/header.js +26 -25
  56. package/dist/components/ui/horizontal-scroller/horizontal-scroller.js +43 -40
  57. package/dist/components/ui/hover-card.js +6 -5
  58. package/dist/components/ui/input.d.ts +1 -1
  59. package/dist/components/ui/input.js +79 -68
  60. package/dist/components/ui/loader.d.ts +1 -0
  61. package/dist/components/ui/loader.js +23 -13
  62. package/dist/components/ui/nested-list/components/NestedListContent.d.ts +1 -3
  63. package/dist/components/ui/nested-list/components/NestedListContent.js +16 -15
  64. package/dist/components/ui/nested-list/components/SortableItem.js +116 -80
  65. package/dist/components/ui/nested-list/hooks/useNestedListDragDrop.d.ts +13 -1
  66. package/dist/components/ui/nested-list/hooks/useNestedListDragDrop.js +162 -112
  67. package/dist/components/ui/nested-list/nested-list.js +182 -189
  68. package/dist/components/ui/notification-panel/notification-item.js +19 -17
  69. package/dist/components/ui/notification-panel/notification-list.js +21 -21
  70. package/dist/components/ui/notification-panel/notification-panel.js +25 -25
  71. package/dist/components/ui/popover.js +37 -34
  72. package/dist/components/ui/progress.js +12 -10
  73. package/dist/components/ui/prompt.js +29 -27
  74. package/dist/components/ui/radio-group.js +55 -46
  75. package/dist/components/ui/select/components/Submenu.d.ts +1 -2
  76. package/dist/components/ui/select/components/Submenu.js +52 -48
  77. package/dist/components/ui/select/select.js +321 -324
  78. package/dist/components/ui/sheet.js +18 -15
  79. package/dist/components/ui/sidebar.d.ts +2 -2
  80. package/dist/components/ui/sidebar.js +3 -3
  81. package/dist/components/ui/skeleton.d.ts +2 -1
  82. package/dist/components/ui/skeleton.js +12 -11
  83. package/dist/components/ui/slider.js +39 -12
  84. package/dist/components/ui/smart-input.js +44 -39
  85. package/dist/components/ui/stepper.js +33 -29
  86. package/dist/components/ui/switch.js +6 -4
  87. package/dist/components/ui/tabs.js +50 -45
  88. package/dist/components/ui/tag-group.d.ts +2 -1
  89. package/dist/components/ui/tag-group.js +29 -25
  90. package/dist/components/ui/tag.d.ts +1 -0
  91. package/dist/components/ui/tag.js +26 -20
  92. package/dist/components/ui/textarea.js +18 -17
  93. package/dist/components/ui/toast.d.ts +1 -1
  94. package/dist/components/ui/toast.js +47 -41
  95. package/dist/components/ui/toaster.js +42 -42
  96. package/dist/components/ui/tooltip.js +18 -16
  97. package/dist/components/ui/types/date-picker.types.d.ts +33 -0
  98. package/dist/components/ui/types/empty-container.types.d.ts +5 -0
  99. package/dist/components/ui/types/nested-list.types.d.ts +1 -0
  100. package/dist/components/ui/types/select.types.d.ts +0 -1
  101. package/dist/icons/assets/bookmark.svg.js +4 -0
  102. package/dist/icons/assets/bookmark.svg2.js +5 -0
  103. package/dist/icons/assets/bookmarkFilled.svg.js +4 -0
  104. package/dist/icons/assets/bookmarkFilled.svg2.js +5 -0
  105. package/dist/icons/assets/download.svg.js +4 -0
  106. package/dist/icons/assets/download.svg2.js +5 -0
  107. package/dist/icons/index.d.ts +20 -6
  108. package/dist/icons/index.js +398 -370
  109. package/dist/impact-nova.css +1 -1
  110. package/dist/index.d.ts +1 -0
  111. package/dist/index.js +318 -314
  112. package/dist/lib/fiscal-calendar.d.ts +62 -0
  113. package/dist/lib/fiscal-calendar.js +99 -0
  114. package/dist/lib/utils.d.ts +2 -1
  115. package/dist/lib/utils.js +29 -13
  116. package/package.json +5 -5
  117. package/dist/components/ui/select/hooks/useClickOutside.d.ts +0 -15
  118. package/dist/components/ui/select/hooks/useClickOutside.js +0 -43
  119. package/dist/components/ui/select/hooks/useMenuPosition.d.ts +0 -2
  120. package/dist/components/ui/select/hooks/useMenuPosition.js +0 -89
@@ -1,85 +1,89 @@
1
- import { jsx as r, jsxs as i } from "react/jsx-runtime";
2
- import { createPortal as k } from "react-dom";
3
- import { Checkbox as w } from "../../checkbox.js";
4
- import { ChevronRight as S, Checkmark as C } from "../../../../icons/index.js";
1
+ import { jsxs as s, jsx as t } from "react/jsx-runtime";
2
+ import * as i from "@radix-ui/react-popover";
3
+ import { Checkbox as y } from "../../checkbox.js";
4
+ import { ChevronRight as C, Checkmark as w } from "../../../../icons/index.js";
5
5
  import { cn as N } from "../../../../lib/utils.js";
6
- const V = ({
7
- parentOption: a,
8
- parentRect: l,
6
+ const D = ({
7
+ parentOption: o,
9
8
  isMulti: c,
10
- isReadOnly: o,
11
- isSelected: f,
12
- getIndeterminateState: p,
13
- getSelectedCount: x,
14
- handleSelect: h,
15
- id: A
9
+ isReadOnly: l,
10
+ isSelected: b,
11
+ getIndeterminateState: f,
12
+ getSelectedCount: h,
13
+ handleSelect: x,
14
+ id: S
16
15
  }) => {
17
- const d = "children" in a && Array.isArray(a.children) ? a.children : null;
18
- return d ? k(
19
- /* @__PURE__ */ r(
20
- "div",
16
+ const d = "children" in o && Array.isArray(o.children) ? o.children : null;
17
+ if (!d) return null;
18
+ const u = String(o.value || "");
19
+ return /* @__PURE__ */ s(i.Root, { open: !0, children: [
20
+ /* @__PURE__ */ t(i.Anchor, { className: "absolute inset-0 pointer-events-none" }),
21
+ /* @__PURE__ */ t(i.Portal, { children: /* @__PURE__ */ t(
22
+ i.Content,
21
23
  {
22
- className: "select-submenu-container absolute z-[10000] bg-white rounded-lg shadow-xl ring-1 ring-black ring-opacity-5 overflow-auto py-1 min-w-[180px]",
23
- style: {
24
- top: l.top - 4,
25
- left: l.right + 8,
26
- maxHeight: "300px"
27
- },
24
+ side: "right",
25
+ sideOffset: 8,
26
+ align: "start",
27
+ avoidCollisions: !0,
28
+ collisionPadding: 8,
29
+ onOpenAutoFocus: (e) => e.preventDefault(),
30
+ className: "select-submenu-container z-50 bg-white rounded-lg shadow-xl ring-1 ring-black ring-opacity-5 overflow-auto py-1 min-w-[180px] max-h-[300px]",
31
+ "data-component": "select-menu",
28
32
  children: d.map((e) => {
29
- const t = f(e), y = p(e), n = e.isDisabled, u = x(e), s = "children" in e && Array.isArray(e.children) && e.children.length > 0, m = e.isParentSelectable !== !1, b = String(e.value || ""), g = String(a.value || "");
30
- return /* @__PURE__ */ i(
33
+ const n = b(e), v = f(e), a = e.isDisabled, m = h(e), r = "children" in e && Array.isArray(e.children) && e.children.length > 0, p = e.isParentSelectable !== !1, g = String(e.value || "");
34
+ return /* @__PURE__ */ s(
31
35
  "div",
32
36
  {
33
37
  className: N(
34
38
  "relative cursor-default select-none py-2 px-3 flex items-center justify-between",
35
- n ? "opacity-50 cursor-not-allowed bg-[#f5f5f5]" : o ? "cursor-default" : "hover:bg-indigo-100 cursor-pointer",
36
- t && !n && !s ? "bg-indigo-50 text-indigo-900" : "text-gray-900"
39
+ a ? "opacity-50 cursor-not-allowed bg-[#f5f5f5]" : l ? "cursor-default" : "hover:bg-indigo-100 cursor-pointer",
40
+ n && !a && !r ? "bg-indigo-50 text-indigo-900" : "text-gray-900"
37
41
  ),
38
- onClick: (v) => {
39
- v.stopPropagation(), !n && !o && m && h(e);
42
+ onClick: (k) => {
43
+ k.stopPropagation(), !a && !l && p && x(e);
40
44
  },
41
- "data-testid": `select-submenu-option-${g}-${b}`,
42
- "data-selected": t,
43
- "data-disabled": n,
45
+ "data-testid": `select-submenu-option-${u}-${g}`,
46
+ "data-state": n ? "checked" : "unchecked",
47
+ "data-disabled": a || void 0,
48
+ "data-component": "select-option",
44
49
  children: [
45
- /* @__PURE__ */ i("div", { className: "flex items-center gap-2 flex-1", children: [
46
- c && m && /* @__PURE__ */ r(
47
- w,
50
+ /* @__PURE__ */ s("div", { className: "flex items-center gap-2 flex-1", children: [
51
+ c && p && /* @__PURE__ */ t(
52
+ y,
48
53
  {
49
- checked: y ? "indeterminate" : t,
50
- disabled: n || o,
54
+ checked: v ? "indeterminate" : n,
55
+ disabled: a || l,
51
56
  onChange: () => {
52
57
  }
53
58
  }
54
59
  ),
55
- /* @__PURE__ */ r(
60
+ /* @__PURE__ */ t(
56
61
  "span",
57
62
  {
58
63
  className: "block truncate",
59
- "data-testid": `select-submenu-option-label-${g}-${b}`,
60
- "data-selected": t,
64
+ "data-testid": `select-submenu-option-label-${u}-${g}`,
65
+ "data-state": n ? "checked" : "unchecked",
61
66
  title: String(e.label || ""),
62
67
  children: e.label
63
68
  }
64
69
  ),
65
- s && u > 0 && /* @__PURE__ */ i("span", { className: "text-xs text-gray-500 font-medium", children: [
70
+ r && m > 0 && /* @__PURE__ */ s("span", { className: "text-xs text-gray-500 font-medium", children: [
66
71
  "(",
67
- u,
72
+ m,
68
73
  ")"
69
74
  ] })
70
75
  ] }),
71
- s && /* @__PURE__ */ r(S, { size: "sm", color: "#7a8294" }),
72
- !c && t && !s && /* @__PURE__ */ r(C, { className: "h-4 w-4 text-indigo-600" })
76
+ r && /* @__PURE__ */ t(C, { size: "sm", color: "#7a8294" }),
77
+ !c && n && !r && /* @__PURE__ */ t(w, { className: "h-4 w-4 text-indigo-600" })
73
78
  ]
74
79
  },
75
80
  e.value
76
81
  );
77
82
  })
78
83
  }
79
- ),
80
- document.body
81
- ) : null;
84
+ ) })
85
+ ] });
82
86
  };
83
87
  export {
84
- V as default
88
+ D as default
85
89
  };