@ai-matrx/tap-target 0.2.7 → 0.2.9

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/index.d.cts CHANGED
@@ -1,96 +1 @@
1
- import * as react from 'react';
2
- import { ButtonHTMLAttributes } from 'react';
3
- import { T as TapTargetLinkComponent } from './link-CkRpHgou.cjs';
4
- export { a as TapTargetLinkProps, g as getTapTargetLinkComponent, s as setTapTargetLinkComponent } from './link-CkRpHgou.cjs';
5
-
6
- interface TapTargetButtonProps {
7
- icon?: React.ReactNode;
8
- children?: React.ReactNode;
9
- strokeWidth?: number | undefined;
10
- onClick?: (() => void) | undefined;
11
- className?: string | undefined;
12
- as?: "button" | "label" | undefined;
13
- htmlFor?: string | undefined;
14
- ariaLabel?: string | undefined;
15
- disabled?: boolean | undefined;
16
- /**
17
- * When set, the tap button renders as a link instead of a button.
18
- * - Internal hrefs (e.g. "/tasks") render via the injected link component
19
- * (`setTapTargetLinkComponent` / the `linkComponent` prop), falling back
20
- * to a plain `<a>` when none is registered.
21
- * - External hrefs (http://, https://, mailto:, tel:) render as `<a>`
22
- * with `target="_blank"` and `rel="noopener noreferrer"` by default.
23
- * - When combined with `disabled`, the trigger renders as a non-navigable
24
- * `<span aria-disabled="true">` with the same visual styling.
25
- */
26
- href?: string | undefined;
27
- /** Override target. Works on both internal links and external anchors. */
28
- target?: "_blank" | "_self" | "_parent" | "_top" | undefined;
29
- /** Override rel. Works on both internal links and external anchors. */
30
- rel?: string | undefined;
31
- /** Forwarded to the injected link component. Pass `false` to disable prefetching. */
32
- prefetch?: boolean | null | undefined;
33
- /**
34
- * Per-instance link component for internal hrefs — overrides the
35
- * module-level `setTapTargetLinkComponent` registration.
36
- */
37
- linkComponent?: TapTargetLinkComponent | undefined;
38
- /**
39
- * Tooltip text. Defaults to `ariaLabel` when omitted.
40
- * Pass `false` to explicitly disable the tooltip.
41
- */
42
- tooltip?: string | false | undefined;
43
- /** Tooltip placement. Defaults to "top". */
44
- tooltipSide?: "top" | "right" | "bottom" | "left" | undefined;
45
- /** Tooltip alignment along its side. Defaults to "center". */
46
- tooltipAlign?: "start" | "center" | "end" | undefined;
47
- /**
48
- * Visible caption rendered inline after the icon (`[icon Label]`).
49
- * Widens the pill automatically. Tooltip defaults to off when set — the
50
- * label is self-describing. Visible text becomes the accessible name.
51
- */
52
- label?: string | undefined;
53
- /**
54
- * Collapse an icon + caption pill to its icon-only 44px tap target below
55
- * the `sm` breakpoint. The caption and inline geometry return at `sm+`;
56
- * `ariaLabel` (falling back to `label`) remains the accessible name.
57
- */
58
- mobileIconOnly?: boolean | undefined;
59
- }
60
- interface TapTargetButtonSolidProps extends TapTargetButtonProps {
61
- bgColor?: string | undefined;
62
- iconColor?: string | undefined;
63
- hoverBgColor?: string | undefined;
64
- /**
65
- * Press-state background. Defaults to `active:brightness-90` which works on
66
- * any color. Override when using a custom `bgColor` that should darken to a
67
- * specific shade on press (e.g. `active:bg-primary/60`).
68
- */
69
- activeBgColor?: string | undefined;
70
- }
71
- declare const TapTargetButton: react.ForwardRefExoticComponent<TapTargetButtonProps & ButtonHTMLAttributes<HTMLButtonElement> & react.RefAttributes<HTMLButtonElement>>;
72
- declare const TapTargetButtonTransparent: react.ForwardRefExoticComponent<TapTargetButtonProps & ButtonHTMLAttributes<HTMLButtonElement> & react.RefAttributes<HTMLButtonElement>>;
73
- declare const TapTargetButtonSolid: react.ForwardRefExoticComponent<TapTargetButtonSolidProps & ButtonHTMLAttributes<HTMLButtonElement> & react.RefAttributes<HTMLButtonElement>>;
74
- /** Solid destructive pill — delete/remove actions. White-on-red like the
75
- * primary solid is white-on-blue. Use THIS, never hand-pass bg-destructive
76
- * with the default (dark) icon color. */
77
- declare const TapTargetButtonDestructive: react.ForwardRefExoticComponent<TapTargetButtonSolidProps & ButtonHTMLAttributes<HTMLButtonElement> & react.RefAttributes<HTMLButtonElement>>;
78
- declare const TapTargetButtonForGroup: react.ForwardRefExoticComponent<TapTargetButtonProps & ButtonHTMLAttributes<HTMLButtonElement> & react.RefAttributes<HTMLButtonElement>>;
79
- declare function TapTargetButtonGroup({ children, className, }: {
80
- children: React.ReactNode;
81
- className?: string | undefined;
82
- }): react.JSX.Element;
83
-
84
- /**
85
- * Wraps a TapTargetButton (or any tap control) like the button-demo page:
86
- * no extra padding on the control — only `gap-0.5` before the caption.
87
- * Tooltip shows the full `label`; the caption truncates at max-w-[52px].
88
- */
89
- declare function TapTargetLabeled({ label, children, hideLabel, toolTipSide, }: {
90
- label: string;
91
- children: React.ReactNode;
92
- hideLabel?: boolean | undefined;
93
- toolTipSide?: "top" | "bottom" | "left" | "right" | undefined;
94
- }): react.JSX.Element;
95
-
96
- export { TapTargetButton, TapTargetButtonDestructive, TapTargetButtonForGroup, TapTargetButtonGroup, type TapTargetButtonProps, TapTargetButtonSolid, type TapTargetButtonSolidProps, TapTargetButtonTransparent, TapTargetLabeled, TapTargetLinkComponent };
1
+ export { TapTargetButton, TapTargetButtonDestructive, TapTargetButtonForGroup, TapTargetButtonGroup, TapTargetButtonProps, TapTargetButtonSolid, TapTargetButtonSolidProps, TapTargetButtonTransparent, TapTargetLabeled, TapTargetLinkComponent, TapTargetLinkProps, getTapTargetLinkComponent, setTapTargetLinkComponent } from '@ai-matrx/design-system/tap-target';
package/dist/index.d.ts CHANGED
@@ -1,96 +1 @@
1
- import * as react from 'react';
2
- import { ButtonHTMLAttributes } from 'react';
3
- import { T as TapTargetLinkComponent } from './link-CkRpHgou.js';
4
- export { a as TapTargetLinkProps, g as getTapTargetLinkComponent, s as setTapTargetLinkComponent } from './link-CkRpHgou.js';
5
-
6
- interface TapTargetButtonProps {
7
- icon?: React.ReactNode;
8
- children?: React.ReactNode;
9
- strokeWidth?: number | undefined;
10
- onClick?: (() => void) | undefined;
11
- className?: string | undefined;
12
- as?: "button" | "label" | undefined;
13
- htmlFor?: string | undefined;
14
- ariaLabel?: string | undefined;
15
- disabled?: boolean | undefined;
16
- /**
17
- * When set, the tap button renders as a link instead of a button.
18
- * - Internal hrefs (e.g. "/tasks") render via the injected link component
19
- * (`setTapTargetLinkComponent` / the `linkComponent` prop), falling back
20
- * to a plain `<a>` when none is registered.
21
- * - External hrefs (http://, https://, mailto:, tel:) render as `<a>`
22
- * with `target="_blank"` and `rel="noopener noreferrer"` by default.
23
- * - When combined with `disabled`, the trigger renders as a non-navigable
24
- * `<span aria-disabled="true">` with the same visual styling.
25
- */
26
- href?: string | undefined;
27
- /** Override target. Works on both internal links and external anchors. */
28
- target?: "_blank" | "_self" | "_parent" | "_top" | undefined;
29
- /** Override rel. Works on both internal links and external anchors. */
30
- rel?: string | undefined;
31
- /** Forwarded to the injected link component. Pass `false` to disable prefetching. */
32
- prefetch?: boolean | null | undefined;
33
- /**
34
- * Per-instance link component for internal hrefs — overrides the
35
- * module-level `setTapTargetLinkComponent` registration.
36
- */
37
- linkComponent?: TapTargetLinkComponent | undefined;
38
- /**
39
- * Tooltip text. Defaults to `ariaLabel` when omitted.
40
- * Pass `false` to explicitly disable the tooltip.
41
- */
42
- tooltip?: string | false | undefined;
43
- /** Tooltip placement. Defaults to "top". */
44
- tooltipSide?: "top" | "right" | "bottom" | "left" | undefined;
45
- /** Tooltip alignment along its side. Defaults to "center". */
46
- tooltipAlign?: "start" | "center" | "end" | undefined;
47
- /**
48
- * Visible caption rendered inline after the icon (`[icon Label]`).
49
- * Widens the pill automatically. Tooltip defaults to off when set — the
50
- * label is self-describing. Visible text becomes the accessible name.
51
- */
52
- label?: string | undefined;
53
- /**
54
- * Collapse an icon + caption pill to its icon-only 44px tap target below
55
- * the `sm` breakpoint. The caption and inline geometry return at `sm+`;
56
- * `ariaLabel` (falling back to `label`) remains the accessible name.
57
- */
58
- mobileIconOnly?: boolean | undefined;
59
- }
60
- interface TapTargetButtonSolidProps extends TapTargetButtonProps {
61
- bgColor?: string | undefined;
62
- iconColor?: string | undefined;
63
- hoverBgColor?: string | undefined;
64
- /**
65
- * Press-state background. Defaults to `active:brightness-90` which works on
66
- * any color. Override when using a custom `bgColor` that should darken to a
67
- * specific shade on press (e.g. `active:bg-primary/60`).
68
- */
69
- activeBgColor?: string | undefined;
70
- }
71
- declare const TapTargetButton: react.ForwardRefExoticComponent<TapTargetButtonProps & ButtonHTMLAttributes<HTMLButtonElement> & react.RefAttributes<HTMLButtonElement>>;
72
- declare const TapTargetButtonTransparent: react.ForwardRefExoticComponent<TapTargetButtonProps & ButtonHTMLAttributes<HTMLButtonElement> & react.RefAttributes<HTMLButtonElement>>;
73
- declare const TapTargetButtonSolid: react.ForwardRefExoticComponent<TapTargetButtonSolidProps & ButtonHTMLAttributes<HTMLButtonElement> & react.RefAttributes<HTMLButtonElement>>;
74
- /** Solid destructive pill — delete/remove actions. White-on-red like the
75
- * primary solid is white-on-blue. Use THIS, never hand-pass bg-destructive
76
- * with the default (dark) icon color. */
77
- declare const TapTargetButtonDestructive: react.ForwardRefExoticComponent<TapTargetButtonSolidProps & ButtonHTMLAttributes<HTMLButtonElement> & react.RefAttributes<HTMLButtonElement>>;
78
- declare const TapTargetButtonForGroup: react.ForwardRefExoticComponent<TapTargetButtonProps & ButtonHTMLAttributes<HTMLButtonElement> & react.RefAttributes<HTMLButtonElement>>;
79
- declare function TapTargetButtonGroup({ children, className, }: {
80
- children: React.ReactNode;
81
- className?: string | undefined;
82
- }): react.JSX.Element;
83
-
84
- /**
85
- * Wraps a TapTargetButton (or any tap control) like the button-demo page:
86
- * no extra padding on the control — only `gap-0.5` before the caption.
87
- * Tooltip shows the full `label`; the caption truncates at max-w-[52px].
88
- */
89
- declare function TapTargetLabeled({ label, children, hideLabel, toolTipSide, }: {
90
- label: string;
91
- children: React.ReactNode;
92
- hideLabel?: boolean | undefined;
93
- toolTipSide?: "top" | "bottom" | "left" | "right" | undefined;
94
- }): react.JSX.Element;
95
-
96
- export { TapTargetButton, TapTargetButtonDestructive, TapTargetButtonForGroup, TapTargetButtonGroup, type TapTargetButtonProps, TapTargetButtonSolid, type TapTargetButtonSolidProps, TapTargetButtonTransparent, TapTargetLabeled, TapTargetLinkComponent };
1
+ export { TapTargetButton, TapTargetButtonDestructive, TapTargetButtonForGroup, TapTargetButtonGroup, TapTargetButtonProps, TapTargetButtonSolid, TapTargetButtonSolidProps, TapTargetButtonTransparent, TapTargetLabeled, TapTargetLinkComponent, TapTargetLinkProps, getTapTargetLinkComponent, setTapTargetLinkComponent } from '@ai-matrx/design-system/tap-target';