@donotdev/components 0.2.2 → 0.2.3

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 (122) hide show
  1. package/dist/{CarouselContent-F4JSFIQD.js → CarouselContent-MQPZBYOS.js} +1 -1
  2. package/dist/CodeContent-64D4U3NM.js +2 -0
  3. package/dist/{CrawlContent-6LR66N57.js → CrawlContent-5Z6AVDDW.js} +1 -1
  4. package/dist/{MarqueeContent-NBXB2YLR.js → MarqueeContent-KAYCOUNM.js} +1 -1
  5. package/dist/advanced/Bento/Bento.d.ts.map +1 -1
  6. package/dist/advanced/Carousel/CarouselContent.d.ts.map +1 -1
  7. package/dist/advanced/Carousel/CarouselContent.js +7 -4
  8. package/dist/advanced/Code/CodeContent.js +3 -5
  9. package/dist/advanced/Crawl/utils/parseHtml.d.ts.map +1 -1
  10. package/dist/advanced/Crawl/utils/parseHtml.js +9 -2
  11. package/dist/advanced/ImageGallery/GalleryArrows.d.ts +24 -0
  12. package/dist/advanced/ImageGallery/GalleryArrows.d.ts.map +1 -0
  13. package/dist/advanced/ImageGallery/GalleryArrows.js +13 -0
  14. package/dist/advanced/ImageGallery/ImageGallery.d.ts +6 -4
  15. package/dist/advanced/ImageGallery/ImageGallery.d.ts.map +1 -1
  16. package/dist/advanced/ImageGallery/ImageGallery.js +116 -147
  17. package/dist/advanced/ImageGallery/LightboxViewer.d.ts +39 -0
  18. package/dist/advanced/ImageGallery/LightboxViewer.d.ts.map +1 -0
  19. package/dist/advanced/ImageGallery/LightboxViewer.js +138 -0
  20. package/dist/advanced/ImageGallery/lightboxGestures.d.ts +28 -0
  21. package/dist/advanced/ImageGallery/lightboxGestures.d.ts.map +1 -0
  22. package/dist/advanced/ImageGallery/lightboxGestures.js +425 -0
  23. package/dist/advanced/ImageGallery/protectImages.d.ts +19 -0
  24. package/dist/advanced/ImageGallery/protectImages.d.ts.map +1 -0
  25. package/dist/advanced/ImageGallery/protectImages.js +10 -0
  26. package/dist/advanced/ImageGallery/snapStrip.d.ts +29 -0
  27. package/dist/advanced/ImageGallery/snapStrip.d.ts.map +1 -0
  28. package/dist/advanced/ImageGallery/snapStrip.js +74 -0
  29. package/dist/advanced/Marquee/MarqueeContent.d.ts.map +1 -1
  30. package/dist/advanced/Marquee/MarqueeContent.js +7 -6
  31. package/dist/advanced/Reveal/Reveal.d.ts.map +1 -1
  32. package/dist/advanced/Reveal/Reveal.js +3 -2
  33. package/dist/advanced/Roadmap/RoadmapContent.d.ts.map +1 -1
  34. package/dist/advanced/Roadmap/RoadmapContent.js +2 -1
  35. package/dist/atomic/ActionButton/index.d.ts +7 -3
  36. package/dist/atomic/ActionButton/index.d.ts.map +1 -1
  37. package/dist/atomic/ActionButton/index.js +2 -2
  38. package/dist/atomic/Badge/index.d.ts +1 -1
  39. package/dist/atomic/Button/index.d.ts +1 -1
  40. package/dist/atomic/Calendar/index.d.ts.map +1 -1
  41. package/dist/atomic/Calendar/index.js +1 -0
  42. package/dist/atomic/Card/cover.d.ts +13 -8
  43. package/dist/atomic/Card/cover.d.ts.map +1 -1
  44. package/dist/atomic/Card/cover.js +13 -6
  45. package/dist/atomic/Card/index.d.ts +17 -8
  46. package/dist/atomic/Card/index.d.ts.map +1 -1
  47. package/dist/atomic/Card/index.js +8 -4
  48. package/dist/atomic/ColorPicker/index.d.ts.map +1 -1
  49. package/dist/atomic/ColorPicker/index.js +3 -2
  50. package/dist/atomic/Combobox/index.d.ts.map +1 -1
  51. package/dist/atomic/Combobox/index.js +3 -2
  52. package/dist/atomic/Grid/index.d.ts.map +1 -1
  53. package/dist/atomic/Grid/index.js +11 -6
  54. package/dist/atomic/HeroSection/index.d.ts +1 -1
  55. package/dist/atomic/Icons/Partner/providerIcons.d.ts.map +1 -1
  56. package/dist/atomic/Icons/Partner/providerIcons.js +6 -1
  57. package/dist/atomic/NavigationMenu/index.d.ts.map +1 -1
  58. package/dist/atomic/NavigationMenu/index.js +2 -2
  59. package/dist/atomic/PasswordInput/index.d.ts +1 -1
  60. package/dist/atomic/PasswordInput/index.d.ts.map +1 -1
  61. package/dist/atomic/PasswordInput/index.js +4 -2
  62. package/dist/atomic/Rating/index.d.ts +1 -1
  63. package/dist/atomic/Stepper/index.d.ts +1 -1
  64. package/dist/atomic/Switch/index.d.ts +14 -11
  65. package/dist/atomic/Switch/index.d.ts.map +1 -1
  66. package/dist/atomic/Switch/index.js +21 -10
  67. package/dist/atomic/Table/editing.d.ts +109 -0
  68. package/dist/atomic/Table/editing.d.ts.map +1 -0
  69. package/dist/atomic/Table/editing.js +170 -0
  70. package/dist/atomic/Table/index.d.ts +42 -1
  71. package/dist/atomic/Table/index.d.ts.map +1 -1
  72. package/dist/atomic/Table/index.js +159 -54
  73. package/dist/atomic/Tabs/index.d.ts +1 -1
  74. package/dist/atomic/Text/index.d.ts +0 -4
  75. package/dist/atomic/Text/index.d.ts.map +1 -1
  76. package/dist/atomic/Text/index.js +12 -5
  77. package/dist/atomic/Toggle/index.d.ts +1 -1
  78. package/dist/atomic/index.d.ts +3 -2
  79. package/dist/atomic/index.d.ts.map +1 -1
  80. package/dist/atomic/index.js +1 -0
  81. package/dist/chunk-3WHSDDVJ.js +1 -0
  82. package/dist/chunk-CIBFOOWV.js +1 -0
  83. package/dist/chunk-JAV36ZQC.js +3 -0
  84. package/dist/hooks/useSwipeToClose.d.ts.map +1 -1
  85. package/dist/hooks/useSwipeToClose.js +9 -2
  86. package/dist/index.js +9 -6
  87. package/dist/styles/index.css +431 -119
  88. package/dist/symbol-index.json +1 -1
  89. package/dist/types.d.ts.map +1 -1
  90. package/dist/utils/cssVars.d.ts +22 -0
  91. package/dist/utils/cssVars.d.ts.map +1 -0
  92. package/dist/utils/cssVars.js +10 -0
  93. package/dist/utils/index.d.ts +2 -0
  94. package/dist/utils/index.d.ts.map +1 -1
  95. package/dist/utils/index.js +2 -0
  96. package/dist/utils/intersectionObserver.d.ts.map +1 -1
  97. package/dist/utils/intersectionObserver.js +4 -1
  98. package/dist/utils/linkComponent.d.ts +26 -0
  99. package/dist/utils/linkComponent.d.ts.map +1 -0
  100. package/dist/utils/linkComponent.js +37 -0
  101. package/dist/utils/responsiveImage.d.ts +55 -0
  102. package/dist/utils/responsiveImage.d.ts.map +1 -0
  103. package/dist/utils/responsiveImage.js +45 -0
  104. package/dist/utils/variants.d.ts +1 -1
  105. package/guidelines/COMPONENTS.md +2 -1
  106. package/package.json +1 -1
  107. package/dist/CarouselContent-OQEW3MTR.css +0 -1
  108. package/dist/CarouselContent-UJARFDSE.js +0 -1
  109. package/dist/CodeContent-7KN6DQT2.js +0 -2
  110. package/dist/CodeContent-ENVN76NP.css +0 -1
  111. package/dist/CodeContent-JLL6BLG2.js +0 -2
  112. package/dist/CodeContent-NMM2R33O.js +0 -2
  113. package/dist/CodeContent-S3BDX46F.js +0 -2
  114. package/dist/MarqueeContent-AL2RBZAP.css +0 -1
  115. package/dist/MarqueeContent-EKASHCRG.js +0 -1
  116. package/dist/chunk-2CNNVCFI.js +0 -1
  117. package/dist/chunk-3IECHFZB.js +0 -3
  118. package/dist/chunk-6UB4NXNR.js +0 -3
  119. package/dist/chunk-E7SJFHOC.js +0 -3
  120. package/dist/chunk-EOCKFSHC.js +0 -1
  121. package/dist/chunk-FA4BDD6N.js +0 -1
  122. package/dist/chunk-RIB7YURO.js +0 -3
