@planningcenter/tapestry 3.6.0 → 3.6.1-qa-1035.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.
@@ -1,12 +1,28 @@
1
1
  import "../button/btn.css";
2
2
  import { BaseComponentProps, ComponentKind } from "../../utilities/buttonLinkShared";
3
3
  import React, { AnchorHTMLAttributes } from "react";
4
- export interface BaseLinkElementProps extends BaseComponentProps, Omit<AnchorHTMLAttributes<HTMLAnchorElement>, keyof BaseComponentProps | "children"> {
4
+ type BaseLinkBaseProps = BaseComponentProps & Omit<AnchorHTMLAttributes<HTMLAnchorElement>, keyof BaseComponentProps | "children" | "href"> & {
5
5
  children?: React.ReactNode;
6
6
  external?: boolean;
7
- href: string;
8
7
  kind?: ComponentKind;
9
8
  label?: React.ReactNode;
10
- }
9
+ };
10
+ export type Simplify<T> = {
11
+ [K in keyof T]: T[K];
12
+ } & {};
13
+ export type BaseLinkElementProps = Simplify<BaseLinkBaseProps & {
14
+ /**
15
+ * When true, merges the link's styling onto the child element instead
16
+ * of rendering an `<a>`. Use to wrap a router link (e.g. react-router,
17
+ * Next.js) or any link-like component. The `external` prop still
18
+ * applies — it spreads `rel`/`target` onto the child element.
19
+ */
20
+ asChild: true;
21
+ href?: never;
22
+ }> | Simplify<BaseLinkBaseProps & {
23
+ asChild?: false;
24
+ href: string;
25
+ }>;
11
26
  export declare const BaseLink: React.ForwardRefExoticComponent<BaseLinkElementProps & React.RefAttributes<HTMLAnchorElement>>;
27
+ export {};
12
28
  //# sourceMappingURL=BaseLink.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BaseLink.d.ts","sourceRoot":"","sources":["../../../src/components/link/BaseLink.tsx"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,CAAA;AAE1B,OAAO,EACL,kBAAkB,EAGlB,aAAa,EAEd,MAAM,6BAA6B,CAAA;AAEpC,OAAO,KAAK,EAAE,EAAE,oBAAoB,EAAc,MAAM,OAAO,CAAA;AAE/D,MAAM,WAAW,oBACf,SAAQ,kBAAkB,EACxB,IAAI,CACF,oBAAoB,CAAC,iBAAiB,CAAC,EACvC,MAAM,kBAAkB,GAAG,UAAU,CACtC;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,aAAa,CAAA;IACpB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CACxB;AAED,eAAO,MAAM,QAAQ,gGA4CpB,CAAA"}
