@economic/taco 10.0.0-hanger-base-ui.0 → 10.0.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.
|
@@ -35,7 +35,7 @@ function LinkInner(props, ref) {
|
|
|
35
35
|
size ? [typography.TYPOGRAPHY_TEXT_SIZE_CLASSES[size], typography.TYPOGRAPHY_LINE_HEIGHT_CLASSES[size]] : void 0,
|
|
36
36
|
/** set underline thickness depending on size of Link */
|
|
37
37
|
size === "sm" ? "decoration-1" : "decoration-2",
|
|
38
|
-
"underline cursor-pointer focus:outline-transparent focus-visible:yt-focus text-blue-700 hover:text-blue-900 active:text-blue-900 visited:text-blue-700 underline-offset-2 ",
|
|
38
|
+
"underline cursor-pointer focus:outline-transparent focus-visible:yt-focus text-blue-700 focus-visible:text-blue-700 hover:text-blue-900 focus-visible:hover:text-blue-900 active:text-blue-900 focus-visible:active:text-blue-900 visited:text-blue-700 focus-visible:visited:text-blue-700 underline-offset-2 ",
|
|
39
39
|
{
|
|
40
40
|
"font-bold": bold
|
|
41
41
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Link.cjs","sources":["../../../../src/components/Actions/Link/Link.tsx"],"sourcesContent":["import * as React from 'react';\nimport cn from 'clsx';\n\nimport { TYPOGRAPHY_LINE_HEIGHT_CLASSES, TYPOGRAPHY_TEXT_SIZE_CLASSES } from '../../../utils/typography';\n\n/**\n * Link label: string text (literals, template literals, i18n helpers that return `string`, string constants),\n * or a single React element—typically a component whose output is text-only.\n * (TypeScript cannot enforce “component returns string” vs JSX; avoid non-text elements.)\n */\nexport type LinkChildren = string | React.ReactElement | null;\n\n/** Props specific to our Link component */\ntype LinkOwnProps<T extends React.ElementType = 'a'> = {\n /** Allows using a custom or framework-specific link component (e.g. Next.js or React Router) */\n as?: T;\n /** Set specific size that matches our text sizes. If it's not set, it inherits the parent size */\n size?: 'sm' | 'md' | 'lg';\n /** If true, the Link will be rendered in bold */\n bold?: boolean;\n /** The content of the Link */\n children?: LinkChildren;\n};\n\n/**\n * LinkProps combines our own props with the props of the underlying element (via `as`).\n * This allows the component to accept props like `to` for React Router or `href` for native anchors.\n * Note: `className` and `style` are explicitly excluded.\n */\nexport type LinkProps<T extends React.ElementType = 'a'> = LinkOwnProps<T> &\n Omit<React.ComponentPropsWithoutRef<T>, keyof LinkOwnProps<T> | 'className' | 'style'>;\n\nfunction LinkInner<T extends React.ElementType = 'a'>(\n props: LinkProps<T> & { ref?: React.Ref<unknown> },\n ref: React.Ref<unknown>\n) {\n // Destructure and discard className/style to prevent them from being applied at runtime\n const {\n as,\n size,\n bold,\n children,\n className: _,\n style: __,\n ...otherProps\n } = props as LinkProps<T> & {\n className?: string;\n style?: React.CSSProperties;\n };\n\n const Component: React.ElementType = as || 'a';\n\n const className = cn(\n size ? [TYPOGRAPHY_TEXT_SIZE_CLASSES[size], TYPOGRAPHY_LINE_HEIGHT_CLASSES[size]] : undefined,\n /** set underline thickness depending on size of Link */\n size === 'sm' ? 'decoration-1' : 'decoration-2',\n 'underline cursor-pointer focus:outline-transparent focus-visible:yt-focus text-blue-700 hover:text-blue-900 active:text-blue-900 visited:text-blue-700 underline-offset-2 ',\n {\n 'font-bold': bold,\n }\n );\n\n return (\n <Component {...otherProps} className={className} data-taco=\"link\" ref={ref}>\n {children}\n </Component>\n );\n}\n\nexport const Link = React.forwardRef(LinkInner) as <T extends React.ElementType = 'a'>(\n props: LinkProps<T> & { ref?: React.Ref<unknown> }\n) => React.ReactElement | null;\n"],"names":["TYPOGRAPHY_TEXT_SIZE_CLASSES","TYPOGRAPHY_LINE_HEIGHT_CLASSES","React"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAgCA,SAAS,UACL,OACA,KACF;AAEQ,QAAA;AAAA,IACF;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,WAAW;AAAA,IACX,OAAO;AAAA,IACP,GAAG;AAAA,EAAA,IACH;AAKJ,QAAM,YAA+B,MAAM;AAE3C,QAAM,YAAY;AAAA,IACd,OAAO,CAACA,WAAAA,6BAA6B,IAAI,GAAGC,WAAAA,+BAA+B,IAAI,CAAC,IAAI;AAAA;AAAA,IAEpF,SAAS,OAAO,iBAAiB;AAAA,IACjC;AAAA,IACA;AAAA,MACI,aAAa;AAAA,IAAA;AAAA,EAErB;AAGI,SAAAC,iCAAA,cAAC,aAAW,GAAG,YAAY,WAAsB,aAAU,QAAO,OAC7D,QACL;AAER;AAEa,MAAA,OAAOA,iBAAM,WAAW,SAAS;;"}
|
|
1
|
+
{"version":3,"file":"Link.cjs","sources":["../../../../src/components/Actions/Link/Link.tsx"],"sourcesContent":["import * as React from 'react';\nimport cn from 'clsx';\n\nimport { TYPOGRAPHY_LINE_HEIGHT_CLASSES, TYPOGRAPHY_TEXT_SIZE_CLASSES } from '../../../utils/typography';\n\n/**\n * Link label: string text (literals, template literals, i18n helpers that return `string`, string constants),\n * or a single React element—typically a component whose output is text-only.\n * (TypeScript cannot enforce “component returns string” vs JSX; avoid non-text elements.)\n */\nexport type LinkChildren = string | React.ReactElement | null;\n\n/** Props specific to our Link component */\ntype LinkOwnProps<T extends React.ElementType = 'a'> = {\n /** Allows using a custom or framework-specific link component (e.g. Next.js or React Router) */\n as?: T;\n /** Set specific size that matches our text sizes. If it's not set, it inherits the parent size */\n size?: 'sm' | 'md' | 'lg';\n /** If true, the Link will be rendered in bold */\n bold?: boolean;\n /** The content of the Link */\n children?: LinkChildren;\n};\n\n/**\n * LinkProps combines our own props with the props of the underlying element (via `as`).\n * This allows the component to accept props like `to` for React Router or `href` for native anchors.\n * Note: `className` and `style` are explicitly excluded.\n */\nexport type LinkProps<T extends React.ElementType = 'a'> = LinkOwnProps<T> &\n Omit<React.ComponentPropsWithoutRef<T>, keyof LinkOwnProps<T> | 'className' | 'style'>;\n\nfunction LinkInner<T extends React.ElementType = 'a'>(\n props: LinkProps<T> & { ref?: React.Ref<unknown> },\n ref: React.Ref<unknown>\n) {\n // Destructure and discard className/style to prevent them from being applied at runtime\n const {\n as,\n size,\n bold,\n children,\n className: _,\n style: __,\n ...otherProps\n } = props as LinkProps<T> & {\n className?: string;\n style?: React.CSSProperties;\n };\n\n const Component: React.ElementType = as || 'a';\n\n const className = cn(\n size ? [TYPOGRAPHY_TEXT_SIZE_CLASSES[size], TYPOGRAPHY_LINE_HEIGHT_CLASSES[size]] : undefined,\n /** set underline thickness depending on size of Link */\n size === 'sm' ? 'decoration-1' : 'decoration-2',\n 'underline cursor-pointer focus:outline-transparent focus-visible:yt-focus text-blue-700 focus-visible:text-blue-700 hover:text-blue-900 focus-visible:hover:text-blue-900 active:text-blue-900 focus-visible:active:text-blue-900 visited:text-blue-700 focus-visible:visited:text-blue-700 underline-offset-2 ',\n {\n 'font-bold': bold,\n }\n );\n\n return (\n <Component {...otherProps} className={className} data-taco=\"link\" ref={ref}>\n {children}\n </Component>\n );\n}\n\nexport const Link = React.forwardRef(LinkInner) as <T extends React.ElementType = 'a'>(\n props: LinkProps<T> & { ref?: React.Ref<unknown> }\n) => React.ReactElement | null;\n"],"names":["TYPOGRAPHY_TEXT_SIZE_CLASSES","TYPOGRAPHY_LINE_HEIGHT_CLASSES","React"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAgCA,SAAS,UACL,OACA,KACF;AAEQ,QAAA;AAAA,IACF;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,WAAW;AAAA,IACX,OAAO;AAAA,IACP,GAAG;AAAA,EAAA,IACH;AAKJ,QAAM,YAA+B,MAAM;AAE3C,QAAM,YAAY;AAAA,IACd,OAAO,CAACA,WAAAA,6BAA6B,IAAI,GAAGC,WAAAA,+BAA+B,IAAI,CAAC,IAAI;AAAA;AAAA,IAEpF,SAAS,OAAO,iBAAiB;AAAA,IACjC;AAAA,IACA;AAAA,MACI,aAAa;AAAA,IAAA;AAAA,EAErB;AAGI,SAAAC,iCAAA,cAAC,aAAW,GAAG,YAAY,WAAsB,aAAU,QAAO,OAC7D,QACL;AAER;AAEa,MAAA,OAAOA,iBAAM,WAAW,SAAS;;"}
|
|
@@ -16,7 +16,7 @@ function LinkInner(props, ref) {
|
|
|
16
16
|
size ? [TYPOGRAPHY_TEXT_SIZE_CLASSES[size], TYPOGRAPHY_LINE_HEIGHT_CLASSES[size]] : void 0,
|
|
17
17
|
/** set underline thickness depending on size of Link */
|
|
18
18
|
size === "sm" ? "decoration-1" : "decoration-2",
|
|
19
|
-
"underline cursor-pointer focus:outline-transparent focus-visible:yt-focus text-blue-700 hover:text-blue-900 active:text-blue-900 visited:text-blue-700 underline-offset-2 ",
|
|
19
|
+
"underline cursor-pointer focus:outline-transparent focus-visible:yt-focus text-blue-700 focus-visible:text-blue-700 hover:text-blue-900 focus-visible:hover:text-blue-900 active:text-blue-900 focus-visible:active:text-blue-900 visited:text-blue-700 focus-visible:visited:text-blue-700 underline-offset-2 ",
|
|
20
20
|
{
|
|
21
21
|
"font-bold": bold
|
|
22
22
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Link.js","sources":["../../../../src/components/Actions/Link/Link.tsx"],"sourcesContent":["import * as React from 'react';\nimport cn from 'clsx';\n\nimport { TYPOGRAPHY_LINE_HEIGHT_CLASSES, TYPOGRAPHY_TEXT_SIZE_CLASSES } from '../../../utils/typography';\n\n/**\n * Link label: string text (literals, template literals, i18n helpers that return `string`, string constants),\n * or a single React element—typically a component whose output is text-only.\n * (TypeScript cannot enforce “component returns string” vs JSX; avoid non-text elements.)\n */\nexport type LinkChildren = string | React.ReactElement | null;\n\n/** Props specific to our Link component */\ntype LinkOwnProps<T extends React.ElementType = 'a'> = {\n /** Allows using a custom or framework-specific link component (e.g. Next.js or React Router) */\n as?: T;\n /** Set specific size that matches our text sizes. If it's not set, it inherits the parent size */\n size?: 'sm' | 'md' | 'lg';\n /** If true, the Link will be rendered in bold */\n bold?: boolean;\n /** The content of the Link */\n children?: LinkChildren;\n};\n\n/**\n * LinkProps combines our own props with the props of the underlying element (via `as`).\n * This allows the component to accept props like `to` for React Router or `href` for native anchors.\n * Note: `className` and `style` are explicitly excluded.\n */\nexport type LinkProps<T extends React.ElementType = 'a'> = LinkOwnProps<T> &\n Omit<React.ComponentPropsWithoutRef<T>, keyof LinkOwnProps<T> | 'className' | 'style'>;\n\nfunction LinkInner<T extends React.ElementType = 'a'>(\n props: LinkProps<T> & { ref?: React.Ref<unknown> },\n ref: React.Ref<unknown>\n) {\n // Destructure and discard className/style to prevent them from being applied at runtime\n const {\n as,\n size,\n bold,\n children,\n className: _,\n style: __,\n ...otherProps\n } = props as LinkProps<T> & {\n className?: string;\n style?: React.CSSProperties;\n };\n\n const Component: React.ElementType = as || 'a';\n\n const className = cn(\n size ? [TYPOGRAPHY_TEXT_SIZE_CLASSES[size], TYPOGRAPHY_LINE_HEIGHT_CLASSES[size]] : undefined,\n /** set underline thickness depending on size of Link */\n size === 'sm' ? 'decoration-1' : 'decoration-2',\n 'underline cursor-pointer focus:outline-transparent focus-visible:yt-focus text-blue-700 hover:text-blue-900 active:text-blue-900 visited:text-blue-700 underline-offset-2 ',\n {\n 'font-bold': bold,\n }\n );\n\n return (\n <Component {...otherProps} className={className} data-taco=\"link\" ref={ref}>\n {children}\n </Component>\n );\n}\n\nexport const Link = React.forwardRef(LinkInner) as <T extends React.ElementType = 'a'>(\n props: LinkProps<T> & { ref?: React.Ref<unknown> }\n) => React.ReactElement | null;\n"],"names":[],"mappings":";;;AAgCA,SAAS,UACL,OACA,KACF;AAEQ,QAAA;AAAA,IACF;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,WAAW;AAAA,IACX,OAAO;AAAA,IACP,GAAG;AAAA,EAAA,IACH;AAKJ,QAAM,YAA+B,MAAM;AAE3C,QAAM,YAAY;AAAA,IACd,OAAO,CAAC,6BAA6B,IAAI,GAAG,+BAA+B,IAAI,CAAC,IAAI;AAAA;AAAA,IAEpF,SAAS,OAAO,iBAAiB;AAAA,IACjC;AAAA,IACA;AAAA,MACI,aAAa;AAAA,IAAA;AAAA,EAErB;AAGI,SAAA,sBAAA,cAAC,aAAW,GAAG,YAAY,WAAsB,aAAU,QAAO,OAC7D,QACL;AAER;AAEa,MAAA,OAAO,MAAM,WAAW,SAAS;"}
|
|
1
|
+
{"version":3,"file":"Link.js","sources":["../../../../src/components/Actions/Link/Link.tsx"],"sourcesContent":["import * as React from 'react';\nimport cn from 'clsx';\n\nimport { TYPOGRAPHY_LINE_HEIGHT_CLASSES, TYPOGRAPHY_TEXT_SIZE_CLASSES } from '../../../utils/typography';\n\n/**\n * Link label: string text (literals, template literals, i18n helpers that return `string`, string constants),\n * or a single React element—typically a component whose output is text-only.\n * (TypeScript cannot enforce “component returns string” vs JSX; avoid non-text elements.)\n */\nexport type LinkChildren = string | React.ReactElement | null;\n\n/** Props specific to our Link component */\ntype LinkOwnProps<T extends React.ElementType = 'a'> = {\n /** Allows using a custom or framework-specific link component (e.g. Next.js or React Router) */\n as?: T;\n /** Set specific size that matches our text sizes. If it's not set, it inherits the parent size */\n size?: 'sm' | 'md' | 'lg';\n /** If true, the Link will be rendered in bold */\n bold?: boolean;\n /** The content of the Link */\n children?: LinkChildren;\n};\n\n/**\n * LinkProps combines our own props with the props of the underlying element (via `as`).\n * This allows the component to accept props like `to` for React Router or `href` for native anchors.\n * Note: `className` and `style` are explicitly excluded.\n */\nexport type LinkProps<T extends React.ElementType = 'a'> = LinkOwnProps<T> &\n Omit<React.ComponentPropsWithoutRef<T>, keyof LinkOwnProps<T> | 'className' | 'style'>;\n\nfunction LinkInner<T extends React.ElementType = 'a'>(\n props: LinkProps<T> & { ref?: React.Ref<unknown> },\n ref: React.Ref<unknown>\n) {\n // Destructure and discard className/style to prevent them from being applied at runtime\n const {\n as,\n size,\n bold,\n children,\n className: _,\n style: __,\n ...otherProps\n } = props as LinkProps<T> & {\n className?: string;\n style?: React.CSSProperties;\n };\n\n const Component: React.ElementType = as || 'a';\n\n const className = cn(\n size ? [TYPOGRAPHY_TEXT_SIZE_CLASSES[size], TYPOGRAPHY_LINE_HEIGHT_CLASSES[size]] : undefined,\n /** set underline thickness depending on size of Link */\n size === 'sm' ? 'decoration-1' : 'decoration-2',\n 'underline cursor-pointer focus:outline-transparent focus-visible:yt-focus text-blue-700 focus-visible:text-blue-700 hover:text-blue-900 focus-visible:hover:text-blue-900 active:text-blue-900 focus-visible:active:text-blue-900 visited:text-blue-700 focus-visible:visited:text-blue-700 underline-offset-2 ',\n {\n 'font-bold': bold,\n }\n );\n\n return (\n <Component {...otherProps} className={className} data-taco=\"link\" ref={ref}>\n {children}\n </Component>\n );\n}\n\nexport const Link = React.forwardRef(LinkInner) as <T extends React.ElementType = 'a'>(\n props: LinkProps<T> & { ref?: React.Ref<unknown> }\n) => React.ReactElement | null;\n"],"names":[],"mappings":";;;AAgCA,SAAS,UACL,OACA,KACF;AAEQ,QAAA;AAAA,IACF;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,WAAW;AAAA,IACX,OAAO;AAAA,IACP,GAAG;AAAA,EAAA,IACH;AAKJ,QAAM,YAA+B,MAAM;AAE3C,QAAM,YAAY;AAAA,IACd,OAAO,CAAC,6BAA6B,IAAI,GAAG,+BAA+B,IAAI,CAAC,IAAI;AAAA;AAAA,IAEpF,SAAS,OAAO,iBAAiB;AAAA,IACjC;AAAA,IACA;AAAA,MACI,aAAa;AAAA,IAAA;AAAA,EAErB;AAGI,SAAA,sBAAA,cAAC,aAAW,GAAG,YAAY,WAAsB,aAAU,QAAO,OAC7D,QACL;AAER;AAEa,MAAA,OAAO,MAAM,WAAW,SAAS;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@economic/taco",
|
|
3
|
-
"version": "10.0.0
|
|
3
|
+
"version": "10.0.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -101,5 +101,5 @@
|
|
|
101
101
|
"optionalDependencies": {
|
|
102
102
|
"@rollup/rollup-linux-x64-gnu": "^4.62.2"
|
|
103
103
|
},
|
|
104
|
-
"gitHead": "
|
|
104
|
+
"gitHead": "8aa4a016f5ffaf5a210f49cbc675bef2868808ec"
|
|
105
105
|
}
|