@mieweb/ui 0.10.0-dev.11 → 0.10.0-dev.12
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/Input-yN516s5_.d.cts +3 -0
- package/dist/Input-yN516s5_.d.ts +3 -0
- package/dist/ag-grid.d.cts +142 -1
- package/dist/ag-grid.d.ts +142 -1
- package/dist/components/Alert/index.d.cts +1 -1
- package/dist/components/Alert/index.d.ts +1 -1
- package/dist/components/AlertDialog/index.d.cts +28 -3
- package/dist/components/AlertDialog/index.d.ts +28 -3
- package/dist/components/AudioRecorder/index.d.cts +2 -2
- package/dist/components/AudioRecorder/index.d.ts +2 -2
- package/dist/components/Autocomplete/index.d.cts +8 -2
- package/dist/components/Autocomplete/index.d.ts +8 -2
- package/dist/components/Avatar/index.d.cts +1 -1
- package/dist/components/Avatar/index.d.ts +1 -1
- package/dist/components/Badge/index.d.cts +1 -1
- package/dist/components/Badge/index.d.ts +1 -1
- package/dist/components/BoardView/index.d.cts +91 -4
- package/dist/components/BoardView/index.d.ts +91 -4
- package/dist/components/Button/index.d.cts +1 -1
- package/dist/components/Button/index.d.ts +1 -1
- package/dist/components/CalendarView/index.d.cts +1 -2
- package/dist/components/CalendarView/index.d.ts +1 -2
- package/dist/components/Card/index.d.cts +3 -3
- package/dist/components/Card/index.d.ts +3 -3
- package/dist/components/Dropdown/index.d.cts +2 -1
- package/dist/components/Dropdown/index.d.ts +2 -1
- package/dist/components/GanttView/index.d.cts +1 -2
- package/dist/components/GanttView/index.d.ts +1 -2
- package/dist/components/ListView/index.d.cts +2 -3
- package/dist/components/ListView/index.d.ts +2 -3
- package/dist/components/MediaEditor/index.d.cts +91 -2
- package/dist/components/MediaEditor/index.d.ts +91 -2
- package/dist/components/MediaPlayer/index.d.cts +1 -1
- package/dist/components/MediaPlayer/index.d.ts +1 -1
- package/dist/components/Pagination/index.d.cts +1 -1
- package/dist/components/Pagination/index.d.ts +1 -1
- package/dist/components/PhoneInput/index.d.cts +36 -3
- package/dist/components/PhoneInput/index.d.ts +36 -3
- package/dist/components/Progress/index.d.cts +1 -1
- package/dist/components/Progress/index.d.ts +1 -1
- package/dist/components/Q/index.d.cts +2 -2
- package/dist/components/Q/index.d.ts +2 -2
- package/dist/components/QuickAction/index.d.cts +1 -1
- package/dist/components/QuickAction/index.d.ts +1 -1
- package/dist/components/RecordButton/index.d.cts +1 -1
- package/dist/components/RecordButton/index.d.ts +1 -1
- package/dist/components/RichTextEditor/index.d.cts +7 -2
- package/dist/components/RichTextEditor/index.d.ts +7 -2
- package/dist/components/ScrollArea/index.d.cts +1 -1
- package/dist/components/ScrollArea/index.d.ts +1 -1
- package/dist/components/Select/index.d.cts +1 -2
- package/dist/components/Select/index.d.ts +1 -2
- package/dist/components/Skeleton/index.d.cts +1 -1
- package/dist/components/Skeleton/index.d.ts +1 -1
- package/dist/components/Slider/index.d.cts +2 -2
- package/dist/components/Slider/index.d.ts +2 -2
- package/dist/components/Spinner/index.d.cts +2 -2
- package/dist/components/Spinner/index.d.ts +2 -2
- package/dist/components/SuperChat/index.d.cts +2 -4
- package/dist/components/SuperChat/index.d.ts +2 -4
- package/dist/components/SuperChat/plugins/index.d.cts +2 -3
- package/dist/components/SuperChat/plugins/index.d.ts +2 -3
- package/dist/components/Text/index.d.cts +3 -3
- package/dist/components/Text/index.d.ts +3 -3
- package/dist/components/Textarea/index.d.cts +1 -2
- package/dist/components/Textarea/index.d.ts +1 -2
- package/dist/components/ThemeProvider/index.d.cts +3 -1
- package/dist/components/ThemeProvider/index.d.ts +3 -1
- package/dist/components/TranscriptView/index.d.cts +85 -4
- package/dist/components/TranscriptView/index.d.ts +85 -4
- package/dist/components/ViewSet/index.d.cts +120 -9
- package/dist/components/ViewSet/index.d.ts +120 -9
- package/dist/components/ViewSwitcher/index.d.cts +4 -40
- package/dist/components/ViewSwitcher/index.d.ts +4 -40
- package/dist/datavis.d.cts +167 -13
- package/dist/datavis.d.ts +167 -13
- package/dist/esheet.d.cts +183 -1
- package/dist/esheet.d.ts +183 -1
- package/dist/hooks/index.d.cts +383 -31
- package/dist/hooks/index.d.ts +383 -31
- package/dist/index-DoYYWsNc.d.cts +127 -0
- package/dist/index-DoYYWsNc.d.ts +127 -0
- package/dist/index.d.cts +7592 -414
- package/dist/index.d.ts +7592 -414
- package/dist/motion.d.cts +186 -2
- package/dist/motion.d.ts +186 -2
- package/dist/q.d.cts +25 -3
- package/dist/q.d.ts +25 -3
- package/dist/{types-B97JNRNQ.d.cts → types-DOxdTwmq.d.cts} +170 -2
- package/dist/{types-gZXrfLj6.d.ts → types-DOxdTwmq.d.ts} +170 -2
- package/dist/{types-CbWXIKbe.d.cts → types-DsdZvEI1.d.cts} +1 -28
- package/dist/{types-CbWXIKbe.d.ts → types-DsdZvEI1.d.ts} +1 -28
- package/dist/utils/index.d.cts +13 -2
- package/dist/utils/index.d.ts +13 -2
- package/package.json +3 -2
- package/dist/Animated-XmH6k8pZ.d.cts +0 -188
- package/dist/Animated-XmH6k8pZ.d.ts +0 -188
- package/dist/MedicationEditor-Bp4NLy7y.d.cts +0 -352
- package/dist/MedicationEditor-Bp4NLy7y.d.ts +0 -352
- package/dist/html-MdxqSzjD.d.cts +0 -13
- package/dist/html-MdxqSzjD.d.ts +0 -13
- package/dist/orderRows-BUJYgSc7.d.cts +0 -221
- package/dist/orderRows-BUJYgSc7.d.ts +0 -221
- package/dist/transcript-Cg7uSW-C.d.cts +0 -84
- package/dist/transcript-Cg7uSW-C.d.ts +0 -84
- package/dist/types-CnPEwzlp.d.cts +0 -254
- package/dist/types-CnPEwzlp.d.ts +0 -254
- package/dist/useAnchoredPosition-CKwLSQW8.d.cts +0 -76
- package/dist/useAnchoredPosition-CKwLSQW8.d.ts +0 -76
- package/dist/useTheme-B9SWu6ui.d.cts +0 -24
- package/dist/useTheme-B9SWu6ui.d.ts +0 -24
- package/dist/useTranscriptEdits-CGzlemHT.d.cts +0 -182
- package/dist/useTranscriptEdits-D32bLs0l.d.ts +0 -182
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The contract every component in the `Modules/Views` family reads through.
|
|
7
|
+
*
|
|
8
|
+
* A page describes its collection once — which field is the id, the title, the
|
|
9
|
+
* status, the start date — and every view understands it. That is the whole
|
|
10
|
+
* reason the family exists: without it each view needs its own adapter and you
|
|
11
|
+
* end up re-implementing the same board per entity.
|
|
12
|
+
*
|
|
13
|
+
* Views are headless. Nothing here fetches, subscribes, or navigates.
|
|
14
|
+
* See CONTRIBUTING → "Modules: headless data components".
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Which layout is on screen. `overview` and `table` are rendered by the host
|
|
19
|
+
* through `ViewSet` slots rather than by a component in this family — a tabular
|
|
20
|
+
* collection is `DataVisNitroGrid`, and an overview is domain content.
|
|
21
|
+
*/
|
|
22
|
+
type ViewId = 'overview' | 'list' | 'board' | 'calendar' | 'gantt' | 'roadmap' | 'table';
|
|
23
|
+
/**
|
|
24
|
+
* A semantic colour name, resolved to `--mieweb-*` tokens by each view.
|
|
25
|
+
*
|
|
26
|
+
* Accessors return one of these rather than a class string so a caller cannot
|
|
27
|
+
* hardcode a palette that breaks under another brand or in dark mode.
|
|
28
|
+
*/
|
|
29
|
+
type Accent = 'primary' | 'success' | 'warning' | 'destructive' | 'info' | 'neutral';
|
|
30
|
+
/** A named stage: a board column, and the segments of a stage bar. */
|
|
31
|
+
interface Stage {
|
|
32
|
+
id: string;
|
|
33
|
+
label: string;
|
|
34
|
+
accent?: Accent;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* How a view reads one item. Only `getId` and `getTitle` are always required;
|
|
38
|
+
* each view documents which of the rest it needs (a board needs `getStatus`, a
|
|
39
|
+
* Gantt needs `getStart`) and renders an explanatory empty state without them.
|
|
40
|
+
*/
|
|
41
|
+
interface ViewAccessors<T> {
|
|
42
|
+
getId: (item: T) => string;
|
|
43
|
+
getTitle: (item: T) => string;
|
|
44
|
+
/** Secondary line under the title. */
|
|
45
|
+
getSubtitle?: (item: T) => string | undefined;
|
|
46
|
+
/** Board column and list group; matched against `Stage['id']`. */
|
|
47
|
+
getStatus?: (item: T) => string;
|
|
48
|
+
/** Gantt bar start, calendar placement. */
|
|
49
|
+
getStart?: (item: T) => Date | string | null | undefined;
|
|
50
|
+
/** Gantt bar end, calendar span. Falls back to the start when absent. */
|
|
51
|
+
getEnd?: (item: T) => Date | string | null | undefined;
|
|
52
|
+
/** Swimlane in a roadmap, row group in a Gantt. */
|
|
53
|
+
getGroup?: (item: T) => string | undefined;
|
|
54
|
+
getAccent?: (item: T) => Accent;
|
|
55
|
+
}
|
|
56
|
+
/** Strings a view renders. Every one is overridable; the defaults are English. */
|
|
57
|
+
interface ViewLabels {
|
|
58
|
+
/** Accessible name of the view switcher group. */
|
|
59
|
+
viewSwitcher: string;
|
|
60
|
+
loading: string;
|
|
61
|
+
empty: string;
|
|
62
|
+
error: string;
|
|
63
|
+
/** Action on the error state. */
|
|
64
|
+
retry: string;
|
|
65
|
+
/** Heading for the group a record with no status or group falls into. */
|
|
66
|
+
ungrouped: string;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Props every view accepts. Views are controlled: selection, the active view and
|
|
70
|
+
* filter state live in the page, and every change is handed back.
|
|
71
|
+
*/
|
|
72
|
+
interface ViewBaseProps<T> {
|
|
73
|
+
items: T[];
|
|
74
|
+
accessors: ViewAccessors<T>;
|
|
75
|
+
loading?: boolean;
|
|
76
|
+
error?: Error | null;
|
|
77
|
+
selectedId?: string | null;
|
|
78
|
+
/** Called when the user activates an item. */
|
|
79
|
+
onOpen?: (id: string, item: T) => void;
|
|
80
|
+
/** Return a URL to render each item as a real anchor — middle-clickable and crawlable. */
|
|
81
|
+
getHref?: (id: string, item: T) => string;
|
|
82
|
+
/** Render one item. Receives the active view so one function can serve several. */
|
|
83
|
+
renderItem?: (item: T, context: {
|
|
84
|
+
view: ViewId;
|
|
85
|
+
}) => React.ReactNode;
|
|
86
|
+
/** Replaces the built-in empty state. */
|
|
87
|
+
emptyState?: React.ReactNode;
|
|
88
|
+
labels?: Partial<ViewLabels>;
|
|
89
|
+
/** Pins "today" so stories, tests and visual snapshots stay deterministic. */
|
|
90
|
+
now?: Date;
|
|
91
|
+
className?: string;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
interface ViewOption {
|
|
95
|
+
id: ViewId;
|
|
96
|
+
/** Overrides the built-in English label. */
|
|
97
|
+
label?: string;
|
|
98
|
+
/** Overrides the built-in icon. */
|
|
99
|
+
icon?: React.ComponentType<{
|
|
100
|
+
className?: string;
|
|
101
|
+
'aria-hidden'?: boolean;
|
|
102
|
+
}>;
|
|
103
|
+
disabled?: boolean;
|
|
104
|
+
}
|
|
105
|
+
interface ViewSwitcherProps extends VariantProps<typeof viewSwitcherVariants> {
|
|
106
|
+
/** Views to offer, in order. Accepts bare ids or `ViewOption`s. */
|
|
107
|
+
views: readonly (ViewId | ViewOption)[];
|
|
108
|
+
value: ViewId;
|
|
109
|
+
onValueChange: (view: ViewId) => void;
|
|
110
|
+
/** Accessible name of the group. */
|
|
111
|
+
label?: string;
|
|
112
|
+
/** Show labels beside the icons. `responsive` hides them below `sm`. */
|
|
113
|
+
showLabels?: boolean | 'responsive';
|
|
114
|
+
className?: string;
|
|
115
|
+
classNames?: Partial<Record<'option' | 'activeOption', string>>;
|
|
116
|
+
}
|
|
117
|
+
declare const viewSwitcherVariants: (props?: ({
|
|
118
|
+
size?: "sm" | "md" | null | undefined;
|
|
119
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
120
|
+
/**
|
|
121
|
+
* Keyboard model is a radio group: one tab stop, arrows move *and* select.
|
|
122
|
+
* Every option is visible, so moving the selection is the whole interaction —
|
|
123
|
+
* there is nothing to "commit" afterwards.
|
|
124
|
+
*/
|
|
125
|
+
declare const ViewSwitcher: React.ForwardRefExoticComponent<ViewSwitcherProps & React.RefAttributes<HTMLDivElement>>;
|
|
126
|
+
|
|
127
|
+
export { type Stage as S, type ViewBaseProps as V, type ViewLabels as a, type ViewId as b, type ViewOption as c, ViewSwitcher as d, type ViewSwitcherProps as e, viewSwitcherVariants as v };
|