1
+ {"version":3,"file":"BaseLink.d.ts","sourceRoot":"","sources":["../../../src/components/link/BaseLink.tsx"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,CAAA;AAG1B,OAAO,EACL,kBAAkB,EAGlB,aAAa,EAEd,MAAM,6BAA6B,CAAA;AAEpC,OAAO,KAAK,EAAE,EAAE,oBAAoB,EAAc,MAAM,OAAO,CAAA;AAE/D,KAAK,iBAAiB,GAAG,kBAAkB,GACzC,IAAI,CACF,oBAAoB,CAAC,iBAAiB,CAAC,EACvC,MAAM,kBAAkB,GAAG,UAAU,GAAG,MAAM,CAC/C,GAAG;IACF,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,CAAC,EAAE,aAAa,CAAA;IACpB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CACxB,CAAA;AAKH,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAE,GAAG,EAAE,CAAA;AAEvD,MAAM,MAAM,oBAAoB,GAC5B,QAAQ,CACN,iBAAiB,GAAG;IAClB;;;;;OAKG;IACH,OAAO,EAAE,IAAI,CAAA;IACb,IAAI,CAAC,EAAE,KAAK,CAAA;CACb,CACF,GACD,QAAQ,CAAC,iBAAiB,GAAG;IAAE,OAAO,CAAC,EAAE,KAAK,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAAA;AAEnE,eAAO,MAAM,QAAQ,gGA+CpB,CAAA"}
@@ -1,15 +1,17 @@
1
+ import { Slot, Slottable } from '@radix-ui/react-slot';
1
2
  import { COMPONENT_SIZE_CLASS_MAP, COMPONENT_KIND_CLASS_MAP, wrapStringWithSpan } from '../../utilities/buttonLinkShared.js';
2
3
  import classNames from 'classnames';
3
4
  import React__default, { forwardRef } from 'react';
4
5
 
5
- const BaseLink = forwardRef(({ children, className, external = false, fullWidth, href, kind, label, prefix, size, suffix, ...restProps }, ref) => {
6
+ const BaseLink = forwardRef(({ asChild = false, children, className, external = false, fullWidth, href, kind, label, prefix, size, suffix, ...restProps }, ref) => {
6
7
  const combinedClassName = classNames(kind && "tds-btn", size && size !== "md" && kind && COMPONENT_SIZE_CLASS_MAP[size], kind && COMPONENT_KIND_CLASS_MAP[kind], fullWidth && "tds-btn--full-width", className, { "tds-btn--prefix": prefix, "tds-btn--suffix": suffix });
7
8
  const externalProps = external
8
9
  ? { rel: "noopener noreferrer", target: "_blank" }
9
10
  : {};
10
- return (React__default.createElement("a", { href: href, className: combinedClassName, ref: ref, ...restProps, ...externalProps },
11
+ const Comp = asChild ? Slot : "a";
12
+ return (React__default.createElement(Comp, { ...(!asChild && { href }), className: combinedClassName, ref: ref, ...restProps, ...externalProps },
11
13
  wrapStringWithSpan(prefix),
12
- label || children,
14
+ React__default.createElement(Slottable, null, label || children),
13
15
  wrapStringWithSpan(suffix)));
14
16
  });
15
17
  BaseLink.displayName = "BaseLink";
@@ -1 +1 @@
1
- {"version":3,"file":"BaseLink.js","sources":["../../../src/components/link/BaseLink.tsx"],"sourcesContent":["import \"../button/btn.css\"\n\nimport {\n BaseComponentProps,\n COMPONENT_KIND_CLASS_MAP,\n COMPONENT_SIZE_CLASS_MAP,\n ComponentKind,\n wrapStringWithSpan,\n} from \"@utilities/buttonLinkShared\"\nimport classNames from \"classnames\"\nimport React, { AnchorHTMLAttributes, forwardRef } from \"react\"\n\nexport interface BaseLinkElementProps\n extends BaseComponentProps,\n Omit<\n AnchorHTMLAttributes<HTMLAnchorElement>,\n keyof BaseComponentProps | \"children\"\n > {\n children?: React.ReactNode\n external?: boolean\n href: string\n kind?: ComponentKind\n label?: React.ReactNode\n}\n\nexport const BaseLink = forwardRef<HTMLAnchorElement, BaseLinkElementProps>(\n (\n {\n children,\n className,\n external = false,\n fullWidth,\n href,\n kind,\n label,\n prefix,\n size,\n suffix,\n ...restProps\n }: BaseLinkElementProps,\n ref\n ) => {\n const combinedClassName = classNames(\n kind && \"tds-btn\",\n size && size !== \"md\" && kind && COMPONENT_SIZE_CLASS_MAP[size],\n kind && COMPONENT_KIND_CLASS_MAP[kind],\n fullWidth && \"tds-btn--full-width\",\n className,\n { \"tds-btn--prefix\": prefix, \"tds-btn--suffix\": suffix }\n )\n\n const externalProps = external\n ? { rel: \"noopener noreferrer\", target: \"_blank\" }\n : {}\n\n return (\n <a\n href={href}\n className={combinedClassName}\n ref={ref}\n {...restProps}\n {...externalProps}\n >\n {wrapStringWithSpan(prefix)}\n {label || children}\n {wrapStringWithSpan(suffix)}\n </a>\n )\n }\n)\n\nBaseLink.displayName = \"BaseLink\"\n"],"names":["React"],"mappings":";;;;AAyBO,MAAM,QAAQ,GAAG,UAAU,CAChC,CACE,EACE,QAAQ,EACR,SAAS,EACT,QAAQ,GAAG,KAAK,EAChB,SAAS,EACT,IAAI,EACJ,IAAI,EACJ,KAAK,EACL,MAAM,EACN,IAAI,EACJ,MAAM,EACN,GAAG,SAAS,EACS,EACvB,GAAG,KACD;IACF,MAAM,iBAAiB,GAAG,UAAU,CAClC,IAAI,IAAI,SAAS,EACjB,IAAI,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,IAAI,wBAAwB,CAAC,IAAI,CAAC,EAC/D,IAAI,IAAI,wBAAwB,CAAC,IAAI,CAAC,EACtC,SAAS,IAAI,qBAAqB,EAClC,SAAS,EACT,EAAE,iBAAiB,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,EAAE,CACzD;IAED,MAAM,aAAa,GAAG;UAClB,EAAE,GAAG,EAAE,qBAAqB,EAAE,MAAM,EAAE,QAAQ;UAC9C,EAAE;AAEN,IAAA,QACEA,cAAA,CAAA,aAAA,CAAA,GAAA,EAAA,EACE,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,iBAAiB,EAC5B,GAAG,EAAE,GAAG,EAAA,GACJ,SAAS,KACT,aAAa,EAAA;QAEhB,kBAAkB,CAAC,MAAM,CAAC;AAC1B,QAAA,KAAK,IAAI,QAAQ;AACjB,QAAA,kBAAkB,CAAC,MAAM,CAAC,CACzB;AAER,CAAC;AAGH,QAAQ,CAAC,WAAW,GAAG,UAAU;;;;"}
1
+ {"version":3,"file":"BaseLink.js","sources":["../../../src/components/link/BaseLink.tsx"],"sourcesContent":["import \"../button/btn.css\"\n\nimport { Slot, Slottable } from \"@radix-ui/react-slot\"\nimport {\n BaseComponentProps,\n COMPONENT_KIND_CLASS_MAP,\n COMPONENT_SIZE_CLASS_MAP,\n ComponentKind,\n wrapStringWithSpan,\n} from \"@utilities/buttonLinkShared\"\nimport classNames from \"classnames\"\nimport React, { AnchorHTMLAttributes, forwardRef } from \"react\"\n\ntype BaseLinkBaseProps = BaseComponentProps &\n Omit<\n AnchorHTMLAttributes<HTMLAnchorElement>,\n keyof BaseComponentProps | \"children\" | \"href\"\n > & {\n children?: React.ReactNode\n external?: boolean\n kind?: ComponentKind\n label?: React.ReactNode\n }\n\n// Forces TS to eagerly resolve a type into a flat object shape instead of\n// displaying it as an unresolved Omit/Extract/intersection expression -\n// keeps \"missing property\" errors on asChild/href readable.\nexport type Simplify<T> = { [K in keyof T]: T[K] } & {}\n\nexport type BaseLinkElementProps =\n | Simplify<\n BaseLinkBaseProps & {\n /**\n * When true, merges the link's styling onto the child element instead\n * of rendering an `<a>`. Use to wrap a router link (e.g. react-router,\n * Next.js) or any link-like component. The `external` prop still\n * applies — it spreads `rel`/`target` onto the child element.\n */\n asChild: true\n href?: never\n }\n >\n | Simplify<BaseLinkBaseProps & { asChild?: false; href: string }>\n\nexport const BaseLink = forwardRef<HTMLAnchorElement, BaseLinkElementProps>(\n (\n {\n asChild = false,\n children,\n className,\n external = false,\n fullWidth,\n href,\n kind,\n label,\n prefix,\n size,\n suffix,\n ...restProps\n }: BaseLinkElementProps,\n ref\n ) => {\n const combinedClassName = classNames(\n kind && \"tds-btn\",\n size && size !== \"md\" && kind && COMPONENT_SIZE_CLASS_MAP[size],\n kind && COMPONENT_KIND_CLASS_MAP[kind],\n fullWidth && \"tds-btn--full-width\",\n className,\n { \"tds-btn--prefix\": prefix, \"tds-btn--suffix\": suffix }\n )\n\n const externalProps = external\n ? { rel: \"noopener noreferrer\", target: \"_blank\" }\n : {}\n\n const Comp = asChild ? Slot : \"a\"\n\n return (\n <Comp\n {...(!asChild && { href })}\n className={combinedClassName}\n ref={ref}\n {...restProps}\n {...externalProps}\n >\n {wrapStringWithSpan(prefix)}\n <Slottable>{label || children}</Slottable>\n {wrapStringWithSpan(suffix)}\n </Comp>\n )\n }\n)\n\nBaseLink.displayName = \"BaseLink\"\n"],"names":["React"],"mappings":";;;;;AA4CO,MAAM,QAAQ,GAAG,UAAU,CAChC,CACE,EACE,OAAO,GAAG,KAAK,EACf,QAAQ,EACR,SAAS,EACT,QAAQ,GAAG,KAAK,EAChB,SAAS,EACT,IAAI,EACJ,IAAI,EACJ,KAAK,EACL,MAAM,EACN,IAAI,EACJ,MAAM,EACN,GAAG,SAAS,EACS,EACvB,GAAG,KACD;IACF,MAAM,iBAAiB,GAAG,UAAU,CAClC,IAAI,IAAI,SAAS,EACjB,IAAI,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,IAAI,wBAAwB,CAAC,IAAI,CAAC,EAC/D,IAAI,IAAI,wBAAwB,CAAC,IAAI,CAAC,EACtC,SAAS,IAAI,qBAAqB,EAClC,SAAS,EACT,EAAE,iBAAiB,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,EAAE,CACzD;IAED,MAAM,aAAa,GAAG;UAClB,EAAE,GAAG,EAAE,qBAAqB,EAAE,MAAM,EAAE,QAAQ;UAC9C,EAAE;IAEN,MAAM,IAAI,GAAG,OAAO,GAAG,IAAI,GAAG,GAAG;IAEjC,QACEA,6BAAC,IAAI,EAAA,EAAA,IACE,CAAC,OAAO,IAAI,EAAE,IAAI,EAAE,CAAC,EAC1B,SAAS,EAAE,iBAAiB,EAC5B,GAAG,EAAE,GAAG,EAAA,GACJ,SAAS,EAAA,GACT,aAAa,EAAA;QAEhB,kBAAkB,CAAC,MAAM,CAAC;AAC3B,QAAAA,cAAA,CAAA,aAAA,CAAC,SAAS,EAAA,IAAA,EAAE,KAAK,IAAI,QAAQ,CAAa;AACzC,QAAA,kBAAkB,CAAC,MAAM,CAAC,CACtB;AAEX,CAAC;AAGH,QAAQ,CAAC,WAAW,GAAG,UAAU;;;;"}
@@ -1,7 +1,9 @@
1
1
  import "../button/btn.css";
2
2
  import React from "react";
3
3
  import { BaseLinkElementProps } from "./BaseLink";
4
- export type IconLinkProps = Omit<BaseLinkElementProps, "label" | "children"> & {
4
+ export type IconLinkProps = Omit<Extract<BaseLinkElementProps, {
5
+ asChild?: false;
6
+ }>, "label" | "children"> & {
5
7
  "aria-label": string;
6
8
  /** The icon element to display. */
7
9
  icon: React.ReactNode;
@@ -13,7 +15,289 @@ export type IconLinkProps = Omit<BaseLinkElementProps, "label" | "children"> & {
13
15
  * @component
14
16
  * @see {@link https://planningcenter.github.io/tapestry/?path=/docs/components-link-icon-link--docs | Storybook Documentation}
15
17
  */
16
- export declare const IconLink: React.ForwardRefExoticComponent<Omit<BaseLinkElementProps, "label" | "children"> & {
18
+ export declare const IconLink: React.ForwardRefExoticComponent<Omit<{
19
+ fullWidth?: boolean | undefined;
20
+ kind?: import("../../utilities/buttonLinkShared").ComponentKind | undefined;
21
+ prefix?: React.ReactNode;
22
+ size?: import("../../utilities/buttonLinkShared").ComponentSize | undefined;
23
+ suffix?: React.ReactNode;
24
+ slot?: string | undefined | undefined;
25
+ style?: React.CSSProperties | undefined;
26
+ title?: string | undefined | undefined;
27
+ className?: string | undefined | undefined;
28
+ type?: string | undefined | undefined;
29
+ defaultChecked?: boolean | undefined | undefined;
30
+ defaultValue?: string | number | readonly string[] | undefined;
31
+ suppressContentEditableWarning?: boolean | undefined | undefined;
32
+ suppressHydrationWarning?: boolean | undefined | undefined;
33
+ accessKey?: string | undefined | undefined;
34
+ autoFocus?: boolean | undefined | undefined;
35
+ contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
36
+ contextMenu?: string | undefined | undefined;
37
+ dir?: string | undefined | undefined;
38
+ draggable?: (boolean | "true" | "false") | undefined;
39
+ hidden?: boolean | undefined | undefined;
40
+ id?: string | undefined | undefined;
41
+ lang?: string | undefined | undefined;
42
+ nonce?: string | undefined | undefined;
43
+ spellCheck?: (boolean | "true" | "false") | undefined;
44
+ tabIndex?: number | undefined | undefined;
45
+ translate?: "yes" | "no" | undefined | undefined;
46
+ radioGroup?: string | undefined | undefined;
47
+ role?: React.AriaRole | undefined;
48
+ about?: string | undefined | undefined;
49
+ content?: string | undefined | undefined;
50
+ datatype?: string | undefined | undefined;
51
+ inlist?: any;
52
+ property?: string | undefined | undefined;
53
+ rel?: string | undefined | undefined;
54
+ resource?: string | undefined | undefined;
55
+ rev?: string | undefined | undefined;
56
+ typeof?: string | undefined | undefined;
57
+ vocab?: string | undefined | undefined;
58
+ autoCapitalize?: string | undefined | undefined;
59
+ autoCorrect?: string | undefined | undefined;
60
+ autoSave?: string | undefined | undefined;
61
+ color?: string | undefined | undefined;
62
+ itemProp?: string | undefined | undefined;
63
+ itemScope?: boolean | undefined | undefined;
64
+ itemType?: string | undefined | undefined;
65
+ itemID?: string | undefined | undefined;
66
+ itemRef?: string | undefined | undefined;
67
+ results?: number | undefined | undefined;
68
+ security?: string | undefined | undefined;
69
+ unselectable?: "on" | "off" | undefined | undefined;
70
+ inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined | undefined;
71
+ is?: string | undefined | undefined;
72
+ popover?: "" | "auto" | "manual" | undefined;
73
+ "aria-activedescendant"?: string | undefined | undefined;
74
+ "aria-atomic"?: (boolean | "true" | "false") | undefined;
75
+ "aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined | undefined;
76
+ "aria-braillelabel"?: string | undefined | undefined;
77
+ "aria-brailleroledescription"?: string | undefined | undefined;
78
+ "aria-busy"?: (boolean | "true" | "false") | undefined;
79
+ "aria-checked"?: boolean | "false" | "mixed" | "true" | undefined | undefined;
80
+ "aria-colcount"?: number | undefined | undefined;
81
+ "aria-colindex"?: number | undefined | undefined;
82
+ "aria-colindextext"?: string | undefined | undefined;
83
+ "aria-colspan"?: number | undefined | undefined;
84
+ "aria-controls"?: string | undefined | undefined;
85
+ "aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined | undefined;
86
+ "aria-describedby"?: string | undefined | undefined;
87
+ "aria-description"?: string | undefined | undefined;
88
+ "aria-details"?: string | undefined | undefined;
89
+ "aria-disabled"?: (boolean | "true" | "false") | undefined;
90
+ "aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined | undefined;
91
+ "aria-errormessage"?: string | undefined | undefined;
92
+ "aria-expanded"?: (boolean | "true" | "false") | undefined;
93
+ "aria-flowto"?: string | undefined | undefined;
94
+ "aria-grabbed"?: (boolean | "true" | "false") | undefined;
95
+ "aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined | undefined;
96
+ "aria-hidden"?: (boolean | "true" | "false") | undefined;
97
+ "aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined | undefined;
98
+ "aria-keyshortcuts"?: string | undefined | undefined;
99
+ "aria-label"?: string | undefined | undefined;
100
+ "aria-labelledby"?: string | undefined | undefined;
101
+ "aria-level"?: number | undefined | undefined;
102
+ "aria-live"?: "off" | "assertive" | "polite" | undefined | undefined;
103
+ "aria-modal"?: (boolean | "true" | "false") | undefined;
104
+ "aria-multiline"?: (boolean | "true" | "false") | undefined;
105
+ "aria-multiselectable"?: (boolean | "true" | "false") | undefined;
106
+ "aria-orientation"?: "horizontal" | "vertical" | undefined | undefined;
107
+ "aria-owns"?: string | undefined | undefined;
108
+ "aria-placeholder"?: string | undefined | undefined;
109
+ "aria-posinset"?: number | undefined | undefined;
110
+ "aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined | undefined;
111
+ "aria-readonly"?: (boolean | "true" | "false") | undefined;
112
+ "aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined | undefined;
113
+ "aria-required"?: (boolean | "true" | "false") | undefined;
114
+ "aria-roledescription"?: string | undefined | undefined;
115
+ "aria-rowcount"?: number | undefined | undefined;
116
+ "aria-rowindex"?: number | undefined | undefined;
117
+ "aria-rowindextext"?: string | undefined | undefined;
118
+ "aria-rowspan"?: number | undefined | undefined;
119
+ "aria-selected"?: (boolean | "true" | "false") | undefined;
120
+ "aria-setsize"?: number | undefined | undefined;
121
+ "aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined | undefined;
122
+ "aria-valuemax"?: number | undefined | undefined;
123
+ "aria-valuemin"?: number | undefined | undefined;
124
+ "aria-valuenow"?: number | undefined | undefined;
125
+ "aria-valuetext"?: string | undefined | undefined;
126
+ dangerouslySetInnerHTML?: {
127
+ __html: string | TrustedHTML;
128
+ } | undefined | undefined;
129
+ onCopy?: React.ClipboardEventHandler<HTMLAnchorElement> | undefined;
130
+ onCopyCapture?: React.ClipboardEventHandler<HTMLAnchorElement> | undefined;
131
+ onCut?: React.ClipboardEventHandler<HTMLAnchorElement> | undefined;
132
+ onCutCapture?: React.ClipboardEventHandler<HTMLAnchorElement> | undefined;
133
+ onPaste?: React.ClipboardEventHandler<HTMLAnchorElement> | undefined;
134
+ onPasteCapture?: React.ClipboardEventHandler<HTMLAnchorElement> | undefined;
135
+ onCompositionEnd?: React.CompositionEventHandler<HTMLAnchorElement> | undefined;
136
+ onCompositionEndCapture?: React.CompositionEventHandler<HTMLAnchorElement> | undefined;
137
+ onCompositionStart?: React.CompositionEventHandler<HTMLAnchorElement> | undefined;
138
+ onCompositionStartCapture?: React.CompositionEventHandler<HTMLAnchorElement> | undefined;
139
+ onCompositionUpdate?: React.CompositionEventHandler<HTMLAnchorElement> | undefined;
140
+ onCompositionUpdateCapture?: React.CompositionEventHandler<HTMLAnchorElement> | undefined;
141
+ onFocus?: React.FocusEventHandler<HTMLAnchorElement> | undefined;
142
+ onFocusCapture?: React.FocusEventHandler<HTMLAnchorElement> | undefined;
143
+ onBlur?: React.FocusEventHandler<HTMLAnchorElement> | undefined;
144
+ onBlurCapture?: React.FocusEventHandler<HTMLAnchorElement> | undefined;
145
+ onChange?: React.FormEventHandler<HTMLAnchorElement> | undefined;
146
+ onChangeCapture?: React.FormEventHandler<HTMLAnchorElement> | undefined;
147
+ onBeforeInput?: React.FormEventHandler<HTMLAnchorElement> | undefined;
148
+ onBeforeInputCapture?: React.FormEventHandler<HTMLAnchorElement> | undefined;
149
+ onInput?: React.FormEventHandler<HTMLAnchorElement> | undefined;
150
+ onInputCapture?: React.FormEventHandler<HTMLAnchorElement> | undefined;
151
+ onReset?: React.FormEventHandler<HTMLAnchorElement> | undefined;
152
+ onResetCapture?: React.FormEventHandler<HTMLAnchorElement> | undefined;
153
+ onSubmit?: React.FormEventHandler<HTMLAnchorElement> | undefined;
154
+ onSubmitCapture?: React.FormEventHandler<HTMLAnchorElement> | undefined;
155
+ onInvalid?: React.FormEventHandler<HTMLAnchorElement> | undefined;
156
+ onInvalidCapture?: React.FormEventHandler<HTMLAnchorElement> | undefined;
157
+ onLoad?: React.ReactEventHandler<HTMLAnchorElement> | undefined;
158
+ onLoadCapture?: React.ReactEventHandler<HTMLAnchorElement> | undefined;
159
+ onError?: React.ReactEventHandler<HTMLAnchorElement> | undefined;
160
+ onErrorCapture?: React.ReactEventHandler<HTMLAnchorElement> | undefined;
161
+ onKeyDown?: React.KeyboardEventHandler<HTMLAnchorElement> | undefined;
162
+ onKeyDownCapture?: React.KeyboardEventHandler<HTMLAnchorElement> | undefined;
163
+ onKeyPress?: React.KeyboardEventHandler<HTMLAnchorElement> | undefined;
164
+ onKeyPressCapture?: React.KeyboardEventHandler<HTMLAnchorElement> | undefined;
165
+ onKeyUp?: React.KeyboardEventHandler<HTMLAnchorElement> | undefined;
166
+ onKeyUpCapture?: React.KeyboardEventHandler<HTMLAnchorElement> | undefined;
167
+ onAbort?: React.ReactEventHandler<HTMLAnchorElement> | undefined;
168
+ onAbortCapture?: React.ReactEventHandler<HTMLAnchorElement> | undefined;
169
+ onCanPlay?: React.ReactEventHandler<HTMLAnchorElement> | undefined;
170
+ onCanPlayCapture?: React.ReactEventHandler<HTMLAnchorElement> | undefined;
171
+ onCanPlayThrough?: React.ReactEventHandler<HTMLAnchorElement> | undefined;
172
+ onCanPlayThroughCapture?: React.ReactEventHandler<HTMLAnchorElement> | undefined;
173
+ onDurationChange?: React.ReactEventHandler<HTMLAnchorElement> | undefined;
174
+ onDurationChangeCapture?: React.ReactEventHandler<HTMLAnchorElement> | undefined;
175
+ onEmptied?: React.ReactEventHandler<HTMLAnchorElement> | undefined;
176
+ onEmptiedCapture?: React.ReactEventHandler<HTMLAnchorElement> | undefined;
177
+ onEncrypted?: React.ReactEventHandler<HTMLAnchorElement> | undefined;
178
+ onEncryptedCapture?: React.ReactEventHandler<HTMLAnchorElement> | undefined;
179
+ onEnded?: React.ReactEventHandler<HTMLAnchorElement> | undefined;
180
+ onEndedCapture?: React.ReactEventHandler<HTMLAnchorElement> | undefined;
181
+ onLoadedData?: React.ReactEventHandler<HTMLAnchorElement> | undefined;
182
+ onLoadedDataCapture?: React.ReactEventHandler<HTMLAnchorElement> | undefined;
183
+ onLoadedMetadata?: React.ReactEventHandler<HTMLAnchorElement> | undefined;
184
+ onLoadedMetadataCapture?: React.ReactEventHandler<HTMLAnchorElement> | undefined;
185
+ onLoadStart?: React.ReactEventHandler<HTMLAnchorElement> | undefined;
186
+ onLoadStartCapture?: React.ReactEventHandler<HTMLAnchorElement> | undefined;
187
+ onPause?: React.ReactEventHandler<HTMLAnchorElement> | undefined;
188
+ onPauseCapture?: React.ReactEventHandler<HTMLAnchorElement> | undefined;
189
+ onPlay?: React.ReactEventHandler<HTMLAnchorElement> | undefined;
190
+ onPlayCapture?: React.ReactEventHandler<HTMLAnchorElement> | undefined;
191
+ onPlaying?: React.ReactEventHandler<HTMLAnchorElement> | undefined;
192
+ onPlayingCapture?: React.ReactEventHandler<HTMLAnchorElement> | undefined;
193
+ onProgress?: React.ReactEventHandler<HTMLAnchorElement> | undefined;
194
+ onProgressCapture?: React.ReactEventHandler<HTMLAnchorElement> | undefined;
195
+ onRateChange?: React.ReactEventHandler<HTMLAnchorElement> | undefined;
196
+ onRateChangeCapture?: React.ReactEventHandler<HTMLAnchorElement> | undefined;
197
+ onResize?: React.ReactEventHandler<HTMLAnchorElement> | undefined;
198
+ onResizeCapture?: React.ReactEventHandler<HTMLAnchorElement> | undefined;
199
+ onSeeked?: React.ReactEventHandler<HTMLAnchorElement> | undefined;
200
+ onSeekedCapture?: React.ReactEventHandler<HTMLAnchorElement> | undefined;
201
+ onSeeking?: React.ReactEventHandler<HTMLAnchorElement> | undefined;
202
+ onSeekingCapture?: React.ReactEventHandler<HTMLAnchorElement> | undefined;
203
+ onStalled?: React.ReactEventHandler<HTMLAnchorElement> | undefined;
204
+ onStalledCapture?: React.ReactEventHandler<HTMLAnchorElement> | undefined;
205
+ onSuspend?: React.ReactEventHandler<HTMLAnchorElement> | undefined;
206
+ onSuspendCapture?: React.ReactEventHandler<HTMLAnchorElement> | undefined;
207
+ onTimeUpdate?: React.ReactEventHandler<HTMLAnchorElement> | undefined;
208
+ onTimeUpdateCapture?: React.ReactEventHandler<HTMLAnchorElement> | undefined;
209
+ onVolumeChange?: React.ReactEventHandler<HTMLAnchorElement> | undefined;
210
+ onVolumeChangeCapture?: React.ReactEventHandler<HTMLAnchorElement> | undefined;
211
+ onWaiting?: React.ReactEventHandler<HTMLAnchorElement> | undefined;
212
+ onWaitingCapture?: React.ReactEventHandler<HTMLAnchorElement> | undefined;
213
+ onAuxClick?: React.MouseEventHandler<HTMLAnchorElement> | undefined;
214
+ onAuxClickCapture?: React.MouseEventHandler<HTMLAnchorElement> | undefined;
215
+ onClick?: React.MouseEventHandler<HTMLAnchorElement> | undefined;
216
+ onClickCapture?: React.MouseEventHandler<HTMLAnchorElement> | undefined;
217
+ onContextMenu?: React.MouseEventHandler<HTMLAnchorElement> | undefined;
218
+ onContextMenuCapture?: React.MouseEventHandler<HTMLAnchorElement> | undefined;
219
+ onDoubleClick?: React.MouseEventHandler<HTMLAnchorElement> | undefined;
220
+ onDoubleClickCapture?: React.MouseEventHandler<HTMLAnchorElement> | undefined;
221
+ onDrag?: React.DragEventHandler<HTMLAnchorElement> | undefined;
222
+ onDragCapture?: React.DragEventHandler<HTMLAnchorElement> | undefined;
223
+ onDragEnd?: React.DragEventHandler<HTMLAnchorElement> | undefined;
224
+ onDragEndCapture?: React.DragEventHandler<HTMLAnchorElement> | undefined;
225
+ onDragEnter?: React.DragEventHandler<HTMLAnchorElement> | undefined;
226
+ onDragEnterCapture?: React.DragEventHandler<HTMLAnchorElement> | undefined;
227
+ onDragExit?: React.DragEventHandler<HTMLAnchorElement> | undefined;
228
+ onDragExitCapture?: React.DragEventHandler<HTMLAnchorElement> | undefined;
229
+ onDragLeave?: React.DragEventHandler<HTMLAnchorElement> | undefined;
230
+ onDragLeaveCapture?: React.DragEventHandler<HTMLAnchorElement> | undefined;
231
+ onDragOver?: React.DragEventHandler<HTMLAnchorElement> | undefined;
232
+ onDragOverCapture?: React.DragEventHandler<HTMLAnchorElement> | undefined;
233
+ onDragStart?: React.DragEventHandler<HTMLAnchorElement> | undefined;
234
+ onDragStartCapture?: React.DragEventHandler<HTMLAnchorElement> | undefined;
235
+ onDrop?: React.DragEventHandler<HTMLAnchorElement> | undefined;
236
+ onDropCapture?: React.DragEventHandler<HTMLAnchorElement> | undefined;
237
+ onMouseDown?: React.MouseEventHandler<HTMLAnchorElement> | undefined;
238
+ onMouseDownCapture?: React.MouseEventHandler<HTMLAnchorElement> | undefined;
239
+ onMouseEnter?: React.MouseEventHandler<HTMLAnchorElement> | undefined;
240
+ onMouseLeave?: React.MouseEventHandler<HTMLAnchorElement> | undefined;
241
+ onMouseMove?: React.MouseEventHandler<HTMLAnchorElement> | undefined;
242
+ onMouseMoveCapture?: React.MouseEventHandler<HTMLAnchorElement> | undefined;
243
+ onMouseOut?: React.MouseEventHandler<HTMLAnchorElement> | undefined;
244
+ onMouseOutCapture?: React.MouseEventHandler<HTMLAnchorElement> | undefined;
245
+ onMouseOver?: React.MouseEventHandler<HTMLAnchorElement> | undefined;
246
+ onMouseOverCapture?: React.MouseEventHandler<HTMLAnchorElement> | undefined;
247
+ onMouseUp?: React.MouseEventHandler<HTMLAnchorElement> | undefined;
248
+ onMouseUpCapture?: React.MouseEventHandler<HTMLAnchorElement> | undefined;
249
+ onSelect?: React.ReactEventHandler<HTMLAnchorElement> | undefined;
250
+ onSelectCapture?: React.ReactEventHandler<HTMLAnchorElement> | undefined;
251
+ onTouchCancel?: React.TouchEventHandler<HTMLAnchorElement> | undefined;
252
+ onTouchCancelCapture?: React.TouchEventHandler<HTMLAnchorElement> | undefined;
253
+ onTouchEnd?: React.TouchEventHandler<HTMLAnchorElement> | undefined;
254
+ onTouchEndCapture?: React.TouchEventHandler<HTMLAnchorElement> | undefined;
255
+ onTouchMove?: React.TouchEventHandler<HTMLAnchorElement> | undefined;
256
+ onTouchMoveCapture?: React.TouchEventHandler<HTMLAnchorElement> | undefined;
257
+ onTouchStart?: React.TouchEventHandler<HTMLAnchorElement> | undefined;
258
+ onTouchStartCapture?: React.TouchEventHandler<HTMLAnchorElement> | undefined;
259
+ onPointerDown?: React.PointerEventHandler<HTMLAnchorElement> | undefined;
260
+ onPointerDownCapture?: React.PointerEventHandler<HTMLAnchorElement> | undefined;
261
+ onPointerMove?: React.PointerEventHandler<HTMLAnchorElement> | undefined;
262
+ onPointerMoveCapture?: React.PointerEventHandler<HTMLAnchorElement> | undefined;
263
+ onPointerUp?: React.PointerEventHandler<HTMLAnchorElement> | undefined;
264
+ onPointerUpCapture?: React.PointerEventHandler<HTMLAnchorElement> | undefined;
265
+ onPointerCancel?: React.PointerEventHandler<HTMLAnchorElement> | undefined;
266
+ onPointerCancelCapture?: React.PointerEventHandler<HTMLAnchorElement> | undefined;
267
+ onPointerEnter?: React.PointerEventHandler<HTMLAnchorElement> | undefined;
268
+ onPointerLeave?: React.PointerEventHandler<HTMLAnchorElement> | undefined;
269
+ onPointerOver?: React.PointerEventHandler<HTMLAnchorElement> | undefined;
270
+ onPointerOverCapture?: React.PointerEventHandler<HTMLAnchorElement> | undefined;
271
+ onPointerOut?: React.PointerEventHandler<HTMLAnchorElement> | undefined;
272
+ onPointerOutCapture?: React.PointerEventHandler<HTMLAnchorElement> | undefined;
273
+ onGotPointerCapture?: React.PointerEventHandler<HTMLAnchorElement> | undefined;
274
+ onGotPointerCaptureCapture?: React.PointerEventHandler<HTMLAnchorElement> | undefined;
275
+ onLostPointerCapture?: React.PointerEventHandler<HTMLAnchorElement> | undefined;
276
+ onLostPointerCaptureCapture?: React.PointerEventHandler<HTMLAnchorElement> | undefined;
277
+ onScroll?: React.UIEventHandler<HTMLAnchorElement> | undefined;
278
+ onScrollCapture?: React.UIEventHandler<HTMLAnchorElement> | undefined;
279
+ onWheel?: React.WheelEventHandler<HTMLAnchorElement> | undefined;
280
+ onWheelCapture?: React.WheelEventHandler<HTMLAnchorElement> | undefined;
281
+ onAnimationStart?: React.AnimationEventHandler<HTMLAnchorElement> | undefined;
282
+ onAnimationStartCapture?: React.AnimationEventHandler<HTMLAnchorElement> | undefined;
283
+ onAnimationEnd?: React.AnimationEventHandler<HTMLAnchorElement> | undefined;
284
+ onAnimationEndCapture?: React.AnimationEventHandler<HTMLAnchorElement> | undefined;
285
+ onAnimationIteration?: React.AnimationEventHandler<HTMLAnchorElement> | undefined;
286
+ onAnimationIterationCapture?: React.AnimationEventHandler<HTMLAnchorElement> | undefined;
287
+ onTransitionEnd?: React.TransitionEventHandler<HTMLAnchorElement> | undefined;
288
+ onTransitionEndCapture?: React.TransitionEventHandler<HTMLAnchorElement> | undefined;
289
+ media?: string | undefined | undefined;
290
+ target?: React.HTMLAttributeAnchorTarget | undefined;
291
+ download?: any;
292
+ hrefLang?: string | undefined | undefined;
293
+ ping?: string | undefined | undefined;
294
+ referrerPolicy?: React.HTMLAttributeReferrerPolicy | undefined;
295
+ children?: React.ReactNode;
296
+ external?: boolean | undefined;
297
+ label?: React.ReactNode;
298
+ asChild?: false | undefined;
299
+ href: string;
300
+ }, "label" | "children"> & {
17
301
  "aria-label": string;
18
302
  /** The icon element to display. */
19
303
  icon: React.ReactNode;
@@ -1 +1 @@
1
- {"version":3,"file":"IconLink.d.ts","sourceRoot":"","sources":["../../../src/components/link/IconLink.tsx"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,CAAA;AAG1B,OAAO,KAAqB,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAY,oBAAoB,EAAE,MAAM,YAAY,CAAA;AAE3D,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,oBAAoB,EAAE,OAAO,GAAG,UAAU,CAAC,GAAG;IAC7E,YAAY,EAAE,MAAM,CAAA;IACpB,mCAAmC;IACnC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAA;CACtB,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ;kBAZL,MAAM;IACpB,mCAAmC;UAC7B,KAAK,CAAC,SAAS;2CAwBtB,CAAA"}
1
+ {"version":3,"file":"IconLink.d.ts","sourceRoot":"","sources":["../../../src/components/link/IconLink.tsx"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,CAAA;AAG1B,OAAO,KAAqB,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAY,oBAAoB,EAAE,MAAM,YAAY,CAAA;AAE3D,MAAM,MAAM,aAAa,GAAG,IAAI,CAC9B,OAAO,CAAC,oBAAoB,EAAE;IAAE,OAAO,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC,EAClD,OAAO,GAAG,UAAU,CACrB,GAAG;IACF,YAAY,EAAE,MAAM,CAAA;IACpB,mCAAmC;IACnC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAA;CACtB,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAZL,MAAM;IACpB,mCAAmC;UAC7B,KAAK,CAAC,SAAS;2CAwBtB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"IconLink.js","sources":["../../../src/components/link/IconLink.tsx"],"sourcesContent":["import \"../button/btn.css\"\n\nimport classNames from \"classnames\"\nimport React, { forwardRef } from \"react\"\n\nimport { BaseLink, BaseLinkElementProps } from \"./BaseLink\"\n\nexport type IconLinkProps = Omit<BaseLinkElementProps, \"label\" | \"children\"> & {\n \"aria-label\": string\n /** The icon element to display. */\n icon: React.ReactNode\n}\n\n/**\n * An icon-only link component that renders as an HTML `<a>` element with\n * button-like styling. Requires an `icon` and `aria-label` for accessibility.\n *\n * @component\n * @see {@link https://planningcenter.github.io/tapestry/?path=/docs/components-link-icon-link--docs | Storybook Documentation}\n */\nexport const IconLink = forwardRef<HTMLAnchorElement, IconLinkProps>(\n ({ className, href, icon, ...restProps }: IconLinkProps, ref) => {\n const iconOnlyClassName = classNames(\"tds-btn--icononly\", className)\n\n return (\n <BaseLink\n href={href}\n label={icon}\n className={iconOnlyClassName}\n ref={ref}\n {...restProps}\n />\n )\n }\n)\n\nIconLink.displayName = \"IconLink\"\n"],"names":["React"],"mappings":";;;;AAaA;;;;;;AAMG;MACU,QAAQ,GAAG,UAAU,CAChC,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,SAAS,EAAiB,EAAE,GAAG,KAAI;IAC9D,MAAM,iBAAiB,GAAG,UAAU,CAAC,mBAAmB,EAAE,SAAS,CAAC;IAEpE,QACEA,6BAAC,QAAQ,EAAA,EACP,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,IAAI,EACX,SAAS,EAAE,iBAAiB,EAC5B,GAAG,EAAE,GAAG,EAAA,GACJ,SAAS,EAAA,CACb;AAEN,CAAC;AAGH,QAAQ,CAAC,WAAW,GAAG,UAAU;;;;"}
1
+ {"version":3,"file":"IconLink.js","sources":["../../../src/components/link/IconLink.tsx"],"sourcesContent":["import \"../button/btn.css\"\n\nimport classNames from \"classnames\"\nimport React, { forwardRef } from \"react\"\n\nimport { BaseLink, BaseLinkElementProps } from \"./BaseLink\"\n\nexport type IconLinkProps = Omit<\n Extract<BaseLinkElementProps, { asChild?: false }>,\n \"label\" | \"children\"\n> & {\n \"aria-label\": string\n /** The icon element to display. */\n icon: React.ReactNode\n}\n\n/**\n * An icon-only link component that renders as an HTML `<a>` element with\n * button-like styling. Requires an `icon` and `aria-label` for accessibility.\n *\n * @component\n * @see {@link https://planningcenter.github.io/tapestry/?path=/docs/components-link-icon-link--docs | Storybook Documentation}\n */\nexport const IconLink = forwardRef<HTMLAnchorElement, IconLinkProps>(\n ({ className, href, icon, ...restProps }: IconLinkProps, ref) => {\n const iconOnlyClassName = classNames(\"tds-btn--icononly\", className)\n\n return (\n <BaseLink\n href={href}\n label={icon}\n className={iconOnlyClassName}\n ref={ref}\n {...restProps}\n />\n )\n }\n)\n\nIconLink.displayName = \"IconLink\"\n"],"names":["React"],"mappings":";;;;AAgBA;;;;;;AAMG;MACU,QAAQ,GAAG,UAAU,CAChC,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,SAAS,EAAiB,EAAE,GAAG,KAAI;IAC9D,MAAM,iBAAiB,GAAG,UAAU,CAAC,mBAAmB,EAAE,SAAS,CAAC;IAEpE,QACEA,6BAAC,QAAQ,EAAA,EACP,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,IAAI,EACX,SAAS,EAAE,iBAAiB,EAC5B,GAAG,EAAE,GAAG,EAAA,GACJ,SAAS,EAAA,CACb;AAEN,CAAC;AAGH,QAAQ,CAAC,WAAW,GAAG,UAAU;;;;"}
@@ -1,10 +1,15 @@
1
1
  import "../button/btn.css";
2
2
  import React from "react";
3
- import { BaseLinkElementProps } from "./BaseLink";
4
- export type LinkProps = Omit<BaseLinkElementProps, "label"> & {
5
- children?: React.ReactNode;
3
+ import { BaseLinkElementProps, Simplify } from "./BaseLink";
4
+ export type LinkProps = Simplify<Omit<Extract<BaseLinkElementProps, {
5
+ asChild?: false;
6
+ }>, "label"> & {
6
7
  label?: string;
7
- };
8
+ }> | Simplify<Omit<Extract<BaseLinkElementProps, {
9
+ asChild: true;
10
+ }>, "label"> & {
11
+ label?: string;
12
+ }>;
8
13
  /**
9
14
  * A link component that renders as an HTML `<a>` element with button-like
10
15
  * styling. Use for navigation; for actions that don't change the URL, use
@@ -14,8 +19,5 @@ export type LinkProps = Omit<BaseLinkElementProps, "label"> & {
14
19
  * @see {@link https://planningcenter.github.io/tapestry/?path=/docs/components-link--docs | Storybook Documentation}
15
20
  * @see {@link https://github.com/planningcenter/tapestry/tree/main/packages/tapestry-migration-cli | Migration CLI: Available}
16
21
  */
17
- export declare const Link: React.ForwardRefExoticComponent<Omit<BaseLinkElementProps, "label"> & {
18
- children?: React.ReactNode;
19
- label?: string;
20
- } & React.RefAttributes<HTMLAnchorElement>>;
22
+ export declare const Link: React.ForwardRefExoticComponent<LinkProps & React.RefAttributes<HTMLAnchorElement>>;
21
23
  //# sourceMappingURL=Link.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../../src/components/link/Link.tsx"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,CAAA;AAE1B,OAAO,KAAqB,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAY,oBAAoB,EAAE,MAAM,YAAY,CAAA;AAE3D,MAAM,MAAM,SAAS,GAAG,IAAI,CAAC,oBAAoB,EAAE,OAAO,CAAC,GAAG;IAC5D,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,IAAI;eAbJ,KAAK,CAAC,SAAS;YAClB,MAAM;2CAgBf,CAAA"}
1
+ {"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../../src/components/link/Link.tsx"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,CAAA;AAE1B,OAAO,KAAqB,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAY,oBAAoB,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAErE,MAAM,MAAM,SAAS,GACjB,QAAQ,CACN,IAAI,CAAC,OAAO,CAAC,oBAAoB,EAAE;IAAE,OAAO,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC,EAAE,OAAO,CAAC,GAAG;IAClE,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CACF,GACD,QAAQ,CACN,IAAI,CAAC,OAAO,CAAC,oBAAoB,EAAE;IAAE,OAAO,EAAE,IAAI,CAAA;CAAE,CAAC,EAAE,OAAO,CAAC,GAAG;IAChE,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CACF,CAAA;AAEL;;;;;;;;GAQG;AACH,eAAO,MAAM,IAAI,qFAKhB,CAAA"}
@@ -10,8 +10,9 @@ import { BaseLink } from './BaseLink.js';
10
10
  * @see {@link https://planningcenter.github.io/tapestry/?path=/docs/components-link--docs | Storybook Documentation}
11
11
  * @see {@link https://github.com/planningcenter/tapestry/tree/main/packages/tapestry-migration-cli | Migration CLI: Available}
12
12
  */
13
- const Link = forwardRef(({ href, ...restProps }, ref) => {
14
- return React__default.createElement(BaseLink, { href: href, ref: ref, ...restProps });
13
+ const Link = forwardRef((props, ref) => {
14
+ // eslint-disable-next-line tapestry/valid-href
15
+ return React__default.createElement(BaseLink, { ref: ref, ...props });
15
16
  });
16
17
  Link.displayName = "Link";
17
18
 
@@ -1 +1 @@
1
- {"version":3,"file":"Link.js","sources":["../../../src/components/link/Link.tsx"],"sourcesContent":["import \"../button/btn.css\"\n\nimport React, { forwardRef } from \"react\"\n\nimport { BaseLink, BaseLinkElementProps } from \"./BaseLink\"\n\nexport type LinkProps = Omit<BaseLinkElementProps, \"label\"> & {\n children?: React.ReactNode\n label?: string\n}\n\n/**\n * A link component that renders as an HTML `<a>` element with button-like\n * styling. Use for navigation; for actions that don't change the URL, use\n * `Button` instead.\n *\n * @component\n * @see {@link https://planningcenter.github.io/tapestry/?path=/docs/components-link--docs | Storybook Documentation}\n * @see {@link https://github.com/planningcenter/tapestry/tree/main/packages/tapestry-migration-cli | Migration CLI: Available}\n */\nexport const Link = forwardRef<HTMLAnchorElement, LinkProps>(\n ({ href, ...restProps }: LinkProps, ref) => {\n return <BaseLink href={href} ref={ref} {...restProps} />\n }\n)\n\nLink.displayName = \"Link\"\n"],"names":["React"],"mappings":";;;AAWA;;;;;;;;AAQG;AACI,MAAM,IAAI,GAAG,UAAU,CAC5B,CAAC,EAAE,IAAI,EAAE,GAAG,SAAS,EAAa,EAAE,GAAG,KAAI;AACzC,IAAA,OAAOA,cAAA,CAAA,aAAA,CAAC,QAAQ,EAAA,EAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAA,GAAM,SAAS,GAAI;AAC1D,CAAC;AAGH,IAAI,CAAC,WAAW,GAAG,MAAM;;;;"}
1
+ {"version":3,"file":"Link.js","sources":["../../../src/components/link/Link.tsx"],"sourcesContent":["import \"../button/btn.css\"\n\nimport React, { forwardRef } from \"react\"\n\nimport { BaseLink, BaseLinkElementProps, Simplify } from \"./BaseLink\"\n\nexport type LinkProps =\n | Simplify<\n Omit<Extract<BaseLinkElementProps, { asChild?: false }>, \"label\"> & {\n label?: string\n }\n >\n | Simplify<\n Omit<Extract<BaseLinkElementProps, { asChild: true }>, \"label\"> & {\n label?: string\n }\n >\n\n/**\n * A link component that renders as an HTML `<a>` element with button-like\n * styling. Use for navigation; for actions that don't change the URL, use\n * `Button` instead.\n *\n * @component\n * @see {@link https://planningcenter.github.io/tapestry/?path=/docs/components-link--docs | Storybook Documentation}\n * @see {@link https://github.com/planningcenter/tapestry/tree/main/packages/tapestry-migration-cli | Migration CLI: Available}\n */\nexport const Link = forwardRef<HTMLAnchorElement, LinkProps>(\n (props: LinkProps, ref) => {\n // eslint-disable-next-line tapestry/valid-href\n return <BaseLink ref={ref} {...props} />\n }\n)\n\nLink.displayName = \"Link\"\n"],"names":["React"],"mappings":";;;AAkBA;;;;;;;;AAQG;AACI,MAAM,IAAI,GAAG,UAAU,CAC5B,CAAC,KAAgB,EAAE,GAAG,KAAI;;IAExB,OAAOA,cAAA,CAAA,aAAA,CAAC,QAAQ,EAAA,EAAC,GAAG,EAAE,GAAG,EAAA,GAAM,KAAK,EAAA,CAAI;AAC1C,CAAC;AAGH,IAAI,CAAC,WAAW,GAAG,MAAM;;;;"}