@cgi-learning-hub/ui 1.14.0-dev.1785319387 → 1.14.0-dev.1785338327

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/index.d.ts CHANGED
@@ -16,6 +16,13 @@ declare interface FormattingControlsProps extends BaseProps {
16
16
  editor: Editor;
17
17
  }
18
18
 
19
+ export declare function Spacer({ orientation, size, style, ...props }: React.ComponentProps<"div"> & {
20
+ orientation?: SpacerOrientation;
21
+ size?: string | number;
22
+ }): JSX.Element;
23
+
24
+ export declare type SpacerOrientation = "horizontal" | "vertical";
25
+
19
26
  export declare const Toolbar: ForwardRefExoticComponent<ToolbarProps & RefAttributes<HTMLDivElement>>;
20
27
 
21
28
  export declare const ToolbarGroup: ForwardRefExoticComponent<BaseProps_2 & RefAttributes<HTMLDivElement>>;
package/dist/index.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as ListSubheader, $t as FolderCard, A as DialogTitle, At as TableSortLabel, B as Grid, Bt as ZoomControl, C as CircularProgress, Ct as TableBody, D as DialogActions, Dt as TableHead, E as Container, Et as TableFooter, F as FormControlLabel, Ft as Toolbar, G as InputLabel, Gt as ResourceCard, H as IconButton, Ht as ICON_TYPE, I as FormGroup, It as Tooltip, J as List, Jt as LoaderBackdrop, K as LinearProgress, Kt as QueryError, L as FormHelperText, Lt as Typography, M as Drawer, Mt as TextField, N as Fade, Nt as ToggleButton, O as DialogContent, Ot as TablePagination, P as FormControl, Pt as ToggleButtonGroup, Q as ListItemText, Qt as Heading, R as FormLabel, Rt as Zoom, S as Chip, St as Table, T as Collapse, Tt as TableContainer, U as Input, Ut as TimePicker, V as Grow, Vt as TreeView, W as InputBase, Wt as SearchInput, X as ListItemButton, Xt as ImagePicker, Y as ListItem, Yt as Loader, Z as ListItemIcon, _ as CardActions, _n as TabContext, _t as StepLabel, a as AlertTitle, an as Dialog, at as Paper, b as CardMedia, bn as useTabContext, bt as Switch, c as Avatar, cn as DEFAULT_COLOR_OPTIONS, ct as RadioGroup, d as Box, dn as ActionBar, dt as Slide, en as FileList, et as Menu, f as Breadcrumbs, fn as TabPanel, ft as Slider, g as CardActionArea, gn as TabList, gt as StepButton, h as Card, ht as Step, i as AccordionSummary, in as Dropzone, it as Pagination, j as Divider, jt as Tabs, k as DialogContentText, kt as TableRow, l as Backdrop, lt as Select, m as ButtonGroup, mn as tabPanelClasses, mt as Stack, n as AccordionActions, nn as EmptyState, nt as MobileStepper, o as AppBar, on as DatePicker, ot as Popover, p as Button, pn as getTabPanelUtilityClass, pt as Snackbar, q as Link, qt as PasswordInput, r as AccordionDetails, rn as EllipsisWithTooltip, rt as Modal, s as Autocomplete, sn as ColorPicker, st as Radio, t as Accordion, tn as FileListItem, tt as MenuItem, u as Badge, un as Alert, ut as Skeleton, v as CardContent, vn as getPanelId, vt as Stepper, w as ClickAwayListener, wt as TableCell, x as Checkbox, xt as Tab, y as CardHeader, yn as getTabId, yt as SvgIcon, z as GlobalStyles, zt as useMediaQuery } from "./src-G-BmjM2S.js";
1
+ import { $ as ListItemText, $t as Heading, A as DialogContentText, At as TableRow, B as GlobalStyles, Bt as useMediaQuery, C as Chip, Ct as Table, D as Container, Dt as TableFooter, E as Collapse, Et as TableContainer, F as FormControl, Ft as ToggleButtonGroup, G as InputBase, Gt as SearchInput, H as Grow, Ht as TreeView, I as FormControlLabel, It as Toolbar, J as Link, Jt as PasswordInput, K as InputLabel, Kt as ResourceCard, L as FormGroup, Lt as Tooltip, M as Divider, Mt as Tabs, N as Drawer, Nt as TextField, O as DialogActions, Ot as TableHead, P as Fade, Pt as ToggleButton, Q as ListItemIcon, R as FormHelperText, Rt as Typography, S as Checkbox, St as Tab, T as ClickAwayListener, Tt as TableCell, U as IconButton, Ut as ICON_TYPE, V as Grid, Vt as ZoomControl, W as Input, Wt as TimePicker, X as ListItem, Xt as Loader, Y as List, Yt as LoaderBackdrop, Z as ListItemButton, Zt as ImagePicker, _ as CardActionArea, _n as TabList, _t as StepButton, a as AccordionSummary, an as Dropzone, at as Pagination, b as CardHeader, bn as getTabId, bt as SvgIcon, c as Autocomplete, cn as ColorPicker, ct as Radio, d as Badge, dn as Alert, dt as Skeleton, en as FolderCard, et as ListSubheader, f as Box, fn as ActionBar, ft as Slide, g as Card, gt as Step, h as ButtonGroup, hn as tabPanelClasses, ht as Stack, i as AccordionDetails, in as EllipsisWithTooltip, it as Modal, j as DialogTitle, jt as TableSortLabel, k as DialogContent, kt as TablePagination, l as Avatar, ln as DEFAULT_COLOR_OPTIONS, lt as RadioGroup, m as Button, mn as getTabPanelUtilityClass, mt as Snackbar, n as Accordion, nn as FileListItem, nt as MenuItem, o as AlertTitle, on as Dialog, ot as Paper, p as Breadcrumbs, pn as TabPanel, pt as Slider, q as LinearProgress, qt as QueryError, r as AccordionActions, rn as EmptyState, rt as MobileStepper, s as AppBar, sn as DatePicker, st as Popover, tn as FileList, tt as Menu, u as Backdrop, ut as Select, v as CardActions, vn as TabContext, vt as StepLabel, w as CircularProgress, wt as TableBody, x as CardMedia, xn as useTabContext, xt as Switch, y as CardContent, yn as getPanelId, yt as Stepper, z as FormLabel, zt as Zoom } from "./src-B3iFugc4.js";
2
2
  export * from "@mui/material/Tabs";
3
3
  export * from "@mui/material/styles";
4
4
  export * from "@mui/material/Accordion";
@@ -114,6 +114,15 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
114
114
  var __getProtoOf = Object.getPrototypeOf;
115
115
  var __hasOwnProp = Object.prototype.hasOwnProperty;
116
116
  var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
117
+ var __exportAll = (all, no_symbols) => {
118
+ let target = {};
119
+ for (var name in all) __defProp(target, name, {
120
+ get: all[name],
121
+ enumerable: true
122
+ });
123
+ if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
124
+ return target;
125
+ };
117
126
  var __copyProps = (to, from, except, desc) => {
118
127
  if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
119
128
  key = keys[i];
@@ -30524,6 +30533,135 @@ var ZoomControl = ({ step = 10, value = 50, onChange, max = 100, min = 0, label
30524
30533
  });
30525
30534
  };
30526
30535
  //#endregion
