@lincyaw/aegis-ui 0.10.0 → 0.11.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/agent/ask/AskPanel.cjs +1 -1
- package/dist/agent/ask/AskPanel.cjs.map +1 -1
- package/dist/agent/ask/AskPanel.d.ts +5 -0
- package/dist/agent/ask/AskPanel.js +107 -100
- package/dist/agent/ask/AskPanel.js.map +1 -1
- package/dist/commands/commandContext.cjs.map +1 -1
- package/dist/commands/commandContext.d.ts +4 -1
- package/dist/commands/commandContext.js.map +1 -1
- package/dist/components/ui/AgentPanel.cjs +1 -1
- package/dist/components/ui/AgentPanel.cjs.map +1 -1
- package/dist/components/ui/AgentPanel.js +15 -14
- package/dist/components/ui/AgentPanel.js.map +1 -1
- package/dist/components/ui/Avatar.cjs +1 -1
- package/dist/components/ui/Avatar.cjs.map +1 -1
- package/dist/components/ui/Avatar.js +21 -19
- package/dist/components/ui/Avatar.js.map +1 -1
- package/dist/components/ui/BlastRadiusBar.cjs +1 -1
- package/dist/components/ui/BlastRadiusBar.cjs.map +1 -1
- package/dist/components/ui/BlastRadiusBar.d.ts +16 -4
- package/dist/components/ui/BlastRadiusBar.js +27 -23
- package/dist/components/ui/BlastRadiusBar.js.map +1 -1
- package/dist/components/ui/ChatComposer.cjs +1 -1
- package/dist/components/ui/ChatComposer.cjs.map +1 -1
- package/dist/components/ui/ChatComposer.js +32 -31
- package/dist/components/ui/ChatComposer.js.map +1 -1
- package/dist/components/ui/ChatSessionList.cjs +1 -1
- package/dist/components/ui/ChatSessionList.cjs.map +1 -1
- package/dist/components/ui/ChatSessionList.js +68 -66
- package/dist/components/ui/ChatSessionList.js.map +1 -1
- package/dist/components/ui/Checkbox.cjs +1 -1
- package/dist/components/ui/Checkbox.cjs.map +1 -1
- package/dist/components/ui/Checkbox.d.ts +6 -2
- package/dist/components/ui/Checkbox.js +21 -17
- package/dist/components/ui/Checkbox.js.map +1 -1
- package/dist/components/ui/ChoiceCardGroup.cjs +1 -1
- package/dist/components/ui/ChoiceCardGroup.cjs.map +1 -1
- package/dist/components/ui/ChoiceCardGroup.d.ts +13 -4
- package/dist/components/ui/ChoiceCardGroup.js +47 -35
- package/dist/components/ui/ChoiceCardGroup.js.map +1 -1
- package/dist/components/ui/CodeEditor.cjs +1 -1
- package/dist/components/ui/CodeEditor.cjs.map +1 -1
- package/dist/components/ui/CodeEditor.d.ts +11 -1
- package/dist/components/ui/CodeEditor.js +100 -74
- package/dist/components/ui/CodeEditor.js.map +1 -1
- package/dist/components/ui/CommandInvocationCard.cjs +1 -1
- package/dist/components/ui/CommandInvocationCard.cjs.map +1 -1
- package/dist/components/ui/CommandInvocationCard.js +28 -31
- package/dist/components/ui/CommandInvocationCard.js.map +1 -1
- package/dist/components/ui/CommandPalette.cjs +1 -1
- package/dist/components/ui/CommandPalette.cjs.map +1 -1
- package/dist/components/ui/CommandPalette.d.ts +3 -3
- package/dist/components/ui/CommandPalette.js +75 -75
- package/dist/components/ui/CommandPalette.js.map +1 -1
- package/dist/components/ui/CommitGraph.cjs +1 -1
- package/dist/components/ui/CommitGraph.cjs.map +1 -1
- package/dist/components/ui/CommitGraph.d.ts +3 -1
- package/dist/components/ui/CommitGraph.js +77 -74
- package/dist/components/ui/CommitGraph.js.map +1 -1
- package/dist/components/ui/ContentInspectorDialog.cjs +1 -1
- package/dist/components/ui/ContentInspectorDialog.cjs.map +1 -1
- package/dist/components/ui/ContentInspectorDialog.js +25 -31
- package/dist/components/ui/ContentInspectorDialog.js.map +1 -1
- package/dist/components/ui/ContentPreview.cjs +2 -2
- package/dist/components/ui/ContentPreview.cjs.map +1 -1
- package/dist/components/ui/ContentPreview.js +55 -56
- package/dist/components/ui/ContentPreview.js.map +1 -1
- package/dist/components/ui/DangerZone.cjs +1 -1
- package/dist/components/ui/DangerZone.cjs.map +1 -1
- package/dist/components/ui/DangerZone.js +13 -12
- package/dist/components/ui/DangerZone.js.map +1 -1
- package/dist/components/ui/DataList.cjs +1 -1
- package/dist/components/ui/DataList.cjs.map +1 -1
- package/dist/components/ui/DataList.js +25 -24
- package/dist/components/ui/DataList.js.map +1 -1
- package/dist/components/ui/DataTable.cjs +1 -1
- package/dist/components/ui/DataTable.cjs.map +1 -1
- package/dist/components/ui/DataTable.js +41 -41
- package/dist/components/ui/DataTable.js.map +1 -1
- package/dist/components/ui/DropdownMenu.cjs +1 -1
- package/dist/components/ui/DropdownMenu.cjs.map +1 -1
- package/dist/components/ui/DropdownMenu.js +41 -40
- package/dist/components/ui/DropdownMenu.js.map +1 -1
- package/dist/components/ui/EnvironmentSwitcher.cjs +1 -1
- package/dist/components/ui/EnvironmentSwitcher.cjs.map +1 -1
- package/dist/components/ui/EnvironmentSwitcher.js +26 -24
- package/dist/components/ui/EnvironmentSwitcher.js.map +1 -1
- package/dist/components/ui/EventTable.cjs +1 -1
- package/dist/components/ui/EventTable.cjs.map +1 -1
- package/dist/components/ui/EventTable.js +60 -53
- package/dist/components/ui/EventTable.js.map +1 -1
- package/dist/components/ui/FileDropzone.cjs +1 -1
- package/dist/components/ui/FileDropzone.cjs.map +1 -1
- package/dist/components/ui/FileDropzone.js +38 -40
- package/dist/components/ui/FileDropzone.js.map +1 -1
- package/dist/components/ui/FilePreview.cjs +1 -1
- package/dist/components/ui/FilePreview.cjs.map +1 -1
- package/dist/components/ui/FilePreview.js +60 -61
- package/dist/components/ui/FilePreview.js.map +1 -1
- package/dist/components/ui/FolderDropzone.cjs +1 -1
- package/dist/components/ui/FolderDropzone.cjs.map +1 -1
- package/dist/components/ui/FolderDropzone.js +114 -84
- package/dist/components/ui/FolderDropzone.js.map +1 -1
- package/dist/components/ui/ForgotPasswordForm.cjs +1 -1
- package/dist/components/ui/ForgotPasswordForm.cjs.map +1 -1
- package/dist/components/ui/ForgotPasswordForm.js +22 -21
- package/dist/components/ui/ForgotPasswordForm.js.map +1 -1
- package/dist/components/ui/FormRow.cjs +1 -1
- package/dist/components/ui/FormRow.cjs.map +1 -1
- package/dist/components/ui/FormRow.d.ts +32 -11
- package/dist/components/ui/FormRow.js +24 -15
- package/dist/components/ui/FormRow.js.map +1 -1
- package/dist/components/ui/InboxPage.cjs +1 -1
- package/dist/components/ui/InboxPage.cjs.map +1 -1
- package/dist/components/ui/InboxPage.d.ts +12 -3
- package/dist/components/ui/InboxPage.js +91 -77
- package/dist/components/ui/InboxPage.js.map +1 -1
- package/dist/components/ui/LoginForm.cjs +1 -1
- package/dist/components/ui/LoginForm.cjs.map +1 -1
- package/dist/components/ui/LoginForm.js +43 -43
- package/dist/components/ui/LoginForm.js.map +1 -1
- package/dist/components/ui/MonoValue.cjs +1 -1
- package/dist/components/ui/MonoValue.cjs.map +1 -1
- package/dist/components/ui/MonoValue.d.ts +5 -1
- package/dist/components/ui/MonoValue.js +17 -17
- package/dist/components/ui/MonoValue.js.map +1 -1
- package/dist/components/ui/NotificationBell.cjs +1 -1
- package/dist/components/ui/NotificationBell.cjs.map +1 -1
- package/dist/components/ui/NotificationBell.d.ts +17 -1
- package/dist/components/ui/NotificationBell.js +129 -75
- package/dist/components/ui/NotificationBell.js.map +1 -1
- package/dist/components/ui/NumberField.cjs +1 -1
- package/dist/components/ui/NumberField.cjs.map +1 -1
- package/dist/components/ui/NumberField.d.ts +3 -1
- package/dist/components/ui/NumberField.js +52 -49
- package/dist/components/ui/NumberField.js.map +1 -1
- package/dist/components/ui/ObjectBrowser.cjs +1 -1
- package/dist/components/ui/ObjectBrowser.cjs.map +1 -1
- package/dist/components/ui/ObjectBrowser.js +83 -78
- package/dist/components/ui/ObjectBrowser.js.map +1 -1
- package/dist/components/ui/PageSizeSelect.cjs +1 -1
- package/dist/components/ui/PageSizeSelect.cjs.map +1 -1
- package/dist/components/ui/PageSizeSelect.js +30 -29
- package/dist/components/ui/PageSizeSelect.js.map +1 -1
- package/dist/components/ui/Panel.cjs.map +1 -1
- package/dist/components/ui/Panel.d.ts +5 -2
- package/dist/components/ui/Panel.js.map +1 -1
- package/dist/components/ui/ParquetViewer.cjs +1 -1
- package/dist/components/ui/ParquetViewer.cjs.map +1 -1
- package/dist/components/ui/ParquetViewer.js +69 -74
- package/dist/components/ui/ParquetViewer.js.map +1 -1
- package/dist/components/ui/PasswordField.cjs +1 -1
- package/dist/components/ui/PasswordField.cjs.map +1 -1
- package/dist/components/ui/PasswordField.js +28 -27
- package/dist/components/ui/PasswordField.js.map +1 -1
- package/dist/components/ui/PickerField.cjs +1 -1
- package/dist/components/ui/PickerField.cjs.map +1 -1
- package/dist/components/ui/PickerField.d.ts +25 -6
- package/dist/components/ui/PickerField.js +20 -17
- package/dist/components/ui/PickerField.js.map +1 -1
- package/dist/components/ui/ProjectSelector.cjs +1 -1
- package/dist/components/ui/ProjectSelector.cjs.map +1 -1
- package/dist/components/ui/ProjectSelector.js +40 -37
- package/dist/components/ui/ProjectSelector.js.map +1 -1
- package/dist/components/ui/QueryAutocomplete.cjs +1 -1
- package/dist/components/ui/QueryAutocomplete.cjs.map +1 -1
- package/dist/components/ui/QueryAutocomplete.d.ts +7 -1
- package/dist/components/ui/QueryAutocomplete.js +141 -134
- package/dist/components/ui/QueryAutocomplete.js.map +1 -1
- package/dist/components/ui/RegisterForm.cjs +1 -1
- package/dist/components/ui/RegisterForm.cjs.map +1 -1
- package/dist/components/ui/RegisterForm.js +41 -40
- package/dist/components/ui/RegisterForm.js.map +1 -1
- package/dist/components/ui/ResizableSidePanel.cjs +1 -1
- package/dist/components/ui/ResizableSidePanel.cjs.map +1 -1
- package/dist/components/ui/ResizableSidePanel.js +41 -40
- package/dist/components/ui/ResizableSidePanel.js.map +1 -1
- package/dist/components/ui/SavedQueryBar.cjs +1 -1
- package/dist/components/ui/SavedQueryBar.cjs.map +1 -1
- package/dist/components/ui/SavedQueryBar.d.ts +1 -1
- package/dist/components/ui/SavedQueryBar.js +375 -277
- package/dist/components/ui/SavedQueryBar.js.map +1 -1
- package/dist/components/ui/SearchInput.cjs +1 -1
- package/dist/components/ui/SearchInput.cjs.map +1 -1
- package/dist/components/ui/SearchInput.d.ts +5 -1
- package/dist/components/ui/SearchInput.js +28 -24
- package/dist/components/ui/SearchInput.js.map +1 -1
- package/dist/components/ui/Select.cjs +1 -1
- package/dist/components/ui/Select.cjs.map +1 -1
- package/dist/components/ui/Select.d.ts +3 -1
- package/dist/components/ui/Select.js +21 -19
- package/dist/components/ui/Select.js.map +1 -1
- package/dist/components/ui/ServiceMap.cjs +1 -1
- package/dist/components/ui/ServiceMap.cjs.map +1 -1
- package/dist/components/ui/ServiceMap.d.ts +9 -3
- package/dist/components/ui/ServiceMap.js +291 -231
- package/dist/components/ui/ServiceMap.js.map +1 -1
- package/dist/components/ui/Slider.cjs +1 -1
- package/dist/components/ui/Slider.cjs.map +1 -1
- package/dist/components/ui/Slider.d.ts +3 -1
- package/dist/components/ui/Slider.js +11 -9
- package/dist/components/ui/Slider.js.map +1 -1
- package/dist/components/ui/SparkLine.cjs +1 -1
- package/dist/components/ui/SparkLine.cjs.map +1 -1
- package/dist/components/ui/SparkLine.js +24 -23
- package/dist/components/ui/SparkLine.js.map +1 -1
- package/dist/components/ui/Steps.cjs +1 -1
- package/dist/components/ui/Steps.cjs.map +1 -1
- package/dist/components/ui/Steps.js +25 -29
- package/dist/components/ui/Steps.js.map +1 -1
- package/dist/components/ui/Terminal.cjs +1 -1
- package/dist/components/ui/Terminal.cjs.map +1 -1
- package/dist/components/ui/Terminal.js +18 -17
- package/dist/components/ui/Terminal.js.map +1 -1
- package/dist/components/ui/TextField.cjs +1 -1
- package/dist/components/ui/TextField.cjs.map +1 -1
- package/dist/components/ui/TextField.js +6 -6
- package/dist/components/ui/TextField.js.map +1 -1
- package/dist/components/ui/ThemeToggle.cjs +1 -1
- package/dist/components/ui/ThemeToggle.cjs.map +1 -1
- package/dist/components/ui/ThemeToggle.js +15 -18
- package/dist/components/ui/ThemeToggle.js.map +1 -1
- package/dist/components/ui/TimeDisplay.cjs +1 -1
- package/dist/components/ui/TimeDisplay.cjs.map +1 -1
- package/dist/components/ui/TimeDisplay.js +12 -12
- package/dist/components/ui/TimeDisplay.js.map +1 -1
- package/dist/components/ui/TimeRangePicker.cjs +1 -1
- package/dist/components/ui/TimeRangePicker.cjs.map +1 -1
- package/dist/components/ui/TimeRangePicker.js +128 -111
- package/dist/components/ui/TimeRangePicker.js.map +1 -1
- package/dist/components/ui/TraceSpanInspector.cjs +1 -1
- package/dist/components/ui/TraceSpanInspector.cjs.map +1 -1
- package/dist/components/ui/TraceSpanInspector.js +43 -46
- package/dist/components/ui/TraceSpanInspector.js.map +1 -1
- package/dist/components/ui/TraceTree.cjs +1 -1
- package/dist/components/ui/TraceTree.cjs.map +1 -1
- package/dist/components/ui/TraceTree.d.ts +1 -1
- package/dist/components/ui/TraceTree.js +33 -33
- package/dist/components/ui/TraceTree.js.map +1 -1
- package/dist/components/ui/UploadQueue.cjs +1 -1
- package/dist/components/ui/UploadQueue.cjs.map +1 -1
- package/dist/components/ui/UploadQueue.js +59 -70
- package/dist/components/ui/UploadQueue.js.map +1 -1
- package/dist/components/ui/authValidation.cjs +1 -1
- package/dist/components/ui/authValidation.cjs.map +1 -1
- package/dist/components/ui/authValidation.d.ts +2 -2
- package/dist/components/ui/authValidation.js +4 -5
- package/dist/components/ui/authValidation.js.map +1 -1
- package/dist/components/ui/classifyContent.cjs +3 -3
- package/dist/components/ui/classifyContent.cjs.map +1 -1
- package/dist/components/ui/classifyContent.d.ts +2 -1
- package/dist/components/ui/classifyContent.js +52 -54
- package/dist/components/ui/classifyContent.js.map +1 -1
- package/dist/components/ui/relativeTime.cjs +1 -1
- package/dist/components/ui/relativeTime.cjs.map +1 -1
- package/dist/components/ui/relativeTime.d.ts +5 -3
- package/dist/components/ui/relativeTime.js +15 -6
- package/dist/components/ui/relativeTime.js.map +1 -1
- package/dist/hooks/popoverOverflow.cjs +2 -0
- package/dist/hooks/popoverOverflow.cjs.map +1 -0
- package/dist/hooks/popoverOverflow.d.ts +8 -0
- package/dist/hooks/popoverOverflow.js +9 -0
- package/dist/hooks/popoverOverflow.js.map +1 -0
- package/dist/hooks/useDialogPopover.cjs +2 -0
- package/dist/hooks/useDialogPopover.cjs.map +1 -0
- package/dist/hooks/useDialogPopover.d.ts +23 -0
- package/dist/hooks/useDialogPopover.js +48 -0
- package/dist/hooks/useDialogPopover.js.map +1 -0
- package/dist/hooks/useMenuPopover.cjs +1 -1
- package/dist/hooks/useMenuPopover.cjs.map +1 -1
- package/dist/hooks/useMenuPopover.d.ts +0 -8
- package/dist/hooks/useMenuPopover.js +17 -22
- package/dist/hooks/useMenuPopover.js.map +1 -1
- package/dist/hooks/useSavedQueries.cjs +1 -1
- package/dist/hooks/useSavedQueries.cjs.map +1 -1
- package/dist/hooks/useSavedQueries.js +29 -28
- package/dist/hooks/useSavedQueries.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/layouts/shell/AegisShell.cjs +1 -1
- package/dist/layouts/shell/AegisShell.cjs.map +1 -1
- package/dist/layouts/shell/AegisShell.js +41 -41
- package/dist/layouts/shell/AegisShell.js.map +1 -1
- package/dist/layouts/shell/AppSwitcher.cjs +1 -1
- package/dist/layouts/shell/AppSwitcher.cjs.map +1 -1
- package/dist/layouts/shell/AppSwitcher.js +53 -36
- package/dist/layouts/shell/AppSwitcher.js.map +1 -1
- package/dist/layouts/shell/AuthRequiredCard.cjs +1 -1
- package/dist/layouts/shell/AuthRequiredCard.cjs.map +1 -1
- package/dist/layouts/shell/AuthRequiredCard.js +24 -22
- package/dist/layouts/shell/AuthRequiredCard.js.map +1 -1
- package/dist/layouts/shell/RouteErrorBoundary.cjs +1 -1
- package/dist/layouts/shell/RouteErrorBoundary.cjs.map +1 -1
- package/dist/layouts/shell/RouteErrorBoundary.d.ts +4 -1
- package/dist/layouts/shell/RouteErrorBoundary.js +15 -10
- package/dist/layouts/shell/RouteErrorBoundary.js.map +1 -1
- package/dist/layouts/shell/ShellInboxPage.cjs +1 -1
- package/dist/layouts/shell/ShellInboxPage.cjs.map +1 -1
- package/dist/layouts/shell/ShellInboxPage.js +17 -16
- package/dist/layouts/shell/ShellInboxPage.js.map +1 -1
- package/dist/layouts/shell/ShellNotificationBell.cjs +1 -1
- package/dist/layouts/shell/ShellNotificationBell.cjs.map +1 -1
- package/dist/layouts/shell/ShellNotificationBell.js +20 -14
- package/dist/layouts/shell/ShellNotificationBell.js.map +1 -1
- package/dist/layouts/shell/TopHeader.cjs +1 -1
- package/dist/layouts/shell/TopHeader.cjs.map +1 -1
- package/dist/layouts/shell/TopHeader.js +74 -74
- package/dist/layouts/shell/TopHeader.js.map +1 -1
- package/dist/layouts/shell/useShellUser.cjs +1 -1
- package/dist/layouts/shell/useShellUser.cjs.map +1 -1
- package/dist/layouts/shell/useShellUser.js +15 -13
- package/dist/layouts/shell/useShellUser.js.map +1 -1
- package/dist/lib/chart.cjs +1 -1
- package/dist/lib/chart.cjs.map +1 -1
- package/dist/lib/chart.d.ts +5 -7
- package/dist/lib/chart.js +49 -34
- package/dist/lib/chart.js.map +1 -1
- package/dist/lib/timeRange.cjs +1 -1
- package/dist/lib/timeRange.cjs.map +1 -1
- package/dist/lib/timeRange.d.ts +14 -4
- package/dist/lib/timeRange.js +41 -40
- package/dist/lib/timeRange.js.map +1 -1
- package/dist/locale/strings.cjs +1 -1
- package/dist/locale/strings.cjs.map +1 -1
- package/dist/locale/strings.d.ts +241 -2
- package/dist/locale/strings.js +543 -26
- package/dist/locale/strings.js.map +1 -1
- package/dist/notifications/notificationContext.cjs.map +1 -1
- package/dist/notifications/notificationContext.d.ts +12 -2
- package/dist/notifications/notificationContext.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/theme/antdTheme.cjs +1 -1
- package/dist/theme/antdTheme.cjs.map +1 -1
- package/dist/theme/antdTheme.js +2 -0
- package/dist/theme/antdTheme.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,138 +1,168 @@
|
|
|
1
|
-
import { jsxs as g, jsx as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { useDropzone as
|
|
4
|
-
import { formatBytes as
|
|
5
|
-
import { Button as
|
|
1
|
+
import { jsxs as g, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as E, useState as H, useCallback as a } from "react";
|
|
3
|
+
import { useDropzone as K } from "react-dropzone";
|
|
4
|
+
import { formatBytes as c } from "../../lib/format.js";
|
|
5
|
+
import { Button as k } from "./Button.js";
|
|
6
6
|
/* empty css */
|
|
7
|
-
import { filesFromEvent as
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
7
|
+
import { filesFromEvent as q } from "./dropFiles.js";
|
|
8
|
+
import { useStrings as G } from "../../locale/useStrings.js";
|
|
9
|
+
function J(e, l) {
|
|
10
|
+
switch (e.kind) {
|
|
11
|
+
case "tooMany":
|
|
12
|
+
return l.folderDropzoneTooMany(e.count, e.max);
|
|
13
|
+
case "fileTooLarge":
|
|
14
|
+
return l.folderDropzoneFileTooLarge(
|
|
15
|
+
e.name,
|
|
16
|
+
c(e.size),
|
|
17
|
+
c(e.max)
|
|
18
|
+
);
|
|
19
|
+
case "totalTooLarge":
|
|
20
|
+
return l.folderDropzoneTotalTooLarge(
|
|
21
|
+
c(e.total),
|
|
22
|
+
c(e.max)
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
function $({
|
|
27
|
+
value: e,
|
|
28
|
+
onFilesChange: l,
|
|
29
|
+
maxFileBytes: f,
|
|
30
|
+
maxTotalBytes: d,
|
|
31
|
+
maxFiles: u,
|
|
32
|
+
accept: D,
|
|
33
|
+
disabled: o = !1,
|
|
34
|
+
helperText: N,
|
|
35
|
+
validationError: T,
|
|
36
|
+
summary: y,
|
|
37
|
+
className: j
|
|
20
38
|
}) {
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
39
|
+
const i = G(), p = E(null), m = E(null), [C, s] = H(
|
|
40
|
+
null
|
|
41
|
+
), h = a(
|
|
42
|
+
(n) => {
|
|
43
|
+
if (!o && n.length !== 0) {
|
|
44
|
+
if (u !== void 0 && n.length > u) {
|
|
45
|
+
s({
|
|
46
|
+
kind: "tooMany",
|
|
47
|
+
count: n.length,
|
|
48
|
+
max: u
|
|
49
|
+
});
|
|
28
50
|
return;
|
|
29
51
|
}
|
|
30
|
-
if (
|
|
31
|
-
const r =
|
|
52
|
+
if (f !== void 0) {
|
|
53
|
+
const r = n.find((v) => v.size > f);
|
|
32
54
|
if (r) {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
55
|
+
s({
|
|
56
|
+
kind: "fileTooLarge",
|
|
57
|
+
name: r.name,
|
|
58
|
+
size: r.size,
|
|
59
|
+
max: f
|
|
60
|
+
});
|
|
36
61
|
return;
|
|
37
62
|
}
|
|
38
63
|
}
|
|
39
|
-
if (
|
|
40
|
-
const r =
|
|
41
|
-
if (r >
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
64
|
+
if (d !== void 0) {
|
|
65
|
+
const r = n.reduce((v, x) => v + x.size, 0);
|
|
66
|
+
if (r > d) {
|
|
67
|
+
s({
|
|
68
|
+
kind: "totalTooLarge",
|
|
69
|
+
total: r,
|
|
70
|
+
max: d
|
|
71
|
+
});
|
|
45
72
|
return;
|
|
46
73
|
}
|
|
47
74
|
}
|
|
48
|
-
|
|
75
|
+
s(null), l(n);
|
|
49
76
|
}
|
|
50
77
|
},
|
|
51
|
-
[
|
|
52
|
-
),
|
|
53
|
-
u.current?.click();
|
|
54
|
-
}, []), R = l(() => {
|
|
78
|
+
[o, u, f, d, l]
|
|
79
|
+
), M = a(() => {
|
|
55
80
|
p.current?.click();
|
|
56
|
-
}, []),
|
|
57
|
-
|
|
58
|
-
}, [
|
|
59
|
-
|
|
60
|
-
|
|
81
|
+
}, []), R = a(() => {
|
|
82
|
+
m.current?.click();
|
|
83
|
+
}, []), A = a(() => {
|
|
84
|
+
o || (s(null), l([]), p.current && (p.current.value = ""), m.current && (m.current.value = ""));
|
|
85
|
+
}, [o, l]), { getRootProps: F, isDragActive: I } = K({
|
|
86
|
+
onDrop: h,
|
|
87
|
+
disabled: o,
|
|
61
88
|
noClick: !0,
|
|
62
89
|
noKeyboard: !0,
|
|
63
|
-
getFilesFromEvent:
|
|
64
|
-
}),
|
|
65
|
-
(
|
|
66
|
-
const r =
|
|
67
|
-
r &&
|
|
90
|
+
getFilesFromEvent: q
|
|
91
|
+
}), L = a(
|
|
92
|
+
(n) => {
|
|
93
|
+
const r = n.target.files;
|
|
94
|
+
r && h(Array.from(r));
|
|
68
95
|
},
|
|
69
|
-
[
|
|
70
|
-
),
|
|
96
|
+
[h]
|
|
97
|
+
), _ = T ?? (C ? J(C, i) : ""), z = e.length > 0, P = e.reduce((n, r) => n + r.size, 0), S = [
|
|
71
98
|
"aegis-folder-dropzone__surface",
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
].filter(Boolean).join(" "),
|
|
76
|
-
return /* @__PURE__ */ g("div", { className:
|
|
77
|
-
/* @__PURE__ */ g("div", { ...
|
|
99
|
+
I ? "aegis-folder-dropzone__surface--active" : "",
|
|
100
|
+
o ? "aegis-folder-dropzone__surface--disabled" : "",
|
|
101
|
+
_ ? "aegis-folder-dropzone__surface--error" : ""
|
|
102
|
+
].filter(Boolean).join(" "), w = ["aegis-folder-dropzone", j ?? ""].filter(Boolean).join(" ");
|
|
103
|
+
return /* @__PURE__ */ g("div", { className: w, children: [
|
|
104
|
+
/* @__PURE__ */ g("div", { ...F({ className: S }), children: [
|
|
78
105
|
/* @__PURE__ */ g("div", { className: "aegis-folder-dropzone__hint", children: [
|
|
79
|
-
/* @__PURE__ */
|
|
80
|
-
|
|
106
|
+
/* @__PURE__ */ t("span", { className: "aegis-folder-dropzone__primary", children: I ? i.dropzoneDropFolder : z ? i.folderDropzoneSelected(
|
|
107
|
+
e.length,
|
|
108
|
+
c(P)
|
|
109
|
+
) : i.folderDropzoneHint }),
|
|
110
|
+
!z && N !== void 0 ? /* @__PURE__ */ t("span", { className: "aegis-folder-dropzone__meta", children: N }) : null
|
|
81
111
|
] }),
|
|
82
112
|
/* @__PURE__ */ g("div", { className: "aegis-folder-dropzone__actions", children: [
|
|
83
|
-
/* @__PURE__ */
|
|
84
|
-
|
|
113
|
+
/* @__PURE__ */ t(
|
|
114
|
+
k,
|
|
85
115
|
{
|
|
86
116
|
tone: "secondary",
|
|
87
|
-
onClick:
|
|
88
|
-
disabled:
|
|
89
|
-
children:
|
|
117
|
+
onClick: M,
|
|
118
|
+
disabled: o,
|
|
119
|
+
children: i.chooseFolder
|
|
90
120
|
}
|
|
91
121
|
),
|
|
92
|
-
/* @__PURE__ */
|
|
93
|
-
|
|
122
|
+
/* @__PURE__ */ t(
|
|
123
|
+
k,
|
|
94
124
|
{
|
|
95
125
|
tone: "secondary",
|
|
96
126
|
onClick: R,
|
|
97
|
-
disabled:
|
|
98
|
-
children:
|
|
127
|
+
disabled: o,
|
|
128
|
+
children: i.chooseFiles
|
|
99
129
|
}
|
|
100
130
|
),
|
|
101
|
-
|
|
131
|
+
z ? /* @__PURE__ */ t(k, { tone: "ghost", onClick: A, disabled: o, children: i.clear }) : null
|
|
102
132
|
] }),
|
|
103
|
-
/* @__PURE__ */
|
|
133
|
+
/* @__PURE__ */ t(
|
|
104
134
|
"input",
|
|
105
135
|
{
|
|
106
|
-
ref:
|
|
136
|
+
ref: p,
|
|
107
137
|
type: "file",
|
|
108
138
|
multiple: !0,
|
|
109
|
-
accept:
|
|
110
|
-
disabled:
|
|
139
|
+
accept: D,
|
|
140
|
+
disabled: o,
|
|
111
141
|
tabIndex: -1,
|
|
112
142
|
webkitdirectory: "",
|
|
113
143
|
className: "aegis-folder-dropzone__input",
|
|
114
|
-
onChange:
|
|
144
|
+
onChange: L
|
|
115
145
|
}
|
|
116
146
|
),
|
|
117
|
-
/* @__PURE__ */
|
|
147
|
+
/* @__PURE__ */ t(
|
|
118
148
|
"input",
|
|
119
149
|
{
|
|
120
|
-
ref:
|
|
150
|
+
ref: m,
|
|
121
151
|
type: "file",
|
|
122
152
|
multiple: !0,
|
|
123
|
-
accept:
|
|
124
|
-
disabled:
|
|
153
|
+
accept: D,
|
|
154
|
+
disabled: o,
|
|
125
155
|
tabIndex: -1,
|
|
126
156
|
className: "aegis-folder-dropzone__input",
|
|
127
|
-
onChange:
|
|
157
|
+
onChange: L
|
|
128
158
|
}
|
|
129
159
|
)
|
|
130
160
|
] }),
|
|
131
|
-
|
|
132
|
-
|
|
161
|
+
y !== void 0 && z ? /* @__PURE__ */ t("div", { className: "aegis-folder-dropzone__summary", children: y }) : null,
|
|
162
|
+
_ ? /* @__PURE__ */ t("div", { className: "aegis-folder-dropzone__error", role: "alert", children: _ }) : null
|
|
133
163
|
] });
|
|
134
164
|
}
|
|
135
165
|
export {
|
|
136
|
-
|
|
166
|
+
$ as FolderDropzone
|
|
137
167
|
};
|
|
138
168
|
//# sourceMappingURL=FolderDropzone.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FolderDropzone.js","sources":["../../../src/components/ui/FolderDropzone.tsx"],"sourcesContent":["import {\n type ChangeEvent,\n type ReactNode,\n useCallback,\n useRef,\n useState,\n} from 'react';\n\nimport { useDropzone } from 'react-dropzone';\n\nimport { formatBytes } from '../../lib/format';\nimport { Button } from './Button';\nimport './FolderDropzone.css';\nimport { filesFromEvent } from './dropFiles';\n\nexport interface FolderDropzoneProps {\n /** Currently-selected files; the component is controlled. */\n value: File[];\n /**\n * Called with the files of a picked or dropped folder (or picked files).\n * Each file of a folder carries its path inside the dropped or picked\n * folder in `webkitRelativePath`, e.g. `site/docs/intro.md`.\n */\n onFilesChange: (files: File[]) => void;\n /** Per-file ceiling (bytes). Files larger than this are rejected. */\n maxFileBytes?: number;\n /** Aggregate ceiling (bytes). Selections totalling more are rejected. */\n maxTotalBytes?: number;\n /** Hard cap on file count. */\n maxFiles?: number;\n /** `accept` attribute forwarded to the underlying `<input>`. */\n accept?: string;\n disabled?: boolean;\n /** Text shown beneath the drop area. */\n helperText?: ReactNode;\n /** External validation message; rendered in error tone when present. */\n validationError?: string;\n /**\n * Slot rendered below the drop area, e.g. a per-file summary list. Its\n * text is set in the UI face with tabular figures; wrap paths in\n * `MonoValue`.\n */\n summary?: ReactNode;\n className?: string;\n}\n\nexport function FolderDropzone({\n value,\n onFilesChange,\n maxFileBytes,\n maxTotalBytes,\n maxFiles,\n accept,\n disabled = false,\n helperText,\n validationError,\n summary,\n className,\n}: FolderDropzoneProps) {\n const folderInputRef = useRef<HTMLInputElement>(null);\n const fileInputRef = useRef<HTMLInputElement>(null);\n const [internalError, setInternalError] = useState<string>('');\n\n const applyFiles = useCallback(\n (incoming: File[]) => {\n if (disabled) {\n return;\n }\n if (incoming.length === 0) {\n return;\n }\n if (maxFiles !== undefined && incoming.length > maxFiles) {\n setInternalError(\n `Too many files: ${incoming.length.toString()} selected, ${maxFiles.toString()} allowed.`,\n );\n return;\n }\n if (maxFileBytes !== undefined) {\n const offender = incoming.find((f) => f.size > maxFileBytes);\n if (offender) {\n setInternalError(\n `\"${offender.name}\" is ${formatBytes(offender.size)}, over the ${formatBytes(maxFileBytes)} per-file cap.`,\n );\n return;\n }\n }\n if (maxTotalBytes !== undefined) {\n const total = incoming.reduce((acc, f) => acc + f.size, 0);\n if (total > maxTotalBytes) {\n setInternalError(\n `Selection totals ${formatBytes(total)}, over the ${formatBytes(maxTotalBytes)} aggregate cap.`,\n );\n return;\n }\n }\n setInternalError('');\n onFilesChange(incoming);\n },\n [disabled, maxFiles, maxFileBytes, maxTotalBytes, onFilesChange],\n );\n\n const handlePickFolder = useCallback(() => {\n folderInputRef.current?.click();\n }, []);\n\n const handlePickFiles = useCallback(() => {\n fileInputRef.current?.click();\n }, []);\n\n const handleClear = useCallback(() => {\n if (disabled) {\n return;\n }\n setInternalError('');\n onFilesChange([]);\n if (folderInputRef.current) {\n folderInputRef.current.value = '';\n }\n if (fileInputRef.current) {\n fileInputRef.current.value = '';\n }\n }, [disabled, onFilesChange]);\n\n const { getRootProps, isDragActive: dragActive } = useDropzone({\n onDrop: applyFiles,\n disabled,\n noClick: true,\n noKeyboard: true,\n getFilesFromEvent: filesFromEvent,\n });\n\n const handleInputChange = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => {\n const list = event.target.files;\n if (list) {\n applyFiles(Array.from(list));\n }\n },\n [applyFiles],\n );\n\n const errorMessage = validationError ?? internalError;\n const hasFiles = value.length > 0;\n const totalBytes = value.reduce((acc, f) => acc + f.size, 0);\n\n const surfaceClass = [\n 'aegis-folder-dropzone__surface',\n dragActive ? 'aegis-folder-dropzone__surface--active' : '',\n disabled ? 'aegis-folder-dropzone__surface--disabled' : '',\n errorMessage ? 'aegis-folder-dropzone__surface--error' : '',\n ]\n .filter(Boolean)\n .join(' ');\n\n const rootClass = ['aegis-folder-dropzone', className ?? '']\n .filter(Boolean)\n .join(' ');\n\n return (\n <div className={rootClass}>\n <div {...getRootProps({ className: surfaceClass })}>\n <div className=\"aegis-folder-dropzone__hint\">\n <span className=\"aegis-folder-dropzone__primary\">\n {dragActive\n ? 'Drop folder to upload'\n : hasFiles\n ? `${value.length.toString()} file${value.length === 1 ? '' : 's'} selected · ${formatBytes(totalBytes)}`\n : 'Drag a folder here, or choose one below'}\n </span>\n {!hasFiles && helperText !== undefined ? (\n <span className=\"aegis-folder-dropzone__meta\">{helperText}</span>\n ) : null}\n </div>\n <div className=\"aegis-folder-dropzone__actions\">\n <Button\n tone=\"secondary\"\n onClick={handlePickFolder}\n disabled={disabled}\n >\n Choose folder\n </Button>\n <Button\n tone=\"secondary\"\n onClick={handlePickFiles}\n disabled={disabled}\n >\n Choose files\n </Button>\n {hasFiles ? (\n <Button tone=\"ghost\" onClick={handleClear} disabled={disabled}>\n Clear\n </Button>\n ) : null}\n </div>\n <input\n ref={folderInputRef}\n type=\"file\"\n multiple\n accept={accept}\n disabled={disabled}\n tabIndex={-1}\n // @ts-expect-error -- non-standard but supported in Chromium/WebKit\n webkitdirectory=\"\"\n className=\"aegis-folder-dropzone__input\"\n onChange={handleInputChange}\n />\n <input\n ref={fileInputRef}\n type=\"file\"\n multiple\n accept={accept}\n disabled={disabled}\n tabIndex={-1}\n className=\"aegis-folder-dropzone__input\"\n onChange={handleInputChange}\n />\n </div>\n {summary !== undefined && hasFiles ? (\n <div className=\"aegis-folder-dropzone__summary\">{summary}</div>\n ) : null}\n {errorMessage ? (\n <div className=\"aegis-folder-dropzone__error\" role=\"alert\">\n {errorMessage}\n </div>\n ) : null}\n </div>\n );\n}\n"],"names":["FolderDropzone","value","onFilesChange","maxFileBytes","maxTotalBytes","maxFiles","accept","disabled","helperText","validationError","summary","className","folderInputRef","useRef","fileInputRef","internalError","setInternalError","useState","applyFiles","useCallback","incoming","offender","f","formatBytes","total","acc","handlePickFolder","handlePickFiles","handleClear","getRootProps","dragActive","useDropzone","filesFromEvent","handleInputChange","event","list","errorMessage","hasFiles","totalBytes","surfaceClass","rootClass","jsxs","jsx","Button"],"mappings":";;;;;;;AA8CO,SAASA,EAAe;AAAA,EAC7B,OAAAC;AAAA,EACA,eAAAC;AAAA,EACA,cAAAC;AAAA,EACA,eAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,UAAAC,IAAW;AAAA,EACX,YAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,SAAAC;AAAA,EACA,WAAAC;AACF,GAAwB;AACtB,QAAMC,IAAiBC,EAAyB,IAAI,GAC9CC,IAAeD,EAAyB,IAAI,GAC5C,CAACE,GAAeC,CAAgB,IAAIC,EAAiB,EAAE,GAEvDC,IAAaC;AAAA,IACjB,CAACC,MAAqB;AACpB,UAAI,CAAAb,KAGAa,EAAS,WAAW,GAGxB;AAAA,YAAIf,MAAa,UAAae,EAAS,SAASf,GAAU;AACxD,UAAAW;AAAA,YACE,mBAAmBI,EAAS,OAAO,SAAA,CAAU,cAAcf,EAAS,UAAU;AAAA,UAAA;AAEhF;AAAA,QACF;AACA,YAAIF,MAAiB,QAAW;AAC9B,gBAAMkB,IAAWD,EAAS,KAAK,CAACE,MAAMA,EAAE,OAAOnB,CAAY;AAC3D,cAAIkB,GAAU;AACZ,YAAAL;AAAA,cACE,IAAIK,EAAS,IAAI,QAAQE,EAAYF,EAAS,IAAI,CAAC,cAAcE,EAAYpB,CAAY,CAAC;AAAA,YAAA;AAE5F;AAAA,UACF;AAAA,QACF;AACA,YAAIC,MAAkB,QAAW;AAC/B,gBAAMoB,IAAQJ,EAAS,OAAO,CAACK,GAAKH,MAAMG,IAAMH,EAAE,MAAM,CAAC;AACzD,cAAIE,IAAQpB,GAAe;AACzB,YAAAY;AAAA,cACE,oBAAoBO,EAAYC,CAAK,CAAC,cAAcD,EAAYnB,CAAa,CAAC;AAAA,YAAA;AAEhF;AAAA,UACF;AAAA,QACF;AACA,QAAAY,EAAiB,EAAE,GACnBd,EAAckB,CAAQ;AAAA;AAAA,IACxB;AAAA,IACA,CAACb,GAAUF,GAAUF,GAAcC,GAAeF,CAAa;AAAA,EAAA,GAG3DwB,IAAmBP,EAAY,MAAM;AACzC,IAAAP,EAAe,SAAS,MAAA;AAAA,EAC1B,GAAG,CAAA,CAAE,GAECe,IAAkBR,EAAY,MAAM;AACxC,IAAAL,EAAa,SAAS,MAAA;AAAA,EACxB,GAAG,CAAA,CAAE,GAECc,IAAcT,EAAY,MAAM;AACpC,IAAIZ,MAGJS,EAAiB,EAAE,GACnBd,EAAc,CAAA,CAAE,GACZU,EAAe,YACjBA,EAAe,QAAQ,QAAQ,KAE7BE,EAAa,YACfA,EAAa,QAAQ,QAAQ;AAAA,EAEjC,GAAG,CAACP,GAAUL,CAAa,CAAC,GAEtB,EAAE,cAAA2B,GAAc,cAAcC,EAAA,IAAeC,EAAY;AAAA,IAC7D,QAAQb;AAAA,IACR,UAAAX;AAAA,IACA,SAAS;AAAA,IACT,YAAY;AAAA,IACZ,mBAAmByB;AAAA,EAAA,CACpB,GAEKC,IAAoBd;AAAA,IACxB,CAACe,MAAyC;AACxC,YAAMC,IAAOD,EAAM,OAAO;AAC1B,MAAIC,KACFjB,EAAW,MAAM,KAAKiB,CAAI,CAAC;AAAA,IAE/B;AAAA,IACA,CAACjB,CAAU;AAAA,EAAA,GAGPkB,IAAe3B,KAAmBM,GAClCsB,IAAWpC,EAAM,SAAS,GAC1BqC,IAAarC,EAAM,OAAO,CAACwB,GAAKH,MAAMG,IAAMH,EAAE,MAAM,CAAC,GAErDiB,IAAe;AAAA,IACnB;AAAA,IACAT,IAAa,2CAA2C;AAAA,IACxDvB,IAAW,6CAA6C;AAAA,IACxD6B,IAAe,0CAA0C;AAAA,EAAA,EAExD,OAAO,OAAO,EACd,KAAK,GAAG,GAELI,IAAY,CAAC,yBAAyB7B,KAAa,EAAE,EACxD,OAAO,OAAO,EACd,KAAK,GAAG;AAEX,SACE,gBAAA8B,EAAC,OAAA,EAAI,WAAWD,GACd,UAAA;AAAA,IAAA,gBAAAC,EAAC,SAAK,GAAGZ,EAAa,EAAE,WAAWU,EAAA,CAAc,GAC/C,UAAA;AAAA,MAAA,gBAAAE,EAAC,OAAA,EAAI,WAAU,+BACb,UAAA;AAAA,QAAA,gBAAAC,EAAC,QAAA,EAAK,WAAU,kCACb,UAAAZ,IACG,0BACAO,IACE,GAAGpC,EAAM,OAAO,UAAU,QAAQA,EAAM,WAAW,IAAI,KAAK,GAAG,eAAesB,EAAYe,CAAU,CAAC,KACrG,0CAAA,CACR;AAAA,QACC,CAACD,KAAY7B,MAAe,2BAC1B,QAAA,EAAK,WAAU,+BAA+B,UAAAA,EAAA,CAAW,IACxD;AAAA,MAAA,GACN;AAAA,MACA,gBAAAiC,EAAC,OAAA,EAAI,WAAU,kCACb,UAAA;AAAA,QAAA,gBAAAC;AAAA,UAACC;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,SAASjB;AAAA,YACT,UAAAnB;AAAA,YACD,UAAA;AAAA,UAAA;AAAA,QAAA;AAAA,QAGD,gBAAAmC;AAAA,UAACC;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,SAAShB;AAAA,YACT,UAAApB;AAAA,YACD,UAAA;AAAA,UAAA;AAAA,QAAA;AAAA,QAGA8B,sBACEM,GAAA,EAAO,MAAK,SAAQ,SAASf,GAAa,UAAArB,GAAoB,UAAA,QAAA,CAE/D,IACE;AAAA,MAAA,GACN;AAAA,MACA,gBAAAmC;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,KAAK9B;AAAA,UACL,MAAK;AAAA,UACL,UAAQ;AAAA,UACR,QAAAN;AAAA,UACA,UAAAC;AAAA,UACA,UAAU;AAAA,UAEV,iBAAgB;AAAA,UAChB,WAAU;AAAA,UACV,UAAU0B;AAAA,QAAA;AAAA,MAAA;AAAA,MAEZ,gBAAAS;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,KAAK5B;AAAA,UACL,MAAK;AAAA,UACL,UAAQ;AAAA,UACR,QAAAR;AAAA,UACA,UAAAC;AAAA,UACA,UAAU;AAAA,UACV,WAAU;AAAA,UACV,UAAU0B;AAAA,QAAA;AAAA,MAAA;AAAA,IACZ,GACF;AAAA,IACCvB,MAAY,UAAa2B,IACxB,gBAAAK,EAAC,SAAI,WAAU,kCAAkC,aAAQ,IACvD;AAAA,IACHN,sBACE,OAAA,EAAI,WAAU,gCAA+B,MAAK,SAChD,aACH,IACE;AAAA,EAAA,GACN;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"FolderDropzone.js","sources":["../../../src/components/ui/FolderDropzone.tsx"],"sourcesContent":["import {\n type ChangeEvent,\n type ReactNode,\n useCallback,\n useRef,\n useState,\n} from 'react';\n\nimport { useDropzone } from 'react-dropzone';\n\nimport { formatBytes } from '../../lib/format';\nimport { type AegisStrings, useStrings } from '../../locale';\nimport { Button } from './Button';\nimport './FolderDropzone.css';\nimport { filesFromEvent } from './dropFiles';\n\nexport interface FolderDropzoneProps {\n /** Currently-selected files; the component is controlled. */\n value: File[];\n /**\n * Called with the files of a picked or dropped folder (or picked files).\n * Each file of a folder carries its path inside the dropped or picked\n * folder in `webkitRelativePath`, e.g. `site/docs/intro.md`.\n */\n onFilesChange: (files: File[]) => void;\n /** Per-file ceiling (bytes). Files larger than this are rejected. */\n maxFileBytes?: number;\n /** Aggregate ceiling (bytes). Selections totalling more are rejected. */\n maxTotalBytes?: number;\n /** Hard cap on file count. */\n maxFiles?: number;\n /** `accept` attribute forwarded to the underlying `<input>`. */\n accept?: string;\n disabled?: boolean;\n /** Text shown beneath the drop area. */\n helperText?: ReactNode;\n /** External validation message; rendered in error tone when present. */\n validationError?: string;\n /**\n * Slot rendered below the drop area, e.g. a per-file summary list. Its\n * text is set in the UI face with tabular figures; wrap paths in\n * `MonoValue`.\n */\n summary?: ReactNode;\n className?: string;\n}\n\ntype SelectionError =\n | { kind: 'tooMany'; count: number; max: number }\n | { kind: 'fileTooLarge'; name: string; size: number; max: number }\n | { kind: 'totalTooLarge'; total: number; max: number };\n\nfunction selectionErrorText(\n error: SelectionError,\n strings: AegisStrings,\n): string {\n switch (error.kind) {\n case 'tooMany':\n return strings.folderDropzoneTooMany(error.count, error.max);\n case 'fileTooLarge':\n return strings.folderDropzoneFileTooLarge(\n error.name,\n formatBytes(error.size),\n formatBytes(error.max),\n );\n case 'totalTooLarge':\n return strings.folderDropzoneTotalTooLarge(\n formatBytes(error.total),\n formatBytes(error.max),\n );\n }\n}\n\nexport function FolderDropzone({\n value,\n onFilesChange,\n maxFileBytes,\n maxTotalBytes,\n maxFiles,\n accept,\n disabled = false,\n helperText,\n validationError,\n summary,\n className,\n}: FolderDropzoneProps) {\n const strings = useStrings();\n const folderInputRef = useRef<HTMLInputElement>(null);\n const fileInputRef = useRef<HTMLInputElement>(null);\n const [internalError, setInternalError] = useState<SelectionError | null>(\n null,\n );\n\n const applyFiles = useCallback(\n (incoming: File[]) => {\n if (disabled) {\n return;\n }\n if (incoming.length === 0) {\n return;\n }\n if (maxFiles !== undefined && incoming.length > maxFiles) {\n setInternalError({\n kind: 'tooMany',\n count: incoming.length,\n max: maxFiles,\n });\n return;\n }\n if (maxFileBytes !== undefined) {\n const offender = incoming.find((f) => f.size > maxFileBytes);\n if (offender) {\n setInternalError({\n kind: 'fileTooLarge',\n name: offender.name,\n size: offender.size,\n max: maxFileBytes,\n });\n return;\n }\n }\n if (maxTotalBytes !== undefined) {\n const total = incoming.reduce((acc, f) => acc + f.size, 0);\n if (total > maxTotalBytes) {\n setInternalError({\n kind: 'totalTooLarge',\n total,\n max: maxTotalBytes,\n });\n return;\n }\n }\n setInternalError(null);\n onFilesChange(incoming);\n },\n [disabled, maxFiles, maxFileBytes, maxTotalBytes, onFilesChange],\n );\n\n const handlePickFolder = useCallback(() => {\n folderInputRef.current?.click();\n }, []);\n\n const handlePickFiles = useCallback(() => {\n fileInputRef.current?.click();\n }, []);\n\n const handleClear = useCallback(() => {\n if (disabled) {\n return;\n }\n setInternalError(null);\n onFilesChange([]);\n if (folderInputRef.current) {\n folderInputRef.current.value = '';\n }\n if (fileInputRef.current) {\n fileInputRef.current.value = '';\n }\n }, [disabled, onFilesChange]);\n\n const { getRootProps, isDragActive: dragActive } = useDropzone({\n onDrop: applyFiles,\n disabled,\n noClick: true,\n noKeyboard: true,\n getFilesFromEvent: filesFromEvent,\n });\n\n const handleInputChange = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => {\n const list = event.target.files;\n if (list) {\n applyFiles(Array.from(list));\n }\n },\n [applyFiles],\n );\n\n const errorMessage =\n validationError ??\n (internalError ? selectionErrorText(internalError, strings) : '');\n const hasFiles = value.length > 0;\n const totalBytes = value.reduce((acc, f) => acc + f.size, 0);\n\n const surfaceClass = [\n 'aegis-folder-dropzone__surface',\n dragActive ? 'aegis-folder-dropzone__surface--active' : '',\n disabled ? 'aegis-folder-dropzone__surface--disabled' : '',\n errorMessage ? 'aegis-folder-dropzone__surface--error' : '',\n ]\n .filter(Boolean)\n .join(' ');\n\n const rootClass = ['aegis-folder-dropzone', className ?? '']\n .filter(Boolean)\n .join(' ');\n\n return (\n <div className={rootClass}>\n <div {...getRootProps({ className: surfaceClass })}>\n <div className=\"aegis-folder-dropzone__hint\">\n <span className=\"aegis-folder-dropzone__primary\">\n {dragActive\n ? strings.dropzoneDropFolder\n : hasFiles\n ? strings.folderDropzoneSelected(\n value.length,\n formatBytes(totalBytes),\n )\n : strings.folderDropzoneHint}\n </span>\n {!hasFiles && helperText !== undefined ? (\n <span className=\"aegis-folder-dropzone__meta\">{helperText}</span>\n ) : null}\n </div>\n <div className=\"aegis-folder-dropzone__actions\">\n <Button\n tone=\"secondary\"\n onClick={handlePickFolder}\n disabled={disabled}\n >\n {strings.chooseFolder}\n </Button>\n <Button\n tone=\"secondary\"\n onClick={handlePickFiles}\n disabled={disabled}\n >\n {strings.chooseFiles}\n </Button>\n {hasFiles ? (\n <Button tone=\"ghost\" onClick={handleClear} disabled={disabled}>\n {strings.clear}\n </Button>\n ) : null}\n </div>\n <input\n ref={folderInputRef}\n type=\"file\"\n multiple\n accept={accept}\n disabled={disabled}\n tabIndex={-1}\n // @ts-expect-error -- non-standard but supported in Chromium/WebKit\n webkitdirectory=\"\"\n className=\"aegis-folder-dropzone__input\"\n onChange={handleInputChange}\n />\n <input\n ref={fileInputRef}\n type=\"file\"\n multiple\n accept={accept}\n disabled={disabled}\n tabIndex={-1}\n className=\"aegis-folder-dropzone__input\"\n onChange={handleInputChange}\n />\n </div>\n {summary !== undefined && hasFiles ? (\n <div className=\"aegis-folder-dropzone__summary\">{summary}</div>\n ) : null}\n {errorMessage ? (\n <div className=\"aegis-folder-dropzone__error\" role=\"alert\">\n {errorMessage}\n </div>\n ) : null}\n </div>\n );\n}\n"],"names":["selectionErrorText","error","strings","formatBytes","FolderDropzone","value","onFilesChange","maxFileBytes","maxTotalBytes","maxFiles","accept","disabled","helperText","validationError","summary","className","useStrings","folderInputRef","useRef","fileInputRef","internalError","setInternalError","useState","applyFiles","useCallback","incoming","offender","f","total","acc","handlePickFolder","handlePickFiles","handleClear","getRootProps","dragActive","useDropzone","filesFromEvent","handleInputChange","event","list","errorMessage","hasFiles","totalBytes","surfaceClass","rootClass","jsxs","jsx","Button"],"mappings":"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"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),u=require("react"),d=require("./Alert.cjs"),S=require("./Button.cjs");;/* empty css */const x=require("./TextField.cjs"),b=require("./authValidation.cjs"),p=require("../../locale/useStrings.cjs");function q({onSubmit:m,submitting:r=!1,error:i,success:s}){const e=p.useStrings(),[a,c]=u.useState(""),[f,h]=u.useState(!1),n=a.trim(),l=b.emailError(n,e),g=o=>{o.preventDefault(),h(!0),l===void 0&&m({email:n})};return s?t.jsx(d.Alert,{tone:"success",children:s}):t.jsxs("form",{className:"aegis-forgotform",onSubmit:g,noValidate:!0,children:[i&&t.jsx(d.Alert,{tone:"error",children:i}),t.jsx(x.TextField,{label:e.authEmail,type:"email",autoComplete:"email",placeholder:"you@example.com",value:a,onChange:o=>c(o.target.value),disabled:r,required:!0,helperText:e.authResetHint,error:f?l:void 0}),t.jsx(S.Button,{tone:"primary",type:"submit",className:"aegis-forgotform__submit",disabled:r,children:r?e.authSending:e.authSendResetLink})]})}exports.ForgotPasswordForm=q;
|
|
2
2
|
//# sourceMappingURL=ForgotPasswordForm.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ForgotPasswordForm.cjs","sources":["../../../src/components/ui/ForgotPasswordForm.tsx"],"sourcesContent":["import { type FormEvent, type ReactElement, useState } from 'react';\n\nimport { Alert } from './Alert';\nimport { Button } from './Button';\nimport './ForgotPasswordForm.css';\nimport { TextField } from './TextField';\nimport { emailError } from './authValidation';\n\ninterface ForgotPasswordFormValues {\n email: string;\n}\n\ninterface ForgotPasswordFormProps {\n /** Called only with a valid email address, trimmed. */\n onSubmit: (values: ForgotPasswordFormValues) => void | Promise<void>;\n submitting?: boolean;\n error?: string;\n success?: string;\n}\n\nexport function ForgotPasswordForm({\n onSubmit,\n submitting = false,\n error,\n success,\n}: ForgotPasswordFormProps): ReactElement {\n const [email, setEmail] = useState('');\n const [submitted, setSubmitted] = useState(false);\n\n const trimmedEmail = email.trim();\n const fieldError = emailError(trimmedEmail);\n\n const handleSubmit = (e: FormEvent<HTMLFormElement>): void => {\n e.preventDefault();\n setSubmitted(true);\n if (fieldError !== undefined) {\n return;\n }\n void onSubmit({ email: trimmedEmail });\n };\n\n if (success) {\n return <Alert tone=\"success\">{success}</Alert>;\n }\n\n return (\n <form className=\"aegis-forgotform\" onSubmit={handleSubmit} noValidate>\n {error && <Alert tone=\"error\">{error}</Alert>}\n <TextField\n label
|
|
1
|
+
{"version":3,"file":"ForgotPasswordForm.cjs","sources":["../../../src/components/ui/ForgotPasswordForm.tsx"],"sourcesContent":["import { type FormEvent, type ReactElement, useState } from 'react';\n\nimport { useStrings } from '../../locale';\nimport { Alert } from './Alert';\nimport { Button } from './Button';\nimport './ForgotPasswordForm.css';\nimport { TextField } from './TextField';\nimport { emailError } from './authValidation';\n\ninterface ForgotPasswordFormValues {\n email: string;\n}\n\ninterface ForgotPasswordFormProps {\n /** Called only with a valid email address, trimmed. */\n onSubmit: (values: ForgotPasswordFormValues) => void | Promise<void>;\n submitting?: boolean;\n error?: string;\n success?: string;\n}\n\nexport function ForgotPasswordForm({\n onSubmit,\n submitting = false,\n error,\n success,\n}: ForgotPasswordFormProps): ReactElement {\n const strings = useStrings();\n const [email, setEmail] = useState('');\n const [submitted, setSubmitted] = useState(false);\n\n const trimmedEmail = email.trim();\n const fieldError = emailError(trimmedEmail, strings);\n\n const handleSubmit = (e: FormEvent<HTMLFormElement>): void => {\n e.preventDefault();\n setSubmitted(true);\n if (fieldError !== undefined) {\n return;\n }\n void onSubmit({ email: trimmedEmail });\n };\n\n if (success) {\n return <Alert tone=\"success\">{success}</Alert>;\n }\n\n return (\n <form className=\"aegis-forgotform\" onSubmit={handleSubmit} noValidate>\n {error && <Alert tone=\"error\">{error}</Alert>}\n <TextField\n label={strings.authEmail}\n type=\"email\"\n autoComplete=\"email\"\n placeholder=\"you@example.com\"\n value={email}\n onChange={(e) => setEmail(e.target.value)}\n disabled={submitting}\n required\n helperText={strings.authResetHint}\n error={submitted ? fieldError : undefined}\n />\n <Button\n tone=\"primary\"\n type=\"submit\"\n className=\"aegis-forgotform__submit\"\n disabled={submitting}\n >\n {submitting ? strings.authSending : strings.authSendResetLink}\n </Button>\n </form>\n );\n}\n"],"names":["ForgotPasswordForm","onSubmit","submitting","error","success","strings","useStrings","email","setEmail","useState","submitted","setSubmitted","trimmedEmail","fieldError","emailError","handleSubmit","e","jsx","Alert","TextField","Button"],"mappings":"iVAqBO,SAASA,EAAmB,CACjC,SAAAC,EACA,WAAAC,EAAa,GACb,MAAAC,EACA,QAAAC,CACF,EAA0C,CACxC,MAAMC,EAAUC,EAAAA,WAAA,EACV,CAACC,EAAOC,CAAQ,EAAIC,EAAAA,SAAS,EAAE,EAC/B,CAACC,EAAWC,CAAY,EAAIF,EAAAA,SAAS,EAAK,EAE1CG,EAAeL,EAAM,KAAA,EACrBM,EAAaC,EAAAA,WAAWF,EAAcP,CAAO,EAE7CU,EAAgBC,GAAwC,CAC5DA,EAAE,eAAA,EACFL,EAAa,EAAI,EACbE,IAAe,QAGdZ,EAAS,CAAE,MAAOW,EAAc,CACvC,EAEA,OAAIR,EACKa,EAAAA,IAACC,EAAAA,MAAA,CAAM,KAAK,UAAW,SAAAd,EAAQ,SAIrC,OAAA,CAAK,UAAU,mBAAmB,SAAUW,EAAc,WAAU,GAClE,SAAA,CAAAZ,GAASc,EAAAA,IAACC,QAAA,CAAM,KAAK,QAAS,SAAAf,EAAM,EACrCc,EAAAA,IAACE,EAAAA,UAAA,CACC,MAAOd,EAAQ,UACf,KAAK,QACL,aAAa,QACb,YAAY,kBACZ,MAAOE,EACP,SAAWS,GAAMR,EAASQ,EAAE,OAAO,KAAK,EACxC,SAAUd,EACV,SAAQ,GACR,WAAYG,EAAQ,cACpB,MAAOK,EAAYG,EAAa,MAAA,CAAA,EAElCI,EAAAA,IAACG,EAAAA,OAAA,CACC,KAAK,UACL,KAAK,SACL,UAAU,2BACV,SAAUlB,EAET,SAAAA,EAAaG,EAAQ,YAAcA,EAAQ,iBAAA,CAAA,CAC9C,EACF,CAEJ"}
|
|
@@ -1,49 +1,50 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { Alert as
|
|
1
|
+
import { jsx as t, jsxs as g } from "react/jsx-runtime";
|
|
2
|
+
import { useState as n } from "react";
|
|
3
|
+
import { Alert as u } from "./Alert.js";
|
|
4
4
|
import { Button as b } from "./Button.js";
|
|
5
5
|
/* empty css */
|
|
6
|
-
import { TextField as
|
|
6
|
+
import { TextField as S } from "./TextField.js";
|
|
7
7
|
import { emailError as v } from "./authValidation.js";
|
|
8
|
-
|
|
8
|
+
import { useStrings as x } from "../../locale/useStrings.js";
|
|
9
|
+
function _({
|
|
9
10
|
onSubmit: d,
|
|
10
11
|
submitting: r = !1,
|
|
11
|
-
error:
|
|
12
|
-
success:
|
|
12
|
+
error: i,
|
|
13
|
+
success: m
|
|
13
14
|
}) {
|
|
14
|
-
const [
|
|
15
|
-
|
|
15
|
+
const e = x(), [a, f] = n(""), [p, c] = n(!1), l = a.trim(), s = v(l, e), h = (o) => {
|
|
16
|
+
o.preventDefault(), c(!0), s === void 0 && d({ email: l });
|
|
16
17
|
};
|
|
17
|
-
return
|
|
18
|
-
|
|
19
|
-
/* @__PURE__ */
|
|
20
|
-
|
|
18
|
+
return m ? /* @__PURE__ */ t(u, { tone: "success", children: m }) : /* @__PURE__ */ g("form", { className: "aegis-forgotform", onSubmit: h, noValidate: !0, children: [
|
|
19
|
+
i && /* @__PURE__ */ t(u, { tone: "error", children: i }),
|
|
20
|
+
/* @__PURE__ */ t(
|
|
21
|
+
S,
|
|
21
22
|
{
|
|
22
|
-
label:
|
|
23
|
+
label: e.authEmail,
|
|
23
24
|
type: "email",
|
|
24
25
|
autoComplete: "email",
|
|
25
26
|
placeholder: "you@example.com",
|
|
26
|
-
value:
|
|
27
|
-
onChange: (
|
|
27
|
+
value: a,
|
|
28
|
+
onChange: (o) => f(o.target.value),
|
|
28
29
|
disabled: r,
|
|
29
30
|
required: !0,
|
|
30
|
-
helperText:
|
|
31
|
-
error:
|
|
31
|
+
helperText: e.authResetHint,
|
|
32
|
+
error: p ? s : void 0
|
|
32
33
|
}
|
|
33
34
|
),
|
|
34
|
-
/* @__PURE__ */
|
|
35
|
+
/* @__PURE__ */ t(
|
|
35
36
|
b,
|
|
36
37
|
{
|
|
37
38
|
tone: "primary",
|
|
38
39
|
type: "submit",
|
|
39
40
|
className: "aegis-forgotform__submit",
|
|
40
41
|
disabled: r,
|
|
41
|
-
children: r ?
|
|
42
|
+
children: r ? e.authSending : e.authSendResetLink
|
|
42
43
|
}
|
|
43
44
|
)
|
|
44
45
|
] });
|
|
45
46
|
}
|
|
46
47
|
export {
|
|
47
|
-
|
|
48
|
+
_ as ForgotPasswordForm
|
|
48
49
|
};
|
|
49
50
|
//# sourceMappingURL=ForgotPasswordForm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ForgotPasswordForm.js","sources":["../../../src/components/ui/ForgotPasswordForm.tsx"],"sourcesContent":["import { type FormEvent, type ReactElement, useState } from 'react';\n\nimport { Alert } from './Alert';\nimport { Button } from './Button';\nimport './ForgotPasswordForm.css';\nimport { TextField } from './TextField';\nimport { emailError } from './authValidation';\n\ninterface ForgotPasswordFormValues {\n email: string;\n}\n\ninterface ForgotPasswordFormProps {\n /** Called only with a valid email address, trimmed. */\n onSubmit: (values: ForgotPasswordFormValues) => void | Promise<void>;\n submitting?: boolean;\n error?: string;\n success?: string;\n}\n\nexport function ForgotPasswordForm({\n onSubmit,\n submitting = false,\n error,\n success,\n}: ForgotPasswordFormProps): ReactElement {\n const [email, setEmail] = useState('');\n const [submitted, setSubmitted] = useState(false);\n\n const trimmedEmail = email.trim();\n const fieldError = emailError(trimmedEmail);\n\n const handleSubmit = (e: FormEvent<HTMLFormElement>): void => {\n e.preventDefault();\n setSubmitted(true);\n if (fieldError !== undefined) {\n return;\n }\n void onSubmit({ email: trimmedEmail });\n };\n\n if (success) {\n return <Alert tone=\"success\">{success}</Alert>;\n }\n\n return (\n <form className=\"aegis-forgotform\" onSubmit={handleSubmit} noValidate>\n {error && <Alert tone=\"error\">{error}</Alert>}\n <TextField\n label
|
|
1
|
+
{"version":3,"file":"ForgotPasswordForm.js","sources":["../../../src/components/ui/ForgotPasswordForm.tsx"],"sourcesContent":["import { type FormEvent, type ReactElement, useState } from 'react';\n\nimport { useStrings } from '../../locale';\nimport { Alert } from './Alert';\nimport { Button } from './Button';\nimport './ForgotPasswordForm.css';\nimport { TextField } from './TextField';\nimport { emailError } from './authValidation';\n\ninterface ForgotPasswordFormValues {\n email: string;\n}\n\ninterface ForgotPasswordFormProps {\n /** Called only with a valid email address, trimmed. */\n onSubmit: (values: ForgotPasswordFormValues) => void | Promise<void>;\n submitting?: boolean;\n error?: string;\n success?: string;\n}\n\nexport function ForgotPasswordForm({\n onSubmit,\n submitting = false,\n error,\n success,\n}: ForgotPasswordFormProps): ReactElement {\n const strings = useStrings();\n const [email, setEmail] = useState('');\n const [submitted, setSubmitted] = useState(false);\n\n const trimmedEmail = email.trim();\n const fieldError = emailError(trimmedEmail, strings);\n\n const handleSubmit = (e: FormEvent<HTMLFormElement>): void => {\n e.preventDefault();\n setSubmitted(true);\n if (fieldError !== undefined) {\n return;\n }\n void onSubmit({ email: trimmedEmail });\n };\n\n if (success) {\n return <Alert tone=\"success\">{success}</Alert>;\n }\n\n return (\n <form className=\"aegis-forgotform\" onSubmit={handleSubmit} noValidate>\n {error && <Alert tone=\"error\">{error}</Alert>}\n <TextField\n label={strings.authEmail}\n type=\"email\"\n autoComplete=\"email\"\n placeholder=\"you@example.com\"\n value={email}\n onChange={(e) => setEmail(e.target.value)}\n disabled={submitting}\n required\n helperText={strings.authResetHint}\n error={submitted ? fieldError : undefined}\n />\n <Button\n tone=\"primary\"\n type=\"submit\"\n className=\"aegis-forgotform__submit\"\n disabled={submitting}\n >\n {submitting ? strings.authSending : strings.authSendResetLink}\n </Button>\n </form>\n );\n}\n"],"names":["ForgotPasswordForm","onSubmit","submitting","error","success","strings","useStrings","email","setEmail","useState","submitted","setSubmitted","trimmedEmail","fieldError","emailError","handleSubmit","e","jsx","Alert","TextField","Button"],"mappings":";;;;;;;;AAqBO,SAASA,EAAmB;AAAA,EACjC,UAAAC;AAAA,EACA,YAAAC,IAAa;AAAA,EACb,OAAAC;AAAA,EACA,SAAAC;AACF,GAA0C;AACxC,QAAMC,IAAUC,EAAA,GACV,CAACC,GAAOC,CAAQ,IAAIC,EAAS,EAAE,GAC/B,CAACC,GAAWC,CAAY,IAAIF,EAAS,EAAK,GAE1CG,IAAeL,EAAM,KAAA,GACrBM,IAAaC,EAAWF,GAAcP,CAAO,GAE7CU,IAAe,CAACC,MAAwC;AAG5D,IAFAA,EAAE,eAAA,GACFL,EAAa,EAAI,GACbE,MAAe,UAGdZ,EAAS,EAAE,OAAOW,GAAc;AAAA,EACvC;AAEA,SAAIR,IACK,gBAAAa,EAACC,GAAA,EAAM,MAAK,WAAW,UAAAd,GAAQ,sBAIrC,QAAA,EAAK,WAAU,oBAAmB,UAAUW,GAAc,YAAU,IAClE,UAAA;AAAA,IAAAZ,KAAS,gBAAAc,EAACC,GAAA,EAAM,MAAK,SAAS,UAAAf,GAAM;AAAA,IACrC,gBAAAc;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,OAAOd,EAAQ;AAAA,QACf,MAAK;AAAA,QACL,cAAa;AAAA,QACb,aAAY;AAAA,QACZ,OAAOE;AAAA,QACP,UAAU,CAACS,MAAMR,EAASQ,EAAE,OAAO,KAAK;AAAA,QACxC,UAAUd;AAAA,QACV,UAAQ;AAAA,QACR,YAAYG,EAAQ;AAAA,QACpB,OAAOK,IAAYG,IAAa;AAAA,MAAA;AAAA,IAAA;AAAA,IAElC,gBAAAI;AAAA,MAACG;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,MAAK;AAAA,QACL,WAAU;AAAA,QACV,UAAUlB;AAAA,QAET,UAAAA,IAAaG,EAAQ,cAAcA,EAAQ;AAAA,MAAA;AAAA,IAAA;AAAA,EAC9C,GACF;AAEJ;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react");;/* empty css */function b({label:o,description:r,controlId:s,labelBy:m="for",children:i,className:n}){const l=t.useId(),a=`${s??l}-label`,c=r?`${s??l}-description`:void 0,d=["aegis-form-row",n??""].filter(Boolean).join(" ");return e.jsxs("div",{className:d,children:[e.jsxs("div",{className:"aegis-form-row__label-group",children:[s&&m==="for"?e.jsx("label",{id:a,className:"aegis-form-row__label",htmlFor:s,children:o}):e.jsx("span",{id:a,className:"aegis-form-row__label",children:o}),r&&e.jsx("span",{id:c,className:"aegis-form-row__description",children:r})]}),s?e.jsx("div",{className:"aegis-form-row__control",children:i}):e.jsx("div",{className:"aegis-form-row__control",role:"group","aria-labelledby":a,"aria-describedby":c,children:i})]})}exports.FormRow=b;
|
|
2
2
|
//# sourceMappingURL=FormRow.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormRow.cjs","sources":["../../../src/components/ui/FormRow.tsx"],"sourcesContent":["import { type ReactNode, useId } from 'react';\n\nimport './FormRow.css';\n\ninterface
|
|
1
|
+
{"version":3,"file":"FormRow.cjs","sources":["../../../src/components/ui/FormRow.tsx"],"sourcesContent":["import { type ReactNode, useId } from 'react';\n\nimport './FormRow.css';\n\ninterface FormRowBaseProps {\n label: string;\n description?: string;\n children: ReactNode;\n className?: string;\n}\n\ntype FormRowProps = FormRowBaseProps &\n (\n | {\n /**\n * Id of the one control the label names; put the same id on that\n * control. Inside an antd `Form.Item`, put it on the input, not on\n * the item. The label's id is then `${controlId}-label` and the\n * description's `${controlId}-description`; set the description's\n * as the control's `aria-describedby`. Without a controlId the row\n * is a group the label names and the description describes, for\n * several controls or a value that isn't a control.\n */\n controlId: string;\n /**\n * How the label names the control. `'for'`, the default, renders a\n * `<label for={controlId}>`, for an input, select, textarea or\n * button. `'aria-labelledby'` is for a control a `<label>` cannot\n * name, such as a meter, a radio group or a code editor, or a\n * control whose content belongs in its name, such as PickerField:\n * the label is plain text, and the control takes\n * `${controlId}-label` as its `aria-labelledby`.\n */\n labelBy?: 'for' | 'aria-labelledby';\n }\n | { controlId?: undefined; labelBy?: never }\n );\n\n/**\n * Stacked at ≤768 px, the row stretches each direct child marked\n * `data-aegis-field`, as the library's fields are; a host's own field can\n * carry the marker too.\n */\nexport function FormRow({\n label,\n description,\n controlId,\n labelBy = 'for',\n children,\n className,\n}: FormRowProps) {\n const baseId = useId();\n const labelId = `${controlId ?? baseId}-label`;\n const descriptionId = description\n ? `${controlId ?? baseId}-description`\n : undefined;\n const cls = ['aegis-form-row', className ?? ''].filter(Boolean).join(' ');\n\n return (\n <div className={cls}>\n <div className=\"aegis-form-row__label-group\">\n {controlId && labelBy === 'for' ? (\n <label\n id={labelId}\n className=\"aegis-form-row__label\"\n htmlFor={controlId}\n >\n {label}\n </label>\n ) : (\n <span id={labelId} className=\"aegis-form-row__label\">\n {label}\n </span>\n )}\n {description && (\n <span id={descriptionId} className=\"aegis-form-row__description\">\n {description}\n </span>\n )}\n </div>\n {controlId ? (\n <div className=\"aegis-form-row__control\">{children}</div>\n ) : (\n <div\n className=\"aegis-form-row__control\"\n role=\"group\"\n aria-labelledby={labelId}\n aria-describedby={descriptionId}\n >\n {children}\n </div>\n )}\n </div>\n );\n}\n"],"names":["FormRow","label","description","controlId","labelBy","children","className","baseId","useId","labelId","descriptionId","cls","jsxs","jsx"],"mappings":"qKA2CO,SAASA,EAAQ,CACtB,MAAAC,EACA,YAAAC,EACA,UAAAC,EACA,QAAAC,EAAU,MACV,SAAAC,EACA,UAAAC,CACF,EAAiB,CACf,MAAMC,EAASC,EAAAA,MAAA,EACTC,EAAU,GAAGN,GAAaI,CAAM,SAChCG,EAAgBR,EAClB,GAAGC,GAAaI,CAAM,eACtB,OACEI,EAAM,CAAC,iBAAkBL,GAAa,EAAE,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,EAExE,OACEM,EAAAA,KAAC,MAAA,CAAI,UAAWD,EACd,SAAA,CAAAC,EAAAA,KAAC,MAAA,CAAI,UAAU,8BACZ,SAAA,CAAAT,GAAaC,IAAY,MACxBS,EAAAA,IAAC,QAAA,CACC,GAAIJ,EACJ,UAAU,wBACV,QAASN,EAER,SAAAF,CAAA,CAAA,EAGHY,EAAAA,IAAC,OAAA,CAAK,GAAIJ,EAAS,UAAU,wBAC1B,SAAAR,EACH,EAEDC,GACCW,EAAAA,IAAC,OAAA,CAAK,GAAIH,EAAe,UAAU,8BAChC,SAAAR,CAAA,CACH,CAAA,EAEJ,EACCC,EACCU,EAAAA,IAAC,MAAA,CAAI,UAAU,0BAA2B,SAAAR,EAAS,EAEnDQ,EAAAA,IAAC,MAAA,CACC,UAAU,0BACV,KAAK,QACL,kBAAiBJ,EACjB,mBAAkBC,EAEjB,SAAAL,CAAA,CAAA,CACH,EAEJ,CAEJ"}
|
|
@@ -1,18 +1,39 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
interface
|
|
2
|
+
interface FormRowBaseProps {
|
|
3
3
|
label: string;
|
|
4
4
|
description?: string;
|
|
5
|
-
/**
|
|
6
|
-
* Id of the one control the label names; put the same id on that
|
|
7
|
-
* control. Inside an antd `Form.Item`, put it on the input, not on the
|
|
8
|
-
* item. The description's id is then `${controlId}-description`; set
|
|
9
|
-
* it as the control's `aria-describedby`. Without a controlId the row is
|
|
10
|
-
* a group the label names and the description describes, for several
|
|
11
|
-
* controls or a value that isn't a control.
|
|
12
|
-
*/
|
|
13
|
-
controlId?: string;
|
|
14
5
|
children: ReactNode;
|
|
15
6
|
className?: string;
|
|
16
7
|
}
|
|
17
|
-
|
|
8
|
+
type FormRowProps = FormRowBaseProps & ({
|
|
9
|
+
/**
|
|
10
|
+
* Id of the one control the label names; put the same id on that
|
|
11
|
+
* control. Inside an antd `Form.Item`, put it on the input, not on
|
|
12
|
+
* the item. The label's id is then `${controlId}-label` and the
|
|
13
|
+
* description's `${controlId}-description`; set the description's
|
|
14
|
+
* as the control's `aria-describedby`. Without a controlId the row
|
|
15
|
+
* is a group the label names and the description describes, for
|
|
16
|
+
* several controls or a value that isn't a control.
|
|
17
|
+
*/
|
|
18
|
+
controlId: string;
|
|
19
|
+
/**
|
|
20
|
+
* How the label names the control. `'for'`, the default, renders a
|
|
21
|
+
* `<label for={controlId}>`, for an input, select, textarea or
|
|
22
|
+
* button. `'aria-labelledby'` is for a control a `<label>` cannot
|
|
23
|
+
* name, such as a meter, a radio group or a code editor, or a
|
|
24
|
+
* control whose content belongs in its name, such as PickerField:
|
|
25
|
+
* the label is plain text, and the control takes
|
|
26
|
+
* `${controlId}-label` as its `aria-labelledby`.
|
|
27
|
+
*/
|
|
28
|
+
labelBy?: 'for' | 'aria-labelledby';
|
|
29
|
+
} | {
|
|
30
|
+
controlId?: undefined;
|
|
31
|
+
labelBy?: never;
|
|
32
|
+
});
|
|
33
|
+
/**
|
|
34
|
+
* Stacked at ≤768 px, the row stretches each direct child marked
|
|
35
|
+
* `data-aegis-field`, as the library's fields are; a host's own field can
|
|
36
|
+
* carry the marker too.
|
|
37
|
+
*/
|
|
38
|
+
export declare function FormRow({ label, description, controlId, labelBy, children, className, }: FormRowProps): import("react/jsx-runtime").JSX.Element;
|
|
18
39
|
export {};
|
|
@@ -1,32 +1,41 @@
|
|
|
1
1
|
import { jsxs as c, jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import { useId as
|
|
2
|
+
import { useId as _ } from "react";
|
|
3
3
|
/* empty css */
|
|
4
|
-
function
|
|
5
|
-
label:
|
|
6
|
-
description:
|
|
7
|
-
controlId:
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
function p({
|
|
5
|
+
label: o,
|
|
6
|
+
description: e,
|
|
7
|
+
controlId: r,
|
|
8
|
+
labelBy: d = "for",
|
|
9
|
+
children: i,
|
|
10
|
+
className: n
|
|
10
11
|
}) {
|
|
11
|
-
const
|
|
12
|
-
return /* @__PURE__ */ c("div", { className:
|
|
12
|
+
const l = _(), s = `${r ?? l}-label`, m = e ? `${r ?? l}-description` : void 0, f = ["aegis-form-row", n ?? ""].filter(Boolean).join(" ");
|
|
13
|
+
return /* @__PURE__ */ c("div", { className: f, children: [
|
|
13
14
|
/* @__PURE__ */ c("div", { className: "aegis-form-row__label-group", children: [
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
r && d === "for" ? /* @__PURE__ */ a(
|
|
16
|
+
"label",
|
|
17
|
+
{
|
|
18
|
+
id: s,
|
|
19
|
+
className: "aegis-form-row__label",
|
|
20
|
+
htmlFor: r,
|
|
21
|
+
children: o
|
|
22
|
+
}
|
|
23
|
+
) : /* @__PURE__ */ a("span", { id: s, className: "aegis-form-row__label", children: o }),
|
|
24
|
+
e && /* @__PURE__ */ a("span", { id: m, className: "aegis-form-row__description", children: e })
|
|
16
25
|
] }),
|
|
17
|
-
|
|
26
|
+
r ? /* @__PURE__ */ a("div", { className: "aegis-form-row__control", children: i }) : /* @__PURE__ */ a(
|
|
18
27
|
"div",
|
|
19
28
|
{
|
|
20
29
|
className: "aegis-form-row__control",
|
|
21
30
|
role: "group",
|
|
22
|
-
"aria-labelledby":
|
|
31
|
+
"aria-labelledby": s,
|
|
23
32
|
"aria-describedby": m,
|
|
24
|
-
children:
|
|
33
|
+
children: i
|
|
25
34
|
}
|
|
26
35
|
)
|
|
27
36
|
] });
|
|
28
37
|
}
|
|
29
38
|
export {
|
|
30
|
-
|
|
39
|
+
p as FormRow
|
|
31
40
|
};
|
|
32
41
|
//# sourceMappingURL=FormRow.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormRow.js","sources":["../../../src/components/ui/FormRow.tsx"],"sourcesContent":["import { type ReactNode, useId } from 'react';\n\nimport './FormRow.css';\n\ninterface
|
|
1
|
+
{"version":3,"file":"FormRow.js","sources":["../../../src/components/ui/FormRow.tsx"],"sourcesContent":["import { type ReactNode, useId } from 'react';\n\nimport './FormRow.css';\n\ninterface FormRowBaseProps {\n label: string;\n description?: string;\n children: ReactNode;\n className?: string;\n}\n\ntype FormRowProps = FormRowBaseProps &\n (\n | {\n /**\n * Id of the one control the label names; put the same id on that\n * control. Inside an antd `Form.Item`, put it on the input, not on\n * the item. The label's id is then `${controlId}-label` and the\n * description's `${controlId}-description`; set the description's\n * as the control's `aria-describedby`. Without a controlId the row\n * is a group the label names and the description describes, for\n * several controls or a value that isn't a control.\n */\n controlId: string;\n /**\n * How the label names the control. `'for'`, the default, renders a\n * `<label for={controlId}>`, for an input, select, textarea or\n * button. `'aria-labelledby'` is for a control a `<label>` cannot\n * name, such as a meter, a radio group or a code editor, or a\n * control whose content belongs in its name, such as PickerField:\n * the label is plain text, and the control takes\n * `${controlId}-label` as its `aria-labelledby`.\n */\n labelBy?: 'for' | 'aria-labelledby';\n }\n | { controlId?: undefined; labelBy?: never }\n );\n\n/**\n * Stacked at ≤768 px, the row stretches each direct child marked\n * `data-aegis-field`, as the library's fields are; a host's own field can\n * carry the marker too.\n */\nexport function FormRow({\n label,\n description,\n controlId,\n labelBy = 'for',\n children,\n className,\n}: FormRowProps) {\n const baseId = useId();\n const labelId = `${controlId ?? baseId}-label`;\n const descriptionId = description\n ? `${controlId ?? baseId}-description`\n : undefined;\n const cls = ['aegis-form-row', className ?? ''].filter(Boolean).join(' ');\n\n return (\n <div className={cls}>\n <div className=\"aegis-form-row__label-group\">\n {controlId && labelBy === 'for' ? (\n <label\n id={labelId}\n className=\"aegis-form-row__label\"\n htmlFor={controlId}\n >\n {label}\n </label>\n ) : (\n <span id={labelId} className=\"aegis-form-row__label\">\n {label}\n </span>\n )}\n {description && (\n <span id={descriptionId} className=\"aegis-form-row__description\">\n {description}\n </span>\n )}\n </div>\n {controlId ? (\n <div className=\"aegis-form-row__control\">{children}</div>\n ) : (\n <div\n className=\"aegis-form-row__control\"\n role=\"group\"\n aria-labelledby={labelId}\n aria-describedby={descriptionId}\n >\n {children}\n </div>\n )}\n </div>\n );\n}\n"],"names":["FormRow","label","description","controlId","labelBy","children","className","baseId","useId","labelId","descriptionId","cls","jsxs","jsx"],"mappings":";;;AA2CO,SAASA,EAAQ;AAAA,EACtB,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,WAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,UAAAC;AAAA,EACA,WAAAC;AACF,GAAiB;AACf,QAAMC,IAASC,EAAA,GACTC,IAAU,GAAGN,KAAaI,CAAM,UAChCG,IAAgBR,IAClB,GAAGC,KAAaI,CAAM,iBACtB,QACEI,IAAM,CAAC,kBAAkBL,KAAa,EAAE,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAExE,SACE,gBAAAM,EAAC,OAAA,EAAI,WAAWD,GACd,UAAA;AAAA,IAAA,gBAAAC,EAAC,OAAA,EAAI,WAAU,+BACZ,UAAA;AAAA,MAAAT,KAAaC,MAAY,QACxB,gBAAAS;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,IAAIJ;AAAA,UACJ,WAAU;AAAA,UACV,SAASN;AAAA,UAER,UAAAF;AAAA,QAAA;AAAA,MAAA,IAGH,gBAAAY,EAAC,QAAA,EAAK,IAAIJ,GAAS,WAAU,yBAC1B,UAAAR,GACH;AAAA,MAEDC,KACC,gBAAAW,EAAC,QAAA,EAAK,IAAIH,GAAe,WAAU,+BAChC,UAAAR,EAAA,CACH;AAAA,IAAA,GAEJ;AAAA,IACCC,IACC,gBAAAU,EAAC,OAAA,EAAI,WAAU,2BAA2B,UAAAR,GAAS,IAEnD,gBAAAQ;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAU;AAAA,QACV,MAAK;AAAA,QACL,mBAAiBJ;AAAA,QACjB,oBAAkBC;AAAA,QAEjB,UAAAL;AAAA,MAAA;AAAA,IAAA;AAAA,EACH,GAEJ;AAEJ;"}
|