@gopherium/godmin 0.30.0 → 0.32.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.
Files changed (62) hide show
  1. package/README.md +2 -3
  2. package/dist/base.css +159 -29
  3. package/dist/breakpoints.d.ts +1 -1
  4. package/dist/breakpoints.js +1 -1
  5. package/dist/bulk-run.d.ts +10 -0
  6. package/dist/bulk-run.js +59 -10
  7. package/dist/bulk.d.ts +3 -0
  8. package/dist/confirm-dialog.d.ts +14 -14
  9. package/dist/confirm-dialog.js +8 -28
  10. package/dist/dialog-open.d.ts +63 -0
  11. package/dist/dialog-open.js +110 -0
  12. package/dist/focus-back.d.ts +20 -0
  13. package/dist/focus-back.js +36 -12
  14. package/dist/form-dialog.d.ts +14 -16
  15. package/dist/form-dialog.js +53 -13
  16. package/dist/index.d.ts +13 -13
  17. package/dist/index.js +7 -8
  18. package/dist/list-chrome/es-ES.js +3 -3
  19. package/dist/list-chrome/fr-FR.js +1 -0
  20. package/dist/list-run.js +39 -48
  21. package/dist/page-breadcrumbs.d.ts +28 -0
  22. package/dist/page-breadcrumbs.js +18 -0
  23. package/dist/page-tabs.js +18 -6
  24. package/dist/page.d.ts +8 -3
  25. package/dist/page.js +36 -9
  26. package/dist/rename-dialog.d.ts +24 -0
  27. package/dist/rename-dialog.js +16 -0
  28. package/dist/router.d.ts +2 -0
  29. package/dist/router.js +1 -0
  30. package/dist/toaster.js +21 -2
  31. package/dist/unsaved-changes-dialog.d.ts +19 -0
  32. package/dist/unsaved-changes-dialog.js +33 -0
  33. package/docs/build-and-versioning.md +92 -9
  34. package/docs/design-system/accessibility.md +12 -7
  35. package/docs/design-system/custom-properties.md +6 -2
  36. package/docs/design-system/dialogs.md +240 -0
  37. package/docs/design-system/layout.md +5 -3
  38. package/docs/design-system/lists.md +3 -1
  39. package/docs/design-system/loading.md +2 -0
  40. package/docs/design-system/motion.md +3 -2
  41. package/docs/design-system/overview.md +7 -1
  42. package/docs/design-system/record-pages.md +199 -0
  43. package/docs/design-system/toasts.md +13 -10
  44. package/docs/design-system/typography.md +1 -1
  45. package/docs/lists.md +321 -434
  46. package/docs/loading-and-feedback.md +14 -11
  47. package/docs/overview.md +2 -3
  48. package/docs/screens.md +87 -34
  49. package/docs/testing.md +11 -9
  50. package/package.json +20 -28
  51. package/dist/close-while-open.d.ts +0 -6
  52. package/dist/close-while-open.js +0 -21
  53. package/dist/confirm.d.ts +0 -21
  54. package/dist/confirm.js +0 -11
  55. package/dist/dialogs.d.ts +0 -4
  56. package/dist/dialogs.js +0 -3
  57. package/dist/form.d.ts +0 -28
  58. package/dist/form.js +0 -23
  59. package/dist/rename.d.ts +0 -20
  60. package/dist/rename.js +0 -14
  61. package/dist/run-confirm.d.ts +0 -22
  62. package/dist/run-confirm.js +0 -23