30527
- export { ListSubheader as $, FolderCard as $t, DialogTitle as A, TableSortLabel as At, Grid as B, ZoomControl as Bt, CircularProgress$1 as C, TableBody as Ct, DialogActions$1 as D, TableHead as Dt, Container as E, TableFooter as Et, FormControlLabel as F, Toolbar as Ft, InputLabel$1 as G, ResourceCard as Gt, IconButton$1 as H, ICON_TYPE as Ht, FormGroup as I, Tooltip$1 as It, List$1 as J, LoaderBackdrop as Jt, LinearProgress as K, QueryError as Kt, FormHelperText$1 as L, Typography$1 as Lt, Drawer as M, TextField$1 as Mt, Fade$1 as N, ToggleButton as Nt, DialogContent$1 as O, TablePagination as Ot, FormControl$1 as P, ToggleButtonGroup as Pt, ListItemText$1 as Q, Heading as Qt, FormLabel as R, Zoom as Rt, Chip$1 as S, Table as St, Collapse$1 as T, TableContainer as Tt, Input as U, TimePicker as Ut, Grow$1 as V, TreeView as Vt, InputBase$1 as W, SearchInput as Wt, ListItemButton$1 as X, ImagePicker as Xt, ListItem$1 as Y, Loader as Yt, ListItemIcon$1 as Z, DeleteRounded_default as Zt, CardActions as _, TabContext as _n, StepLabel as _t, AlertTitle$1 as a, Dialog as an, Paper as at, CardMedia$1 as b, useTabContext as bn, Switch as bt, Avatar as c, DEFAULT_COLOR_OPTIONS as cn, RadioGroup as ct, Box$1 as d, ActionBar as dn, Slide as dt, FileList as en, Menu as et, Breadcrumbs as f, TabPanel as fn, Slider as ft, CardActionArea as g, TabList as gn, StepButton as gt, Card$1 as h, clsx as hn, Step as ht, AccordionSummary as i, Dropzone as in, Pagination as it, Divider$1 as j, Tabs$1 as jt, DialogContentText as k, TableRow as kt, Backdrop$1 as l, SvgIcon_default as ln, Select as lt, ButtonGroup as m, tabPanelClasses as mn, Stack$1 as mt, AccordionActions as n, EmptyState as nn, MobileStepper as nt, AppBar as o, DatePicker as on, Popover as ot, Button$1 as p, getTabPanelUtilityClass as pn, Snackbar as pt, Link as q, PasswordInput as qt, AccordionDetails as r, EllipsisWithTooltip as rn, Modal as rt, Autocomplete as s, ColorPicker as sn, Radio as st, Accordion as t, FileListItem as tn, MenuItem$1 as tt, Badge as u, Alert as un, Skeleton as ut, CardContent$1 as v, getPanelId as vn, Stepper as vt, ClickAwayListener$1 as w, TableCell as wt, Checkbox as x, Tab as xt, CardHeader as y, getTabId as yn, SvgIcon as yt, GlobalStyles as z, useMediaQuery$1 as zt };
30536
+ //#region src/index.ts
30537
+ var src_exports = /* @__PURE__ */ __exportAll({
30538
+ Accordion: () => Accordion,
30539
+ AccordionActions: () => AccordionActions,
30540
+ AccordionDetails: () => AccordionDetails,
30541
+ AccordionSummary: () => AccordionSummary,
30542
+ ActionBar: () => ActionBar,
30543
+ Alert: () => Alert,
30544
+ AlertTitle: () => AlertTitle$1,
30545
+ AppBar: () => AppBar,
30546
+ Autocomplete: () => Autocomplete,
30547
+ Avatar: () => Avatar,
30548
+ Backdrop: () => Backdrop$1,
30549
+ Badge: () => Badge,
30550
+ Box: () => Box$1,
30551
+ Breadcrumbs: () => Breadcrumbs,
30552
+ Button: () => Button$1,
30553
+ ButtonGroup: () => ButtonGroup,
30554
+ Card: () => Card$1,
30555
+ CardActionArea: () => CardActionArea,
30556
+ CardActions: () => CardActions,
30557
+ CardContent: () => CardContent$1,
30558
+ CardHeader: () => CardHeader,
30559
+ CardMedia: () => CardMedia$1,
30560
+ Checkbox: () => Checkbox,
30561
+ Chip: () => Chip$1,
30562
+ CircularProgress: () => CircularProgress$1,
30563
+ ClickAwayListener: () => ClickAwayListener$1,
30564
+ Collapse: () => Collapse$1,
30565
+ ColorPicker: () => ColorPicker,
30566
+ Container: () => Container,
30567
+ DEFAULT_COLOR_OPTIONS: () => DEFAULT_COLOR_OPTIONS,
30568
+ DatePicker: () => DatePicker,
30569
+ Dialog: () => Dialog,
30570
+ DialogActions: () => DialogActions$1,
30571
+ DialogContent: () => DialogContent$1,
30572
+ DialogContentText: () => DialogContentText,
30573
+ DialogTitle: () => DialogTitle,
30574
+ Divider: () => Divider$1,
30575
+ Drawer: () => Drawer,
30576
+ Dropzone: () => Dropzone,
30577
+ EllipsisWithTooltip: () => EllipsisWithTooltip,
30578
+ EmptyState: () => EmptyState,
30579
+ Fade: () => Fade$1,
30580
+ FileList: () => FileList,
30581
+ FileListItem: () => FileListItem,
30582
+ FolderCard: () => FolderCard,
30583
+ FormControl: () => FormControl$1,
30584
+ FormControlLabel: () => FormControlLabel,
30585
+ FormGroup: () => FormGroup,
30586
+ FormHelperText: () => FormHelperText$1,
30587
+ FormLabel: () => FormLabel,
30588
+ GlobalStyles: () => GlobalStyles,
30589
+ Grid: () => Grid,
30590
+ Grow: () => Grow$1,
30591
+ Heading: () => Heading,
30592
+ ICON_TYPE: () => ICON_TYPE,
30593
+ IconButton: () => IconButton$1,
30594
+ ImagePicker: () => ImagePicker,
30595
+ Input: () => Input,
30596
+ InputBase: () => InputBase$1,
30597
+ InputLabel: () => InputLabel$1,
30598
+ LinearProgress: () => LinearProgress,
30599
+ Link: () => Link,
30600
+ List: () => List$1,
30601
+ ListItem: () => ListItem$1,
30602
+ ListItemButton: () => ListItemButton$1,
30603
+ ListItemIcon: () => ListItemIcon$1,
30604
+ ListItemText: () => ListItemText$1,
30605
+ ListSubheader: () => ListSubheader,
30606
+ Loader: () => Loader,
30607
+ LoaderBackdrop: () => LoaderBackdrop,
30608
+ Menu: () => Menu,
30609
+ MenuItem: () => MenuItem$1,
30610
+ MobileStepper: () => MobileStepper,
30611
+ Modal: () => Modal,
30612
+ Pagination: () => Pagination,
30613
+ Paper: () => Paper,
30614
+ PasswordInput: () => PasswordInput,
30615
+ Popover: () => Popover,
30616
+ QueryError: () => QueryError,
30617
+ Radio: () => Radio,
30618
+ RadioGroup: () => RadioGroup,
30619
+ ResourceCard: () => ResourceCard,
30620
+ SearchInput: () => SearchInput,
30621
+ Select: () => Select,
30622
+ Skeleton: () => Skeleton,
30623
+ Slide: () => Slide,
30624
+ Slider: () => Slider,
30625
+ Snackbar: () => Snackbar,
30626
+ Stack: () => Stack$1,
30627
+ Step: () => Step,
30628
+ StepButton: () => StepButton,
30629
+ StepLabel: () => StepLabel,
30630
+ Stepper: () => Stepper,
30631
+ SvgIcon: () => SvgIcon,
30632
+ Switch: () => Switch,
30633
+ Tab: () => Tab,
30634
+ TabContext: () => TabContext,
30635
+ TabList: () => TabList,
30636
+ TabPanel: () => TabPanel,
30637
+ Table: () => Table,
30638
+ TableBody: () => TableBody,
30639
+ TableCell: () => TableCell,
30640
+ TableContainer: () => TableContainer,
30641
+ TableFooter: () => TableFooter,
30642
+ TableHead: () => TableHead,
30643
+ TablePagination: () => TablePagination,
30644
+ TableRow: () => TableRow,
30645
+ TableSortLabel: () => TableSortLabel,
30646
+ Tabs: () => Tabs$1,
30647
+ TextField: () => TextField$1,
30648
+ TimePicker: () => TimePicker,
30649
+ ToggleButton: () => ToggleButton,
30650
+ ToggleButtonGroup: () => ToggleButtonGroup,
30651
+ Toolbar: () => Toolbar,
30652
+ Tooltip: () => Tooltip$1,
30653
+ TreeView: () => TreeView,
30654
+ Typography: () => Typography$1,
30655
+ Zoom: () => Zoom,
30656
+ ZoomControl: () => ZoomControl,
30657
+ getPanelId: () => getPanelId,
30658
+ getTabId: () => getTabId,
30659
+ getTabPanelUtilityClass: () => getTabPanelUtilityClass,
30660
+ tabPanelClasses: () => tabPanelClasses,
30661
+ useMediaQuery: () => useMediaQuery$1,
30662
+ useTabContext: () => useTabContext
30663
+ });
30664
+ //#endregion
30665
+ export { ListItemText$1 as $, Heading as $t, DialogContentText as A, TableRow as At, GlobalStyles as B, useMediaQuery$1 as Bt, Chip$1 as C, Table as Ct, Container as D, TableFooter as Dt, Collapse$1 as E, TableContainer as Et, FormControl$1 as F, ToggleButtonGroup as Ft, InputBase$1 as G, SearchInput as Gt, Grow$1 as H, TreeView as Ht, FormControlLabel as I, Toolbar as It, Link as J, PasswordInput as Jt, InputLabel$1 as K, ResourceCard as Kt, FormGroup as L, Tooltip$1 as Lt, Divider$1 as M, Tabs$1 as Mt, Drawer as N, TextField$1 as Nt, DialogActions$1 as O, TableHead as Ot, Fade$1 as P, ToggleButton as Pt, ListItemIcon$1 as Q, DeleteRounded_default as Qt, FormHelperText$1 as R, Typography$1 as Rt, Checkbox as S, Tab as St, ClickAwayListener$1 as T, TableCell as Tt, IconButton$1 as U, ICON_TYPE as Ut, Grid as V, ZoomControl as Vt, Input as W, TimePicker as Wt, ListItem$1 as X, Loader as Xt, List$1 as Y, LoaderBackdrop as Yt, ListItemButton$1 as Z, ImagePicker as Zt, CardActionArea as _, TabList as _n, StepButton as _t, AccordionSummary as a, Dropzone as an, Pagination as at, CardHeader as b, getTabId as bn, SvgIcon as bt, Autocomplete as c, ColorPicker as cn, Radio as ct, Badge as d, Alert as dn, Skeleton as dt, FolderCard as en, ListSubheader as et, Box$1 as f, ActionBar as fn, Slide as ft, Card$1 as g, clsx as gn, Step as gt, ButtonGroup as h, tabPanelClasses as hn, Stack$1 as ht, AccordionDetails as i, EllipsisWithTooltip as in, Modal as it, DialogTitle as j, TableSortLabel as jt, DialogContent$1 as k, TablePagination as kt, Avatar as l, DEFAULT_COLOR_OPTIONS as ln, RadioGroup as lt, Button$1 as m, getTabPanelUtilityClass as mn, Snackbar as mt, Accordion as n, FileListItem as nn, MenuItem$1 as nt, AlertTitle$1 as o, Dialog as on, Paper as ot, Breadcrumbs as p, TabPanel as pn, Slider as pt, LinearProgress as q, QueryError as qt, AccordionActions as r, EmptyState as rn, MobileStepper as rt, AppBar as s, DatePicker as sn, Popover as st, src_exports as t, FileList as tn, Menu as tt, Backdrop$1 as u, SvgIcon_default as un, Select as ut, CardActions as v, TabContext as vn, StepLabel as vt, CircularProgress$1 as w, TableBody as wt, CardMedia$1 as x, useTabContext as xn, Switch as xt, CardContent$1 as y, getPanelId as yn, Stepper as yt, FormLabel as z, Zoom as zt };
30528
30666
 
