@wickermoney/ui-kit 0.4.1 → 0.5.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,21 @@
1
+ import { type ReactNode } from 'react';
2
+ /** Props for {@link Dialog}. */
3
+ export interface DialogProps {
4
+ /** Heading shown at the top; also the dialog's accessible name. */
5
+ readonly title: string;
6
+ /** Called when the user dismisses the dialog: Escape, the close button or a click outside it. */
7
+ readonly onClose: () => void;
8
+ /** The dialog content, usually a form. */
9
+ readonly children?: ReactNode;
10
+ }
11
+ /**
12
+ * A modal dialog: a side drawer on a desktop window and a full-screen sheet on
13
+ * a phone.
14
+ *
15
+ * Rendered only while it is wanted, so a form inside starts fresh each time it
16
+ * opens. It is the native `<dialog>` shown with `showModal()`, which supplies
17
+ * what a hand-rolled modal gets wrong: the page behind it is inert, Tab stays
18
+ * inside, and Escape closes it. Focus goes back to whatever opened it.
19
+ */
20
+ export declare function Dialog({ title, onClose, children }: DialogProps): import("react").JSX.Element;
21
+ //# sourceMappingURL=Dialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../src/Dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAEhE,gCAAgC;AAChC,MAAM,WAAW,WAAW;IAC1B,mEAAmE;IACnE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,iGAAiG;IACjG,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAA;IAC5B,0CAA0C;IAC1C,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAA;CAC9B;AAED;;;;;;;;GAQG;AACH,wBAAgB,MAAM,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,WAAW,+BAsC/D"}
package/dist/Dialog.js ADDED
@@ -0,0 +1,35 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useEffect, useId, useRef } from 'react';
3
+ /**
4
+ * A modal dialog: a side drawer on a desktop window and a full-screen sheet on
5
+ * a phone.
6
+ *
7
+ * Rendered only while it is wanted, so a form inside starts fresh each time it
8
+ * opens. It is the native `<dialog>` shown with `showModal()`, which supplies
9
+ * what a hand-rolled modal gets wrong: the page behind it is inert, Tab stays
10
+ * inside, and Escape closes it. Focus goes back to whatever opened it.
11
+ */
12
+ export function Dialog({ title, onClose, children }) {
13
+ const ref = useRef(null);
14
+ const titleId = useId();
15
+ // A drag that starts inside the dialog (selecting text in an input) and ends
16
+ // on the backdrop still fires a click on the dialog; only a press that began
17
+ // on the backdrop counts as "click outside".
18
+ const pressedBackdrop = useRef(false);
19
+ useEffect(() => {
20
+ const dialog = ref.current;
21
+ const opener = document.activeElement instanceof HTMLElement ? document.activeElement : null;
22
+ if (dialog !== null && !dialog.open) {
23
+ if (typeof dialog.showModal === 'function')
24
+ dialog.showModal();
25
+ else
26
+ dialog.setAttribute('open', '');
27
+ // showModal() would focus the close button; a form wants its first field.
28
+ dialog.querySelector('.wm-dialog__body :is(input, select, textarea)')?.focus();
29
+ }
30
+ return () => { opener?.focus(); };
31
+ }, []);
32
+ return (_jsxs("dialog", { ref: ref, className: "wm-dialog", "aria-labelledby": titleId, onClose: onClose, onMouseDown: (e) => { pressedBackdrop.current = e.target === e.currentTarget; }, onClick: (e) => { if (pressedBackdrop.current && e.target === e.currentTarget)
33
+ onClose(); }, children: [_jsxs("div", { className: "wm-dialog__header", children: [_jsx("h2", { className: "wm-dialog__title", id: titleId, children: title }), _jsx("button", { type: "button", className: "wm-btn wm-dialog__close", "aria-label": "Close", onClick: onClose, children: "\u00D7" })] }), _jsx("div", { className: "wm-dialog__body", children: children })] }));
34
+ }
35
+ //# sourceMappingURL=Dialog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dialog.js","sourceRoot":"","sources":["../src/Dialog.tsx"],"names":[],"mappings":";AAAA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C9E,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,GAAG,IAAI,eAAe,CAAC,OAAO,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,aAAa;YAAE,OAAO,EAAE,CAAA,CAAC,CAAC,aAE1F,eAAK,SAAS,EAAC,mBAAmB,aAChC,aAAI,SAAS,EAAC,kBAAkB,EAAC,EAAE,EAAE,OAAO,YAAG,KAAK,GAAM,EAC1D,iBAAQ,IAAI,EAAC,QAAQ,EAAC,SAAS,EAAC,yBAAyB,gBAAY,OAAO,EAAC,OAAO,EAAE,OAAO,uBAEpF,IACL,EACN,cAAK,SAAS,EAAC,iBAAiB,YAAE,QAAQ,GAAO,IAC1C,CACV,CAAA;AACH,CAAC"}
@@ -0,0 +1,25 @@
1
+ import type { ButtonHTMLAttributes } from 'react';
2
+ /** The icons an {@link IconButton} can draw. */
3
+ export type IconName = 'edit' | 'delete' | 'disable' | 'enable' | 'archive' | 'history' | 'end' | 'balance';
4
+ /** Props for {@link IconButton}: every native `<button>` attribute except its content. */
5
+ export interface IconButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children' | 'title' | 'aria-label'> {
6
+ /** Which icon to draw. */
7
+ readonly icon: IconName;
8
+ /**
9
+ * What the button does, in words ("Edit", "Delete"). It is the button's
10
+ * accessible name and its hover tooltip, so it is required: an icon alone
11
+ * says nothing to a screen reader.
12
+ */
13
+ readonly label: string;
14
+ /** Visual emphasis. Defaults to `"default"`. */
15
+ readonly variant?: 'default' | 'danger';
16
+ }
17
+ /**
18
+ * A square, icon-only button for table rows.
19
+ *
20
+ * Uses the same `wm-btn` styling as {@link Button}, so disabled, hover and the
21
+ * danger colour behave identically; it only swaps the text for a drawn icon and
22
+ * pins the size so a column of them lines up.
23
+ */
24
+ export declare function IconButton({ icon, label, variant, className, ...rest }: IconButtonProps): import("react").JSX.Element;
25
+ //# sourceMappingURL=IconButton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../src/IconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAa,MAAM,OAAO,CAAA;AAE5D,gDAAgD;AAChD,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,CAAA;AAoE3G,0FAA0F;AAC1F,MAAM,WAAW,eACf,SAAQ,IAAI,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,UAAU,GAAG,OAAO,GAAG,YAAY,CAAC;IAC1F,0BAA0B;IAC1B,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAA;IACvB;;;;OAIG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,gDAAgD;IAChD,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAA;CACxC;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,OAAmB,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,eAAe,+BAcnG"}
@@ -0,0 +1,26 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ // Paths are 24x24, stroke-only, in the style of the Lucide set (ISC licence).
3
+ const ICONS = {
4
+ edit: (_jsxs(_Fragment, { children: [_jsx("path", { d: "M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z" }), _jsx("path", { d: "m15 5 4 4" })] })),
5
+ delete: (_jsxs(_Fragment, { children: [_jsx("path", { d: "M3 6h18" }), _jsx("path", { d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6" }), _jsx("path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2" }), _jsx("path", { d: "M10 11v6" }), _jsx("path", { d: "M14 11v6" })] })),
6
+ enable: (_jsxs(_Fragment, { children: [_jsx("path", { d: "M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z" }), _jsx("circle", { cx: "12", cy: "12", r: "3" })] })),
7
+ archive: (_jsxs(_Fragment, { children: [_jsx("rect", { width: "20", height: "5", x: "2", y: "3", rx: "1" }), _jsx("path", { d: "M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8" }), _jsx("path", { d: "M10 12h4" })] })),
8
+ history: (_jsxs(_Fragment, { children: [_jsx("path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }), _jsx("path", { d: "M3 3v5h5" }), _jsx("path", { d: "M12 7v5l4 2" })] })),
9
+ end: (_jsxs(_Fragment, { children: [_jsx("path", { d: "M8 2v4" }), _jsx("path", { d: "M16 2v4" }), _jsx("rect", { width: "18", height: "18", x: "3", y: "4", rx: "2" }), _jsx("path", { d: "M3 10h18" }), _jsx("path", { d: "m14 14-4 4" }), _jsx("path", { d: "m10 14 4 4" })] })),
10
+ balance: (_jsxs(_Fragment, { children: [_jsx("path", { d: "m16 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z" }), _jsx("path", { d: "m2 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z" }), _jsx("path", { d: "M7 21h10" }), _jsx("path", { d: "M12 3v18" }), _jsx("path", { d: "M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2" })] })),
11
+ disable: (_jsxs(_Fragment, { children: [_jsx("path", { d: "M9.88 9.88a3 3 0 1 0 4.24 4.24" }), _jsx("path", { d: "M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68" }), _jsx("path", { d: "M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61" }), _jsx("path", { d: "M2 2l20 20" })] })),
12
+ };
13
+ /**
14
+ * A square, icon-only button for table rows.
15
+ *
16
+ * Uses the same `wm-btn` styling as {@link Button}, so disabled, hover and the
17
+ * danger colour behave identically; it only swaps the text for a drawn icon and
18
+ * pins the size so a column of them lines up.
19
+ */
20
+ export function IconButton({ icon, label, variant = 'default', className, ...rest }) {
21
+ const classes = ['wm-btn', 'wm-icon-btn', variant === 'danger' ? 'wm-btn--danger' : '', className ?? '']
22
+ .filter(Boolean)
23
+ .join(' ');
24
+ return (_jsx("button", { type: "button", ...rest, className: classes, "aria-label": label, title: label, children: _jsx("svg", { viewBox: "0 0 24 24", width: "16", height: "16", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", focusable: "false", children: ICONS[icon] }) }));
25
+ }
26
+ //# sourceMappingURL=IconButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IconButton.js","sourceRoot":"","sources":["../src/IconButton.tsx"],"names":[],"mappings":";AAKA,8EAA8E;AAC9E,MAAM,KAAK,GAAgC;IACzC,IAAI,EAAE,CACJ,8BACE,eAAM,CAAC,EAAC,kDAAkD,GAAG,EAC7D,eAAM,CAAC,EAAC,WAAW,GAAG,IACrB,CACJ;IACD,MAAM,EAAE,CACN,8BACE,eAAM,CAAC,EAAC,SAAS,GAAG,EACpB,eAAM,CAAC,EAAC,uCAAuC,GAAG,EAClD,eAAM,CAAC,EAAC,oCAAoC,GAAG,EAC/C,eAAM,CAAC,EAAC,UAAU,GAAG,EACrB,eAAM,CAAC,EAAC,UAAU,GAAG,IACpB,CACJ;IACD,MAAM,EAAE,CACN,8BACE,eAAM,CAAC,EAAC,8CAA8C,GAAG,EACzD,iBAAQ,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,IAAI,EAAC,CAAC,EAAC,GAAG,GAAG,IAC/B,CACJ;IACD,OAAO,EAAE,CACP,8BACE,eAAM,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,GAAG,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,GAAG,EAAC,EAAE,EAAC,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C,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,EAAE,SAAS,IAAI,EAAE,CAAC;SACrG,MAAM,CAAC,OAAO,CAAC;SACf,IAAI,CAAC,GAAG,CAAC,CAAA;IACZ,OAAO,CACL,iBAAQ,IAAI,EAAC,QAAQ,KAAK,IAAI,EAAE,SAAS,EAAE,OAAO,gBAAc,KAAK,EAAE,KAAK,EAAE,KAAK,YACjF,cACE,OAAO,EAAC,WAAW,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,IAAI,EAAC,MAAM,EAAC,MAAM,EAAC,cAAc,EAC5E,WAAW,EAAC,GAAG,EAAC,aAAa,EAAC,OAAO,EAAC,cAAc,EAAC,OAAO,iBAAa,MAAM,EAAC,SAAS,EAAC,OAAO,YAEhG,KAAK,CAAC,IAAI,CAAC,GACR,GACC,CACV,CAAA;AACH,CAAC"}
package/dist/Spinner.d.ts CHANGED
@@ -1,8 +1,14 @@
1
1
  /** Props for {@link Spinner}. */
2
2
  export interface SpinnerProps {
3
- /** Accessible name announced by screen readers. Defaults to `"Loading"`. */
3
+ /** Text announced by screen readers. Defaults to `"Loading"`. */
4
4
  readonly label?: string;
5
5
  }
6
- /** An inline loading indicator with `role="status"`. */
6
+ /**
7
+ * An inline loading indicator with `role="status"`.
8
+ *
9
+ * The label is visually hidden text inside the status region rather than an
10
+ * `aria-label` on an empty element, so assistive technology announces it when
11
+ * the spinner appears.
12
+ */
7
13
  export declare function Spinner({ label }: SpinnerProps): import("react").JSX.Element;
8
14
  //# sourceMappingURL=Spinner.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Spinner.d.ts","sourceRoot":"","sources":["../src/Spinner.tsx"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,MAAM,WAAW,YAAY;IAC3B,4EAA4E;IAC5E,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CACxB;AAED,wDAAwD;AACxD,wBAAgB,OAAO,CAAC,EAAE,KAAiB,EAAE,EAAE,YAAY,+BAE1D"}
1
+ {"version":3,"file":"Spinner.d.ts","sourceRoot":"","sources":["../src/Spinner.tsx"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,MAAM,WAAW,YAAY;IAC3B,iEAAiE;IACjE,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CACxB;AAED;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,EAAE,KAAiB,EAAE,EAAE,YAAY,+BAM1D"}
package/dist/Spinner.js CHANGED
@@ -1,6 +1,12 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- /** An inline loading indicator with `role="status"`. */
2
+ /**
3
+ * An inline loading indicator with `role="status"`.
4
+ *
5
+ * The label is visually hidden text inside the status region rather than an
6
+ * `aria-label` on an empty element, so assistive technology announces it when
7
+ * the spinner appears.
8
+ */
3
9
  export function Spinner({ label = 'Loading' }) {
4
- return _jsx("span", { className: "wm-spinner", role: "status", "aria-label": label });
10
+ return (_jsx("span", { className: "wm-spinner", role: "status", children: _jsx("span", { className: "wm-visually-hidden", children: label }) }));
5
11
  }
6
12
  //# sourceMappingURL=Spinner.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Spinner.js","sourceRoot":"","sources":["../src/Spinner.tsx"],"names":[],"mappings":";AAMA,wDAAwD;AACxD,MAAM,UAAU,OAAO,CAAC,EAAE,KAAK,GAAG,SAAS,EAAgB;IACzD,OAAO,eAAM,SAAS,EAAC,YAAY,EAAC,IAAI,EAAC,QAAQ,gBAAa,KAAK,GAAI,CAAA;AACzE,CAAC"}
1
+ {"version":3,"file":"Spinner.js","sourceRoot":"","sources":["../src/Spinner.tsx"],"names":[],"mappings":";AAMA;;;;;;GAMG;AACH,MAAM,UAAU,OAAO,CAAC,EAAE,KAAK,GAAG,SAAS,EAAgB;IACzD,OAAO,CACL,eAAM,SAAS,EAAC,YAAY,EAAC,IAAI,EAAC,QAAQ,YACxC,eAAM,SAAS,EAAC,oBAAoB,YAAE,KAAK,GAAQ,GAC9C,CACR,CAAA;AACH,CAAC"}
package/dist/Surface.d.ts CHANGED
@@ -7,7 +7,12 @@ export interface SurfaceProps {
7
7
  readonly action?: ReactNode;
8
8
  /** The surface content. */
9
9
  readonly children?: ReactNode;
10
+ /**
11
+ * Heading level for the title. Defaults to `2`, since a surface normally sits
12
+ * under its page's own heading; pass `1` when the surface is the page.
13
+ */
14
+ readonly level?: 1 | 2;
10
15
  }
11
16
  /** A titled panel. The container that widgets and pages sit inside. */
12
- export declare function Surface({ title, action, children }: SurfaceProps): import("react").JSX.Element;
17
+ export declare function Surface({ title, action, children, level }: SurfaceProps): import("react").JSX.Element;
13
18
  //# sourceMappingURL=Surface.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Surface.d.ts","sourceRoot":"","sources":["../src/Surface.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,iCAAiC;AACjC,MAAM,WAAW,YAAY;IAC3B,+CAA+C;IAC/C,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;IACvB,+DAA+D;IAC/D,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,CAAA;IAC3B,2BAA2B;IAC3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAA;CAC9B;AAED,uEAAuE;AACvE,wBAAgB,OAAO,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,YAAY,+BAahE"}
1
+ {"version":3,"file":"Surface.d.ts","sourceRoot":"","sources":["../src/Surface.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,iCAAiC;AACjC,MAAM,WAAW,YAAY;IAC3B,+CAA+C;IAC/C,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;IACvB,+DAA+D;IAC/D,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,CAAA;IAC3B,2BAA2B;IAC3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAA;IAC7B;;;OAGG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,CAAA;CACvB;AAED,uEAAuE;AACvE,wBAAgB,OAAO,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAS,EAAE,EAAE,YAAY,+BAc3E"}
package/dist/Surface.js CHANGED
@@ -1,7 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  /** A titled panel. The container that widgets and pages sit inside. */
3
- export function Surface({ title, action, children }) {
3
+ export function Surface({ title, action, children, level = 2 }) {
4
+ const Heading = level === 1 ? 'h1' : 'h2';
4
5
  const hasHeader = title !== undefined || action !== undefined;
5
- return (_jsxs("section", { className: "wm-surface", children: [hasHeader ? (_jsxs("div", { className: "wm-surface__header", children: [title === undefined ? _jsx("span", {}) : _jsx("h2", { className: "wm-surface__title", children: title }), action] })) : null, _jsx("div", { className: "wm-surface__body", children: children })] }));
6
+ return (_jsxs("section", { className: "wm-surface", children: [hasHeader ? (_jsxs("div", { className: "wm-surface__header", children: [title === undefined ? _jsx("span", {}) : _jsx(Heading, { className: "wm-surface__title", children: title }), action] })) : null, _jsx("div", { className: "wm-surface__body", children: children })] }));
6
7
  }
7
8
  //# sourceMappingURL=Surface.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Surface.js","sourceRoot":"","sources":["../src/Surface.tsx"],"names":[],"mappings":";AAYA,uEAAuE;AACvE,MAAM,UAAU,OAAO,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAgB;IAC/D,MAAM,SAAS,GAAG,KAAK,KAAK,SAAS,IAAI,MAAM,KAAK,SAAS,CAAA;IAC7D,OAAO,CACL,mBAAS,SAAS,EAAC,YAAY,aAC5B,SAAS,CAAC,CAAC,CAAC,CACX,eAAK,SAAS,EAAC,oBAAoB,aAChC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,gBAAQ,CAAC,CAAC,CAAC,aAAI,SAAS,EAAC,mBAAmB,YAAE,KAAK,GAAM,EAC/E,MAAM,IACH,CACP,CAAC,CAAC,CAAC,IAAI,EACR,cAAK,SAAS,EAAC,kBAAkB,YAAE,QAAQ,GAAO,IAC1C,CACX,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"Surface.js","sourceRoot":"","sources":["../src/Surface.tsx"],"names":[],"mappings":";AAiBA,uEAAuE;AACvE,MAAM,UAAU,OAAO,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,GAAG,CAAC,EAAgB;IAC1E,MAAM,OAAO,GAAG,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAA;IACzC,MAAM,SAAS,GAAG,KAAK,KAAK,SAAS,IAAI,MAAM,KAAK,SAAS,CAAA;IAC7D,OAAO,CACL,mBAAS,SAAS,EAAC,YAAY,aAC5B,SAAS,CAAC,CAAC,CAAC,CACX,eAAK,SAAS,EAAC,oBAAoB,aAChC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,gBAAQ,CAAC,CAAC,CAAC,KAAC,OAAO,IAAC,SAAS,EAAC,mBAAmB,YAAE,KAAK,GAAW,EACzF,MAAM,IACH,CACP,CAAC,CAAC,CAAC,IAAI,EACR,cAAK,SAAS,EAAC,kBAAkB,YAAE,QAAQ,GAAO,IAC1C,CACX,CAAA;AACH,CAAC"}
package/dist/Table.d.ts CHANGED
@@ -23,6 +23,13 @@ export interface TableProps<T> {
23
23
  readonly rowKey: (row: T) => string;
24
24
  /** Rendered instead of the table when `rows` is empty. */
25
25
  readonly empty?: ReactNode;
26
+ /**
27
+ * An extra class on the table's scroller, for a page that restyles its table
28
+ * (the transactions list turns into stacked cards on phones). Cells carry
29
+ * `data-col` with their column key, and `data-label` with their header when it
30
+ * is text, so that CSS can place them and label them.
31
+ */
32
+ readonly className?: string;
26
33
  }
27
34
  /**
28
35
  * A data table.
@@ -30,5 +37,5 @@ export interface TableProps<T> {
30
37
  * Wrapped in its own horizontal scroller so that a wide table does not force the
31
38
  * whole page to scroll sideways on a narrow screen.
32
39
  */
33
- export declare function Table<T>({ columns, rows, rowKey, empty }: TableProps<T>): import("react").JSX.Element;
40
+ export declare function Table<T>({ columns, rows, rowKey, empty, className }: TableProps<T>): import("react").JSX.Element;
34
41
  //# sourceMappingURL=Table.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../src/Table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,+CAA+C;AAC/C,MAAM,WAAW,MAAM,CAAC,CAAC;IACvB,wCAAwC;IACxC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB;;;OAGG;IACH,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAA;IAC1B,8EAA8E;IAC9E,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAA;IAC1B,oCAAoC;IACpC,QAAQ,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,SAAS,CAAA;CACvC;AAED,+BAA+B;AAC/B,MAAM,WAAW,UAAU,CAAC,CAAC;IAC3B,4CAA4C;IAC5C,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,CAAC,CAAC,CAAC,EAAE,CAAA;IACtC,+BAA+B;IAC/B,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC,EAAE,CAAA;IAC3B,oDAAoD;IACpD,QAAQ,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,MAAM,CAAA;IACnC,0DAA0D;IAC1D,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAA;CAC3B;AAED;;;;;GAKG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,UAAU,CAAC,CAAC,CAAC,+BA0BvE"}
1
+ {"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../src/Table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,+CAA+C;AAC/C,MAAM,WAAW,MAAM,CAAC,CAAC;IACvB,wCAAwC;IACxC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB;;;OAGG;IACH,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAA;IAC1B,8EAA8E;IAC9E,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAA;IAC1B,oCAAoC;IACpC,QAAQ,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,SAAS,CAAA;CACvC;AAED,+BAA+B;AAC/B,MAAM,WAAW,UAAU,CAAC,CAAC;IAC3B,4CAA4C;IAC5C,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,CAAC,CAAC,CAAC,EAAE,CAAA;IACtC,+BAA+B;IAC/B,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC,EAAE,CAAA;IAC3B,oDAAoD;IACpD,QAAQ,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,MAAM,CAAA;IACnC,0DAA0D;IAC1D,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAA;IAC1B;;;;;OAKG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAC5B;AAED;;;;;GAKG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,UAAU,CAAC,CAAC,CAAC,+BA+BlF"}
package/dist/Table.js CHANGED
@@ -5,9 +5,9 @@ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-run
5
5
  * Wrapped in its own horizontal scroller so that a wide table does not force the
6
6
  * whole page to scroll sideways on a narrow screen.
7
7
  */
8
- export function Table({ columns, rows, rowKey, empty }) {
8
+ export function Table({ columns, rows, rowKey, empty, className }) {
9
9
  if (rows.length === 0 && empty !== undefined)
10
10
  return _jsx(_Fragment, { children: empty });
11
- return (_jsx("div", { className: "wm-table__scroll", children: _jsxs("table", { className: "wm-table", children: [_jsx("thead", { children: _jsx("tr", { children: columns.map((c) => (_jsx("th", { className: c.numeric === true ? 'wm-num' : undefined, children: c.header }, c.key))) }) }), _jsx("tbody", { children: rows.map((row) => (_jsx("tr", { children: columns.map((c) => (_jsx("td", { className: c.numeric === true ? 'wm-num' : undefined, children: c.render(row) }, c.key))) }, rowKey(row)))) })] }) }));
11
+ return (_jsx("div", { className: className === undefined ? 'wm-table__scroll' : `wm-table__scroll ${className}`, children: _jsxs("table", { className: "wm-table", children: [_jsx("thead", { children: _jsx("tr", { children: columns.map((c) => (_jsx("th", { "data-col": c.key, className: c.numeric === true ? 'wm-num' : undefined, children: c.header }, c.key))) }) }), _jsx("tbody", { children: rows.map((row) => (_jsx("tr", { children: columns.map((c) => (_jsx("td", { "data-col": c.key, "data-label": typeof c.header === 'string' && c.header !== '' ? c.header : undefined, className: c.numeric === true ? 'wm-num' : undefined, children: c.render(row) }, c.key))) }, rowKey(row)))) })] }) }));
12
12
  }
13
13
  //# sourceMappingURL=Table.js.map
package/dist/Table.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Table.js","sourceRoot":"","sources":["../src/Table.tsx"],"names":[],"mappings":";AA6BA;;;;;GAKG;AACH,MAAM,UAAU,KAAK,CAAI,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAiB;IACtE,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,4BAAG,KAAK,GAAI,CAAA;IACjE,OAAO,CACL,cAAK,SAAS,EAAC,kBAAkB,YAC/B,iBAAO,SAAS,EAAC,UAAU,aACzB,0BACE,uBACG,OAAO,C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AC,QAAQ,CAAC,CAAC,CAAC,SAAS,YAAG,CAAC,CAAC,MAAM,IAAvF,CAAC,CAAC,GAAG,CAAwF,CACvG,CAAC,GACC,GACC,EACR,0BACG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CACjB,uBACG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAClB,yBAEY,CAAC,CAAC,GAAG,gBACH,OAAO,CAAC,CAAC,MAAM,KAAK,QAAQ,IAAI,CAAC,CAAC,MAAM,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,EAClF,SAAS,EAAE,CAAC,CAAC,OAAO,KAAK,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,YAEnD,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,IALT,CAAC,CAAC,GAAG,CAMP,CACN,CAAC,IAVK,MAAM,CAAC,GAAG,CAAC,CAWf,CACN,CAAC,GACI,IACF,GACJ,CACP,CAAA;AACH,CAAC"}
@@ -27,6 +27,12 @@
27
27
  }
28
28
  .wm-btn--primary:hover:not(:disabled) { filter: brightness(1.08); }
29
29
  .wm-btn--danger { color: var(--wm-negative); }
30
+ /* Icon-only buttons: square and fixed, so a column of them lines up whatever the row holds. */
31
+ .wm-icon-btn, .wm-icon-slot { flex: none; width: 32px; height: 32px; padding: 0; }
32
+ /* An empty place where a row's button would be, so the buttons after it do not shift left. */
33
+ .wm-icon-slot { display: block; }
34
+ /* A row's buttons on one line. Never wraps: a wrapped pair is what made Edit sit above Delete. */
35
+ .wm-row-actions { display: flex; flex-wrap: nowrap; align-items: center; justify-content: flex-end; gap: 6px; }
30
36
 
31
37
  .wm-field { display: flex; flex-direction: column; gap: 4px; margin-bottom: var(--wm-gap-sm); }
32
38
  .wm-field__label { font-size: 12px; font-weight: 600; color: var(--wm-text-muted); }
@@ -77,3 +83,39 @@
77
83
  background: var(--wm-surface-alt); border-radius: var(--wm-radius-sm);
78
84
  padding: 10px 12px; font-size: 13px;
79
85
  }
86
+
87
+ /* Text for assistive technology only. */
88
+ .wm-visually-hidden {
89
+ position: absolute; width: 1px; height: 1px; overflow: hidden;
90
+ clip-path: inset(50%); white-space: nowrap;
91
+ }
92
+
93
+ /* Dialog: a right-hand drawer on a desktop window, a full-screen sheet on a
94
+ phone. Height is dvh so the on-screen keyboard does not push Save off the
95
+ bottom, and the body scrolls on its own while the header stays put. */
96
+ .wm-dialog {
97
+ position: fixed; inset: 0 0 0 auto; margin: 0; padding: 0;
98
+ width: min(460px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh;
99
+ color: var(--wm-text); background: var(--wm-surface);
100
+ border: 0; border-left: 1px solid var(--wm-border); box-shadow: var(--wm-shadow);
101
+ }
102
+ .wm-dialog[open] { display: flex; flex-direction: column; }
103
+ .wm-dialog::backdrop { background: rgb(9 12 16 / 55%); }
104
+ .wm-dialog__header {
105
+ flex: none; display: flex; align-items: center; justify-content: space-between; gap: var(--wm-gap-sm);
106
+ padding: 12px var(--wm-gap); padding-top: max(12px, env(safe-area-inset-top));
107
+ border-bottom: 1px solid var(--wm-border);
108
+ }
109
+ .wm-dialog__title { margin: 0; font-size: 16px; font-weight: 650; }
110
+ .wm-dialog__close { flex: none; width: 36px; height: 36px; padding: 0; font-size: 20px; line-height: 1; }
111
+ .wm-dialog__body {
112
+ flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: var(--wm-gap);
113
+ padding-bottom: max(var(--wm-gap), env(safe-area-inset-bottom));
114
+ }
115
+ /* Cancel and Save at the foot of a dialog's form. */
116
+ .wm-dialog__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: var(--wm-gap-sm); }
117
+ /* The page behind a modal dialog does not scroll. */
118
+ body:has(.wm-dialog[open]) { overflow: hidden; }
119
+ @media (max-width: 560px) {
120
+ .wm-dialog { width: 100vw; border-left: 0; }
121
+ }
package/dist/index.d.ts CHANGED
@@ -2,8 +2,12 @@ import './tokens.css';
2
2
  import './components.css';
3
3
  export { Surface } from './Surface.js';
4
4
  export type { SurfaceProps } from './Surface.js';
5
+ export { Dialog } from './Dialog.js';
6
+ export type { DialogProps } from './Dialog.js';
5
7
  export { Button } from './Button.js';
6
8
  export type { ButtonProps } from './Button.js';
9
+ export { IconButton } from './IconButton.js';
10
+ export type { IconButtonProps, IconName } from './IconButton.js';
7
11
  export { Field } from './Field.js';
8
12
  export type { FieldProps } from './Field.js';
9
13
  export type { FieldCommon } from './FieldCommon.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAA;AACrB,OAAO,kBAAkB,CAAA;AAEzB,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,YAAY,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,YAAY,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAClC,YAAY,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAC5C,YAAY,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC1C,YAAY,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AACpD,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/D,YAAY,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACpD,YAAY,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,YAAY,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;A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sBAAsB,CAAA;AACtD,YAAY,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAChE,YAAY,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAClC,YAAY,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,YAAY,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,YAAY,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA"}
package/dist/index.js CHANGED
@@ -1,7 +1,9 @@
1
1
  import './tokens.css';
2
2
  import './components.css';
3
3
  export { Surface } from './Surface.js';
4
+ export { Dialog } from './Dialog.js';
4
5
  export { Button } from './Button.js';
6
+ export { IconButton } from './IconButton.js';
5
7
  export { Field } from './Field.js';
6
8
  export { FormError } from './FormError.js';
7
9
  export { NO_FORM_ERRORS, hasFormErrors } from './FormErrors.js';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAA;AACrB,OAAO,kBAAkB,CAAA;AAEzB,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEpC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAGlC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE1C,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAE/D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAEpD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,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WAAW,CAAA;AAEhC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAGtD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAElC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAE5C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA"}
package/dist/tokens.css CHANGED
@@ -16,7 +16,7 @@
16
16
  --wm-accent-text: #ffffff;
17
17
  --wm-positive: #0c7e65;
18
18
  --wm-negative: #c0392b;
19
- --wm-warning: #b7791f;
19
+ --wm-warning: #8a5a0a;
20
20
 
21
21
  /*
22
22
  * Chart palette. Categorical slots are assigned in this fixed order and
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wickermoney/ui-kit",
3
- "version": "0.4.1",
3
+ "version": "0.5.0",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",