@aristobyte-ui/anchor 2.4.0 → 2.5.1
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/es/src/main/components/Anchor/Anchor.scss +94 -0
- package/es/src/main/components/Anchor/index.d.ts +14 -0
- package/es/src/main/components/Anchor/index.d.ts.map +1 -0
- package/es/src/main/components/index.d.ts +2 -0
- package/es/src/main/components/index.d.ts.map +1 -0
- package/es/src/main/index.d.ts +2 -0
- package/es/src/main/index.d.ts.map +1 -0
- package/lib/src/main/components/Anchor/Anchor.scss +94 -0
- package/lib/src/main/components/Anchor/index.d.ts +14 -0
- package/lib/src/main/components/Anchor/index.d.ts.map +1 -0
- package/lib/src/main/components/index.d.ts +2 -0
- package/lib/src/main/components/index.d.ts.map +1 -0
- package/lib/src/main/index.d.ts +2 -0
- package/lib/src/main/index.d.ts.map +1 -0
- package/package.json +5 -3
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
@use '@aristobyte-ui/utils/styles' as *;
|
|
2
|
+
|
|
3
|
+
.anchor {
|
|
4
|
+
background-color: $transparent;
|
|
5
|
+
border: none;
|
|
6
|
+
cursor: pointer;
|
|
7
|
+
display: flex;
|
|
8
|
+
font-size: 0.875rem;
|
|
9
|
+
font-weight: 500;
|
|
10
|
+
letter-spacing: 0rem;
|
|
11
|
+
line-height: 1.4285714286;
|
|
12
|
+
overflow: hidden;
|
|
13
|
+
position: relative;
|
|
14
|
+
padding: 0.5rem 1rem;
|
|
15
|
+
transition: all 200ms ease;
|
|
16
|
+
|
|
17
|
+
&:hover {
|
|
18
|
+
text-decoration: underline;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&:active {
|
|
22
|
+
transform: scale(0.97);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&--white {
|
|
26
|
+
color: $white;
|
|
27
|
+
|
|
28
|
+
&:hover {
|
|
29
|
+
color: $white-hover;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&--black {
|
|
34
|
+
color: $black;
|
|
35
|
+
|
|
36
|
+
&:hover {
|
|
37
|
+
color: $black-hover;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&--default {
|
|
42
|
+
color: $color-default;
|
|
43
|
+
|
|
44
|
+
&:hover {
|
|
45
|
+
color: $color-default-hover;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&--primary {
|
|
50
|
+
color: $color-primary;
|
|
51
|
+
|
|
52
|
+
&:hover {
|
|
53
|
+
color: $color-primary-hover;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&--secondary {
|
|
58
|
+
color: $color-secondary;
|
|
59
|
+
|
|
60
|
+
&:hover {
|
|
61
|
+
color: $color-secondary-hover;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&--success {
|
|
66
|
+
color: $color-success;
|
|
67
|
+
|
|
68
|
+
&:hover {
|
|
69
|
+
color: $color-success-hover;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
&--error {
|
|
74
|
+
color: $color-error;
|
|
75
|
+
|
|
76
|
+
&:hover {
|
|
77
|
+
color: $color-error-hover;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&--warning {
|
|
82
|
+
color: $color-warning;
|
|
83
|
+
color: $black;
|
|
84
|
+
|
|
85
|
+
&:hover {
|
|
86
|
+
color: $color-warning-hover;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
svg {
|
|
91
|
+
height: 100%;
|
|
92
|
+
width: 100%;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import './Anchor.scss';
|
|
3
|
+
export interface IAnchor {
|
|
4
|
+
href?: string;
|
|
5
|
+
target?: '_self' | '_blank' | '_parent' | '_top';
|
|
6
|
+
text?: string;
|
|
7
|
+
children?: React.ReactElement | React.ReactNode | string;
|
|
8
|
+
onClick?: (e: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => void | Promise<void>;
|
|
9
|
+
variant?: 'white' | 'black' | 'default' | 'primary' | 'secondary' | 'success' | 'error' | 'warning';
|
|
10
|
+
className?: string;
|
|
11
|
+
style?: React.CSSProperties;
|
|
12
|
+
}
|
|
13
|
+
export declare const Anchor: React.FC<IAnchor>;
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../packages/anchor/src/main/components/Anchor/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,eAAe,CAAC;AAEvB,MAAM,WAAW,OAAO;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAC;IACjD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,KAAK,CAAC,YAAY,GAAG,KAAK,CAAC,SAAS,GAAG,MAAM,CAAC;IACzD,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,EAAE,UAAU,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvF,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;IACpG,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAED,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,OAAO,CA4BpC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/anchor/src/main/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/anchor/src/main/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
@use '@aristobyte-ui/utils/styles' as *;
|
|
2
|
+
|
|
3
|
+
.anchor {
|
|
4
|
+
background-color: $transparent;
|
|
5
|
+
border: none;
|
|
6
|
+
cursor: pointer;
|
|
7
|
+
display: flex;
|
|
8
|
+
font-size: 0.875rem;
|
|
9
|
+
font-weight: 500;
|
|
10
|
+
letter-spacing: 0rem;
|
|
11
|
+
line-height: 1.4285714286;
|
|
12
|
+
overflow: hidden;
|
|
13
|
+
position: relative;
|
|
14
|
+
padding: 0.5rem 1rem;
|
|
15
|
+
transition: all 200ms ease;
|
|
16
|
+
|
|
17
|
+
&:hover {
|
|
18
|
+
text-decoration: underline;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&:active {
|
|
22
|
+
transform: scale(0.97);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&--white {
|
|
26
|
+
color: $white;
|
|
27
|
+
|
|
28
|
+
&:hover {
|
|
29
|
+
color: $white-hover;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&--black {
|
|
34
|
+
color: $black;
|
|
35
|
+
|
|
36
|
+
&:hover {
|
|
37
|
+
color: $black-hover;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&--default {
|
|
42
|
+
color: $color-default;
|
|
43
|
+
|
|
44
|
+
&:hover {
|
|
45
|
+
color: $color-default-hover;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&--primary {
|
|
50
|
+
color: $color-primary;
|
|
51
|
+
|
|
52
|
+
&:hover {
|
|
53
|
+
color: $color-primary-hover;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&--secondary {
|
|
58
|
+
color: $color-secondary;
|
|
59
|
+
|
|
60
|
+
&:hover {
|
|
61
|
+
color: $color-secondary-hover;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&--success {
|
|
66
|
+
color: $color-success;
|
|
67
|
+
|
|
68
|
+
&:hover {
|
|
69
|
+
color: $color-success-hover;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
&--error {
|
|
74
|
+
color: $color-error;
|
|
75
|
+
|
|
76
|
+
&:hover {
|
|
77
|
+
color: $color-error-hover;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&--warning {
|
|
82
|
+
color: $color-warning;
|
|
83
|
+
color: $black;
|
|
84
|
+
|
|
85
|
+
&:hover {
|
|
86
|
+
color: $color-warning-hover;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
svg {
|
|
91
|
+
height: 100%;
|
|
92
|
+
width: 100%;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import './Anchor.scss';
|
|
3
|
+
export interface IAnchor {
|
|
4
|
+
href?: string;
|
|
5
|
+
target?: '_self' | '_blank' | '_parent' | '_top';
|
|
6
|
+
text?: string;
|
|
7
|
+
children?: React.ReactElement | React.ReactNode | string;
|
|
8
|
+
onClick?: (e: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => void | Promise<void>;
|
|
9
|
+
variant?: 'white' | 'black' | 'default' | 'primary' | 'secondary' | 'success' | 'error' | 'warning';
|
|
10
|
+
className?: string;
|
|
11
|
+
style?: React.CSSProperties;
|
|
12
|
+
}
|
|
13
|
+
export declare const Anchor: React.FC<IAnchor>;
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../packages/anchor/src/main/components/Anchor/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,eAAe,CAAC;AAEvB,MAAM,WAAW,OAAO;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAC;IACjD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,KAAK,CAAC,YAAY,GAAG,KAAK,CAAC,SAAS,GAAG,MAAM,CAAC;IACzD,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,EAAE,UAAU,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvF,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;IACpG,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAED,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,OAAO,CA4BpC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/anchor/src/main/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/anchor/src/main/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aristobyte-ui/anchor",
|
|
3
3
|
"description": "A fully-typed, lightweight Anchor component for AristoByteUI with ripple effect support, multiple variants, and seamless integration with SCSS modules and design tokens.",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.5.1",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"private": false,
|
|
7
7
|
"author": "AristoByte <info@aristobyte.com>",
|
|
@@ -43,11 +43,13 @@
|
|
|
43
43
|
},
|
|
44
44
|
"main": "lib/src/main/index.js",
|
|
45
45
|
"module": "es/src/main/index.js",
|
|
46
|
+
"types": "es/src/main/index.d.ts",
|
|
46
47
|
"peerDependencies": {
|
|
47
48
|
"react": "^19.1.0",
|
|
48
|
-
"react-dom": "^19.1.0"
|
|
49
|
+
"react-dom": "^19.1.0",
|
|
50
|
+
"sass": "^1.97.3"
|
|
49
51
|
},
|
|
50
52
|
"dependencies": {
|
|
51
|
-
"@aristobyte-ui/utils": "2.
|
|
53
|
+
"@aristobyte-ui/utils": "^2.5.1"
|
|
52
54
|
}
|
|
53
55
|
}
|