@@ -1,14 +1,5 @@
1
- /**
2
- * @fileoverview Switch component
3
- * @description Accessible switch component built on Radix UI primitives with semantic color variants.
4
- * Supports optional labels for binary choices (e.g., Manual/Automatic).
5
- *
6
- * @version 0.1.0
7
- * @since 0.0.1
8
- * @author AMBROISE PARK Consulting
9
- */
1
+ import type { ComponentProps, ReactNode } from 'react';
10
2
  import * as SwitchPrimitives from '@radix-ui/react-switch';
11
- import type { ComponentProps } from 'react';
12
3
  import { SwitchPrimitive } from './SwitchPrimitive';
13
4
  import { CONTROL_VARIANT } from '../../utils/constants';
14
5
  import type { ControlVariant } from '../../utils/constants';
@@ -21,6 +12,10 @@ export interface SwitchProps extends ComponentProps<typeof SwitchPrimitives.Root
21
12
  uncheckedLabel?: string;
22
13
  /** Label for checked state (e.g., "Automatic") */
23
14
  checkedLabel?: string;
15
+ /**
16
+ * Label after the switch, like Checkbox: `[switch] label`, clickable.
17
+ */
18
+ label?: ReactNode;
24
19
  }
25
20
  /**
26
21
  * Accessible switch control with semantic color variants.
@@ -32,6 +27,14 @@ export interface SwitchProps extends ComponentProps<typeof SwitchPrimitives.Root
32
27
  * // Simple switch without labels
33
28
  * <Switch checked={enabled} onCheckedChange={setEnabled} variant="success" />
34
29
  *
30
+ * // Form boolean: [switch] label, track muted while off, primary while on
31
+ * <Switch
32
+ * checked={restock}
33
+ * onCheckedChange={setRestock}
34
+ * label="Remettre en stock à l'annulation"
35
+ * variant={restock ? 'primary' : 'muted'}
36
+ * />
37
+ *
35
38
  * // Switch with labels (Manual/Automatic)
36
39
  * <Switch
37
40
  * checked={isAutomatic}
@@ -44,7 +47,7 @@ export interface SwitchProps extends ComponentProps<typeof SwitchPrimitives.Root
44
47
  * @param {SwitchProps} props - The props for the switch
45
48
  * @returns {JSX.Element} The rendered switch
46
49
  */