30529
- //# sourceMappingURL=src-G-BmjM2S.js.map
30667
+ //# sourceMappingURL=src-B3iFugc4.js.map
@@ -9,7 +9,9 @@ let _mui_material_Tooltip = require("@mui/material/Tooltip");
9
9
  let _mui_material_Badge = require("@mui/material/Badge");
10
10
  let _mui_material_SvgIcon = require("@mui/material/SvgIcon");
11
11
  let _mui_material_MenuItem = require("@mui/material/MenuItem");
12
+ let _mui_material_Typography = require("@mui/material/Typography");
12
13
  let _mui_material_Menu = require("@mui/material/Menu");
14
+ let _mui_material_IconButton = require("@mui/material/IconButton");
13
15
  let _mui_material_Stack = require("@mui/material/Stack");
14
16
  let _mui_material_InputBase = require("@mui/material/InputBase");
15
17
  let _mui_material_Divider = require("@mui/material/Divider");
@@ -4356,7 +4358,7 @@ function useBlockquote(config) {
4356
4358
  return success;
4357
4359
  }, [editor, onToggled]),
4358
4360
  canToggle,
4359
- label: "Blockquote",
4361
+ label: "Citation en bloc",
4360
4362
  shortcutKeys: BLOCKQUOTE_SHORTCUT_KEY,
4361
4363
  Icon: TextSnippetIcon
4362
4364
  };
