diff --git a/.changeset/config.json b/.changeset/config.json index fcfcf83e0..87499f257 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -2,10 +2,10 @@ "$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json", "changelog": "@changesets/cli/changelog", "commit": false, - "fixed": [], + "fixed": [["@javaabu/onu", "@javaabu/onu-mcp"]], "linked": [], "access": "public", "baseBranch": "main", "updateInternalDependencies": "patch", - "ignore": ["onu-web", "onu-template-laravel-inertia-react", "onu-template-nextjs"] + "ignore": ["onu-web"] } diff --git a/.changeset/docs-form-field-building-blocks.md b/.changeset/docs-form-field-building-blocks.md deleted file mode 100644 index bcbd774e3..000000000 --- a/.changeset/docs-form-field-building-blocks.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@javaabu/onu": patch -"@javaabu/onu-mcp": patch ---- - -`Label`, `HelpText`, `RequiredMarker` and `FieldErrors` are now documented on the `FormField` page, under "Building blocks", instead of a page each. The components are unchanged. A docs page can list the components it covers in its `covers` front matter; `docs/index.json` carries the list, and `onu_get_doc` finds the page by any of those names (`onu_get_doc("HelpText")` returns the FormField page). diff --git a/.changeset/fix-reporting-period-picker-layout.md b/.changeset/fix-reporting-period-picker-layout.md deleted file mode 100644 index 8abf9f52d..000000000 --- a/.changeset/fix-reporting-period-picker-layout.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@javaabu/onu": patch ---- - -`ReportingPeriodPicker`: each period-type tab is now sized to its label, so a long label ("Custom range") no longer spills out of its tab, and the calendar and the quarter and year grids are centred under the tab row instead of sitting against its start edge. diff --git a/.changeset/merge-action-menu.md b/.changeset/merge-action-menu.md deleted file mode 100644 index 37ffdff8f..000000000 --- a/.changeset/merge-action-menu.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@javaabu/onu": minor ---- - -`ActionMenu` takes `name` (the trigger becomes "Actions for {name}" and confirmations default to "Delete {name}?") and listing-style items (`destructive`, `permitted`, `separator`, `confirm: true`, async `onSelect`), so `RecordAction[]` works as `items`. `RowActions` is removed: use `` (`trashActions` stays). ActionMenu now renders nothing when no item is visible, and its default ⋯ trigger is 44px on touch screens; the row ⋯ button's `data-slot` is `action-menu-trigger` (was `row-actions`). Behaviour changes: ActionMenu confirmations open once the menu has closed and return focus to the trigger, and without a `ConfirmProvider` they show a styled `ConfirmDialog` instead of `window.confirm`. Listing confirmations (row menus, record header actions, bulk actions) now render with `ConfirmDialog`: destructive ones show its warning icon, a failed action's error shows in the dialog, and the dialog's `data-slot` is `confirm-dialog` (was `listing-confirm`). diff --git a/.changeset/merge-autocomplete.md b/.changeset/merge-autocomplete.md deleted file mode 100644 index 0f4243bd9..000000000 --- a/.changeset/merge-autocomplete.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@javaabu/onu": minor ---- - -`Autocomplete` takes `showToggleButton` (a chevron that opens the full list), `showCustomOption` ("Use “…”" for unmatched text), `autoHighlight`, `emptyMessage` and a controllable `open`/`defaultOpen`/`onOpenChange`; `onValueChange` now also gets the picked option (or `null` for typed text), `renderOption` gets `selected`, and suggestions may carry `keywords` (so `ChoiceOption`s fit). `EditableSelect` is removed: use ``. Picking writes the suggestion's `value`, so map `ChoiceOption`s with `{ ...o, value: o.label }` to write the label; pass `emptyMessage` and `renderOption` for the old empty text and check mark. Behaviour changes: Autocomplete (and TagsInput suggestions) now match static lists with `Intl.Collator` like the select components, so "male" finds "Malé" and `keywords` match; Enter no longer picks a disabled suggestion. diff --git a/.changeset/merge-callout.md b/.changeset/merge-callout.md deleted file mode 100644 index 429c0b202..000000000 --- a/.changeset/merge-callout.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@javaabu/onu": minor ---- - -`Callout` takes an `appearance`: `"box"` (default, unchanged) or the inline `"plain"`, `"subtle"` and `"bordered"` notices, which use `role="note"` and leave out title, actions and dismiss. `Notice` and `NoticeProps` are removed: use `` (Notice's `tone` is `variant`, with `neutral` as `default`; its `variant` is `appearance`). `noticeVariants` is renamed `calloutInlineVariants`, keyed by `variant` and `appearance`. The `notice` data-slot and `data-tone` are gone: inline callouts have `data-slot="callout"` and `data-variant`. diff --git a/.changeset/merge-category-chart.md b/.changeset/merge-category-chart.md deleted file mode 100644 index 58d6ce6e8..000000000 --- a/.changeset/merge-category-chart.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@javaabu/onu": minor ---- - -New `CategoryChart` in `@javaabu/onu/charts` draws category data as lines, areas or bars with `variant`: `"line"` (default), `"area"` or `"bar"`. Its props are a union on `variant`, so the line options (`curve`, `dots`, `connectNulls`, `dashedSeries`) and the bar options (`orientation`, `radius`) are only accepted for their own variant. `LineChart` and `BarChart` are removed: use `` (the default) or ``, with the same props, data slots, summaries and data tables. `LineChart`'s `area` prop is gone: use `variant="area"`. `LineChartProps` and `BarChartProps` are now `CategoryChartLineProps` and `CategoryChartBarProps`, and `LineCurve` is `CategoryChartCurve`. diff --git a/.changeset/merge-comment-thread.md b/.changeset/merge-comment-thread.md deleted file mode 100644 index 2bb953944..000000000 --- a/.changeset/merge-comment-thread.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@javaabu/onu": minor ---- - -`CommentThread` takes `variant` (`"thread"` or `"list"`), `replies` (show Reply buttons), `composerPosition` (`"bottom"` or `"top"`) and `labels` to change its strings. `variant="list"` is a flat, bordered list of internal notes: note strings, no Reply buttons and the box on top by default. `Notes`, `NotesProps` and `NoteData` are removed: use `` with `CommentData` (author `id` is required). `onAdd` gets `(body, null)`, and as in the thread only the author may delete unless you pass `canDelete`. The `notes` and `note` data-slots are now `comment-thread` and `comment`. diff --git a/.changeset/merge-context-action-menu.md b/.changeset/merge-context-action-menu.md deleted file mode 100644 index 8ba24ee9d..000000000 --- a/.changeset/merge-context-action-menu.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@javaabu/onu": minor ---- - -`ActionMenu` takes `openOn="context"`: the same `items` open as a context menu on `children` (right-click, long press on touch screens, or the Menu key / Shift+F10), with `asChild` to use the child as the area and `disabled` to turn it off. Confirmations, `name` and record actions now work in context menus too. `disabled` also disables the dropdown's trigger. `ContextActionMenu` and `ContextActionMenuProps` are removed: use `{area}`. The area's `data-slot` is `action-menu-area` (was `context-action-menu-trigger`) and the menu's is `action-menu-content` (was `context-action-menu-content`). When no item is visible the area stays and right-click shows the browser's menu. The `ContextMenu` primitive parts are still exported. diff --git a/.changeset/merge-date-calendar.md b/.changeset/merge-date-calendar.md deleted file mode 100644 index 99a4f3681..000000000 --- a/.changeset/merge-date-calendar.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@javaabu/onu": minor ---- - -`DateCalendar` takes `events` (`DateCalendarEvent[]`: `{ id?, date, title, tone?, href? }`), shown as up to `maxDots` dots under each day and counted in the day's accessible name, and `readOnly`, which turns off selection so that clicking a day lists its events underneath in a polite live region (`showEventList={false}` hides the list). `size="sm"` makes it compact, and `onDayClick` now also gets the day's events: `(date, modifiers, events)`. `MiniCalendar`, `MiniCalendarProps`, `MiniCalendarEvent` and `MiniCalendarEventTone` are removed: use `` with `DateCalendarEvent` and `DateCalendarEventTone`. Its `onDayClick(date, events)` is `onDayClick(date, modifiers, events)`, and `classNames.calendar` / `list` / `dot` are `className` / `classNames.eventList` / `classNames.dot`. The `mini-calendar*` data-slots are now `date-calendar`, `date-calendar-dot` and `date-calendar-events`. The `display.events` and `display.eventsOn` strings move to `date.events` and `date.eventsOn`. diff --git a/.changeset/merge-date-picker.md b/.changeset/merge-date-picker.md deleted file mode 100644 index f9af8832b..000000000 --- a/.changeset/merge-date-picker.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@javaabu/onu": minor ---- - -`DatePicker` takes a `mode`: `"single"` (default), `"multiple"`, `"week"`, `"month"` or `"year"`, with `value` and `onChange` typed for each. `MultipleDatePicker`, `WeekPicker`, `MonthPicker` and `YearPicker` are removed: use ``, `mode="week"`, `mode="month"` or `mode="year"`. Week mode now accepts `disabledDates`. `DatePickerProps` is now a union of `DatePickerSingleProps`, `DatePickerMultipleProps`, `DatePickerWeekProps` and `DatePickerPeriodProps` (month and year). diff --git a/.changeset/merge-document-download.md b/.changeset/merge-document-download.md deleted file mode 100644 index 568977197..000000000 --- a/.changeset/merge-document-download.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -"@javaabu/onu": minor ---- - -`DocumentDownload` is folded into `AttachmentPreview`, with no alias left behind. `AttachmentPreview` gains `versions` (one download button per language version, named "Download {name} in {language}"), `description` (a line under the name) and the `description` and `versions` class-name keys. The `DocumentVersion` type now comes from `attachment-preview`; `DocumentDownloadProps` is removed. `title`/`titleText` become `name`, `href` becomes `downloadUrl` (or `url` to allow opening and previewing), and `fileName` becomes the `name`. - -```tsx -// Before - - - -// After - - -``` diff --git a/.changeset/merge-dropzone-uploader.md b/.changeset/merge-dropzone-uploader.md deleted file mode 100644 index 4280cb638..000000000 --- a/.changeset/merge-dropzone-uploader.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@javaabu/onu": minor ---- - -`InstantFileUpload` is removed: `FileInput` uploads files itself when given `upload` or `url`. Replace `` with ``; the `FileInput` props (`aria-label`, `buttonLabel`, `accept`, `maxSize`, `multiple`, …), `upload`, `uploadOptions`, `name`, `getValue`, `onUploaded`, `onError` and `onItemsChange` keep their names, `ref` still points at the ``, and `classNames.progress` becomes `classNames.list`. `defaultUploadValue` is still exported. Compared with `InstantFileUpload`, `maxFiles` counts files already uploaded, a removal is announced ("a.pdf removed"), files can be dropped and pasted, and without `multiple` a new file replaces the uploaded one instead of being blocked until it is removed. diff --git a/.changeset/merge-email-url-input.md b/.changeset/merge-email-url-input.md deleted file mode 100644 index 4c328f8de..000000000 --- a/.changeset/merge-email-url-input.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -"@javaabu/onu": minor ---- - -`EmailInput` and `UrlInput` are folded into `TextInput`, with no aliases left behind. `TextInput type="email"` and `type="url"` set the matching `inputMode` and `autoComplete`, turn off auto-capitalisation, autocorrect and spell check, are always `dir="ltr"`, and ignore `thaana` / `thaanaToggle`. A URL without a scheme gets `https://` on blur; the new `urlProtocol` prop (`string | false`, default `"https://"`) replaces `UrlInput`'s `defaultProtocol`. `normalizeUrl` is now exported from `text-input`. The `showIcon` prop is gone: pass the icon as `startAddon`. `EmailInputProps` and `UrlInputProps` are removed. - -```tsx -// Before - - - -// After -} /> - -``` diff --git a/.changeset/merge-file-input-dropzone.md b/.changeset/merge-file-input-dropzone.md deleted file mode 100644 index 23da85a4a..000000000 --- a/.changeset/merge-file-input-dropzone.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -"@javaabu/onu": minor ---- - -`DropzoneUploader` is merged into `FileInput` and removed. `FileInput` takes `appearance="dropzone"` for the large drop area, and both appearances now take dropped and pasted files (`pasteFromDocument` too), uploads with a progress list (`upload` / `url` / `uploadOptions`, `getValue`, `onUploaded`, `onError`, `onItemsChange`), files already on the server in `value` / `defaultValue` with `onValueChange`, hidden inputs for stored ids under `name`, `onFilesAdded`, and removal announcements. The `react-dropzone` dependency is dropped: the native file input now covers the drop zone too, so it is the zone's only tab stop and carries the label. - -Replace - -```tsx - - -``` - -with - -```tsx - - -``` - -- `multiple` defaults to `false` on `FileInput` (it was `true` on `DropzoneUploader`): add `multiple` to keep several files. The drop zone and an uploader always add files; without an uploader the compact input needs `append` to add instead of replace. -- `appearance="input"` is the default; `inputProps` go directly on `FileInput`, and `inputRef` becomes `ref` (which points at the ``; the root `div` ref is gone). -- `DropzoneFile` → `FileInputEntry`, `DropzoneUploaderProps` → `FileInputProps`, `DropzoneInputProps` is removed, `dropzoneVariants` → `fileInputVariants({ appearance: "dropzone", size })`. `UploadedFile` and `defaultUploadValue` are unchanged. -- `classNames.zone` → `classNames.trigger` (and `classNames.root` for the compact input's root); `icon`, `title`, `description`, `button`, `list` and `errors` are unchanged. -- `data-slot="dropzone-uploader"` / `"instant-file-upload"` → `data-slot="file-input"` with `data-appearance`; `data-slot="dropzone"` → `data-slot="file-input-trigger"`. -- The "Browse files" button is now part of the input's label instead of a separate ` - } - items={[ - { type: "label", label: "Atoll apps" }, - { label: "Records", href: "/records", icon: "file-text" }, - { label: "Calendar", href: "/calendar", icon: "calendar" }, - ]} - /> - - } -/> -``` diff --git a/.changeset/remove-cookie-consent.md b/.changeset/remove-cookie-consent.md deleted file mode 100644 index 7d6298520..000000000 --- a/.changeset/remove-cookie-consent.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -"@javaabu/onu": minor ---- - -`CookieConsent`, `useCookieConsent`, `readCookieConsent`, `openCookiePreferences`, `COOKIE_CONSENT_STORAGE_KEY` and their types are removed, with the `display.cookie*` strings: no Maldivian requirement asks for a consent banner and no sample page used one. When a project needs one, compose `AnnouncementBar` and `Modal` with `Switch`es, and store the choice in the app: - -```tsx - - We use essential cookies to make this site work.{" "} - - - - save(choices)}>Save preferences} -> - - setChoices({ ...choices, analytics })} /> - -``` diff --git a/.changeset/remove-editable-data-grid.md b/.changeset/remove-editable-data-grid.md deleted file mode 100644 index 1dd82b647..000000000 --- a/.changeset/remove-editable-data-grid.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -"@javaabu/onu": minor ---- - -`EditableDataGrid`, `EditableDataGridProps` and `EditableColumn` are removed, with the `listing.editCell`, `listing.cell*` and `listing.gridInstructions` strings. Use `RepeatingGroup` for editable rows (line items) and `InlineEdit` for a single cell in a `DataTable`; a spreadsheet-style grid needs a dedicated grid library. - -```tsx - ({ name: "", qty: 1 })}> - {({ item, name }) => ( - - - - )} - - - api.patch(`/users/${u.id}`, { name })} />, - }, - ]} -/> -``` diff --git a/.changeset/remove-efaas-bml.md b/.changeset/remove-efaas-bml.md deleted file mode 100644 index b05c3c9b6..000000000 --- a/.changeset/remove-efaas-bml.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -"@javaabu/onu": minor ---- - -`EfaasButton`, `EfaasLogo`, `PaymentMethodSelector`, `BmlTransferLogo` and `BmlConnectLogo` are removed, with their types, `EFAAS_LOGO_VARIANTS` and the `auth.efaas*`, `choice.paymentMethod` and `choice.bml*` strings. Provider branding follows each provider's own guidelines and assets, so it belongs in the app. - -`SignInForm`'s `efaas` slot is renamed `sso` (data slot `auth-sso`): `Sign in with eFaas} />`. For a payment choice, use a card radio group: - -```tsx - }, - { value: "bml-connect", label: "Card", description: "…", media: }, - ]} -/> -``` diff --git a/.changeset/remove-filter-condition-builder.md b/.changeset/remove-filter-condition-builder.md deleted file mode 100644 index 9866ede16..000000000 --- a/.changeset/remove-filter-condition-builder.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -"@javaabu/onu": minor ---- - -The `@javaabu/onu/query-builder` entry is removed, with `FilterConditionBuilder`, its types, the re-exported `formatQuery` and the `listing.*` condition-builder strings. `react-querybuilder` is no longer an optional peer dependency; uninstall it unless the app uses it directly. `FilterPanel` with `ApiSelect` and the date pickers is the Javaabu filtering pattern: - -```tsx - ( - - ), - }, - { type: "date-range", key: "created", label: "Submitted" }, - ]} - value={state.filters} - onApply={state.setFilters} -/> -``` diff --git a/.changeset/remove-filter-submit.md b/.changeset/remove-filter-submit.md deleted file mode 100644 index 1d3f184e2..000000000 --- a/.changeset/remove-filter-submit.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@javaabu/onu": minor ---- - -`FilterSubmit` (and `FilterSubmitProps`) is removed. Its Reset only called `onReset`, so end a server-rendered filter form with the buttons themselves: `{t("listing.filterSubmit")}` and `` (or a `LinkButton` to the unfiltered URL); `form`, `disabled` and `className` go on each button. `FilterPanel` (including `variant="form"`) already has its own Reset and Filter buttons and is unchanged; see "Server-rendered filter forms" on its docs page. diff --git a/.changeset/remove-keyboard-key.md b/.changeset/remove-keyboard-key.md deleted file mode 100644 index b0350be78..000000000 --- a/.changeset/remove-keyboard-key.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -"@javaabu/onu": minor ---- - -`KeyboardKey`, `KeyboardKeyProps`, `KeyPlatform`, `detectPlatform` and `formatShortcut` are removed, with the `display.key*` strings. `ActionMenu` and `CommandPalette` keep formatting their own `shortcut` hints. To show keys in text, use the `Kbd` primitive: - -```tsx -import { Kbd, KbdGroup } from "@javaabu/onu/primitives" - -;

- Press{" "} - - Ctrl - K - {" "} - to search. -

-``` diff --git a/.changeset/remove-last-edited-by.md b/.changeset/remove-last-edited-by.md deleted file mode 100644 index 66c18741b..000000000 --- a/.changeset/remove-last-edited-by.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -"@javaabu/onu": minor ---- - -`LastEditedBy` and `LastEditedByProps` are removed: they were too app-specific for the design system. Compose `UserAvatar` and `RelativeDate` instead: - -```tsx -
- - - Last edited by {user.name} · - -
-``` - -The `display.lastEditedBy` string is removed. diff --git a/.changeset/remove-map-navigation.md b/.changeset/remove-map-navigation.md deleted file mode 100644 index 596e30c1a..000000000 --- a/.changeset/remove-map-navigation.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -"@javaabu/onu": minor ---- - -`MapNavigation`, `MapNavigationProps` and `NavigationStop` are removed from `@javaabu/onu/maps`, with the `map.*` navigation strings: turn-by-turn directions belong in the Google Maps app. Show the line with `MapRoute` and link out from a `LocationCard`, which has an "Open in Google Maps" link: - -```tsx - - -``` diff --git a/.changeset/remove-masonry-grid.md b/.changeset/remove-masonry-grid.md deleted file mode 100644 index d0116982d..000000000 --- a/.changeset/remove-masonry-grid.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -"@javaabu/onu": minor ---- - -`MasonryGrid`, `MasonryGridProps`, `masonryGridVariants` and `masonryColumnClasses` are removed: masonry is a Tailwind recipe, not a component. `Gallery layout="masonry"` is unchanged. For other content, use CSS columns on a plain container: - -```tsx -
- {posts.map((post) => ( - - {post.excerpt} - - ))} -
-``` diff --git a/.changeset/remove-menu-bar.md b/.changeset/remove-menu-bar.md deleted file mode 100644 index 75bdbfb37..000000000 --- a/.changeset/remove-menu-bar.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -"@javaabu/onu": minor ---- - -`MenuBar` and its `MenuBarProps`, `MenuBarMenu` and `MenuBarEntry` types are removed: desktop-application menus do not appear in web admin panels or portals. If a screen really needs one, compose the `Menubar` primitive: - -```tsx -import { Menubar, MenubarContent, MenubarItem, MenubarMenu, MenubarTrigger } from "@javaabu/onu/primitives" - -; - - File - - Save - - - -``` diff --git a/.changeset/remove-print-back-buttons.md b/.changeset/remove-print-back-buttons.md deleted file mode 100644 index 2a9c64d52..000000000 --- a/.changeset/remove-print-back-buttons.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -"@javaabu/onu": minor ---- - -`PrintButton`, `BackButton`, `PrintButtonProps` and `BackButtonProps` are removed: they were too app-specific for the design system. Use `Button` and `LinkButton`: - -```tsx - - - Back - - -``` - -For an icon-only button, use `size="icon"` with an `aria-label` and `` as the child. The `display.print` string is removed. diff --git a/.changeset/remove-resizable.md b/.changeset/remove-resizable.md deleted file mode 100644 index a554ba66d..000000000 --- a/.changeset/remove-resizable.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@javaabu/onu": minor ---- - -The shadcn `resizable` primitive leaves `@javaabu/onu/primitives`: `ResizablePanelGroup`, `ResizablePanel` and `ResizableHandle` are removed, and `react-resizable-panels` is no longer a dependency. Nothing in Onu used them. An app that needs resizable panes can install `react-resizable-panels` and add shadcn's `resizable` component itself. diff --git a/.changeset/remove-thaana-input.md b/.changeset/remove-thaana-input.md deleted file mode 100644 index feeac61d2..000000000 --- a/.changeset/remove-thaana-input.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@javaabu/onu": minor ---- - -`ThaanaInput` and `ThaanaTextarea` (and their `ThaanaInputProps` / `ThaanaTextareaProps` types) are removed: use `` and `