47
- declare const Switch: ({ className, variant, uncheckedLabel, checkedLabel, checked, ...props }: SwitchProps) => import("react").JSX.Element;
50
+ declare const Switch: ({ className, variant, uncheckedLabel, checkedLabel, checked, label, id, ...props }: SwitchProps) => import("react").JSX.Element;
48
51
  export default Switch;
49
52
  export { SwitchPrimitive, CONTROL_VARIANT as SWITCH_VARIANT };
50
53
  export type { ControlVariant as SwitchVariant };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atomic/Switch/index.tsx"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AAEH,OAAO,KAAK,gBAAgB,MAAM,wBAAwB,CAAC;AAE3D,OAAO,KAAK,EAAE,cAAc,EAAa,MAAM,OAAO,CAAC;AAEvD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,e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,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAoBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,QAAA,MAAM,MAAM,GAAI,oFASb,WAAW,gCAiDb,CAAC;AAEF,eAAe,MAAM,CAAC;AACtB,OAAO,EAAE,eAAe,EAAE,eAAe,IAAI,cAAc,EAAE,CAAC;AAC9D,YAAY,EAAE,cAAc,IAAI,aAAa,EAAE,CAAC"}
@@ -9,11 +9,14 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
9
  * @since 0.0.1
10
10
  * @author AMBROISE PARK Consulting
11
11
  */
12
+ import { useId } from 'react';
12
13
  import * as SwitchPrimitives from '@radix-ui/react-switch';
13
14
  import { cva } from 'class-variance-authority';
14
15
  import { SwitchPrimitive } from './SwitchPrimitive';
15
16
  import { CONTROL_VARIANT } from '../../utils/constants';
16
17
  import { cn, getVariantDataAttrs } from '../../utils/helpers';
18
+ import Label from '../Label';
19
+ import Stack from '../Stack';
17
20
  import './Switch.css';