@@ -0,0 +1,110 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ // SPDX-License-Identifier: Apache-2.0
3
+ import { useCallback, useLayoutEffect, useRef, useState } from 'react';
4
+ /** The class every dialog's popup carries, so a long word breaks inside the card. */
5
+ export const POPUP_CLASS = 'godmin-dialog-popup';
6
+ /**
7
+ * Renders nothing and reports when it leaves the page.
8
+ * @param props - What it runs as it leaves.
9
+ * @returns Nothing.
10
+ */
11
+ function ExitWatch({ left }) {
12
+ useLayoutEffect(() => left, [left]);
13
+ return null;
14
+ }
15
+ /**
16
+ * Holds a dialog open from its first commit and runs its close once the popup left the page.
17
+ * @param onClose - What runs after a close, once the popup left the page.
18
+ * @returns The open state, what changes it and the child that watches the popup leave.
19
+ */
20
+ export function useDialogOpen(onClose) {
21
+ const [open, setOpen] = useState(false);
22
+ const closing = useRef(false);
23
+ const latest = useRef(onClose);
24
+ useLayoutEffect(() => {
25
+ latest.current = onClose;
26
+ });
27
+ useLayoutEffect(() => {
28
+ setOpen(true);
29
+ }, []);
30
+ const left = useCallback(() => {
31
+ if (closing.current) {
32
+ latest.current();
33
+ }
34
+ }, []);
35
+ const change = (next) => {
36
+ closing.current = !next;
37
+ setOpen(next);
38
+ };
39
+ return { open, change, exitWatch: _jsx(ExitWatch, { left: left }) };
40
+ }
41
+ /**
42
+ * Notes the control that held the focus as a dialog was asked, for the place the focus goes once the popup left.
43
+ * @returns What answers `finalFocus`: that control while the focus sits on the page, otherwise false to leave it.
44
+ */
45
+ export function useFinalFocus() {
46
+ const [opener] = useState(() => document.activeElement);
47
+ return () => (document.activeElement === document.body && opener !== document.body ? opener : false);
48
+ }
49
+ /**
50
+ * Reads what a write answered a dialog, whatever its shape.
51
+ * @param answer - What the write answered.
52
+ * @returns The words to show or a plain stay, none for a dialog that closes.
53
+ */
54
+ export function answerOf(answer) {
55
+ const { error, close } = (answer ?? {});
56
+ if (typeof error === 'string' && error !== '') {
57
+ return { error };
58
+ }
59
+ return close === false ? { close } : undefined;
60
+ }
61
+ /**
62
+ * Reports whether a value is a write still running, a promise or any object with a `then` method.
63
+ * @param value - What the write's handler returned.
64
+ * @returns Whether the value is one to wait for.
65
+ */
66
+ export function isThenable(value) {
67
+ return typeof value?.then === 'function';
68
+ }
69
+ /**
70
+ * Keeps a dialog open after a rejection and hands the rejection on to the app as one nobody caught.
71
+ * @param error - What the write rejected with.
72
+ * @returns A plain stay.
73
+ */
74
+ export function passRejectionOn(error) {
75
+ void Promise.reject(error);
76
+ return { close: false };
77
+ }
78
+ /**
79
+ * Carries a dialog's action out and reads what it answers, handing what it throws or rejects with on to the app.
80
+ * @param action - The action.
81
+ * @returns What the dialog reads, at once unless the action returned a write still running.
82
+ */
83
+ export function answered(action) {
84
+ try {
85
+ const running = action();
86
+ return isThenable(running) ? Promise.resolve(running).then(answerOf, passRejectionOn) : answerOf(running);
87
+ }
88
+ catch (error) {
89
+ return passRejectionOn(error);
90
+ }
91
+ }
92
+ /**
93
+ * Refuses the second click of a double click, while Enter and Space still press.
94
+ * @param event - The click on its way into the popup.
95
+ */
96
+ export function refuseSecondClick(event) {
97
+ if (event.detail > 1) {
98
+ event.preventDefault();
99
+ event.stopPropagation();
100
+ }
101
+ }
102
+ /**
103
+ * Refuses an Enter a held key repeats, so holding it sends once.
104
+ * @param event - The key press on its way into the popup.
105
+ */
106
+ export function refuseRepeatedEnter(event) {
107
+ if (event.repeat && event.key === 'Enter') {
108
+ event.preventDefault();
109
+ }
110
+ }
@@ -12,11 +12,31 @@ declare const TRIGGERS: {
12
12
  type ItemTrigger = keyof typeof TRIGGERS;
13
13
  /** The trigger a list dialog opened from: an item's title, media, phone row or actions menu, or the bulk bar. */
14
14
  export type Trigger = ItemTrigger | 'bulk';
15
+ /** One request to put the focus back on the trigger a dialog opened from, a new one each time it is asked. */
16
+ export interface FocusBack {
17
+ /** The item the dialog acted on. */
18
+ id: string;
19
+ /** The trigger the dialog opened from. */
20
+ trigger: Trigger;
21
+ }
15
22
  /**
16
23
  * Returns the trigger a click, a tap or a key opened a dialog from, read from the focus it left there.
17
24
  * @returns The bulk bar, the media, the title or the phone row holding the focus, the actions menu otherwise.
18
25
  */
19
26
  export declare function focusedTrigger(): Trigger;
27
+ /**
28
+ * Returns the item a control sits on and the trigger it stands for.
29
+ * @param control - The control.
30
+ * @returns The item and the trigger, none for a control in no card or row, or in one the app marks with no id.
31
+ */
32
+ export declare function itemAt(control: Element): FocusBack | null;
33
+ /**
34
+ * Returns a trigger on an item, found wherever its card or row now sits.
35
+ * @param list - The list region.
36
+ * @param asked - The item and the trigger.
37
+ * @returns The trigger, else the item's actions menu, none for a bulk action or an item with neither in the list.
38
+ */
39
+ export declare function triggerOnItem(list: HTMLElement, { id, trigger }: FocusBack): HTMLElement | null;
20
40
  /**
21
41
  * Returns the handler putting a focus the page lost back on the trigger a list dialog opened from, once drawn again.
22
42
  * @param busy - Whether the list reads its items again, its cards and rows then out of reach of the focus.
@@ -14,16 +14,32 @@ const TRIGGERS = {
14
14
  /** Finds the bar DataViews draws the actions on the ticked items in. */
15
15
  const BULK_BAR = '.dataviews-bulk-actions-footer__container';
16
16
  /**
17
- * Returns the trigger a click, a tap or a key opened a dialog from, read from the focus it left there.
18
- * @returns The bulk bar, the media, the title or the phone row holding the focus, the actions menu otherwise.
17
+ * Returns the trigger a control stands for.
18
+ * @param control - The control.
19
+ * @returns The bulk bar, the media, the title or the phone row holding the control, the actions menu otherwise.
19
20
  */
20
- export function focusedTrigger() {
21
- const focused = document.activeElement;
22
- if (focused.closest(BULK_BAR) !== null) {
21
+ function triggerAt(control) {
22
+ if (control.closest(BULK_BAR) !== null) {
23
23
  return 'bulk';
24
24
  }
25
25
  const triggers = ['media', 'title', 'row'];
26
- return triggers.find((trigger) => focused.closest(TRIGGERS[trigger]) !== null) ?? 'actions';
26
+ return triggers.find((trigger) => control.closest(TRIGGERS[trigger]) !== null) ?? 'actions';
27
+ }
28
+ /**
29
+ * Returns the trigger a click, a tap or a key opened a dialog from, read from the focus it left there.
30
+ * @returns The bulk bar, the media, the title or the phone row holding the focus, the actions menu otherwise.
31
+ */
32
+ export function focusedTrigger() {
33
+ return triggerAt(document.activeElement);
34
+ }
35
+ /**
36
+ * Returns the item a control sits on and the trigger it stands for.
37
+ * @param control - The control.
38
+ * @returns The item and the trigger, none for a control in no card or row, or in one the app marks with no id.
39
+ */
40
+ export function itemAt(control) {
41
+ const id = control.closest(HOLDERS)?.querySelector(MARKED)?.dataset.itemId;
42
+ return id === undefined ? null : { id, trigger: triggerAt(control) };
27
43
  }
28
44
  /**
29
45
  * Returns the card or the row holding an item inside the list, found through the mark on its cells.
@@ -36,18 +52,26 @@ function holderOf(list, id) {
36
52
  return marked?.closest(HOLDERS) ?? null;
37
53
  }
38
54
  /**
39
- * Returns the trigger a dialog on an item opened from, found wherever its card or row now sits.
55
+ * Returns a trigger on an item, found wherever its card or row now sits.
40
56
  * @param list - The list region.
41
57
  * @param asked - The item and the trigger.
42
- * @returns The trigger, else the item's actions menu, else the list, which a bulk action always gets.
58
+ * @returns The trigger, else the item's actions menu, none for a bulk action or an item with neither in the list.
43
59
  */
44
- function triggerOf(list, { id, trigger }) {
60
+ export function triggerOnItem(list, { id, trigger }) {
45
61
  const holder = holderOf(list, id);
46
62
  if (trigger === 'bulk' || holder === null) {
47
- return list;
63
+ return null;
48
64
  }
49
- const found = holder.querySelector(TRIGGERS[trigger]);
50
- return found ?? holder.querySelector(TRIGGERS.actions) ?? list;
65
+ return holder.querySelector(TRIGGERS[trigger]) ?? holder.querySelector(TRIGGERS.actions);
66
+ }
67
+ /**
68
+ * Returns the trigger a dialog on an item opened from, found wherever its card or row now sits.
69
+ * @param list - The list region.
70
+ * @param asked - The item and the trigger.
71
+ * @returns The trigger, else the item's actions menu, else the list, which a bulk action always gets.
72
+ */
73
+ function triggerOf(list, asked) {
74
+ return triggerOnItem(list, asked) ?? list;
51
75
  }
52
76
  /** Stops nothing, for a focus put on the list region, which no layout of the list takes off the page. */
53
77
  function stopNothing() { }
@@ -1,29 +1,27 @@
1
1
  import type { ReactNode } from 'react';
2
- import type { FormKind } from './form.js';
2
+ import type { DialogAnswer } from './dialog-open.js';
3
3
  /** The props of a form dialog opened from a button outside a list row. */
4
4
  export interface FormDialogProps {
5
- /** The fields, and any help sentence before them, in the order the reader meets them. */
6
- children: ReactNode;
7
- /** The title in the dialog header, beside its close button. */
5
+ /** The fields in the order the reader meets them, or a function of whether the write runs that draws them. */
6
+ children: ReactNode | ((busy: boolean) => ReactNode);
7
+ /** The title in the dialog header, beside its close icon, the name of the dialog. */
8
8
  title: string;
9
- /** The width from 600px up: small at 400px, the default, or medium at 560px when a control needs the room. */
10
- size?: 'small' | 'medium';
9
+ /** A help sentence before the fields, which describes the dialog. */
10
+ description?: string;
11
11
  /** The label of the button that sends the form. */
12
12
  submitLabel: string;
13
- /** The label of the button that closes the dialog. */
14
- cancelLabel: string;
13
+ /** The label of the button that closes the dialog, none on a last step with nothing to cancel. */
14
+ cancelLabel?: string;
15
15
  /** Whether the form may be sent now, false while a needed field is empty, true when left out. */
16
16
  canSubmit?: boolean;
17
- /** What the form does: 16px above the buttons for a create, the default, 20px for an edit, 12px for a copy. */
18
- kind?: FormKind;
19
- /** Sends the form. Return the write's promise to keep the button busy until it ends. */
20
- onSubmit: () => void | Promise<unknown>;
21
- /** Takes the dialog away after Cancel, Escape, a click on the dimmed page or the close button. */
17
+ /** Sends the form. Return nothing to close at once, the write to hold the dialog until it ends, or an answer. */
18
+ onSubmit: () => void | DialogAnswer | PromiseLike<unknown>;
19
+ /** Takes the dialog away, once its card has left the page. */
22
20
  onClose: () => void;
23
21
  }
24
22
  /**
25
- * Renders a form dialog opened from a button outside a list row, as WordPress opens Add Page, the first field focused.
26
- * @param props - The fields, the title, the size, the labels, the send gate, the kind and the handlers.
23
+ * Renders a form dialog opened from a button outside a list row, on the WPDS dialog, the first field focused.
24
+ * @param props - The fields, the title, the help sentence, the labels, the send gate and the handlers.
27
25
  * @returns The dialog.
28
26
  */
29
- export declare function FormDialog({ children, title, size, submitLabel, cancelLabel, canSubmit, kind, onSubmit, onClose, }: FormDialogProps): import("react").JSX.Element;
27
+ export declare function FormDialog({ children, title, description, submitLabel, cancelLabel, canSubmit, onSubmit, onClose, }: FormDialogProps): import("react").JSX.Element;
@@ -1,21 +1,61 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  // SPDX-License-Identifier: Apache-2.0
3
- import { Modal } from '@wordpress/components';
4
- import { useState } from 'react';
5
- import { FormBody } from './form.js';
3
+ import { speak } from '@wordpress/a11y';
4
+ import { Button, Dialog, Notice, Stack } from '@wordpress/ui';
5
+ import { useId, useLayoutEffect, useRef, useState } from 'react';
6
+ import { POPUP_CLASS, answered, isThenable, refuseSecondClick, useDialogOpen, useFinalFocus } from './dialog-open.js';
6
7
  /**
7
- * Renders a form dialog opened from a button outside a list row, as WordPress opens Add Page, the first field focused.
8
- * @param props - The fields, the title, the size, the labels, the send gate, the kind and the handlers.
8
+ * Renders a form dialog opened from a button outside a list row, on the WPDS dialog, the first field focused.
9
+ * @param props - The fields, the title, the help sentence, the labels, the send gate and the handlers.
9
10
  * @returns The dialog.
10
11
  */
11
- export function FormDialog({ children, title, size = 'small', submitLabel, cancelLabel, canSubmit, kind = 'create', onSubmit, onClose, }) {
12
+ export function FormDialog({ children, title, description, submitLabel, cancelLabel, canSubmit = true, onSubmit, onClose, }) {
13
+ const { open, change, exitWatch } = useDialogOpen(onClose);
14
+ const finalFocus = useFinalFocus();
12
15
  const [busy, setBusy] = useState(false);
13
- const send = () => {
14
- const sending = onSubmit();
15
- if (sending instanceof Promise) {
16
- setBusy(true);
17
- void sending.finally(() => setBusy(false));
16
+ const [failure, setFailure] = useState();
17
+ const [failures, setFailures] = useState(0);
18
+ const content = useRef(null);
19
+ const form = useId();
20
+ const sendable = canSubmit && !busy && open;
21
+ useLayoutEffect(() => {
22
+ const body = content.current;
23
+ if (failures > 0 && body !== null) {
24
+ body.scrollTop = body.scrollHeight;
18
25
  }
26
+ }, [failures]);
27
+ const guarded = (next) => {
28
+ if (next || !busy) {
29
+ change(next);
30
+ }
31
+ };
32
+ const clear = () => setFailure(undefined);
33
+ const settle = (answer) => {
34
+ if (answer === undefined) {
35
+ change(false);
36
+ }
37
+ else if ('error' in answer) {
38
+ setFailure(answer.error);
39
+ setFailures((count) => count + 1);
40
+ speak(answer.error, 'assertive');
41
+ }
42
+ };
43
+ const submit = (event) => {
44
+ event.preventDefault();
45
+ if (!sendable) {
46
+ return;
47
+ }
48
+ clear();
49
+ const answer = answered(onSubmit);
50
+ if (!isThenable(answer)) {
51
+ settle(answer);
52
+ return;
53
+ }
54
+ setBusy(true);
55
+ void answer.then((reply) => {
56
+ setBusy(false);
57
+ settle(reply);
58
+ });
19
59
  };
20
- return (_jsx(Modal, { title: title, size: size, focusOnMount: "firstContentElement", onRequestClose: onClose, children: _jsx(FormBody, { submitLabel: submitLabel, cancelLabel: cancelLabel, canSubmit: canSubmit, busy: busy, kind: kind, onSubmit: send, onCancel: onClose, children: children }) }));
60
+ return (_jsx(Dialog.Root, { open: open, onOpenChange: guarded, children: _jsxs(Dialog.Popup, { className: POPUP_CLASS, finalFocus: finalFocus, children: [_jsxs(Dialog.Header, { children: [_jsx(Dialog.Title, { children: title }), _jsx(Dialog.CloseIconButton, { disabled: busy })] }), _jsx(Dialog.Content, { ref: content, children: _jsxs(Stack, { render: _jsx("form", { id: form, onSubmit: submit, onChange: clear }), direction: "column", gap: "lg", children: [description === undefined ? null : _jsx(Dialog.Description, { children: description }), typeof children === 'function' ? children(busy) : children, failure === undefined ? null : (_jsx(Notice.Root, { intent: "error", children: _jsx(Notice.Description, { children: failure }) }))] }) }), _jsxs(Dialog.Footer, { children: [cancelLabel === undefined ? null : (_jsx(Dialog.Action, { variant: "outline", tone: "neutral", disabled: busy, children: cancelLabel })), _jsx(Button, { type: "submit", form: form, loading: busy, disabled: !sendable, onClick: refuseSecondClick, children: submitLabel })] }), exitWatch] }) }));
21
61
  }
package/dist/index.d.ts CHANGED
@@ -3,19 +3,19 @@ export type { AdminRootProps } from './admin-root.js';
3
3
  export { InitialsAvatar } from './avatar.js';
4
4
  export type { InitialsAvatarProps } from './avatar.js';
5
5
  export { DENSE_BREAKPOINT, EDGE_BREAKPOINT, HUGE_BREAKPOINT, SHEET_BREAKPOINT, SIDEBAR_BREAKPOINT, SMALL_VIEWPORT, TITLE_BREAKPOINT, } from './breakpoints.js';
6
- export { useBulkRun } from './bulk-run.js';
7
- export type { BulkRun } from './bulk-run.js';
6
+ export { useBulkRun, useDialogRun } from './bulk-run.js';
7
+ export type { BulkRun, DialogRun } from './bulk-run.js';
8
8
  export { bulkNotes, runEach } from './bulk.js';
9
9
  export type { BulkFailure, BulkNotes, BulkOutcome, BulkWords } from './bulk.js';
10
- export { useCloseWhileOpen } from './close-while-open.js';
11
- export { ConfirmBody } from './confirm.js';
12
- export type { ConfirmBodyProps } from './confirm.js';
10
+ export { ConfirmDialog } from './confirm-dialog.js';
11
+ export type { ConfirmDialogProps } from './confirm-dialog.js';
12
+ export type { DialogAnswer } from './dialog-open.js';
13
13
  export { FileButton } from './file-button.js';
14
14
  export type { FileButtonProps } from './file-button.js';
15
15
  export { focusedTrigger, useFocusBack } from './focus-back.js';
16
16
  export type { Trigger } from './focus-back.js';
17
- export { FormBody } from './form.js';
18
- export type { FormBodyProps, FormKind } from './form.js';
17
+ export { FormDialog } from './form-dialog.js';
18
+ export type { FormDialogProps } from './form-dialog.js';
19
19
  export { Frame } from './frame.js';
20
20
  export type { CanvasMode, FrameCanvasProps, FrameRootProps, FrameSidebarProps, } from './frame.js';
21
21
  export { keyFromLabel } from './keys.js';
@@ -38,16 +38,16 @@ export { openOnTap } from './open-on-tap.js';
38
38
  export type { TapList } from './open-on-tap.js';
39
39
  export { ErrorNotice, LoadMore, Page, PageTitle, SectionTitle } from './page.js';
40
40
  export type { LoadMoreQuery, PageProps } from './page.js';
41
+ export { PageBreadcrumb, PageBreadcrumbs } from './page-breadcrumbs.js';
42
+ export type { PageBreadcrumbProps, PageBreadcrumbsProps } from './page-breadcrumbs.js';
41
43
  export { PageTab, PageTabs } from './page-tabs.js';
42
44
  export type { PageTabProps, PageTabsProps } from './page-tabs.js';
43
- export { RenameBody } from './rename.js';
44
- export type { RenameBodyProps } from './rename.js';
45
+ export { RenameDialog } from './rename-dialog.js';
46
+ export type { RenameDialogProps } from './rename-dialog.js';
45
47
  export { useRowKeys } from './row-keys.js';
46
48
  export type { RowBounds, RowKeys } from './row-keys.js';
47
49
  export { RepeatRows, RowControls } from './rows.js';
48
50
  export type { RepeatRowsProps, RowControlsProps, RowLabels } from './rows.js';
49
- export { RunConfirm } from './run-confirm.js';
50
- export type { RunConfirmProps } from './run-confirm.js';
51
51
  export { offeredSize, pageWindow, paginationOf, sizedView, useServerPaging } from './server-page.js';
52
52
  export type { PagedView, PageWindow, PaginationInfo, ServedPage, ServedSize, ServerPaging } from './server-page.js';
53
53
  export { Toaster, useToaster } from './toaster.js';
@@ -62,6 +62,6 @@ export type { GuardedField, OfferedView, ViewGuard } from './view-guard.js';
62
62
  * The design system version window this build was tested against.
63
63
  */
64
64
  export declare const SUPPORTED_WPDS: {
65
- readonly '@wordpress/ui': ">=0.24.0 <0.25.0";
66
- readonly '@wordpress/theme': ">=2.3.0 <3.0.0";
65
+ readonly '@wordpress/ui': ">=0.25.0 <0.26.0";
66
+ readonly '@wordpress/theme': ">=3.0.0 <4.0.0";
67
67
  };
package/dist/index.js CHANGED
@@ -2,13 +2,12 @@
2
2
  export { AdminRoot } from './admin-root.js';
3
3
  export { InitialsAvatar } from './avatar.js';
4
4
  export { DENSE_BREAKPOINT, EDGE_BREAKPOINT, HUGE_BREAKPOINT, SHEET_BREAKPOINT, SIDEBAR_BREAKPOINT, SMALL_VIEWPORT, TITLE_BREAKPOINT, } from './breakpoints.js';
5
- export { useBulkRun } from './bulk-run.js';
5
+ export { useBulkRun, useDialogRun } from './bulk-run.js';
6
6
  export { bulkNotes, runEach } from './bulk.js';
7
- export { useCloseWhileOpen } from './close-while-open.js';
8
- export { ConfirmBody } from './confirm.js';
7
+ export { ConfirmDialog } from './confirm-dialog.js';
9
8
  export { FileButton } from './file-button.js';
10
9
  export { focusedTrigger, useFocusBack } from './focus-back.js';
11
- export { FormBody } from './form.js';
10
+ export { FormDialog } from './form-dialog.js';
12
11
  export { Frame } from './frame.js';
13
12
  export { keyFromLabel } from './keys.js';
14
13
  export { LIST_CHROME_DOMAIN, listChromeCatalogFor } from './list-chrome.js';
@@ -20,11 +19,11 @@ export { MenuCount } from './menu-count.js';
20
19
  export { NavigationScreen } from './navigation-screen.js';
21
20
  export { openOnTap } from './open-on-tap.js';
22
21
  export { ErrorNotice, LoadMore, Page, PageTitle, SectionTitle } from './page.js';
22
+ export { PageBreadcrumb, PageBreadcrumbs } from './page-breadcrumbs.js';
23
23
  export { PageTab, PageTabs } from './page-tabs.js';
24
- export { RenameBody } from './rename.js';
24
+ export { RenameDialog } from './rename-dialog.js';
25
25
  export { useRowKeys } from './row-keys.js';
26
26
  export { RepeatRows, RowControls } from './rows.js';
27
- export { RunConfirm } from './run-confirm.js';
28
27
  export { offeredSize, pageWindow, paginationOf, sizedView, useServerPaging } from './server-page.js';
29
28
  export { Toaster, useToaster } from './toaster.js';
30
29
  export { markLatest, useUnsavedText } from './unsaved-text.js';
@@ -35,6 +34,6 @@ export { offeredView, viewNarrows } from './view-guard.js';
35
34
  * The design system version window this build was tested against.
36
35
  */
37
36
  export const SUPPORTED_WPDS = {
38
- '@wordpress/ui': '>=0.24.0 <0.25.0',
39
- '@wordpress/theme': '>=2.3.0 <3.0.0',
37
+ '@wordpress/ui': '>=0.25.0 <0.26.0',
38
+ '@wordpress/theme': '>=3.0.0 <4.0.0',
40
39
  };
@@ -2,11 +2,11 @@
2
2
  /** The Spanish list chrome, list dates, sidebar and no results words, compiled from the es-ES.po source beside it. */
3
3
  const catalog = {
4
4
  '': { lang: 'es-ES', 'plural-forms': 'nplurals=2; plural=(n != 1);' },
5
- '%1$d of %2$d Item': ['%1$d de %2$d elemento', '%1$d de %2$d elementos'],
5
+ '%1$s of %2$s Item': ['%1$s de %2$s elemento', '%1$s de %2$s elementos'],
6
6
  '%1$s, %2$s': ['%1$s, %2$s'],
7
7
  '%1$s: %2$s': ['%1$s: %2$s'],
8
- '%d Item': ['%d elemento', '%d elementos'],
9
- '%d Item selected': ['%d elemento seleccionado', '%d elementos seleccionados'],
8
+ '%s Item': ['%s elemento', '%s elementos'],
9
+ '%s Item selected': ['%s elemento seleccionado', '%s elementos seleccionados'],
10
10
  '%s, selected': ['%s, seleccionado'],
11
11
  '%s: <groupName />': ['%s: <groupName />'],
12
12
  '(no title)': ['(sin título)'],
@@ -8,6 +8,7 @@ const catalog = {
8
8
  August: ['août'],
9
9
  'August abbreviation\u0004Aug': ['Août'],
10
10
  Back: ['Retour'],
11
+ Close: ['Fermer'],
11
12
  'Close navigation panel': ['Fermer le panneau de navigation'],
12
13
  December: ['décembre'],
13
14
  'December abbreviation\u0004Dec': ['Déc'],