impact-nova 2.1.0-alpha.4 → 2.1.0-alpha.6
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/data/ag-grid-react/ag-grid-tooltip-overflow.d.ts +3 -0
- package/dist/components/data/ag-grid-react/ag-grid-tooltip-overflow.js +6 -0
- package/dist/components/data/ag-grid-react/ag-grid.types.d.ts +15 -21
- package/dist/components/data/ag-grid-react/cell-renderers/date-display-renderer.js +1 -1
- package/dist/components/data/ag-grid-react/cell-renderers/default-text-cell-renderer.d.ts +1 -2
- package/dist/components/data/ag-grid-react/cell-renderers/default-text-cell-renderer.js +12 -6
- package/dist/components/data/ag-grid-react/cell-renderers/editors/textarea-cell-editor.js +19 -19
- package/dist/components/data/ag-grid-react/cell-renderers/select-display-renderer.js +1 -1
- package/dist/components/data/ag-grid-react/cell-renderers/switch-display-renderer.js +15 -15
- package/dist/components/data/ag-grid-react/headers/advanced-filter/advanced-filter-dialog.js +1 -1
- package/dist/components/data/ag-grid-react/headers/advanced-filter/column-filter-section.js +33 -33
- package/dist/components/data/ag-grid-react/headers/components/header-info.js +66 -62
- package/dist/components/data/ag-grid-react/headers/components/info-modal.js +6 -6
- package/dist/components/data/ag-grid-react/headers/components/section-renderers.js +18 -18
- package/dist/components/data/ag-grid-react/headers/custom-header-group.js +40 -29
- package/dist/components/data/ag-grid-react/headers/custom-header.js +102 -98
- package/dist/components/data/ag-grid-react/index.d.ts +1 -1
- package/dist/components/data/ag-grid-react/index.js +136 -127
- package/dist/components/data/ag-grid-react/notify-column-indicator-sync.d.ts +7 -0
- package/dist/components/data/ag-grid-react/notify-column-indicator-sync.js +6 -0
- package/dist/components/data/ag-grid-react/theme.js +8 -4
- package/dist/components/data/ag-grid-react/use-ag-grid-truncation-tooltip.d.ts +5 -0
- package/dist/components/data/ag-grid-react/use-ag-grid-truncation-tooltip.js +13 -0
- package/dist/components/data/ag-grid-react/useGridAutoSizeStrategyOnResize.js +8 -5
- package/dist/components/data/data-table/build-column-tree-from-grid.d.ts +14 -0
- package/dist/components/data/data-table/build-column-tree-from-grid.js +95 -0
- package/dist/components/data/data-table/data-table-column-apply.d.ts +29 -0
- package/dist/components/data/data-table/data-table-column-apply.js +102 -0
- package/dist/components/data/data-table/data-table-column-def-pin.d.ts +25 -0
- package/dist/components/data/data-table/data-table-column-def-pin.js +66 -0
- package/dist/components/data/data-table/data-table-column-list-sync.d.ts +8 -0
- package/dist/components/data/data-table/data-table-column-list-sync.js +15 -0
- package/dist/components/data/data-table/data-table-column-list.d.ts +14 -4
- package/dist/components/data/data-table/data-table-column-list.js +74 -277
- package/dist/components/data/data-table/data-table-constants.d.ts +3 -4
- package/dist/components/data/data-table/data-table-context.d.ts +3 -6
- package/dist/components/data/data-table/data-table-context.js +21 -10
- package/dist/components/data/data-table/data-table-saved-views.js +26 -26
- package/dist/components/data/data-table/data-table-sheet-portal-store.d.ts +13 -0
- package/dist/components/data/data-table/data-table-sheet-portal-store.js +36 -0
- package/dist/components/data/data-table/data-table-sheet.d.ts +3 -6
- package/dist/components/data/data-table/data-table-sheet.js +4 -2
- package/dist/components/data/data-table/data-table-view-menu.js +40 -40
- package/dist/components/data/data-table/data-table.d.ts +8 -10
- package/dist/components/data/data-table/data-table.js +138 -111
- package/dist/components/data/data-table/data-table.types.d.ts +35 -0
- package/dist/components/data/data-table/index.js +28 -27
- package/dist/components/data/data-table/indicator-legend.js +6 -6
- package/dist/components/data/data-table/use-data-table-column-list-sync.d.ts +16 -0
- package/dist/components/data/data-table/use-data-table-column-list-sync.js +222 -0
- package/dist/components/data/expandable-list-item/expandable-list-item-attributes.d.ts +8 -0
- package/dist/components/data/expandable-list-item/expandable-list-item-attributes.js +72 -0
- package/dist/components/data/expandable-list-item/expandable-list-item-context.d.ts +13 -0
- package/dist/components/data/expandable-list-item/expandable-list-item-context.js +25 -0
- package/dist/components/data/expandable-list-item/expandable-list-item-metrics.d.ts +6 -0
- package/dist/components/data/expandable-list-item/expandable-list-item-metrics.js +41 -0
- package/dist/components/data/expandable-list-item/expandable-list-item-parts.d.ts +31 -0
- package/dist/components/data/expandable-list-item/expandable-list-item-parts.js +233 -0
- package/dist/components/data/expandable-list-item/expandable-list-item-preset.d.ts +18 -0
- package/dist/components/data/expandable-list-item/expandable-list-item-preset.js +133 -0
- package/dist/components/data/expandable-list-item/expandable-list-item.d.ts +5 -0
- package/dist/components/data/{expandable-sku/expandable-sku.types.d.ts → expandable-list-item/expandable-list-item.types.d.ts} +7 -7
- package/dist/components/data/expandable-list-item/index.d.ts +5 -0
- package/dist/components/data/expandable-list-item/index.js +19 -0
- package/dist/components/data/nested-list/components/NestedListHeader.js +11 -11
- package/dist/components/data/nested-list/components/SortableItem.js +2 -2
- package/dist/components/data-display/avatar/avatar.types.d.ts +2 -0
- package/dist/components/data-display/badge/badge.types.d.ts +2 -0
- package/dist/components/data-display/calendar/calendar-day-picker-classnames.js +11 -11
- package/dist/components/data-display/calendar/calendar-month-picker-panel.js +7 -7
- package/dist/components/data-display/calendar/calendar-week-number-cell.js +31 -31
- package/dist/components/data-display/card/card.js +8 -8
- package/dist/components/data-display/chart/chart.types.d.ts +9 -0
- package/dist/components/data-display/skeleton/skeleton.js +6 -6
- package/dist/components/data-display/statistics-card/statistics-card.js +14 -14
- package/dist/components/feedback/alert-dialog/alert-dialog.js +19 -19
- package/dist/components/feedback/dialog/dialog.js +1 -1
- package/dist/components/feedback/drawer/drawer.js +18 -18
- package/dist/components/feedback/dropdown-menu/dropdown-menu.js +70 -57
- package/dist/components/feedback/popover/popover.js +1 -1
- package/dist/components/feedback/sheet/sheet.js +1 -1
- package/dist/components/feedback/tooltip/tooltip.js +22 -22
- package/dist/components/feedback/tooltip/tooltip.variants.js +1 -1
- package/dist/components/flows/command-palette/command-palette.js +104 -104
- package/dist/components/flows/command-palette/shortcut-settings.js +34 -34
- package/dist/components/flows/filter-strip/filter-tag-list.js +4 -4
- package/dist/components/flows/notification-panel/notification-list.js +17 -17
- package/dist/components/flows/notification-panel/notification-panel.js +4 -4
- package/dist/components/flows/notification-panel/notification-panel.types.d.ts +3 -0
- package/dist/components/flows/wizard/wizard.js +8 -8
- package/dist/components/forms/combobox/combobox.js +20 -20
- package/dist/components/forms/date-picker/date-picker.js +17 -17
- package/dist/components/forms/date-picker/date-range-picker.js +3 -3
- package/dist/components/forms/date-picker/month-picker.js +1 -1
- package/dist/components/forms/date-picker/month-range-picker.js +42 -42
- package/dist/components/forms/date-picker/week-picker.js +15 -15
- package/dist/components/forms/date-picker/week-range-picker.js +3 -3
- package/dist/components/forms/file-upload/file-upload.js +33 -33
- package/dist/components/forms/input/input.js +8 -8
- package/dist/components/forms/input/input.variants.js +3 -3
- package/dist/components/forms/select/components/SelectMenuPanel.d.ts +1 -2
- package/dist/components/forms/select/components/SelectMenuPanel.js +18 -20
- package/dist/components/forms/select/components/SelectTrigger.d.ts +9 -6
- package/dist/components/forms/select/components/SelectTrigger.js +120 -122
- package/dist/components/forms/select/components/Submenu.js +8 -8
- package/dist/components/forms/select/hooks/useSelectKeyboardHandlers.d.ts +1 -1
- package/dist/components/forms/select/hooks/useSelectValueState.d.ts +19 -0
- package/dist/components/forms/select/hooks/useSelectValueState.js +41 -0
- package/dist/components/forms/select/index.js +4 -3
- package/dist/components/forms/select/select.js +180 -175
- package/dist/components/forms/select/select.types.d.ts +3 -2
- package/dist/components/forms/select/select.variants.js +4 -4
- package/dist/components/forms/select/utils/select.d.ts +2 -1
- package/dist/components/forms/select/utils/select.js +47 -37
- package/dist/components/layout/sidebar/sidebar.d.ts +7 -50
- package/dist/components/layout/sidebar/sidebar.js +12 -11
- package/dist/components/layout/sidebar/sidebar.types.d.ts +35 -1
- package/dist/components/primitives/button-group/button-group.js +32 -32
- package/dist/components/primitives/chips/chips.variants.js +5 -5
- package/dist/components/primitives/empty-container/empty-container.types.d.ts +3 -0
- package/dist/components/primitives/kbd/kbd.variants.js +3 -3
- package/dist/components/primitives/stepper/stepper.js +6 -6
- package/dist/impact-nova-components.css +113 -7
- package/dist/impact-nova-tokens.scss +2 -4
- package/dist/impact-nova.css +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +467 -433
- package/dist/lib/compose-refs.d.ts +8 -0
- package/dist/lib/compose-refs.js +14 -0
- package/dist/lib/primitives/field.types.d.ts +8 -2
- package/dist/lib/virtualized/index.d.ts +3 -0
- package/dist/lib/virtualized/index.js +33 -16
- package/dist/lib/virtualized/useVirtualizedList.d.ts +2 -0
- package/dist/lib/virtualized/useVirtualizedList.js +115 -109
- package/dist/lib/virtualized/virtualized-list-context.d.ts +12 -0
- package/dist/lib/virtualized/virtualized-list-context.js +21 -0
- package/dist/lib/virtualized/virtualized-list-parts.d.ts +51 -0
- package/dist/lib/virtualized/virtualized-list-parts.js +175 -0
- package/dist/lib/virtualized/virtualized-list-utils.d.ts +5 -0
- package/dist/lib/virtualized/virtualized-list-utils.js +6 -0
- package/dist/llms/rules/ag-grid.js +1 -1
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/migration.js +1 -1
- package/dist/llms/rules/real-world-patterns.js +1 -1
- package/dist/llms/rules/requirements.js +1 -1
- package/package.json +24 -15
- package/tailwind.config.js +1 -0
- package/dist/components/data/ag-grid-react/headers/components/truncated-text.d.ts +0 -15
- package/dist/components/data/ag-grid-react/headers/components/truncated-text.js +0 -27
- package/dist/components/data/expandable-sku/expandable-sku.d.ts +0 -38
- package/dist/components/data/expandable-sku/expandable-sku.js +0 -245
- package/dist/components/data/expandable-sku/index.d.ts +0 -2
- package/dist/components/data/expandable-sku/index.js +0 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as r, jsxs as h, Fragment as j } from "react/jsx-runtime";
|
|
2
|
-
import * as
|
|
2
|
+
import * as i from "react";
|
|
3
3
|
import { Person as z, Monitor as G, PriorityAlert as U, Locked as T, Reset as q } from "impact-nova-icons";
|
|
4
4
|
import { cn as p } from "../../../lib/utils.js";
|
|
5
5
|
import { ModuleRegistry as B, AllCommunityModule as $ } from "ag-grid-community";
|
|
@@ -15,17 +15,17 @@ B.registerModules([$, H]);
|
|
|
15
15
|
function te(a) {
|
|
16
16
|
const t = a.data;
|
|
17
17
|
return t ? /* @__PURE__ */ h("div", { className: "flex items-center gap-2 min-w-0 h-full", children: [
|
|
18
|
-
!t.customisable && /* @__PURE__ */ r(T, { className: "h-3 w-3 text-
|
|
18
|
+
!t.customisable && /* @__PURE__ */ r(T, { className: "h-3 w-3 text-secondary-foreground shrink-0" }),
|
|
19
19
|
/* @__PURE__ */ h("div", { className: "flex flex-col min-w-0 gap-0", children: [
|
|
20
20
|
/* @__PURE__ */ r("span", { className: "truncate font-medium text-content-charcoal text-xs leading-tight", children: t.command }),
|
|
21
|
-
t.description && /* @__PURE__ */ r("span", { className: "truncate text-[10px] text-
|
|
21
|
+
t.description && /* @__PURE__ */ r("span", { className: "truncate text-[10px] text-secondary-foreground leading-tight", children: t.description })
|
|
22
22
|
] })
|
|
23
23
|
] }) : null;
|
|
24
24
|
}
|
|
25
25
|
function re(a) {
|
|
26
26
|
const t = a.data;
|
|
27
27
|
if (!t) return null;
|
|
28
|
-
const
|
|
28
|
+
const d = a.recordingCommandId === t.id;
|
|
29
29
|
return /* @__PURE__ */ r("div", { className: p(
|
|
30
30
|
"w-full h-full flex items-center ag-cell-inner-padding",
|
|
31
31
|
t.customisable ? "in-ag-editable-cell-highlight" : ""
|
|
@@ -35,9 +35,9 @@ function re(a) {
|
|
|
35
35
|
className: p(
|
|
36
36
|
"flex items-center justify-between w-full h-7 rounded-[8px] px-1.5 group/row relative",
|
|
37
37
|
t.customisable ? "bg-canvas-elevated" : "bg-transparent",
|
|
38
|
-
|
|
38
|
+
d && "ring-1 ring-brand border border-brand"
|
|
39
39
|
),
|
|
40
|
-
children:
|
|
40
|
+
children: d ? /* @__PURE__ */ r("span", { className: "text-xs text-brand font-medium animate-pulse motion-reduce:animate-none", children: a.recordingLabel ?? "Press desired shortcut..." }) : /* @__PURE__ */ h(j, { children: [
|
|
41
41
|
t.keybinding ? /* @__PURE__ */ r(
|
|
42
42
|
"button",
|
|
43
43
|
{
|
|
@@ -59,11 +59,11 @@ function re(a) {
|
|
|
59
59
|
onClick: (o) => {
|
|
60
60
|
o.stopPropagation(), a.onStartRecording(t.id);
|
|
61
61
|
},
|
|
62
|
-
className: "flex items-center justify-end h-full w-full text-xs text-
|
|
62
|
+
className: "flex items-center justify-end h-full w-full text-xs text-secondary-foreground hover:text-brand transition-colors cursor-pointer text-end",
|
|
63
63
|
children: a.addShortcutLabel ?? "Add shortcut"
|
|
64
64
|
}
|
|
65
65
|
) : /* @__PURE__ */ r("span", { className: "text-xs text-transparent", children: "--" }),
|
|
66
|
-
t.hasOverride && t.customisable && !
|
|
66
|
+
t.hasOverride && t.customisable && !d && /* @__PURE__ */ r(
|
|
67
67
|
"button",
|
|
68
68
|
{
|
|
69
69
|
type: "button",
|
|
@@ -81,15 +81,15 @@ function re(a) {
|
|
|
81
81
|
}
|
|
82
82
|
function ne(a) {
|
|
83
83
|
const t = a.data;
|
|
84
|
-
return t ? /* @__PURE__ */ r("div", { className: "flex items-center h-full", children: /* @__PURE__ */ r("span", { className: "text-xs text-
|
|
84
|
+
return t ? /* @__PURE__ */ r("div", { className: "flex items-center h-full", children: /* @__PURE__ */ r("span", { className: "text-xs text-secondary-foreground capitalize", children: t.scope }) }) : null;
|
|
85
85
|
}
|
|
86
86
|
function ae({
|
|
87
87
|
className: a,
|
|
88
88
|
scopes: t,
|
|
89
|
-
sources:
|
|
89
|
+
sources: d,
|
|
90
90
|
renderStatus: o,
|
|
91
91
|
recordingLabel: le,
|
|
92
|
-
pressShortcutLabel:
|
|
92
|
+
pressShortcutLabel: x,
|
|
93
93
|
addShortcutLabel: v,
|
|
94
94
|
conflictWarnLabel: w = "Conflicts with other shortcuts",
|
|
95
95
|
reservedWarnLabel: b = "This shortcut is reserved by the browser",
|
|
@@ -101,20 +101,20 @@ function ae({
|
|
|
101
101
|
updateKeybinding: N,
|
|
102
102
|
resetKeybinding: R,
|
|
103
103
|
version: O
|
|
104
|
-
} = Y(), [c, f] =
|
|
104
|
+
} = Y(), [c, f] = i.useState(null), [u, l] = i.useState(null), y = i.useMemo(() => {
|
|
105
105
|
let n = C();
|
|
106
106
|
return n = n.filter((e) => {
|
|
107
|
-
const
|
|
108
|
-
return
|
|
109
|
-
}), t && (n = n.filter((e) => t.includes(e.scope))),
|
|
110
|
-
const
|
|
107
|
+
const s = e.source ?? "user";
|
|
108
|
+
return s === "user" || s === "ag-grid";
|
|
109
|
+
}), t && (n = n.filter((e) => t.includes(e.scope))), d && (n = n.filter((e) => e.source && d.includes(e.source))), n.map((e) => {
|
|
110
|
+
const s = S(e.id), g = e.source ?? "user", D = m[g] ?? g ?? "User", A = D.toLowerCase() === "user";
|
|
111
111
|
return {
|
|
112
112
|
id: e.id,
|
|
113
113
|
command: e.label,
|
|
114
114
|
description: e.description || "",
|
|
115
115
|
category: e.category || "General",
|
|
116
|
-
keybinding:
|
|
117
|
-
keybindingDisplay:
|
|
116
|
+
keybinding: s,
|
|
117
|
+
keybindingDisplay: s ? X(s) : "",
|
|
118
118
|
scope: e.scope,
|
|
119
119
|
source: D,
|
|
120
120
|
sourceColor: A ? "primary" : "neutral",
|
|
@@ -125,25 +125,25 @@ function ae({
|
|
|
125
125
|
_def: e
|
|
126
126
|
};
|
|
127
127
|
});
|
|
128
|
-
}, [O, t,
|
|
128
|
+
}, [O, t, d, C, S]), k = i.useCallback((n) => {
|
|
129
129
|
f(n), l(null);
|
|
130
|
-
}, []), M =
|
|
130
|
+
}, []), M = i.useCallback((n) => {
|
|
131
131
|
R(n), l(null);
|
|
132
132
|
}, [R]);
|
|
133
|
-
|
|
133
|
+
i.useEffect(() => {
|
|
134
134
|
if (!c) return;
|
|
135
135
|
const n = (e) => {
|
|
136
136
|
if (e.preventDefault(), e.stopPropagation(), e.key === "Escape") {
|
|
137
137
|
f(null), l(null);
|
|
138
138
|
return;
|
|
139
139
|
}
|
|
140
|
-
const
|
|
141
|
-
if (!
|
|
142
|
-
if (W(
|
|
140
|
+
const s = Z(e);
|
|
141
|
+
if (!s) return;
|
|
142
|
+
if (W(s)) {
|
|
143
143
|
l({ type: "reserved", text: b }), f(null), setTimeout(() => l(null), 3e3);
|
|
144
144
|
return;
|
|
145
145
|
}
|
|
146
|
-
const g = N(c,
|
|
146
|
+
const g = N(c, s);
|
|
147
147
|
g.success ? (f(null), l(null)) : g.conflict ? (l({
|
|
148
148
|
type: "conflict",
|
|
149
149
|
text: w
|
|
@@ -151,7 +151,7 @@ function ae({
|
|
|
151
151
|
};
|
|
152
152
|
return window.addEventListener("keydown", n, !0), () => window.removeEventListener("keydown", n, !0);
|
|
153
153
|
}, [c, N, b, w]);
|
|
154
|
-
const P =
|
|
154
|
+
const P = i.useMemo(() => Array.from(new Set(y.map((e) => e.category))).sort().map((e) => ({ label: e, value: e })), [y]), _ = i.useMemo(() => [
|
|
155
155
|
{
|
|
156
156
|
field: "command",
|
|
157
157
|
headerName: "Command",
|
|
@@ -188,7 +188,7 @@ function ae({
|
|
|
188
188
|
recordingCommandId: c,
|
|
189
189
|
onStartRecording: k,
|
|
190
190
|
onReset: M,
|
|
191
|
-
recordingLabel:
|
|
191
|
+
recordingLabel: x,
|
|
192
192
|
addShortcutLabel: v
|
|
193
193
|
},
|
|
194
194
|
sortable: !0
|
|
@@ -235,7 +235,7 @@ function ae({
|
|
|
235
235
|
isMultiSelect: !0
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
|
-
], [c, k, M,
|
|
238
|
+
], [c, k, M, x, v, P]), I = i.useMemo(() => ({
|
|
239
239
|
filter: {
|
|
240
240
|
filterModel: {
|
|
241
241
|
source: {
|
|
@@ -244,7 +244,7 @@ function ae({
|
|
|
244
244
|
}
|
|
245
245
|
}
|
|
246
246
|
}
|
|
247
|
-
}), []), K =
|
|
247
|
+
}), []), K = i.useMemo(() => ({
|
|
248
248
|
sortable: !0,
|
|
249
249
|
resizable: !0,
|
|
250
250
|
filter: !0,
|
|
@@ -252,19 +252,19 @@ function ae({
|
|
|
252
252
|
isSearchable: !0,
|
|
253
253
|
advanceSearchEnabled: !0
|
|
254
254
|
}
|
|
255
|
-
}), []), E =
|
|
255
|
+
}), []), E = u || c ? /* @__PURE__ */ h("div", { className: p(
|
|
256
256
|
"px-3 py-1.5 text-[10px] md:text-sm font-medium rounded-md whitespace-nowrap flex items-center gap-2",
|
|
257
|
-
|
|
257
|
+
u?.type === "conflict" ? "bg-feedback-warning-surface text-content" : u?.type === "reserved" ? "bg-feedback-error-surface text-destructive" : c ? "bg-feedback-info-surface text-brand animate-[pulse_1.5s_ease-in-out_infinite] motion-reduce:animate-none" : ""
|
|
258
258
|
), children: [
|
|
259
|
-
|
|
260
|
-
/* @__PURE__ */ r("span", { children:
|
|
259
|
+
u?.type === "conflict" ? /* @__PURE__ */ r(U, { className: "h-3.5 w-3.5 shrink-0" }) : u?.type === "reserved" ? /* @__PURE__ */ r(T, { className: "h-3.5 w-3.5 shrink-0" }) : c ? /* @__PURE__ */ r("span", { className: "shrink-0 text-base", children: "⌨️" }) : null,
|
|
260
|
+
/* @__PURE__ */ r("span", { children: u ? u.text : L })
|
|
261
261
|
] }) : null;
|
|
262
262
|
return /* @__PURE__ */ h(V, { className: p("flex flex-col w-full h-full border-t-0", a), children: [
|
|
263
263
|
o ? o(E) : E,
|
|
264
264
|
/* @__PURE__ */ r(
|
|
265
265
|
J,
|
|
266
266
|
{
|
|
267
|
-
rowData:
|
|
267
|
+
rowData: y,
|
|
268
268
|
columnDefs: _,
|
|
269
269
|
defaultColDef: K,
|
|
270
270
|
initialState: I,
|
|
@@ -4,7 +4,7 @@ import { HorizontalScroller as S } from "../../layout/horizontal-scroller/horizo
|
|
|
4
4
|
import { TagGroup as z } from "../../primitives/tag-group/tag-group.js";
|
|
5
5
|
import { Tag as k } from "../../primitives/tag/tag.js";
|
|
6
6
|
import { Tooltip as b, TooltipTrigger as w, TooltipContent as y } from "../../feedback/tooltip/tooltip.js";
|
|
7
|
-
import {
|
|
7
|
+
import { PopoverContent as $, Popover as O, PopoverTrigger as j } from "../../feedback/popover/popover.js";
|
|
8
8
|
import { Button as P } from "../../primitives/button/button.js";
|
|
9
9
|
import { Checkmark as A, Copy as R, Cross as F } from "impact-nova-icons";
|
|
10
10
|
const T = "whitespace-nowrap bg-accent text-accent-foreground hover:bg-accent/80 border-0 h-5 px-2 text-xs font-medium font-['Manrope'] cursor-pointer", I = ({
|
|
@@ -22,7 +22,7 @@ const T = "whitespace-nowrap bg-accent text-accent-foreground hover:bg-accent/80
|
|
|
22
22
|
c === "custom" ? h?.() : g(!0);
|
|
23
23
|
};
|
|
24
24
|
return /* @__PURE__ */ e(
|
|
25
|
-
|
|
25
|
+
$,
|
|
26
26
|
{
|
|
27
27
|
className: "w-[200px] p-0 rounded-[8px] bg-white shadow-[0_0_4px_0_rgba(0,0,0,0.12)] border-none",
|
|
28
28
|
align: "start",
|
|
@@ -139,9 +139,9 @@ const T = "whitespace-nowrap bg-accent text-accent-foreground hover:bg-accent/80
|
|
|
139
139
|
r.overflow?.count || a.length,
|
|
140
140
|
" more filters"
|
|
141
141
|
] })
|
|
142
|
-
] }) : /* @__PURE__ */ t(
|
|
142
|
+
] }) : /* @__PURE__ */ t(O, { children: [
|
|
143
143
|
/* @__PURE__ */ t(b, { children: [
|
|
144
|
-
/* @__PURE__ */ e(w, { asChild: !0, children: /* @__PURE__ */ e(
|
|
144
|
+
/* @__PURE__ */ e(w, { asChild: !0, children: /* @__PURE__ */ e(j, { asChild: !0, children: /* @__PURE__ */ e(
|
|
145
145
|
k,
|
|
146
146
|
{
|
|
147
147
|
asButton: !0,
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { jsxs as l, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { useRef as
|
|
2
|
+
import { useRef as p, useEffect as u } from "react";
|
|
3
3
|
import { cn as a } from "../../../lib/utils.js";
|
|
4
4
|
import { LoadingSpinner as x } from "impact-nova-icons";
|
|
5
5
|
import { MulticolorBell as v } from "../../ui/local-raster-icons/rasterIcons.js";
|
|
6
6
|
import { useImpactNovaI18n as h } from "../../../i18n/use-impact-nova-i18n.js";
|
|
7
7
|
const j = ({
|
|
8
|
-
title:
|
|
9
|
-
description:
|
|
8
|
+
title: r,
|
|
9
|
+
description: i,
|
|
10
10
|
className: t,
|
|
11
11
|
...o
|
|
12
12
|
}) => {
|
|
13
|
-
const { t: c } = h(), s =
|
|
13
|
+
const { t: c } = h(), s = r ?? c("notificationPanel.everythingQuiet"), n = i ?? c("notificationPanel.everythingQuietSub");
|
|
14
14
|
return /* @__PURE__ */ l(
|
|
15
15
|
"div",
|
|
16
16
|
{
|
|
@@ -30,18 +30,18 @@ const j = ({
|
|
|
30
30
|
}
|
|
31
31
|
);
|
|
32
32
|
}, I = ({
|
|
33
|
-
children:
|
|
34
|
-
className:
|
|
33
|
+
children: r,
|
|
34
|
+
className: i,
|
|
35
35
|
onLoadMore: t,
|
|
36
36
|
isLoading: o,
|
|
37
37
|
hasMore: c,
|
|
38
38
|
loader: s
|
|
39
39
|
}) => {
|
|
40
|
-
const n =
|
|
40
|
+
const n = p(null);
|
|
41
41
|
return u(() => {
|
|
42
42
|
const f = new IntersectionObserver(
|
|
43
|
-
(
|
|
44
|
-
|
|
43
|
+
(d) => {
|
|
44
|
+
d[0].isIntersecting && c && !o && t && t();
|
|
45
45
|
},
|
|
46
46
|
{ threshold: 0.1 }
|
|
47
47
|
);
|
|
@@ -50,14 +50,14 @@ const j = ({
|
|
|
50
50
|
return () => {
|
|
51
51
|
m && f.unobserve(m);
|
|
52
52
|
};
|
|
53
|
-
}, [c, o, t]), /* @__PURE__ */ l("div", { className: a("flex flex-1 flex-col overflow-y-auto min-h-0",
|
|
54
|
-
/* @__PURE__ */ e("div", { className: "flex flex-col gap-2 p-2", children:
|
|
53
|
+
}, [c, o, t]), /* @__PURE__ */ l("div", { className: a("flex flex-1 flex-col overflow-y-auto min-h-0", i), tabIndex: 0, children: [
|
|
54
|
+
/* @__PURE__ */ e("div", { className: "flex flex-col gap-2 p-2", children: r }),
|
|
55
55
|
/* @__PURE__ */ e("div", { ref: n, className: "h-4 w-full flex-shrink-0" }),
|
|
56
|
-
o && /* @__PURE__ */ e("div", { className: "flex justify-center p-4", children: s || /* @__PURE__ */ e(x, { className: "h-6 w-6 animate-spin text-
|
|
56
|
+
o && /* @__PURE__ */ e("div", { className: "flex justify-center p-4", children: s || /* @__PURE__ */ e(x, { className: "h-6 w-6 animate-spin text-secondary-foreground" }) })
|
|
57
57
|
] });
|
|
58
58
|
}, z = ({
|
|
59
|
-
label:
|
|
60
|
-
children:
|
|
59
|
+
label: r,
|
|
60
|
+
children: i,
|
|
61
61
|
className: t
|
|
62
62
|
}) => /* @__PURE__ */ l(
|
|
63
63
|
"div",
|
|
@@ -69,11 +69,11 @@ const j = ({
|
|
|
69
69
|
"div",
|
|
70
70
|
{
|
|
71
71
|
"data-component": "notification-group-label",
|
|
72
|
-
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-
|
|
73
|
-
children:
|
|
72
|
+
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-secondary-foreground border-b border-stroke/50",
|
|
73
|
+
children: r
|
|
74
74
|
}
|
|
75
75
|
),
|
|
76
|
-
/* @__PURE__ */ e("div", { className: "flex flex-col gap-2 p-2", children:
|
|
76
|
+
/* @__PURE__ */ e("div", { className: "flex flex-col gap-2 p-2", children: i })
|
|
77
77
|
]
|
|
78
78
|
}
|
|
79
79
|
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as e, jsxs as i } from "react/jsx-runtime";
|
|
2
|
-
import { Sheet as
|
|
2
|
+
import { Sheet as f, SheetContent as m, SheetDescription as p, SheetTitle as h, SheetClose as v } from "../../feedback/sheet/sheet.js";
|
|
3
3
|
import { Button as x } from "../../primitives/button/button.js";
|
|
4
4
|
import { Bell as u, Cross as N } from "impact-nova-icons";
|
|
5
5
|
import { cn as l } from "../../../lib/utils.js";
|
|
@@ -14,8 +14,8 @@ const D = ({
|
|
|
14
14
|
}) => {
|
|
15
15
|
const { t: d } = s();
|
|
16
16
|
return /* @__PURE__ */ e(b.Provider, { value: { setPreventClose: () => {
|
|
17
|
-
} }, children: /* @__PURE__ */ e(
|
|
18
|
-
|
|
17
|
+
} }, children: /* @__PURE__ */ e(f, { open: t, onOpenChange: n, children: /* @__PURE__ */ i(
|
|
18
|
+
m,
|
|
19
19
|
{
|
|
20
20
|
"data-component": "notification-panel",
|
|
21
21
|
side: "right",
|
|
@@ -61,7 +61,7 @@ const D = ({
|
|
|
61
61
|
),
|
|
62
62
|
children: [
|
|
63
63
|
/* @__PURE__ */ i("div", { className: "flex items-center gap-3", children: [
|
|
64
|
-
/* @__PURE__ */ e("div", { className: "flex h-6 w-6 items-center justify-center", children: /* @__PURE__ */ e(u, { className: "h-5 w-5 text-
|
|
64
|
+
/* @__PURE__ */ e("div", { className: "flex h-6 w-6 items-center justify-center", children: /* @__PURE__ */ e(u, { className: "h-5 w-5 text-secondary-foreground" }) }),
|
|
65
65
|
typeof a == "string" ? /* @__PURE__ */ e(h, { className: "text-lg font-bold text-content", children: a }) : a
|
|
66
66
|
] }),
|
|
67
67
|
/* @__PURE__ */ i("div", { className: "flex items-center gap-2", children: [
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import type * as React from "react";
|
|
2
2
|
export interface NotificationPanelProps {
|
|
3
|
+
/** Controlled open state — pair with `onOpenChange`. */
|
|
3
4
|
open: boolean;
|
|
4
5
|
onOpenChange: (open: boolean) => void;
|
|
6
|
+
/** Panel subtree — `NotificationPanelContent` → Header / Body / Footer. */
|
|
5
7
|
children: React.ReactNode;
|
|
6
8
|
className?: string;
|
|
9
|
+
/** When `true`, blocks outside click and Escape from closing (e.g. bulk edit in progress). */
|
|
7
10
|
preventClose?: boolean;
|
|
8
11
|
}
|
|
9
12
|
export interface NotificationPanelHeaderProps {
|
|
@@ -17,9 +17,9 @@ const k = ({
|
|
|
17
17
|
defaultProp: e,
|
|
18
18
|
onChange: o
|
|
19
19
|
}), [u, l] = a.useState([]), m = a.useCallback((b) => {
|
|
20
|
-
l((
|
|
20
|
+
l((g) => g.includes(b) ? g : [...g, b].sort((v, w) => v - w));
|
|
21
21
|
}, []), c = a.useCallback((b) => {
|
|
22
|
-
l((
|
|
22
|
+
l((g) => g.filter((v) => v !== b));
|
|
23
23
|
}, []), f = t ?? (u.length > 0 ? Math.max(...u) : s.length), h = a.useMemo(
|
|
24
24
|
() => ({
|
|
25
25
|
value: d ?? e,
|
|
@@ -84,7 +84,7 @@ const D = a.forwardRef(
|
|
|
84
84
|
"p",
|
|
85
85
|
{
|
|
86
86
|
ref: t,
|
|
87
|
-
className: p("font-manrope text-[12px] font-[500] leading-[16px] text-
|
|
87
|
+
className: p("font-manrope text-[12px] font-[500] leading-[16px] text-secondary-foreground px-6 lg:px-10 xl:px-[64px]", r),
|
|
88
88
|
...o,
|
|
89
89
|
children: e
|
|
90
90
|
}
|
|
@@ -145,12 +145,12 @@ const F = a.forwardRef(
|
|
|
145
145
|
role: "list",
|
|
146
146
|
...t,
|
|
147
147
|
children: Array.from({ length: d }, (m, c) => {
|
|
148
|
-
const f = c + 1, h = c === i - 1, b = c < i - 1,
|
|
148
|
+
const f = c + 1, h = c === i - 1, b = c < i - 1, v = x[c]?.label ?? `Step ${f} of ${d}`, w = e && (!o || f <= i);
|
|
149
149
|
return /* @__PURE__ */ n(
|
|
150
150
|
"div",
|
|
151
151
|
{
|
|
152
152
|
role: "listitem",
|
|
153
|
-
"aria-label":
|
|
153
|
+
"aria-label": v,
|
|
154
154
|
"aria-current": h ? "step" : void 0,
|
|
155
155
|
tabIndex: w ? 0 : void 0,
|
|
156
156
|
onClick: () => l(f),
|
|
@@ -188,7 +188,7 @@ const T = a.forwardRef(
|
|
|
188
188
|
"p",
|
|
189
189
|
{
|
|
190
190
|
ref: t,
|
|
191
|
-
className: p("text-[14px] font-normal leading-relaxed text-
|
|
191
|
+
className: p("text-[14px] font-normal leading-relaxed text-secondary-foreground", r),
|
|
192
192
|
...o,
|
|
193
193
|
children: e
|
|
194
194
|
}
|
|
@@ -205,8 +205,8 @@ const j = a.forwardRef(
|
|
|
205
205
|
), u = a.useCallback(() => {
|
|
206
206
|
const l = d.current;
|
|
207
207
|
if (!l) return;
|
|
208
|
-
const { scrollTop: m, scrollHeight: c, clientHeight: f } = l, h = 1, b = m > h,
|
|
209
|
-
i((
|
|
208
|
+
const { scrollTop: m, scrollHeight: c, clientHeight: f } = l, h = 1, b = m > h, g = m + f < c - h;
|
|
209
|
+
i((v) => v.top === b && v.bottom === g ? v : { top: b, bottom: g });
|
|
210
210
|
}, [i]);
|
|
211
211
|
return a.useEffect(() => {
|
|
212
212
|
const l = d.current;
|
|
@@ -46,7 +46,7 @@ const De = ve.forwardRef(
|
|
|
46
46
|
required: z,
|
|
47
47
|
labelOrientation: re
|
|
48
48
|
}, x) => {
|
|
49
|
-
const
|
|
49
|
+
const se = Q(), A = Q(), H = typeof D == "string" ? D : F ?? "Options", V = ye({
|
|
50
50
|
label: D,
|
|
51
51
|
helperText: X,
|
|
52
52
|
helperTextPosition: Y,
|
|
@@ -54,12 +54,12 @@ const De = ve.forwardRef(
|
|
|
54
54
|
error: Z ?? ee,
|
|
55
55
|
required: z,
|
|
56
56
|
disabled: p,
|
|
57
|
-
id:
|
|
57
|
+
id: se,
|
|
58
58
|
className: oe
|
|
59
59
|
}), B = T(
|
|
60
60
|
() => Ie({ options: c, min: l, max: d, step: f }),
|
|
61
61
|
[c, l, d, f]
|
|
62
|
-
), M = b !== void 0, [
|
|
62
|
+
), M = b !== void 0, [ie, ae] = C(I), S = M ? b : ie, [ce, K] = C(""), [o, v] = C(!1), n = o ? ce : S, [O, m] = C(-1), U = R(-1), [le, w] = C("keyboard"), W = R(null), P = R(null), ue = u(
|
|
63
63
|
(e) => {
|
|
64
64
|
W.current = e, typeof x == "function" ? x(e) : x && (x.current = e);
|
|
65
65
|
},
|
|
@@ -77,7 +77,7 @@ const De = ve.forwardRef(
|
|
|
77
77
|
we(() => {
|
|
78
78
|
U.current = h, q.current = r, o && h >= 0 && P.current && P.current.querySelectorAll("[data-combobox-item]")[h]?.scrollIntoView({ block: "nearest" });
|
|
79
79
|
}, [h, o, r]);
|
|
80
|
-
const
|
|
80
|
+
const i = u(
|
|
81
81
|
(e) => {
|
|
82
82
|
M || ae(e), k?.(e), v(!1), m(-1);
|
|
83
83
|
},
|
|
@@ -97,15 +97,15 @@ const De = ve.forwardRef(
|
|
|
97
97
|
const t = e.relatedTarget;
|
|
98
98
|
if (!P.current?.contains(t)) {
|
|
99
99
|
if (o) {
|
|
100
|
-
const
|
|
100
|
+
const s = r.find(
|
|
101
101
|
(g) => g.toLowerCase() === n.toLowerCase()
|
|
102
102
|
);
|
|
103
|
-
|
|
103
|
+
s ? i(s) : r.length === 1 ? i(r[0]) : L && n ? i(n) : y();
|
|
104
104
|
}
|
|
105
105
|
$?.(e);
|
|
106
106
|
}
|
|
107
107
|
},
|
|
108
|
-
[o, r, n,
|
|
108
|
+
[o, r, n, i, y, L, $]
|
|
109
109
|
), ge = u(
|
|
110
110
|
(e) => {
|
|
111
111
|
if (!o) {
|
|
@@ -130,24 +130,24 @@ const De = ve.forwardRef(
|
|
|
130
130
|
}
|
|
131
131
|
if (e.key === "Enter" || e.key === "Tab") {
|
|
132
132
|
e.preventDefault();
|
|
133
|
-
const t = U.current,
|
|
134
|
-
if (t >= 0 && t <
|
|
135
|
-
s
|
|
133
|
+
const t = U.current, s = q.current;
|
|
134
|
+
if (t >= 0 && t < s.length)
|
|
135
|
+
i(s[t]);
|
|
136
136
|
else {
|
|
137
|
-
const g =
|
|
137
|
+
const g = s.find(
|
|
138
138
|
(j) => j.toLowerCase() === n.toLowerCase()
|
|
139
139
|
);
|
|
140
|
-
g ?
|
|
140
|
+
g ? i(g) : s.length === 1 ? i(s[0]) : L && n ? i(n) : y();
|
|
141
141
|
}
|
|
142
142
|
return;
|
|
143
143
|
}
|
|
144
144
|
},
|
|
145
|
-
[o, r, n,
|
|
145
|
+
[o, r, n, i, y, L]
|
|
146
146
|
), J = u(
|
|
147
147
|
(e) => {
|
|
148
|
-
|
|
148
|
+
i(e), setTimeout(() => W.current?.focus(), 0);
|
|
149
149
|
},
|
|
150
|
-
[
|
|
150
|
+
[i]
|
|
151
151
|
), be = u(
|
|
152
152
|
(e) => {
|
|
153
153
|
const t = e.target.closest(
|
|
@@ -156,8 +156,8 @@ const De = ve.forwardRef(
|
|
|
156
156
|
if (t) {
|
|
157
157
|
if (e.button !== 0) return;
|
|
158
158
|
e.preventDefault();
|
|
159
|
-
const
|
|
160
|
-
|
|
159
|
+
const s = t.getAttribute("data-combobox-value");
|
|
160
|
+
s != null && J(s);
|
|
161
161
|
return;
|
|
162
162
|
}
|
|
163
163
|
e.preventDefault();
|
|
@@ -247,8 +247,8 @@ const De = ve.forwardRef(
|
|
|
247
247
|
onMouseLeave: () => {
|
|
248
248
|
w("mouse"), m(-1);
|
|
249
249
|
},
|
|
250
|
-
children: r.length === 0 ? /* @__PURE__ */ a("div", { className: "flex items-center justify-center py-6 text-sm text-
|
|
251
|
-
const
|
|
250
|
+
children: r.length === 0 ? /* @__PURE__ */ a("div", { className: "flex items-center justify-center py-6 text-sm text-secondary-foreground", children: ne }) : r.map((e, t) => {
|
|
251
|
+
const s = t === h, g = e.toLowerCase() === S.toLowerCase(), j = `${A}-option-${t}`;
|
|
252
252
|
return /* @__PURE__ */ a("div", { className: "w-full pb-[2px]", children: /* @__PURE__ */ a(
|
|
253
253
|
"div",
|
|
254
254
|
{
|
|
@@ -260,7 +260,7 @@ const De = ve.forwardRef(
|
|
|
260
260
|
className: _(
|
|
261
261
|
"cursor-default select-none py-[6px] px-3 flex items-center transition-colors rounded-md",
|
|
262
262
|
E ? "justify-end text-right" : "justify-between",
|
|
263
|
-
|
|
263
|
+
s && G === "keyboard" ? "ring-2 ring-inset ring-primary bg-accent text-content" : s && G === "mouse" ? "bg-canvas-muted text-content" : g ? "bg-accent text-content" : "text-content hover:bg-canvas-muted cursor-pointer"
|
|
264
264
|
),
|
|
265
265
|
onMouseEnter: () => {
|
|
266
266
|
w("mouse"), m(t);
|
|
@@ -4,7 +4,7 @@ import { Cross as F, CalendarMonth as ee } from "impact-nova-icons";
|
|
|
4
4
|
import { format as x, isValid as b, parse as P } from "date-fns";
|
|
5
5
|
import { cn as ne, padValidDateString as te, maskDate as re } from "../../../lib/utils.js";
|
|
6
6
|
import { Input as oe } from "../input/input.js";
|
|
7
|
-
import { Popover as
|
|
7
|
+
import { Popover as le, PopoverAnchor as ie, PopoverContent as ae } from "../../feedback/popover/popover.js";
|
|
8
8
|
import { Calendar as ce } from "../../data-display/calendar/calendar.js";
|
|
9
9
|
import { Tooltip as E, TooltipTrigger as T, TooltipContent as j } from "../../feedback/tooltip/tooltip.js";
|
|
10
10
|
import { useImpactNovaI18n as se } from "../../../i18n/use-impact-nova-i18n.js";
|
|
@@ -29,8 +29,8 @@ const he = s.forwardRef(
|
|
|
29
29
|
}, G) => {
|
|
30
30
|
const { locale: N, t: m } = se(), g = s.useMemo(() => pe(N), [N]), J = L ?? m("datePicker.selectDate"), D = s.useRef(null), y = s.useRef(null);
|
|
31
31
|
s.useImperativeHandle(G, () => D.current);
|
|
32
|
-
const [
|
|
33
|
-
p || (
|
|
32
|
+
const [l, Q] = s.useState(!1), v = s.useRef(!1), [k, i] = s.useState(null), C = t ? x(t, o, { locale: g }) : "", u = k?.input ?? C, R = l ? k?.pending ?? t : t, U = k?.viewMonth ?? t ?? /* @__PURE__ */ new Date(), a = (e) => {
|
|
33
|
+
p || (i(e ? {
|
|
34
34
|
input: C,
|
|
35
35
|
pending: t,
|
|
36
36
|
viewMonth: t ?? /* @__PURE__ */ new Date()
|
|
@@ -41,7 +41,7 @@ const he = s.forwardRef(
|
|
|
41
41
|
}, [u]);
|
|
42
42
|
const W = (e) => {
|
|
43
43
|
const n = de(e), d = n ? x(n, o, { locale: g }) : "";
|
|
44
|
-
|
|
44
|
+
i(
|
|
45
45
|
(c) => c ? { ...c, pending: n, input: d, viewMonth: n ?? c.viewMonth } : null
|
|
46
46
|
), n && !h && (f?.(n), a(!1));
|
|
47
47
|
}, X = (e) => {
|
|
@@ -50,12 +50,12 @@ const he = s.forwardRef(
|
|
|
50
50
|
}, S = () => {
|
|
51
51
|
a(!1);
|
|
52
52
|
}, A = () => {
|
|
53
|
-
f?.(void 0), h ?
|
|
53
|
+
f?.(void 0), h ? i(
|
|
54
54
|
(e) => e ? { ...e, pending: void 0, input: "" } : null
|
|
55
55
|
) : a(!1);
|
|
56
56
|
}, Y = (e) => {
|
|
57
57
|
const n = e.target.value, d = re(n, o, u);
|
|
58
|
-
if (
|
|
58
|
+
if (i((M) => ({ ...M ?? {
|
|
59
59
|
input: C,
|
|
60
60
|
pending: t,
|
|
61
61
|
viewMonth: t ?? /* @__PURE__ */ new Date()
|
|
@@ -64,18 +64,18 @@ const he = s.forwardRef(
|
|
|
64
64
|
return;
|
|
65
65
|
}
|
|
66
66
|
const c = P(d, o, /* @__PURE__ */ new Date(), { locale: g });
|
|
67
|
-
b(c) && d.length === o.length && (
|
|
67
|
+
b(c) && d.length === o.length && (i((M) => ({ ...M ?? {
|
|
68
68
|
input: d,
|
|
69
69
|
pending: t,
|
|
70
70
|
viewMonth: c
|
|
71
71
|
}, pending: c, viewMonth: c })), h || f?.(c));
|
|
72
72
|
}, Z = () => {
|
|
73
|
-
if (
|
|
73
|
+
if (l) return;
|
|
74
74
|
const e = te(u, o), n = P(e, o, /* @__PURE__ */ new Date(), { locale: g });
|
|
75
|
-
!b(n) || e.length !== o.length ?
|
|
75
|
+
!b(n) || e.length !== o.length ? i(null) : h || (f?.(n), i(null));
|
|
76
76
|
}, V = (t ? x(t, o, { locale: g }) : "") !== u, _ = u.length === o.length && !b(P(u, o, /* @__PURE__ */ new Date(), { locale: g }));
|
|
77
|
-
return /* @__PURE__ */ w(
|
|
78
|
-
/* @__PURE__ */ r(
|
|
77
|
+
return /* @__PURE__ */ w(le, { open: p ? !1 : l, onOpenChange: a, children: [
|
|
78
|
+
/* @__PURE__ */ r(ie, { asChild: !0, children: /* @__PURE__ */ r("div", { "data-component": "date-picker", "data-state": l ? "open" : "closed", "data-pending": V || void 0, children: /* @__PURE__ */ r(
|
|
79
79
|
oe,
|
|
80
80
|
{
|
|
81
81
|
ref: D,
|
|
@@ -84,14 +84,14 @@ const he = s.forwardRef(
|
|
|
84
84
|
onBlur: Z,
|
|
85
85
|
onClick: () => !p && a(!0),
|
|
86
86
|
onKeyDown: (e) => {
|
|
87
|
-
(e.key === "Enter" || e.key === "ArrowDown") && !
|
|
87
|
+
(e.key === "Enter" || e.key === "ArrowDown") && !l && !p && (e.preventDefault(), v.current = !0, a(!0)), e.key === "Escape" && l && (e.preventDefault(), S());
|
|
88
88
|
},
|
|
89
|
-
placeholder:
|
|
89
|
+
placeholder: l ? o : J,
|
|
90
90
|
disabled: p,
|
|
91
91
|
"data-form-control": "input",
|
|
92
92
|
className: ne(
|
|
93
93
|
"cursor-pointer",
|
|
94
|
-
_ ? "text-destructive" : V ? "text-content-
|
|
94
|
+
_ ? "text-destructive" : V ? "text-content-placeholder" : "",
|
|
95
95
|
H
|
|
96
96
|
),
|
|
97
97
|
suffix: /* @__PURE__ */ w("div", { className: "flex items-center gap-1", children: [
|
|
@@ -113,9 +113,9 @@ const he = s.forwardRef(
|
|
|
113
113
|
] }),
|
|
114
114
|
/* @__PURE__ */ w(E, { children: [
|
|
115
115
|
/* @__PURE__ */ r(T, { asChild: !0, children: /* @__PURE__ */ r("button", { type: "button", tabIndex: 0, "aria-label": m("datePicker.selectDate"), onClick: (e) => {
|
|
116
|
-
e.stopPropagation(), p || a(!
|
|
116
|
+
e.stopPropagation(), p || a(!l);
|
|
117
117
|
}, onKeyDown: (e) => {
|
|
118
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), p || (v.current = !0, a(!
|
|
118
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), p || (v.current = !0, a(!l)));
|
|
119
119
|
}, className: "inline-flex items-center justify-center bg-transparent border-none p-0 cursor-pointer", children: /* @__PURE__ */ r(ee, { className: "h-4 w-4 text-secondary-foreground" }) }) }),
|
|
120
120
|
/* @__PURE__ */ r(j, { variant: "tertiary", side: "top", children: m("datePicker.selectDate") })
|
|
121
121
|
] })
|
|
@@ -139,7 +139,7 @@ const he = s.forwardRef(
|
|
|
139
139
|
selected: R,
|
|
140
140
|
onSelect: W,
|
|
141
141
|
month: U,
|
|
142
|
-
onMonthChange: (e) =>
|
|
142
|
+
onMonthChange: (e) => i(
|
|
143
143
|
(n) => n ? { ...n, viewMonth: e } : null
|
|
144
144
|
),
|
|
145
145
|
disabled: fe(B, K),
|