@grantbii/design-system 1.11.2 → 1.11.3
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.
|
@@ -9,11 +9,12 @@ type LinkButtonProps = {
|
|
|
9
9
|
RightIcon?: ComponentType<Icons.IconProps>;
|
|
10
10
|
underline?: boolean;
|
|
11
11
|
backgroundColor?: string;
|
|
12
|
+
borderColor?: string;
|
|
12
13
|
color?: string;
|
|
13
14
|
width?: string;
|
|
14
15
|
} & DetailedHTMLProps<AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>;
|
|
15
16
|
/**
|
|
16
17
|
* A link that looks like a button
|
|
17
18
|
*/
|
|
18
|
-
declare const LinkButton: ({ label, LeftIcon, RightIcon, underline, backgroundColor, color, width, disabled, target, ...linkProps }: LinkButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
declare const LinkButton: ({ label, LeftIcon, RightIcon, underline, backgroundColor, borderColor, color, width, disabled, target, ...linkProps }: LinkButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
20
|
export default LinkButton;
|
package/core/atoms/LinkButton.js
CHANGED
|
@@ -5,18 +5,19 @@ import { BaseButton } from "./shared";
|
|
|
5
5
|
/**
|
|
6
6
|
* A link that looks like a button
|
|
7
7
|
*/
|
|
8
|
-
const LinkButton = ({ label, LeftIcon, RightIcon, underline, backgroundColor, color, width, disabled, target = "_blank", ...linkProps }) => {
|
|
8
|
+
const LinkButton = ({ label, LeftIcon, RightIcon, underline, backgroundColor, borderColor, color, width, disabled, target = "_blank", ...linkProps }) => {
|
|
9
9
|
const contentProps = {
|
|
10
10
|
label,
|
|
11
11
|
LeftIcon,
|
|
12
12
|
RightIcon,
|
|
13
13
|
underline,
|
|
14
14
|
backgroundColor,
|
|
15
|
+
borderColor,
|
|
15
16
|
color,
|
|
16
17
|
width,
|
|
17
18
|
};
|
|
18
19
|
return disabled ? (_jsx(Content, { ...contentProps })) : (_jsx(Link, { ...linkProps, target: target, children: _jsx(Content, { ...contentProps }) }));
|
|
19
20
|
};
|
|
20
21
|
export default LinkButton;
|
|
21
|
-
const Content = ({ label, LeftIcon, RightIcon, underline, backgroundColor, color, width, }) => (_jsxs(BaseButton, { "$underline": underline, "$backgroundColor": backgroundColor, "$color": color, "$width": width, children: [LeftIcon ? _jsx(LeftIcon, { color: color, size: 20 }) : _jsx(_Fragment, {}), label, RightIcon ? _jsx(RightIcon, { color: color, size: 20 }) : _jsx(_Fragment, {})] }));
|
|
22
|
+
const Content = ({ label, LeftIcon, RightIcon, underline, backgroundColor, borderColor, color, width, }) => (_jsxs(BaseButton, { "$underline": underline, "$backgroundColor": backgroundColor, "$borderColor": borderColor, "$color": color, "$width": width, children: [LeftIcon ? _jsx(LeftIcon, { color: color, size: 20 }) : _jsx(_Fragment, {}), label, RightIcon ? _jsx(RightIcon, { color: color, size: 20 }) : _jsx(_Fragment, {})] }));
|
|
22
23
|
//# sourceMappingURL=LinkButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkButton.js","sourceRoot":"","sources":["../../../core/atoms/LinkButton.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAQ7B,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"LinkButton.js","sourceRoot":"","sources":["../../../core/atoms/LinkButton.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAQ7B,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAmBtC;;GAEG;AACH,MAAM,UAAU,GAAG,CAAC,EAClB,KAAK,EACL,QAAQ,EACR,SAAS,EACT,SAAS,EACT,eAAe,EACf,WAAW,EACX,KAAK,EACL,KAAK,EACL,QAAQ,EACR,MAAM,GAAG,QAAQ,EACjB,GAAG,SAAS,EACI,EAAE,EAAE;IACpB,MAAM,YAAY,GAAG;QACnB,KAAK;QACL,QAAQ;QACR,SAAS;QACT,SAAS;QACT,eAAe;QACf,WAAW;QACX,KAAK;QACL,KAAK;KACN,CAAC;IAEF,OAAO,QAAQ,CAAC,CAAC,CAAC,CAChB,KAAC,OAAO,OAAK,YAAY,GAAI,CAC9B,CAAC,CAAC,CAAC,CACF,KAAC,IAAI,OAAK,SAAS,EAAE,MAAM,EAAE,MAAM,YACjC,KAAC,OAAO,OAAK,YAAY,GAAI,GACxB,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC;AAa1B,MAAM,OAAO,GAAG,CAAC,EACf,KAAK,EACL,QAAQ,EACR,SAAS,EACT,SAAS,EACT,eAAe,EACf,WAAW,EACX,KAAK,EACL,KAAK,GACQ,EAAE,EAAE,CAAC,CAClB,MAAC,UAAU,kBACG,SAAS,sBACH,eAAe,kBACnB,WAAW,YACjB,KAAK,YACL,KAAK,aAEZ,QAAQ,CAAC,CAAC,CAAC,KAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,GAAI,CAAC,CAAC,CAAC,mBAAK,EACvD,KAAK,EACL,SAAS,CAAC,CAAC,CAAC,KAAC,SAAS,IAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,GAAI,CAAC,CAAC,CAAC,mBAAK,IAC/C,CACd,CAAC","sourcesContent":["import Link from \"next/link\";\nimport type {\n AnchorHTMLAttributes,\n ComponentType,\n DetailedHTMLProps,\n HTMLAttributeAnchorTarget,\n ReactNode,\n} from \"react\";\nimport { Icons } from \"../foundations\";\nimport { BaseButton } from \"./shared\";\n\ntype LinkButtonProps = {\n label: ReactNode;\n href: string;\n disabled?: boolean;\n target?: HTMLAttributeAnchorTarget;\n LeftIcon?: ComponentType<Icons.IconProps>;\n RightIcon?: ComponentType<Icons.IconProps>;\n underline?: boolean;\n backgroundColor?: string;\n borderColor?: string;\n color?: string;\n width?: string;\n} & DetailedHTMLProps<\n AnchorHTMLAttributes<HTMLAnchorElement>,\n HTMLAnchorElement\n>;\n\n/**\n * A link that looks like a button\n */\nconst LinkButton = ({\n label,\n LeftIcon,\n RightIcon,\n underline,\n backgroundColor,\n borderColor,\n color,\n width,\n disabled,\n target = \"_blank\",\n ...linkProps\n}: LinkButtonProps) => {\n const contentProps = {\n label,\n LeftIcon,\n RightIcon,\n underline,\n backgroundColor,\n borderColor,\n color,\n width,\n };\n\n return disabled ? (\n <Content {...contentProps} />\n ) : (\n <Link {...linkProps} target={target}>\n <Content {...contentProps} />\n </Link>\n );\n};\n\nexport default LinkButton;\n\ntype ContentProps = {\n label: ReactNode;\n LeftIcon?: ComponentType<Icons.IconProps>;\n RightIcon?: ComponentType<Icons.IconProps>;\n underline?: boolean;\n backgroundColor?: string;\n borderColor?: string;\n color?: string;\n width?: string;\n};\n\nconst Content = ({\n label,\n LeftIcon,\n RightIcon,\n underline,\n backgroundColor,\n borderColor,\n color,\n width,\n}: ContentProps) => (\n <BaseButton\n $underline={underline}\n $backgroundColor={backgroundColor}\n $borderColor={borderColor}\n $color={color}\n $width={width}\n >\n {LeftIcon ? <LeftIcon color={color} size={20} /> : <></>}\n {label}\n {RightIcon ? <RightIcon color={color} size={20} /> : <></>}\n </BaseButton>\n);\n"]}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@grantbii/design-system",
|
|
3
3
|
"author": "Grantbii",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
|
-
"version": "1.11.
|
|
5
|
+
"version": "1.11.3",
|
|
6
6
|
"description": "Grantbii's Design System",
|
|
7
7
|
"homepage": "https://design.grantbii.com",
|
|
8
8
|
"repository": {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"build-storybook": "storybook build"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@grantbii/ui-core": "1.6.
|
|
23
|
+
"@grantbii/ui-core": "1.6.2",
|
|
24
24
|
"@phosphor-icons/react": "2.1.10",
|
|
25
25
|
"country-flag-icons": "1.6.4",
|
|
26
26
|
"next": "16.1.1",
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
"@chromatic-com/storybook": "4.1.3",
|
|
35
35
|
"@eslint/js": "9.39.2",
|
|
36
36
|
"@next/eslint-plugin-next": "16.1.1",
|
|
37
|
-
"@storybook/addon-a11y": "10.1.
|
|
38
|
-
"@storybook/addon-docs": "10.1.
|
|
39
|
-
"@storybook/addon-onboarding": "10.1.
|
|
40
|
-
"@storybook/addon-vitest": "10.1.
|
|
41
|
-
"@storybook/nextjs-vite": "10.1.
|
|
37
|
+
"@storybook/addon-a11y": "10.1.11",
|
|
38
|
+
"@storybook/addon-docs": "10.1.11",
|
|
39
|
+
"@storybook/addon-onboarding": "10.1.11",
|
|
40
|
+
"@storybook/addon-vitest": "10.1.11",
|
|
41
|
+
"@storybook/nextjs-vite": "10.1.11",
|
|
42
42
|
"@types/node": "22.18.0",
|
|
43
43
|
"@types/react": "19.2.7",
|
|
44
44
|
"@types/react-dom": "19.2.3",
|
|
@@ -48,12 +48,12 @@
|
|
|
48
48
|
"baseline-browser-mapping": "2.9.11",
|
|
49
49
|
"eslint": "9.39.2",
|
|
50
50
|
"eslint-config-next": "16.1.1",
|
|
51
|
-
"eslint-plugin-storybook": "10.1.
|
|
51
|
+
"eslint-plugin-storybook": "10.1.11",
|
|
52
52
|
"husky": "9.1.7",
|
|
53
53
|
"lint-staged": "16.2.7",
|
|
54
54
|
"playwright": "1.57.0",
|
|
55
55
|
"prettier": "3.7.4",
|
|
56
|
-
"storybook": "10.1.
|
|
56
|
+
"storybook": "10.1.11",
|
|
57
57
|
"typescript": "5.9.3",
|
|
58
58
|
"vitest": "4.0.16"
|
|
59
59
|
},
|