File tree Expand file tree Collapse file tree 10 files changed +80
-126
lines changed
packages/ui-components/src
Containers/NavBar/NavItem Expand file tree Collapse file tree 10 files changed +80
-126
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ const renderSmallPartner = (partner: Partner) => {
4040 key = { partner . id }
4141 size = "small"
4242 href = { partner . href }
43- title = { partner . name }
43+ data-tooltip = { partner . name }
4444 >
4545 < Logo . Favicon />
4646 </ PartnerButton >
Original file line number Diff line number Diff line change @@ -35,11 +35,7 @@ const WithMetaBar: FC = () => {
3535 // Since we cannot show the same number of avatars in Mobile / Tablet
3636 // resolution as we do on desktop and there is overflow, we are adjusting
3737 // the number of avatars manually for the resolutions below
38- const isMobileResolution = useMediaQuery ( '(max-width: 890px)' ) ;
39-
40- const isTabletResolution = useMediaQuery (
41- '(min-width: 890px) and (max-width: 1280px)'
42- ) ;
38+ const isSmallerThanDesktop = useMediaQuery ( '(max-width: 1280px)' ) ;
4339
4440 return (
4541 < MetaBar
@@ -55,7 +51,7 @@ const WithMetaBar: FC = () => {
5551 ) ] : (
5652 < WithAvatarGroup
5753 usernames = { usernames }
58- limit = { isMobileResolution ? 7 : isTabletResolution ? 5 : 9 }
54+ limit = { isSmallerThanDesktop ? 5 : 8 }
5955 />
6056 ) ,
6157 } ) ,
Original file line number Diff line number Diff line change 11/// <reference types="next" />
22/// <reference types="next/image-types/global" />
33/// <reference types="next/navigation-types/compat/navigation" />
4- import './.next/types/routes.d.ts' ;
4+ import './.next/dev/ types/routes.d.ts' ;
55
66// NOTE: This file should not be edited
77// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
Original file line number Diff line number Diff line change 3838 @apply bg-neutral-800;
3939 }
4040
41- & [data-tooltip ] {
42- @apply relative
43- cursor-help;
44- }
45-
46- & [data-tooltip ]::after {
47- @apply pointer-events-none
48- absolute
49- top-full
50- left-1/2
51- z-10
52- mt-2
53- w-max
54- -translate-x-1/2
55- rounded-md
56- bg-neutral-900
57- px-2.5
58- py-1.5
59- text-xs
60- font-medium
61- text-white
62- opacity-0
63- transition-opacity
64- dark:bg-neutral-100
65- dark:text-neutral-900;
66-
67- content : attr (data-tooltip);
68- }
69-
70- & [data-tooltip ]::before {
71- @apply pointer-events-none
72- absolute
73- top-full
74- left-1/2
75- z-10
76- mt-1
77- h-2
78- w-2
79- -translate-x-1/2
80- rotate-45
81- bg-neutral-900
82- opacity-0
83- transition-opacity
84- dark:bg-neutral-100;
85-
86- content : '' ;
87- }
88-
89- & [data-tooltip ]: hover ::after ,
90- & [data-tooltip ]: hover ::before ,
91- & [data-tooltip ]: focus-visible ::after ,
92- & [data-tooltip ]: focus-visible ::before {
93- @apply opacity-100;
94- }
95-
9641 & .circular {
9742 @apply font-ibm-plex-mono
9843 inline-flex
Original file line number Diff line number Diff line change 99 px-4.5
1010 py-2.5
1111 text-center
12- font-semibold
13- motion-safe:transition-colors;
12+ font-semibold;
1413
1514 svg {
1615 @apply size-5;
124123 after:mx-auto
125124 after:h-px
126125 after:w-2/5
127- after:bg-gradient -to-r
126+ after:bg-linear -to-r
128127 after:from-green-600/0
129128 after:via-green-600
130129 after:to-green-600/0
Original file line number Diff line number Diff line change 99 font-semibold
1010 text-white;
1111
12- & [data-tooltip ] {
13- @apply relative
14- cursor-help;
15- }
16-
17- & [data-tooltip ]::after {
18- @apply pointer-events-none
19- absolute
20- top-full
21- left-1/2
22- z-10
23- mt-2
24- w-max
25- -translate-x-1/2
26- rounded-md
27- bg-neutral-900
28- px-2.5
29- py-1.5
30- text-xs
31- font-medium
32- text-white
33- opacity-0
34- transition-opacity
35- dark:bg-neutral-100
36- dark:text-neutral-900;
37-
38- content : attr (data-tooltip);
39- }
40-
41- & [data-tooltip ]::before {
42- @apply pointer-events-none
43- absolute
44- top-full
45- left-1/2
46- z-10
47- mt-1
48- h-2
49- w-2
50- -translate-x-1/2
51- rotate-45
52- bg-neutral-900
53- opacity-0
54- transition-opacity
55- dark:bg-neutral-100;
56-
57- content : '' ;
58- }
59-
60- & [data-tooltip ]: hover ::after ,
61- & [data-tooltip ]: hover ::before ,
62- & [data-tooltip ]: focus-visible ::after ,
63- & [data-tooltip ]: focus-visible ::before {
64- @apply opacity-100;
65- }
66-
6712 & .lg {
6813 @apply size-12
6914 text-2xl;
Original file line number Diff line number Diff line change 2424 p-1.5
2525 text-neutral-900
2626 hover:bg-neutral-100
27- motion-safe:transition-colors
2827 dark:border-neutral-900
2928 dark:bg-neutral-950
3029 dark:text-neutral-200;
3130
3231 & : hover {
3332 @apply bg-neutral-100
34- motion-safe:transition-colors
3533 motion-safe:duration-300
3634 dark:bg-neutral-900;
3735
Original file line number Diff line number Diff line change 55 rounded-md
66 p-2
77 text-neutral-700
8- motion-safe:transition-colors
98 dark:text-neutral-300;
109
1110 & : hover {
Original file line number Diff line number Diff line change 66 gap-2
77 rounded-sm
88 px-3
9- py-2
10- motion-safe:transition-colors;
9+ py-2;
1110
1211 .label {
1312 @apply text-base
Original file line number Diff line number Diff line change @@ -15,3 +15,76 @@ body {
1515 dark:bg-neutral-950
1616 dark:text-white;
1717}
18+
19+ [data-tooltip ] {
20+ @apply relative
21+ cursor-help;
22+
23+ & ::after {
24+ @apply pointer-events-none
25+ absolute
26+ top-full
27+ left-1/2
28+ z-10
29+ mt-2
30+ w-max
31+ max-w-64
32+ -translate-x-1/2
33+ rounded-md
34+ border
35+ border-neutral-200
36+ bg-white
37+ px-2.5
38+ py-1.5
39+ text-sm
40+ font-medium
41+ text-neutral-900
42+ opacity-0
43+ shadow-lg
44+ transition-opacity;
45+
46+ content : attr (data-tooltip);
47+ }
48+
49+ & ::before {
50+ @apply pointer-events-none
51+ absolute
52+ top-full
53+ left-1/2
54+ z-10
55+ mt-1
56+ h-2
57+ w-2
58+ -translate-x-1/2
59+ rotate-45
60+ border
61+ border-r-0
62+ border-b-0
63+ border-neutral-200
64+ bg-white
65+ opacity-0
66+ transition-opacity;
67+
68+ content : '' ;
69+ }
70+
71+ & : hover ::after ,
72+ & : hover ::before ,
73+ & : focus-visible ::after ,
74+ & : focus-visible ::before {
75+ @apply opacity-100;
76+ }
77+ }
78+
79+ [data-theme = 'dark' ] [data-tooltip ] {
80+ & ::after {
81+ @apply border-neutral-900
82+ bg-neutral-950
83+ text-white;
84+ }
85+
86+ & ::before {
87+ @apply border-neutral-900
88+ bg-neutral-950;
89+ }
90+ }
You can’t perform that action at this time.
0 commit comments