impact-nova 1.5.14 → 1.6.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.
- package/dist/components/ui/accordion.d.ts +4 -1
- package/dist/components/ui/accordion.js +28 -22
- package/dist/components/ui/ag-grid-react/cell-renderers/badge-cell-renderer.js +11 -11
- package/dist/components/ui/ag-grid-react/cell-renderers/checkbox-display-renderer.js +12 -12
- package/dist/components/ui/ag-grid-react/cell-renderers/date-display-renderer.js +13 -13
- package/dist/components/ui/ag-grid-react/cell-renderers/editors/date-cell-editor.js +13 -13
- package/dist/components/ui/ag-grid-react/cell-renderers/editors/input-cell-editor.js +30 -30
- package/dist/components/ui/ag-grid-react/cell-renderers/editors/percent-progress-cell-editor.js +13 -13
- package/dist/components/ui/ag-grid-react/cell-renderers/editors/split-cell-editor.js +16 -16
- package/dist/components/ui/ag-grid-react/cell-renderers/editors/textarea-cell-editor.js +17 -17
- package/dist/components/ui/ag-grid-react/cell-renderers/input-display-renderer.js +11 -11
- package/dist/components/ui/ag-grid-react/cell-renderers/link-with-batch-cell-renderer.js +2 -2
- package/dist/components/ui/ag-grid-react/cell-renderers/percent-progress-display-renderer.js +11 -13
- package/dist/components/ui/ag-grid-react/cell-renderers/select-display-renderer.js +8 -8
- package/dist/components/ui/ag-grid-react/cell-renderers/split-cell-renderer.js +6 -6
- package/dist/components/ui/ag-grid-react/cell-renderers/status-badge-renderer.d.ts +1 -1
- package/dist/components/ui/ag-grid-react/cell-renderers/status-badge-renderer.js +14 -14
- package/dist/components/ui/ag-grid-react/cell-renderers/switch-display-renderer.js +18 -18
- package/dist/components/ui/ag-grid-react/cell-renderers/textarea-display-renderer.js +6 -6
- package/dist/components/ui/ag-grid-react/headers/advanced-filter/advanced-filter-dialog.js +14 -14
- package/dist/components/ui/ag-grid-react/headers/advanced-filter/column-filter-section.js +35 -35
- package/dist/components/ui/ag-grid-react/headers/column-menu/column-settings-menu.js +49 -49
- package/dist/components/ui/ag-grid-react/headers/components/header-info.js +29 -29
- package/dist/components/ui/ag-grid-react/headers/components/info-modal.js +9 -9
- package/dist/components/ui/ag-grid-react/headers/components/section-renderers.js +20 -20
- package/dist/components/ui/ag-grid-react/headers/custom-header-group.js +10 -10
- package/dist/components/ui/ag-grid-react/headers/custom-header.js +76 -76
- package/dist/components/ui/ag-grid-react/headers/header-search-input.js +118 -118
- package/dist/components/ui/ag-grid-react/index.js +121 -102
- package/dist/components/ui/alert-dialog.js +6 -6
- package/dist/components/ui/alert.d.ts +4 -3
- package/dist/components/ui/alert.js +182 -64
- package/dist/components/ui/avatar.js +5 -5
- package/dist/components/ui/badge.d.ts +7 -2
- package/dist/components/ui/badge.js +105 -32
- package/dist/components/ui/breadcrumb.js +26 -21
- package/dist/components/ui/button-group.d.ts +7 -0
- package/dist/components/ui/button-group.js +116 -91
- package/dist/components/ui/button-variants.d.ts +7 -2
- package/dist/components/ui/button-variants.js +31 -16
- package/dist/components/ui/button.d.ts +2 -2
- package/dist/components/ui/button.js +10 -10
- package/dist/components/ui/calendar.js +185 -184
- package/dist/components/ui/card.js +24 -24
- package/dist/components/ui/chart/chart.js +27 -27
- package/dist/components/ui/chart/chart.utils.js +50 -50
- package/dist/components/ui/checkbox.js +22 -22
- package/dist/components/ui/chips.d.ts +19 -3
- package/dist/components/ui/chips.js +140 -41
- package/dist/components/ui/command-palette/command-palette-layout.d.ts +28 -0
- package/dist/components/ui/command-palette/command-palette-layout.js +59 -0
- package/dist/components/ui/command-palette/command-palette.js +254 -264
- package/dist/components/ui/command-palette/index.d.ts +1 -1
- package/dist/components/ui/command-palette/index.js +42 -41
- package/dist/components/ui/command-palette/kbd.js +18 -18
- package/dist/components/ui/command-palette/shortcut-settings.d.ts +3 -3
- package/dist/components/ui/command-palette/shortcut-settings.js +105 -111
- package/dist/components/ui/command-palette/utils.d.ts +6 -1
- package/dist/components/ui/command-palette/utils.js +81 -74
- package/dist/components/ui/data-table/data-table-column-list.js +31 -31
- package/dist/components/ui/data-table/data-table-constants.d.ts +6 -0
- package/dist/components/ui/data-table/data-table-constants.js +4 -0
- package/dist/components/ui/data-table/data-table-context.d.ts +4 -0
- package/dist/components/ui/data-table/data-table-format-options.js +35 -35
- package/dist/components/ui/data-table/data-table-sheet.d.ts +4 -4
- package/dist/components/ui/data-table/data-table-sheet.js +91 -58
- package/dist/components/ui/data-table/data-table-view-options.js +29 -29
- package/dist/components/ui/data-table/data-table.js +84 -52
- package/dist/components/ui/data-table/index.d.ts +1 -0
- package/dist/components/ui/data-table/index.js +15 -13
- package/dist/components/ui/date-picker/date-picker.js +35 -35
- package/dist/components/ui/date-picker/date-range-picker.js +166 -164
- package/dist/components/ui/date-picker/month-picker.js +14 -14
- package/dist/components/ui/date-picker/month-range-picker.js +198 -189
- package/dist/components/ui/date-picker/multi-date-picker.js +14 -14
- package/dist/components/ui/date-picker/multi-month-picker.js +1 -1
- package/dist/components/ui/date-picker/multi-week-picker.js +1 -1
- package/dist/components/ui/date-picker/week-picker.js +2 -2
- package/dist/components/ui/date-picker/week-range-picker.js +164 -162
- package/dist/components/ui/dialog.js +25 -28
- package/dist/components/ui/drawer.js +40 -40
- package/dist/components/ui/dropdown-menu.js +72 -72
- package/dist/components/ui/empty-container.js +73 -69
- package/dist/components/ui/file-upload.js +137 -135
- package/dist/components/ui/filter-panel/filter-panel.d.ts +2 -2
- package/dist/components/ui/filter-panel/filter-panel.js +175 -97
- package/dist/components/ui/filter-strip/filter-strip.d.ts +1 -1
- package/dist/components/ui/filter-strip/filter-strip.js +63 -50
- package/dist/components/ui/filter-strip/filter-summary.d.ts +4 -1
- package/dist/components/ui/filter-strip/filter-summary.js +230 -146
- package/dist/components/ui/filter-strip/filter-tag-list.js +125 -91
- package/dist/components/ui/header.d.ts +7 -3
- package/dist/components/ui/header.js +87 -79
- package/dist/components/ui/horizontal-scroller/horizontal-scroller.js +44 -44
- package/dist/components/ui/hover-card.js +10 -10
- package/dist/components/ui/input.js +79 -70
- package/dist/components/ui/loader.js +16 -16
- package/dist/components/ui/nested-list/components/NestedListCategoryFilters.js +16 -16
- package/dist/components/ui/nested-list/components/NestedListHeader.js +27 -27
- package/dist/components/ui/nested-list/components/SortableItem.js +58 -58
- package/dist/components/ui/notification-panel/notification-item.js +32 -32
- package/dist/components/ui/notification-panel/notification-list.js +24 -24
- package/dist/components/ui/notification-panel/notification-panel.js +26 -26
- package/dist/components/ui/popover.js +22 -22
- package/dist/components/ui/progress.js +34 -34
- package/dist/components/ui/prompt.js +48 -48
- package/dist/components/ui/radio-group.js +63 -54
- package/dist/components/ui/select/components/LabelWithSequence.js +6 -6
- package/dist/components/ui/select/components/Submenu.js +33 -33
- package/dist/components/ui/select/select.js +425 -376
- package/dist/components/ui/sheet.js +88 -66
- package/dist/components/ui/sidebar.js +342 -296
- package/dist/components/ui/skeleton.js +6 -6
- package/dist/components/ui/slider.js +17 -17
- package/dist/components/ui/statistics-card.d.ts +86 -0
- package/dist/components/ui/statistics-card.hooks.d.ts +150 -0
- package/dist/components/ui/statistics-card.hooks.js +100 -0
- package/dist/components/ui/statistics-card.js +259 -0
- package/dist/components/ui/stepper.js +51 -51
- package/dist/components/ui/switch.js +7 -7
- package/dist/components/ui/tabs.js +70 -70
- package/dist/components/ui/tag-group.d.ts +1 -0
- package/dist/components/ui/tag-group.js +14 -13
- package/dist/components/ui/tag.js +43 -43
- package/dist/components/ui/textarea.js +86 -58
- package/dist/components/ui/toast.js +39 -39
- package/dist/components/ui/tooltip.js +23 -23
- package/dist/components/ui/types/date-picker.types.d.ts +1 -0
- package/dist/components/ui/types/filter-panel.types.d.ts +3 -0
- package/dist/components/ui/types/filter-strip.types.d.ts +14 -0
- package/dist/components/ui/types/horizontal-scroller.types.d.ts +1 -1
- package/dist/components/ui/types/statistics-card.types.d.ts +1 -0
- package/dist/i18n/defaultMessages.d.ts +8 -0
- package/dist/i18n/defaultMessages.js +15 -9
- package/dist/i18n/locales/de.js +7 -1
- package/dist/i18n/locales/es.js +7 -1
- package/dist/i18n/locales/hi.js +7 -1
- package/dist/i18n/locales/kn.js +7 -1
- package/dist/icons/assets/bulk-edit.svg.js +5 -0
- package/dist/icons/assets/clock.svg.js +5 -0
- package/dist/icons/assets/statistics.svg.js +5 -0
- package/dist/icons/index.d.ts +3 -0
- package/dist/icons/index.js +254 -206
- package/dist/impact-nova.css +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +361 -347
- package/package.json +3 -2
- package/tailwind.config.js +259 -152
- /package/dist/icons/assets/{PivotMode.svg.js → pivotMode.svg.js} +0 -0
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as r, jsxs as p } from "react/jsx-runtime";
|
|
2
2
|
import z, { useMemo as L } from "react";
|
|
3
3
|
import { useSortable as O, defaultAnimateLayoutChanges as P } from "@dnd-kit/sortable";
|
|
4
4
|
import { useDroppable as $ } from "@dnd-kit/core";
|
|
5
5
|
import { CSS as j } from "@dnd-kit/utilities";
|
|
6
6
|
import { Checkbox as E } from "../../checkbox.js";
|
|
7
7
|
import { ChevronRight as H, Drag as F } from "../../../../icons/index.js";
|
|
8
|
-
import { cn as
|
|
8
|
+
import { cn as s } from "../../../../lib/utils.js";
|
|
9
9
|
import { useImpactNovaI18n as M } from "../../../../i18n/ImpactNovaI18nContext.js";
|
|
10
|
-
const _ = (e, o,
|
|
11
|
-
const
|
|
12
|
-
return e ?
|
|
10
|
+
const _ = (e, o, t, c, a) => {
|
|
11
|
+
const n = "flex items-center gap-1 py-[3px] px-2 rounded transition-all duration-200";
|
|
12
|
+
return e ? s(n, "bg-transparent") : a ? s(n, "bg-feedback-error-surface border border-destructive animate-pulse") : o && t ? c ? s(n, "bg-canvas-tint border-2 border-brand shadow-sm") : s(n, "bg-feedback-error-surface border-2 border-destructive shadow-sm") : s(n, "hover:bg-canvas-muted");
|
|
13
13
|
}, T = (e) => P({ ...e, wasDragging: !0 }), q = ({ item: e, isAnyDragging: o }) => {
|
|
14
|
-
const
|
|
15
|
-
setNodeRef:
|
|
14
|
+
const t = !e.children || e.children.length === 0, {
|
|
15
|
+
setNodeRef: c,
|
|
16
16
|
isOver: a
|
|
17
17
|
} = $({
|
|
18
18
|
id: `droppable-${e.id}`,
|
|
19
19
|
data: { sectionId: e.id },
|
|
20
|
-
disabled: !
|
|
20
|
+
disabled: !t
|
|
21
21
|
});
|
|
22
|
-
return /* @__PURE__ */ p("div", { ref:
|
|
22
|
+
return /* @__PURE__ */ p("div", { ref: t ? c : void 0, children: [
|
|
23
23
|
/* @__PURE__ */ p(
|
|
24
24
|
"div",
|
|
25
25
|
{
|
|
26
|
-
className:
|
|
27
|
-
"flex items-center px-2 py-0 text-xs font-[500] leading-4 text-
|
|
28
|
-
e.id === "root-scrollable" ? "mt-2 pt-2 pb-1 border-t border-solid border-
|
|
29
|
-
a && o &&
|
|
26
|
+
className: s(
|
|
27
|
+
"flex items-center px-2 py-0 text-xs font-[500] leading-4 text-navigation-muted select-none",
|
|
28
|
+
e.id === "root-scrollable" ? "mt-2 pt-2 pb-1 border-t border-solid border-stroke-subtle" : "mt-1 pb-1",
|
|
29
|
+
a && o && t && "bg-canvas-tint rounded"
|
|
30
30
|
),
|
|
31
31
|
children: [
|
|
32
32
|
e.label,
|
|
33
|
-
a && o &&
|
|
33
|
+
a && o && t && /* @__PURE__ */ r("span", { className: "ml-2 text-brand text-[11px]", children: "Drop here" })
|
|
34
34
|
]
|
|
35
35
|
}
|
|
36
36
|
),
|
|
37
|
-
|
|
37
|
+
t && /* @__PURE__ */ r(
|
|
38
38
|
"div",
|
|
39
39
|
{
|
|
40
|
-
className:
|
|
40
|
+
className: s(
|
|
41
41
|
"mx-2 my-1 rounded border-2 border-dashed min-h-[36px] flex items-center justify-center text-[11px] transition-colors",
|
|
42
|
-
a && o ? "border-
|
|
42
|
+
a && o ? "border-brand bg-canvas-tint text-brand" : "border-stroke-hairline text-content-empty"
|
|
43
43
|
),
|
|
44
44
|
children: a && o ? "Release to drop" : "Drag here"
|
|
45
45
|
}
|
|
@@ -48,120 +48,120 @@ const _ = (e, o, r, l, a) => {
|
|
|
48
48
|
}, B = ({
|
|
49
49
|
item: e,
|
|
50
50
|
level: o,
|
|
51
|
-
isCollapsed:
|
|
52
|
-
onToggle:
|
|
51
|
+
isCollapsed: t,
|
|
52
|
+
onToggle: c,
|
|
53
53
|
onToggleCollapse: a,
|
|
54
|
-
isAnyDragging:
|
|
54
|
+
isAnyDragging: n = !1,
|
|
55
55
|
isOver: h = !1,
|
|
56
56
|
isValidDrop: x = !1,
|
|
57
|
-
enableDragDrop:
|
|
57
|
+
enableDragDrop: v = !0,
|
|
58
58
|
enableCollapse: u = !0,
|
|
59
|
-
shouldBlink:
|
|
59
|
+
shouldBlink: g = !1
|
|
60
60
|
}) => {
|
|
61
|
-
const { t: m } = M(), f = e.category === "structure",
|
|
62
|
-
attributes:
|
|
63
|
-
listeners:
|
|
64
|
-
setNodeRef:
|
|
61
|
+
const { t: m } = M(), f = e.category === "structure", i = e.children && e.children.length > 0, k = L(() => !e.children || e.children.length === 0 || e.children.every((b) => b.checked) ? !1 : e.children.some((b) => b.checked), [e.children]), {
|
|
62
|
+
attributes: N,
|
|
63
|
+
listeners: C,
|
|
64
|
+
setNodeRef: y,
|
|
65
65
|
transform: I,
|
|
66
66
|
transition: S,
|
|
67
|
-
isDragging:
|
|
67
|
+
isDragging: l,
|
|
68
68
|
isOver: w
|
|
69
69
|
} = O({
|
|
70
70
|
id: e.id,
|
|
71
71
|
animateLayoutChanges: T,
|
|
72
72
|
data: {
|
|
73
73
|
level: o,
|
|
74
|
-
hasChildren:
|
|
75
|
-
isExpanded: !
|
|
74
|
+
hasChildren: i,
|
|
75
|
+
isExpanded: !t
|
|
76
76
|
},
|
|
77
77
|
disabled: f || e.disabled
|
|
78
78
|
});
|
|
79
79
|
if (f)
|
|
80
|
-
return /* @__PURE__ */
|
|
80
|
+
return /* @__PURE__ */ r(q, { item: e, isAnyDragging: n });
|
|
81
81
|
const R = h !== void 0 ? h : w, D = {
|
|
82
82
|
transform: j.Transform.toString(I),
|
|
83
83
|
transition: S,
|
|
84
|
-
opacity:
|
|
85
|
-
zIndex:
|
|
84
|
+
opacity: l ? 0.5 : 1,
|
|
85
|
+
zIndex: l ? 100 : "auto",
|
|
86
86
|
height: "auto"
|
|
87
87
|
};
|
|
88
|
-
return /* @__PURE__ */
|
|
88
|
+
return /* @__PURE__ */ r(
|
|
89
89
|
"div",
|
|
90
90
|
{
|
|
91
|
-
ref:
|
|
91
|
+
ref: y,
|
|
92
92
|
style: D,
|
|
93
93
|
className: "relative",
|
|
94
94
|
"data-item-id": e.id,
|
|
95
95
|
"data-level": o,
|
|
96
96
|
"data-checked": e.checked,
|
|
97
97
|
"data-disabled": e.disabled,
|
|
98
|
-
"data-collapsed":
|
|
98
|
+
"data-collapsed": t,
|
|
99
99
|
children: /* @__PURE__ */ p(
|
|
100
100
|
"div",
|
|
101
101
|
{
|
|
102
102
|
className: _(
|
|
103
|
-
|
|
103
|
+
l,
|
|
104
104
|
R,
|
|
105
|
-
|
|
105
|
+
n,
|
|
106
106
|
x,
|
|
107
|
-
|
|
107
|
+
g
|
|
108
108
|
),
|
|
109
109
|
style: {
|
|
110
110
|
paddingLeft: `${8 + o * 20}px`
|
|
111
111
|
},
|
|
112
112
|
children: [
|
|
113
|
-
u &&
|
|
113
|
+
u && i && /* @__PURE__ */ r(
|
|
114
114
|
"button",
|
|
115
115
|
{
|
|
116
116
|
type: "button",
|
|
117
|
-
onClick: (
|
|
118
|
-
|
|
117
|
+
onClick: (d) => {
|
|
118
|
+
d.stopPropagation(), a(e.id);
|
|
119
119
|
},
|
|
120
|
-
onMouseDown: (
|
|
121
|
-
className: "p-1 hover:bg-
|
|
122
|
-
"aria-label": m(
|
|
123
|
-
children: /* @__PURE__ */
|
|
120
|
+
onMouseDown: (d) => d.stopPropagation(),
|
|
121
|
+
className: "p-1 hover:bg-muted rounded-full transition-colors flex items-center text-content-icon hover:text-brand",
|
|
122
|
+
"aria-label": m(t ? "nestedList.expand" : "nestedList.collapse"),
|
|
123
|
+
children: /* @__PURE__ */ r(
|
|
124
124
|
H,
|
|
125
125
|
{
|
|
126
126
|
size: "16px",
|
|
127
|
-
className:
|
|
127
|
+
className: s("transition-transform", !t && "rotate-90")
|
|
128
128
|
}
|
|
129
129
|
)
|
|
130
130
|
}
|
|
131
131
|
),
|
|
132
|
-
(!u || !
|
|
133
|
-
/* @__PURE__ */
|
|
132
|
+
(!u || !i) && /* @__PURE__ */ r("div", { className: "w-4" }),
|
|
133
|
+
/* @__PURE__ */ r(
|
|
134
134
|
E,
|
|
135
135
|
{
|
|
136
136
|
id: `checkbox-${e.id}`,
|
|
137
|
-
checked:
|
|
138
|
-
onCheckedChange: () =>
|
|
137
|
+
checked: k ? "indeterminate" : e.checked,
|
|
138
|
+
onCheckedChange: () => c(e.id),
|
|
139
139
|
disabled: e.disabled
|
|
140
140
|
}
|
|
141
141
|
),
|
|
142
|
-
|
|
142
|
+
v && /* @__PURE__ */ r(
|
|
143
143
|
"div",
|
|
144
144
|
{
|
|
145
|
+
...N,
|
|
145
146
|
...C,
|
|
146
|
-
|
|
147
|
-
className: "cursor-grab active:cursor-grabbing p-0 hover:bg-gray-200 rounded flex items-center",
|
|
147
|
+
className: "cursor-grab active:cursor-grabbing p-0 hover:bg-muted rounded flex items-center",
|
|
148
148
|
style: {
|
|
149
149
|
pointerEvents: "auto",
|
|
150
150
|
position: "relative",
|
|
151
151
|
zIndex: 30,
|
|
152
152
|
touchAction: "none"
|
|
153
153
|
},
|
|
154
|
-
onPointerDown: (
|
|
155
|
-
|
|
154
|
+
onPointerDown: (d) => {
|
|
155
|
+
d.stopPropagation();
|
|
156
156
|
},
|
|
157
|
-
children: /* @__PURE__ */
|
|
157
|
+
children: /* @__PURE__ */ r(F, { size: "14px", className: "text-content-icon" })
|
|
158
158
|
}
|
|
159
159
|
),
|
|
160
|
-
/* @__PURE__ */
|
|
160
|
+
/* @__PURE__ */ r(
|
|
161
161
|
"label",
|
|
162
162
|
{
|
|
163
163
|
htmlFor: `checkbox-${e.id}`,
|
|
164
|
-
className: "flex-1 text-[13px] text-
|
|
164
|
+
className: "flex-1 text-[13px] text-content capitalize ml-1 cursor-pointer select-none",
|
|
165
165
|
children: e.label
|
|
166
166
|
}
|
|
167
167
|
)
|
|
@@ -1,88 +1,88 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
1
|
+
import { jsxs as p, jsx as i, Fragment as m } from "react/jsx-runtime";
|
|
2
|
+
import f from "react";
|
|
3
3
|
import { cn as a } from "../../../lib/utils.js";
|
|
4
4
|
import { Checkbox as u } from "../checkbox.js";
|
|
5
5
|
const y = ({
|
|
6
|
-
children:
|
|
6
|
+
children: n,
|
|
7
7
|
className: t,
|
|
8
8
|
read: o,
|
|
9
|
-
selected:
|
|
9
|
+
selected: e,
|
|
10
10
|
onSelect: c,
|
|
11
11
|
selectable: r,
|
|
12
12
|
...s
|
|
13
|
-
}) => /* @__PURE__ */
|
|
13
|
+
}) => /* @__PURE__ */ p(
|
|
14
14
|
"div",
|
|
15
15
|
{
|
|
16
16
|
"data-component": "notification-item",
|
|
17
17
|
"data-read": o ? "true" : "false",
|
|
18
18
|
className: a(
|
|
19
19
|
"group relative flex w-full gap-2 p-3 items-start rounded-xl transition-all border-l-[3px] border-transparent",
|
|
20
|
-
"bg-
|
|
21
|
-
!o && "border-
|
|
22
|
-
|
|
20
|
+
"bg-secondary",
|
|
21
|
+
!o && "border-brand",
|
|
22
|
+
e && "bg-brand-tint",
|
|
23
23
|
t
|
|
24
24
|
),
|
|
25
25
|
...s,
|
|
26
26
|
children: [
|
|
27
|
-
r && /* @__PURE__ */
|
|
27
|
+
r && /* @__PURE__ */ i("div", { className: a(
|
|
28
28
|
"absolute left-3 top-3 z-10 flex h-[30px] w-[30px] items-center justify-center transition-all duration-200",
|
|
29
|
-
|
|
30
|
-
), children: /* @__PURE__ */
|
|
29
|
+
e ? "opacity-100 scale-100" : "opacity-0 scale-90 group-hover:opacity-100 group-hover:scale-100"
|
|
30
|
+
), children: /* @__PURE__ */ i(
|
|
31
31
|
u,
|
|
32
32
|
{
|
|
33
|
-
checked:
|
|
33
|
+
checked: e,
|
|
34
34
|
onCheckedChange: c,
|
|
35
35
|
className: "translate-y-0"
|
|
36
36
|
}
|
|
37
37
|
) }),
|
|
38
|
-
/* @__PURE__ */
|
|
38
|
+
/* @__PURE__ */ i("div", { className: a(
|
|
39
39
|
"flex flex-1 min-w-0 gap-3",
|
|
40
40
|
r && "[&_[data-role=notification-icon]]:transition-opacity [&_[data-role=notification-icon]]:duration-200",
|
|
41
41
|
r && "group-hover:[&_[data-role=notification-icon]]:opacity-0",
|
|
42
|
-
r &&
|
|
43
|
-
), children:
|
|
42
|
+
r && e && "[&_[data-role=notification-icon]]:opacity-0"
|
|
43
|
+
), children: n })
|
|
44
44
|
]
|
|
45
45
|
}
|
|
46
|
-
),
|
|
47
|
-
const [c, r] =
|
|
48
|
-
return o ? /* @__PURE__ */
|
|
46
|
+
), b = ({ className: n, children: t, ...o }) => /* @__PURE__ */ i("div", { "data-role": "notification-icon", className: a("flex h-[30px] w-[30px] shrink-0 items-center justify-center rounded-full transition-opacity duration-200", n), ...o, children: t }), v = ({ className: n, children: t, ...o }) => /* @__PURE__ */ i("div", { className: a("flex flex-col flex-1 min-w-0 gap-1", n), ...o, children: t }), k = ({ className: n, children: t, ml: o, ...e }) => /* @__PURE__ */ i("h4", { className: a("text-sm font-bold text-content leading-snug break-words", o && "ml-2", n), ...e, children: t }), w = ({ className: n, children: t, isTime: o, ...e }) => {
|
|
47
|
+
const [c, r] = f.useState(!1), s = typeof t == "string" ? t : "", l = !o && s.length > 150;
|
|
48
|
+
return o ? /* @__PURE__ */ i("p", { className: a("text-xs text-content-badge mt-0.5", n), ...e, children: t }) : /* @__PURE__ */ i("div", { className: a("text-sm font-medium text-content break-words leading-5", n), children: /* @__PURE__ */ p("p", { ...e, children: [
|
|
49
49
|
l && !c ? `${s.slice(0, 150)}` : t,
|
|
50
|
-
l && !c && /* @__PURE__ */
|
|
50
|
+
l && !c && /* @__PURE__ */ p(m, { children: [
|
|
51
51
|
"... ",
|
|
52
|
-
/* @__PURE__ */
|
|
52
|
+
/* @__PURE__ */ i(
|
|
53
53
|
"span",
|
|
54
54
|
{
|
|
55
55
|
role: "button",
|
|
56
|
-
onClick: (
|
|
57
|
-
|
|
56
|
+
onClick: (d) => {
|
|
57
|
+
d.stopPropagation(), r(!0);
|
|
58
58
|
},
|
|
59
|
-
className: "text-
|
|
59
|
+
className: "text-brand hover:underline cursor-pointer ml-1",
|
|
60
60
|
children: "Read More"
|
|
61
61
|
}
|
|
62
62
|
)
|
|
63
63
|
] }),
|
|
64
|
-
l && c && /* @__PURE__ */
|
|
64
|
+
l && c && /* @__PURE__ */ i(
|
|
65
65
|
"span",
|
|
66
66
|
{
|
|
67
67
|
role: "button",
|
|
68
|
-
onClick: (
|
|
69
|
-
|
|
68
|
+
onClick: (d) => {
|
|
69
|
+
d.stopPropagation(), r(!1);
|
|
70
70
|
},
|
|
71
|
-
className: "text-
|
|
71
|
+
className: "text-brand hover:underline cursor-pointer ml-1",
|
|
72
72
|
children: "Show Less"
|
|
73
73
|
}
|
|
74
74
|
)
|
|
75
75
|
] }) });
|
|
76
|
-
}, I = ({ className:
|
|
76
|
+
}, I = ({ className: n, children: t, alwaysVisible: o = !0, ...e }) => /* @__PURE__ */ i("div", { className: a(
|
|
77
77
|
"flex items-center gap-1 shrink-0 ml-2 self-start transition-opacity focus-within:opacity-100",
|
|
78
78
|
!o && "opacity-0 group-hover:opacity-100",
|
|
79
|
-
|
|
80
|
-
), ...
|
|
79
|
+
n
|
|
80
|
+
), ...e, children: t });
|
|
81
81
|
export {
|
|
82
82
|
y as NotificationItem,
|
|
83
83
|
I as NotificationItemActions,
|
|
84
|
-
|
|
84
|
+
v as NotificationItemContent,
|
|
85
85
|
w as NotificationItemDescription,
|
|
86
|
-
|
|
86
|
+
b as NotificationItemIcon,
|
|
87
87
|
k as NotificationItemTitle
|
|
88
88
|
};
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { cn as
|
|
1
|
+
import { jsxs as c, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import p, { useRef as d, useEffect as x } from "react";
|
|
3
|
+
import { cn as i } from "../../../lib/utils.js";
|
|
4
4
|
import { Loader2 as h } from "lucide-react";
|
|
5
|
-
import { MulticolorBell as
|
|
6
|
-
const E = ({ className: t, ...r }) => /* @__PURE__ */
|
|
7
|
-
/* @__PURE__ */ e(
|
|
8
|
-
/* @__PURE__ */
|
|
9
|
-
/* @__PURE__ */ e("h3", { className: "text-xl font-bold text-
|
|
10
|
-
/* @__PURE__ */ e("p", { className: "text-sm text-
|
|
5
|
+
import { MulticolorBell as v } from "../../../icons/index.js";
|
|
6
|
+
const E = ({ className: t, ...r }) => /* @__PURE__ */ c("div", { className: i("flex flex-col gap-4 items-center justify-center h-full text-center p-8", t), ...r, children: [
|
|
7
|
+
/* @__PURE__ */ e(v, { size: 72 }),
|
|
8
|
+
/* @__PURE__ */ c("div", { children: [
|
|
9
|
+
/* @__PURE__ */ e("h3", { className: "text-xl font-bold text-content", children: "Everything looks quiet for now" }),
|
|
10
|
+
/* @__PURE__ */ e("p", { className: "text-sm text-navigation-muted", children: "We'll notify you when something new comes up" })
|
|
11
11
|
] })
|
|
12
12
|
] }), j = ({
|
|
13
13
|
children: t,
|
|
14
14
|
className: r,
|
|
15
|
-
onLoadMore:
|
|
16
|
-
isLoading:
|
|
15
|
+
onLoadMore: l,
|
|
16
|
+
isLoading: o,
|
|
17
17
|
hasMore: s,
|
|
18
|
-
loader:
|
|
19
|
-
emptyState:
|
|
18
|
+
loader: m,
|
|
19
|
+
emptyState: a
|
|
20
20
|
}) => {
|
|
21
|
-
const
|
|
21
|
+
const n = d(null);
|
|
22
22
|
return x(() => {
|
|
23
|
-
const
|
|
24
|
-
(
|
|
25
|
-
|
|
23
|
+
const f = new IntersectionObserver(
|
|
24
|
+
(u) => {
|
|
25
|
+
u[0].isIntersecting && s && !o && l && l();
|
|
26
26
|
},
|
|
27
27
|
{ threshold: 0.1 }
|
|
28
28
|
);
|
|
29
|
-
return
|
|
30
|
-
|
|
29
|
+
return n.current && f.observe(n.current), () => {
|
|
30
|
+
n.current && f.unobserve(n.current);
|
|
31
31
|
};
|
|
32
|
-
}, [s,
|
|
32
|
+
}, [s, o, l]), p.Children.count(t) === 0 && !o && a ? /* @__PURE__ */ e("div", { className: "h-full w-full", children: a }) : /* @__PURE__ */ c("div", { className: i("flex flex-1 flex-col overflow-y-auto min-h-0", r), children: [
|
|
33
33
|
/* @__PURE__ */ e("div", { className: "flex flex-col gap-2 p-2", children: t }),
|
|
34
|
-
/* @__PURE__ */ e("div", { ref:
|
|
35
|
-
|
|
34
|
+
/* @__PURE__ */ e("div", { ref: n, className: "h-4 w-full flex-shrink-0" }),
|
|
35
|
+
o && /* @__PURE__ */ e("div", { className: "flex justify-center p-4", children: m || /* @__PURE__ */ e(h, { className: "h-6 w-6 animate-spin text-content-muted" }) })
|
|
36
36
|
] });
|
|
37
|
-
}, z = ({ label: t, children: r, className:
|
|
38
|
-
/* @__PURE__ */ e("div", { "data-component": "notification-group-label", className: "sticky top-0 z-10 bg-
|
|
37
|
+
}, z = ({ label: t, children: r, className: l }) => /* @__PURE__ */ c("div", { "data-component": "notification-group", className: i("flex flex-col", l), children: [
|
|
38
|
+
/* @__PURE__ */ e("div", { "data-component": "notification-group-label", className: "sticky top-0 z-10 bg-canvas/95 backdrop-blur supports-[backdrop-filter]:bg-canvas/60 px-4 py-2 text-sm font-medium text-content-muted border-b border-stroke/50", children: t }),
|
|
39
39
|
/* @__PURE__ */ e("div", { className: "flex flex-col gap-2 p-2", children: r })
|
|
40
40
|
] });
|
|
41
41
|
export {
|
|
@@ -1,65 +1,65 @@
|
|
|
1
1
|
import { jsx as e, jsxs as a } from "react/jsx-runtime";
|
|
2
|
-
import { useContext as m, createContext as
|
|
3
|
-
import { Sheet as
|
|
2
|
+
import { useContext as m, createContext as p } from "react";
|
|
3
|
+
import { Sheet as h, SheetContent as x, SheetDescription as u, SheetTitle as v, SheetClose as N } from "../sheet.js";
|
|
4
4
|
import { Button as b } from "../button.js";
|
|
5
|
-
import { Bell as
|
|
6
|
-
import { cn as
|
|
5
|
+
import { Bell as w, X as g } from "lucide-react";
|
|
6
|
+
import { cn as c } from "../../../lib/utils.js";
|
|
7
7
|
import { useImpactNovaI18n as s } from "../../../i18n/ImpactNovaI18nContext.js";
|
|
8
|
-
const d =
|
|
8
|
+
const d = p(null), I = () => {
|
|
9
9
|
const t = m(d);
|
|
10
10
|
if (!t)
|
|
11
11
|
throw new Error("useNotificationContext must be used within a NotificationPanel");
|
|
12
12
|
return t;
|
|
13
|
-
},
|
|
13
|
+
}, k = ({
|
|
14
14
|
open: t,
|
|
15
15
|
onOpenChange: n,
|
|
16
|
-
children:
|
|
16
|
+
children: i,
|
|
17
17
|
className: l,
|
|
18
|
-
preventClose:
|
|
18
|
+
preventClose: o = !1
|
|
19
19
|
}) => {
|
|
20
20
|
const { t: f } = s();
|
|
21
21
|
return /* @__PURE__ */ e(d.Provider, { value: { setPreventClose: () => {
|
|
22
|
-
} }, children: /* @__PURE__ */ e(
|
|
22
|
+
} }, children: /* @__PURE__ */ e(h, { open: t, onOpenChange: n, children: /* @__PURE__ */ a(
|
|
23
23
|
x,
|
|
24
24
|
{
|
|
25
25
|
side: "right",
|
|
26
|
-
className:
|
|
27
|
-
"w-full !max-w-[640px] p-0 sm:!max-w-[640px] gap-0 border-l shadow-xl transition-all duration-300 ease-in-out bg-
|
|
26
|
+
className: c(
|
|
27
|
+
"w-full !max-w-[640px] p-0 sm:!max-w-[640px] gap-0 border-l shadow-xl transition-all duration-300 ease-in-out bg-canvas-elevated",
|
|
28
28
|
l
|
|
29
29
|
),
|
|
30
|
-
onInteractOutside: (
|
|
31
|
-
|
|
30
|
+
onInteractOutside: (r) => {
|
|
31
|
+
o && r.preventDefault();
|
|
32
32
|
},
|
|
33
|
-
onEscapeKeyDown: (
|
|
34
|
-
|
|
33
|
+
onEscapeKeyDown: (r) => {
|
|
34
|
+
o && r.preventDefault();
|
|
35
35
|
},
|
|
36
36
|
children: [
|
|
37
37
|
/* @__PURE__ */ e(u, { className: "sr-only", children: f("notificationPanel.description") }),
|
|
38
|
-
|
|
38
|
+
i
|
|
39
39
|
]
|
|
40
40
|
}
|
|
41
41
|
) }) });
|
|
42
|
-
}, E = ({ children: t, className: n }) => /* @__PURE__ */ e("div", { "data-component": "notification-panel-content", className:
|
|
43
|
-
const { t: l } = s(),
|
|
44
|
-
return /* @__PURE__ */ a("div", { "data-component": "notification-panel-header", className:
|
|
42
|
+
}, E = ({ children: t, className: n }) => /* @__PURE__ */ e("div", { "data-component": "notification-panel-content", className: c("flex h-full flex-col bg-canvas-elevated", n), children: t }), T = ({ title: t, children: n, className: i }) => {
|
|
43
|
+
const { t: l } = s(), o = t ?? l("notificationPanel.title");
|
|
44
|
+
return /* @__PURE__ */ a("div", { "data-component": "notification-panel-header", className: c("flex shrink-0 items-center justify-between border-b px-4 py-3 bg-canvas-elevated", i), children: [
|
|
45
45
|
/* @__PURE__ */ a("div", { className: "flex items-center gap-3", children: [
|
|
46
|
-
/* @__PURE__ */ e("div", { className: "flex h-6 w-6 items-center justify-center", children: /* @__PURE__ */ e(
|
|
47
|
-
typeof
|
|
46
|
+
/* @__PURE__ */ e("div", { className: "flex h-6 w-6 items-center justify-center", children: /* @__PURE__ */ e(w, { className: "h-5 w-5 text-content-muted" }) }),
|
|
47
|
+
typeof o == "string" ? /* @__PURE__ */ e(v, { className: "text-lg font-bold text-content", children: o }) : o
|
|
48
48
|
] }),
|
|
49
49
|
/* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
|
|
50
50
|
n,
|
|
51
|
-
/* @__PURE__ */ e(
|
|
51
|
+
/* @__PURE__ */ e(N, { asChild: !0, children: /* @__PURE__ */ e(b, { variant: "secondary", size: "icon", "aria-label": l("aria.close"), "data-component": "notification-panel-close", children: /* @__PURE__ */ e(g, { className: "h-4 w-4" }) }) })
|
|
52
52
|
] })
|
|
53
53
|
] });
|
|
54
|
-
}, z = ({ children: t, className: n }) => /* @__PURE__ */ e("div", { "data-component": "notification-panel-body", className:
|
|
55
|
-
/* @__PURE__ */ e("div", { children:
|
|
54
|
+
}, z = ({ children: t, className: n }) => /* @__PURE__ */ e("div", { "data-component": "notification-panel-body", className: c("flex flex-1 flex-col overflow-hidden bg-canvas", n), children: t }), F = ({ children: t, className: n, leftAction: i }) => /* @__PURE__ */ a("div", { "data-component": "notification-panel-footer", className: c("flex items-center justify-between border-t p-4 bg-canvas-elevated shrink-0 mt-auto shadow-md", n), children: [
|
|
55
|
+
/* @__PURE__ */ e("div", { children: i }),
|
|
56
56
|
/* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: t })
|
|
57
57
|
] });
|
|
58
58
|
export {
|
|
59
|
-
|
|
59
|
+
k as NotificationPanel,
|
|
60
60
|
z as NotificationPanelBody,
|
|
61
61
|
E as NotificationPanelContent,
|
|
62
62
|
F as NotificationPanelFooter,
|
|
63
63
|
T as NotificationPanelHeader,
|
|
64
|
-
|
|
64
|
+
I as useNotificationContext
|
|
65
65
|
};
|
|
@@ -2,9 +2,9 @@ import { jsx as t, jsxs as d } from "react/jsx-runtime";
|
|
|
2
2
|
import * as l from "react";
|
|
3
3
|
import * as a from "@radix-ui/react-popover";
|
|
4
4
|
import { X as p } from "lucide-react";
|
|
5
|
-
import { Tooltip as
|
|
5
|
+
import { Tooltip as c, TooltipTrigger as m, TooltipContent as v } from "./tooltip.js";
|
|
6
6
|
import { cn as r } from "../../lib/utils.js";
|
|
7
|
-
import { useImpactNovaI18n as
|
|
7
|
+
import { useImpactNovaI18n as f } from "../../i18n/ImpactNovaI18nContext.js";
|
|
8
8
|
const j = a.Root, R = a.Trigger, z = a.Anchor, h = l.forwardRef(({ className: e, align: o = "center", sideOffset: i = 4, ...s }, n) => /* @__PURE__ */ t(a.Portal, { children: /* @__PURE__ */ t(
|
|
9
9
|
a.Content,
|
|
10
10
|
{
|
|
@@ -13,14 +13,14 @@ const j = a.Root, R = a.Trigger, z = a.Anchor, h = l.forwardRef(({ className: e,
|
|
|
13
13
|
sideOffset: i,
|
|
14
14
|
"data-component": "popover-content",
|
|
15
15
|
className: r(
|
|
16
|
-
"z-50 min-w-[240px] rounded-xl border bg-
|
|
16
|
+
"z-50 min-w-[240px] rounded-xl border bg-canvas-overlay p-3 text-canvas-overlay-foreground shadow-md outline-none overflow-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-popover-content-transform-origin] pointer-events-auto",
|
|
17
17
|
e
|
|
18
18
|
),
|
|
19
19
|
...s
|
|
20
20
|
}
|
|
21
21
|
) }));
|
|
22
22
|
h.displayName = a.Content.displayName;
|
|
23
|
-
const
|
|
23
|
+
const y = ({
|
|
24
24
|
className: e,
|
|
25
25
|
...o
|
|
26
26
|
}) => /* @__PURE__ */ t(
|
|
@@ -30,8 +30,8 @@ const N = ({
|
|
|
30
30
|
...o
|
|
31
31
|
}
|
|
32
32
|
);
|
|
33
|
-
|
|
34
|
-
const
|
|
33
|
+
y.displayName = "PopoverHeader";
|
|
34
|
+
const N = ({
|
|
35
35
|
className: e,
|
|
36
36
|
...o
|
|
37
37
|
}) => /* @__PURE__ */ t(
|
|
@@ -39,17 +39,17 @@ const g = ({
|
|
|
39
39
|
{
|
|
40
40
|
"data-component": "popover-title",
|
|
41
41
|
className: r(
|
|
42
|
-
"text-[16px] font-extrabold leading-none text-
|
|
42
|
+
"text-[16px] font-extrabold leading-none text-content",
|
|
43
43
|
e
|
|
44
44
|
),
|
|
45
45
|
...o
|
|
46
46
|
}
|
|
47
47
|
);
|
|
48
|
-
|
|
49
|
-
const
|
|
50
|
-
const { t: s } =
|
|
51
|
-
return /* @__PURE__ */ d(
|
|
52
|
-
/* @__PURE__ */ t(
|
|
48
|
+
N.displayName = "PopoverTitle";
|
|
49
|
+
const g = l.forwardRef(({ className: e, ...o }, i) => {
|
|
50
|
+
const { t: s } = f(), n = s("aria.close");
|
|
51
|
+
return /* @__PURE__ */ d(c, { children: [
|
|
52
|
+
/* @__PURE__ */ t(m, { asChild: !0, children: /* @__PURE__ */ d(
|
|
53
53
|
a.Close,
|
|
54
54
|
{
|
|
55
55
|
ref: i,
|
|
@@ -61,36 +61,36 @@ const x = l.forwardRef(({ className: e, ...o }, i) => {
|
|
|
61
61
|
"aria-label": n,
|
|
62
62
|
...o,
|
|
63
63
|
children: [
|
|
64
|
-
/* @__PURE__ */ t(p, { className: "h-4 w-4 text-
|
|
64
|
+
/* @__PURE__ */ t(p, { className: "h-4 w-4 text-content-tertiary" }),
|
|
65
65
|
/* @__PURE__ */ t("span", { className: "sr-only", children: n })
|
|
66
66
|
]
|
|
67
67
|
}
|
|
68
68
|
) }),
|
|
69
|
-
/* @__PURE__ */ t(
|
|
69
|
+
/* @__PURE__ */ t(v, { variant: "tertiary", side: "top", children: n })
|
|
70
70
|
] });
|
|
71
71
|
});
|
|
72
|
-
|
|
73
|
-
const
|
|
72
|
+
g.displayName = a.Close.displayName;
|
|
73
|
+
const x = ({
|
|
74
74
|
className: e,
|
|
75
75
|
...o
|
|
76
76
|
}) => /* @__PURE__ */ t("div", { className: r("text-sm", e), ...o });
|
|
77
|
-
|
|
77
|
+
x.displayName = "PopoverBody";
|
|
78
78
|
const u = ({
|
|
79
79
|
className: e,
|
|
80
80
|
...o
|
|
81
81
|
}) => /* @__PURE__ */ d("div", { className: r("mt-4 flex flex-col gap-3", e), ...o, children: [
|
|
82
|
-
/* @__PURE__ */ t("div", { className: "h-[1px] w-full bg-
|
|
82
|
+
/* @__PURE__ */ t("div", { className: "h-[1px] w-full bg-stroke-hairline" }),
|
|
83
83
|
/* @__PURE__ */ t("div", { className: "flex justify-end gap-2", children: o.children })
|
|
84
84
|
] });
|
|
85
85
|
u.displayName = "PopoverFooter";
|
|
86
86
|
export {
|
|
87
87
|
j as Popover,
|
|
88
88
|
z as PopoverAnchor,
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
x as PopoverBody,
|
|
90
|
+
g as PopoverClose,
|
|
91
91
|
h as PopoverContent,
|
|
92
92
|
u as PopoverFooter,
|
|
93
|
-
|
|
94
|
-
|
|
93
|
+
y as PopoverHeader,
|
|
94
|
+
N as PopoverTitle,
|
|
95
95
|
R as PopoverTrigger
|
|
96
96
|
};
|