@abyss-project/commons-front-core 16.0.0 → 16.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/dist/{CookieConsentSettings-B7NfjgaI.js → CookieConsentSettings-DM0P2po1.js} +1 -1
- package/dist/{Surface-BEhoEhyC.js → Surface-DW78GtlG.js} +6 -0
- package/dist/{Tabs-DJ9_ZFjM.js → Tabs-DGh_2Lgc.js} +1 -1
- package/dist/components/data/DataTable/DataTableDesktop.d.ts +1 -1
- package/dist/components/data/DataTable/DataTableMobile.d.ts +1 -1
- package/dist/components/data/DataTable/data-table.types.d.ts +5 -0
- package/dist/components/editors/MarkdownEditor/MarkdownEditor.d.ts +22 -1
- package/dist/components/editors/MarkdownEditor/index.d.ts +1 -1
- package/dist/components/inputs/DropTargetOverlay/DropTargetOverlay.d.ts +12 -0
- package/dist/components/inputs/DropTargetOverlay/DropTargetOverlay.spec.d.ts +1 -0
- package/dist/components/inputs/index.d.ts +1 -0
- package/dist/cookie-consent.js +2 -2
- package/dist/{design-theme-N9jJSXdK.js → design-theme-BNfby4u0.js} +95 -90
- package/dist/{editors-QM76tqZI.js → editors-CoA-ElkI.js} +6654 -6626
- package/dist/editors.js +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/use-file-drop-target.hook.d.ts +34 -0
- package/dist/hooks/use-rich-intl.hook.d.ts +38 -0
- package/dist/{index-DCk0q3d7.js → index--WDnqvkI.js} +3 -3
- package/dist/{index-COUUAr5G.js → index-9AhVX_o8.js} +1 -1
- package/dist/{index-3-SmpH5N.js → index-B4W3BpjI.js} +4 -4
- package/dist/{index-CQU0eEXk.js → index-BIX2oQnD.js} +4 -4
- package/dist/{index-mmrA4ErC.js → index-BNnh8uiO.js} +2 -2
- package/dist/{index-5OVR3WNo.js → index-BPIERrcr.js} +3 -3
- package/dist/{index-DmAoL9-1.js → index-BX4GOdlN.js} +4 -4
- package/dist/{index-D1M_muSg.js → index-BXY3SD83.js} +2 -2
- package/dist/{index-4b2f7sdW.js → index-C2MJfXbp.js} +2 -2
- package/dist/{index-BKAfoA1a.js → index-CMyVfh9D.js} +2 -2
- package/dist/{index-D8ncJrf1.js → index-CpJ_UF5V.js} +2 -2
- package/dist/{index-DYXAfA_s.js → index-DF-LePxe.js} +2 -2
- package/dist/{index-jZGexiyT.js → index-DJ4F-yGQ.js} +3 -3
- package/dist/{index-pX3CTxFd.js → index-DSRCuEE1.js} +2 -2
- package/dist/{index-C6jhogFt.js → index-DakS19sw.js} +2 -2
- package/dist/{index-Taee9VIc.js → index-Dgongfv-.js} +2 -2
- package/dist/{index-DA-HUFp6.js → index-Dl1yghiT.js} +2 -2
- package/dist/{index-Ce0rv5wr.js → index-MEKGvAmO.js} +3 -3
- package/dist/{index-nKbvjf2P.js → index-SJdLMrNS.js} +2 -2
- package/dist/{index-DW3SBSsW.js → index-ebpXyaXh.js} +2 -2
- package/dist/{index-CM5COMvb.js → index-jHXiCbzE.js} +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +5657 -5426
- package/dist/legacy/theme/create-theme.d.ts +7 -1
- package/dist/legacy/theme/create-theme.spec.d.ts +1 -0
- package/dist/legacy.js +581 -571
- package/dist/motion/Appear.d.ts +25 -0
- package/dist/motion/AppearList.d.ts +31 -0
- package/dist/motion/index.d.ts +4 -0
- package/dist/motion/motion.d.ts +24 -0
- package/dist/motion/motion.spec.d.ts +1 -0
- package/dist/motion/use-added-keys.hook.d.ts +7 -0
- package/dist/motion/use-added-keys.hook.spec.d.ts +1 -0
- package/dist/theme/AbyssThemeProvider.d.ts +2 -1
- package/dist/theme/DesignCssVariables.d.ts +2 -1
- package/dist/theme/augmentation.d.ts +2 -1
- package/dist/theme/create-abyss-theme.d.ts +4 -1
- package/dist/theme/design-theme.d.ts +1 -1
- package/dist/theme/index.d.ts +2 -1
- package/dist/theme/reduced-motion.d.ts +7 -0
- package/dist/theme/reduced-motion.spec.d.ts +1 -0
- package/dist/translations/en.d.ts +3 -0
- package/dist/translations/fr.d.ts +3 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# Changelog — @abyss-project/commons-front-core
|
|
2
2
|
|
|
3
|
+
## 16.1.0
|
|
4
|
+
|
|
5
|
+
Additions only (card #227, lot D2, ADR-0248). No export removed, no signature changed.
|
|
6
|
+
|
|
7
|
+
### Motion
|
|
8
|
+
|
|
9
|
+
- `motion.enter` / `motion.exit`, `Appear`, `AppearList` (props `enter`, `exit`, `itemSx`) and `useAddedKeys` (`src/motion/README.md`): items added after the first render fade in with a 4 px rise, removed ones fade out; nothing is animated at the first render. The animation sits on a wrapper, so an inline `transform` (dnd-kit) is kept.
|
|
10
|
+
- `transitionOf` is exported.
|
|
11
|
+
- `DataTable` gains `animateAdded`.
|
|
12
|
+
|
|
13
|
+
### Reduced motion, global
|
|
14
|
+
|
|
15
|
+
- `createAbyssTheme(mode, { reducedMotion })` (and the legacy `createAbyssTheme(mode, { reducedMotion })`) sets every duration of the theme to 0. `AbyssThemeProvider` follows `prefers-reduced-motion: reduce`; `DesignCssVariables` writes the rule that sets `--abyss-duration-*` to `0ms`. Visible effect on every front that takes this version: no motion when the system asks for reduced motion. A legacy host has to read `REDUCED_MOTION_QUERY` and pass the option.
|
|
16
|
+
|
|
17
|
+
### File drop
|
|
18
|
+
|
|
19
|
+
- `useFileDropTarget` (reacts only to a drag that carries files, the innermost target wins) and `DropTargetOverlay` (README), label `ds.inputs.drop-target.label`.
|
|
20
|
+
- `MarkdownEditor` takes a `ref`: `MarkdownEditorHandle.appendFiles(files)` adds files at the end of the document.
|
|
21
|
+
|
|
3
22
|
## 16.0.0
|
|
4
23
|
|
|
5
24
|
### Feedback intake moves from Console to Workspace (P4a, D25)
|
|
@@ -3,7 +3,7 @@ import { useState as y, useCallback as p, useEffect as T, useId as h, useRef as
|
|
|
3
3
|
import I from "@mui/material/Button";
|
|
4
4
|
import H from "@mui/material/Switch";
|
|
5
5
|
import { styled as d } from "@mui/material/styles";
|
|
6
|
-
import { p as o, h as ee, d as D, D as O, a as $, t as V, u as A, S as Y, M as te, b as ne } from "./Surface-
|
|
6
|
+
import { p as o, h as ee, d as D, D as O, a as $, t as V, u as A, S as Y, M as te, b as ne } from "./Surface-DW78GtlG.js";
|
|
7
7
|
import { useQuery as ie, useMutation as oe } from "@tanstack/react-query";
|
|
8
8
|
import { AbyssCore as W } from "@abyss-project/main";
|
|
9
9
|
import se from "@mui/material/Link";
|
|
@@ -2131,6 +2131,9 @@ const xe = {
|
|
|
2131
2131
|
"too-many": "Déposez un seul fichier à la fois.",
|
|
2132
2132
|
"rejected-type": "Ce type de fichier n’est pas accepté ici."
|
|
2133
2133
|
},
|
|
2134
|
+
"drop-target": {
|
|
2135
|
+
label: "Déposez pour ajouter à {target}"
|
|
2136
|
+
},
|
|
2134
2137
|
"import-button": {
|
|
2135
2138
|
file: "Mon ordinateur",
|
|
2136
2139
|
url: "Lien URL",
|
|
@@ -4322,6 +4325,9 @@ const xe = {
|
|
|
4322
4325
|
"too-many": "Drop a single file at a time.",
|
|
4323
4326
|
"rejected-type": "This file type is not accepted here."
|
|
4324
4327
|
},
|
|
4328
|
+
"drop-target": {
|
|
4329
|
+
label: "Drop to add to {target}"
|
|
4330
|
+
},
|
|
4325
4331
|
"import-button": {
|
|
4326
4332
|
file: "My computer",
|
|
4327
4333
|
url: "URL link",
|
|
@@ -8,7 +8,7 @@ import mn from "@mui/material/Select";
|
|
|
8
8
|
import { styled as d, useTheme as hn, getContrastRatio as Ce } from "@mui/material/styles";
|
|
9
9
|
import { visuallyHidden as bn } from "@mui/utils";
|
|
10
10
|
import { useIntl as L } from "react-intl";
|
|
11
|
-
import { a as R, p as o, h as A, d as Z, D as K, c as yn, t as $e, s as de, e as oe, g as te, M as De, b as Pe, i as vn, B as wn } from "./Surface-
|
|
11
|
+
import { a as R, p as o, h as A, d as Z, D as K, c as yn, t as $e, s as de, e as oe, g as te, M as De, b as Pe, i as vn, B as wn } from "./Surface-DW78GtlG.js";
|
|
12
12
|
import { i as xn, b as Cn, r as kn, u as Sn, A as In, E as Fn } from "./index-C27b790L.js";
|
|
13
13
|
import X from "@mui/material/Button";
|
|
14
14
|
import { byteSizeIEC as Mn } from "@abyss-project/main";
|
|
@@ -3,4 +3,4 @@ import { DataTableProps } from './data-table.types';
|
|
|
3
3
|
* The table form of `DataTable`, from 768 px up. From 768 to 1199 px (next to the icon rail) the
|
|
4
4
|
* `Optional` columns are hidden.
|
|
5
5
|
*/
|
|
6
|
-
export declare function DataTableDesktop<T>({ columns: allColumns, rows, getRowId, density, selection, sort, onRowClick, loading, empty, label, }: DataTableProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare function DataTableDesktop<T>({ columns: allColumns, rows, getRowId, density, selection, sort, onRowClick, loading, empty, label, animateAdded, }: DataTableProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,4 +3,4 @@ import { DataTableProps } from './data-table.types';
|
|
|
3
3
|
* The two-level list form of `DataTable` below 768 px (`.mli`): the selection stays, and the bulk
|
|
4
4
|
* actions move into an `ActionBar` at the bottom of the screen.
|
|
5
5
|
*/
|
|
6
|
-
export declare function DataTableMobile<T>({ rows, getRowId, selection, onRowClick, loading, empty, mobileRow, label, }: DataTableProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare function DataTableMobile<T>({ rows, getRowId, selection, onRowClick, loading, empty, mobileRow, label, animateAdded, }: DataTableProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -85,4 +85,9 @@ export interface DataTableProps<T> {
|
|
|
85
85
|
* « Lignes ».
|
|
86
86
|
*/
|
|
87
87
|
label?: string;
|
|
88
|
+
/**
|
|
89
|
+
* Rows added while the table is on screen fade in and rise 4 px (`motion.enter`); the rows of
|
|
90
|
+
* the first render never do. Off by default.
|
|
91
|
+
*/
|
|
92
|
+
animateAdded?: boolean;
|
|
88
93
|
}
|
|
@@ -12,8 +12,29 @@ export type MarkdownEditorProps = {
|
|
|
12
12
|
enableImageUpload?: boolean;
|
|
13
13
|
enableFileUpload?: boolean;
|
|
14
14
|
} & CrepeConfig;
|
|
15
|
+
/** What a host drives from outside the editor. */
|
|
16
|
+
export type MarkdownEditorHandle = {
|
|
17
|
+
/**
|
|
18
|
+
* Uploads the files by `onUploadFile`, one after the other, and appends each as its own block at
|
|
19
|
+
* the end of the document (`` for an image, `[name](url)` otherwise). A file whose
|
|
20
|
+
* upload fails is left out: the host's handler reports it. Does nothing when the editor is
|
|
21
|
+
* read-only, lacks `enableFileUpload` or `onUploadFile`, or is not ready yet.
|
|
22
|
+
*/
|
|
23
|
+
appendFiles: (files: File[]) => Promise<void>;
|
|
24
|
+
};
|
|
15
25
|
/**
|
|
16
26
|
* Markdown editor of the design system: Milkdown Crepe, themed from `theme.design`, with its
|
|
17
27
|
* labels translated by the core. The same rendering serves reading (`readOnly`) and editing.
|
|
18
28
|
*/
|
|
19
|
-
export declare const MarkdownEditor: React.
|
|
29
|
+
export declare const MarkdownEditor: React.ForwardRefExoticComponent<{
|
|
30
|
+
placeholder?: string;
|
|
31
|
+
defaultValue?: string;
|
|
32
|
+
/** For external updates (SSE): replaces the document without triggering `onChange`. */
|
|
33
|
+
externalValue?: string;
|
|
34
|
+
onChange?: (md: string) => void;
|
|
35
|
+
readOnly?: boolean;
|
|
36
|
+
/** Uploads a file and returns its URL. */
|
|
37
|
+
onUploadFile?: (file: File) => Promise<string>;
|
|
38
|
+
enableImageUpload?: boolean;
|
|
39
|
+
enableFileUpload?: boolean;
|
|
40
|
+
} & CrepeConfig & React.RefAttributes<MarkdownEditorHandle>>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { MarkdownEditor } from './MarkdownEditor';
|
|
2
|
-
export type { MarkdownEditorProps } from './MarkdownEditor';
|
|
2
|
+
export type { MarkdownEditorHandle, MarkdownEditorProps, } from './MarkdownEditor';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface DropTargetOverlayProps {
|
|
2
|
+
/** Shown while a file is over the target (`isFileOver` of `useFileDropTarget`). */
|
|
3
|
+
visible: boolean;
|
|
4
|
+
/** What receives the files, in the label: « Déposez pour ajouter à {target} ». */
|
|
5
|
+
target: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* The cue of a drop target: a dashed accent frame over its parent, with « Déposez pour ajouter à
|
|
9
|
+
* {target} ». The parent must be `position: relative`. It lets every pointer event through
|
|
10
|
+
* (`pointer-events: none`) and appears with `Appear`. Pair it with `useFileDropTarget`.
|
|
11
|
+
*/
|
|
12
|
+
export declare function DropTargetOverlay({ visible, target, }: DropTargetOverlayProps): JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -10,6 +10,7 @@ export * from './SettingsRow/SettingsRow';
|
|
|
10
10
|
export * from './CopyField/CopyField';
|
|
11
11
|
export * from './ContextSelector/ContextSelector';
|
|
12
12
|
export * from './DropZone/DropZone';
|
|
13
|
+
export * from './DropTargetOverlay/DropTargetOverlay';
|
|
13
14
|
export * from './ImportButton/ImportButton';
|
|
14
15
|
export * from './UserPicker/UserPicker';
|
|
15
16
|
export * from './CompanySearchField/CompanySearchField';
|
package/dist/cookie-consent.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as e, d as a, C as n, b as C, D as i, R as t, V as r, e as A, r as k, f as c, u as l, c as f, a as b, w as u } from "./CookieConsentSettings-
|
|
2
|
-
import { f as E } from "./Surface-
|
|
1
|
+
import { A as e, d as a, C as n, b as C, D as i, R as t, V as r, e as A, r as k, f as c, u as l, c as f, a as b, w as u } from "./CookieConsentSettings-DM0P2po1.js";
|
|
2
|
+
import { f as E } from "./Surface-DW78GtlG.js";
|
|
3
3
|
export {
|
|
4
4
|
e as AbyssCookieConsentProvider,
|
|
5
5
|
a as COOKIE_NAME,
|