alinea 2.0.0-preview.13 → 2.0.0-preview.14
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/.init/content/pages/welcome.json +1 -1
- package/dist/.mcp/later/dev.json +1 -1
- package/dist/.mcp/online/dev.json +1 -1
- package/dist/adapter/next/cms.js +6 -2
- package/dist/adapter/next/context.js +1 -4
- package/dist/adapter/next/handler.js +12 -1
- package/dist/backend/CommitEntries.d.ts +17 -0
- package/dist/backend/CommitEntries.js +39 -0
- package/dist/backend/Handler.d.ts +9 -0
- package/dist/backend/Handler.js +80 -20
- package/dist/backend/api/BasicAuth.js +5 -1
- package/dist/backend/api/CreateBackend.js +2 -2
- package/dist/backend/api/DatabaseApi.js +18 -5
- package/dist/backend/api/GithubApi.d.ts +13 -0
- package/dist/backend/api/GithubApi.js +170 -30
- package/dist/backend/api/database.js +2 -2
- package/dist/backend/util/Syncable.d.ts +6 -0
- package/dist/backend/util/Syncable.js +3 -1
- package/dist/bundled.d.ts +911 -151
- package/dist/chunks/{chunk-5H4D5JQL.js → chunk-2PP7WJUJ.js} +1 -11
- package/dist/chunks/{chunk-QHHMKJUO.js → chunk-7DDPSWRY.js} +465 -2
- package/dist/chunks/{chunk-HOETF6HN.js → chunk-PMGIIYDD.js} +1 -0
- package/dist/chunks/{chunk-3QFSGTGF.js → chunk-SCV3TEXM.js} +1 -1
- package/dist/chunks/{chunk-UPY2RUZF.js → chunk-TWBREZWC.js} +30 -0
- package/dist/cli/Generate.js +20 -7
- package/dist/cli/Mcp.js +1 -1
- package/dist/cli/Serve.js +1 -1
- package/dist/cli/bin.js +1 -1
- package/dist/cli/build/BuildEmitter.d.ts +5 -1
- package/dist/cli/build/BuildEmitter.js +8 -3
- package/dist/cli/generate/CompileConfig.js +10 -6
- package/dist/cli/generate/DevDB.d.ts +4 -1
- package/dist/cli/generate/DevDB.js +15 -7
- package/dist/cli/generate/GenerateDashboard.js +1 -0
- package/dist/cli/generate/MediaLocations.d.ts +18 -0
- package/dist/cli/generate/MediaLocations.js +69 -0
- package/dist/cli/serve/CreateLocalServer.js +1 -0
- package/dist/cli/serve/mcp/DevMcp.js +1 -1
- package/dist/cloud/CloudRemote.js +21 -7
- package/dist/cms.d.ts +4 -2
- package/dist/components/Alert.js +2 -2
- package/dist/components/AppShell.js +2 -2
- package/dist/components/AsyncList.d.ts +52 -0
- package/dist/components/AsyncList.js +69 -0
- package/dist/components/Breadcrumbs.js +6 -6
- package/dist/components/Button.js +4 -4
- package/dist/components/Calendar.js +18 -18
- package/dist/components/Checkbox.js +10 -10
- package/dist/components/CheckboxGroup.js +2 -2
- package/dist/components/Collapsible.js +5 -5
- package/dist/components/ColorSwatch.js +2 -2
- package/dist/components/ColorSwatchPicker.js +4 -4
- package/dist/components/ComboBox.d.ts +27 -9
- package/dist/components/ComboBox.js +40 -9
- package/dist/components/Command.js +13 -13
- package/dist/components/ContentCard.js +28 -28
- package/dist/components/ContentGrid.js +11 -11
- package/dist/components/DataList.js +1 -1
- package/dist/components/DateField.d.ts +4 -0
- package/dist/components/DateField.js +2 -2
- package/dist/components/DatePicker.js +2 -2
- package/dist/components/DateRangePicker.js +2 -2
- package/dist/components/Dialog.d.ts +14 -3
- package/dist/components/Dialog.js +38 -11
- package/dist/components/DropZone.js +6 -6
- package/dist/components/DropdownMenu.js +8 -8
- package/dist/components/Empty.js +4 -4
- package/dist/components/Field.d.ts +1 -1
- package/dist/components/Field.js +18 -12
- package/dist/components/Form.d.ts +23 -0
- package/dist/components/Form.js +64 -0
- package/dist/components/Link.d.ts +8 -1
- package/dist/components/List.js +27 -27
- package/dist/components/MediaPreview.js +5 -5
- package/dist/components/MultipleSelect.d.ts +13 -8
- package/dist/components/MultipleSelect.js +25 -25
- package/dist/components/NavRail.js +7 -7
- package/dist/components/NumberField.d.ts +5 -1
- package/dist/components/NumberField.js +6 -4
- package/dist/components/Page.js +6 -6
- package/dist/components/Popover.js +2 -2
- package/dist/components/PreviewFrame.js +8 -8
- package/dist/components/RadioGroup.js +10 -10
- package/dist/components/Resizable.js +1 -1
- package/dist/components/SearchField.js +8 -8
- package/dist/components/Select.d.ts +13 -10
- package/dist/components/Select.js +18 -32
- package/dist/components/Sheet.js +6 -6
- package/dist/components/Sidebar.js +5 -5
- package/dist/components/SortableList.js +12 -12
- package/dist/components/Spinner.js +4 -4
- package/dist/components/Stack.d.ts +20 -0
- package/dist/components/Stack.js +45 -0
- package/dist/components/Surface.js +1 -1
- package/dist/components/Switch.js +5 -5
- package/dist/components/Table.d.ts +11 -1
- package/dist/components/Table.js +81 -53
- package/dist/components/Tabs.js +6 -6
- package/dist/components/TagGroup.js +10 -10
- package/dist/components/TextField.d.ts +7 -1
- package/dist/components/TextField.js +20 -11
- package/dist/components/TimeField.d.ts +6 -1
- package/dist/components/TimeField.js +51 -26
- package/dist/components/Timestamp.js +1 -1
- package/dist/components/ToggleGroup.js +2 -2
- package/dist/components/Toolbar.js +3 -3
- package/dist/components/Tooltip.js +5 -4
- package/dist/components/Tree.js +27 -27
- package/dist/components/internal/DateControl.js +11 -11
- package/dist/components/internal/FormScope.d.ts +2 -0
- package/dist/components/internal/FormScope.js +8 -0
- package/dist/components/internal/ListBoxGroup.d.ts +12 -0
- package/dist/components/internal/ListBoxGroup.js +46 -0
- package/dist/components/internal/ListBoxOption.d.ts +2 -2
- package/dist/components/internal/ListBoxOption.js +5 -5
- package/dist/components/internal/Locale.js +2 -2
- package/dist/components/internal/PopoverSurface.js +5 -4
- package/dist/components/internal/SelectionCheckbox.js +5 -5
- package/dist/components/internal/Slot.js +1 -1
- package/dist/components/internal/ToggleButton.js +4 -4
- package/dist/components/internal/Trigger.js +2 -2
- package/dist/components/internal/useDragDrop.js +2 -2
- package/dist/components/types.d.ts +4 -0
- package/dist/components.d.ts +3 -0
- package/dist/components.js +3 -0
- package/dist/core/Client.js +12 -1
- package/dist/core/Config.d.ts +6 -0
- package/dist/core/Config.js +12 -0
- package/dist/core/DashboardEntry.d.ts +19 -0
- package/dist/core/DashboardEntry.js +0 -0
- package/dist/core/Document.d.ts +2 -2
- package/dist/core/Document.js +10 -3
- package/dist/core/EntryFields.d.ts +8 -2
- package/dist/core/Field.d.ts +5 -0
- package/dist/core/Filter.d.ts +19 -2
- package/dist/core/Filter.js +5 -0
- package/dist/core/Graph.d.ts +10 -2
- package/dist/core/Overview.d.ts +74 -5
- package/dist/core/Overview.js +1 -0
- package/dist/core/Root.js +1 -1
- package/dist/core/Scope.d.ts +5 -0
- package/dist/core/Scope.js +22 -5
- package/dist/core/Type.d.ts +25 -6
- package/dist/core/Type.js +25 -7
- package/dist/core/db/LocalStore.d.ts +7 -0
- package/dist/core/field/CreateField.d.ts +1 -2
- package/dist/core/source/Source.d.ts +2 -0
- package/dist/core/source/Source.js +11 -0
- package/dist/core/util/Async.d.ts +2 -0
- package/dist/core/util/Async.js +12 -1
- package/dist/core/util/Checks.js +1 -1
- package/dist/core/util/Slugs.js +4 -3
- package/dist/dashboard/App.css +13 -11
- package/dist/dashboard/App.d.ts +1 -0
- package/dist/dashboard/App.js +22 -6
- package/dist/dashboard/Href.d.ts +37 -0
- package/dist/dashboard/Href.js +46 -0
- package/dist/dashboard/app/ActivityStatus.js +34 -12
- package/dist/dashboard/app/AuthView.js +2 -2
- package/dist/dashboard/app/BlockSettings.d.ts +9 -0
- package/dist/dashboard/app/BlockSettings.js +16 -0
- package/dist/dashboard/app/BlockSheet.js +3 -3
- package/dist/dashboard/app/BlockSheetStoryFrame.js +2 -2
- package/dist/dashboard/app/CompactField.js +15 -15
- package/dist/dashboard/app/CroppedImage.js +2 -2
- package/dist/dashboard/app/DashboardLayout.d.ts +1 -1
- package/dist/dashboard/app/DashboardLayout.js +12 -0
- package/dist/dashboard/app/EntryActions.d.ts +11 -0
- package/dist/dashboard/app/EntryActions.js +30 -0
- package/dist/dashboard/app/EntryFields.d.ts +15 -2
- package/dist/dashboard/app/EntryFields.js +26 -5
- package/dist/dashboard/app/EntryHeader.js +17 -7
- package/dist/dashboard/app/EntryReferences.js +2 -2
- package/dist/dashboard/app/EntrySidebar.js +25 -23
- package/dist/dashboard/app/EntrySidebarPreview.js +2 -2
- package/dist/dashboard/app/EntryValidationModal.js +3 -3
- package/dist/dashboard/app/Explorer.js +84 -45
- package/dist/dashboard/app/ExplorerBatchActions.js +4 -4
- package/dist/dashboard/app/ExplorerControls.js +5 -5
- package/dist/dashboard/app/ExplorerList.js +2 -2
- package/dist/dashboard/app/ExplorerModal.js +3 -3
- package/dist/dashboard/app/ExplorerOverviewHeader.d.ts +6 -0
- package/dist/dashboard/app/ExplorerOverviewHeader.js +28 -0
- package/dist/dashboard/app/ExplorerTable.js +7 -7
- package/dist/dashboard/app/ExplorerTabs.d.ts +12 -0
- package/dist/dashboard/app/ExplorerTabs.js +42 -0
- package/dist/dashboard/app/ImageEditor.js +31 -31
- package/dist/dashboard/app/LinkPicker.js +3 -3
- package/dist/dashboard/app/LocaleMenu.js +9 -9
- package/dist/dashboard/app/MediaPreviewCell.js +5 -5
- package/dist/dashboard/app/OverviewCell.js +12 -10
- package/dist/dashboard/app/RemoveDialog.js +5 -0
- package/dist/dashboard/app/SearchBar.js +4 -4
- package/dist/dashboard/app/SettingsTab.d.ts +6 -0
- package/dist/dashboard/app/SettingsTab.js +27 -0
- package/dist/dashboard/app/SidebarTree.js +19 -19
- package/dist/dashboard/app/WorkspaceMenu.js +6 -6
- package/dist/dashboard/app/WorkspaceRoots.js +102 -98
- package/dist/dashboard/app/editor/FileEditor.js +18 -18
- package/dist/dashboard/app/pages/EntryPage.js +42 -39
- package/dist/dashboard/app/pages/RootPage.js +3 -3
- package/dist/dashboard/app/pages/SplashPage.js +94 -79
- package/dist/dashboard/app/pages/UsersPage.js +9 -9
- package/dist/dashboard/app/ui/DashboardModal.js +14 -14
- package/dist/dashboard/atoms/activity.d.ts +1 -0
- package/dist/dashboard/atoms/activity.js +8 -5
- package/dist/dashboard/atoms/config.d.ts +2 -0
- package/dist/dashboard/atoms/dashboard.d.ts +11 -0
- package/dist/dashboard/atoms/dashboard.js +8 -0
- package/dist/dashboard/atoms/editor.d.ts +7 -1
- package/dist/dashboard/atoms/editor.js +14 -2
- package/dist/dashboard/atoms/explorer.d.ts +15 -0
- package/dist/dashboard/atoms/explorer.js +43 -14
- package/dist/dashboard/atoms/graph.d.ts +5 -0
- package/dist/dashboard/atoms/graph.js +26 -1
- package/dist/dashboard/atoms/nav.d.ts +16 -10
- package/dist/dashboard/atoms/nav.js +96 -36
- package/dist/dashboard/atoms/overview.d.ts +26 -4
- package/dist/dashboard/atoms/overview.js +41 -12
- package/dist/dashboard/atoms/root.js +7 -1
- package/dist/dashboard/boot/ActivityEvent.d.ts +1 -1
- package/dist/dashboard/boot/Boot.js +6 -0
- package/dist/dashboard/boot/DashboardWorker.d.ts +6 -0
- package/dist/dashboard/boot/DashboardWorker.js +89 -8
- package/dist/dashboard/boot/LoadWorker.js +3 -0
- package/dist/dashboard/boot/SyncEvent.d.ts +7 -0
- package/dist/dashboard/boot/SyncEvent.js +14 -0
- package/dist/dashboard/boot/WorkerDB.d.ts +1 -0
- package/dist/dashboard/boot/WorkerDB.js +3 -0
- package/dist/dashboard/cms/EntryTable.d.ts +4 -3
- package/dist/dashboard/cms/EntryTable.js +2 -2
- package/dist/dashboard/cms/ViewProps.d.ts +3 -2
- package/dist/dashboard/cms/hooks.d.ts +34 -18
- package/dist/dashboard/cms/hooks.js +43 -18
- package/dist/dashboard/contexts.d.ts +3 -2
- package/dist/dashboard/contexts.js +3 -2
- package/dist/dashboard/hook/UseEntryEditor.d.ts +1 -1
- package/dist/dashboard/hook/UseEntryEditor.js +7 -3
- package/dist/dashboard/icons.d.ts +1 -0
- package/dist/dashboard/icons.js +15 -0
- package/dist/database/BrowserEntryStore.js +35 -13
- package/dist/database/DatabaseTables.js +1 -1
- package/dist/database/EntryDatabase.d.ts +10 -1
- package/dist/database/EntryDatabase.js +31 -10
- package/dist/database/EntryStore.js +1 -11
- package/dist/database/entry/EntryTable.d.ts +5 -3
- package/dist/database/entry/EntryTable.js +25 -8
- package/dist/database/query/Condition.d.ts +4 -1
- package/dist/database/query/Condition.js +16 -5
- package/dist/database/query/EntryQuery.js +59 -7
- package/dist/database/query/Relation.d.ts +13 -1
- package/dist/database/query/Relation.js +19 -1
- package/dist/database/query/Search.d.ts +7 -1
- package/dist/database/query/Search.js +54 -9
- package/dist/database/sync/EntrySyncer.d.ts +2 -0
- package/dist/database/sync/EntrySyncer.js +4 -2
- package/dist/database/sync/Ingest.d.ts +2 -1
- package/dist/database/sync/Ingest.js +20 -6
- package/dist/field/code/CodeField.view.js +12 -12
- package/dist/field/link/EntryLink.d.ts +4 -5
- package/dist/field/link/FileLink.d.ts +2 -2
- package/dist/field/link/ImageLink.d.ts +2 -5
- package/dist/field/link/ImageLink.js +0 -1
- package/dist/field/link/LinkField.view.js +18 -15
- package/dist/field/list/ListField.view.js +50 -35
- package/dist/field/metadata/MetadataField.view.js +14 -14
- package/dist/field/richtext/RichTextBlock.js +39 -35
- package/dist/field/richtext/RichTextExtensions.js +23 -23
- package/dist/field/richtext/RichTextField.view.js +6 -6
- package/dist/field/richtext/RichTextInsertMenu.js +5 -5
- package/dist/field/richtext/RichTextToolbar.js +26 -1
- package/dist/field/richtext/Toolbar.d.ts +9 -1
- package/dist/field/richtext/Toolbar.js +12 -2
- package/dist/field/select/SelectField.view.js +1 -0
- package/dist/index.css +174 -23
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -1
- package/dist/next.d.ts +2 -0
- package/dist/next.edge.d.ts +2 -0
- package/dist/picker/entry/EntryPicker.d.ts +3 -1
- package/dist/picker/entry/EntryPicker.js +15 -1
- package/dist/preview/react.js +3 -0
- package/dist/query.d.ts +26 -14
- package/dist/query.js +4 -0
- package/dist/types.d.ts +8 -5
- package/dist/ui/Stack.d.ts +4 -2
- package/docs/ai-setup.md +3 -3
- package/docs/cli.md +4 -2
- package/docs/components/combo-box.md +105 -16
- package/docs/components/date-field.md +1 -1
- package/docs/components/dialog.md +51 -0
- package/docs/components/form.md +67 -0
- package/docs/components/link.md +10 -0
- package/docs/components/multiple-select.md +9 -17
- package/docs/components/number-field.md +5 -1
- package/docs/components/select.md +9 -20
- package/docs/components/stack.md +42 -0
- package/docs/components/table.md +83 -0
- package/docs/components/text-field.md +9 -1
- package/docs/components/time-field.md +5 -1
- package/docs/components.md +39 -1
- package/docs/configuration.md +3 -1
- package/docs/custom-fields.md +135 -7
- package/docs/deploy/self-host.md +2 -0
- package/docs/deploy.md +7 -4
- package/docs/fields/image.md +0 -1
- package/docs/fields/list.md +19 -0
- package/docs/fields/object.md +5 -3
- package/docs/fields/rich-text.md +31 -0
- package/docs/index.md +8 -6
- package/docs/instant-publishing.md +23 -2
- package/docs/overviews.md +128 -4
- package/docs/query/filtering.md +2 -0
- package/docs/query/related.md +58 -9
- package/docs/query.md +52 -1
- package/docs/quickstart.md +5 -5
- package/docs/schema/document.md +2 -0
- package/docs/schema/type.md +3 -1
- package/docs/upgrading.md +100 -19
- package/llms-full.txt +1022 -125
- package/package.json +1 -1
- package/readme.md +2 -2
- package/dist/chunks/{chunk-4ZA6KZHS.js → chunk-6FQ5IMNA.js} +3 -3
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
$070c0dd15dc89b58$export$3c6489d84dc98b6
|
|
3
|
-
} from "../chunks/chunk-
|
|
3
|
+
} from "../chunks/chunk-7DDPSWRY.js";
|
|
4
4
|
import "../chunks/chunk-NUFRM6SI.js";
|
|
5
5
|
import {
|
|
6
6
|
$d40e85a29b831dd6$export$a144e1752ebe0aa
|
|
7
|
-
} from "../chunks/chunk-
|
|
7
|
+
} from "../chunks/chunk-PMGIIYDD.js";
|
|
8
8
|
import "../chunks/chunk-RKDPDEF7.js";
|
|
9
9
|
import "../chunks/chunk-PSSMQKAH.js";
|
|
10
10
|
import {
|
|
@@ -18,12 +18,12 @@ import { Button } from "./Button.js";
|
|
|
18
18
|
|
|
19
19
|
// src/components/DropZone.module.css
|
|
20
20
|
var DropZone_default = {
|
|
21
|
-
"is-disabled": "alinea-is-disabled",
|
|
22
|
-
"isDisabled": "alinea-is-disabled",
|
|
23
|
-
"DropZone": "alinea-DropZone",
|
|
24
21
|
"DropZoneDescription": "alinea-DropZoneDescription",
|
|
25
22
|
"is-dropTarget": "alinea-is-dropTarget",
|
|
26
|
-
"isDropTarget": "alinea-is-dropTarget"
|
|
23
|
+
"isDropTarget": "alinea-is-dropTarget",
|
|
24
|
+
"is-disabled": "alinea-is-disabled",
|
|
25
|
+
"isDisabled": "alinea-is-disabled",
|
|
26
|
+
"DropZone": "alinea-DropZone"
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
// src/components/DropZone.tsx
|
|
@@ -7,9 +7,9 @@ import {
|
|
|
7
7
|
$53e61d82d8b8611d$export$8b251419efc915eb,
|
|
8
8
|
$650bea62ab5f5f0f$export$16e4d70cc375e707,
|
|
9
9
|
$e28ab3efe3e87743$export$1ff3c3f08ae963c0
|
|
10
|
-
} from "../chunks/chunk-
|
|
10
|
+
} from "../chunks/chunk-7DDPSWRY.js";
|
|
11
11
|
import "../chunks/chunk-NUFRM6SI.js";
|
|
12
|
-
import "../chunks/chunk-
|
|
12
|
+
import "../chunks/chunk-PMGIIYDD.js";
|
|
13
13
|
import "../chunks/chunk-RKDPDEF7.js";
|
|
14
14
|
import "../chunks/chunk-PSSMQKAH.js";
|
|
15
15
|
import {
|
|
@@ -27,18 +27,18 @@ import { IcRoundCheck, IcRoundKeyboardArrowRight } from "alinea/dashboard/icons"
|
|
|
27
27
|
|
|
28
28
|
// src/components/DropdownMenu.module.css
|
|
29
29
|
var DropdownMenu_default = {
|
|
30
|
-
"DropdownMenuItem": "alinea-DropdownMenuItem",
|
|
31
|
-
"DropdownMenuItem-icon": "alinea-DropdownMenuItem-icon",
|
|
32
|
-
"DropdownMenuItemIcon": "alinea-DropdownMenuItem-icon",
|
|
33
30
|
"is-focusVisible": "alinea-is-focusVisible",
|
|
34
31
|
"isFocusVisible": "alinea-is-focusVisible",
|
|
35
|
-
"
|
|
36
|
-
"
|
|
32
|
+
"DropdownMenuItem-icon": "alinea-DropdownMenuItem-icon",
|
|
33
|
+
"DropdownMenuItemIcon": "alinea-DropdownMenuItem-icon",
|
|
37
34
|
"DropdownMenuContent": "alinea-DropdownMenuContent",
|
|
35
|
+
"DropdownMenuItem": "alinea-DropdownMenuItem",
|
|
38
36
|
"DropdownMenuSeparator": "alinea-DropdownMenuSeparator",
|
|
37
|
+
"DropdownMenuGroup": "alinea-DropdownMenuGroup",
|
|
39
38
|
"DropdownMenuItem-indicator": "alinea-DropdownMenuItem-indicator",
|
|
40
39
|
"DropdownMenuItemIndicator": "alinea-DropdownMenuItem-indicator",
|
|
41
|
-
"DropdownMenuLabel": "alinea-DropdownMenuLabel"
|
|
40
|
+
"DropdownMenuLabel": "alinea-DropdownMenuLabel",
|
|
41
|
+
"DropdownMenuShortcut": "alinea-DropdownMenuShortcut"
|
|
42
42
|
};
|
|
43
43
|
|
|
44
44
|
// src/components/DropdownMenu.tsx
|
package/dist/components/Empty.js
CHANGED
|
@@ -8,12 +8,12 @@ import { createElement } from "react";
|
|
|
8
8
|
|
|
9
9
|
// src/components/Empty.module.css
|
|
10
10
|
var Empty_default = {
|
|
11
|
-
"EmptyDescription": "alinea-EmptyDescription",
|
|
12
|
-
"Empty": "alinea-Empty",
|
|
13
|
-
"EmptyTitle": "alinea-EmptyTitle",
|
|
14
11
|
"EmptyContent": "alinea-EmptyContent",
|
|
12
|
+
"Empty": "alinea-Empty",
|
|
15
13
|
"EmptyMedia": "alinea-EmptyMedia",
|
|
16
|
-
"
|
|
14
|
+
"EmptyDescription": "alinea-EmptyDescription",
|
|
15
|
+
"EmptyHeader": "alinea-EmptyHeader",
|
|
16
|
+
"EmptyTitle": "alinea-EmptyTitle"
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
// src/components/Empty.tsx
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
2
|
import type { FieldSharedProps, StyleProps } from './types.js';
|
|
3
3
|
export interface FieldProps extends FieldSharedProps, StyleProps {
|
|
4
4
|
/** Id of the control the label describes, not needed inside our inputs */
|
package/dist/components/Field.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
|
+
$1f3c3b1a70cec653$export$ff05c3ac10437e03,
|
|
2
3
|
$43a3b93638fe5db9$export$b04be29aa201d4f5,
|
|
3
4
|
$efe09c6d1c304b50$export$5f1af8db9871e1d6
|
|
4
|
-
} from "../chunks/chunk-
|
|
5
|
+
} from "../chunks/chunk-7DDPSWRY.js";
|
|
5
6
|
import "../chunks/chunk-NUFRM6SI.js";
|
|
6
|
-
import "../chunks/chunk-
|
|
7
|
+
import "../chunks/chunk-PMGIIYDD.js";
|
|
7
8
|
import "../chunks/chunk-RKDPDEF7.js";
|
|
8
9
|
import "../chunks/chunk-PSSMQKAH.js";
|
|
9
10
|
import {
|
|
@@ -12,26 +13,28 @@ import {
|
|
|
12
13
|
import "../chunks/chunk-CQ52GEHY.js";
|
|
13
14
|
|
|
14
15
|
// src/components/Field.tsx
|
|
16
|
+
import { useContext } from "react";
|
|
15
17
|
import { Badge } from "./Badge.js";
|
|
16
18
|
import { IcRoundPublic } from "alinea/dashboard/icons";
|
|
17
19
|
|
|
18
20
|
// src/components/Field.module.css
|
|
19
21
|
var Field_default = {
|
|
20
|
-
"
|
|
21
|
-
"isDisabled": "alinea-is-disabled",
|
|
22
|
+
"Field": "alinea-Field",
|
|
22
23
|
"FieldHeader-icon": "alinea-FieldHeader-icon",
|
|
23
24
|
"FieldHeaderIcon": "alinea-FieldHeader-icon",
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"FieldHeader": "alinea-FieldHeader",
|
|
25
|
+
"FieldLabel-required": "alinea-FieldLabel-required",
|
|
26
|
+
"FieldLabelRequired": "alinea-FieldLabel-required",
|
|
27
27
|
"FieldDescription": "alinea-FieldDescription",
|
|
28
28
|
"FieldError": "alinea-FieldError",
|
|
29
|
-
"
|
|
30
|
-
"
|
|
29
|
+
"FieldHeader": "alinea-FieldHeader",
|
|
30
|
+
"is-disabled": "alinea-is-disabled",
|
|
31
|
+
"isDisabled": "alinea-is-disabled",
|
|
32
|
+
"FieldLabel": "alinea-FieldLabel"
|
|
31
33
|
};
|
|
32
34
|
|
|
33
35
|
// src/components/Field.tsx
|
|
34
36
|
import { Icon } from "./Icon.js";
|
|
37
|
+
import { FormScope } from "./internal/FormScope.js";
|
|
35
38
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
36
39
|
var styles = dist_default(Field_default);
|
|
37
40
|
function Field({
|
|
@@ -47,13 +50,16 @@ function Field({
|
|
|
47
50
|
style,
|
|
48
51
|
children
|
|
49
52
|
}) {
|
|
53
|
+
const validation = useContext($1f3c3b1a70cec653$export$ff05c3ac10437e03);
|
|
54
|
+
const inForm = useContext(FormScope);
|
|
55
|
+
const message = error || (inForm && validation?.isInvalid ? validation.validationErrors.join(" ") : void 0);
|
|
50
56
|
const hasHeader = label || icon || description || shared;
|
|
51
|
-
if (!hasHeader && !
|
|
57
|
+
if (!hasHeader && !message && !children) return null;
|
|
52
58
|
return /* @__PURE__ */ jsxs(
|
|
53
59
|
"div",
|
|
54
60
|
{
|
|
55
61
|
"data-slot": "field",
|
|
56
|
-
"data-invalid":
|
|
62
|
+
"data-invalid": message ? true : void 0,
|
|
57
63
|
className: styles.Field(dist_default.merge({ className })),
|
|
58
64
|
style,
|
|
59
65
|
children: [
|
|
@@ -78,7 +84,7 @@ function Field({
|
|
|
78
84
|
}
|
|
79
85
|
),
|
|
80
86
|
children,
|
|
81
|
-
|
|
87
|
+
message && /* @__PURE__ */ jsx(FieldError, { children: message })
|
|
82
88
|
]
|
|
83
89
|
}
|
|
84
90
|
);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import type { AriaProps, DataProps, StyleProps, ValidationErrors } from './types.js';
|
|
3
|
+
export type FormSubmitResult = ValidationErrors | undefined | void;
|
|
4
|
+
export interface FormProps extends StyleProps, AriaProps, DataProps {
|
|
5
|
+
/**
|
|
6
|
+
* Errors keyed by field name, eg. from the server. A field shows its
|
|
7
|
+
* error until it is edited.
|
|
8
|
+
*/
|
|
9
|
+
validationErrors?: ValidationErrors;
|
|
10
|
+
/**
|
|
11
|
+
* Called with the form data instead of submitting the form natively.
|
|
12
|
+
* Errors it returns are shown on the fields, next to `validationErrors`.
|
|
13
|
+
*/
|
|
14
|
+
onSubmit?: (data: FormData) => FormSubmitResult | Promise<FormSubmitResult>;
|
|
15
|
+
children: ReactNode;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* A form whose fields show validation errors: native constraints such as
|
|
19
|
+
* `required` once the form is submitted, and `validationErrors` or the
|
|
20
|
+
* errors returned by `onSubmit` by field name. An `error` set on a field
|
|
21
|
+
* itself takes precedence.
|
|
22
|
+
*/
|
|
23
|
+
export declare function Form({ validationErrors, onSubmit, className, children, ...props }: FormProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import {
|
|
2
|
+
$cdaed739b1139372$export$a7fed597f4b8afd8
|
|
3
|
+
} from "../chunks/chunk-7DDPSWRY.js";
|
|
4
|
+
import "../chunks/chunk-NUFRM6SI.js";
|
|
5
|
+
import "../chunks/chunk-PMGIIYDD.js";
|
|
6
|
+
import "../chunks/chunk-RKDPDEF7.js";
|
|
7
|
+
import "../chunks/chunk-PSSMQKAH.js";
|
|
8
|
+
import {
|
|
9
|
+
dist_default
|
|
10
|
+
} from "../chunks/chunk-I4OYYAX5.js";
|
|
11
|
+
import "../chunks/chunk-CQ52GEHY.js";
|
|
12
|
+
|
|
13
|
+
// src/components/Form.tsx
|
|
14
|
+
import { useMemo, useState } from "react";
|
|
15
|
+
|
|
16
|
+
// src/components/Form.module.css
|
|
17
|
+
var Form_default = {
|
|
18
|
+
"Form": "alinea-Form"
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
// src/components/Form.tsx
|
|
22
|
+
import { FormScope } from "./internal/FormScope.js";
|
|
23
|
+
import { jsx } from "react/jsx-runtime";
|
|
24
|
+
var styles = dist_default(Form_default);
|
|
25
|
+
function Form({
|
|
26
|
+
validationErrors,
|
|
27
|
+
onSubmit,
|
|
28
|
+
className,
|
|
29
|
+
children,
|
|
30
|
+
...props
|
|
31
|
+
}) {
|
|
32
|
+
const [returned, setReturned] = useState();
|
|
33
|
+
const [pending, setPending] = useState(false);
|
|
34
|
+
const errors = useMemo(
|
|
35
|
+
() => returned ? { ...validationErrors, ...returned } : validationErrors,
|
|
36
|
+
[validationErrors, returned]
|
|
37
|
+
);
|
|
38
|
+
async function submit(event) {
|
|
39
|
+
if (!onSubmit) return;
|
|
40
|
+
event.preventDefault();
|
|
41
|
+
const data = new FormData(event.currentTarget);
|
|
42
|
+
setPending(true);
|
|
43
|
+
try {
|
|
44
|
+
setReturned(await onSubmit(data) || void 0);
|
|
45
|
+
} finally {
|
|
46
|
+
setPending(false);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
return /* @__PURE__ */ jsx(FormScope.Provider, { value: true, children: /* @__PURE__ */ jsx(
|
|
50
|
+
$cdaed739b1139372$export$a7fed597f4b8afd8,
|
|
51
|
+
{
|
|
52
|
+
"data-slot": "form",
|
|
53
|
+
...props,
|
|
54
|
+
"data-pending": pending || void 0,
|
|
55
|
+
validationErrors: errors,
|
|
56
|
+
onSubmit: submit,
|
|
57
|
+
className: styles.Form(dist_default.merge({ className })),
|
|
58
|
+
children
|
|
59
|
+
}
|
|
60
|
+
) });
|
|
61
|
+
}
|
|
62
|
+
export {
|
|
63
|
+
Form
|
|
64
|
+
};
|
|
@@ -1,10 +1,17 @@
|
|
|
1
|
-
import type { MouseEvent, ReactNode, Ref } from 'react';
|
|
1
|
+
import type { HTMLAttributeReferrerPolicy, MouseEvent, ReactNode, Ref } from 'react';
|
|
2
2
|
import type { AriaProps, DataProps, StyleProps } from './types.js';
|
|
3
3
|
export interface LinkProps extends StyleProps, AriaProps, DataProps {
|
|
4
4
|
href?: string;
|
|
5
5
|
target?: string;
|
|
6
6
|
rel?: string;
|
|
7
7
|
download?: boolean | string;
|
|
8
|
+
/** Tooltip text */
|
|
9
|
+
title?: string;
|
|
10
|
+
tabIndex?: number;
|
|
11
|
+
lang?: string;
|
|
12
|
+
hrefLang?: string;
|
|
13
|
+
referrerPolicy?: HTMLAttributeReferrerPolicy;
|
|
14
|
+
'aria-current'?: boolean | 'page' | 'step' | 'location' | 'date' | 'time';
|
|
8
15
|
/** `plain` underlines on hover, `underline` is always underlined */
|
|
9
16
|
variant?: 'plain' | 'underline';
|
|
10
17
|
disabled?: boolean;
|
package/dist/components/List.js
CHANGED
|
@@ -11,42 +11,42 @@ import { Icon } from "./Icon.js";
|
|
|
11
11
|
|
|
12
12
|
// src/components/List.module.css
|
|
13
13
|
var List_default = {
|
|
14
|
-
"
|
|
15
|
-
"ListLabel-title-text": "alinea-ListLabel-title-text",
|
|
16
|
-
"ListLabelTitleText": "alinea-ListLabel-title-text",
|
|
17
|
-
"ListLabel-fold": "alinea-ListLabel-fold",
|
|
18
|
-
"ListLabelFold": "alinea-ListLabel-fold",
|
|
19
|
-
"ListLabel-toggle": "alinea-ListLabel-toggle",
|
|
20
|
-
"ListLabelToggle": "alinea-ListLabel-toggle",
|
|
21
|
-
"ListEmpty": "alinea-ListEmpty",
|
|
22
|
-
"ListItem-inner": "alinea-ListItem-inner",
|
|
23
|
-
"ListItemInner": "alinea-ListItem-inner",
|
|
14
|
+
"ListItemTitle": "alinea-ListItemTitle",
|
|
24
15
|
"ListItem-header": "alinea-ListItem-header",
|
|
25
16
|
"ListItemHeader": "alinea-ListItem-header",
|
|
26
|
-
"
|
|
27
|
-
"ListEmptyContent": "alinea-ListEmpty-content",
|
|
28
|
-
"ListLabel": "alinea-ListLabel",
|
|
29
|
-
"ListItemVisual-image": "alinea-ListItemVisual-image",
|
|
30
|
-
"ListItemVisualImage": "alinea-ListItemVisual-image",
|
|
31
|
-
"ListItem-trailing": "alinea-ListItem-trailing",
|
|
32
|
-
"ListItemTrailing": "alinea-ListItem-trailing",
|
|
33
|
-
"ListItemStatus": "alinea-ListItemStatus",
|
|
34
|
-
"ListLabel-title": "alinea-ListLabel-title",
|
|
35
|
-
"ListLabelTitle": "alinea-ListLabel-title",
|
|
17
|
+
"ListItemVisual": "alinea-ListItemVisual",
|
|
36
18
|
"ListItem-leading": "alinea-ListItem-leading",
|
|
37
19
|
"ListItemLeading": "alinea-ListItem-leading",
|
|
38
|
-
"
|
|
20
|
+
"ListItemDescription": "alinea-ListItemDescription",
|
|
21
|
+
"ListItem-trailing": "alinea-ListItem-trailing",
|
|
22
|
+
"ListItemTrailing": "alinea-ListItem-trailing",
|
|
23
|
+
"ListLabel-fold": "alinea-ListLabel-fold",
|
|
24
|
+
"ListLabelFold": "alinea-ListLabel-fold",
|
|
39
25
|
"ListLabel-required": "alinea-ListLabel-required",
|
|
40
26
|
"ListLabelRequired": "alinea-ListLabel-required",
|
|
41
|
-
"
|
|
27
|
+
"ListLabel-title": "alinea-ListLabel-title",
|
|
28
|
+
"ListLabelTitle": "alinea-ListLabel-title",
|
|
42
29
|
"ListError": "alinea-ListError",
|
|
43
|
-
"ListItem
|
|
44
|
-
"
|
|
30
|
+
"ListItem": "alinea-ListItem",
|
|
31
|
+
"ListItemStatus": "alinea-ListItemStatus",
|
|
32
|
+
"ListItemVisual-image": "alinea-ListItemVisual-image",
|
|
33
|
+
"ListItemVisualImage": "alinea-ListItemVisual-image",
|
|
34
|
+
"ListItem-inner": "alinea-ListItem-inner",
|
|
35
|
+
"ListItemInner": "alinea-ListItem-inner",
|
|
36
|
+
"ListEmpty": "alinea-ListEmpty",
|
|
37
|
+
"ListLabel-title-text": "alinea-ListLabel-title-text",
|
|
38
|
+
"ListLabelTitleText": "alinea-ListLabel-title-text",
|
|
39
|
+
"ListEmpty-description": "alinea-ListEmpty-description",
|
|
40
|
+
"ListEmptyDescription": "alinea-ListEmpty-description",
|
|
41
|
+
"ListLabel-toggle": "alinea-ListLabel-toggle",
|
|
42
|
+
"ListLabelToggle": "alinea-ListLabel-toggle",
|
|
43
|
+
"ListLabel": "alinea-ListLabel",
|
|
45
44
|
"ListEmpty-title": "alinea-ListEmpty-title",
|
|
46
45
|
"ListEmptyTitle": "alinea-ListEmpty-title",
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
46
|
+
"ListEmpty-content": "alinea-ListEmpty-content",
|
|
47
|
+
"ListEmptyContent": "alinea-ListEmpty-content",
|
|
48
|
+
"ListItem-content": "alinea-ListItem-content",
|
|
49
|
+
"ListItemContent": "alinea-ListItem-content"
|
|
50
50
|
};
|
|
51
51
|
|
|
52
52
|
// src/components/List.tsx
|
|
@@ -12,15 +12,15 @@ import {
|
|
|
12
12
|
|
|
13
13
|
// src/components/MediaPreview.module.css
|
|
14
14
|
var MediaPreview_default = {
|
|
15
|
-
"MediaPreview-
|
|
16
|
-
"
|
|
15
|
+
"MediaPreview-area": "alinea-MediaPreview-area",
|
|
16
|
+
"MediaPreviewArea": "alinea-MediaPreview-area",
|
|
17
|
+
"MediaPreview": "alinea-MediaPreview",
|
|
17
18
|
"MediaPreview-image": "alinea-MediaPreview-image",
|
|
18
19
|
"MediaPreviewImage": "alinea-MediaPreview-image",
|
|
19
|
-
"MediaPreview": "alinea-MediaPreview",
|
|
20
|
+
"MediaPreview-focus-ring": "alinea-MediaPreview-focus-ring",
|
|
21
|
+
"MediaPreviewFocusRing": "alinea-MediaPreview-focus-ring",
|
|
20
22
|
"MediaPreview-focus-dot": "alinea-MediaPreview-focus-dot",
|
|
21
23
|
"MediaPreviewFocusDot": "alinea-MediaPreview-focus-dot",
|
|
22
|
-
"MediaPreview-area": "alinea-MediaPreview-area",
|
|
23
|
-
"MediaPreviewArea": "alinea-MediaPreview-area",
|
|
24
24
|
"MediaPreview-focus": "alinea-MediaPreview-focus",
|
|
25
25
|
"MediaPreviewFocus": "alinea-MediaPreview-focus"
|
|
26
26
|
};
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
|
-
import type { AriaProps, DataProps, FieldSharedProps, OpenStateProps, StyleProps } from './types.js';
|
|
3
|
-
export interface MultipleSelectProps extends FieldSharedProps, OpenStateProps, StyleProps, AriaProps, DataProps {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
import type { AriaProps, DataProps, FieldSharedProps, Key, OpenStateProps, StyleProps } from './types.js';
|
|
3
|
+
export interface MultipleSelectProps<V extends Key = Key> extends FieldSharedProps, OpenStateProps, StyleProps, AriaProps, DataProps {
|
|
4
|
+
/** The values of the selected MultipleSelectItems */
|
|
5
|
+
value?: Array<V>;
|
|
6
|
+
defaultValue?: Array<V>;
|
|
7
|
+
onValueChange?: (value: Array<V>) => void;
|
|
7
8
|
placeholder?: string;
|
|
8
9
|
/** Shown in the list when no item matches the search, defaults to "No options" */
|
|
9
10
|
emptyMessage?: ReactNode;
|
|
10
|
-
/**
|
|
11
|
+
/**
|
|
12
|
+
* Name of the hidden form input carrying the values, it submits one entry
|
|
13
|
+
* per selected value like a native multiple select: read them with
|
|
14
|
+
* `formData.getAll(name)`
|
|
15
|
+
*/
|
|
11
16
|
name?: string;
|
|
12
17
|
/** MultipleSelectItem elements */
|
|
13
18
|
children: ReactNode;
|
|
@@ -16,9 +21,9 @@ export interface MultipleSelectProps extends FieldSharedProps, OpenStateProps, S
|
|
|
16
21
|
* A labelled field to pick several values from a searchable list, the
|
|
17
22
|
* selected values are shown as removable tags.
|
|
18
23
|
*/
|
|
19
|
-
export declare function MultipleSelect({ label, description, error, required, disabled, readOnly, icon, shared, value, defaultValue, onValueChange, open, defaultOpen, onOpenChange, placeholder, emptyMessage, className, style, children, ...props }: MultipleSelectProps): import("react").JSX.Element;
|
|
24
|
+
export declare function MultipleSelect<V extends Key = Key>({ label, description, error, required, disabled, readOnly, icon, shared, value, defaultValue, onValueChange, open, defaultOpen, onOpenChange, placeholder, emptyMessage, className, style, children, ...props }: MultipleSelectProps<V>): import("react").JSX.Element;
|
|
20
25
|
export interface MultipleSelectItemProps extends StyleProps {
|
|
21
|
-
value:
|
|
26
|
+
value: Key;
|
|
22
27
|
/** Text used for searching and the tag, defaults to string children */
|
|
23
28
|
textValue?: string;
|
|
24
29
|
disabled?: boolean;
|
|
@@ -10,11 +10,11 @@ import {
|
|
|
10
10
|
$928221da08ecbc62$export$41f133550aa26f48,
|
|
11
11
|
$c8bb816105474884$export$e288731fd71264f0,
|
|
12
12
|
$c8bb816105474884$export$ef9b1a59e592288f
|
|
13
|
-
} from "../chunks/chunk-
|
|
13
|
+
} from "../chunks/chunk-7DDPSWRY.js";
|
|
14
14
|
import "../chunks/chunk-NUFRM6SI.js";
|
|
15
15
|
import {
|
|
16
16
|
$ef182bb9912241d8$export$3274cf84b703fff
|
|
17
|
-
} from "../chunks/chunk-
|
|
17
|
+
} from "../chunks/chunk-PMGIIYDD.js";
|
|
18
18
|
import "../chunks/chunk-RKDPDEF7.js";
|
|
19
19
|
import "../chunks/chunk-PSSMQKAH.js";
|
|
20
20
|
import {
|
|
@@ -36,37 +36,37 @@ import { PopoverSurface } from "./internal/PopoverSurface.js";
|
|
|
36
36
|
|
|
37
37
|
// src/components/MultipleSelect.module.css
|
|
38
38
|
var MultipleSelect_default = {
|
|
39
|
+
"MultipleSelectSearch-icon": "alinea-MultipleSelectSearch-icon",
|
|
40
|
+
"MultipleSelectSearchIcon": "alinea-MultipleSelectSearch-icon",
|
|
41
|
+
"MultipleSelectContent-empty": "alinea-MultipleSelectContent-empty",
|
|
42
|
+
"MultipleSelectContentEmpty": "alinea-MultipleSelectContent-empty",
|
|
43
|
+
"MultipleSelectContent-list": "alinea-MultipleSelectContent-list",
|
|
44
|
+
"MultipleSelectContentList": "alinea-MultipleSelectContent-list",
|
|
45
|
+
"MultipleSelectSearch": "alinea-MultipleSelectSearch",
|
|
46
|
+
"MultipleSelectContent": "alinea-MultipleSelectContent",
|
|
47
|
+
"MultipleSelectTrigger-tags": "alinea-MultipleSelectTrigger-tags",
|
|
48
|
+
"MultipleSelectTriggerTags": "alinea-MultipleSelectTrigger-tags",
|
|
49
|
+
"is-invalid": "alinea-is-invalid",
|
|
50
|
+
"isInvalid": "alinea-is-invalid",
|
|
51
|
+
"MultipleSelectTrigger-tags-list": "alinea-MultipleSelectTrigger-tags-list",
|
|
52
|
+
"MultipleSelectTriggerTagsList": "alinea-MultipleSelectTrigger-tags-list",
|
|
53
|
+
"MultipleSelectTrigger": "alinea-MultipleSelectTrigger",
|
|
54
|
+
"MultipleSelectTrigger-placeholder": "alinea-MultipleSelectTrigger-placeholder",
|
|
55
|
+
"MultipleSelectTriggerPlaceholder": "alinea-MultipleSelectTrigger-placeholder",
|
|
39
56
|
"MultipleSelectTrigger-value": "alinea-MultipleSelectTrigger-value",
|
|
40
57
|
"MultipleSelectTriggerValue": "alinea-MultipleSelectTrigger-value",
|
|
41
58
|
"MultipleSelectTag-remove": "alinea-MultipleSelectTag-remove",
|
|
42
59
|
"MultipleSelectTagRemove": "alinea-MultipleSelectTag-remove",
|
|
43
60
|
"MultipleSelectSearch-input": "alinea-MultipleSelectSearch-input",
|
|
44
61
|
"MultipleSelectSearchInput": "alinea-MultipleSelectSearch-input",
|
|
45
|
-
"MultipleSelectSearch-clear": "alinea-MultipleSelectSearch-clear",
|
|
46
|
-
"MultipleSelectSearchClear": "alinea-MultipleSelectSearch-clear",
|
|
47
|
-
"MultipleSelectTrigger-arrow": "alinea-MultipleSelectTrigger-arrow",
|
|
48
|
-
"MultipleSelectTriggerArrow": "alinea-MultipleSelectTrigger-arrow",
|
|
49
62
|
"MultipleSelectTrigger-button": "alinea-MultipleSelectTrigger-button",
|
|
50
63
|
"MultipleSelectTriggerButton": "alinea-MultipleSelectTrigger-button",
|
|
51
|
-
"MultipleSelectSearch-icon": "alinea-MultipleSelectSearch-icon",
|
|
52
|
-
"MultipleSelectSearchIcon": "alinea-MultipleSelectSearch-icon",
|
|
53
|
-
"MultipleSelectTrigger": "alinea-MultipleSelectTrigger",
|
|
54
|
-
"MultipleSelectContent": "alinea-MultipleSelectContent",
|
|
55
|
-
"MultipleSelectTag": "alinea-MultipleSelectTag",
|
|
56
|
-
"MultipleSelectTrigger-tags": "alinea-MultipleSelectTrigger-tags",
|
|
57
|
-
"MultipleSelectTriggerTags": "alinea-MultipleSelectTrigger-tags",
|
|
58
|
-
"MultipleSelectContent-empty": "alinea-MultipleSelectContent-empty",
|
|
59
|
-
"MultipleSelectContentEmpty": "alinea-MultipleSelectContent-empty",
|
|
60
|
-
"MultipleSelectTrigger-placeholder": "alinea-MultipleSelectTrigger-placeholder",
|
|
61
|
-
"MultipleSelectTriggerPlaceholder": "alinea-MultipleSelectTrigger-placeholder",
|
|
62
|
-
"MultipleSelectTrigger-tags-list": "alinea-MultipleSelectTrigger-tags-list",
|
|
63
|
-
"MultipleSelectTriggerTagsList": "alinea-MultipleSelectTrigger-tags-list",
|
|
64
|
-
"MultipleSelectContent-list": "alinea-MultipleSelectContent-list",
|
|
65
|
-
"MultipleSelectContentList": "alinea-MultipleSelectContent-list",
|
|
66
|
-
"MultipleSelectSearch": "alinea-MultipleSelectSearch",
|
|
67
64
|
"MultipleSelect": "alinea-MultipleSelect",
|
|
68
|
-
"
|
|
69
|
-
"
|
|
65
|
+
"MultipleSelectTag": "alinea-MultipleSelectTag",
|
|
66
|
+
"MultipleSelectSearch-clear": "alinea-MultipleSelectSearch-clear",
|
|
67
|
+
"MultipleSelectSearchClear": "alinea-MultipleSelectSearch-clear",
|
|
68
|
+
"MultipleSelectTrigger-arrow": "alinea-MultipleSelectTrigger-arrow",
|
|
69
|
+
"MultipleSelectTriggerArrow": "alinea-MultipleSelectTrigger-arrow"
|
|
70
70
|
};
|
|
71
71
|
|
|
72
72
|
// src/components/MultipleSelect.tsx
|
|
@@ -115,7 +115,7 @@ function MultipleSelect({
|
|
|
115
115
|
selectionMode: "multiple",
|
|
116
116
|
value,
|
|
117
117
|
defaultValue,
|
|
118
|
-
onChange: (keys) => onValueChange?.(keys
|
|
118
|
+
onChange: (keys) => onValueChange?.(keys),
|
|
119
119
|
isOpen: !readOnly && (open ?? isOpen),
|
|
120
120
|
onOpenChange: (next) => {
|
|
121
121
|
if (readOnly) return;
|
|
@@ -8,15 +8,15 @@ import { Icon } from "./Icon.js";
|
|
|
8
8
|
|
|
9
9
|
// src/components/NavRail.module.css
|
|
10
10
|
var NavRail_default = {
|
|
11
|
-
"NavRailItem-icon": "alinea-NavRailItem-icon",
|
|
12
|
-
"NavRailItemIcon": "alinea-NavRailItem-icon",
|
|
13
|
-
"NavRailItem-badge": "alinea-NavRailItem-badge",
|
|
14
|
-
"NavRailItemBadge": "alinea-NavRailItem-badge",
|
|
15
|
-
"NavRailFooter": "alinea-NavRailFooter",
|
|
16
11
|
"NavRailHeader": "alinea-NavRailHeader",
|
|
17
12
|
"NavRail": "alinea-NavRail",
|
|
18
|
-
"
|
|
19
|
-
"NavRailItem": "alinea-NavRailItem"
|
|
13
|
+
"NavRailFooter": "alinea-NavRailFooter",
|
|
14
|
+
"NavRailItem-badge": "alinea-NavRailItem-badge",
|
|
15
|
+
"NavRailItemBadge": "alinea-NavRailItem-badge",
|
|
16
|
+
"NavRailItem": "alinea-NavRailItem",
|
|
17
|
+
"NavRailItem-icon": "alinea-NavRailItem-icon",
|
|
18
|
+
"NavRailItemIcon": "alinea-NavRailItem-icon",
|
|
19
|
+
"NavRailContent": "alinea-NavRailContent"
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
// src/components/NavRail.tsx
|
|
@@ -8,6 +8,10 @@ export interface NumberFieldProps extends FieldSharedProps, StyleProps, AriaProp
|
|
|
8
8
|
min?: number;
|
|
9
9
|
max?: number;
|
|
10
10
|
step?: number;
|
|
11
|
+
/**
|
|
12
|
+
* How the number is shown and parsed. Digits are not grouped unless
|
|
13
|
+
* `useGrouping` is set: number fields often hold years and ids
|
|
14
|
+
*/
|
|
11
15
|
formatOptions?: Intl.NumberFormatOptions;
|
|
12
16
|
placeholder?: string;
|
|
13
17
|
/** Show increment and decrement buttons, defaults to true */
|
|
@@ -18,4 +22,4 @@ export interface NumberFieldProps extends FieldSharedProps, StyleProps, AriaProp
|
|
|
18
22
|
onFocus?: (event: FocusEvent<HTMLInputElement>) => void;
|
|
19
23
|
onKeyDown?: (event: KeyboardEvent<HTMLInputElement>) => void;
|
|
20
24
|
}
|
|
21
|
-
export declare function NumberField({ label, description, error, required, disabled, readOnly, icon, shared, value, defaultValue, onValueChange, min, max, placeholder, steppers, onBlur, onFocus, onKeyDown, className, ...props }: NumberFieldProps): import("react").JSX.Element;
|
|
25
|
+
export declare function NumberField({ label, description, error, required, disabled, readOnly, icon, shared, value, defaultValue, onValueChange, min, max, formatOptions, placeholder, steppers, onBlur, onFocus, onKeyDown, className, ...props }: NumberFieldProps): import("react").JSX.Element;
|
|
@@ -3,9 +3,9 @@ import {
|
|
|
3
3
|
$3a442827418ebe87$export$eb2fcfdbd7ba97d4,
|
|
4
4
|
$41fb335299a4a39e$export$f5b8910cec6cf069,
|
|
5
5
|
$7705c033048f6da7$export$353f5b6fc5456de1
|
|
6
|
-
} from "../chunks/chunk-
|
|
6
|
+
} from "../chunks/chunk-7DDPSWRY.js";
|
|
7
7
|
import "../chunks/chunk-NUFRM6SI.js";
|
|
8
|
-
import "../chunks/chunk-
|
|
8
|
+
import "../chunks/chunk-PMGIIYDD.js";
|
|
9
9
|
import "../chunks/chunk-RKDPDEF7.js";
|
|
10
10
|
import "../chunks/chunk-PSSMQKAH.js";
|
|
11
11
|
import {
|
|
@@ -23,9 +23,9 @@ import { Field } from "./Field.js";
|
|
|
23
23
|
// src/components/NumberField.module.css
|
|
24
24
|
var NumberField_default = {
|
|
25
25
|
"NumberFieldSteppers": "alinea-NumberFieldSteppers",
|
|
26
|
-
"NumberField": "alinea-NumberField",
|
|
27
26
|
"NumberFieldGroup": "alinea-NumberFieldGroup",
|
|
28
27
|
"NumberFieldInput": "alinea-NumberFieldInput",
|
|
28
|
+
"NumberField": "alinea-NumberField",
|
|
29
29
|
"NumberFieldStepper": "alinea-NumberFieldStepper"
|
|
30
30
|
};
|
|
31
31
|
|
|
@@ -50,6 +50,7 @@ function NumberField({
|
|
|
50
50
|
onValueChange,
|
|
51
51
|
min,
|
|
52
52
|
max,
|
|
53
|
+
formatOptions,
|
|
53
54
|
placeholder,
|
|
54
55
|
steppers = true,
|
|
55
56
|
onBlur,
|
|
@@ -66,12 +67,13 @@ function NumberField({
|
|
|
66
67
|
value: toInternal(value),
|
|
67
68
|
defaultValue: toInternal(defaultValue),
|
|
68
69
|
onChange: (next) => onValueChange?.(Number.isNaN(next) ? null : next),
|
|
70
|
+
formatOptions: { useGrouping: false, ...formatOptions },
|
|
69
71
|
minValue: min,
|
|
70
72
|
maxValue: max,
|
|
71
73
|
isRequired: required,
|
|
72
74
|
isDisabled: disabled,
|
|
73
75
|
isReadOnly: readOnly,
|
|
74
|
-
isInvalid:
|
|
76
|
+
isInvalid: error ? true : void 0,
|
|
75
77
|
className: styles.NumberField(dist_default.merge({ className })),
|
|
76
78
|
children: /* @__PURE__ */ jsx(
|
|
77
79
|
Field,
|
package/dist/components/Page.js
CHANGED
|
@@ -10,15 +10,15 @@ import { Heading } from "./Heading.js";
|
|
|
10
10
|
|
|
11
11
|
// src/components/Page.module.css
|
|
12
12
|
var Page_default = {
|
|
13
|
-
"
|
|
14
|
-
"
|
|
13
|
+
"PageFooter": "alinea-PageFooter",
|
|
14
|
+
"PageHeader": "alinea-PageHeader",
|
|
15
15
|
"PageBack": "alinea-PageBack",
|
|
16
|
-
"Page": "alinea-Page",
|
|
17
|
-
"PageTitle": "alinea-PageTitle",
|
|
18
16
|
"PageActions": "alinea-PageActions",
|
|
19
|
-
"PageHeader": "alinea-PageHeader",
|
|
20
17
|
"PageContent": "alinea-PageContent",
|
|
21
|
-
"
|
|
18
|
+
"PageTitle": "alinea-PageTitle",
|
|
19
|
+
"Page": "alinea-Page",
|
|
20
|
+
"PageContent-container": "alinea-PageContent-container",
|
|
21
|
+
"PageContentContainer": "alinea-PageContent-container"
|
|
22
22
|
};
|
|
23
23
|
|
|
24
24
|
// src/components/Page.tsx
|
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
$f2ff30fde7b014be$export$2e1e1122cf0cba88,
|
|
6
6
|
$f2ff30fde7b014be$export$3ddf2d174ce01153,
|
|
7
7
|
$f2ff30fde7b014be$export$d2f961adcb0afbe
|
|
8
|
-
} from "../chunks/chunk-
|
|
8
|
+
} from "../chunks/chunk-7DDPSWRY.js";
|
|
9
9
|
import "../chunks/chunk-NUFRM6SI.js";
|
|
10
10
|
import {
|
|
11
11
|
$e260d131964da0f9$export$872b660ac5a1ff98
|
|
12
|
-
} from "../chunks/chunk-
|
|
12
|
+
} from "../chunks/chunk-PMGIIYDD.js";
|
|
13
13
|
import "../chunks/chunk-RKDPDEF7.js";
|
|
14
14
|
import "../chunks/chunk-PSSMQKAH.js";
|
|
15
15
|
import {
|