impact-nova 2.1.0-alpha.7 → 2.1.0-alpha.9
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.types.d.ts +6 -0
- package/dist/components/data/ag-grid-react/build-ag-grid-theme.d.ts +3 -0
- package/dist/components/data/ag-grid-react/cell-renderers/editors/input-cell-editor.js +58 -58
- package/dist/components/data/ag-grid-react/column-indicator-sync-bus.d.ts +9 -0
- package/dist/components/data/ag-grid-react/column-indicator-sync-bus.js +15 -0
- package/dist/components/data/ag-grid-react/headers/column-menu/column-settings-menu.js +78 -73
- package/dist/components/data/ag-grid-react/headers/custom-header.js +3 -1
- package/dist/components/data/ag-grid-react/headers/header-search-input.js +87 -91
- package/dist/components/data/ag-grid-react/index.d.ts +1 -1
- package/dist/components/data/ag-grid-react/index.js +109 -100
- package/dist/components/data/ag-grid-react/notify-column-indicator-sync.d.ts +3 -2
- package/dist/components/data/ag-grid-react/notify-column-indicator-sync.js +4 -3
- package/dist/components/data/ag-grid-react/sync-ag-grid-theme-mode.d.ts +3 -0
- package/dist/components/data/ag-grid-react/sync-ag-grid-theme-mode.js +10 -0
- package/dist/components/data/ag-grid-react/theme.d.ts +1 -0
- package/dist/components/data/ag-grid-react/theme.js +93 -21
- package/dist/components/data/data-table/column-indicator.d.ts +1 -1
- package/dist/components/data/data-table/column-indicator.js +15 -11
- package/dist/components/data/data-table/data-table-column-def-pin.d.ts +9 -4
- package/dist/components/data/data-table/data-table-column-def-pin.js +38 -38
- package/dist/components/data/data-table/data-table-saved-views.js +37 -37
- package/dist/components/data/data-table/data-table.js +78 -73
- package/dist/components/data/data-table/data-table.types.d.ts +7 -1
- package/dist/components/data/data-table/indicator-legend.d.ts +13 -2
- package/dist/components/data/data-table/indicator-legend.js +20 -17
- package/dist/components/data/data-table/pin-switch.js +9 -9
- package/dist/components/data/data-table/use-data-table-column-list-sync.js +92 -89
- package/dist/components/data/nested-list/nested-list-change-detection.d.ts +11 -0
- package/dist/components/data/nested-list/nested-list-change-detection.js +13 -0
- package/dist/components/data/nested-list/nested-list.js +107 -97
- package/dist/components/data-display/calendar/calendar.d.ts +1 -1
- package/dist/components/data-display/calendar/calendar.js +194 -189
- package/dist/components/data-display/chart/chart-palette.d.ts +16 -0
- package/dist/components/data-display/chart/chart-palette.js +28 -0
- package/dist/components/data-display/chart/chart.js +121 -115
- package/dist/components/data-display/chart/chart.utils.js +9 -6
- package/dist/components/data-display/chart/index.d.ts +1 -0
- package/dist/components/data-display/chart/index.js +15 -9
- package/dist/components/data-display/chart/resolve-highcharts-options.d.ts +3 -0
- package/dist/components/data-display/chart/resolve-highcharts-options.js +35 -0
- package/dist/components/data-display/statistics-card/statistics-card.color.d.ts +6 -0
- package/dist/components/data-display/statistics-card/statistics-card.color.js +19 -0
- package/dist/components/data-display/statistics-card/statistics-card.hooks.js +50 -48
- package/dist/components/data-display/statistics-card/statistics-card.js +127 -146
- package/dist/components/feedback/alert-dialog/alert-dialog.js +15 -15
- package/dist/components/feedback/dialog/dialog.js +3 -3
- package/dist/components/feedback/drawer/drawer.js +32 -32
- package/dist/components/feedback/sheet/sheet.js +8 -8
- package/dist/components/feedback/sheet/sheet.variants.js +1 -1
- package/dist/components/feedback/toast/toast.js +83 -92
- package/dist/components/flows/command-palette/command-palette-context.types.d.ts +5 -0
- package/dist/components/flows/command-palette/command-palette.d.ts +4 -16
- package/dist/components/flows/command-palette/command-palette.js +245 -258
- package/dist/components/flows/command-palette/command-palette.types.d.ts +9 -0
- package/dist/components/flows/command-palette/shortcut-overlay.js +6 -6
- package/dist/components/flows/filter-panel/filter-panel.d.ts +3 -2
- package/dist/components/flows/filter-panel/filter-panel.js +99 -104
- package/dist/components/flows/filter-strip/filter-summary.js +41 -41
- package/dist/components/flows/filter-strip/filter-tag-list.js +48 -48
- package/dist/components/flows/wizard/wizard.js +32 -32
- package/dist/components/forms/choice-card/choice-card.d.ts +2 -2
- package/dist/components/forms/choice-card/choice-card.js +156 -166
- package/dist/components/forms/combobox/combobox.js +70 -70
- package/dist/components/forms/date-picker/date-picker.js +31 -30
- package/dist/components/forms/file-upload/file-upload.js +146 -168
- package/dist/components/forms/prompt/prompt.js +47 -48
- package/dist/components/forms/select/components/SelectAllRow.js +14 -14
- package/dist/components/forms/select/components/SelectMenuFooter.js +12 -12
- package/dist/components/forms/select/components/SelectMenuHeader.js +44 -44
- package/dist/components/forms/select/components/SelectMenuListBody.js +22 -22
- package/dist/components/forms/select/components/SelectMenuPanel.js +8 -8
- package/dist/components/forms/select/components/SelectOptionRow.js +62 -62
- package/dist/components/forms/select/select.d.ts +5 -4
- package/dist/components/forms/select/select.js +123 -120
- package/dist/components/forms/select/select.types.d.ts +95 -204
- package/dist/components/forms/slider/slider.js +17 -17
- package/dist/components/forms/smart-input/smart-input.js +49 -49
- package/dist/components/forms/textarea/textarea.js +25 -25
- package/dist/components/layout/breadcrumb/breadcrumb.js +112 -118
- package/dist/components/layout/header/header.d.ts +5 -17
- package/dist/components/layout/header/header.js +113 -116
- package/dist/components/layout/header/header.types.d.ts +3 -0
- package/dist/components/layout/sidebar/sidebar.js +5 -5
- package/dist/components/layout/sidebar/sidebar.variants.js +1 -1
- package/dist/components/primitives/accordion/accordion.js +38 -41
- package/dist/components/primitives/kbd/kbd.variants.js +1 -1
- package/dist/i18n/defaultMessages.d.ts +2 -0
- package/dist/i18n/defaultMessages.js +6 -4
- package/dist/i18n/locales/de.js +2 -0
- package/dist/i18n/locales/es.js +2 -0
- package/dist/i18n/locales/hi.js +2 -0
- package/dist/i18n/locales/kn.js +2 -0
- package/dist/impact-nova-base.scss +8 -5
- package/dist/impact-nova-components.css +2 -2
- package/dist/impact-nova-tokens.scss +346 -189
- package/dist/impact-nova.css +1 -1
- package/dist/index.js +505 -499
- package/dist/lib/resolve-design-token-color.d.ts +5 -0
- package/dist/lib/resolve-design-token-color.js +12 -0
- package/dist/llms/rules/ag-grid.js +1 -1
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/requirements.js +1 -1
- package/dist/tailwind.config.js +297 -0
- package/dist/theme/tailwind-colors.js +199 -0
- package/dist/theme/tokens/chart-series-palette.json.d.ts +53 -0
- package/dist/theme/tokens/chart-series-palette.json.js +7 -0
- package/package.json +32 -259
- package/tailwind.config.js +0 -335
|
@@ -1,184 +1,168 @@
|
|
|
1
|
-
import { jsx as e, jsxs as c, Fragment as
|
|
2
|
-
import * as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { jsx as e, jsxs as c, Fragment as L } from "react/jsx-runtime";
|
|
2
|
+
import * as y from "react";
|
|
3
|
+
import { createComponent as v } from "../../../lib/primitives/create-component.js";
|
|
4
|
+
import { createCompoundPart as j } from "../../../lib/primitives/create-compound.js";
|
|
5
|
+
import { cn as F } from "../../../lib/utils.js";
|
|
6
|
+
import { Cross as E, Eye as M, Delete as B, Document as P } from "impact-nova-icons";
|
|
7
|
+
import { FileUpload as S, Text as A, Csv as O, Excel as R } from "../../ui/local-raster-icons/rasterIcons.js";
|
|
8
|
+
import { Tooltip as w, TooltipTrigger as D, TooltipContent as z } from "../../feedback/tooltip/tooltip.js";
|
|
9
|
+
import { useImpactNovaI18n as T } from "../../../i18n/use-impact-nova-i18n.js";
|
|
10
|
+
const k = y.createContext(void 0), H = [], I = () => {
|
|
11
|
+
const a = y.useContext(k);
|
|
10
12
|
if (!a)
|
|
11
13
|
throw new Error("useFileUpload must be used within a FileUpload component");
|
|
12
14
|
return a;
|
|
13
|
-
},
|
|
15
|
+
}, J = v(
|
|
16
|
+
"FileUpload",
|
|
14
17
|
({
|
|
15
18
|
className: a,
|
|
16
19
|
children: t,
|
|
17
20
|
onFilesChange: l,
|
|
18
|
-
maxFiles:
|
|
19
|
-
accept:
|
|
20
|
-
disabled:
|
|
21
|
-
value:
|
|
22
|
-
...
|
|
23
|
-
},
|
|
24
|
-
const [
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}, [
|
|
28
|
-
const
|
|
29
|
-
if (
|
|
30
|
-
let
|
|
31
|
-
|
|
32
|
-
const
|
|
33
|
-
return
|
|
21
|
+
maxFiles: o = 1,
|
|
22
|
+
accept: s = [],
|
|
23
|
+
disabled: p = !1,
|
|
24
|
+
value: m = H,
|
|
25
|
+
...d
|
|
26
|
+
}, U) => {
|
|
27
|
+
const [f, u] = y.useState(m);
|
|
28
|
+
y.useEffect(() => {
|
|
29
|
+
u(m);
|
|
30
|
+
}, [m]);
|
|
31
|
+
const x = (n) => {
|
|
32
|
+
if (p) return;
|
|
33
|
+
let r = n;
|
|
34
|
+
s.length > 0 && (r = r.filter((N) => {
|
|
35
|
+
const C = N.name.split(".").pop()?.toLowerCase();
|
|
36
|
+
return C && s.includes(C);
|
|
34
37
|
}));
|
|
35
|
-
const
|
|
36
|
-
if (
|
|
37
|
-
const
|
|
38
|
-
if (
|
|
39
|
-
const
|
|
40
|
-
|
|
38
|
+
const h = o - f.length;
|
|
39
|
+
if (h <= 0) return;
|
|
40
|
+
const g = r.slice(0, h);
|
|
41
|
+
if (g.length > 0) {
|
|
42
|
+
const N = [...f, ...g];
|
|
43
|
+
u(N), l?.(N);
|
|
41
44
|
}
|
|
42
|
-
},
|
|
43
|
-
if (
|
|
44
|
-
const
|
|
45
|
-
|
|
45
|
+
}, b = (n) => {
|
|
46
|
+
if (p) return;
|
|
47
|
+
const r = f.filter((h) => h !== n);
|
|
48
|
+
u(r), l?.(r);
|
|
46
49
|
};
|
|
47
50
|
return /* @__PURE__ */ e(
|
|
48
|
-
|
|
51
|
+
k.Provider,
|
|
49
52
|
{
|
|
50
|
-
value: { files:
|
|
53
|
+
value: { files: f, addFiles: x, removeFile: b, maxFiles: o, accept: s, disabled: p },
|
|
51
54
|
children: /* @__PURE__ */ e(
|
|
52
55
|
"div",
|
|
53
56
|
{
|
|
54
|
-
ref:
|
|
55
|
-
className:
|
|
57
|
+
ref: U,
|
|
58
|
+
className: F("w-full max-w-[550px]", a),
|
|
56
59
|
"data-component": "file-upload",
|
|
57
|
-
"data-disabled":
|
|
58
|
-
...
|
|
60
|
+
"data-disabled": p || void 0,
|
|
61
|
+
...d,
|
|
59
62
|
children: t
|
|
60
63
|
}
|
|
61
64
|
)
|
|
62
65
|
}
|
|
63
66
|
);
|
|
64
67
|
}
|
|
65
|
-
)
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
"
|
|
69
|
-
|
|
70
|
-
ref: r,
|
|
71
|
-
className: f(
|
|
72
|
-
"flex flex-col gap-4 p-4 min-h-[274px] bg-canvas-elevated rounded-2xl shadow-elevation-header",
|
|
73
|
-
a
|
|
74
|
-
),
|
|
75
|
-
...l,
|
|
76
|
-
children: t
|
|
77
|
-
}
|
|
78
|
-
));
|
|
79
|
-
P.displayName = "FileUploadContent";
|
|
80
|
-
const H = o.forwardRef(({ className: a, children: t, ...l }, r) => /* @__PURE__ */ e(
|
|
68
|
+
), Q = j("file-upload", {
|
|
69
|
+
part: "content",
|
|
70
|
+
displayName: "FileUploadContent",
|
|
71
|
+
className: "flex flex-col gap-4 p-4 min-h-[274px] bg-canvas-elevated rounded-2xl shadow-elevation-header"
|
|
72
|
+
}), W = v("FileUploadHeader", ({ className: a, children: t, ...l }, o) => /* @__PURE__ */ e(
|
|
81
73
|
"div",
|
|
82
74
|
{
|
|
83
|
-
ref:
|
|
84
|
-
className:
|
|
75
|
+
ref: o,
|
|
76
|
+
className: F("flex justify-between items-center w-full", a),
|
|
85
77
|
...l,
|
|
86
78
|
children: /* @__PURE__ */ e("div", { className: "flex flex-col gap-[2px] w-full", children: t })
|
|
87
79
|
}
|
|
88
|
-
))
|
|
89
|
-
H.displayName = "FileUploadHeader";
|
|
90
|
-
const Z = o.forwardRef(({ className: a, children: t, ...l }, r) => /* @__PURE__ */ e(
|
|
80
|
+
)), X = v("FileUploadTitle", ({ className: a, children: t, ...l }, o) => /* @__PURE__ */ e(
|
|
91
81
|
"h3",
|
|
92
82
|
{
|
|
93
|
-
ref:
|
|
94
|
-
className:
|
|
83
|
+
ref: o,
|
|
84
|
+
className: F("text-base font-extrabold text-content leading-6", a),
|
|
95
85
|
...l,
|
|
96
86
|
children: t
|
|
97
87
|
}
|
|
98
|
-
))
|
|
99
|
-
Z.displayName = "FileUploadTitle";
|
|
100
|
-
const $ = o.forwardRef(({ className: a, children: t, ...l }, r) => /* @__PURE__ */ e(
|
|
88
|
+
)), ee = v("FileUploadDescription", ({ className: a, children: t, ...l }, o) => /* @__PURE__ */ e(
|
|
101
89
|
"p",
|
|
102
90
|
{
|
|
103
|
-
ref:
|
|
104
|
-
className:
|
|
91
|
+
ref: o,
|
|
92
|
+
className: F(
|
|
105
93
|
"text-sm font-medium text-navigation-muted leading-5",
|
|
106
94
|
a
|
|
107
95
|
),
|
|
108
96
|
...l,
|
|
109
97
|
children: t
|
|
110
98
|
}
|
|
111
|
-
))
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
return /* @__PURE__ */ c(U, { children: [
|
|
116
|
-
/* @__PURE__ */ e(C, { asChild: !0, children: /* @__PURE__ */ e(
|
|
99
|
+
)), te = v("FileUploadClose", ({ className: a, ...t }, l) => {
|
|
100
|
+
const { t: o } = T(), s = o("aria.close");
|
|
101
|
+
return /* @__PURE__ */ c(w, { children: [
|
|
102
|
+
/* @__PURE__ */ e(D, { asChild: !0, children: /* @__PURE__ */ e(
|
|
117
103
|
"button",
|
|
118
104
|
{
|
|
119
105
|
ref: l,
|
|
120
|
-
className:
|
|
106
|
+
className: F(
|
|
121
107
|
"text-content-tertiary hover:text-content transition-colors",
|
|
122
108
|
a
|
|
123
109
|
),
|
|
124
110
|
type: "button",
|
|
125
|
-
"aria-label":
|
|
111
|
+
"aria-label": s,
|
|
126
112
|
...t,
|
|
127
|
-
children: /* @__PURE__ */ e(
|
|
113
|
+
children: /* @__PURE__ */ e(E, { size: 16 })
|
|
128
114
|
}
|
|
129
115
|
) }),
|
|
130
|
-
/* @__PURE__ */ e(
|
|
116
|
+
/* @__PURE__ */ e(z, { side: "top", variant: "tertiary", children: s })
|
|
131
117
|
] });
|
|
132
|
-
})
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
const { addFiles: m, accept: u, disabled: p, files: b, maxFiles: h } = j(), [x, g] = o.useState(!1), N = o.useRef(null);
|
|
136
|
-
if (b.length >= h)
|
|
118
|
+
}), ae = v("FileUploadDropZone", ({ className: a, label: t, subLabel: l, ...o }, s) => {
|
|
119
|
+
const { addFiles: p, accept: m, disabled: d, files: U, maxFiles: f } = I(), [u, x] = y.useState(!1), b = y.useRef(null);
|
|
120
|
+
if (U.length >= f)
|
|
137
121
|
return null;
|
|
138
122
|
const n = (i) => {
|
|
139
|
-
i.preventDefault(),
|
|
140
|
-
},
|
|
141
|
-
i.preventDefault(),
|
|
142
|
-
},
|
|
143
|
-
i.preventDefault(),
|
|
144
|
-
},
|
|
145
|
-
|
|
146
|
-
},
|
|
147
|
-
i.target.files?.length && (
|
|
148
|
-
},
|
|
123
|
+
i.preventDefault(), d || x(!0);
|
|
124
|
+
}, r = (i) => {
|
|
125
|
+
i.preventDefault(), x(!1);
|
|
126
|
+
}, h = (i) => {
|
|
127
|
+
i.preventDefault(), x(!1), !d && i.dataTransfer.files?.length && p(Array.from(i.dataTransfer.files));
|
|
128
|
+
}, g = () => {
|
|
129
|
+
d || b.current?.click();
|
|
130
|
+
}, N = (i) => {
|
|
131
|
+
i.target.files?.length && (p(Array.from(i.target.files)), i.target.value = "");
|
|
132
|
+
}, C = m.length > 0 ? m.map((i) => `.${i}`).join(",") : void 0;
|
|
149
133
|
return /* @__PURE__ */ c(
|
|
150
134
|
"div",
|
|
151
135
|
{
|
|
152
|
-
ref:
|
|
153
|
-
onClick:
|
|
136
|
+
ref: s,
|
|
137
|
+
onClick: g,
|
|
154
138
|
onDragOver: n,
|
|
155
|
-
onDragLeave:
|
|
156
|
-
onDrop:
|
|
157
|
-
className:
|
|
139
|
+
onDragLeave: r,
|
|
140
|
+
onDrop: h,
|
|
141
|
+
className: F(
|
|
158
142
|
"relative flex flex-col items-center justify-end p-4 pt-6 pb-6 gap-2 h-[148px] rounded-lg border border-dashed border-stroke-accent bg-transparent cursor-pointer transition-colors",
|
|
159
|
-
|
|
160
|
-
|
|
143
|
+
u && "border-brand bg-brand/5",
|
|
144
|
+
d && "opacity-50 cursor-not-allowed",
|
|
161
145
|
a
|
|
162
146
|
),
|
|
163
147
|
"data-component": "file-upload-dropzone",
|
|
164
|
-
"data-state":
|
|
165
|
-
...
|
|
148
|
+
"data-state": u ? "drag-over" : "idle",
|
|
149
|
+
...o,
|
|
166
150
|
children: [
|
|
167
151
|
/* @__PURE__ */ e(
|
|
168
152
|
"input",
|
|
169
153
|
{
|
|
170
|
-
ref:
|
|
154
|
+
ref: b,
|
|
171
155
|
type: "file",
|
|
172
156
|
multiple: !0,
|
|
173
157
|
className: "hidden",
|
|
174
|
-
accept:
|
|
175
|
-
onChange:
|
|
176
|
-
disabled:
|
|
158
|
+
accept: C,
|
|
159
|
+
onChange: N,
|
|
160
|
+
disabled: d
|
|
177
161
|
}
|
|
178
162
|
),
|
|
179
|
-
/* @__PURE__ */ e("div", { className: "absolute top-[24px] left-1/2 -translate-x-1/2 pointer-events-none", children: /* @__PURE__ */ e(
|
|
163
|
+
/* @__PURE__ */ e("div", { className: "absolute top-[24px] left-1/2 -translate-x-1/2 pointer-events-none", children: /* @__PURE__ */ e(S, { size: 56 }) }),
|
|
180
164
|
/* @__PURE__ */ c("div", { className: "text-center space-y-1 z-10 mt-auto", children: [
|
|
181
|
-
/* @__PURE__ */ e("p", { className: "text-sm font-medium text-content leading-5", children: t || /* @__PURE__ */ c(
|
|
165
|
+
/* @__PURE__ */ e("p", { className: "text-sm font-medium text-content leading-5", children: t || /* @__PURE__ */ c(L, { children: [
|
|
182
166
|
"Drag your files here or",
|
|
183
167
|
" ",
|
|
184
168
|
/* @__PURE__ */ e("span", { className: "text-brand text-sm font-medium hover:underline", children: "Choose File" })
|
|
@@ -188,111 +172,105 @@ const K = o.forwardRef(({ className: a, label: t, subLabel: l, ...r }, d) => {
|
|
|
188
172
|
]
|
|
189
173
|
}
|
|
190
174
|
);
|
|
191
|
-
})
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
175
|
+
}), le = j("file-upload", {
|
|
176
|
+
part: "list",
|
|
177
|
+
displayName: "FileUploadList",
|
|
178
|
+
className: "flex flex-col gap-3"
|
|
179
|
+
}), oe = v(
|
|
180
|
+
"FileUploadItem",
|
|
181
|
+
({ className: a, file: t, onRemove: l, onView: o, onClick: s, ...p }, m) => {
|
|
182
|
+
const { t: d } = T(), { removeFile: U, disabled: f } = I(), u = (n) => {
|
|
183
|
+
n.stopPropagation(), l ? l() : U(t);
|
|
184
|
+
}, x = (n) => {
|
|
200
185
|
if (n === 0) return "0 B";
|
|
201
|
-
const
|
|
202
|
-
return parseFloat((n / Math.pow(
|
|
203
|
-
},
|
|
186
|
+
const r = 1024, h = ["B", "KB", "MB", "GB"], g = Math.floor(Math.log(n) / Math.log(r));
|
|
187
|
+
return parseFloat((n / Math.pow(r, g)).toFixed(2)) + " " + h[g];
|
|
188
|
+
}, b = (n) => {
|
|
204
189
|
switch (n.split(".").pop()?.toLowerCase()) {
|
|
205
190
|
case "xls":
|
|
206
191
|
case "xlsx":
|
|
207
|
-
return /* @__PURE__ */ e(
|
|
192
|
+
return /* @__PURE__ */ e(R, { size: 36 });
|
|
208
193
|
case "csv":
|
|
209
|
-
return /* @__PURE__ */ e(
|
|
194
|
+
return /* @__PURE__ */ e(O, { size: 36 });
|
|
210
195
|
case "txt":
|
|
211
196
|
return /* @__PURE__ */ e(A, { size: 36 });
|
|
212
197
|
default:
|
|
213
|
-
return /* @__PURE__ */ e(
|
|
198
|
+
return /* @__PURE__ */ e(P, { size: 36, className: "text-content-icon" });
|
|
214
199
|
}
|
|
215
200
|
};
|
|
216
201
|
return /* @__PURE__ */ e(
|
|
217
202
|
"div",
|
|
218
203
|
{
|
|
219
|
-
ref:
|
|
220
|
-
onClick:
|
|
221
|
-
className:
|
|
204
|
+
ref: m,
|
|
205
|
+
onClick: s,
|
|
206
|
+
className: F(
|
|
222
207
|
"flex flex-col justify-between items-stretch gap-2 p-4 border border-stroke-hairline rounded-xl bg-canvas-elevated",
|
|
223
|
-
|
|
208
|
+
s && "cursor-pointer",
|
|
224
209
|
a
|
|
225
210
|
),
|
|
226
211
|
"data-component": "file-upload-item",
|
|
227
212
|
"data-file-name": t.name,
|
|
228
213
|
"data-file-size": t.size,
|
|
229
|
-
...
|
|
214
|
+
...p,
|
|
230
215
|
children: /* @__PURE__ */ c("div", { className: "flex justify-between items-center gap-2 z-10", children: [
|
|
231
216
|
/* @__PURE__ */ c("div", { className: "flex gap-2 min-w-0", children: [
|
|
232
|
-
/* @__PURE__ */ e("div", { className: "w-9 h-9 shrink-0", children:
|
|
217
|
+
/* @__PURE__ */ e("div", { className: "w-9 h-9 shrink-0", children: b(t.name) }),
|
|
233
218
|
/* @__PURE__ */ c("div", { className: "flex flex-col justify-between gap-[2px] min-w-0", children: [
|
|
234
|
-
/* @__PURE__ */ c(
|
|
235
|
-
/* @__PURE__ */ e(
|
|
236
|
-
/* @__PURE__ */ e(
|
|
219
|
+
/* @__PURE__ */ c(w, { children: [
|
|
220
|
+
/* @__PURE__ */ e(D, { asChild: !0, children: /* @__PURE__ */ e("span", { className: "text-xs font-bold text-content leading-[18px] line-clamp-1 break-all cursor-default", children: t.name }) }),
|
|
221
|
+
/* @__PURE__ */ e(z, { side: "top", variant: "tertiary", children: t.name })
|
|
237
222
|
] }),
|
|
238
|
-
/* @__PURE__ */ e("span", { className: "text-xs font-medium text-secondary-foreground leading-[16px]", children:
|
|
223
|
+
/* @__PURE__ */ e("span", { className: "text-xs font-medium text-secondary-foreground leading-[16px]", children: x(t.size) })
|
|
239
224
|
] })
|
|
240
225
|
] }),
|
|
241
226
|
/* @__PURE__ */ c("div", { className: "flex items-center gap-4 shrink-0", children: [
|
|
242
|
-
|
|
243
|
-
/* @__PURE__ */ e(
|
|
227
|
+
o && /* @__PURE__ */ c(w, { children: [
|
|
228
|
+
/* @__PURE__ */ e(D, { asChild: !0, children: /* @__PURE__ */ e(
|
|
244
229
|
"button",
|
|
245
230
|
{
|
|
246
231
|
onClick: (n) => {
|
|
247
|
-
n.stopPropagation(),
|
|
232
|
+
n.stopPropagation(), o();
|
|
248
233
|
},
|
|
249
234
|
className: "flex items-center justify-center text-content-tertiary hover:text-content transition-colors",
|
|
250
235
|
type: "button",
|
|
251
236
|
"aria-label": "View file data",
|
|
252
|
-
children: /* @__PURE__ */ e(
|
|
237
|
+
children: /* @__PURE__ */ e(M, { size: 18 })
|
|
253
238
|
}
|
|
254
239
|
) }),
|
|
255
|
-
/* @__PURE__ */ e(
|
|
240
|
+
/* @__PURE__ */ e(z, { side: "top", variant: "tertiary", children: "View" })
|
|
256
241
|
] }),
|
|
257
|
-
!
|
|
258
|
-
/* @__PURE__ */ e(
|
|
242
|
+
!f && /* @__PURE__ */ c(w, { children: [
|
|
243
|
+
/* @__PURE__ */ e(D, { asChild: !0, children: /* @__PURE__ */ e(
|
|
259
244
|
"button",
|
|
260
245
|
{
|
|
261
|
-
onClick:
|
|
246
|
+
onClick: u,
|
|
262
247
|
className: "flex items-center justify-center text-content-tertiary hover:text-destructive transition-colors",
|
|
263
248
|
type: "button",
|
|
264
|
-
"aria-label":
|
|
265
|
-
children: /* @__PURE__ */ e(
|
|
249
|
+
"aria-label": d("aria.removeFile"),
|
|
250
|
+
children: /* @__PURE__ */ e(B, { size: 14 })
|
|
266
251
|
}
|
|
267
252
|
) }),
|
|
268
|
-
/* @__PURE__ */ e(
|
|
253
|
+
/* @__PURE__ */ e(z, { side: "top", variant: "tertiary", children: d("aria.removeFile") })
|
|
269
254
|
] })
|
|
270
255
|
] })
|
|
271
256
|
] })
|
|
272
257
|
}
|
|
273
258
|
);
|
|
274
259
|
}
|
|
275
|
-
)
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
"
|
|
279
|
-
|
|
280
|
-
ref: r,
|
|
281
|
-
className: f("flex items-center justify-end gap-4 mt-auto", a),
|
|
282
|
-
...l,
|
|
283
|
-
children: t
|
|
284
|
-
}
|
|
285
|
-
));
|
|
286
|
-
J.displayName = "FileUploadFooter";
|
|
260
|
+
), ne = j("file-upload", {
|
|
261
|
+
part: "footer",
|
|
262
|
+
displayName: "FileUploadFooter",
|
|
263
|
+
className: "flex items-center justify-end gap-4 mt-auto"
|
|
264
|
+
});
|
|
287
265
|
export {
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
266
|
+
J as FileUpload,
|
|
267
|
+
te as FileUploadClose,
|
|
268
|
+
Q as FileUploadContent,
|
|
269
|
+
ee as FileUploadDescription,
|
|
270
|
+
ae as FileUploadDropZone,
|
|
271
|
+
ne as FileUploadFooter,
|
|
272
|
+
W as FileUploadHeader,
|
|
273
|
+
oe as FileUploadItem,
|
|
274
|
+
le as FileUploadList,
|
|
275
|
+
X as FileUploadTitle
|
|
298
276
|
};
|
|
@@ -1,68 +1,68 @@
|
|
|
1
1
|
import { jsx as e, jsxs as n } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import { Cross as
|
|
4
|
-
import { Info3d as
|
|
2
|
+
import "react";
|
|
3
|
+
import { Cross as B } from "impact-nova-icons";
|
|
4
|
+
import { Info3d as F, Success3d as H, Warning3d as S, Delete3d as V } from "../../ui/local-raster-icons/rasterIcons.js";
|
|
5
|
+
import { createComponent as p } from "../../../lib/primitives/create-component.js";
|
|
5
6
|
import { cn as r } from "../../../lib/utils.js";
|
|
6
7
|
import { useImpactNovaI18n as u } from "../../../i18n/use-impact-nova-i18n.js";
|
|
7
|
-
import { Tooltip as
|
|
8
|
+
import { Tooltip as W, TooltipTrigger as q, TooltipContent as A } from "../../feedback/tooltip/tooltip.js";
|
|
8
9
|
import { Button as f } from "../../primitives/button/button.js";
|
|
9
|
-
import { Dialog as
|
|
10
|
-
const
|
|
10
|
+
import { Dialog as E, DialogContent as G, DialogHeader as J, DialogTitle as K, DialogDescription as M, DialogFooter as Q } from "../../feedback/dialog/dialog.js";
|
|
11
|
+
const re = p("PromptClose", ({ className: i, ...s }, l) => {
|
|
11
12
|
const { t: c } = u();
|
|
12
|
-
return /* @__PURE__ */ n(
|
|
13
|
-
/* @__PURE__ */ e(
|
|
13
|
+
return /* @__PURE__ */ n(W, { children: [
|
|
14
|
+
/* @__PURE__ */ e(q, { asChild: !0, children: /* @__PURE__ */ e(
|
|
14
15
|
"button",
|
|
15
16
|
{
|
|
16
|
-
ref:
|
|
17
|
+
ref: l,
|
|
17
18
|
className: r("text-content-tertiary hover:text-content transition-colors", i),
|
|
18
19
|
type: "button",
|
|
19
20
|
"aria-label": c("aria.close"),
|
|
20
21
|
...s,
|
|
21
|
-
children: /* @__PURE__ */ e(
|
|
22
|
+
children: /* @__PURE__ */ e(B, { size: 16 })
|
|
22
23
|
}
|
|
23
24
|
) }),
|
|
24
|
-
/* @__PURE__ */ e(
|
|
25
|
+
/* @__PURE__ */ e(A, { side: "top", variant: "tertiary", children: c("aria.close") })
|
|
25
26
|
] });
|
|
26
|
-
})
|
|
27
|
-
|
|
28
|
-
const U = p.forwardRef(
|
|
27
|
+
}), oe = p(
|
|
28
|
+
"Prompt",
|
|
29
29
|
({
|
|
30
30
|
open: i,
|
|
31
31
|
onOpenChange: s,
|
|
32
|
-
title:
|
|
32
|
+
title: l,
|
|
33
33
|
description: c,
|
|
34
34
|
confirmLabel: x,
|
|
35
35
|
cancelLabel: b,
|
|
36
36
|
onConfirm: h,
|
|
37
37
|
onCancel: g,
|
|
38
|
-
confirmVariant:
|
|
39
|
-
cancelVariant:
|
|
38
|
+
confirmVariant: C,
|
|
39
|
+
cancelVariant: N = "secondary",
|
|
40
40
|
variant: t = "default",
|
|
41
|
-
showClose:
|
|
42
|
-
preventOutsideClick:
|
|
43
|
-
footer:
|
|
41
|
+
showClose: y = !0,
|
|
42
|
+
preventOutsideClick: v = !1,
|
|
43
|
+
footer: a,
|
|
44
44
|
children: d,
|
|
45
|
-
className:
|
|
45
|
+
className: w,
|
|
46
46
|
...D
|
|
47
47
|
}, j) => {
|
|
48
|
-
const { t: m } = u(),
|
|
48
|
+
const { t: m } = u(), k = b ?? m("prompt.cancel"), z = x ?? m("prompt.confirm"), P = () => {
|
|
49
49
|
h?.(), s?.(!1);
|
|
50
|
-
},
|
|
50
|
+
}, T = () => {
|
|
51
51
|
g?.(), s?.(!1);
|
|
52
|
-
}, o = t !== "default", I =
|
|
53
|
-
return /* @__PURE__ */ e(
|
|
54
|
-
|
|
52
|
+
}, o = t !== "default", I = C || (t === "destructive" ? "destructive" : "default");
|
|
53
|
+
return /* @__PURE__ */ e(E, { open: i, onOpenChange: s, ...D, children: /* @__PURE__ */ n(
|
|
54
|
+
G,
|
|
55
55
|
{
|
|
56
56
|
ref: j,
|
|
57
57
|
"aria-describedby": void 0,
|
|
58
|
-
hideClose: !
|
|
58
|
+
hideClose: !y,
|
|
59
59
|
onPointerDownOutside: (L) => {
|
|
60
|
-
|
|
60
|
+
v && L.preventDefault();
|
|
61
61
|
},
|
|
62
62
|
className: r(
|
|
63
63
|
"max-w-[400px] gap-0",
|
|
64
64
|
o && "flex flex-col items-center p-6 pt-6 text-center",
|
|
65
|
-
|
|
65
|
+
w
|
|
66
66
|
),
|
|
67
67
|
"data-component": "prompt",
|
|
68
68
|
"data-variant": t,
|
|
@@ -75,32 +75,32 @@ const U = p.forwardRef(
|
|
|
75
75
|
t === "info" && "bg-brand-tint text-brand",
|
|
76
76
|
t === "success" && "bg-feedback-success-surface text-success",
|
|
77
77
|
t === "warning" && "bg-feedback-warning-surface text-content",
|
|
78
|
-
t === "destructive" && "bg-
|
|
78
|
+
t === "destructive" && "bg-feedback-error-surface text-destructive"
|
|
79
79
|
),
|
|
80
80
|
children: [
|
|
81
|
-
t === "info" && /* @__PURE__ */ e(
|
|
82
|
-
t === "success" && /* @__PURE__ */ e(
|
|
83
|
-
t === "warning" && /* @__PURE__ */ e(
|
|
84
|
-
t === "destructive" && /* @__PURE__ */ e(
|
|
81
|
+
t === "info" && /* @__PURE__ */ e(F, { size: 24 }),
|
|
82
|
+
t === "success" && /* @__PURE__ */ e(H, { size: 24 }),
|
|
83
|
+
t === "warning" && /* @__PURE__ */ e(S, { size: 24 }),
|
|
84
|
+
t === "destructive" && /* @__PURE__ */ e(V, { size: 24 })
|
|
85
85
|
]
|
|
86
86
|
}
|
|
87
87
|
),
|
|
88
88
|
/* @__PURE__ */ n(
|
|
89
|
-
|
|
89
|
+
J,
|
|
90
90
|
{
|
|
91
91
|
className: r(o && "space-y-2 items-center bg-canvas-elevated border-none"),
|
|
92
92
|
children: [
|
|
93
93
|
/* @__PURE__ */ e(
|
|
94
|
-
|
|
94
|
+
K,
|
|
95
95
|
{
|
|
96
96
|
className: r(
|
|
97
97
|
o && "text-[18px] font-extrabold text-content"
|
|
98
98
|
),
|
|
99
|
-
children:
|
|
99
|
+
children: l
|
|
100
100
|
}
|
|
101
101
|
),
|
|
102
102
|
c && /* @__PURE__ */ e(
|
|
103
|
-
|
|
103
|
+
M,
|
|
104
104
|
{
|
|
105
105
|
className: r(o && "text-sm text-content-tertiary"),
|
|
106
106
|
children: c
|
|
@@ -110,8 +110,8 @@ const U = p.forwardRef(
|
|
|
110
110
|
}
|
|
111
111
|
),
|
|
112
112
|
d && /* @__PURE__ */ e("div", { className: r("w-full py-2", o && "text-center"), children: d }),
|
|
113
|
-
|
|
114
|
-
|
|
113
|
+
a ? /* @__PURE__ */ e("div", { className: "w-full", children: a }) : /* @__PURE__ */ n(
|
|
114
|
+
Q,
|
|
115
115
|
{
|
|
116
116
|
className: r(
|
|
117
117
|
o && "mt-6 flex flex-row justify-center gap-3 w-full sm:justify-center px-0 pb-0"
|
|
@@ -120,19 +120,19 @@ const U = p.forwardRef(
|
|
|
120
120
|
/* @__PURE__ */ e(
|
|
121
121
|
f,
|
|
122
122
|
{
|
|
123
|
-
variant:
|
|
124
|
-
onClick:
|
|
123
|
+
variant: N,
|
|
124
|
+
onClick: T,
|
|
125
125
|
className: r(o && "h-10 px-6"),
|
|
126
|
-
children:
|
|
126
|
+
children: k
|
|
127
127
|
}
|
|
128
128
|
),
|
|
129
129
|
/* @__PURE__ */ e(
|
|
130
130
|
f,
|
|
131
131
|
{
|
|
132
132
|
variant: I,
|
|
133
|
-
onClick:
|
|
133
|
+
onClick: P,
|
|
134
134
|
className: r(o && "h-10 px-6"),
|
|
135
|
-
children:
|
|
135
|
+
children: z
|
|
136
136
|
}
|
|
137
137
|
)
|
|
138
138
|
]
|
|
@@ -143,8 +143,7 @@ const U = p.forwardRef(
|
|
|
143
143
|
) });
|
|
144
144
|
}
|
|
145
145
|
);
|
|
146
|
-
U.displayName = "Prompt";
|
|
147
146
|
export {
|
|
148
|
-
|
|
149
|
-
|
|
147
|
+
oe as Prompt,
|
|
148
|
+
re as PromptClose
|
|
150
149
|
};
|