eidotter 0.35.0 → 0.36.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.
@@ -0,0 +1,40 @@
1
+ import React from 'react';
2
+ export interface ChecklistRowProps {
3
+ /** Whether the item is checked. */
4
+ checked: boolean;
5
+ /** Toggle handler. */
6
+ onToggle: () => void;
7
+ /** Disable the toggle. */
8
+ disabled?: boolean;
9
+ /** Dim the row while a mutation is in flight. */
10
+ pending?: boolean;
11
+ /** Accessible label for the toggle (overrides the default). */
12
+ ariaLabel?: string;
13
+ /**
14
+ * Label colour. `muted` strikes through + dims (completed items). Routes
15
+ * through `text-dos-*` semantic roles, AA-safe under amber-mono.
16
+ * @default 'default'
17
+ */
18
+ labelTone?: 'default' | 'muted' | 'error';
19
+ /** Primary label content (toned). Optional — omit and use `children` for free body content. */
20
+ label?: React.ReactNode;
21
+ /** Free body content rendered below the label (alternative/addition to `label`). */
22
+ children?: React.ReactNode;
23
+ /** Optional secondary note rendered under the label. */
24
+ note?: React.ReactNode;
25
+ /** Optional content above the label (e.g. a badge row). */
26
+ leading?: React.ReactNode;
27
+ /** Optional trailing content (e.g. an action), right-aligned. */
28
+ trailing?: React.ReactNode;
29
+ /** Additional CSS class name. */
30
+ className?: string;
31
+ }
32
+ /**
33
+ * DOS-styled checklist row — a `[x]`/`[ ]` toggle plus label, optional note,
34
+ * and leading/trailing slots. Ported from Steuerdash (DMNC-856).
35
+ *
36
+ * The toggle is a real `<button>` (keyboard + screen-reader operable); the
37
+ * `[x]`/`[ ]` glyph is the DOS checkbox aesthetic. Tones and the note route
38
+ * through `text-dos-*` semantic roles (not raw `cga-*`) so the row re-themes.
39
+ */
40
+ export declare const ChecklistRow: React.FC<ChecklistRowProps>;
@@ -0,0 +1,2 @@
1
+ export { ChecklistRow } from './ChecklistRow';
2
+ export type { ChecklistRowProps } from './ChecklistRow';
@@ -0,0 +1,2 @@
1
+ export { ChecklistRow } from './components';
2
+ export type { ChecklistRowProps } from './components';
@@ -0,0 +1,22 @@
1
+ import React from 'react';
2
+ export interface CopyButtonProps {
3
+ /** Text to copy to the clipboard. */
4
+ value: string;
5
+ /** Resting label (DOS aesthetic). @default '[cp]' */
6
+ label?: string;
7
+ /** Label shown briefly after a successful copy. @default '[OK]' */
8
+ copiedLabel?: string;
9
+ /** Accessible name + tooltip in the resting state. @default 'Copy to clipboard' */
10
+ title?: string;
11
+ /** Accessible name + tooltip after copying. @default 'Copied!' */
12
+ copiedTitle?: string;
13
+ /** Additional CSS class name. */
14
+ className?: string;
15
+ }
16
+ /**
17
+ * DOS-styled copy-to-clipboard button — shows `[cp]`, flips to `[OK]` for ~1.5s
18
+ * after a successful copy. Uses the async Clipboard API with a `execCommand`
19
+ * fallback. Ported from Steuerdash (DMNC-858); English default labels (was
20
+ * German) and `text-dos-link` semantic roles.
21
+ */
22
+ export declare const CopyButton: React.FC<CopyButtonProps>;
@@ -0,0 +1,2 @@
1
+ export { CopyButton } from './CopyButton';
2
+ export type { CopyButtonProps } from './CopyButton';
@@ -0,0 +1,2 @@
1
+ export { CopyButton } from './components';
2
+ export type { CopyButtonProps } from './components';
@@ -0,0 +1,28 @@
1
+ import React from 'react';
2
+ import './LabeledProgress.css';
3
+ export interface LabeledProgressProps {
4
+ /** Optional leading label rendered before the bar. */
5
+ label?: React.ReactNode;
6
+ /** Current value. */
7
+ value: number;
8
+ /** Maximum value. @default 100 */
9
+ max?: number;
10
+ /** Suffix appended to the trailing value (e.g. '%', ' EUR', '/24'). @default '%' */
11
+ valueSuffix?: string;
12
+ /** Show the trailing value. @default true */
13
+ showValue?: boolean;
14
+ /** Accessible label (falls back to a string `label`, else the percentage). */
15
+ 'aria-label'?: string;
16
+ /** Additional CSS class name. */
17
+ className?: string;
18
+ }
19
+ /**
20
+ * DOS-styled labelled progress bar — optional leading label, a width-accurate
21
+ * amber fill, and a trailing value with a custom suffix (DMNC-861).
22
+ *
23
+ * A standalone div-bar (not the block-fill `<Progress>`): `<Progress>`'s
24
+ * monospace `█`/`░` fill renders wider than the track in some fonts, so a
25
+ * solid-fill bar is width-accurate. The fill animates via `transform: scaleX`
26
+ * (compositor-only; reduced-motion disables it).
27
+ */
28
+ export declare const LabeledProgress: React.FC<LabeledProgressProps>;
@@ -0,0 +1,2 @@
1
+ export { LabeledProgress } from './LabeledProgress';
2
+ export type { LabeledProgressProps } from './LabeledProgress';
@@ -0,0 +1,2 @@
1
+ export { LabeledProgress } from './components';
2
+ export type { LabeledProgressProps } from './components';
@@ -0,0 +1,32 @@
1
+ import React from 'react';
2
+ export interface LedgerRowProps {
3
+ /** Primary label (left side). */
4
+ label: React.ReactNode;
5
+ /** Optional secondary note under the label. */
6
+ note?: React.ReactNode;
7
+ /**
8
+ * Right-aligned value. Pass a **pre-formatted** string or node — the consumer
9
+ * owns currency/locale formatting (the DS stays locale-agnostic). Rendered
10
+ * with the accent colour + `tabular-nums` for column alignment.
11
+ */
12
+ value: React.ReactNode;
13
+ /** When set, renders a {@link CopyButton} that copies this raw string. */
14
+ copyValue?: string;
15
+ /** Optional trailing content (badges, links, toggles) right of the value. */
16
+ trailing?: React.ReactNode;
17
+ /** Dim the row while a mutation is in flight. */
18
+ pending?: boolean;
19
+ /** Additional CSS class name. */
20
+ className?: string;
21
+ }
22
+ /**
23
+ * DOS-styled ledger row — a label/note on the left and a right-aligned value
24
+ * with optional copy + trailing slot. A generic value-row primitive.
25
+ *
26
+ * Generalised from Steuerdash's money-specific LedgerRow (DMNC-857): currency
27
+ * formatting, Paperless links, and verify/shared badges are intentionally NOT
28
+ * built in — pass a pre-formatted `value`, a raw `copyValue` for the copy
29
+ * affordance, and compose domain chrome via `trailing`. Routes through
30
+ * `text-dos-*` semantic roles so it re-themes.
31
+ */
32
+ export declare const LedgerRow: React.FC<LedgerRowProps>;
@@ -0,0 +1,2 @@
1
+ export { LedgerRow } from './LedgerRow';
2
+ export type { LedgerRowProps } from './LedgerRow';
@@ -0,0 +1,2 @@
1
+ export { LedgerRow } from './components';
2
+ export type { LedgerRowProps } from './components';
@@ -0,0 +1,31 @@
1
+ import React from 'react';
2
+ export interface SelectOption {
3
+ value: string;
4
+ label: string;
5
+ }
6
+ export interface SelectProps {
7
+ /** Currently selected value (controlled). */
8
+ value: string;
9
+ /** Options to render. */
10
+ options: SelectOption[];
11
+ /** Fired with the new value on change. */
12
+ onChange: (value: string) => void;
13
+ /** Optional id for label association. */
14
+ id?: string;
15
+ /** Accessible label when there is no visible `<label>`. */
16
+ 'aria-label'?: string;
17
+ /** Disable the control. */
18
+ disabled?: boolean;
19
+ /** Additional CSS class name. */
20
+ className?: string;
21
+ }
22
+ /**
23
+ * DOS-styled select — MVP wrapper around a native `<select>` (DMNC-860).
24
+ * Ported from Steuerdash.
25
+ *
26
+ * Font-size is set via inline style, not a `text-dos-*` class: Tailwind v4's
27
+ * Preflight form reset (`select { font-size: 100% }`) outranks utility classes
28
+ * on a native `<select>`, so the inline style is the reliable escape hatch
29
+ * (token-driven). Upstream component fix tracked at eidotter#349.
30
+ */
31
+ export declare const Select: React.FC<SelectProps>;
@@ -0,0 +1,2 @@
1
+ export { Select } from './Select';
2
+ export type { SelectProps, SelectOption } from './Select';
@@ -0,0 +1,2 @@
1
+ export { Select } from './components';
2
+ export type { SelectProps, SelectOption } from './components';