@@ -4431,7 +4433,7 @@ var BlockquoteButton = (0, react.forwardRef)(({ editor: providedEditor, text, hi
4431
4433
  disabled: !canToggle,
4432
4434
  "data-disabled": !canToggle,
4433
4435
  "aria-label": label,
4434
- tooltip: "Blockquote",
4436
+ tooltip: label,
4435
4437
  onClick: handleClick,
4436
4438
  ...buttonProps,
4437
4439
  ref,
@@ -4630,7 +4632,7 @@ function useCodeBlock(config) {
4630
4632
  return success;
4631
4633
  }, [editor, onToggled]),
4632
4634
  canToggle: canToggleState,
4633
- label: "Code Block",
4635
+ label: "Bloc de code",
4634
4636
  shortcutKeys: CODE_BLOCK_SHORTCUT_KEY,
4635
4637
  Icon: IntegrationInstructionIcon
4636
4638
  };
@@ -4667,7 +4669,7 @@ var CodeBlockButton = (0, react.forwardRef)(({ editor: providedEditor, text, hid
4667
4669
  "data-disabled": !canToggle,
4668
4670
  tabIndex: -1,
4669
4671
  "aria-label": label,
4670
- tooltip: "Code Block",
4672
+ tooltip: label,
4671
4673
  onClick: handleClick,
4672
4674
  ...buttonProps,
4673
4675
  ref,
@@ -4943,7 +4945,7 @@ function useHeading(config) {
4943
4945
  onToggled
4944
4946
  ]),
4945
4947
  canToggle: canToggleState,
4946
- label: `Heading ${level}`,
4948
+ label: `Titre ${level}`,
4947
4949
  shortcutKeys: HEADING_SHORTCUT_KEYS[level],
4948
4950
  Icon: headingIcons[level]
4949
4951
  };
@@ -4987,9 +4989,11 @@ var HeadingMenuItem = (0, react.forwardRef)(({ editor: providedEditor, level, te
4987
4989
  ref,
4988
4990
  children: children ?? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
4989
4991
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, { fontSize: "small" }),
4990
- text && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
4991
- className: "tiptap-button-text",
4992
- children: text
4992
+ text && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Typography.default, {
4993
+ component: "span",
4994
+ variant: "body2",
4995
+ sx: { ml: 1 },
4996
+ children: label
4993
4997
  }),
4994
4998
  showShortcut && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(HeadingShortcutBadge, {
4995
4999
  level,
@@ -5099,7 +5103,7 @@ function useHeadingMenu(config) {
5099
5103
  isActive,
5100
5104
  canToggle: canToggleState,
5101
5105
  levels,
5102
- label: "Heading",
5106
+ label: "Titre",
5103
5107
  Icon: activeLevel ? headingIcons[activeLevel] : HeadingIcon
5104
5108
  };
5105
5109
  }
@@ -5121,7 +5125,7 @@ var HeadingMenu = (0, react.forwardRef)(({ editor: providedEditor, levels = [
5121
5125
  const { editor } = useTiptapEditor(providedEditor);
5122
5126
  const [anchorEl, setAnchorEl] = (0, react.useState)(null);
5123
5127
  const open = Boolean(anchorEl);
5124
- const { isVisible, isActive, canToggle, Icon } = useHeadingMenu({
5128
+ const { isVisible, isActive, canToggle, Icon, label } = useHeadingMenu({
5125
5129
  editor,
5126
5130
  levels,
5127
5131
  hideWhenUnavailable
@@ -5152,7 +5156,7 @@ var HeadingMenu = (0, react.forwardRef)(({ editor: providedEditor, levels = [
5152
5156
  "aria-controls": "heading-menu",
5153
5157
  "aria-label": "Format text as heading",
5154
5158
  "aria-expanded": open,
5155
- tooltip: "Heading",
5159
+ tooltip: label,
5156
5160
  onClick: handleClick,
5157
5161
  ...buttonProps,
5158
5162
  ref,
@@ -5351,7 +5355,7 @@ function useLinkPopover(config) {
5351
5355
  isVisible,
5352
5356
  canSet,
5353
5357
  isActive,
5354
- label: "Link",
5358
+ label: "Lien",
5355
5359
  Icon: LinkRounded_default,
5356
5360
  ...useLinkHandler({
5357
5361
  editor,
@@ -5360,77 +5364,6 @@ function useLinkPopover(config) {
5360
5364
  };
5361
5365
  }
5362
5366
  //#endregion
5363
- //#region ../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.mjs
5364
- /**
5365
- * Copyright 2022 Joe Bell. All rights reserved.
5366
- *
5367
- * This file is licensed to you under the Apache License, Version 2.0
5368
- * (the "License"); you may not use this file except in compliance with the
5369
- * License. You may obtain a copy of the License at
5370
- *
5371
- * http://www.apache.org/licenses/LICENSE-2.0
5372
- *
5373
- * Unless required by applicable law or agreed to in writing, software
5374
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
5375
- * WARRANTIES OR REPRESENTATIONS OF ANY KIND, either express or implied. See the
5376
- * License for the specific language governing permissions and limitations under
5377
- * the License.
5378
- */ var falsyToString = (value) => typeof value === "boolean" ? `${value}` : value === 0 ? "0" : value;
5379
- var cx = require_src.clsx;
5380
- var cva = (base, config) => (props) => {
5381
- var _config_compoundVariants;
5382
- if ((config === null || config === void 0 ? void 0 : config.variants) == null) return cx(base, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
5383
- const { variants, defaultVariants } = config;
5384
- const getVariantClassNames = Object.keys(variants).map((variant) => {
5385
- const variantProp = props === null || props === void 0 ? void 0 : props[variant];
5386
- const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];
5387
- if (variantProp === null) return null;
5388
- const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);
5389
- return variants[variant][variantKey];
5390
- });
5391
- const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param) => {
5392
- let [key, value] = param;
5393
- if (value === void 0) return acc;
5394
- acc[key] = value;
5395
- return acc;
5396
- }, {});
5397
- return cx(base, getVariantClassNames, config === null || config === void 0 ? void 0 : (_config_compoundVariants = config.compoundVariants) === null || _config_compoundVariants === void 0 ? void 0 : _config_compoundVariants.reduce((acc, param) => {
5398
- let { class: cvClass, className: cvClassName, ...compoundVariantOptions } = param;
5399
- return Object.entries(compoundVariantOptions).every((param) => {
5400
- let [key, value] = param;
5401
- return Array.isArray(value) ? value.includes({
5402
- ...defaultVariants,
5403
- ...propsWithoutUndefined
5404
- }[key]) : {
5405
- ...defaultVariants,
5406
- ...propsWithoutUndefined
5407
- }[key] === value;
5408
- }) ? [
5409
- ...acc,
5410
- cvClass,
5411
- cvClassName
5412
- ] : acc;
5413
- }, []), props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
5414
- };
5415
- //#endregion
5416
- //#region src/tiptap/components/ui-primitive/button-group/button-group.tsx
5417
- var buttonGroupVariants = cva("tiptap-button-group", {
5418
- variants: { orientation: {
5419
- horizontal: "tiptap-button-group-horizontal",
5420
- vertical: "tiptap-button-group-vertical"
5421
- } },
5422
- defaultVariants: { orientation: "horizontal" }
5423
- });
5424
- function ButtonGroup({ className, orientation, ...props }) {
5425
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
5426
- role: "group",
5427
- "data-slot": "tiptap-button-group",
5428
- "data-orientation": orientation,
5429
- className: cn(buttonGroupVariants({ orientation }), className),
5430
- ...props
5431
- });
5432
- }
5433
- //#endregion
5434
5367
  //#region src/tiptap/components/ui/link-popover/link-popover.tsx
5435
5368
  /**
5436
5369
  * Link button component for triggering the link popover
@@ -5441,14 +5374,16 @@ var LinkButton = (0, react.forwardRef)(({ className, children, ...props }, ref)
5441
5374
  className,
5442
5375
  role: "button",
5443
5376
  tabIndex: -1,
5444
- "aria-label": "Link",
5445
- tooltip: "Link",
5446
5377
  ref,
5447
5378
  ...props,
5448
5379
  children: children || /* @__PURE__ */ (0, react_jsx_runtime.jsx)(LinkRounded_default, { fontSize: "small" })
5449
5380
  });
5450
5381
  });
5451
5382
  LinkButton.displayName = "LinkButton";
5383
+ var StyledIconButton = (0, require_src.src_exports.styled)(_mui_material_IconButton.default)(({ theme }) => ({
5384
+ borderRadius: theme.shape.borderRadius,
5385
+ "& .MuiTouchRipple-root .MuiTouchRipple-child": { borderRadius: theme.shape.borderRadius }
5386
+ }));
5452
5387
  /**
5453
5388
  * Main content component for the link popover
5454
5389
  */
@@ -5469,7 +5404,7 @@ var LinkMain = ({ url, setUrl, setLink, removeLink, openLink, isActive }) => {
5469
5404
  children: [
5470
5405
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_InputBase.default, {
5471
5406
  type: "url",
5472
- placeholder: "Paste a link...",
5407
+ placeholder: "Coller un lien...",
5473
5408
  value: url,
5474
5409
  onChange: (e) => setUrl(e.target.value),
5475
5410
  onKeyDown: handleKeyDown,
@@ -5483,31 +5418,35 @@ var LinkMain = ({ url, setUrl, setLink, removeLink, openLink, isActive }) => {
5483
5418
  fontSize: "0.875rem"
5484
5419
  }
5485
5420
  }),
5486
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ButtonGroup, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
5421
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StyledIconButton, {
5422
+ size: "small",
5487
5423
  type: "button",
5488
5424
  onClick: setLink,
5489
- title: "Apply link",
5425
+ title: "Appliquer le lien",
5490
5426
  disabled: !url && !isActive,
5491
5427
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(KeyboardReturnRounded_default, { fontSize: "small" })
5492
- }) }),
5428
+ }),
5493
5429
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Divider.default, {
5494
5430
  orientation: "vertical",
5495
5431
  flexItem: true,
5496
5432
  sx: { my: .5 }
5497
5433
  }),
5498
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(ButtonGroup, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ButtonGroup, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
5434
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StyledIconButton, {
5435
+ size: "small",
5499
5436
  type: "button",
5500
5437
  onClick: openLink,
5501
- title: "Open in new window",
5438
+ title: "Ouvrir dans une nouvelle fenêtre",
5502
5439
  disabled: !url && !isActive,
5503
5440
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(OpenInNewRounded_default, { fontSize: "small" })
5504
- }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ButtonGroup, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
5441
+ }),
5442
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StyledIconButton, {
5443
+ size: "small",
5505
5444
  type: "button",
5506
5445
  onClick: removeLink,
5507
- title: "Remove link",
5446
+ title: "Supprimer le lien",
5508
5447
  disabled: !url && !isActive,
5509
5448
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.DeleteRounded_default, { fontSize: "small" })
5510
- }) })] })
5449
+ })
5511
5450
  ]
5512
5451
  });
5513
5452
  };
@@ -5554,6 +5493,7 @@ var LinkPopover = (0, react.forwardRef)(({ editor: providedEditor, hideWhenUnava
5554
5493
  selected: isActive,
5555
5494
  "data-disabled": !canSet,
5556
5495
  "aria-label": label,
5496
+ tooltip: label,
5557
5497
  onClick: handleClick,
5558
5498
  ...buttonProps,
5559
5499
  ref: setRefs,
@@ -5620,9 +5560,9 @@ var listIcons = {
5620
5560
  ] }), "ListTodo")
