@ai-matrx/design-system 0.18.21 → 0.19.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.
- package/CHANGELOG.md +14 -0
- package/dist/content-transfer/alchemy.svg +1 -1
- package/dist/content-transfer/copy-transform.svg +1 -0
- package/dist/content-transfer/icon.cjs +8 -2
- package/dist/content-transfer/icon.cjs.map +1 -1
- package/dist/content-transfer/icon.d.cts +5 -3
- package/dist/content-transfer/icon.d.ts +5 -3
- package/dist/content-transfer/icon.js +8 -2
- package/dist/content-transfer/icon.js.map +1 -1
- package/dist/content-transfer/portal.svg +1 -0
- package/dist/content-transfer.cjs +923 -304
- package/dist/content-transfer.cjs.map +1 -1
- package/dist/content-transfer.css +17 -74
- package/dist/content-transfer.d.cts +14 -3
- package/dist/content-transfer.d.ts +14 -3
- package/dist/content-transfer.js +929 -305
- package/dist/content-transfer.js.map +1 -1
- package/dist/data-table/copy-helpers.d.cts +1 -1
- package/dist/data-table/copy-helpers.d.ts +1 -1
- package/dist/data-table/data-row-inspector.cjs +990 -397
- package/dist/data-table/data-row-inspector.cjs.map +1 -1
- package/dist/data-table/data-row-inspector.js +988 -390
- package/dist/data-table/data-row-inspector.js.map +1 -1
- package/dist/data-table/data-row-window.cjs +989 -396
- package/dist/data-table/data-row-window.cjs.map +1 -1
- package/dist/data-table/data-row-window.js +987 -389
- package/dist/data-table/data-row-window.js.map +1 -1
- package/dist/data-table/filter-engine.d.cts +1 -1
- package/dist/data-table/filter-engine.d.ts +1 -1
- package/dist/data-table/host.cjs.map +1 -1
- package/dist/data-table/host.d.cts +3 -2
- package/dist/data-table/host.d.ts +3 -2
- package/dist/data-table/host.js.map +1 -1
- package/dist/data-table/index.cjs +2733 -1441
- package/dist/data-table/index.cjs.map +1 -1
- package/dist/data-table/index.d.cts +2 -2
- package/dist/data-table/index.d.ts +2 -2
- package/dist/data-table/index.js +2742 -1440
- package/dist/data-table/index.js.map +1 -1
- package/dist/data-table/infer-filter.d.cts +1 -1
- package/dist/data-table/infer-filter.d.ts +1 -1
- package/dist/data-table/layered-filters.d.cts +1 -1
- package/dist/data-table/layered-filters.d.ts +1 -1
- package/dist/data-table/pagination.cjs +135 -97
- package/dist/data-table/pagination.cjs.map +1 -1
- package/dist/data-table/pagination.d.cts +8 -1
- package/dist/data-table/pagination.d.ts +8 -1
- package/dist/data-table/pagination.js +130 -92
- package/dist/data-table/pagination.js.map +1 -1
- package/dist/data-table/query-control.d.cts +1 -1
- package/dist/data-table/query-control.d.ts +1 -1
- package/dist/data-table/scroll-pagination.cjs +82 -54
- package/dist/data-table/scroll-pagination.cjs.map +1 -1
- package/dist/data-table/scroll-pagination.js +82 -54
- package/dist/data-table/scroll-pagination.js.map +1 -1
- package/dist/data-table/types.cjs.map +1 -1
- package/dist/data-table/types.d.cts +1 -1
- package/dist/data-table/types.d.ts +1 -1
- package/dist/data-table/url-state.cjs +7 -1
- package/dist/data-table/url-state.cjs.map +1 -1
- package/dist/data-table/url-state.d.cts +1 -1
- package/dist/data-table/url-state.d.ts +1 -1
- package/dist/data-table/url-state.js +7 -1
- package/dist/data-table/url-state.js.map +1 -1
- package/dist/data-table/uuid-cell.cjs +1 -1
- package/dist/data-table/uuid-cell.cjs.map +1 -1
- package/dist/data-table/uuid-cell.js +1 -1
- package/dist/data-table/uuid-cell.js.map +1 -1
- package/dist/data-table/xlsx.d.cts +1 -1
- package/dist/data-table/xlsx.d.ts +1 -1
- package/dist/index.cjs +527 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +531 -0
- package/dist/index.js.map +1 -1
- package/dist/tap-target.cjs +636 -0
- package/dist/tap-target.cjs.map +1 -0
- package/dist/tap-target.css +151 -0
- package/dist/tap-target.d.cts +131 -0
- package/dist/tap-target.d.ts +131 -0
- package/dist/tap-target.js +608 -0
- package/dist/tap-target.js.map +1 -0
- package/dist/{types-BuDKVpeF.d.ts → types-D1m14boM.d.ts} +49 -3
- package/dist/{types-Dqcb7jXO.d.cts → types-Di6QT0P1.d.cts} +49 -3
- package/package.json +14 -1
package/dist/index.cjs
CHANGED
|
@@ -221,6 +221,13 @@ __export(src_exports, {
|
|
|
221
221
|
TabsList: () => TabsList,
|
|
222
222
|
TabsTrigger: () => TabsTrigger,
|
|
223
223
|
TabsTriggerCore: () => TabsTriggerCore,
|
|
224
|
+
TapTargetButton: () => TapTargetButton,
|
|
225
|
+
TapTargetButtonDestructive: () => TapTargetButtonDestructive,
|
|
226
|
+
TapTargetButtonForGroup: () => TapTargetButtonForGroup,
|
|
227
|
+
TapTargetButtonGroup: () => TapTargetButtonGroup,
|
|
228
|
+
TapTargetButtonSolid: () => TapTargetButtonSolid,
|
|
229
|
+
TapTargetButtonTransparent: () => TapTargetButtonTransparent,
|
|
230
|
+
TapTargetLabeled: () => TapTargetLabeled,
|
|
224
231
|
Textarea: () => Textarea,
|
|
225
232
|
TextareaWithPrefix: () => TextareaWithPrefix,
|
|
226
233
|
Toggle: () => Toggle,
|
|
@@ -235,9 +242,11 @@ __export(src_exports, {
|
|
|
235
242
|
badgeVariants: () => badgeVariants,
|
|
236
243
|
buttonVariants: () => buttonVariants,
|
|
237
244
|
cn: () => cn,
|
|
245
|
+
getTapTargetLinkComponent: () => getTapTargetLinkComponent,
|
|
238
246
|
scoreAccentBgClasses: () => scoreAccentBgClasses,
|
|
239
247
|
scoreRingColorClasses: () => scoreRingColorClasses,
|
|
240
248
|
selectTriggerVariants: () => selectTriggerVariants,
|
|
249
|
+
setTapTargetLinkComponent: () => setTapTargetLinkComponent,
|
|
241
250
|
sheetVariants: () => sheetVariants,
|
|
242
251
|
toArchiveFilter: () => toArchiveFilter,
|
|
243
252
|
toggleVariants: () => toggleVariants,
|
|
@@ -4482,4 +4491,522 @@ var TooltipContent = React36.forwardRef(({ className, sideOffset = 4, container,
|
|
|
4482
4491
|
) });
|
|
4483
4492
|
});
|
|
4484
4493
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
4494
|
+
|
|
4495
|
+
// src/tap-target/tap-target-button.tsx
|
|
4496
|
+
var import_react6 = require("react");
|
|
4497
|
+
|
|
4498
|
+
// src/tap-target/cn.ts
|
|
4499
|
+
function cn2(...values) {
|
|
4500
|
+
return values.filter(Boolean).join(" ").trim();
|
|
4501
|
+
}
|
|
4502
|
+
|
|
4503
|
+
// src/tap-target/link.ts
|
|
4504
|
+
var LINK_SLOT = /* @__PURE__ */ Symbol.for("@ai-matrx/tap-target:link-component");
|
|
4505
|
+
function setTapTargetLinkComponent(component) {
|
|
4506
|
+
globalThis[LINK_SLOT] = component;
|
|
4507
|
+
}
|
|
4508
|
+
function getTapTargetLinkComponent() {
|
|
4509
|
+
return globalThis[LINK_SLOT] ?? null;
|
|
4510
|
+
}
|
|
4511
|
+
|
|
4512
|
+
// src/tap-target/tap-target-button.tsx
|
|
4513
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
4514
|
+
var EXTERNAL_RE = /^(https?:|mailto:|tel:)/i;
|
|
4515
|
+
var TAP_OUTER_CLASS = "matrx-tap-target group";
|
|
4516
|
+
var TAP_GROUP_OUTER_CLASS = "matrx-tap-target matrx-tap-target-sm group";
|
|
4517
|
+
function IconContent({
|
|
4518
|
+
icon,
|
|
4519
|
+
children,
|
|
4520
|
+
strokeWidth = 2,
|
|
4521
|
+
className
|
|
4522
|
+
}) {
|
|
4523
|
+
if (icon) {
|
|
4524
|
+
if ((0, import_react6.isValidElement)(icon)) {
|
|
4525
|
+
return (0, import_react6.cloneElement)(icon, {
|
|
4526
|
+
className: cn2(className, icon.props.className)
|
|
4527
|
+
});
|
|
4528
|
+
}
|
|
4529
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className, children: icon });
|
|
4530
|
+
}
|
|
4531
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
4532
|
+
"svg",
|
|
4533
|
+
{
|
|
4534
|
+
className,
|
|
4535
|
+
fill: "none",
|
|
4536
|
+
viewBox: "0 0 24 24",
|
|
4537
|
+
stroke: "currentColor",
|
|
4538
|
+
strokeWidth,
|
|
4539
|
+
children
|
|
4540
|
+
}
|
|
4541
|
+
);
|
|
4542
|
+
}
|
|
4543
|
+
function resolveTapGeometry(label, size, mobileIconOnly) {
|
|
4544
|
+
const inline = Boolean(label);
|
|
4545
|
+
if (size === "sm") {
|
|
4546
|
+
return {
|
|
4547
|
+
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,
|
|
4548
|
+
inlineModifier: mobileIconOnly ? "matrx-tap-pill-mobile-icon-only-sm" : "matrx-tap-pill-inline-sm"
|
|
4549
|
+
};
|
|
4550
|
+
}
|
|
4551
|
+
return {
|
|
4552
|
+
outerClassName: inline && mobileIconOnly ? `${TAP_OUTER_CLASS} matrx-tap-target-mobile-icon-only` : inline ? `${TAP_OUTER_CLASS} matrx-tap-target-inline` : TAP_OUTER_CLASS,
|
|
4553
|
+
inlineModifier: mobileIconOnly ? "matrx-tap-pill-mobile-icon-only" : "matrx-tap-pill-inline"
|
|
4554
|
+
};
|
|
4555
|
+
}
|
|
4556
|
+
function buildTapInner({
|
|
4557
|
+
label,
|
|
4558
|
+
pillClassName,
|
|
4559
|
+
iconClassName,
|
|
4560
|
+
labelClassName,
|
|
4561
|
+
inlineModifier,
|
|
4562
|
+
icon,
|
|
4563
|
+
children,
|
|
4564
|
+
strokeWidth = 2
|
|
4565
|
+
}) {
|
|
4566
|
+
const iconEl = /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
4567
|
+
IconContent,
|
|
4568
|
+
{
|
|
4569
|
+
icon,
|
|
4570
|
+
strokeWidth,
|
|
4571
|
+
className: iconClassName,
|
|
4572
|
+
children
|
|
4573
|
+
}
|
|
4574
|
+
);
|
|
4575
|
+
const pillClasses = label ? `${pillClassName} ${inlineModifier}`.trim() : pillClassName;
|
|
4576
|
+
if (!label) {
|
|
4577
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: pillClasses, children: iconEl });
|
|
4578
|
+
}
|
|
4579
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: pillClasses, children: [
|
|
4580
|
+
iconEl,
|
|
4581
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: labelClassName ?? "matrx-tap-label", children: label })
|
|
4582
|
+
] });
|
|
4583
|
+
}
|
|
4584
|
+
function renderTapTarget({
|
|
4585
|
+
size = "default",
|
|
4586
|
+
pillClassName,
|
|
4587
|
+
iconClassName,
|
|
4588
|
+
labelClassName,
|
|
4589
|
+
icon,
|
|
4590
|
+
children,
|
|
4591
|
+
strokeWidth,
|
|
4592
|
+
label,
|
|
4593
|
+
mobileIconOnly = false,
|
|
4594
|
+
onClick,
|
|
4595
|
+
as,
|
|
4596
|
+
htmlFor,
|
|
4597
|
+
ariaLabel,
|
|
4598
|
+
disabled,
|
|
4599
|
+
href,
|
|
4600
|
+
target,
|
|
4601
|
+
rel,
|
|
4602
|
+
prefetch,
|
|
4603
|
+
linkComponent,
|
|
4604
|
+
tooltip,
|
|
4605
|
+
tooltipSide,
|
|
4606
|
+
tooltipAlign,
|
|
4607
|
+
rest,
|
|
4608
|
+
buttonRef
|
|
4609
|
+
}) {
|
|
4610
|
+
const { outerClassName, inlineModifier } = resolveTapGeometry(
|
|
4611
|
+
label,
|
|
4612
|
+
size,
|
|
4613
|
+
mobileIconOnly
|
|
4614
|
+
);
|
|
4615
|
+
const responsiveLabelClassName = mobileIconOnly ? `${labelClassName ?? "matrx-tap-label"} matrx-tap-label-mobile-icon-only` : labelClassName;
|
|
4616
|
+
const inner = buildTapInner({
|
|
4617
|
+
label,
|
|
4618
|
+
pillClassName,
|
|
4619
|
+
iconClassName,
|
|
4620
|
+
labelClassName: responsiveLabelClassName,
|
|
4621
|
+
inlineModifier: label ? inlineModifier : "",
|
|
4622
|
+
icon,
|
|
4623
|
+
children,
|
|
4624
|
+
strokeWidth
|
|
4625
|
+
});
|
|
4626
|
+
const resolvedTooltip = tooltip !== void 0 ? tooltip : label ? false : void 0;
|
|
4627
|
+
const triggerAriaLabel = label && !mobileIconOnly ? void 0 : ariaLabel ?? label;
|
|
4628
|
+
const trigger = renderTrigger({
|
|
4629
|
+
href,
|
|
4630
|
+
target,
|
|
4631
|
+
rel,
|
|
4632
|
+
prefetch,
|
|
4633
|
+
linkComponent,
|
|
4634
|
+
as,
|
|
4635
|
+
htmlFor,
|
|
4636
|
+
onClick,
|
|
4637
|
+
ariaLabel: triggerAriaLabel,
|
|
4638
|
+
disabled,
|
|
4639
|
+
outerClassName,
|
|
4640
|
+
children: inner,
|
|
4641
|
+
rest,
|
|
4642
|
+
buttonRef
|
|
4643
|
+
});
|
|
4644
|
+
return withTooltip(trigger, {
|
|
4645
|
+
tooltip: resolvedTooltip,
|
|
4646
|
+
ariaLabel: triggerAriaLabel,
|
|
4647
|
+
disabled,
|
|
4648
|
+
tooltipSide,
|
|
4649
|
+
tooltipAlign
|
|
4650
|
+
});
|
|
4651
|
+
}
|
|
4652
|
+
function renderTrigger({
|
|
4653
|
+
href,
|
|
4654
|
+
target,
|
|
4655
|
+
rel,
|
|
4656
|
+
prefetch,
|
|
4657
|
+
linkComponent,
|
|
4658
|
+
as,
|
|
4659
|
+
htmlFor,
|
|
4660
|
+
onClick,
|
|
4661
|
+
ariaLabel,
|
|
4662
|
+
disabled,
|
|
4663
|
+
outerClassName,
|
|
4664
|
+
children,
|
|
4665
|
+
rest,
|
|
4666
|
+
buttonRef
|
|
4667
|
+
}) {
|
|
4668
|
+
if (disabled && href) {
|
|
4669
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
4670
|
+
"span",
|
|
4671
|
+
{
|
|
4672
|
+
"aria-disabled": "true",
|
|
4673
|
+
"aria-label": ariaLabel,
|
|
4674
|
+
className: `${outerClassName} opacity-40 pointer-events-none`,
|
|
4675
|
+
children
|
|
4676
|
+
}
|
|
4677
|
+
);
|
|
4678
|
+
}
|
|
4679
|
+
if (href) {
|
|
4680
|
+
const isExternal = EXTERNAL_RE.test(href);
|
|
4681
|
+
if (isExternal) {
|
|
4682
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
4683
|
+
"a",
|
|
4684
|
+
{
|
|
4685
|
+
href,
|
|
4686
|
+
target: target ?? "_blank",
|
|
4687
|
+
rel: rel ?? "noopener noreferrer",
|
|
4688
|
+
"aria-label": ariaLabel,
|
|
4689
|
+
className: outerClassName,
|
|
4690
|
+
children
|
|
4691
|
+
}
|
|
4692
|
+
);
|
|
4693
|
+
}
|
|
4694
|
+
const Link = linkComponent ?? getTapTargetLinkComponent();
|
|
4695
|
+
if (Link) {
|
|
4696
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
4697
|
+
Link,
|
|
4698
|
+
{
|
|
4699
|
+
href,
|
|
4700
|
+
target,
|
|
4701
|
+
rel,
|
|
4702
|
+
prefetch,
|
|
4703
|
+
"aria-label": ariaLabel,
|
|
4704
|
+
className: outerClassName,
|
|
4705
|
+
children
|
|
4706
|
+
}
|
|
4707
|
+
);
|
|
4708
|
+
}
|
|
4709
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
4710
|
+
"a",
|
|
4711
|
+
{
|
|
4712
|
+
href,
|
|
4713
|
+
target,
|
|
4714
|
+
rel,
|
|
4715
|
+
"aria-label": ariaLabel,
|
|
4716
|
+
className: outerClassName,
|
|
4717
|
+
children
|
|
4718
|
+
}
|
|
4719
|
+
);
|
|
4720
|
+
}
|
|
4721
|
+
if (as === "label") {
|
|
4722
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
4723
|
+
"label",
|
|
4724
|
+
{
|
|
4725
|
+
htmlFor,
|
|
4726
|
+
"aria-label": ariaLabel,
|
|
4727
|
+
className: outerClassName,
|
|
4728
|
+
children
|
|
4729
|
+
}
|
|
4730
|
+
);
|
|
4731
|
+
}
|
|
4732
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
4733
|
+
"button",
|
|
4734
|
+
{
|
|
4735
|
+
ref: buttonRef,
|
|
4736
|
+
type: "button",
|
|
4737
|
+
onClick,
|
|
4738
|
+
"aria-label": ariaLabel,
|
|
4739
|
+
disabled,
|
|
4740
|
+
...rest,
|
|
4741
|
+
className: outerClassName,
|
|
4742
|
+
children
|
|
4743
|
+
}
|
|
4744
|
+
);
|
|
4745
|
+
}
|
|
4746
|
+
function withTooltip(trigger, {
|
|
4747
|
+
tooltip,
|
|
4748
|
+
ariaLabel,
|
|
4749
|
+
disabled,
|
|
4750
|
+
tooltipSide = "top",
|
|
4751
|
+
tooltipAlign = "center"
|
|
4752
|
+
}) {
|
|
4753
|
+
if (tooltip === false) return trigger;
|
|
4754
|
+
const label = typeof tooltip === "string" && tooltip.length > 0 ? tooltip : ariaLabel;
|
|
4755
|
+
if (!label) return trigger;
|
|
4756
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Tooltip, { children: [
|
|
4757
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(TooltipTrigger, { asChild: true, children: disabled ? (
|
|
4758
|
+
// Radix Tooltip triggers need a hoverable element; a disabled button
|
|
4759
|
+
// does not dispatch pointer events, so we wrap in a span for the
|
|
4760
|
+
// trigger target while keeping the disabled visual state.
|
|
4761
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "inline-flex", children: trigger })
|
|
4762
|
+
) : trigger }),
|
|
4763
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(TooltipContent, { side: tooltipSide, align: tooltipAlign, children: label })
|
|
4764
|
+
] });
|
|
4765
|
+
}
|
|
4766
|
+
var TapTargetButton = (0, import_react6.forwardRef)(function TapTargetButton2({
|
|
4767
|
+
icon,
|
|
4768
|
+
children,
|
|
4769
|
+
strokeWidth = 2,
|
|
4770
|
+
onClick,
|
|
4771
|
+
className,
|
|
4772
|
+
as,
|
|
4773
|
+
htmlFor,
|
|
4774
|
+
ariaLabel,
|
|
4775
|
+
disabled,
|
|
4776
|
+
href,
|
|
4777
|
+
target,
|
|
4778
|
+
rel,
|
|
4779
|
+
prefetch,
|
|
4780
|
+
linkComponent,
|
|
4781
|
+
tooltip,
|
|
4782
|
+
tooltipSide,
|
|
4783
|
+
tooltipAlign,
|
|
4784
|
+
label,
|
|
4785
|
+
mobileIconOnly,
|
|
4786
|
+
...rest
|
|
4787
|
+
}, ref) {
|
|
4788
|
+
const color = className ?? "text-foreground";
|
|
4789
|
+
return renderTapTarget({
|
|
4790
|
+
icon,
|
|
4791
|
+
children,
|
|
4792
|
+
strokeWidth,
|
|
4793
|
+
onClick,
|
|
4794
|
+
as,
|
|
4795
|
+
htmlFor,
|
|
4796
|
+
ariaLabel,
|
|
4797
|
+
disabled,
|
|
4798
|
+
href,
|
|
4799
|
+
target,
|
|
4800
|
+
rel,
|
|
4801
|
+
prefetch,
|
|
4802
|
+
linkComponent,
|
|
4803
|
+
tooltip,
|
|
4804
|
+
tooltipSide,
|
|
4805
|
+
tooltipAlign,
|
|
4806
|
+
label,
|
|
4807
|
+
mobileIconOnly,
|
|
4808
|
+
pillClassName: "matrx-tap-pill matrx-glass-thin-border",
|
|
4809
|
+
iconClassName: `matrx-tap-icon ${color}`,
|
|
4810
|
+
rest,
|
|
4811
|
+
buttonRef: ref
|
|
4812
|
+
});
|
|
4813
|
+
});
|
|
4814
|
+
var TapTargetButtonTransparent = (0, import_react6.forwardRef)(function TapTargetButtonTransparent2({
|
|
4815
|
+
icon,
|
|
4816
|
+
children,
|
|
4817
|
+
strokeWidth = 2,
|
|
4818
|
+
onClick,
|
|
4819
|
+
className,
|
|
4820
|
+
as,
|
|
4821
|
+
htmlFor,
|
|
4822
|
+
ariaLabel,
|
|
4823
|
+
disabled,
|
|
4824
|
+
href,
|
|
4825
|
+
target,
|
|
4826
|
+
rel,
|
|
4827
|
+
prefetch,
|
|
4828
|
+
linkComponent,
|
|
4829
|
+
tooltip,
|
|
4830
|
+
tooltipSide,
|
|
4831
|
+
tooltipAlign,
|
|
4832
|
+
label,
|
|
4833
|
+
mobileIconOnly,
|
|
4834
|
+
...rest
|
|
4835
|
+
}, ref) {
|
|
4836
|
+
const color = className ?? "text-foreground";
|
|
4837
|
+
return renderTapTarget({
|
|
4838
|
+
icon,
|
|
4839
|
+
children,
|
|
4840
|
+
strokeWidth,
|
|
4841
|
+
onClick,
|
|
4842
|
+
as,
|
|
4843
|
+
htmlFor,
|
|
4844
|
+
ariaLabel,
|
|
4845
|
+
disabled,
|
|
4846
|
+
href,
|
|
4847
|
+
target,
|
|
4848
|
+
rel,
|
|
4849
|
+
prefetch,
|
|
4850
|
+
linkComponent,
|
|
4851
|
+
tooltip,
|
|
4852
|
+
tooltipSide,
|
|
4853
|
+
tooltipAlign,
|
|
4854
|
+
label,
|
|
4855
|
+
mobileIconOnly,
|
|
4856
|
+
pillClassName: "matrx-tap-pill hover:bg-muted active:bg-muted-foreground/15",
|
|
4857
|
+
iconClassName: `matrx-tap-icon ${color}`,
|
|
4858
|
+
rest,
|
|
4859
|
+
buttonRef: ref
|
|
4860
|
+
});
|
|
4861
|
+
});
|
|
4862
|
+
var TapTargetButtonSolid = (0, import_react6.forwardRef)(function TapTargetButtonSolid2({
|
|
4863
|
+
icon,
|
|
4864
|
+
children,
|
|
4865
|
+
strokeWidth = 2,
|
|
4866
|
+
onClick,
|
|
4867
|
+
as,
|
|
4868
|
+
htmlFor,
|
|
4869
|
+
ariaLabel,
|
|
4870
|
+
disabled,
|
|
4871
|
+
href,
|
|
4872
|
+
target,
|
|
4873
|
+
rel,
|
|
4874
|
+
prefetch,
|
|
4875
|
+
linkComponent,
|
|
4876
|
+
bgColor = "bg-primary",
|
|
4877
|
+
iconColor = "text-primary-foreground",
|
|
4878
|
+
hoverBgColor = "hover:bg-primary/80",
|
|
4879
|
+
activeBgColor = "active:brightness-90",
|
|
4880
|
+
tooltip,
|
|
4881
|
+
tooltipSide,
|
|
4882
|
+
tooltipAlign,
|
|
4883
|
+
label,
|
|
4884
|
+
mobileIconOnly,
|
|
4885
|
+
...rest
|
|
4886
|
+
}, ref) {
|
|
4887
|
+
return renderTapTarget({
|
|
4888
|
+
icon,
|
|
4889
|
+
children,
|
|
4890
|
+
strokeWidth,
|
|
4891
|
+
onClick,
|
|
4892
|
+
as,
|
|
4893
|
+
htmlFor,
|
|
4894
|
+
ariaLabel,
|
|
4895
|
+
disabled,
|
|
4896
|
+
href,
|
|
4897
|
+
target,
|
|
4898
|
+
rel,
|
|
4899
|
+
prefetch,
|
|
4900
|
+
linkComponent,
|
|
4901
|
+
tooltip,
|
|
4902
|
+
tooltipSide,
|
|
4903
|
+
tooltipAlign,
|
|
4904
|
+
label,
|
|
4905
|
+
mobileIconOnly,
|
|
4906
|
+
pillClassName: `matrx-tap-pill ${bgColor} ${iconColor} ${hoverBgColor} ${activeBgColor}`,
|
|
4907
|
+
iconClassName: `matrx-tap-icon ${iconColor}`,
|
|
4908
|
+
labelClassName: `matrx-tap-label ${iconColor}`,
|
|
4909
|
+
rest,
|
|
4910
|
+
buttonRef: ref
|
|
4911
|
+
});
|
|
4912
|
+
});
|
|
4913
|
+
var TapTargetButtonDestructive = (0, import_react6.forwardRef)(function TapTargetButtonDestructive2({
|
|
4914
|
+
bgColor = "bg-destructive",
|
|
4915
|
+
iconColor = "text-destructive-foreground",
|
|
4916
|
+
hoverBgColor = "hover:bg-destructive/90",
|
|
4917
|
+
...rest
|
|
4918
|
+
}, ref) {
|
|
4919
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
4920
|
+
TapTargetButtonSolid,
|
|
4921
|
+
{
|
|
4922
|
+
ref,
|
|
4923
|
+
bgColor,
|
|
4924
|
+
iconColor,
|
|
4925
|
+
hoverBgColor,
|
|
4926
|
+
...rest
|
|
4927
|
+
}
|
|
4928
|
+
);
|
|
4929
|
+
});
|
|
4930
|
+
var TapTargetButtonForGroup = (0, import_react6.forwardRef)(function TapTargetButtonForGroup2({
|
|
4931
|
+
icon,
|
|
4932
|
+
children,
|
|
4933
|
+
strokeWidth = 2,
|
|
4934
|
+
onClick,
|
|
4935
|
+
className,
|
|
4936
|
+
as,
|
|
4937
|
+
htmlFor,
|
|
4938
|
+
ariaLabel,
|
|
4939
|
+
disabled,
|
|
4940
|
+
href,
|
|
4941
|
+
target,
|
|
4942
|
+
rel,
|
|
4943
|
+
prefetch,
|
|
4944
|
+
linkComponent,
|
|
4945
|
+
tooltip,
|
|
4946
|
+
tooltipSide,
|
|
4947
|
+
tooltipAlign,
|
|
4948
|
+
label,
|
|
4949
|
+
mobileIconOnly,
|
|
4950
|
+
...rest
|
|
4951
|
+
}, ref) {
|
|
4952
|
+
const color = className ?? "text-foreground";
|
|
4953
|
+
return renderTapTarget({
|
|
4954
|
+
size: "sm",
|
|
4955
|
+
icon,
|
|
4956
|
+
children,
|
|
4957
|
+
strokeWidth,
|
|
4958
|
+
onClick,
|
|
4959
|
+
as,
|
|
4960
|
+
htmlFor,
|
|
4961
|
+
ariaLabel,
|
|
4962
|
+
disabled,
|
|
4963
|
+
href,
|
|
4964
|
+
target,
|
|
4965
|
+
rel,
|
|
4966
|
+
prefetch,
|
|
4967
|
+
linkComponent,
|
|
4968
|
+
tooltip,
|
|
4969
|
+
tooltipSide,
|
|
4970
|
+
tooltipAlign,
|
|
4971
|
+
label,
|
|
4972
|
+
mobileIconOnly,
|
|
4973
|
+
pillClassName: "matrx-tap-pill matrx-tap-pill-sm matrx-glass-interactive",
|
|
4974
|
+
iconClassName: `matrx-tap-icon ${color}`,
|
|
4975
|
+
labelClassName: `matrx-tap-label ${color}`,
|
|
4976
|
+
rest,
|
|
4977
|
+
buttonRef: ref
|
|
4978
|
+
});
|
|
4979
|
+
});
|
|
4980
|
+
function TapTargetButtonGroup({
|
|
4981
|
+
children,
|
|
4982
|
+
className
|
|
4983
|
+
}) {
|
|
4984
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
4985
|
+
"div",
|
|
4986
|
+
{
|
|
4987
|
+
className: className ? `relative inline-flex h-9 items-center ${className}` : "relative inline-flex h-9 items-center",
|
|
4988
|
+
children: [
|
|
4989
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.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" }),
|
|
4990
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "relative flex min-w-0 items-center", children })
|
|
4991
|
+
]
|
|
4992
|
+
}
|
|
4993
|
+
);
|
|
4994
|
+
}
|
|
4995
|
+
|
|
4996
|
+
// src/tap-target/tap-target-labeled.tsx
|
|
4997
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
4998
|
+
function TapTargetLabeled({
|
|
4999
|
+
label,
|
|
5000
|
+
children,
|
|
5001
|
+
hideLabel = false,
|
|
5002
|
+
toolTipSide = "bottom"
|
|
5003
|
+
}) {
|
|
5004
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(TooltipProvider, { delayDuration: 200, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Tooltip, { children: [
|
|
5005
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex flex-col items-center p-0 gap-0 space-y-0 space-x-0 shrink-0", children: [
|
|
5006
|
+
children,
|
|
5007
|
+
!hideLabel && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "text-[10px] text-muted-foreground/70 leading-tight max-w-[52px] text-center truncate", children: label })
|
|
5008
|
+
] }) }),
|
|
5009
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(TooltipContent, { side: toolTipSide, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "font-mono text-xs max-w-[280px] break-all", children: label }) })
|
|
5010
|
+
] }) });
|
|
5011
|
+
}
|
|
4485
5012
|
//# sourceMappingURL=index.cjs.map
|