@ai-matrx/tap-target 0.2.7 → 0.2.8

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.js CHANGED
@@ -2,536 +2,22 @@
2
2
 
3
3
  // src/tap-target-button.tsx
4
4
  import {
5
- cloneElement,
6
- forwardRef,
7
- isValidElement
8
- } from "react";
9
- import {
10
- Tooltip,
11
- TooltipContent,
12
- TooltipTrigger
13
- } from "@ai-matrx/design-system";
5
+ TapTargetButton,
6
+ TapTargetButtonTransparent,
7
+ TapTargetButtonSolid,
8
+ TapTargetButtonDestructive,
9
+ TapTargetButtonForGroup,
10
+ TapTargetButtonGroup
11
+ } from "@ai-matrx/design-system/tap-target";
14
12
 
15
- // src/cn.ts
16
- function cn(...values) {
17
- return values.filter(Boolean).join(" ").trim();
18
- }
13
+ // src/tap-target-labeled.tsx
14
+ import { TapTargetLabeled } from "@ai-matrx/design-system/tap-target";
19
15
 
20
16
  // src/link.ts
21
- var LINK_SLOT = /* @__PURE__ */ Symbol.for("@ai-matrx/tap-target:link-component");
22
- function setTapTargetLinkComponent(component) {
23
- globalThis[LINK_SLOT] = component;
24
- }
25
- function getTapTargetLinkComponent() {
26
- return globalThis[LINK_SLOT] ?? null;
27
- }
28
-
29
- // src/tap-target-button.tsx
30
- import { jsx, jsxs } from "react/jsx-runtime";
31
- var EXTERNAL_RE = /^(https?:|mailto:|tel:)/i;
32
- var TAP_OUTER_CLASS = "matrx-tap-target group";
33
- var TAP_GROUP_OUTER_CLASS = "matrx-tap-target matrx-tap-target-sm group";
34
- function IconContent({
35
- icon,
36
- children,
37
- strokeWidth = 2,
38
- className
39
- }) {
40
- if (icon) {
41
- if (isValidElement(icon)) {
42
- return cloneElement(icon, {
43
- className: cn(className, icon.props.className)
44
- });
45
- }
46
- return /* @__PURE__ */ jsx("span", { className, children: icon });
47
- }
48
- return /* @__PURE__ */ jsx(
49
- "svg",
50
- {
51
- className,
52
- fill: "none",
53
- viewBox: "0 0 24 24",
54
- stroke: "currentColor",
55
- strokeWidth,
56
- children
57
- }
58
- );
59
- }
60
- function resolveTapGeometry(label, size, mobileIconOnly) {
61
- const inline = Boolean(label);
62
- if (size === "sm") {
63
- return {
64
- outerClassName: inline && mobileIconOnly ? "matrx-tap-target matrx-tap-target-sm matrx-tap-target-mobile-icon-only-sm group" : inline ? "matrx-tap-target matrx-tap-target-sm matrx-tap-target-inline-sm group" : TAP_GROUP_OUTER_CLASS,
65
- inlineModifier: mobileIconOnly ? "matrx-tap-pill-mobile-icon-only-sm" : "matrx-tap-pill-inline-sm"
66
- };
67
- }
68
- return {
69
- outerClassName: inline && mobileIconOnly ? `${TAP_OUTER_CLASS} matrx-tap-target-mobile-icon-only` : inline ? `${TAP_OUTER_CLASS} matrx-tap-target-inline` : TAP_OUTER_CLASS,
70
- inlineModifier: mobileIconOnly ? "matrx-tap-pill-mobile-icon-only" : "matrx-tap-pill-inline"
71
- };
72
- }
73
- function buildTapInner({
74
- label,
75
- pillClassName,
76
- iconClassName,
77
- labelClassName,
78
- inlineModifier,
79
- icon,
80
- children,
81
- strokeWidth = 2
82
- }) {
83
- const iconEl = /* @__PURE__ */ jsx(
84
- IconContent,
85
- {
86
- icon,
87
- strokeWidth,
88
- className: iconClassName,
89
- children
90
- }
91
- );
92
- const pillClasses = label ? `${pillClassName} ${inlineModifier}`.trim() : pillClassName;
93
- if (!label) {
94
- return /* @__PURE__ */ jsx("div", { className: pillClasses, children: iconEl });
95
- }
96
- return /* @__PURE__ */ jsxs("div", { className: pillClasses, children: [
97
- iconEl,
98
- /* @__PURE__ */ jsx("span", { className: labelClassName ?? "matrx-tap-label", children: label })
99
- ] });
100
- }
101
- function renderTapTarget({
102
- size = "default",
103
- pillClassName,
104
- iconClassName,
105
- labelClassName,
106
- icon,
107
- children,
108
- strokeWidth,
109
- label,
110
- mobileIconOnly = false,
111
- onClick,
112
- as,
113
- htmlFor,
114
- ariaLabel,
115
- disabled,
116
- href,
117
- target,
118
- rel,
119
- prefetch,
120
- linkComponent,
121
- tooltip,
122
- tooltipSide,
123
- tooltipAlign,
124
- rest,
125
- buttonRef
126
- }) {
127
- const { outerClassName, inlineModifier } = resolveTapGeometry(
128
- label,
129
- size,
130
- mobileIconOnly
131
- );
132
- const responsiveLabelClassName = mobileIconOnly ? `${labelClassName ?? "matrx-tap-label"} matrx-tap-label-mobile-icon-only` : labelClassName;
133
- const inner = buildTapInner({
134
- label,
135
- pillClassName,
136
- iconClassName,
137
- labelClassName: responsiveLabelClassName,
138
- inlineModifier: label ? inlineModifier : "",
139
- icon,
140
- children,
141
- strokeWidth
142
- });
143
- const resolvedTooltip = tooltip !== void 0 ? tooltip : label ? false : void 0;
144
- const triggerAriaLabel = label && !mobileIconOnly ? void 0 : ariaLabel ?? label;
145
- const trigger = renderTrigger({
146
- href,
147
- target,
148
- rel,
149
- prefetch,
150
- linkComponent,
151
- as,
152
- htmlFor,
153
- onClick,
154
- ariaLabel: triggerAriaLabel,
155
- disabled,
156
- outerClassName,
157
- children: inner,
158
- rest,
159
- buttonRef
160
- });
161
- return withTooltip(trigger, {
162
- tooltip: resolvedTooltip,
163
- ariaLabel: triggerAriaLabel,
164
- disabled,
165
- tooltipSide,
166
- tooltipAlign
167
- });
168
- }
169
- function renderTrigger({
170
- href,
171
- target,
172
- rel,
173
- prefetch,
174
- linkComponent,
175
- as,
176
- htmlFor,
177
- onClick,
178
- ariaLabel,
179
- disabled,
180
- outerClassName,
181
- children,
182
- rest,
183
- buttonRef
184
- }) {
185
- if (disabled && href) {
186
- return /* @__PURE__ */ jsx(
187
- "span",
188
- {
189
- "aria-disabled": "true",
190
- "aria-label": ariaLabel,
191
- className: `${outerClassName} opacity-40 pointer-events-none`,
192
- children
193
- }
194
- );
195
- }
196
- if (href) {
197
- const isExternal = EXTERNAL_RE.test(href);
198
- if (isExternal) {
199
- return /* @__PURE__ */ jsx(
200
- "a",
201
- {
202
- href,
203
- target: target ?? "_blank",
204
- rel: rel ?? "noopener noreferrer",
205
- "aria-label": ariaLabel,
206
- className: outerClassName,
207
- children
208
- }
209
- );
210
- }
211
- const Link = linkComponent ?? getTapTargetLinkComponent();
212
- if (Link) {
213
- return /* @__PURE__ */ jsx(
214
- Link,
215
- {
216
- href,
217
- target,
218
- rel,
219
- prefetch,
220
- "aria-label": ariaLabel,
221
- className: outerClassName,
222
- children
223
- }
224
- );
225
- }
226
- return /* @__PURE__ */ jsx(
227
- "a",
228
- {
229
- href,
230
- target,
231
- rel,
232
- "aria-label": ariaLabel,
233
- className: outerClassName,
234
- children
235
- }
236
- );
237
- }
238
- if (as === "label") {
239
- return /* @__PURE__ */ jsx(
240
- "label",
241
- {
242
- htmlFor,
243
- "aria-label": ariaLabel,
244
- className: outerClassName,
245
- children
246
- }
247
- );
248
- }
249
- return /* @__PURE__ */ jsx(
250
- "button",
251
- {
252
- ref: buttonRef,
253
- type: "button",
254
- onClick,
255
- "aria-label": ariaLabel,
256
- disabled,
257
- ...rest,
258
- className: outerClassName,
259
- children
260
- }
261
- );
262
- }
263
- function withTooltip(trigger, {
264
- tooltip,
265
- ariaLabel,
266
- disabled,
267
- tooltipSide = "top",
268
- tooltipAlign = "center"
269
- }) {
270
- if (tooltip === false) return trigger;
271
- const label = typeof tooltip === "string" && tooltip.length > 0 ? tooltip : ariaLabel;
272
- if (!label) return trigger;
273
- return /* @__PURE__ */ jsxs(Tooltip, { children: [
274
- /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: disabled ? (
275
- // Radix Tooltip triggers need a hoverable element; a disabled button
276
- // does not dispatch pointer events, so we wrap in a span for the
277
- // trigger target while keeping the disabled visual state.
278
- /* @__PURE__ */ jsx("span", { className: "inline-flex", children: trigger })
279
- ) : trigger }),
280
- /* @__PURE__ */ jsx(TooltipContent, { side: tooltipSide, align: tooltipAlign, children: label })
281
- ] });
282
- }
283
- var TapTargetButton = forwardRef(function TapTargetButton2({
284
- icon,
285
- children,
286
- strokeWidth = 2,
287
- onClick,
288
- className,
289
- as,
290
- htmlFor,
291
- ariaLabel,
292
- disabled,
293
- href,
294
- target,
295
- rel,
296
- prefetch,
297
- linkComponent,
298
- tooltip,
299
- tooltipSide,
300
- tooltipAlign,
301
- label,
302
- mobileIconOnly,
303
- ...rest
304
- }, ref) {
305
- const color = className ?? "text-foreground";
306
- return renderTapTarget({
307
- icon,
308
- children,
309
- strokeWidth,
310
- onClick,
311
- as,
312
- htmlFor,
313
- ariaLabel,
314
- disabled,
315
- href,
316
- target,
317
- rel,
318
- prefetch,
319
- linkComponent,
320
- tooltip,
321
- tooltipSide,
322
- tooltipAlign,
323
- label,
324
- mobileIconOnly,
325
- pillClassName: "matrx-tap-pill matrx-glass-thin-border",
326
- iconClassName: `matrx-tap-icon ${color}`,
327
- rest,
328
- buttonRef: ref
329
- });
330
- });
331
- var TapTargetButtonTransparent = forwardRef(function TapTargetButtonTransparent2({
332
- icon,
333
- children,
334
- strokeWidth = 2,
335
- onClick,
336
- className,
337
- as,
338
- htmlFor,
339
- ariaLabel,
340
- disabled,
341
- href,
342
- target,
343
- rel,
344
- prefetch,
345
- linkComponent,
346
- tooltip,
347
- tooltipSide,
348
- tooltipAlign,
349
- label,
350
- mobileIconOnly,
351
- ...rest
352
- }, ref) {
353
- const color = className ?? "text-foreground";
354
- return renderTapTarget({
355
- icon,
356
- children,
357
- strokeWidth,
358
- onClick,
359
- as,
360
- htmlFor,
361
- ariaLabel,
362
- disabled,
363
- href,
364
- target,
365
- rel,
366
- prefetch,
367
- linkComponent,
368
- tooltip,
369
- tooltipSide,
370
- tooltipAlign,
371
- label,
372
- mobileIconOnly,
373
- pillClassName: "matrx-tap-pill hover:bg-muted active:bg-muted-foreground/15",
374
- iconClassName: `matrx-tap-icon ${color}`,
375
- rest,
376
- buttonRef: ref
377
- });
378
- });
379
- var TapTargetButtonSolid = forwardRef(function TapTargetButtonSolid2({
380
- icon,
381
- children,
382
- strokeWidth = 2,
383
- onClick,
384
- as,
385
- htmlFor,
386
- ariaLabel,
387
- disabled,
388
- href,
389
- target,
390
- rel,
391
- prefetch,
392
- linkComponent,
393
- bgColor = "bg-primary",
394
- iconColor = "text-primary-foreground",
395
- hoverBgColor = "hover:bg-primary/80",
396
- activeBgColor = "active:brightness-90",
397
- tooltip,
398
- tooltipSide,
399
- tooltipAlign,
400
- label,
401
- mobileIconOnly,
402
- ...rest
403
- }, ref) {
404
- return renderTapTarget({
405
- icon,
406
- children,
407
- strokeWidth,
408
- onClick,
409
- as,
410
- htmlFor,
411
- ariaLabel,
412
- disabled,
413
- href,
414
- target,
415
- rel,
416
- prefetch,
417
- linkComponent,
418
- tooltip,
419
- tooltipSide,
420
- tooltipAlign,
421
- label,
422
- mobileIconOnly,
423
- pillClassName: `matrx-tap-pill ${bgColor} ${iconColor} ${hoverBgColor} ${activeBgColor}`,
424
- iconClassName: `matrx-tap-icon ${iconColor}`,
425
- labelClassName: `matrx-tap-label ${iconColor}`,
426
- rest,
427
- buttonRef: ref
428
- });
429
- });
430
- var TapTargetButtonDestructive = forwardRef(function TapTargetButtonDestructive2({
431
- bgColor = "bg-destructive",
432
- iconColor = "text-destructive-foreground",
433
- hoverBgColor = "hover:bg-destructive/90",
434
- ...rest
435
- }, ref) {
436
- return /* @__PURE__ */ jsx(
437
- TapTargetButtonSolid,
438
- {
439
- ref,
440
- bgColor,
441
- iconColor,
442
- hoverBgColor,
443
- ...rest
444
- }
445
- );
446
- });
447
- var TapTargetButtonForGroup = forwardRef(function TapTargetButtonForGroup2({
448
- icon,
449
- children,
450
- strokeWidth = 2,
451
- onClick,
452
- className,
453
- as,
454
- htmlFor,
455
- ariaLabel,
456
- disabled,
457
- href,
458
- target,
459
- rel,
460
- prefetch,
461
- linkComponent,
462
- tooltip,
463
- tooltipSide,
464
- tooltipAlign,
465
- label,
466
- mobileIconOnly,
467
- ...rest
468
- }, ref) {
469
- const color = className ?? "text-foreground";
470
- return renderTapTarget({
471
- size: "sm",
472
- icon,
473
- children,
474
- strokeWidth,
475
- onClick,
476
- as,
477
- htmlFor,
478
- ariaLabel,
479
- disabled,
480
- href,
481
- target,
482
- rel,
483
- prefetch,
484
- linkComponent,
485
- tooltip,
486
- tooltipSide,
487
- tooltipAlign,
488
- label,
489
- mobileIconOnly,
490
- pillClassName: "matrx-tap-pill matrx-tap-pill-sm matrx-glass-interactive",
491
- iconClassName: `matrx-tap-icon ${color}`,
492
- labelClassName: `matrx-tap-label ${color}`,
493
- rest,
494
- buttonRef: ref
495
- });
496
- });
497
- function TapTargetButtonGroup({
498
- children,
499
- className
500
- }) {
501
- return /* @__PURE__ */ jsxs(
502
- "div",
503
- {
504
- className: className ? `relative inline-flex h-9 items-center ${className}` : "relative inline-flex h-9 items-center",
505
- children: [
506
- /* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute inset-x-0 top-1/2 -translate-y-1/2 h-7 rounded-full matrx-glass-thin-border" }),
507
- /* @__PURE__ */ jsx("div", { className: "relative flex min-w-0 items-center", children })
508
- ]
509
- }
510
- );
511
- }
512
-
513
- // src/tap-target-labeled.tsx
514
17
  import {
515
- TooltipProvider,
516
- Tooltip as Tooltip2,
517
- TooltipTrigger as TooltipTrigger2,
518
- TooltipContent as TooltipContent2
519
- } from "@ai-matrx/design-system";
520
- import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
521
- function TapTargetLabeled({
522
- label,
523
- children,
524
- hideLabel = false,
525
- toolTipSide = "bottom"
526
- }) {
527
- return /* @__PURE__ */ jsx2(TooltipProvider, { delayDuration: 200, children: /* @__PURE__ */ jsxs2(Tooltip2, { children: [
528
- /* @__PURE__ */ jsx2(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ jsxs2("div", { className: "flex flex-col items-center p-0 gap-0 space-y-0 space-x-0 shrink-0", children: [
529
- children,
530
- !hideLabel && /* @__PURE__ */ jsx2("span", { className: "text-[10px] text-muted-foreground/70 leading-tight max-w-[52px] text-center truncate", children: label })
531
- ] }) }),
532
- /* @__PURE__ */ jsx2(TooltipContent2, { side: toolTipSide, children: /* @__PURE__ */ jsx2("span", { className: "font-mono text-xs max-w-[280px] break-all", children: label }) })
533
- ] }) });
534
- }
18
+ setTapTargetLinkComponent,
19
+ getTapTargetLinkComponent
20
+ } from "@ai-matrx/design-system/tap-target";
535
21
  export {
536
22
  TapTargetButton,
537
23
  TapTargetButtonDestructive,
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/tap-target-button.tsx","../src/cn.ts","../src/link.ts","../src/tap-target-labeled.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n cloneElement,\n forwardRef,\n isValidElement,\n type ButtonHTMLAttributes,\n type ReactElement,\n type ReactNode,\n type Ref,\n} from \"react\";\n\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from \"@ai-matrx/design-system\";\nimport { cn } from \"./cn\";\nimport {\n getTapTargetLinkComponent,\n type TapTargetLinkComponent,\n} from \"./link\";\n\nexport interface TapTargetButtonProps {\n icon?: React.ReactNode;\n children?: React.ReactNode;\n strokeWidth?: number | undefined;\n onClick?: (() => void) | undefined;\n className?: string | undefined;\n as?: \"button\" | \"label\" | undefined;\n htmlFor?: string | undefined;\n ariaLabel?: string | undefined;\n disabled?: boolean | undefined;\n /**\n * When set, the tap button renders as a link instead of a button.\n * - Internal hrefs (e.g. \"/tasks\") render via the injected link component\n * (`setTapTargetLinkComponent` / the `linkComponent` prop), falling back\n * to a plain `<a>` when none is registered.\n * - External hrefs (http://, https://, mailto:, tel:) render as `<a>`\n * with `target=\"_blank\"` and `rel=\"noopener noreferrer\"` by default.\n * - When combined with `disabled`, the trigger renders as a non-navigable\n * `<span aria-disabled=\"true\">` with the same visual styling.\n */\n href?: string | undefined;\n /** Override target. Works on both internal links and external anchors. */\n target?: \"_blank\" | \"_self\" | \"_parent\" | \"_top\" | undefined;\n /** Override rel. Works on both internal links and external anchors. */\n rel?: string | undefined;\n /** Forwarded to the injected link component. Pass `false` to disable prefetching. */\n prefetch?: boolean | null | undefined;\n /**\n * Per-instance link component for internal hrefs — overrides the\n * module-level `setTapTargetLinkComponent` registration.\n */\n linkComponent?: TapTargetLinkComponent | undefined;\n /**\n * Tooltip text. Defaults to `ariaLabel` when omitted.\n * Pass `false` to explicitly disable the tooltip.\n */\n tooltip?: string | false | undefined;\n /** Tooltip placement. Defaults to \"top\". */\n tooltipSide?: \"top\" | \"right\" | \"bottom\" | \"left\" | undefined;\n /** Tooltip alignment along its side. Defaults to \"center\". */\n tooltipAlign?: \"start\" | \"center\" | \"end\" | undefined;\n /**\n * Visible caption rendered inline after the icon (`[icon Label]`).\n * Widens the pill automatically. Tooltip defaults to off when set — the\n * label is self-describing. Visible text becomes the accessible name.\n */\n label?: string | undefined;\n /**\n * Collapse an icon + caption pill to its icon-only 44px tap target below\n * the `sm` breakpoint. The caption and inline geometry return at `sm+`;\n * `ariaLabel` (falling back to `label`) remains the accessible name.\n */\n mobileIconOnly?: boolean | undefined;\n}\n\nexport interface TapTargetButtonSolidProps extends TapTargetButtonProps {\n bgColor?: string | undefined;\n iconColor?: string | undefined;\n hoverBgColor?: string | undefined;\n /**\n * Press-state background. Defaults to `active:brightness-90` which works on\n * any color. Override when using a custom `bgColor` that should darken to a\n * specific shade on press (e.g. `active:bg-primary/60`).\n */\n activeBgColor?: string | undefined;\n}\n\nconst EXTERNAL_RE = /^(https?:|mailto:|tel:)/i;\n\n// Geometry + press feedback + tap hygiene are the SINGLE SOURCE OF TRUTH in\n// the shipped stylesheet (the `.matrx-tap-*` family in styles.css — import\n// \"@ai-matrx/tap-target/styles.css\" once at app root). This component only\n// picks the right class and layers each variant's decoration on top.\nconst TAP_OUTER_CLASS = \"matrx-tap-target group\";\nconst TAP_GROUP_OUTER_CLASS = \"matrx-tap-target matrx-tap-target-sm group\";\n\nfunction IconContent({\n icon,\n children,\n strokeWidth = 2,\n className,\n}: Pick<\n TapTargetButtonProps,\n \"icon\" | \"children\" | \"strokeWidth\" | \"className\"\n>) {\n if (icon) {\n if (isValidElement<{ className?: string }>(icon)) {\n return cloneElement(icon, {\n className: cn(className, icon.props.className),\n });\n }\n return <span className={className}>{icon}</span>;\n }\n return (\n <svg\n className={className}\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n strokeWidth={strokeWidth}\n >\n {children}\n </svg>\n );\n}\n\ntype TapTargetSize = \"default\" | \"sm\";\n\nfunction resolveTapGeometry(\n label: string | undefined,\n size: TapTargetSize,\n mobileIconOnly: boolean,\n) {\n const inline = Boolean(label);\n if (size === \"sm\") {\n return {\n outerClassName:\n inline && mobileIconOnly\n ? \"matrx-tap-target matrx-tap-target-sm matrx-tap-target-mobile-icon-only-sm group\"\n : inline\n ? \"matrx-tap-target matrx-tap-target-sm matrx-tap-target-inline-sm group\"\n : TAP_GROUP_OUTER_CLASS,\n inlineModifier: mobileIconOnly\n ? \"matrx-tap-pill-mobile-icon-only-sm\"\n : \"matrx-tap-pill-inline-sm\",\n };\n }\n return {\n outerClassName:\n inline && mobileIconOnly\n ? `${TAP_OUTER_CLASS} matrx-tap-target-mobile-icon-only`\n : inline\n ? `${TAP_OUTER_CLASS} matrx-tap-target-inline`\n : TAP_OUTER_CLASS,\n inlineModifier: mobileIconOnly\n ? \"matrx-tap-pill-mobile-icon-only\"\n : \"matrx-tap-pill-inline\",\n };\n}\n\nfunction buildTapInner({\n label,\n pillClassName,\n iconClassName,\n labelClassName,\n inlineModifier,\n icon,\n children,\n strokeWidth = 2,\n}: {\n label?: string | undefined;\n pillClassName: string;\n iconClassName: string;\n labelClassName?: string | undefined;\n inlineModifier: string;\n icon?: React.ReactNode;\n children?: React.ReactNode;\n strokeWidth?: number | undefined;\n}) {\n const iconEl = (\n <IconContent\n icon={icon}\n strokeWidth={strokeWidth}\n className={iconClassName}\n >\n {children}\n </IconContent>\n );\n const pillClasses = label\n ? `${pillClassName} ${inlineModifier}`.trim()\n : pillClassName;\n\n if (!label) {\n return <div className={pillClasses}>{iconEl}</div>;\n }\n\n return (\n <div className={pillClasses}>\n {iconEl}\n <span className={labelClassName ?? \"matrx-tap-label\"}>{label}</span>\n </div>\n );\n}\n\ninterface RenderTapTargetArgs extends Pick<\n TapTargetButtonProps,\n | \"icon\"\n | \"children\"\n | \"strokeWidth\"\n | \"label\"\n | \"mobileIconOnly\"\n | \"onClick\"\n | \"as\"\n | \"htmlFor\"\n | \"ariaLabel\"\n | \"disabled\"\n | \"href\"\n | \"target\"\n | \"rel\"\n | \"prefetch\"\n | \"linkComponent\"\n | \"tooltip\"\n | \"tooltipSide\"\n | \"tooltipAlign\"\n> {\n size?: TapTargetSize;\n pillClassName: string;\n iconClassName: string;\n labelClassName?: string | undefined;\n rest?: ButtonHTMLAttributes<HTMLButtonElement> | undefined;\n buttonRef?: Ref<HTMLButtonElement> | undefined;\n}\n\nfunction renderTapTarget({\n size = \"default\",\n pillClassName,\n iconClassName,\n labelClassName,\n icon,\n children,\n strokeWidth,\n label,\n mobileIconOnly = false,\n onClick,\n as,\n htmlFor,\n ariaLabel,\n disabled,\n href,\n target,\n rel,\n prefetch,\n linkComponent,\n tooltip,\n tooltipSide,\n tooltipAlign,\n rest,\n buttonRef,\n}: RenderTapTargetArgs): ReactElement {\n const { outerClassName, inlineModifier } = resolveTapGeometry(\n label,\n size,\n mobileIconOnly,\n );\n const responsiveLabelClassName = mobileIconOnly\n ? `${labelClassName ?? \"matrx-tap-label\"} matrx-tap-label-mobile-icon-only`\n : labelClassName;\n const inner = buildTapInner({\n label,\n pillClassName,\n iconClassName,\n labelClassName: responsiveLabelClassName,\n inlineModifier: label ? inlineModifier : \"\",\n icon,\n children,\n strokeWidth,\n });\n const resolvedTooltip =\n tooltip !== undefined ? tooltip : label ? false : undefined;\n const triggerAriaLabel =\n label && !mobileIconOnly ? undefined : (ariaLabel ?? label);\n const trigger = renderTrigger({\n href,\n target,\n rel,\n prefetch,\n linkComponent,\n as,\n htmlFor,\n onClick,\n ariaLabel: triggerAriaLabel,\n disabled,\n outerClassName,\n children: inner,\n rest,\n buttonRef,\n });\n return withTooltip(trigger, {\n tooltip: resolvedTooltip,\n ariaLabel: triggerAriaLabel,\n disabled,\n tooltipSide,\n tooltipAlign,\n });\n}\n\ninterface RenderTriggerArgs {\n href?: string | undefined;\n target?: \"_blank\" | \"_self\" | \"_parent\" | \"_top\" | undefined;\n rel?: string | undefined;\n prefetch?: boolean | null | undefined;\n linkComponent?: TapTargetLinkComponent | undefined;\n as?: \"button\" | \"label\" | undefined;\n htmlFor?: string | undefined;\n onClick?: (() => void) | undefined;\n ariaLabel?: string | undefined;\n disabled?: boolean | undefined;\n outerClassName: string;\n children: ReactNode;\n rest?: ButtonHTMLAttributes<HTMLButtonElement> | undefined;\n buttonRef?: Ref<HTMLButtonElement> | undefined;\n}\n\n/**\n * Resolves the correct trigger element based on the props passed.\n *\n * - `href` + `disabled` → unclickable `<span aria-disabled>`\n * - `href` matching `http(s):|mailto:|tel:` → `<a target=\"_blank\" rel=\"noopener noreferrer\">`\n * - `href` (internal) → the injected link component (per-instance\n * `linkComponent` prop, else `setTapTargetLinkComponent` registration),\n * falling back to a plain `<a>` when none is registered\n * - `as=\"label\"` → `<label htmlFor=...>`\n * - default → `<button>`\n */\nfunction renderTrigger({\n href,\n target,\n rel,\n prefetch,\n linkComponent,\n as,\n htmlFor,\n onClick,\n ariaLabel,\n disabled,\n outerClassName,\n children,\n rest,\n buttonRef,\n}: RenderTriggerArgs): ReactElement {\n if (disabled && href) {\n return (\n <span\n aria-disabled=\"true\"\n aria-label={ariaLabel}\n className={`${outerClassName} opacity-40 pointer-events-none`}\n >\n {children}\n </span>\n );\n }\n if (href) {\n const isExternal = EXTERNAL_RE.test(href);\n if (isExternal) {\n return (\n <a\n href={href}\n target={target ?? \"_blank\"}\n rel={rel ?? \"noopener noreferrer\"}\n aria-label={ariaLabel}\n className={outerClassName}\n >\n {children}\n </a>\n );\n }\n const Link = linkComponent ?? getTapTargetLinkComponent();\n if (Link) {\n return (\n <Link\n href={href}\n target={target}\n rel={rel}\n prefetch={prefetch}\n aria-label={ariaLabel}\n className={outerClassName}\n >\n {children}\n </Link>\n );\n }\n // No link component registered — plain <a>. `prefetch` is a router hint,\n // not a DOM attribute, so it is deliberately dropped here.\n return (\n <a\n href={href}\n target={target}\n rel={rel}\n aria-label={ariaLabel}\n className={outerClassName}\n >\n {children}\n </a>\n );\n }\n if (as === \"label\") {\n return (\n <label\n htmlFor={htmlFor}\n aria-label={ariaLabel}\n className={outerClassName}\n >\n {children}\n </label>\n );\n }\n return (\n <button\n ref={buttonRef}\n type=\"button\"\n onClick={onClick}\n aria-label={ariaLabel}\n disabled={disabled}\n {...rest}\n className={outerClassName}\n >\n {children}\n </button>\n );\n}\n\n/**\n * Wraps a trigger element in a Tooltip when a tooltip label is available.\n * Falls back to `ariaLabel` when `tooltip` is not explicitly set. If both\n * are absent (or `tooltip === false`), the trigger is returned unwrapped.\n */\nfunction withTooltip(\n trigger: ReactElement,\n {\n tooltip,\n ariaLabel,\n disabled,\n tooltipSide = \"top\",\n tooltipAlign = \"center\",\n }: {\n tooltip?: string | false | undefined;\n ariaLabel?: string | undefined;\n disabled?: boolean | undefined;\n tooltipSide?: \"top\" | \"right\" | \"bottom\" | \"left\" | undefined;\n tooltipAlign?: \"start\" | \"center\" | \"end\" | undefined;\n },\n): ReactElement {\n if (tooltip === false) return trigger;\n const label =\n typeof tooltip === \"string\" && tooltip.length > 0 ? tooltip : ariaLabel;\n if (!label) return trigger;\n return (\n <Tooltip>\n <TooltipTrigger asChild>\n {disabled ? (\n // Radix Tooltip triggers need a hoverable element; a disabled button\n // does not dispatch pointer events, so we wrap in a span for the\n // trigger target while keeping the disabled visual state.\n <span className=\"inline-flex\">{trigger}</span>\n ) : (\n trigger\n )}\n </TooltipTrigger>\n <TooltipContent side={tooltipSide} align={tooltipAlign}>\n {label}\n </TooltipContent>\n </Tooltip>\n );\n}\n\n// To resize/retune every tap button, edit styles.css — not here.\n\nexport const TapTargetButton = forwardRef<\n HTMLButtonElement,\n TapTargetButtonProps & ButtonHTMLAttributes<HTMLButtonElement>\n>(function TapTargetButton(\n {\n icon,\n children,\n strokeWidth = 2,\n onClick,\n className,\n as,\n htmlFor,\n ariaLabel,\n disabled,\n href,\n target,\n rel,\n prefetch,\n linkComponent,\n tooltip,\n tooltipSide,\n tooltipAlign,\n label,\n mobileIconOnly,\n ...rest\n },\n ref,\n) {\n const color = className ?? \"text-foreground\";\n return renderTapTarget({\n icon,\n children,\n strokeWidth,\n onClick,\n as,\n htmlFor,\n ariaLabel,\n disabled,\n href,\n target,\n rel,\n prefetch,\n linkComponent,\n tooltip,\n tooltipSide,\n tooltipAlign,\n label,\n mobileIconOnly,\n pillClassName: \"matrx-tap-pill matrx-glass-thin-border\",\n iconClassName: `matrx-tap-icon ${color}`,\n rest,\n buttonRef: ref,\n });\n});\n\nexport const TapTargetButtonTransparent = forwardRef<\n HTMLButtonElement,\n TapTargetButtonProps & React.ButtonHTMLAttributes<HTMLButtonElement>\n>(function TapTargetButtonTransparent(\n {\n icon,\n children,\n strokeWidth = 2,\n onClick,\n className,\n as,\n htmlFor,\n ariaLabel,\n disabled,\n href,\n target,\n rel,\n prefetch,\n linkComponent,\n tooltip,\n tooltipSide,\n tooltipAlign,\n label,\n mobileIconOnly,\n ...rest\n },\n ref,\n) {\n const color = className ?? \"text-foreground\";\n return renderTapTarget({\n icon,\n children,\n strokeWidth,\n onClick,\n as,\n htmlFor,\n ariaLabel,\n disabled,\n href,\n target,\n rel,\n prefetch,\n linkComponent,\n tooltip,\n tooltipSide,\n tooltipAlign,\n label,\n mobileIconOnly,\n pillClassName:\n \"matrx-tap-pill hover:bg-muted active:bg-muted-foreground/15\",\n iconClassName: `matrx-tap-icon ${color}`,\n rest,\n buttonRef: ref,\n });\n});\n\nexport const TapTargetButtonSolid = forwardRef<\n HTMLButtonElement,\n TapTargetButtonSolidProps & React.ButtonHTMLAttributes<HTMLButtonElement>\n>(function TapTargetButtonSolid(\n {\n icon,\n children,\n strokeWidth = 2,\n onClick,\n as,\n htmlFor,\n ariaLabel,\n disabled,\n href,\n target,\n rel,\n prefetch,\n linkComponent,\n bgColor = \"bg-primary\",\n iconColor = \"text-primary-foreground\",\n hoverBgColor = \"hover:bg-primary/80\",\n activeBgColor = \"active:brightness-90\",\n tooltip,\n tooltipSide,\n tooltipAlign,\n label,\n mobileIconOnly,\n ...rest\n },\n ref,\n) {\n return renderTapTarget({\n icon,\n children,\n strokeWidth,\n onClick,\n as,\n htmlFor,\n ariaLabel,\n disabled,\n href,\n target,\n rel,\n prefetch,\n linkComponent,\n tooltip,\n tooltipSide,\n tooltipAlign,\n label,\n mobileIconOnly,\n pillClassName: `matrx-tap-pill ${bgColor} ${iconColor} ${hoverBgColor} ${activeBgColor}`,\n iconClassName: `matrx-tap-icon ${iconColor}`,\n labelClassName: `matrx-tap-label ${iconColor}`,\n rest,\n buttonRef: ref,\n });\n});\n\n/** Solid destructive pill — delete/remove actions. White-on-red like the\n * primary solid is white-on-blue. Use THIS, never hand-pass bg-destructive\n * with the default (dark) icon color. */\nexport const TapTargetButtonDestructive = forwardRef<\n HTMLButtonElement,\n TapTargetButtonSolidProps & React.ButtonHTMLAttributes<HTMLButtonElement>\n>(function TapTargetButtonDestructive(\n {\n bgColor = \"bg-destructive\",\n iconColor = \"text-destructive-foreground\",\n hoverBgColor = \"hover:bg-destructive/90\",\n ...rest\n },\n ref,\n) {\n return (\n <TapTargetButtonSolid\n ref={ref}\n bgColor={bgColor}\n iconColor={iconColor}\n hoverBgColor={hoverBgColor}\n {...rest}\n />\n );\n});\n\nexport const TapTargetButtonForGroup = forwardRef<\n HTMLButtonElement,\n TapTargetButtonProps & ButtonHTMLAttributes<HTMLButtonElement>\n>(function TapTargetButtonForGroup(\n {\n icon,\n children,\n strokeWidth = 2,\n onClick,\n className,\n as,\n htmlFor,\n ariaLabel,\n disabled,\n href,\n target,\n rel,\n prefetch,\n linkComponent,\n tooltip,\n tooltipSide,\n tooltipAlign,\n label,\n mobileIconOnly,\n ...rest\n },\n ref,\n) {\n const color = className ?? \"text-foreground\";\n return renderTapTarget({\n size: \"sm\",\n icon,\n children,\n strokeWidth,\n onClick,\n as,\n htmlFor,\n ariaLabel,\n disabled,\n href,\n target,\n rel,\n prefetch,\n linkComponent,\n tooltip,\n tooltipSide,\n tooltipAlign,\n label,\n mobileIconOnly,\n pillClassName: \"matrx-tap-pill matrx-tap-pill-sm matrx-glass-interactive\",\n iconClassName: `matrx-tap-icon ${color}`,\n labelClassName: `matrx-tap-label ${color}`,\n rest,\n buttonRef: ref,\n });\n});\n\nexport function TapTargetButtonGroup({\n children,\n className,\n}: {\n children: React.ReactNode;\n className?: string | undefined;\n}) {\n return (\n <div\n className={\n className\n ? `relative inline-flex h-9 items-center ${className}`\n : \"relative inline-flex h-9 items-center\"\n }\n >\n <div className=\"pointer-events-none absolute inset-x-0 top-1/2 -translate-y-1/2 h-7 rounded-full matrx-glass-thin-border\" />\n {/* min-w-0 lets flexible children (e.g. a truncating filename) shrink\n under container pressure; fixed-size tap buttons are unaffected. */}\n <div className=\"relative flex min-w-0 items-center\">{children}</div>\n </div>\n );\n}\n","/**\n * Minimal className join — the only piece of `cn` this package needs.\n * No tailwind-merge / clsx dependency by design: callers pass literal strings.\n */\nexport function cn(\n ...values: Array<string | null | undefined | false>\n): string {\n return values.filter(Boolean).join(\" \").trim();\n}\n","import type { ComponentType, ReactNode } from \"react\";\n\n/**\n * The injectable link seam — the package's replacement for the original\n * hard `next/link` import.\n *\n * Internal hrefs (anything NOT matching `http(s):`, `mailto:`, `tel:`) render\n * through the link component resolved here; external hrefs always render a\n * plain `<a target=\"_blank\" rel=\"noopener noreferrer\">`, exactly like the\n * original. When nothing is registered and no per-instance `linkComponent`\n * prop is given, internal hrefs fall back to a plain `<a>` (no prefetch, no\n * client-side routing — still a working link).\n */\nexport interface TapTargetLinkProps {\n href: string;\n target?: \"_blank\" | \"_self\" | \"_parent\" | \"_top\" | undefined;\n rel?: string | undefined;\n /** Router prefetch hint (next/link semantics). Plain `<a>` fallback ignores it. */\n prefetch?: boolean | null | undefined;\n \"aria-label\"?: string | undefined;\n className?: string | undefined;\n children?: ReactNode;\n}\n\nexport type TapTargetLinkComponent = ComponentType<TapTargetLinkProps>;\n\n/**\n * The registered component lives in a `Symbol.for` slot on `globalThis` — NOT\n * in module state — so it survives the module graph being instantiated more\n * than once: the `.` and `./buttons` dist bundles each inline the primitives\n * (tsup `splitting: false`), and a consumer may even mix `import` and\n * `require`. One registration must reach every copy.\n */\nconst LINK_SLOT = Symbol.for(\"@ai-matrx/tap-target:link-component\");\n\ntype GlobalWithLinkSlot = typeof globalThis & {\n [LINK_SLOT]?: TapTargetLinkComponent | null;\n};\n\n/**\n * Register the app's link component once at startup (e.g. `next/link`):\n *\n * ```tsx\n * import Link from \"next/link\";\n * import { setTapTargetLinkComponent } from \"@ai-matrx/tap-target\";\n * setTapTargetLinkComponent(Link);\n * ```\n *\n * Pass `null` to unregister (plain `<a>` fallback resumes).\n */\nexport function setTapTargetLinkComponent(\n component: TapTargetLinkComponent | null,\n): void {\n (globalThis as GlobalWithLinkSlot)[LINK_SLOT] = component;\n}\n\n/** The currently registered link component, or `null` when none is set. */\nexport function getTapTargetLinkComponent(): TapTargetLinkComponent | null {\n return (globalThis as GlobalWithLinkSlot)[LINK_SLOT] ?? null;\n}\n","\"use client\";\n\nimport {\n TooltipProvider,\n Tooltip,\n TooltipTrigger,\n TooltipContent,\n} from \"@ai-matrx/design-system\";\n\n/**\n * Wraps a TapTargetButton (or any tap control) like the button-demo page:\n * no extra padding on the control — only `gap-0.5` before the caption.\n * Tooltip shows the full `label`; the caption truncates at max-w-[52px].\n */\nexport function TapTargetLabeled({\n label,\n children,\n hideLabel = false,\n toolTipSide = \"bottom\",\n}: {\n label: string;\n children: React.ReactNode;\n hideLabel?: boolean | undefined;\n toolTipSide?: \"top\" | \"bottom\" | \"left\" | \"right\" | undefined;\n}) {\n return (\n <TooltipProvider delayDuration={200}>\n <Tooltip>\n <TooltipTrigger asChild>\n <div className=\"flex flex-col items-center p-0 gap-0 space-y-0 space-x-0 shrink-0\">\n {children}\n {!hideLabel && (\n <span className=\"text-[10px] text-muted-foreground/70 leading-tight max-w-[52px] text-center truncate\">\n {label}\n </span>\n )}\n </div>\n </TooltipTrigger>\n <TooltipContent side={toolTipSide}>\n <span className=\"font-mono text-xs max-w-[280px] break-all\">\n {label}\n </span>\n </TooltipContent>\n </Tooltip>\n </TooltipProvider>\n );\n}\n"],"mappings":";;;AAEA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAKK;AAEP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;;;ACZA,SAAS,MACX,QACK;AACR,SAAO,OAAO,OAAO,OAAO,EAAE,KAAK,GAAG,EAAE,KAAK;AAC/C;;;ACyBA,IAAM,YAAY,uBAAO,IAAI,qCAAqC;AAiB3D,SAAS,0BACd,WACM;AACN,EAAC,WAAkC,SAAS,IAAI;AAClD;AAGO,SAAS,4BAA2D;AACzE,SAAQ,WAAkC,SAAS,KAAK;AAC1D;;;AFuDW,cAsFP,YAtFO;AAxBX,IAAM,cAAc;AAMpB,IAAM,kBAAkB;AACxB,IAAM,wBAAwB;AAE9B,SAAS,YAAY;AAAA,EACnB;AAAA,EACA;AAAA,EACA,cAAc;AAAA,EACd;AACF,GAGG;AACD,MAAI,MAAM;AACR,QAAI,eAAuC,IAAI,GAAG;AAChD,aAAO,aAAa,MAAM;AAAA,QACxB,WAAW,GAAG,WAAW,KAAK,MAAM,SAAS;AAAA,MAC/C,CAAC;AAAA,IACH;AACA,WAAO,oBAAC,UAAK,WAAuB,gBAAK;AAAA,EAC3C;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,MAAK;AAAA,MACL,SAAQ;AAAA,MACR,QAAO;AAAA,MACP;AAAA,MAEC;AAAA;AAAA,EACH;AAEJ;AAIA,SAAS,mBACP,OACA,MACA,gBACA;AACA,QAAM,SAAS,QAAQ,KAAK;AAC5B,MAAI,SAAS,MAAM;AACjB,WAAO;AAAA,MACL,gBACE,UAAU,iBACN,oF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ACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,eAAe;AAAA,IACf,eAAe,kBAAkB,KAAK;AAAA,IACtC,gBAAgB,mBAAmB,KAAK;AAAA,IACxC;AAAA,IACA,WAAW;AAAA,EACb,CAAC;AACH,CAAC;AAEM,SAAS,qBAAqB;AAAA,EACnC;AAAA,EACA;AACF,GAGG;AACD,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WACE,YACI,yCAAyC,SAAS,KAClD;AAAA,MAGN;AAAA,4BAAC,SAAI,WAAU,4GAA2G;AAAA,QAG1H,oBAAC,SAAI,WAAU,sCAAsC,UAAS;AAAA;AAAA;AAAA,EAChE;AAEJ;;;AG/uBA;AAAA,EACE;AAAA,EACA,WAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,kBAAAC;AAAA,OACK;AAsBG,SAGI,OAAAC,MAHJ,QAAAC,aAAA;AAfH,SAAS,iBAAiB;AAAA,EAC/B;AAAA,EACA;AAAA,EACA,YAAY;AAAA,EACZ,cAAc;AAChB,GAKG;AACD,SACE,gBAAAD,KAAC,mBAAgB,eAAe,KAC9B,0BAAAC,MAACJ,UAAA,EACC;AAAA,oBAAAG,KAACF,iBAAA,EAAe,SAAO,MACrB,0BAAAG,MAAC,SAAI,WAAU,qEACZ;AAAA;AAAA,MACA,CAAC,aACA,gBAAAD,KAAC,UAAK,WAAU,wFACb,iBACH;AAAA,OAEJ,GACF;AAAA,IACA,gBAAAA,KAACD,iBAAA,EAAe,MAAM,aACpB,0BAAAC,KAAC,UAAK,WAAU,6CACb,iBACH,GACF;AAAA,KACF,GACF;AAEJ;","names":["TapTargetButton","TapTargetButtonTransparent","TapTargetButtonSolid","TapTargetButtonDestructive","TapTargetButtonForGroup","Tooltip","TooltipTrigger","TooltipContent","jsx","jsxs"]}
1
+ {"version":3,"sources":["../src/tap-target-button.tsx","../src/tap-target-labeled.tsx","../src/link.ts"],"sourcesContent":["export {\n TapTargetButton,\n TapTargetButtonTransparent,\n TapTargetButtonSolid,\n TapTargetButtonDestructive,\n TapTargetButtonForGroup,\n TapTargetButtonGroup,\n type TapTargetButtonProps,\n type TapTargetButtonSolidProps,\n} from \"@ai-matrx/design-system/tap-target\";\n","export { TapTargetLabeled } from \"@ai-matrx/design-system/tap-target\";\n","export {\n setTapTargetLinkComponent,\n getTapTargetLinkComponent,\n type TapTargetLinkComponent,\n type TapTargetLinkProps,\n} from \"@ai-matrx/design-system/tap-target\";\n"],"mappings":";;;AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAGK;;;ACTP,SAAS,wBAAwB;;;ACAjC;AAAA,EACE;AAAA,EACA;AAAA,OAGK;","names":[]}