18
21
  const switchVariants = cva('dndev-switch', {
19
22
  variants: {
@@ -42,6 +45,14 @@ const switchVariants = cva('dndev-switch', {
42
45
  * // Simple switch without labels
43
46
  * <Switch checked={enabled} onCheckedChange={setEnabled} variant="success" />
44
47
  *
48
+ * // Form boolean: [switch] label, track muted while off, primary while on
49
+ * <Switch
50
+ * checked={restock}
51
+ * onCheckedChange={setRestock}
52
+ * label="Remettre en stock à l'annulation"
53
+ * variant={restock ? 'primary' : 'muted'}
54
+ * />
55
+ *
45
56
  * // Switch with labels (Manual/Automatic)
46
57
  * <Switch
47
58
  * checked={isAutomatic}
@@ -54,18 +65,18 @@ const switchVariants = cva('dndev-switch', {
54
65
  * @param {SwitchProps} props - The props for the switch
55
66
  * @returns {JSX.Element} The rendered switch
56
67
  */
57
- const Switch = ({ className, variant, uncheckedLabel, checkedLabel, checked, ...props }) => {
68
+ const Switch = ({ className, variant, uncheckedLabel, checkedLabel, checked, label, id, ...props }) => {
69
+ const generatedId = useId();
70
+ const switchId = id ?? generatedId;
58
71
  const variantAttrs = getVariantDataAttrs({ variant });
59
72
  const hasLabels = uncheckedLabel || checkedLabel;
60
- const switchElement = (_jsx(SwitchPrimitives.Root, { className: cn(switchVariants({ variant }), className), ...variantAttrs, checked: checked, ...props, children: _jsx(SwitchPrimitives.Thumb, { className: cn('dndev-switch-thumb') }) }));
61
- // If no labels, return just the switch
62
- if (!hasLabels) {
63
- return switchElement;
64
- }
65
- // With labels: render [uncheckedLabel] [Switch] [checkedLabel]
66
- // Add data-checked attribute to container for CSS styling
67
- const isChecked = checked ?? false;
68
- return (_jsxs("div", { className: "dndev-switch-with-labels", "data-checked": isChecked ? 'true' : 'false', children: [uncheckedLabel && (_jsx("span", { className: "dndev-switch-label dndev-switch-label-unchecked", children: uncheckedLabel })), switchElement, checkedLabel && (_jsx("span", { className: "dndev-switch-label dndev-switch-label-checked", children: checkedLabel }))] }));
73
+ const switchElement = (_jsx(SwitchPrimitives.Root, { className: cn(switchVariants({ variant }), className), ...variantAttrs, id: switchId, checked: checked, ...props, children: _jsx(SwitchPrimitives.Thumb, { className: cn('dndev-switch-thumb') }) }));
74
+ // On/off texts around the switch: [uncheckedLabel] [switch] [checkedLabel]
75
+ const control = hasLabels ? (_jsxs("div", { className: "dndev-switch-with-labels", "data-checked": checked ? 'true' : 'false', children: [uncheckedLabel && (_jsx("span", { className: "dndev-switch-label dndev-switch-label-unchecked", children: uncheckedLabel })), switchElement, checkedLabel && (_jsx("span", { className: "dndev-switch-label dndev-switch-label-checked", children: checkedLabel }))] })) : (switchElement);
76
+ if (!label)
77
+ return control;
78
+ // Label after the control, clickable (same layout as Checkbox)
79
+ return (_jsxs(Stack, { direction: "row", align: "center", gap: "tight", className: "dndev-switch-field", children: [control, _jsx(Label, { htmlFor: switchId, children: label })] }));
69
80
  };
70
81
  export default Switch;
71
82
  export { SwitchPrimitive, CONTROL_VARIANT as SWITCH_VARIANT };
@@ -0,0 +1,109 @@
1
+ import type { ReactElement, RefObject } from 'react';
2
+ /** One choice of a `select` cell editor. */
3
+ export interface TableCellOption {
4
+ /** Stored value. */
5
+ value: string;
6
+ /** Displayed label (already translated). */
7
+ label: string;
8
+ }
9
+ /**
10
+ * How a column's cells are edited when the DataTable is `editable`. Columns
11
+ * without `edit` stay read-only.
12
+ *
13
+ * - `text`: free text; empty = `null`.
14
+ * - `number`: decimal number (`12.5` or `12,5`); empty = `null`.
15
+ * - `select`: one of `options` (enums, references). Pasted text matches an
16
+ * option's value or label, case-insensitive.
17
+ *
18
+ * A value that does not parse (pasted `abc` in a number column, an unknown
19
+ * option) is kept as typed and its cell is flagged `data-invalid`, so the save
20
+ * fails on it instead of dropping it silently.
21
+ */
22
+ export interface TableCellEdit {
23
+ type: 'text' | 'number' | 'select';
24
+ /** Choices of a `select` editor. */
25
+ options?: readonly TableCellOption[];
26
+ }
27
+ /**
28
+ * Edited values not saved yet: `{ [rowId]: { [columnKey]: value } }`. Only cells
29
+ * that differ from the row hold an entry; a row without changes has no key.
30
+ */
31
+ export type TablePendingChanges = Record<string, Record<string, unknown>>;
32
+ /** Labels of the bulk edit bar. `{{count}}` is replaced in `selected`. */
33
+ export interface DataTableEditLabels {
34
+ /** @default '{{count}} selected' */
35
+ selected?: string;
36
+ /** Field picker. @default 'Field' */
37
+ field?: string;
38
+ /** Value input. @default 'Value' */
39
+ value?: string;
40
+ /** @default 'Apply to selected' */
41
+ apply?: string;
42
+ }
43
+ /** Defaults of {@link DataTableEditLabels}. */
44
+ export declare const DEFAULT_EDIT_LABELS: Required<DataTableEditLabels>;
45
+ /** Result of parsing typed or pasted text for a cell. */
46
+ export interface ParsedCell {
47
+ value: unknown;
48
+ valid: boolean;
49
+ }
50
+ /**
51
+ * Parses typed or pasted text into a cell value.
52
+ *
53
+ * @example
54
+ * ```ts
55
+ * parseCellText('12,5', { type: 'number' }); // { value: 12.5, valid: true }
56
+ * parseCellText('Rouge', { type: 'select', options: [{ value: 'red', label: 'Rouge' }] });
57
+ * // { value: 'red', valid: true }
58
+ * ```
59
+ */
60
+ export declare function parseCellText(text: string, edit: TableCellEdit): ParsedCell;
61
+ /** Whether a stored value is valid for the editor (see {@link parseCellText}). */
62
+ export declare function isCellValueValid(value: unknown, edit: TableCellEdit): boolean;
63
+ /** Text shown in an editor for a stored value. */
64
+ export declare function cellText(value: unknown): string;
65
+ /**
66
+ * Returns `changes` with one cell set. A value equal to the row's own value
67
+ * removes the entry (and the row once it has no entry left).
68
+ */
69
+ export declare function setPendingCell(changes: TablePendingChanges, rowId: string, key: string, value: unknown, original: unknown): TablePendingChanges;
70
+ /**
71
+ * Splits clipboard text copied from a spreadsheet into rows of cells, or
72
+ * returns `null` for a single value (left to the input's own paste).
73
+ */
74
+ export declare function parseClipboardGrid(text: string): string[][] | null;
75
+ /** Position of an editor in the visible grid. */
76
+ export interface CellPosition {
77
+ row: number;
78
+ col: number;
79
+ }
80
+ /** Callbacks an editor needs from the table. */
81
+ export interface EditCellHandlers {
82
+ /** Store the editor's value. */
83
+ commit: (value: unknown) => void;
84
+ /** Move focus to another editor (rows: visible rows, cols: editable columns). */
85
+ focusCell: (position: CellPosition) => void;
86
+ /** Spreadsheet paste starting at this cell. */
87
+ pasteGrid: (grid: string[][]) => void;
88
+ /** Undo the last change. Returns whether there was one. */
89
+ undo: () => boolean;
90
+ }
91
+ /** Props of {@link EditCell}. */
92
+ export interface EditCellProps extends EditCellHandlers {
93
+ edit: TableCellEdit;
94
+ /** Current value (pending or saved). */
95
+ value: unknown;
96
+ position: CellPosition;
97
+ /** Accessible name, e.g. the column title. */
98
+ label: string;
99
+ }
100
+ /**
101
+ * In-place cell editor. Uncontrolled: the DOM holds the text while typing; the
102
+ * value is stored on blur / Enter (`select`: on change). Keys: Enter / ArrowDown
103
+ * next row, ArrowUp previous row, Tab native, Esc restores the stored value,
104
+ * Ctrl/Cmd+Z undoes the last stored change once nothing is being typed.
105
+ */
106
+ export declare function EditCell({ edit, value, position, label, commit, focusCell, pasteGrid, undo, }: EditCellProps): ReactElement;
107
+ /** Focuses the editor at `position` inside `container`, if it exists. */
108
+ export declare function focusEditor(container: RefObject<HTMLElement | null>, position: CellPosition): void;
109
+ //# sourceMappingURL=editing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editing.d.ts","sourceRoot":"","sources":["../../../src/atomic/Table/editing.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAGV,YAAY,EACZ,SAAS,EACV,MAAM,OAAO,CAAC;AAEf,4CAA4C;AAC5C,MAAM,WAAW,eAAe;IAC9B,oBAAoB;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,4CAA4C;IAC5C,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,GAAG,QAAQ,GAAG,QAAQ,CAAC;IACnC,oCAAoC;IACpC,OAAO,CAAC,EAAE,SAAS,eAAe,EAAE,CAAC;CACtC;AAED;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AAE1E,0EAA0E;AAC1E,MAAM,WAAW,mBAAmB;IAClC,oCAAoC;IACpC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qCAAqC;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oCAAoC;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mCAAmC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,+CAA+C;AAC/C,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,mBAAmB,CAK7D,CAAC;AAEF,yDAAyD;AACzD,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;CAChB;AAED;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI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,EACL,MAAM,EACN,SAAS,EACT,SAAS,EACT,IAAI,GACL,EAAE,aAAa,GAAG,YAAY,CA6F9B;AAED,yEAAyE;AACzE,wBAAgB,WAAW,CACzB,SAAS,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,EACxC,QAAQ,EAAE,YAAY,GACrB,IAAI,CAMN"}
@@ -0,0 +1,170 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ // packages/components/src/atomic/Table/editing.tsx
3
+ /**
4
+ * @fileoverview DataTable cell editing
5
+ * @description Spreadsheet-style editing for DataTable: in-place cell editors,
6
+ * pending changes keyed by row id, keyboard navigation, Excel block paste, undo.
7
+ *
8
+ * @version 0.1.0
9
+ * @since 0.2.3
10
+ * @author AMBROISE PARK Consulting
11
+ */
12
+ import { useEffect, useRef } from 'react';
13
+ /** Defaults of {@link DataTableEditLabels}. */
14
+ export const DEFAULT_EDIT_LABELS = {
15
+ selected: '{{count}} selected',
16
+ field: 'Field',
17
+ value: 'Value',
18
+ apply: 'Apply to selected',
19
+ };
20
+ /**
21
+ * Parses typed or pasted text into a cell value.
22
+ *
23
+ * @example
24
+ * ```ts
25
+ * parseCellText('12,5', { type: 'number' }); // { value: 12.5, valid: true }
26
+ * parseCellText('Rouge', { type: 'select', options: [{ value: 'red', label: 'Rouge' }] });
27
+ * // { value: 'red', valid: true }
28
+ * ```
29
+ */
30
+ export function parseCellText(text, edit) {
31
+ const trimmed = text.trim();
32
+ if (trimmed === '')
33
+ return { value: null, valid: true };
34
+ if (edit.type === 'number') {
35
+ const n = Number(trimmed.replace(/\s/g, '').replace(',', '.'));
36
+ return Number.isFinite(n)
37
+ ? { value: n, valid: true }
38
+ : { value: trimmed, valid: false };
39
+ }
40
+ if (edit.type === 'select') {
41
+ const needle = trimmed.toLowerCase();
42
+ const match = edit.options?.find((o) => o.value.toLowerCase() === needle || o.label.toLowerCase() === needle);
43
+ return match
44
+ ? { value: match.value, valid: true }
45
+ : { value: trimmed, valid: false };
46
+ }
47
+ return { value: text, valid: true };
48
+ }
49
+ /** Whether a stored value is valid for the editor (see {@link parseCellText}). */
50
+ export function isCellValueValid(value, edit) {
51
+ if (value === null || value === undefined || value === '')
52
+ return true;
53
+ if (edit.type === 'number')
54
+ return typeof value === 'number';
55
+ if (edit.type === 'select') {
56
+ return Boolean(edit.options?.some((o) => o.value === String(value)));
57
+ }
58
+ return true;
59
+ }
60
+ /** Text shown in an editor for a stored value. */
61
+ export function cellText(value) {
62
+ return value === null || value === undefined ? '' : String(value);
63
+ }
64
+ /**
65
+ * Returns `changes` with one cell set. A value equal to the row's own value
66
+ * removes the entry (and the row once it has no entry left).
67
+ */
68
+ export function setPendingCell(changes, rowId, key, value, original) {
69
+ const row = { ...changes[rowId] };
70
+ const same = value === original ||
71
+ (cellText(value) === cellText(original) &&
72
+ typeof value === typeof original);
73
+ if (same)
74
+ delete row[key];
75
+ else
76
+ row[key] = value;
77
+ const next = { ...changes };
78
+ if (Object.keys(row).length === 0)
79
+ delete next[rowId];
80
+ else
81
+ next[rowId] = row;
82
+ return next;
83
+ }
84
+ /**
85
+ * Splits clipboard text copied from a spreadsheet into rows of cells, or
86
+ * returns `null` for a single value (left to the input's own paste).
87
+ */
88
+ export function parseClipboardGrid(text) {
89
+ const normalized = text.replace(/\r\n?/g, '\n').replace(/\n$/, '');
90
+ if (!normalized.includes('\t') && !normalized.includes('\n'))
91
+ return null;
92
+ return normalized.split('\n').map((line) => line.split('\t'));
93
+ }
94
+ /**
95
+ * In-place cell editor. Uncontrolled: the DOM holds the text while typing; the
96
+ * value is stored on blur / Enter (`select`: on change). Keys: Enter / ArrowDown
97
+ * next row, ArrowUp previous row, Tab native, Esc restores the stored value,
98
+ * Ctrl/Cmd+Z undoes the last stored change once nothing is being typed.
99
+ */
100
+ export function EditCell({ edit, value, position, label, commit, focusCell, pasteGrid, undo, }) {
101
+ const ref = useRef(null);
102
+ const stored = cellText(value);
103
+ const invalid = !isCellValueValid(value, edit);
104
+ // Paste, bulk apply and undo change the stored value from outside: sync the DOM
105
+ useEffect(() => {
106
+ if (ref.current && ref.current.value !== stored) {
107
+ ref.current.value = stored;
108
+ }
109
+ }, [stored]);
110
+ const store = (text) => {
111
+ if (text === stored)
112
+ return;
113
+ commit(parseCellText(text, edit).value);
114
+ };
115
+ const onKeyDown = (e) => {
116
+ const target = e.currentTarget;
117
+ if ((e.ctrlKey || e.metaKey) && e.key.toLowerCase() === 'z') {
118
+ if (target.value === stored && undo())
119
+ e.preventDefault();
120
+ return;
121
+ }
122
+ if (e.key === 'Escape') {
123
+ target.value = stored;
124
+ return;
125
+ }
126
+ const isSelect = edit.type === 'select';
127
+ if (e.key === 'Enter' || (!isSelect && e.key === 'ArrowDown')) {
128
+ e.preventDefault();
129
+ store(target.value);
130
+ focusCell({
131
+ row: position.row + (e.shiftKey ? -1 : 1),
132
+ col: position.col,
133
+ });
134
+ return;
135
+ }
136
+ if (!isSelect && e.key === 'ArrowUp') {
137
+ e.preventDefault();
138
+ store(target.value);
139
+ focusCell({ row: position.row - 1, col: position.col });
140
+ }
141
+ };
142
+ const onPaste = (e) => {
143
+ const grid = parseClipboardGrid(e.clipboardData.getData('text/plain'));
144
+ if (!grid)
145
+ return;
146
+ e.preventDefault();
147
+ pasteGrid(grid);
148
+ };
149
+ const common = {
150
+ className: 'dndev-table-cell-editor',
151
+ 'aria-label': label,
152
+ 'aria-invalid': invalid || undefined,
153
+ 'data-edit-row': position.row,
154
+ 'data-edit-col': position.col,
155
+ onKeyDown,
156
+ onPaste,
157
+ };
158
+ if (edit.type === 'select') {
159
+ const known = edit.options?.some((o) => o.value === stored);
160
+ return (_jsxs("select", { ref: ref, ...common, defaultValue: stored, onChange: (e) => store(e.target.value), children: [_jsx("option", { value: "" }), !known && stored !== '' && _jsx("option", { value: stored, children: stored }), edit.options?.map((o) => (_jsx("option", { value: o.value, children: o.label }, o.value)))] }));
161
+ }
162
+ return (_jsx("input", { ref: ref, ...common, type: "text", inputMode: edit.type === 'number' ? 'decimal' : undefined, defaultValue: stored, onBlur: (e) => store(e.target.value) }));
163
+ }
164
+ /** Focuses the editor at `position` inside `container`, if it exists. */
165
+ export function focusEditor(container, position) {
166
+ const el = container.current?.querySelector(`[data-edit-row="${position.row}"][data-edit-col="${position.col}"]`);
167
+ el?.focus();
168
+ if (el instanceof HTMLInputElement)
169
+ el.select();
170
+ }
@@ -1,5 +1,8 @@
1
1
  import { type ReactNode, type HTMLAttributes } from 'react';
2
+ import type { DataTableEditLabels, TableCellEdit, TablePendingChanges } from './editing';
2
3
  import './Table.css';
4
+ export { parseCellText, parseClipboardGrid, setPendingCell } from './editing';
5
+ export type { DataTableEditLabels, TableCellEdit, TableCellOption, TablePendingChanges, } from './editing';
3
6
  /**
4
7
  * Table column configuration
5
8
  *
@@ -38,6 +41,11 @@ export interface TableColumn<T = unknown> {
38
41
  * Uses logical alignment for RTL support.
39
42
  */
40
43
  align?: 'start' | 'center' | 'end';
44
+ /**
45
+ * In-place editor of this column's cells when the DataTable is `editable`.
46
+ * Requires `dataIndex`. In edit mode it replaces `render`.
47
+ */
48
+ edit?: TableCellEdit;
41
49
  }
42
50
  /**
43
51
  * Data table component props
@@ -118,6 +126,39 @@ export interface DataTableProps<T = unknown> {
118
126
  * @default 'Export'
119
127
  */
120
128
  exportLabel?: string;
129
+ /**
130
+ * Spreadsheet-style editing of the columns that declare `edit`: cells are
131
+ * edited in place, rows are checked to set one field on all of them (bulk
132
+ * bar), a block copied from Excel / Sheets pastes across rows and columns.
133
+ * Implies row selection; `onRowClick` is ignored (open records from a link
134
+ * cell). Edits go to `pendingChanges` — nothing is saved by the table.
135
+ * Requires `getRowId`, `pendingChanges` and `onPendingChange`.
136
+ * @default false
137
+ */
138
+ editable?: boolean;
139
+ /** Stable id of a row. Required with `editable`. */
140
+ getRowId?: (row: T) => string;
141
+ /** Edited values not saved yet (controlled). Required with `editable`. */
142
+ pendingChanges?: TablePendingChanges;
143
+ /** Called with the new pending changes after every edit, paste, bulk apply or undo. */
144
+ onPendingChange?: (changes: TablePendingChanges) => void;
145
+ /** Labels of the bulk edit bar (translated by the consumer). */
146
+ editLabels?: DataTableEditLabels;
147
+ /**
148
+ * Leading "open" cell: an icon link to the row's record. Renders a real
149
+ * `<a href>` through the app router's link (Ctrl/Cmd-click opens a new tab).
150
+ * Use it to open records from an `editable` table, where a row click edits.
151
+ * @since 0.2.3
152
+ */
153
+ getRowHref?: (row: T) => string;
154
+ /**
155
+ * Leading "open" cell as an icon button, for apps that open records in place
156
+ * (sheet, dialog) instead of navigating. Takes precedence over `getRowHref`.
157
+ * @since 0.2.3
158
+ */
159
+ onRowOpen?: (row: T) => void;
160
+ /** Accessible label of the open cell (translated by the consumer). Required with `getRowHref` / `onRowOpen`. */
161
+ openLabel?: string;
121
162
  }
122
163
  /**
123
164
  * Basic Table wrapper component.
@@ -179,7 +220,7 @@ declare function TableCaption({ className, ...props }: HTMLAttributes<HTMLTableC
179
220
  * @param {DataTableProps} props - The props for the data table
180
221
  * @returns {ReactNode} The rendered data table
181
222
  */
182
- declare const DataTable: <T = unknown>({ data, columns, sortable, selectable, searchable, pagination, currentPage: currentPageProp, pageSize: pageSizeProp, total: totalProp, onPageChange, onPageSizeChange, showingLabel, paginationPreviousLabel, paginationNextLabel, paginationItemsPerPagePlaceholder, loading, gridLines, onSort, onSelect, onSearch, onRowClick, className, exportable, exportFilename, onExport, exportLabel, }: DataTableProps<T>) => ReactNode;
223
+ declare const DataTable: <T = unknown>({ data, columns, sortable, selectable, searchable, pagination, currentPage: currentPageProp, pageSize: pageSizeProp, total: totalProp, onPageChange, onPageSizeChange, showingLabel, paginationPreviousLabel, paginationNextLabel, paginationItemsPerPagePlaceholder, loading, gridLines, onSort, onSelect, onSearch, onRowClick, className, exportable, exportFilename, onExport, exportLabel, editable, getRowId, pendingChanges, onPendingChange, editLabels, getRowHref, onRowOpen, openLabel, }: DataTableProps<T>) => ReactNode;
183
224
  export default Table;
184
225
  export { TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, DataTable, };
185
226
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atomic/Table/index.tsx"],"names":[],"mappings":"AAYA,OAAO,EAGL,KAAK,SAAS,EACd,KAAK,cAAc,EAEpB,MAAM,OAAO,CAAC;AAUf,OAAO,aAAa,CAAC;AAErB;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,WAAW,CAAC,CAAC,GAAG,OAAO;IACtC,GAAG,EAAE,MAAM,CAAC;IACZ,wEAAwE;IACxE,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,yDAAyD;IACzD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,SAAS,CAAC;IACjE;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;CACpC;AAED;;;;;;GAMG;AACH,MAAM,WAAW,cAAc,CAAC,CAAC,GAAG,OAAO;IACzC,iBAAiB;IACjB,IAAI,EAAE,CAAC,EAAE,CAAC;IACV,yBAAyB;IACzB,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC;IAC1B,qBAAqB;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,2BAA2B;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,oBAAoB;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,wBAAwB;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,+BAA+B;IAC/B,WAAW,CAAC,EAA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