5621
5561
  };
5622
5562
  var listLabels = {
5623
- bulletList: "Bullet List",
5624
- orderedList: "Ordered List",
5625
- taskList: "Task List"
5563
+ bulletList: "Liste à puces",
5564
+ orderedList: "Liste numérotée",
5565
+ taskList: "Liste de tâches"
5626
5566
  };
5627
5567
  var LIST_SHORTCUT_KEYS = {
5628
5568
  bulletList: "mod+shift+8",
@@ -5947,7 +5887,15 @@ function shouldShowButton$2(props) {
5947
5887
  * Gets the formatted mark name
5948
5888
  */
5949
5889
  function getFormattedMarkName(type) {
5950
- return type.charAt(0).toUpperCase() + type.slice(1);
5890
+ switch (type) {
5891
+ case "bold": return "Gras";
5892
+ case "italic": return "Italique";
5893
+ case "strike": return "Barré";
5894
+ case "code": return "Code";
5895
+ case "underline": return "Souligné";
5896
+ case "superscript": return "Exposant";
5897
+ case "subscript": return "Indice";
5898
+ }
5951
5899
  }
5952
5900
  /**
5953
5901
  * Custom hook that provides mark functionality for Tiptap editor
@@ -6108,10 +6056,10 @@ var textAlignIcons = {
6108
6056
  justify: FormatAlignJustifyRounded_default
6109
6057
  };
6110
6058
  var textAlignLabels = {
6111
- left: "Align left",
6112
- center: "Align center",
6113
- right: "Align right",
6114
- justify: "Align justify"
6059
+ left: "Aligner à gauche",
6060
+ center: "Aligner au centre",
6061
+ right: "Aligner à droite",
6062
+ justify: "Justifier"
6115
6063
  };
6116
6064
  /**
6117
6065
  * Checks if text alignment can be performed in the current editor state
@@ -6307,8 +6255,8 @@ var UNDO_REDO_SHORTCUT_KEYS = {
6307
6255
  redo: "mod+shift+z"
6308
6256
  };
6309
6257
  var historyActionLabels = {
6310
- undo: "Undo",
6311
- redo: "Redo"
6258
+ undo: "Annuler",
6259
+ redo: "Rétablir"
6312
6260
  };
6313
6261
  var historyIcons = {
6314
6262
  undo: UndoRounded_default,
@@ -6481,22 +6429,6 @@ var UndoRedoButton = (0, react.forwardRef)(({ editor: providedEditor, action, te
6481
6429
  });
6482
6430
  UndoRedoButton.displayName = "UndoRedoButton";
6483
6431
  //#endregion
6484
- //#region src/tiptap/components/ui-primitive/spacer/spacer.tsx
6485
- function Spacer({ orientation = "horizontal", size, style = {}, ...props }) {
6486
- const computedStyle = {
6487
- ...style,
6488
- ...orientation === "horizontal" && !size && { flex: 1 },
6489
- ...size && {
6490
- width: orientation === "vertical" ? "1px" : size,
6491
- height: orientation === "horizontal" ? "1px" : size
6492
- }
6493
- };
6494
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
6495
- ...props,
6496
- style: computedStyle
6497
- });
6498
- }
6499
- //#endregion
6500
6432
  //#region src/tiptap/hooks/use-composed-ref.ts
6501
6433
  var updateRef = (ref, value) => {
6502
6434
  if (typeof ref === "function") ref(value);
@@ -6744,7 +6676,6 @@ ToolbarSeparator.displayName = "ToolbarSeparator";
6744
6676
  var FormattingControls = ({ editor }) => {
6745
6677
  const hasSuperscriptSubscript = editor.extensionManager.extensions.map((e) => e.name).some((name) => name === "subscript" || name === "superscript");
6746
6678
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
6747
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Spacer, {}),
6748
6679
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(ToolbarGroup, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(UndoRedoButton, { action: "undo" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(UndoRedoButton, { action: "redo" })] }),
6749
6680
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToolbarSeparator, {}),
6750
6681
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(ToolbarGroup, { children: [
@@ -6771,20 +6702,36 @@ var FormattingControls = ({ editor }) => {
6771
6702
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MarkButton, { type: "underline" }),
6772
6703
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(LinkPopover, {})
6773
6704
  ] }),
6705
+ hasSuperscriptSubscript ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToolbarSeparator, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(ToolbarGroup, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(MarkButton, { type: "superscript" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MarkButton, { type: "subscript" })] })] }) : null,
6774
6706
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToolbarSeparator, {}),
6775
- hasSuperscriptSubscript ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(ToolbarGroup, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(MarkButton, { type: "superscript" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MarkButton, { type: "subscript" })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToolbarSeparator, {})] }) : null,
6776
6707
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(ToolbarGroup, { children: [
6777
6708
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TextAlignButton, { align: "left" }),
6778
6709
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TextAlignButton, { align: "center" }),
6779
6710
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TextAlignButton, { align: "right" }),
6780
6711
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TextAlignButton, { align: "justify" })
6781
- ] }),
6782
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Spacer, {})
6712
+ ] })
6783
6713
  ] });
6784
6714
  };
6785
6715
  FormattingControls.displayName = "FormattingControls";
6786
6716
  //#endregion
6717
+ //#region src/tiptap/components/ui-primitive/spacer/spacer.tsx
6718
+ function Spacer({ orientation = "horizontal", size, style = {}, ...props }) {
6719
+ const computedStyle = {
6720
+ ...style,
6721
+ ...orientation === "horizontal" && !size && { flex: 1 },
6722
+ ...size && {
6723
+ width: orientation === "vertical" ? "1px" : size,
6724
+ height: orientation === "horizontal" ? "1px" : size
6725
+ }
6726
+ };
6727
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
6728
+ ...props,
6729
+ style: computedStyle
6730
+ });
6731
+ }
6732
+ //#endregion
6787
6733
  exports.FormattingControls = FormattingControls;
6734
+ exports.Spacer = Spacer;
6788
6735
  exports.Toolbar = Toolbar;
6789
6736
  exports.ToolbarGroup = ToolbarGroup;
6790
6737
  exports.ToolbarSeparator = ToolbarSeparator;
@@ -1,4 +1,5 @@
1
1
  export * from './components/ui-primitive/formatting-controls';
2
+ export * from './components/ui-primitive/spacer';
2
3
  export * from './components/ui-primitive/toolbar';
3
4
  //# sourceMappingURL=index.d.ts.map
4
5
 
@@ -1,4 +1,4 @@
1
- import { It as Tooltip, Nt as ToggleButton, W as InputBase, Zt as DeleteRounded_default, et as Menu, hn as clsx, j as Divider, ln as SvgIcon_default, mt as Stack, ot as Popover, tt as MenuItem, u as Badge } from "../src-G-BmjM2S.js";
1
+ import { G as InputBase, Lt as Tooltip, M as Divider, Pt as ToggleButton, Qt as DeleteRounded_default, Rt as Typography, U as IconButton, d as Badge, gn as clsx, ht as Stack, nt as MenuItem, st as Popover, t as src_exports, tt as Menu, un as SvgIcon_default } from "../src-B3iFugc4.js";
2
2
  import { Fragment, forwardRef, useCallback, useEffect, useMemo, useRef, useState } from "react";
3
3
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
4
4
  import { createSvgIcon } from "@mui/material/utils";
@@ -4345,7 +4345,7 @@ function useBlockquote(config) {
4345
4345
  return success;
4346
4346
  }, [editor, onToggled]),
4347
4347
  canToggle,
4348
- label: "Blockquote",
4348
+ label: "Citation en bloc",
4349
4349
  shortcutKeys: BLOCKQUOTE_SHORTCUT_KEY,
4350
4350
  Icon: TextSnippetIcon
4351
4351
  };
@@ -4420,7 +4420,7 @@ var BlockquoteButton = forwardRef(({ editor: providedEditor, text, hideWhenUnava
4420
4420
  disabled: !canToggle,
4421
4421
  "data-disabled": !canToggle,
4422
4422
  "aria-label": label,
4423
- tooltip: "Blockquote",
4423
+ tooltip: label,
4424
4424
  onClick: handleClick,
4425
4425
  ...buttonProps,
4426
4426
  ref,
@@ -4619,7 +4619,7 @@ function useCodeBlock(config) {
4619
4619
  return success;
4620
4620
  }, [editor, onToggled]),
4621
4621
  canToggle: canToggleState,
4622
- label: "Code Block",
4622
+ label: "Bloc de code",
4623
4623
  shortcutKeys: CODE_BLOCK_SHORTCUT_KEY,
4624
4624
  Icon: IntegrationInstructionIcon
4625
4625
  };
@@ -4656,7 +4656,7 @@ var CodeBlockButton = forwardRef(({ editor: providedEditor, text, hideWhenUnavai
4656
4656
  "data-disabled": !canToggle,
4657
4657
  tabIndex: -1,
4658
4658
  "aria-label": label,
4659
- tooltip: "Code Block",
4659
+ tooltip: label,
4660
4660
  onClick: handleClick,
4661
4661
  ...buttonProps,
4662
4662
  ref,
@@ -4932,7 +4932,7 @@ function useHeading(config) {
4932
4932
  onToggled
4933
4933
  ]),
4934
4934
  canToggle: canToggleState,
4935
- label: `Heading ${level}`,
4935
+ label: `Titre ${level}`,
4936
4936
  shortcutKeys: HEADING_SHORTCUT_KEYS[level],
4937
4937
  Icon: headingIcons[level]
4938
4938
  };
@@ -4976,9 +4976,11 @@ var HeadingMenuItem = forwardRef(({ editor: providedEditor, level, text, hideWhe
4976
4976
  ref,
4977
4977
  children: children ?? /* @__PURE__ */ jsxs(Fragment$1, { children: [
4978
4978
  /* @__PURE__ */ jsx(Icon, { fontSize: "small" }),
4979
- text && /* @__PURE__ */ jsx("span", {
4980
- className: "tiptap-button-text",
4981
- children: text
4979
+ text && /* @__PURE__ */ jsx(Typography, {
4980
+ component: "span",
4981
+ variant: "body2",
4982
+ sx: { ml: 1 },
4983
+ children: label
4982
4984
  }),
4983
4985
  showShortcut && /* @__PURE__ */ jsx(HeadingShortcutBadge, {
4984
4986
  level,
@@ -5088,7 +5090,7 @@ function useHeadingMenu(config) {
5088
5090
  isActive,
5089
5091
  canToggle: canToggleState,
5090
5092
  levels,
5091
- label: "Heading",
5093
+ label: "Titre",
5092
5094
  Icon: activeLevel ? headingIcons[activeLevel] : HeadingIcon
5093
5095
  };
5094
5096
  }
@@ -5110,7 +5112,7 @@ var HeadingMenu = forwardRef(({ editor: providedEditor, levels = [
5110
5112
  const { editor } = useTiptapEditor(providedEditor);
5111
5113
  const [anchorEl, setAnchorEl] = useState(null);
5112
5114
  const open = Boolean(anchorEl);
5113
- const { isVisible, isActive, canToggle, Icon } = useHeadingMenu({
5115
+ const { isVisible, isActive, canToggle, Icon, label } = useHeadingMenu({
5114
5116
  editor,
5115
5117
  levels,
5116
5118
  hideWhenUnavailable
@@ -5141,7 +5143,7 @@ var HeadingMenu = forwardRef(({ editor: providedEditor, levels = [
5141
5143
  "aria-controls": "heading-menu",
5142
5144
  "aria-label": "Format text as heading",
5143
5145
  "aria-expanded": open,
5144
- tooltip: "Heading",
5146
+ tooltip: label,
5145
5147
  onClick: handleClick,
5146
5148
  ...buttonProps,
5147
5149
  ref,
@@ -5340,7 +5342,7 @@ function useLinkPopover(config) {
5340
5342
  isVisible,
5341
5343
  canSet,
5342
5344
  isActive,
5343
- label: "Link",
5345
+ label: "Lien",
5344
5346
  Icon: LinkRounded_default,
5345
5347
  ...useLinkHandler({
5346
5348
  editor,
@@ -5349,77 +5351,6 @@ function useLinkPopover(config) {
5349
5351
  };
5350
5352
  }
5351
5353
  //#endregion
5352
- //#region ../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.mjs
5353
- /**
5354
- * Copyright 2022 Joe Bell. All rights reserved.
5355
- *
5356
- * This file is licensed to you under the Apache License, Version 2.0
5357
- * (the "License"); you may not use this file except in compliance with the
5358
- * License. You may obtain a copy of the License at
5359
- *
5360
- * http://www.apache.org/licenses/LICENSE-2.0
5361
- *
5362
- * Unless required by applicable law or agreed to in writing, software
5363
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
5364
- * WARRANTIES OR REPRESENTATIONS OF ANY KIND, either express or implied. See the
5365
- * License for the specific language governing permissions and limitations under
5366
- * the License.
5367
- */ var falsyToString = (value) => typeof value === "boolean" ? `${value}` : value === 0 ? "0" : value;
5368
- var cx = clsx;
5369
- var cva = (base, config) => (props) => {
5370
- var _config_compoundVariants;
5371
- if ((config === null || config === void 0 ? void 0 : config.variants) == null) return cx(base, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
5372
- const { variants, defaultVariants } = config;
5373
- const getVariantClassNames = Object.keys(variants).map((variant) => {
5374
- const variantProp = props === null || props === void 0 ? void 0 : props[variant];
5375
- const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];
5376
- if (variantProp === null) return null;
5377
- const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);
5378
- return variants[variant][variantKey];
5379
- });
5380
- const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param) => {
5381
- let [key, value] = param;
5382
- if (value === void 0) return acc;
5383
- acc[key] = value;
5384
- return acc;
5385
- }, {});
5386
- return cx(base, getVariantClassNames, config === null || config === void 0 ? void 0 : (_config_compoundVariants = config.compoundVariants) === null || _config_compoundVariants === void 0 ? void 0 : _config_compoundVariants.reduce((acc, param) => {
5387
- let { class: cvClass, className: cvClassName, ...compoundVariantOptions } = param;
5388
- return Object.entries(compoundVariantOptions).every((param) => {
5389
- let [key, value] = param;
5390
- return Array.isArray(value) ? value.includes({
5391
- ...defaultVariants,
5392
- ...propsWithoutUndefined
5393
- }[key]) : {
5394
- ...defaultVariants,
5395
- ...propsWithoutUndefined
5396
- }[key] === value;
5397
- }) ? [
5398
- ...acc,
5399
- cvClass,
5400
- cvClassName
5401
- ] : acc;
5402
- }, []), props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
5403
- };
5404
- //#endregion
5405
- //#region src/tiptap/components/ui-primitive/button-group/button-group.tsx
5406
- var buttonGroupVariants = cva("tiptap-button-group", {
5407
- variants: { orientation: {
5408
- horizontal: "tiptap-button-group-horizontal",
5409
- vertical: "tiptap-button-group-vertical"
5410
- } },
5411
- defaultVariants: { orientation: "horizontal" }
5412
- });
5413
- function ButtonGroup({ className, orientation, ...props }) {
5414
- return /* @__PURE__ */ jsx("div", {
5415
- role: "group",
5416
- "data-slot": "tiptap-button-group",
5417
- "data-orientation": orientation,
5418
- className: cn(buttonGroupVariants({ orientation }), className),
5419
- ...props
5420
- });
5421
- }
5422
- //#endregion
5423
5354
  //#region src/tiptap/components/ui/link-popover/link-popover.tsx
5424
5355
  /**
5425
5356
  * Link button component for triggering the link popover
@@ -5430,14 +5361,16 @@ var LinkButton = forwardRef(({ className, children, ...props }, ref) => {
5430
5361
  className,
5431
5362
  role: "button",
5432
5363
  tabIndex: -1,
5433
- "aria-label": "Link",
5434
- tooltip: "Link",
5435
5364
  ref,
5436
5365
  ...props,
5437
5366
  children: children || /* @__PURE__ */ jsx(LinkRounded_default, { fontSize: "small" })
5438
5367
  });
5439
5368
  });
5440
5369
  LinkButton.displayName = "LinkButton";
5370
+ var StyledIconButton = (0, src_exports.styled)(IconButton)(({ theme }) => ({
5371
+ borderRadius: theme.shape.borderRadius,
5372
+ "& .MuiTouchRipple-root .MuiTouchRipple-child": { borderRadius: theme.shape.borderRadius }
5373
+ }));
5441
5374
  /**
5442
5375
  * Main content component for the link popover
5443
5376
  */
@@ -5458,7 +5391,7 @@ var LinkMain = ({ url, setUrl, setLink, removeLink, openLink, isActive }) => {
5458
5391
  children: [
5459
5392
  /* @__PURE__ */ jsx(InputBase, {
5460
5393
  type: "url",
5461
- placeholder: "Paste a link...",
5394
+ placeholder: "Coller un lien...",
5462
5395
  value: url,
5463
5396
  onChange: (e) => setUrl(e.target.value),
5464
5397
  onKeyDown: handleKeyDown,
@@ -5472,31 +5405,35 @@ var LinkMain = ({ url, setUrl, setLink, removeLink, openLink, isActive }) => {
5472
5405
  fontSize: "0.875rem"
5473
5406
  }
5474
5407
  }),
5475
- /* @__PURE__ */ jsx(ButtonGroup, { children: /* @__PURE__ */ jsx(Button, {
5408
+ /* @__PURE__ */ jsx(StyledIconButton, {
5409
+ size: "small",
5476
5410
  type: "button",
5477
5411
  onClick: setLink,
5478
- title: "Apply link",
5412
+ title: "Appliquer le lien",
5479
5413
  disabled: !url && !isActive,
5480
5414
  children: /* @__PURE__ */ jsx(KeyboardReturnRounded_default, { fontSize: "small" })
5481
- }) }),
5415
+ }),
5482
5416
  /* @__PURE__ */ jsx(Divider, {
5483
5417
  orientation: "vertical",
5484
5418
  flexItem: true,
5485
5419
  sx: { my: .5 }
5486
5420
  }),
5487
- /* @__PURE__ */ jsxs(ButtonGroup, { children: [/* @__PURE__ */ jsx(ButtonGroup, { children: /* @__PURE__ */ jsx(Button, {
5421
+ /* @__PURE__ */ jsx(StyledIconButton, {
5422
+ size: "small",
5488
5423
  type: "button",
5489
5424
  onClick: openLink,
5490
- title: "Open in new window",
5425
+ title: "Ouvrir dans une nouvelle fenêtre",
5491
5426
  disabled: !url && !isActive,
5492
5427
  children: /* @__PURE__ */ jsx(OpenInNewRounded_default, { fontSize: "small" })
5493
- }) }), /* @__PURE__ */ jsx(ButtonGroup, { children: /* @__PURE__ */ jsx(Button, {
5428
+ }),
5429
+ /* @__PURE__ */ jsx(StyledIconButton, {
5430
+ size: "small",
5494
5431
  type: "button",
5495
5432
  onClick: removeLink,
5496
- title: "Remove link",
5433
+ title: "Supprimer le lien",
5497
5434
  disabled: !url && !isActive,
5498
5435
  children: /* @__PURE__ */ jsx(DeleteRounded_default, { fontSize: "small" })
5499
- }) })] })
5436
+ })
5500
5437
  ]
5501
5438
  });
5502
5439
  };
@@ -5543,6 +5480,7 @@ var LinkPopover = forwardRef(({ editor: providedEditor, hideWhenUnavailable = fa
5543
5480
  selected: isActive,
5544
5481
  "data-disabled": !canSet,
5545
5482
  "aria-label": label,
5483
+ tooltip: label,
5546
5484
  onClick: handleClick,
5547
5485
  ...buttonProps,
5548
5486
  ref: setRefs,
@@ -5609,9 +5547,9 @@ var listIcons = {
5609
5547
  ] }), "ListTodo")
5610
5548
  };
5611
5549
  var listLabels = {
5612
- bulletList: "Bullet List",
5613
- orderedList: "Ordered List",
5614
- taskList: "Task List"
5550
+ bulletList: "Liste à puces",
5551
+ orderedList: "Liste numérotée",
5552
+ taskList: "Liste de tâches"
5615
5553
  };
5616
5554
  var LIST_SHORTCUT_KEYS = {
5617
5555
  bulletList: "mod+shift+8",
@@ -5936,7 +5874,15 @@ function shouldShowButton$2(props) {
5936
5874
  * Gets the formatted mark name
5937
5875
  */
5938
5876
  function getFormattedMarkName(type) {
5939
- return type.charAt(0).toUpperCase() + type.slice(1);
5877
+ switch (type) {
5878
+ case "bold": return "Gras";
5879
+ case "italic": return "Italique";
5880
+ case "strike": return "Barré";
5881
+ case "code": return "Code";
5882
+ case "underline": return "Souligné";
5883
+ case "superscript": return "Exposant";
5884
+ case "subscript": return "Indice";
5885
+ }
5940
5886
  }
5941
5887
  /**
5942
5888
  * Custom hook that provides mark functionality for Tiptap editor
@@ -6097,10 +6043,10 @@ var textAlignIcons = {
6097
6043
  justify: FormatAlignJustifyRounded_default
6098
6044
  };
6099
6045
  var textAlignLabels = {
6100
- left: "Align left",
6101
- center: "Align center",
6102
- right: "Align right",
6103
- justify: "Align justify"
6046
+ left: "Aligner à gauche",
6047
+ center: "Aligner au centre",
6048
+ right: "Aligner à droite",
6049
+ justify: "Justifier"
6104
6050
  };
6105
6051
  /**
6106
6052
  * Checks if text alignment can be performed in the current editor state
@@ -6296,8 +6242,8 @@ var UNDO_REDO_SHORTCUT_KEYS = {
6296
6242
  redo: "mod+shift+z"
6297
6243
  };
6298
6244
  var historyActionLabels = {
6299
- undo: "Undo",
6300
- redo: "Redo"
6245
+ undo: "Annuler",
6246
+ redo: "Rétablir"
6301
6247
  };
6302
6248
  var historyIcons = {
6303
6249
  undo: UndoRounded_default,
@@ -6470,22 +6416,6 @@ var UndoRedoButton = forwardRef(({ editor: providedEditor, action, text, hideWhe
6470
6416
  });
6471
6417
  UndoRedoButton.displayName = "UndoRedoButton";
6472
6418
  //#endregion
6473
- //#region src/tiptap/components/ui-primitive/spacer/spacer.tsx
6474
- function Spacer({ orientation = "horizontal", size, style = {}, ...props }) {
6475
- const computedStyle = {
6476
- ...style,
6477
- ...orientation === "horizontal" && !size && { flex: 1 },
6478
- ...size && {
6479
- width: orientation === "vertical" ? "1px" : size,
6480
- height: orientation === "horizontal" ? "1px" : size
6481
- }
6482
- };
6483
- return /* @__PURE__ */ jsx("div", {
6484
- ...props,
6485
- style: computedStyle
6486
- });
6487
- }
6488
- //#endregion
6489
6419
  //#region src/tiptap/hooks/use-composed-ref.ts
6490
6420
  var updateRef = (ref, value) => {
6491
6421
  if (typeof ref === "function") ref(value);
@@ -6733,7 +6663,6 @@ ToolbarSeparator.displayName = "ToolbarSeparator";
6733
6663
  var FormattingControls = ({ editor }) => {
6734
6664
  const hasSuperscriptSubscript = editor.extensionManager.extensions.map((e) => e.name).some((name) => name === "subscript" || name === "superscript");
6735
6665
  return /* @__PURE__ */ jsxs(Fragment$1, { children: [
6736
- /* @__PURE__ */ jsx(Spacer, {}),
6737
6666
  /* @__PURE__ */ jsxs(ToolbarGroup, { children: [/* @__PURE__ */ jsx(UndoRedoButton, { action: "undo" }), /* @__PURE__ */ jsx(UndoRedoButton, { action: "redo" })] }),
6738
6667
  /* @__PURE__ */ jsx(ToolbarSeparator, {}),
6739
6668
  /* @__PURE__ */ jsxs(ToolbarGroup, { children: [
@@ -6760,19 +6689,34 @@ var FormattingControls = ({ editor }) => {
6760
6689
  /* @__PURE__ */ jsx(MarkButton, { type: "underline" }),
6761
6690
  /* @__PURE__ */ jsx(LinkPopover, {})
6762
6691
  ] }),
6692
+ hasSuperscriptSubscript ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(ToolbarSeparator, {}), /* @__PURE__ */ jsxs(ToolbarGroup, { children: [/* @__PURE__ */ jsx(MarkButton, { type: "superscript" }), /* @__PURE__ */ jsx(MarkButton, { type: "subscript" })] })] }) : null,
6763
6693
  /* @__PURE__ */ jsx(ToolbarSeparator, {}),
6764
- hasSuperscriptSubscript ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs(ToolbarGroup, { children: [/* @__PURE__ */ jsx(MarkButton, { type: "superscript" }), /* @__PURE__ */ jsx(MarkButton, { type: "subscript" })] }), /* @__PURE__ */ jsx(ToolbarSeparator, {})] }) : null,
6765
6694
  /* @__PURE__ */ jsxs(ToolbarGroup, { children: [
6766
6695
  /* @__PURE__ */ jsx(TextAlignButton, { align: "left" }),
6767
6696
  /* @__PURE__ */ jsx(TextAlignButton, { align: "center" }),
6768
6697
  /* @__PURE__ */ jsx(TextAlignButton, { align: "right" }),
6769
6698
  /* @__PURE__ */ jsx(TextAlignButton, { align: "justify" })
6770
- ] }),
6771
- /* @__PURE__ */ jsx(Spacer, {})
6699
+ ] })
6772
6700
  ] });
6773
6701
  };
6774
6702
  FormattingControls.displayName = "FormattingControls";
6775
6703
  //#endregion
6776
- export { FormattingControls, Toolbar, ToolbarGroup, ToolbarSeparator };
6704
+ //#region src/tiptap/components/ui-primitive/spacer/spacer.tsx
6705
+ function Spacer({ orientation = "horizontal", size, style = {}, ...props }) {
6706
+ const computedStyle = {
6707
+ ...style,
6708
+ ...orientation === "horizontal" && !size && { flex: 1 },
6709
+ ...size && {
6710
+ width: orientation === "vertical" ? "1px" : size,
6711
+ height: orientation === "horizontal" ? "1px" : size
6712
+ }
6713
+ };
6714
+ return /* @__PURE__ */ jsx("div", {
6715
+ ...props,
6716
+ style: computedStyle
6717
+ });
6718
+ }
6719
+ //#endregion
6720
+ export { FormattingControls, Spacer, Toolbar, ToolbarGroup, ToolbarSeparator };
6777
6721
 
6778
6722
  //# sourceMappingURL=index.es.js.map
package/dist/ui.css CHANGED
@@ -1,4 +1,4 @@
1
- @charset "UTF-8";:root {
1
+ :root {
2
2
  --toastify-color-light: var(--theme-palette-common-white);
3
3
  --toastify-color-dark: var(--theme-palette-common-black);
4
4
  --toastify-color-info: var(--theme-palette-info-main);
@@ -11,115 +11,7 @@
11
11
  --toastify-text-color-light: var(--theme-palette-text-primary);
12
12
  --toastify-text-color-dark: var(--theme-palette-common-white);
13
13
  }
14
-
15
- .tiptap-button-group {
16
- display: flex;
17
- width: fit-content;
18
- align-items: stretch;
19
- /* nested tiptap-button-group gets a gap */
20
- }
21
- .tiptap-button-group:has(> [data-slot=tiptap-button-group]) {
22
- gap: 0.125rem;
23
- }
24
- .tiptap-button-group {
25
- /* focus-visible children stack correctly */
26
- }
27
- .tiptap-button-group > *:focus-visible {
28
- position: relative;
29
- z-index: 10;
30
- }
31
- .tiptap-button-group {
32
- /* select trigger without explicit width becomes fit-content */
33
- }
34
- .tiptap-button-group > [data-slot=select-trigger]:not([class*=w-]) {
35
- width: fit-content;
36
- }
37
- .tiptap-button-group {
38
- /* input children fill remaining space */
39
- }
40
- .tiptap-button-group > input {
41
- flex: 1;
42
- }
43
-
44
- /* ─── Horizontal ────────────────────────────────────────── */
45
- .tiptap-button-group-horizontal {
46
- /* all [data-slot] children: remove right radius */
47
- }
48
- .tiptap-button-group-horizontal > [data-slot] {
49
- border-top-right-radius: 0;
50
- border-bottom-right-radius: 0;
51
- }
52
- .tiptap-button-group-horizontal {
53
- /* last [data-slot] child: restore right radius */
54
- }
55
- .tiptap-button-group-horizontal > [data-slot]:not(:has(~ [data-slot])) {
56
- border-top-right-radius: var(--tt-radius-lg) !important;
57
- border-bottom-right-radius: var(--tt-radius-lg) !important;
58
- }
59
- .tiptap-button-group-horizontal {
60
- /* non-first [data-slot] children: remove left radius + left border */
61
- }
62
- .tiptap-button-group-horizontal > [data-slot] ~ [data-slot] {
63
- border-top-left-radius: 0;
64
- border-bottom-left-radius: 0;
65
- border-left-width: 0;
66
- }
67
- .tiptap-button-group-horizontal {
68
- /* select trigger last of type when followed by hidden select */
69
- }
70
- .tiptap-button-group-horizontal:has(select[aria-hidden=true]:last-child) > [data-slot=select-trigger]:last-of-type {
71
- border-top-right-radius: var(--tt-radius-lg);
72
- border-bottom-right-radius: var(--tt-radius-lg);
73
- }
74
-
75
- /* ─── Vertical ──────────────────────────────────────────── */
76
- .tiptap-button-group-vertical {
77
- flex-direction: column;
78
- /* all [data-slot] children: remove bottom radius */
79
- }
80
- .tiptap-button-group-vertical > [data-slot] {
81
- border-bottom-left-radius: 0;
82
- border-bottom-right-radius: 0;
83
- }
84
- .tiptap-button-group-vertical {
85
- /* last [data-slot] child: restore bottom radius */
86
- }
87
- .tiptap-button-group-vertical > [data-slot]:not(:has(~ [data-slot])) {
88
- border-bottom-left-radius: var(--tt-radius-lg) !important;
89
- border-bottom-right-radius: var(--tt-radius-lg) !important;
90
- }
91
- .tiptap-button-group-vertical {
92
- /* non-first [data-slot] children: remove top radius + top border */
93
- }
94
- .tiptap-button-group-vertical > [data-slot] ~ [data-slot] {
95
- border-top-left-radius: 0;
96
- border-top-right-radius: 0;
97
- border-top-width: 0;
98
- }
99
-
100
- /* ─── Separator ──────────────────────────────────────────── */
101
- .tiptap-button-group-separator {
102
- position: relative;
103
- align-self: stretch;
104
- }
105
-
106
- .tiptap-button-group-separator[data-orientation=horizontal] {
107
- margin-left: 1px;
108
- margin-right: 1px;
109
- }
110
-
111
- .tiptap-button-group-separator[data-orientation=horizontal] {
112
- width: auto;
113
- }
114
-
115
- .tiptap-button-group-separator[data-orientation=vertical] {
116
- margin-top: 1px;
117
- margin-bottom: 1px;
118
- }
119
-
120
- .tiptap-button-group-separator[data-orientation=vertical] {
121
- height: auto;
122
- }.tiptap-link-input {
14
+ .tiptap-link-input {
123
15
  font-size: 0.875rem;
124
16
  border: none;
125
17
  /* Clamp the input */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cgi-learning-hub/ui",
3
- "version": "1.14.0-dev.1785319387",
3
+ "version": "1.14.0-dev.1785338327",
4
4
  "description": "React component library for Hub's design system, built on Material UI with custom and extended components.",
5
5
  "keywords": [
6
6
  "cgi-learning-hub",