@duro-app/ui 5.6.0 → 5.7.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/dist/{Table-B1sWL3GA.js → Table-Dj7PXqO_.js} +3 -2
- package/dist/Table-Dj7PXqO_.js.map +1 -0
- package/dist/components/DragDrop/DragDrop.d.ts +95 -14
- package/dist/components/DragDrop/DragDrop.d.ts.map +1 -1
- package/dist/components/DragDrop/DragDrop.meta.d.ts.map +1 -1
- package/dist/components/DragDrop/DragDropBoard.stories.d.ts +69 -0
- package/dist/components/DragDrop/DragDropBoard.stories.d.ts.map +1 -0
- package/dist/components/DragDrop/styles.css.d.ts +80 -3
- package/dist/components/DragDrop/styles.css.d.ts.map +1 -1
- package/dist/components/Meter/Meter.d.ts +17 -0
- package/dist/components/Meter/Meter.d.ts.map +1 -0
- package/dist/components/Meter/Meter.meta.d.ts +3 -0
- package/dist/components/Meter/Meter.meta.d.ts.map +1 -0
- package/dist/components/Meter/Meter.stories.d.ts +12 -0
- package/dist/components/Meter/Meter.stories.d.ts.map +1 -0
- package/dist/components/Meter/styles.css.d.ts +34 -0
- package/dist/components/Meter/styles.css.d.ts.map +1 -0
- package/dist/components/Timeline/Timeline.d.ts +71 -0
- package/dist/components/Timeline/Timeline.d.ts.map +1 -0
- package/dist/components/Timeline/Timeline.meta.d.ts +3 -0
- package/dist/components/Timeline/Timeline.meta.d.ts.map +1 -0
- package/dist/components/Timeline/Timeline.stories.d.ts +26 -0
- package/dist/components/Timeline/Timeline.stories.d.ts.map +1 -0
- package/dist/components/Timeline/styles.css.d.ts +158 -0
- package/dist/components/Timeline/styles.css.d.ts.map +1 -0
- package/dist/components/Toast/Toast.meta.d.ts.map +1 -1
- package/dist/components/Toast/Toast.stories.d.ts +9 -0
- package/dist/components/Toast/Toast.stories.d.ts.map +1 -1
- package/dist/components/Toast/ToastProvider.d.ts +11 -5
- package/dist/components/Toast/ToastProvider.d.ts.map +1 -1
- package/dist/components/Toast/index.d.ts +1 -1
- package/dist/components/Toast/index.d.ts.map +1 -1
- package/dist/components/Toast/styles.css.d.ts +6 -0
- package/dist/components/Toast/styles.css.d.ts.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5029 -3927
- package/dist/index.js.map +1 -1
- package/dist/table.js +1 -1
- package/package.json +2 -2
- package/src/components/DragDrop/DragDrop.meta.ts +22 -21
- package/src/components/DragDrop/DragDrop.tsx +1147 -246
- package/src/components/DragDrop/DragDropBoard.stories.tsx +668 -0
- package/src/components/DragDrop/styles.css.ts +74 -4
- package/src/components/Meter/Meter.meta.ts +24 -0
- package/src/components/Meter/Meter.stories.tsx +64 -0
- package/src/components/Meter/Meter.tsx +55 -0
- package/src/components/Meter/styles.css.ts +30 -0
- package/src/components/Timeline/Timeline.meta.ts +46 -0
- package/src/components/Timeline/Timeline.stories.tsx +238 -0
- package/src/components/Timeline/Timeline.tsx +332 -0
- package/src/components/Timeline/styles.css.ts +162 -0
- package/src/components/Toast/Toast.meta.ts +2 -1
- package/src/components/Toast/Toast.stories.tsx +84 -0
- package/src/components/Toast/ToastProvider.tsx +49 -11
- package/src/components/Toast/index.ts +7 -1
- package/src/components/Toast/styles.css.ts +2 -0
- package/src/index.ts +16 -0
- package/dist/Table-B1sWL3GA.js.map +0 -1
package/dist/table.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { M as F, m as xt, R as rt, H as kt, n as pt, o as bt, p as ft, q as mt, k as ht, t as yt, r as St, v as Tt } from "./Table-
|
|
1
|
+
import { M as F, m as xt, R as rt, H as kt, n as pt, o as bt, p as ft, q as mt, k as ht, t as yt, r as St, v as Tt } from "./Table-Dj7PXqO_.js";
|
|
2
2
|
import { jsx as u, jsxs as q } from "react/jsx-runtime";
|
|
3
3
|
import { c as H, m as p, d as b } from "./compiler-runtime-B2IcI8_O.js";
|
|
4
4
|
import { flexRender as E, useReactTable as it, getPaginationRowModel as Ct, getFilteredRowModel as vt, getSortedRowModel as at, getCoreRowModel as st } from "@tanstack/react-table";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@duro-app/ui",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.7.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
68
|
"@tanstack/react-virtual": "^3.14.6",
|
|
69
|
-
"@duro-app/tokens": "^5.
|
|
69
|
+
"@duro-app/tokens": "^5.7.0"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@babel/preset-typescript": "^7.28.0",
|
|
@@ -2,15 +2,15 @@ import type {ComponentMeta} from '../component-meta'
|
|
|
2
2
|
|
|
3
3
|
export const meta: ComponentMeta = {
|
|
4
4
|
description:
|
|
5
|
-
'Move items between zones
|
|
6
|
-
anatomy: {required: ['Root', 'Zone', 'Item']},
|
|
5
|
+
'Move items between zones by pointer (mouse, pen and touch through one pointer-event path; touch holds briefly, then drags) or by keyboard (a Handle per item: Space picks up, arrows move, Space drops, Escape cancels). The innermost accepting zone wins, so a zone nested in an Item (a card in a column) takes its own drops; a zone can refuse with a reason that is shown and announced. Placeholders, edge auto-scroll and list-style announcements (through `announce`, for catalog strings) come with it.',
|
|
6
|
+
anatomy: {required: ['Root', 'Zone', 'Item'], optional: ['Handle']},
|
|
7
7
|
whenToUse: [
|
|
8
8
|
'Slotting things into places — people into approval gates, cards into columns, files into folders',
|
|
9
9
|
'Reordering a short row or list when the order is visible and meaningful',
|
|
10
|
+
'A board: columns as labelled lists (`list`), cards with a Handle, an attach zone nested in each card',
|
|
10
11
|
],
|
|
11
12
|
whenNotToUse: [
|
|
12
|
-
'As the ONLY way to do something —
|
|
13
|
-
'Long lists that scroll while dragging — the ghost follows the pointer but zones do not auto-scroll',
|
|
13
|
+
'As the ONLY way to do something — WCAG 2.5.7 asks for a single-pointer alternative to dragging (a button or menu that moves the item); a Handle adds the keyboard path, not a click one',
|
|
14
14
|
'Sorting tabular data — sort the Table instead',
|
|
15
15
|
'React Native — Item renders its children without drag behaviour there',
|
|
16
16
|
],
|
|
@@ -26,24 +26,25 @@ export const meta: ComponentMeta = {
|
|
|
26
26
|
relationship: 'ScrollArea drags a thumb along one axis; DragDrop moves items between zones',
|
|
27
27
|
},
|
|
28
28
|
],
|
|
29
|
-
example: `<DragDrop.Root
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
example: `<DragDrop.Root
|
|
30
|
+
onDrop={({item, target}) => move(item.id, target.zone, target.index)}
|
|
31
|
+
renderPlaceholder={({label}) => <Text variant="caption">→ {label}</Text>}
|
|
32
|
+
announce={(e) => t(\`board.drag.\${e.kind}\`, e)}
|
|
33
|
+
>
|
|
34
|
+
{columns.map((col) => (
|
|
35
|
+
<DragDrop.Zone key={col.id} id={col.id} label={col.name} orientation="vertical" list
|
|
36
|
+
accepts={(item) => item.data.kind === 'task' || {ok: false, reason: t('board.attachOnCard')}}>
|
|
37
|
+
{col.cards.map((card) => (
|
|
38
|
+
<DragDrop.Item key={card.id} id={card.id} zone={col.id} label={card.title} data={card}>
|
|
39
|
+
<DragDrop.Handle>
|
|
40
|
+
<DragDrop.Zone id={\`attach:\${card.id}\`} label={card.title}
|
|
41
|
+
accepts={(item) => item.data.kind === 'activity'}>
|
|
42
|
+
<Card>{card.title}</Card>
|
|
43
|
+
</DragDrop.Zone>
|
|
44
|
+
</DragDrop.Handle>
|
|
35
45
|
</DragDrop.Item>
|
|
36
46
|
))}
|
|
37
|
-
</
|
|
38
|
-
|
|
39
|
-
<DragDrop.Zone id="gates" label="Gates" orientation="horizontal">
|
|
40
|
-
<Inline gap="sm">
|
|
41
|
-
{gates.map((g) => (
|
|
42
|
-
<DragDrop.Item key={g.id} id={g.id} zone="gates" label={g.name} data={g}>
|
|
43
|
-
<Tag removable onRemove={() => unslot(g)}>{g.name}</Tag>
|
|
44
|
-
</DragDrop.Item>
|
|
45
|
-
))}
|
|
46
|
-
</Inline>
|
|
47
|
-
</DragDrop.Zone>
|
|
47
|
+
</DragDrop.Zone>
|
|
48
|
+
))}
|
|
48
49
|
</DragDrop.Root>`,
|
|
49
50
|
}
|